/*
 * CSS administrativo do plugin Studio Galleti Gestão.
 */

.sgg-wrap {
    max-width: 1280px;
}

.sgg-subtitle {
    font-size: 16px;
    margin-top: 4px;
    margin-bottom: 24px;
}

.sgg-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(190px, 1fr));
    gap: 14px;
    margin-top: 18px;
}

.sgg-grid-stats {
    grid-template-columns: repeat(4, minmax(190px, 1fr));
}

.sgg-card {
    background: #fff;
    border: 1px solid #dcdcde;
    border-radius: 10px;
    padding: 14px 16px;
    min-height: 108px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.04);
    margin-bottom: 14px;
}

.sgg-card-wide {
    max-width: 1180px;
}

.sgg-card h2 {
    margin-top: 0;
    margin-bottom: 8px;
    font-size: 12px;
        font-weight: 700;
line-height: 1.25;
}

.sgg-card p {
    color: #50575e;
    font-size: 11px;
    margin-top: 6px;
    margin-bottom: 8px;
    line-height: 1.35;
}

.sgg-big-number {
    font-size: 18px;
    line-height: 1.05;
    margin: 6px 0 8px;
    font-weight: 700;
    color: #1d2327 !important;
}

.sgg-status {
    display: inline-block;
    margin-top: 12px;
    padding: 5px 10px;
    border-radius: 999px;
    background: #e7f7ed;
    color: #0a6b2b;
    font-weight: 600;
    font-size: 12px;
}

.sgg-status-wait {
    background: #f0f0f1;
    color: #50575e;
}

.sgg-form label {
    display: block;
    font-weight: 600;
    margin-bottom: 12px;
}

.sgg-form input[type="text"],
.sgg-form input[type="email"],
.sgg-form input[type="number"],
.sgg-form input[type="date"],
.sgg-form select,
.sgg-form textarea {
    display: block;
    width: 100%;
    max-width: 100%;
    margin-top: 5px;
    font-weight: 400;
}

.sgg-form-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(220px, 1fr));
    gap: 14px 18px;
}

.sgg-table th,
.sgg-table td {
    vertical-align: middle;
font-size: 11px;
}

@media (max-width: 960px) {
    .sgg-grid,
    .sgg-grid-stats,
    .sgg-form-grid {
        grid-template-columns: 1fr;
    }
}

.sgg-total-box {
    background: #f6f7f7;
    border: 1px solid #dcdcde;
    border-radius: 8px;
    padding: 12px 14px;
    min-height: 59px;
}

.sgg-total-box span {
    display: block;
    font-weight: 600;
    color: #50575e;
    margin-bottom: 6px;
}

.sgg-total-box strong {
    display: block;
    font-size: 22px;
    color: #1d2327;
}

.sgg-muted {
    color: #646970;
}

.sgg-table tfoot th {
    background: #f6f7f7;
    font-size: 14px;
}

/* Visualização e impressão de orçamento */
.sgg-print-wrap {
    max-width: 1000px;
}

.sgg-print-actions {
    display: flex;
    gap: 8px;
    margin: 16px 0;
}

.sgg-quote-page {
    background: #fff;
    border: 1px solid #dcdcde;
    border-radius: 12px;
    padding: 34px;
    max-width: 920px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}

.sgg-quote-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 24px;
    border-bottom: 2px solid #1d2327;
    padding-bottom: 18px;
    margin-bottom: 24px;
}

.sgg-quote-header h1 {
    margin: 0 0 6px;
    font-size: 30px;
    line-height: 1.1;
}

.sgg-quote-header p {
    margin: 0;
    color: #50575e;
}

.sgg-quote-number {
    text-align: right;
    min-width: 220px;
}

.sgg-quote-number span {
    display: block;
    font-size: 13px;
    color: #646970;
    text-transform: uppercase;
    letter-spacing: .08em;
}

.sgg-quote-number strong {
    display: block;
    font-size: 22px;
    color: #1d2327;
    margin-top: 4px;
}

.sgg-quote-section {
    margin: 22px 0;
}

.sgg-quote-section h2 {
    margin: 0 0 10px;
    font-size: 16px;
    border-bottom: 1px solid #dcdcde;
    padding-bottom: 6px;
}

.sgg-quote-section p {
    margin: 5px 0;
    color: #1d2327;
}

.sgg-quote-two-cols {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 28px;
}

.sgg-quote-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 12px;
}

.sgg-quote-table th,
.sgg-quote-table td {
    border: 1px solid #dcdcde;
    padding: 9px 10px;
    text-align: left;
    vertical-align: top;
}

.sgg-quote-table thead th {
    background: #f6f7f7;
    font-weight: 700;
}

.sgg-quote-table tfoot th {
    background: #f6f7f7;
    font-size: 15px;
}

.sgg-quote-table tfoot th:first-child {
    text-align: right;
}

.sgg-quote-footer {
    border-top: 1px solid #dcdcde;
    margin-top: 28px;
    padding-top: 12px;
    color: #646970;
    font-size: 12px;
}

.sgg-quote-footer p {
    margin: 4px 0;
}

@media print {
    #adminmenumain,
    #wpadminbar,
    #wpfooter,
    .notice,
    .sgg-print-actions {
        display: none !important;
    }

    #wpcontent,
    #wpbody-content {
        margin: 0 !important;
        padding: 0 !important;
    }

    .wrap.sgg-wrap,
    .sgg-print-wrap {
        margin: 0 !important;
        max-width: none !important;
    }

    .sgg-quote-page {
        border: 0;
        border-radius: 0;
        box-shadow: none;
        padding: 0;
        max-width: none;
    }

    .sgg-quote-header h1 {
        font-size: 26px;
    }

    body {
        background: #fff !important;
    }
}

@media (max-width: 782px) {
    .sgg-quote-header,
    .sgg-quote-two-cols {
        display: block;
    }

    .sgg-quote-number {
        text-align: left;
        margin-top: 14px;
    }
}

.sgg-total-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    gap: 14px;
    margin: 14px 0 18px;
}

.sgg-total-row > div {
    background: #f6f7f7;
    border: 1px solid #dcdcde;
    border-radius: 8px;
    padding: 12px 14px;
}

.sgg-total-row span {
    display: block;
    font-weight: 600;
    color: #50575e;
    margin-bottom: 5px;
}

.sgg-total-row strong {
    display: block;
    font-size: 18px;
    color: #1d2327;
}

/* Gráficos anuais dos relatórios */
.sgg-report-chart-card {
    overflow: hidden;
}

.sgg-report-chart-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 12px;
}

.sgg-report-chart-heading h2 {
    margin-bottom: 5px;
}

.sgg-report-chart-heading p {
    margin: 0;
    color: #646970;
}

.sgg-report-chart-year {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 64px;
    padding: 6px 12px;
    border-radius: 999px;
    background: #f0f6fc;
    color: #135e96;
    font-weight: 700;
}

.sgg-report-chart-scroll {
    width: 100%;
    overflow-x: auto;
    padding-bottom: 4px;
}

.sgg-report-line-chart {
    display: block;
    width: 100%;
    min-width: 760px;
    height: auto;
    background: #fff;
}

.sgg-chart-grid-line {
    stroke: #dcdcde;
    stroke-width: 1;
    stroke-dasharray: 4 5;
}

.sgg-chart-axis-line {
    stroke: #8c8f94;
    stroke-width: 1.25;
}

.sgg-chart-axis-label,
.sgg-chart-month-label {
    fill: #646970;
    font-size: 12px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.sgg-chart-month-label {
    font-weight: 600;
}

.sgg-chart-line {
    fill: none;
    stroke: #2271b1;
    stroke-width: 4;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.sgg-chart-point-halo {
    fill: transparent;
}

.sgg-chart-point {
    fill: #fff;
    stroke: #2271b1;
    stroke-width: 4;
    cursor: help;
    transition: r .15s ease, fill .15s ease;
}

.sgg-chart-point:hover,
.sgg-chart-point:focus {
    r: 7;
    fill: #2271b1;
    outline: none;
}

.sgg-report-chart-values {
    display: grid;
    grid-template-columns: repeat(6, minmax(110px, 1fr));
    gap: 8px;
    margin-top: 12px;
}

.sgg-report-chart-values > div {
    border: 1px solid #dcdcde;
    border-radius: 7px;
    padding: 8px 10px;
    background: #f6f7f7;
}

.sgg-report-chart-values span,
.sgg-report-chart-values strong {
    display: block;
}

.sgg-report-chart-values span {
    color: #646970;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
}

.sgg-report-chart-values strong {
    margin-top: 3px;
    font-size: 13px;
}

@media (max-width: 1100px) {
    .sgg-report-chart-values {
        grid-template-columns: repeat(4, minmax(110px, 1fr));
    }
}

@media (max-width: 782px) {
    .sgg-report-chart-heading {
        display: block;
    }

    .sgg-report-chart-year {
        margin-top: 10px;
    }

    .sgg-report-chart-values {
        grid-template-columns: repeat(2, minmax(110px, 1fr));
    }
}

/* Subprojetos / PCP */
.sgg-checklist-box {
    background: #f6f7f7;
    border: 1px solid #dcdcde;
    border-radius: 8px;
    padding: 14px 16px;
    margin: 14px 0 18px;
}

.sgg-checklist-box h3 {
    margin-top: 0;
    margin-bottom: 6px;
}

.sgg-checklist-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(180px, 1fr));
    gap: 10px 14px;
    margin-top: 12px;
}

.sgg-check-label {
    background: #fff;
    border: 1px solid #dcdcde;
    border-radius: 6px;
    padding: 8px 10px;
    font-weight: 600;
}

.sgg-check-label input {
    margin-right: 6px;
}

.sgg-filter-form {
    display: flex;
    gap: 10px;
    align-items: end;
    margin: 8px 0 16px;
}

.sgg-filter-form label {
    font-weight: 600;
}

.sgg-filter-form select {
    display: block;
    min-width: 360px;
    margin-top: 5px;
}

@media (max-width: 960px) {
    .sgg-checklist-grid {
        grid-template-columns: 1fr;
    }

    .sgg-filter-form {
        display: block;
    }

    .sgg-filter-form select {
        min-width: 0;
        width: 100%;
        margin-bottom: 10px;
    }
}


/* Agenda Operacional */
.sgg-agenda-table th,
.sgg-agenda-table td {
    vertical-align: top;
}

.sgg-overdue-row td {
    background: #fdecec !important;
}

.sgg-badge {
    display: inline-block;
    margin-top: 5px;
    padding: 3px 7px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    line-height: 1;
}

.sgg-badge-danger {
    background: #d63638;
    color: #fff;
}

/* Kanban de Produção */
.sgg-kanban-actions-bar {
    display: flex;
    gap: 8px;
    margin: 14px 0 18px;
    flex-wrap: wrap;
}

.sgg-kanban-board {
    display: grid;
    grid-template-columns: repeat(4, minmax(240px, 1fr));
    gap: 14px;
    align-items: start;
    overflow-x: auto;
    padding-bottom: 12px;
}

.sgg-kanban-column {
    background: #f6f7f7;
    border: 1px solid #dcdcde;
    border-radius: 10px;
    min-width: 230px;
    padding: 10px;
}

.sgg-kanban-column-header {
    border-bottom: 1px solid #dcdcde;
    margin-bottom: 10px;
    padding-bottom: 8px;
}

.sgg-kanban-column-header h2 {
    margin: 0 0 4px;
    font-size: 16px;
}

.sgg-kanban-column-header h2 span {
    display: inline-block;
    min-width: 24px;
    padding: 2px 6px;
    border-radius: 999px;
    background: #fff;
    border: 1px solid #dcdcde;
    text-align: center;
    font-size: 12px;
}

.sgg-kanban-column-header p {
    margin: 0;
    color: #646970;
    font-size: 12px;
    line-height: 1.35;
}

.sgg-kanban-card-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.sgg-kanban-empty {
    padding: 14px;
    color: #646970;
    background: #fff;
    border: 1px dashed #c3c4c7;
    border-radius: 8px;
    text-align: center;
}

.sgg-kanban-card {
    background: #fff;
    border: 1px solid #dcdcde;
    border-radius: 10px;
    padding: 11px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.04);
}

.sgg-kanban-card-overdue {
    border-color: #d63638;
    background: #fff7f7;
}

.sgg-kanban-card-top {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    align-items: flex-start;
    margin-bottom: 8px;
}

.sgg-kanban-card-top strong {
    font-size: 14px;
    line-height: 1.25;
}

.sgg-priority {
    display: inline-block;
    flex: 0 0 auto;
    padding: 3px 7px;
    border-radius: 999px;
    background: #f0f0f1;
    color: #1d2327;
    font-size: 11px;
    font-weight: 700;
}

.sgg-priority-urgente {
    background: #d63638;
    color: #fff;
}

.sgg-priority-alta {
    background: #f0b849;
    color: #1d2327;
}

.sgg-priority-normal {
    background: #dbeafe;
    color: #1d4ed8;
}

.sgg-priority-baixa {
    background: #dcfce7;
    color: #166534;
}

.sgg-kanban-meta {
    margin: 4px 0;
    font-size: 12px;
    line-height: 1.35;
}

.sgg-progress-wrap {
    margin: 10px 0;
}

.sgg-progress-label {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    margin-bottom: 4px;
}

.sgg-progress-bar {
    height: 8px;
    background: #f0f0f1;
    border-radius: 999px;
    overflow: hidden;
}

.sgg-progress-bar span {
    display: block;
    height: 100%;
    background: #2271b1;
    border-radius: 999px;
}

.sgg-kanban-observation {
    margin: 8px 0;
    padding: 8px;
    background: #f6f7f7;
    border-left: 3px solid #2271b1;
    font-size: 12px;
    line-height: 1.35;
}

.sgg-kanban-card-actions {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    margin-top: 8px;
}

.sgg-kanban-move-actions {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    margin-top: 8px;
    border-top: 1px solid #f0f0f1;
    padding-top: 8px;
}

.sgg-kanban-move-actions a {
    font-size: 11px;
    text-decoration: none;
    background: #f6f7f7;
    border: 1px solid #dcdcde;
    border-radius: 999px;
    padding: 3px 7px;
}

@media (max-width: 1280px) {
    .sgg-kanban-board {
        grid-template-columns: repeat(2, minmax(240px, 1fr));
    }
}

@media (max-width: 782px) {
    .sgg-kanban-board {
        grid-template-columns: 1fr;
    }
}

/* Financeiro */
.sgg-finance-summary .sgg-big-number {
    font-size: 24px;
    line-height: 1.15;
}

.sgg-danger-link {
    color: #b32d2e;
}

.sgg-danger-link:hover {
    color: #8a2424;
}

/* Dashboard principal */
.sgg-dashboard-filter {
    margin-bottom: 18px;
}

.sgg-dashboard-hero {
    display: grid;
    grid-template-columns: repeat(3, minmax(220px, 1fr));
    gap: 14px;
    margin: 16px 0 18px;
}

.sgg-dashboard-hero > div {
    background: #fff;
    border: 1px solid #dcdcde;
    border-radius: 12px;
    padding: 16px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.04);
}

.sgg-hero-label {
    display: block;
    color: #646970;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .05em;
    font-size: 12px;
    margin-bottom: 8px;
}

.sgg-dashboard-hero strong {
    display: block;
    font-size: 28px;
    line-height: 1.05;
    margin-bottom: 6px;
}

.sgg-dashboard-hero p {
    margin: 0;
    color: #50575e;
}

.sgg-kpi-positive {
    color: #0a6b2b !important;
}

.sgg-kpi-negative {
    color: #b32d2e !important;
}

.sgg-mini-table th,
.sgg-mini-table td {
    vertical-align: top;
}

.sgg-action-grid {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin: 10px 0 12px;
}

@media (max-width: 960px) {
    .sgg-dashboard-hero {
        grid-template-columns: 1fr;
    }
}

/* Configurações */
.sgg-config-preview {
    background: #f6f7f7;
    border: 1px solid #dcdcde;
    border-radius: 10px;
    padding: 18px;
}

.sgg-config-preview h3 {
    margin-top: 0;
    font-size: 22px;
}

.sgg-config-preview span + span::before {
    content: " • ";
    color: #8c8f94;
}

.sgg-quote-contact {
    margin-top: 8px !important;
    font-size: 12px;
}


/* Usuários / Permissões */
.sgg-inline-form {
    display: flex;
    gap: 8px;
    align-items: center;
    margin: 0;
}

.sgg-inline-form select {
    max-width: 260px;
}

.sgg-checklist {
    margin-left: 18px;
    list-style: disc;
}

.sgg-checklist li {
    margin-bottom: 8px;
}


/* Ajuste v1.2.6 — Dashboard mais compacto em 4 colunas */
.sgg-wrap .sgg-grid-stats {
    grid-template-columns: repeat(4, minmax(190px, 1fr));
}

.sgg-wrap .sgg-grid-stats .sgg-card {
    padding: 14px 16px;
    min-height: 108px;
}

.sgg-wrap .sgg-grid-stats .sgg-card h2 {
    font-size: 12px;
        font-weight: 700;
line-height: 1.25;
    margin-bottom: 8px;
}

.sgg-wrap .sgg-grid-stats .sgg-big-number {
    font-size: 18px;
    line-height: 1.05;
}

.sgg-wrap .sgg-finance-summary .sgg-big-number {
    font-size: 18px;
}

@media (max-width: 1400px) {
    .sgg-wrap .sgg-grid-stats {
        grid-template-columns: repeat(3, minmax(190px, 1fr));
    }
}

@media (max-width: 1100px) {
    .sgg-wrap .sgg-grid-stats {
        grid-template-columns: repeat(2, minmax(190px, 1fr));
    }
}

@media (max-width: 782px) {
    .sgg-wrap .sgg-grid-stats {
        grid-template-columns: 1fr;
    }
}

/* Importação de serviços — v1.2.9 */
.sgg-import-help {
    background: #f6f7f7;
    border: 1px solid #dcdcde;
    border-radius: 8px;
    padding: 10px 12px;
    margin: 10px 0 12px;
    color: #50575e;
    line-height: 1.45;
}

.sgg-import-help code {
    background: #fff;
    border: 1px solid #dcdcde;
    border-radius: 4px;
    padding: 1px 5px;
}

.sgg-import-note {
    font-size: 13px;
    color: #646970;
}

.sgg-import-summary {
    display: grid;
    grid-template-columns: repeat(5, minmax(130px, 1fr));
    gap: 10px;
    margin: 12px 0 14px;
}

.sgg-import-summary span {
    background: #f6f7f7;
    border: 1px solid #dcdcde;
    border-radius: 8px;
    padding: 10px 12px;
    color: #50575e;
}

.sgg-import-summary strong {
    display: block;
    font-size: 22px;
    color: #1d2327;
    line-height: 1.1;
}

.sgg-import-details {
    margin-top: 12px;
}

.sgg-import-details summary {
    cursor: pointer;
    font-weight: 700;
}

@media (max-width: 960px) {
    .sgg-import-summary {
        grid-template-columns: repeat(2, minmax(130px, 1fr));
    }
}

@media (max-width: 600px) {
    .sgg-import-summary {
        grid-template-columns: 1fr;
    }
}


.sgg-checkbox-inline {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 34px;
    font-weight: 500;
}

.sgg-checkbox-inline input[type="checkbox"] {
    margin: 0;
}


/* Destaques operacionais — v1.3.8 */
.sgg-highlight-summary {
    margin: 16px 0;
}

.sgg-card-highlight {
    border-left: 5px solid #dba617;
    background: #fff8e5;
}

.sgg-row-highlight td,
.sgg-row-open td {
    background: #fff8e5 !important;
}

.sgg-row-highlight:hover td,
.sgg-row-open:hover td {
    background: #fff1c2 !important;
}

.sgg-badge-warning {
    background: #dba617;
    color: #1d2327;
    margin-left: 6px;
}

.sgg-badge-neutral {
    background: #646970;
    color: #fff;
    margin-left: 6px;
}


/* Destaque de saldo após retiradas — v1.4.0 */
.sgg-card-balance,
.sgg-balance-card {
    border-width: 3px !important;
    border-style: solid !important;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.sgg-card-balance-positive,
.sgg-balance-card.sgg-card-balance-positive {
    background: #e8f7ed !important;
    border-color: #1f8f45 !important;
}

.sgg-card-balance-negative,
.sgg-balance-card.sgg-card-balance-negative {
    background: #fdecec !important;
    border-color: #d63638 !important;
}

.sgg-card-balance-positive .sgg-big-number,
.sgg-balance-card.sgg-card-balance-positive strong {
    color: #0a6b2b !important;
}

.sgg-card-balance-negative .sgg-big-number,
.sgg-balance-card.sgg-card-balance-negative strong {
    color: #b32d2e !important;
}


.sgg-muted-row td {
    color: #646970;
    background: #f6f7f7 !important;
}


/* Layout do Dashboard — v1.4.3 */
.sgg-dashboard-priority-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 14px;
    margin-top: 18px;
    align-items: start;
}

.sgg-dashboard-table-card {
    max-width: none;
    overflow-x: auto;
}

.sgg-dashboard-table-card table {
    min-width: 760px;
}

@media (max-width: 1100px) {
    .sgg-dashboard-priority-grid {
        grid-template-columns: 1fr;
    }
}


/* Ajuste tipográfico das tabelas iniciais do Dashboard — v1.4.4 */
.sgg-dashboard-priority-grid .sgg-card h2 {
    font-size: 12px;
    font-weight: 700;
}

.sgg-dashboard-priority-grid .sgg-card p {
    font-size: 11px;
}

.sgg-dashboard-priority-grid .sgg-table,
.sgg-dashboard-priority-grid .sgg-table th,
.sgg-dashboard-priority-grid .sgg-table td {
    font-size: 11px;
}


/* Cabeçalho com botão em cards do Dashboard — v1.4.6 */
.sgg-card-title-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 8px;
}

.sgg-card-title-row h2 {
    margin: 0;
}

.sgg-card-title-row .button {
    white-space: nowrap;
}


/* Ajustes do Dashboard — v1.4.7 */
.sgg-dashboard-page .button,
.sgg-dashboard-page .button-primary {
    font-size: 11px;
}

.sgg-dashboard-page .sgg-dashboard-card-grid {
    grid-template-columns: repeat(5, minmax(130px, 1fr));
}

@media (max-width: 1280px) {
    .sgg-dashboard-page .sgg-dashboard-card-grid {
        grid-template-columns: repeat(4, minmax(140px, 1fr));
    }
}

@media (max-width: 960px) {
    .sgg-dashboard-page .sgg-dashboard-card-grid {
        grid-template-columns: repeat(2, minmax(150px, 1fr));
    }
}

@media (max-width: 600px) {
    .sgg-dashboard-page .sgg-dashboard-card-grid {
        grid-template-columns: 1fr;
    }
}


/* Tipografia da Agenda Operacional — v1.4.8 */
.sgg-agenda-page .sgg-card h2 {
    font-size: 12px;
    font-weight: 700;
}

.sgg-agenda-page .sgg-card p {
    font-size: 11px;
}

.sgg-agenda-page .sgg-table,
.sgg-agenda-page .sgg-table th,
.sgg-agenda-page .sgg-table td {
    font-size: 11px;
}


/* Ajustes globais e Agenda/Kanban — v1.4.9 */
.sgg-wrap .button,
.sgg-wrap .button-primary,
.sgg-wrap .button-small {
    font-size: 11px;
}

.sgg-agenda-page .sgg-agenda-table th,
.sgg-agenda-page .sgg-agenda-table td {
    padding-top: 4px;
    padding-bottom: 4px;
    line-height: 1.2;
}

.sgg-kanban-card-actions .button,
.sgg-kanban-card-actions .button-primary,
.sgg-kanban-card-actions .button-small {
    font-size: 7px;
    line-height: 1.1;
    min-height: 20px;
    padding: 2px 5px;
}


/* Altura compacta dos botões do sistema — v1.4.10 */
.sgg-wrap .button,
.sgg-wrap .button-primary,
.sgg-wrap .button-secondary,
.sgg-wrap .button-small,
.sgg-frontend-app .button,
.sgg-frontend-app .button-primary,
.sgg-frontend-app .button-secondary,
.sgg-frontend-app .button-small {
    min-height: 22px;
    height: auto;
    line-height: 20px;
    padding: 0 7px;
    font-size: 11px;
}

.sgg-wrap button.button,
.sgg-wrap button.button-primary,
.sgg-wrap input.button,
.sgg-wrap input.button-primary,
.sgg-frontend-app button.button,
.sgg-frontend-app button.button-primary,
.sgg-frontend-app input.button,
.sgg-frontend-app input.button-primary {
    min-height: 22px;
    line-height: 20px;
    padding-top: 0;
    padding-bottom: 0;
}


/* Tabelas financeiras na coluna direita do Dashboard — v1.4.11 */
.sgg-dashboard-right-stack {
    display: flex;
    flex-direction: column;
    gap: 14px;
    min-width: 0;
}

.sgg-dashboard-right-stack .sgg-dashboard-table-card {
    width: 100%;
}

.sgg-month-filter-form {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 6px;
    flex-wrap: wrap;
    margin: 0;
}

.sgg-month-filter-form label {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 11px;
    color: #50575e;
    margin: 0;
}

.sgg-month-filter-form input[type="month"] {
    min-height: 22px;
    line-height: 20px;
    font-size: 11px;
    padding: 0 5px;
    max-width: 125px;
}

.sgg-dashboard-finance-total {
    margin-top: 0;
    margin-bottom: 7px;
    font-size: 11px;
}

.sgg-dashboard-right-stack .sgg-dashboard-finance-table table {
    min-width: 620px;
}

@media (max-width: 1100px) {
    .sgg-dashboard-right-stack {
        gap: 12px;
    }

    .sgg-card-title-row {
        align-items: flex-start;
        flex-direction: column;
    }

    .sgg-month-filter-form {
        justify-content: flex-start;
    }
}


/* Correção dos filtros financeiros do Dashboard — v1.4.12 */
.sgg-month-filter-form .button {
    white-space: nowrap;
}


/* Diagnóstico financeiro do Dashboard — v1.4.13 */
.sgg-dashboard-debug {
    margin: -4px 0 0;
    font-size: 10px;
    line-height: 1.3;
}


/* Reorganização das colunas superiores do Dashboard — v1.4.14 */
.sgg-dashboard-left-stack {
    display: flex;
    flex-direction: column;
    gap: 14px;
    min-width: 0;
}

.sgg-dashboard-left-stack .sgg-dashboard-table-card {
    width: 100%;
}


/* Layout superior do Dashboard — versão 2.0 */
.sgg-dashboard-page .sgg-dashboard-priority-grid {
    grid-template-columns: minmax(0, 1.12fr) minmax(300px, 0.88fr);
    column-gap: 22px;
    row-gap: 14px;
    align-items: start;
}

.sgg-dashboard-page .sgg-dashboard-right-stack {
    border-left: 1px solid #dcdcde;
    padding-left: 18px;
}

.sgg-dashboard-page .sgg-dashboard-left-stack,
.sgg-dashboard-page .sgg-dashboard-right-stack {
    min-width: 0;
}

.sgg-dashboard-page .sgg-dashboard-right-stack .sgg-dashboard-table-card {
    max-width: 100%;
}

.sgg-dashboard-page .sgg-dashboard-right-stack .sgg-dashboard-finance-table table {
    min-width: 500px;
}

.sgg-dashboard-page .sgg-dashboard-right-stack .sgg-dashboard-finance-table th,
.sgg-dashboard-page .sgg-dashboard-right-stack .sgg-dashboard-finance-table td {
    padding-left: 5px;
    padding-right: 5px;
    white-space: normal;
}

.sgg-dashboard-page .sgg-dashboard-right-stack .sgg-dashboard-finance-table th:nth-child(4),
.sgg-dashboard-page .sgg-dashboard-right-stack .sgg-dashboard-finance-table td:nth-child(4) {
    max-width: 95px;
}

.sgg-dashboard-page .sgg-dashboard-right-stack .sgg-dashboard-finance-table th:nth-child(6),
.sgg-dashboard-page .sgg-dashboard-right-stack .sgg-dashboard-finance-table td:nth-child(6) {
    width: 42px;
}

@media (max-width: 1180px) {
    .sgg-dashboard-page .sgg-dashboard-priority-grid {
        grid-template-columns: 1fr;
    }

    .sgg-dashboard-page .sgg-dashboard-right-stack {
        border-left: 0;
        border-top: 1px solid #dcdcde;
        padding-left: 0;
        padding-top: 16px;
    }

    .sgg-dashboard-page .sgg-dashboard-right-stack .sgg-dashboard-finance-table table {
        min-width: 620px;
    }
}


/* Ajustes de layout do Dashboard — versão 2.1 */
.sgg-dashboard-page .sgg-dashboard-right-stack {
    border-left: 0;
    padding-left: 0;
}

.sgg-dashboard-page .sgg-dashboard-priority-grid {
    column-gap: 24px;
}

.sgg-dashboard-page .sgg-dashboard-agenda-card {
    border: 2px solid #0b1f3a;
    box-shadow: 0 2px 8px rgba(11, 31, 58, 0.08);
}

@media (max-width: 1180px) {
    .sgg-dashboard-page .sgg-dashboard-right-stack {
        border-top: 0;
        padding-top: 0;
    }
}


/* Dashboard — versão 2.2 */
.sgg-dashboard-page .sgg-dashboard-priority-grid {
    grid-template-columns: minmax(0, 1.08fr) minmax(280px, 0.82fr);
    column-gap: 36px;
}

.sgg-dashboard-page .sgg-dashboard-right-stack .sgg-dashboard-finance-table table {
    min-width: 460px;
}

.sgg-dashboard-page .sgg-dashboard-card-grid {
    grid-template-columns: repeat(6, minmax(95px, 1fr));
    gap: 10px;
}

.sgg-dashboard-page .sgg-dashboard-card-grid .sgg-card {
    padding: 10px 10px;
    min-height: 82px;
}

.sgg-dashboard-page .sgg-dashboard-card-grid .sgg-card h2 {
    margin-bottom: 6px;
}

.sgg-dashboard-page .sgg-dashboard-card-grid .sgg-big-number {
    margin: 4px 0 6px;
}

@media (max-width: 1380px) {
    .sgg-dashboard-page .sgg-dashboard-card-grid {
        grid-template-columns: repeat(4, minmax(110px, 1fr));
    }
}

@media (max-width: 1100px) {
    .sgg-dashboard-page .sgg-dashboard-priority-grid {
        grid-template-columns: 1fr;
    }

    .sgg-dashboard-page .sgg-dashboard-right-stack .sgg-dashboard-finance-table table {
        min-width: 620px;
    }

    .sgg-dashboard-page .sgg-dashboard-card-grid {
        grid-template-columns: repeat(3, minmax(120px, 1fr));
    }
}

@media (max-width: 700px) {
    .sgg-dashboard-page .sgg-dashboard-card-grid {
        grid-template-columns: repeat(2, minmax(130px, 1fr));
    }
}

@media (max-width: 480px) {
    .sgg-dashboard-page .sgg-dashboard-card-grid {
        grid-template-columns: 1fr;
    }
}


/* Despesas recorrentes — versão 2.3 */
.sgg-recurring-expense-card {
    border: 2px solid #0b1f3a;
    box-shadow: 0 2px 8px rgba(11, 31, 58, 0.08);
}

.sgg-recurring-expense-card h2 {
    color: #0b1f3a;
}

.sgg-inline-checkbox {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin: 10px 0;
    font-size: 11px;
}


/* Tabelas recolhíveis do Financeiro — versão 2.4 */
.sgg-collapsible-header {
    align-items: center;
    margin-bottom: 8px;
}

.sgg-collapsible-header h2 {
    margin: 0;
}

.sgg-collapsible-card.is-collapsed {
    min-height: 0;
}

.sgg-collapsible-card.is-collapsed .sgg-collapsible-body {
    display: none;
}

.sgg-collapsible-toggle {
    white-space: nowrap;
}


/* Padronização visual de prazos — versão 2.7 */
.sgg-table tr.sgg-due-overdue-row > th,
.sgg-table tr.sgg-due-overdue-row > td,
.sgg-table tr.sgg-overdue-row > th,
.sgg-table tr.sgg-overdue-row > td,
tr.sgg-due-overdue-row > th,
tr.sgg-due-overdue-row > td,
tr.sgg-overdue-row > th,
tr.sgg-overdue-row > td {
    background: #fdecec !important;
}

.sgg-table tr.sgg-due-soon-row > th,
.sgg-table tr.sgg-due-soon-row > td,
tr.sgg-due-soon-row > th,
tr.sgg-due-soon-row > td {
    background: #fff8db !important;
}

.sgg-table tr.sgg-due-future-row > th,
.sgg-table tr.sgg-due-future-row > td,
tr.sgg-due-future-row > th,
tr.sgg-due-future-row > td {
    background: #edf8ee !important;
}

.sgg-badge-warning {
    background: #f8e5a0;
    color: #6b4e00;
    border: 1px solid #e4c55b;
}

.sgg-badge-success {
    background: #dff3e5;
    color: #0a6b2b;
    border: 1px solid #9bd3aa;
}


/* Impressão de orçamento — versão 2.9 */
.sgg-quote-client-project {
    font-size: 12px;
    line-height: 1.25;
    gap: 22px;
}

.sgg-quote-client-project h2 {
    font-size: 13px;
    margin-bottom: 6px;
    padding-bottom: 4px;
}

.sgg-quote-client-project p {
    margin: 3px 0;
}

.sgg-quote-client-project strong {
    font-weight: 700;
}

@media print {
    .sgg-quote-client-project {
        font-size: 11px;
        line-height: 1.22;
        margin: 14px 0;
    }

    .sgg-quote-client-project h2 {
        font-size: 12px;
        margin-bottom: 5px;
        padding-bottom: 3px;
    }

    .sgg-quote-client-project p {
        margin: 2px 0;
    }

    .sgg-quote-section {
        margin: 14px 0;
    }

    .sgg-quote-section h2 {
        font-size: 13px;
        margin-bottom: 6px;
        padding-bottom: 4px;
    }

    .sgg-quote-table th,
    .sgg-quote-table td {
        padding: 6px 7px;
        font-size: 11px;
    }

    .sgg-quote-table tfoot th {
        font-size: 11px;
    }

    .sgg-quote-footer img,
    .sgg-quote-footer svg,
    .sgg-quote-footer canvas,
    .sgg-quote-footer [class*="logo"],
    .sgg-quote-footer [class*="icon"] {
        display: none !important;
    }

    body:has(.sgg-quote-page) .sgg-front-sidebar,
    body:has(.sgg-quote-page) .sgg-front-topbar,
    body:has(.sgg-quote-page) .sgg-sidebar-toggle,
    body:has(.sgg-quote-page) .sgg-front-logo,
    body:has(.sgg-quote-page) .sgg-front-user,
    body:has(.sgg-quote-page) .sgg-print-actions,
    body:has(.sgg-quote-page) .cky-btn-revisit-wrapper,
    body:has(.sgg-quote-page) .cky-revisit-bottom-left,
    body:has(.sgg-quote-page) .cookieadmin-revisit-wrapper,
    body:has(.sgg-quote-page) .cookieadmin,
    body:has(.sgg-quote-page) [class*="cookie"],
    body:has(.sgg-quote-page) [id*="cookie"],
    body:has(.sgg-quote-page) [class*="chat"],
    body:has(.sgg-quote-page) [id*="chat"] {
        display: none !important;
    }

    body:has(.sgg-quote-page) .sgg-front-shell,
    body:has(.sgg-quote-page) .sgg-front-shell.is-sidebar-expanded,
    body:has(.sgg-quote-page) .sgg-front-shell.is-sidebar-collapsed {
        display: block !important;
    }

    body:has(.sgg-quote-page) .sgg-front-main,
    body:has(.sgg-quote-page) .sgg-front-content {
        padding: 0 !important;
        margin: 0 !important;
    }
}


/* Kanban compacto e colorido por prazo — versão 3.0 */
.sgg-kanban-card {
    transition: background .15s ease, border-color .15s ease, box-shadow .15s ease;
}

.sgg-kanban-card-due-overdue {
    background: #fdecec;
    border-color: #e0a3a3;
}

.sgg-kanban-card-due-soon {
    background: #fff8db;
    border-color: #e4c55b;
}

.sgg-kanban-card-due-future {
    background: #edf8ee;
    border-color: #9bd3aa;
}

.sgg-kanban-card-toggle {
    width: 100%;
    margin-top: 6px;
    text-align: center;
}

.sgg-kanban-card-details {
    margin-top: 8px;
}

.sgg-kanban-card.is-collapsed {
    padding: 9px;
}

.sgg-kanban-card.is-collapsed .sgg-kanban-card-details {
    display: none;
}

.sgg-kanban-card.is-collapsed .sgg-kanban-card-top {
    margin-bottom: 6px;
}

.sgg-kanban-card.is-collapsed .sgg-kanban-card-top strong {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.sgg-kanban-card.is-collapsed .sgg-kanban-meta {
    margin: 3px 0;
}

.sgg-kanban-card.is-collapsed .sgg-progress-wrap {
    margin: 6px 0;
}

.sgg-kanban-card.is-expanded {
    box-shadow: 0 3px 12px rgba(0,0,0,0.08);
}


/* Kanban estilo card compacto — versão 3.1 */
.sgg-kanban-column {
    background: #f1f2f4;
}

.sgg-kanban-card {
    padding: 8px 9px;
    border-radius: 8px;
    box-shadow: 0 1px 0 rgba(9,30,66,.25);
}

.sgg-kanban-card-top {
    margin-bottom: 6px;
    align-items: flex-start;
}

.sgg-kanban-card-top strong {
    font-size: 12px;
    line-height: 1.25;
    font-weight: 700;
}

.sgg-kanban-card-toggle {
    flex: 0 0 auto;
    width: 24px;
    height: 22px;
    min-height: 22px;
    padding: 0;
    border: 0;
    border-radius: 6px;
    background: transparent;
    color: #44546f;
    font-size: 14px;
    line-height: 1;
    cursor: pointer;
}

.sgg-kanban-card-toggle:hover {
    background: rgba(9,30,66,.10);
}

.sgg-kanban-compact-meta {
    display: flex;
    align-items: center;
    gap: 5px;
    flex-wrap: wrap;
    margin-top: 4px;
}

.sgg-kanban-mini-meta {
    display: inline-flex;
    align-items: center;
    min-height: 18px;
    padding: 1px 6px;
    border-radius: 999px;
    background: rgba(255,255,255,.68);
    border: 1px solid rgba(0,0,0,.08);
    color: #44546f;
    font-size: 10px;
    font-weight: 700;
}

.sgg-kanban-card .sgg-badge,
.sgg-kanban-card .sgg-priority {
    font-size: 10px;
    line-height: 1.2;
    padding: 2px 6px;
}

.sgg-kanban-card.is-collapsed {
    padding: 8px 9px;
}

.sgg-kanban-card.is-collapsed .sgg-kanban-card-top strong {
    -webkit-line-clamp: 2;
}

.sgg-kanban-card.is-collapsed .sgg-kanban-card-details {
    display: none;
}

.sgg-kanban-card.is-expanded .sgg-kanban-card-details {
    display: block;
}

.sgg-kanban-card.is-expanded .sgg-kanban-card-toggle span[aria-hidden="true"] {
    font-size: 0;
}

.sgg-kanban-card.is-expanded .sgg-kanban-card-toggle span[aria-hidden="true"]::after {
    content: "−";
    font-size: 17px;
    line-height: 1;
}

.sgg-kanban-card.is-expanded {
    padding: 10px;
}

.sgg-kanban-card.is-expanded .sgg-kanban-compact-meta {
    margin-bottom: 8px;
}

.sgg-kanban-card.is-expanded .sgg-kanban-card-actions,
.sgg-kanban-card.is-expanded .sgg-kanban-move-actions {
    margin-top: 7px;
}

.sgg-kanban-card.is-expanded .sgg-kanban-observation {
    margin: 7px 0;
    padding: 7px;
    font-size: 11px;
}

.sgg-kanban-card-due-overdue {
    background: #fdecec;
    border-color: #e1a4a4;
}

.sgg-kanban-card-due-soon {
    background: #fff3c4;
    border-color: #e2b93b;
}

.sgg-kanban-card-due-future {
    background: #e7f5ea;
    border-color: #9bd3aa;
}
