:root {
    --brand-green: #419888;
    --brand: #168c80;
    --brand-dark: #10766c;
    --brand-deep: #167f75;
    --brand-soft: #e5f2f0;
    --ink: #344250;
    --title: #17202b;
    --muted: #667481;
    --muted-light: #84909b;
    --line: #e2e8e7;
    --line-soft: #edf1f0;
    --surface: #fff;
    --surface-muted: #f8fafa;
    --canvas: #fff;
    --sidebar-surface: #f5f7f7;
    --success: #167f75;
    --danger: #bd2026;
    --chart-1: #167f75;
    --chart-2: #419888;
    --chart-3: #63aa9e;
    --chart-4: #83bcaf;
    --chart-5: #a8d0c5;
    --chart-6: #d5e8e3;
}

body { color: var(--ink); background: var(--canvas); }
h1, h2, h3, h4, h5, h6 { color: var(--title); }
.topbar { background: #fff; border-color: var(--line-soft); box-shadow: 0 1px 8px rgb(23 32 43 / 3%); }
.brand { min-width: 0; }
.brand-logo { display: block; width: auto; max-width: min(13rem, 35vw); height: 2.35rem; object-fit: contain; object-position: left center; }
.brand-text-fallback { color: var(--title); font-size: .92rem; letter-spacing: -.01em; white-space: nowrap; }
.brand-text-fallback strong { color: var(--brand); }
.icon-button, .text-button { display: inline-flex; align-items: center; justify-content: center; gap: .4rem; }
.icon-button svg { width: 1.25rem; height: 1.25rem; }
.logout-button svg { width: 1rem; height: 1rem; }

.sidebar { background: var(--sidebar-surface); border-right: 1px solid var(--line-soft); scrollbar-color: #c7d4d1 var(--sidebar-surface); }
.sidebar::-webkit-scrollbar-track { background: var(--sidebar-surface); }
.sidebar::-webkit-scrollbar-thumb { background: #c7d4d1; border-color: var(--sidebar-surface); }
.sidebar::-webkit-scrollbar-thumb:hover { background: #a8bdb8; }
.nav-item, .nav-module-title { color: var(--ink); }
.nav-item:hover, .nav-item.is-active, .nav-module-title:hover { color: var(--brand-dark); background: var(--brand-soft); }
.nav-item.is-active { box-shadow: inset 3px 0 var(--brand); }
.nav-subitem { display: flex; align-items: center; gap: .55rem; color: var(--muted); }
.nav-subitem:hover, .nav-subitem.is-active { color: var(--brand-dark); background: var(--brand-soft); }
.nav-icon svg { width: 1.15rem; height: 1.15rem; }
.nav-subitem svg { flex: 0 0 auto; width: .92rem; height: .92rem; }
.nav-module-chevron svg { width: .9rem; height: .9rem; }

.module-card:hover, .task-row:hover { border-color: #a8d0c5; }
input, textarea, select { border-color: #cbd8d5; }
input:focus, textarea:focus, select:focus { border-color: var(--brand); box-shadow: 0 0 0 3px rgb(22 140 128 / 12%); }
th, .calendar-day > header, .month-weekday { background: var(--surface-muted); }
tbody tr:hover, .clickable-row:hover td { background: #f7fbfa; }
.auth-shell { background: linear-gradient(145deg, #f4f8f7, #fff 58%, #e5f2f0); }
.login-panel { box-shadow: 0 22px 65px rgb(23 127 117 / 10%); }
.login-brand { min-height: 3.5rem; }
.login-logo { display: block; width: auto; max-width: 14rem; max-height: 4.25rem; object-fit: contain; object-position: left center; }

.management-kpis article { background: linear-gradient(145deg, #fff, #f8fafa); }
.management-kpis .revenue { background: linear-gradient(135deg, #105e57, #419888); }
.management-kpis .revenue::before { background: #d5e8e3; }
.management-kpis .revenue span, .management-kpis .revenue small { color: #e5f2f0; }
.legend-lead::before, .bar-lead, .metric-bar i, .conversion-strip i { background: var(--chart-1); }
.legend-appointment::before, .bar-appointment, .conversion-strip i:nth-child(2) { background: var(--chart-3); }
.legend-sale::before, .bar-sale, .metric-success i, .conversion-strip i:nth-child(3) { background: var(--chart-2); }
.metric-bar { background: var(--brand-soft); }
.secretary-card { background: linear-gradient(145deg, #fff, #f5f9f8); }
.continuous-funnel-shape { background: linear-gradient(115deg, #168c80, #10766c); }
.continuous-funnel-row:nth-child(2) .continuous-funnel-shape { background: linear-gradient(115deg, #419888, #168c80); }
.continuous-funnel-row:nth-child(3) .continuous-funnel-shape { background: linear-gradient(115deg, #63aa9e, #419888); }
.continuous-funnel-row:nth-child(4) .continuous-funnel-shape { background: linear-gradient(115deg, #83bcaf, #63aa9e); }
.continuous-funnel-row:nth-child(5) .continuous-funnel-shape { background: linear-gradient(115deg, #a8d0c5, #83bcaf); }

.brand-settings-layout { grid-template-columns: minmax(0, 1.45fr) minmax(18rem, .8fr); }
.brand-upload-card, .brand-preview-card { padding: 1.35rem; }
.brand-upload-card .stack-form { margin-top: 0; }
.brand-preview-surface { display: grid; min-height: 12rem; margin-top: 1rem; padding: 1.5rem; place-items: center; background: #fff; border: 1px solid var(--line); border-radius: .75rem; }
.brand-preview-surface img { display: block; max-width: 100%; max-height: 9rem; object-fit: contain; }
.brand-preview-empty { display: grid; min-height: 12rem; margin-top: 1rem; place-items: center; color: var(--muted); background: var(--surface-muted); border: 1px dashed #b9cac6; border-radius: .75rem; }
.brand-file-note { margin: .8rem 0 0; color: var(--muted); font-size: .8rem; line-height: 1.5; }
.checkbox-field { display: flex; align-items: center; gap: .6rem; }
.checkbox-field input { width: 1rem; min-height: 1rem; }

@media (max-width: 48rem) {
    .brand-settings-layout { grid-template-columns: 1fr; }
    .user-name, .logout-button span { display: none; }
    .brand-logo { max-width: 9rem; height: 2rem; }
}

.coverage-notice{display:flex;flex-wrap:wrap;gap:.35rem 1rem;margin-bottom:.8rem;padding:.8rem 1rem;color:#76520a;background:#fff8e6;border:1px solid #f2dfaa;border-radius:.65rem;font-size:.82rem}.coverage-notice span{display:block}


.meta-report-table-card,
.meta-report-table-scroll { overflow: visible; }
.meta-report-table { width: 100%; table-layout: fixed; }
.meta-report-table .col-select { width: 3%; }
.meta-report-table .col-client { width: 18%; }
.meta-report-table .col-reach { width: 8%; }
.meta-report-table .col-impressions { width: 9%; }
.meta-report-table .col-clicks { width: 7%; }
.meta-report-table .col-ctr { width: 6%; }
.meta-report-table .col-conversations { width: 8%; }
.meta-report-table .col-cost { width: 10%; }
.meta-report-table .col-investment { width: 10%; }
.meta-report-table .col-update { width: 21%; }
.meta-report-table th { position: sticky; z-index: 6; top: var(--topbar-height); padding: .72rem .5rem; background: var(--surface-muted); box-shadow: 0 1px 0 var(--line), 0 5px 12px rgb(23 32 43 / 5%); font-size: .66rem; white-space: normal; }
.meta-report-table td { padding: .75rem .5rem; white-space: normal; }
.meta-report-table .client-cell strong, .meta-report-table .client-cell small { display: block; overflow-wrap: anywhere; }
.meta-report-table .client-cell strong { color: var(--title); line-height: 1.3; }
.meta-report-table .number-cell { font-variant-numeric: tabular-nums; white-space: nowrap; }
.meta-report-table td:last-child .status { max-width: 100%; white-space: normal; }
@media (max-width: 64rem) { .meta-report-table-scroll { overflow-x: auto; } .meta-report-table { min-width: 58rem; } }


/* Padrão global para tabelas de dados */
.table-scroll, .table-wrap { overflow: visible; }
table.data-table { width: 100%; table-layout: fixed; }
table.data-table th {
    position: sticky;
    z-index: 5;
    top: var(--topbar-height);
    padding: .72rem .55rem;
    background: var(--surface-muted);
    box-shadow: 0 1px 0 var(--line), 0 5px 12px rgb(23 32 43 / 5%);
    font-size: .67rem;
    line-height: 1.25;
    white-space: normal;
}
table.data-table td {
    padding: .75rem .55rem;
    line-height: 1.4;
    white-space: normal;
    overflow-wrap: anywhere;
}
table.data-table td strong, table.data-table td small { max-width: 100%; overflow-wrap: anywhere; }
table.data-table .number-cell { font-variant-numeric: tabular-nums; white-space: nowrap; }
table.data-table .table-actions, table.data-table .row-actions { flex-wrap: wrap; }
table.data-table code, table.data-table pre { white-space: pre-wrap; overflow-wrap: anywhere; word-break: break-word; }
table.data-table.adjustment-table th:first-child { width: 24%; }
table.data-table.performance-table th:first-child { width: 22%; }
table.data-table.google-report-table th:nth-child(2) { width: 20%; }
.management-filters ~ .management-card table.data-table th { top: 12.25rem; }

@media (max-width: 75rem) {
    .table-scroll, .table-wrap { overflow-x: auto; }
    table.data-table:has(th:nth-child(7)) { min-width: 52rem; }
    .management-filters ~ .management-card table.data-table th { top: var(--topbar-height); }
}
@media (max-width: 48rem) {
    table.data-table:has(th:nth-child(5)) { min-width: 42rem; }
}


.adjustment-filters { grid-template-columns: minmax(16rem, 2fr) minmax(9rem, .8fr) minmax(15rem, 1.4fr); }
.budget-form-inline { flex-wrap: nowrap; }
.budget-form-inline .budget-input-compact { min-width: 0; width: min(6.5rem, calc(100% - 2.35rem)); }
.icon-apply-button {
    display: inline-grid;
    flex: 0 0 2rem;
    width: 2rem;
    height: 2rem;
    padding: 0;
    place-items: center;
    color: #fff;
    background: var(--brand);
    border: 0;
    border-radius: .45rem;
    cursor: pointer;
}
.icon-apply-button:hover { background: var(--brand-dark); }
.icon-apply-button:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.icon-apply-button svg { width: 1rem; height: 1rem; }
@media (max-width: 64rem) { .adjustment-filters { grid-template-columns: 1fr; } }
