/* ═══════════════════════════════════════════════════════════
   PORTAL DE INDICADORES PPA 2026 — UBATUBA
   Shared stylesheet
═══════════════════════════════════════════════════════════ */

/* ── TOKENS ─────────────────────────────────────────────── */
:root {
    /* Azul Ubatuba */
    --blue-900: #002654;
    --blue-800: #003878;
    --blue-700: #004b9c;
    --blue-600: #0060bf;
    --blue-500: #1a7fd4;
    --blue-400: #3d9fe8;
    --blue-100: #dbeeff;
    --blue-50:  #eef6ff;

    /* Ouro / verde / âmbar / vermelho */
    --gold:      #c9a22a;
    --gold-bg:   #fdf8ec;
    --green:     #0d9668;
    --green-bg:  #ecfdf5;
    --amber:     #b45309;
    --amber-bg:  #fffbeb;
    --red:       #dc2626;
    --red-bg:    #fef2f2;

    /* Superfícies — off-white confortável (sem branco puro) */
    --bg:        #edf1f7;
    --surface:   #f5f7fa;   /* cards / sidebar areas */
    --surface-2: #eceff5;   /* table headers / inputs */
    --border:    #dde4ee;
    --border-2:  #c6d0df;

    /* Texto */
    --txt-1: #0d1b2e;
    --txt-2: #2c3e52;
    --txt-3: #5a6e85;
    --txt-4: #8fa2b8;

    /* Sombras */
    --shadow-xs: 0 1px 2px rgba(0,50,120,.05);
    --shadow-sm: 0 1px 4px rgba(0,50,120,.08), 0 1px 2px rgba(0,50,120,.04);
    --shadow-md: 0 4px 16px rgba(0,50,120,.10), 0 1px 4px rgba(0,50,120,.06);

    /* Misc */
    --r-sm: 6px;
    --r-md: 10px;
    --r-lg: 16px;
    --sidebar-w: 265px;
    --font: 'Plus Jakarta Sans', system-ui, sans-serif;
    --mono: 'JetBrains Mono', monospace;
    --ease: 0.18s ease;
}

/* ── DARK MODE ───────────────────────────────────────────── */
[data-theme="dark"] {
    --bg:        #0b1120;
    --surface:   #111b2e;
    --surface-2: #172035;
    --border:    #1e2e46;
    --border-2:  #263a56;

    --txt-1: #e4eaf4;
    --txt-2: #adbdcf;
    --txt-3: #6a83a0;
    --txt-4: #3e566e;

    --blue-50:  #0d1e36;
    --blue-100: #122848;
    --blue-600: #2b8de0;

    --gold-bg:  #1a1508;
    --green-bg: #051a12;
    --amber-bg: #1a1005;
    --red-bg:   #1a0808;

    --shadow-xs: 0 1px 2px rgba(0,0,0,.3);
    --shadow-sm: 0 1px 4px rgba(0,0,0,.35);
    --shadow-md: 0 4px 16px rgba(0,0,0,.45);
}

/* ── RESET ───────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
    font-family: var(--font);
    background: var(--bg);
    color: var(--txt-1);
    min-height: 100vh;
    overflow-x: hidden;
    transition: background var(--ease), color var(--ease);
}
a { text-decoration: none; color: inherit; }

/* ── LAYOUT ──────────────────────────────────────────────── */
.shell { display: flex; min-height: 100vh; }

/* ── SIDEBAR ─────────────────────────────────────────────── */
.sidebar {
    width: var(--sidebar-w);
    background: var(--blue-800);
    display: flex;
    flex-direction: column;
    position: fixed;
    inset: 0 auto 0 0;
    overflow-y: auto;
    z-index: 100;
    border-right: 1px solid rgba(0,0,0,.25);
}

.sidebar-brand {
    padding: 1.5rem 1.25rem;
    border-bottom: 1px solid rgba(255,255,255,.1);
    display: flex;
    align-items: center;
    gap: .875rem;
}

.brasao {
    width: 46px;
    height: 46px;
    object-fit: contain;
    flex-shrink: 0;
    filter: drop-shadow(0 1px 3px rgba(0,0,0,.4));
}

.brand-name {
    font-size: .95rem;
    font-weight: 800;
    letter-spacing: .05em;
    text-transform: uppercase;
    color: #fff;
    line-height: 1.15;
}

.brand-dept {
    font-size: .6rem;
    letter-spacing: .07em;
    color: rgba(255,255,255,.42);
    text-transform: uppercase;
    margin-top: .2rem;
}

.brand-pill {
    display: inline-block;
    margin-top: .4rem;
    background: rgba(255,255,255,.1);
    border: 1px solid rgba(255,255,255,.18);
    color: var(--gold);
    font-size: .58rem;
    font-weight: 700;
    letter-spacing: .08em;
    padding: .14rem .48rem;
    border-radius: var(--r-sm);
}

.sidebar-nav { padding: 1.25rem .75rem; flex: 1; }

.nav-group-label {
    font-size: .58rem;
    font-weight: 700;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: rgba(255,255,255,.28);
    padding: 0 .5rem;
    margin-bottom: .35rem;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: .65rem;
    padding: .65rem .75rem;
    border-radius: var(--r-sm);
    color: rgba(255,255,255,.58);
    font-size: .83rem;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--ease);
    margin-bottom: .15rem;
    border: 1px solid transparent;
}

.nav-item:hover { background: rgba(255,255,255,.08); color: #fff; }
.nav-item.active {
    background: rgba(255,255,255,.14);
    color: #fff;
    border-color: rgba(255,255,255,.14);
    font-weight: 600;
}

.nav-icon { width: 15px; height: 15px; opacity: .72; flex-shrink: 0; }
.nav-item.active .nav-icon { opacity: 1; }

/* notification count badge inside nav item */
.nav-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 18px;
    height: 18px;
    padding: 0 .35rem;
    background: var(--red);
    color: #fff;
    font-size: .6rem;
    font-weight: 700;
    border-radius: 100px;
    margin-left: auto;
    line-height: 1;
    animation: blink 2s ease infinite;
}

.sidebar-user {
    display: flex;
    align-items: center;
    gap: .6rem;
    padding: .75rem 1rem;
    margin: 0 .5rem .5rem;
    border-radius: var(--r-sm);
    background: rgba(255,255,255,.06);
    border: 1px solid rgba(255,255,255,.1);
}

.user-avatar {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: var(--blue-600);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: .75rem;
    font-weight: 700;
    color: #fff;
    flex-shrink: 0;
    text-transform: uppercase;
}

.user-info { flex: 1; min-width: 0; }

.user-name {
    font-size: .75rem;
    font-weight: 600;
    color: rgba(255,255,255,.85);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.user-role {
    font-size: .6rem;
    color: rgba(255,255,255,.35);
    margin-top: .1rem;
}

.logout-btn {
    background: transparent;
    border: 1px solid rgba(255,255,255,.15);
    color: rgba(255,255,255,.45);
    border-radius: var(--r-sm);
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all var(--ease);
    flex-shrink: 0;
}

.logout-btn:hover {
    background: rgba(220,38,38,.2);
    border-color: rgba(220,38,38,.4);
    color: #fca5a5;
}

.sidebar-foot {
    padding: .875rem 1.25rem;
    border-top: 1px solid rgba(255,255,255,.08);
}

.sidebar-foot p {
    font-size: .6rem;
    color: rgba(255,255,255,.26);
    line-height: 1.6;
}

/* ── MAIN ────────────────────────────────────────────────── */
.main {
    margin-left: var(--sidebar-w);
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* ── TOPBAR ──────────────────────────────────────────────── */
.topbar {
    position: sticky;
    top: 0;
    z-index: 50;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    padding: .75rem 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    box-shadow: var(--shadow-xs);
    transition: background var(--ease), border-color var(--ease);
}

.breadcrumb { display: flex; align-items: center; gap: .4rem; font-size: .78rem; color: var(--txt-3); }
.breadcrumb-sep { opacity: .4; }
.breadcrumb b { color: var(--txt-2); font-weight: 600; }
.topbar-actions { display: flex; align-items: center; gap: .6rem; }

/* ── BUTTONS ─────────────────────────────────────────────── */
.btn {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    padding: .42rem .85rem;
    border-radius: var(--r-sm);
    font-family: var(--font);
    font-size: .78rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--ease);
    border: 1px solid;
}

.btn-ghost { background: transparent; color: var(--txt-2); border-color: var(--border); }
.btn-ghost:hover { background: var(--surface-2); border-color: var(--border-2); }

.btn-primary { background: var(--blue-600); color: #fff; border-color: var(--blue-600); }
.btn-primary:hover { background: var(--blue-700); border-color: var(--blue-700); }

.btn-icon {
    width: 32px; height: 32px; padding: 0;
    justify-content: center;
    background: transparent; color: var(--txt-3); border-color: var(--border);
}
.btn-icon:hover { background: var(--surface-2); color: var(--txt-1); border-color: var(--border-2); }

/* theme toggle */
.icon-sun  { display: none; }
.icon-moon { display: block; }
[data-theme="dark"] .icon-sun  { display: block; }
[data-theme="dark"] .icon-moon { display: none; }

/* ── CONTENT ─────────────────────────────────────────────── */
.content { padding: 2rem; flex: 1; }

/* ── PAGE HEADER ─────────────────────────────────────────── */
.page-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--border);
}

.page-title { font-size: 1.55rem; font-weight: 800; color: var(--blue-800); line-height: 1.2; }
[data-theme="dark"] .page-title { color: var(--txt-1); }
.page-sub { margin-top: .35rem; font-size: .84rem; color: var(--txt-3); line-height: 1.6; }

.live-badge {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    padding: .3rem .75rem;
    background: var(--green-bg);
    border: 1px solid rgba(13,150,104,.2);
    border-radius: 100px;
    font-size: .7rem;
    font-weight: 700;
    color: var(--green);
    white-space: nowrap;
}

.live-dot {
    width: 6px; height: 6px;
    background: var(--green);
    border-radius: 50%;
    animation: blink 2s ease infinite;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50%       { opacity: .35; }
}

/* ── STATS GRID ──────────────────────────────────────────── */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.15rem;
    margin-bottom: 1.75rem;
}

.stat-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--r-md);
    padding: 1.35rem 1.5rem 1.25rem;
    box-shadow: var(--shadow-sm);
    position: relative;
    overflow: hidden;
    transition: box-shadow var(--ease), border-color var(--ease);
}

.stat-card:hover { box-shadow: var(--shadow-md); border-color: var(--border-2); }

.stat-card::before {
    content: '';
    position: absolute;
    inset: 0 auto 0 0;
    width: 3px;
    border-radius: var(--r-md) 0 0 var(--r-md);
}

.stat-card.accent-blue::before  { background: var(--blue-600); }
.stat-card.accent-gold::before  { background: var(--gold); }
.stat-card.accent-green::before { background: var(--green); }
.stat-card.accent-red::before   { background: var(--red); }
.stat-card.accent-amber::before { background: var(--amber); }

.stat-label {
    font-size: .68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .1em;
    color: var(--txt-4);
    margin-bottom: .65rem;
}

.stat-value {
    font-size: 2.5rem;
    font-weight: 800;
    line-height: 1;
    margin-bottom: .9rem;
    font-variant-numeric: tabular-nums;
}

.stat-value.color-blue  { color: var(--blue-600); }
.stat-value.color-gold  { color: var(--gold); }
.stat-value.color-green { color: var(--green); }
.stat-value.color-red   { color: var(--red); }
.stat-value.color-amber { color: var(--amber); }

.stat-track { height: 4px; background: var(--border); border-radius: 2px; overflow: hidden; }
.stat-fill  { height: 100%; border-radius: 2px; width: 0; transition: width 1.2s cubic-bezier(.4,0,.2,1); }
.stat-fill.fill-blue  { background: var(--blue-600); }
.stat-fill.fill-gold  { background: var(--gold); }
.stat-fill.fill-green { background: var(--green); }

.stat-foot { margin-top: .55rem; font-size: .73rem; color: var(--txt-4); }

/* ── CONTROLS ────────────────────────────────────────────── */
.controls {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--r-md);
    padding: .9rem 1.15rem;
    display: flex;
    align-items: center;
    gap: .85rem;
    flex-wrap: wrap;
    margin-bottom: 1.15rem;
    box-shadow: var(--shadow-xs);
}

.search-wrap { position: relative; flex: 1; min-width: 180px; }

.search-icon {
    position: absolute;
    left: .7rem; top: 50%;
    transform: translateY(-50%);
    color: var(--txt-4);
    pointer-events: none;
}

.search-input {
    width: 100%;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--r-sm);
    color: var(--txt-1);
    font-family: var(--font);
    font-size: .84rem;
    padding: .5rem .75rem .5rem 2.1rem;
    outline: none;
    transition: all var(--ease);
}
.search-input::placeholder { color: var(--txt-4); }
.search-input:focus { border-color: var(--blue-500); box-shadow: 0 0 0 3px rgba(0,96,191,.1); }

.select-wrap { position: relative; }
.styled-select {
    appearance: none;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--r-sm);
    color: var(--txt-1);
    font-family: var(--font);
    font-size: .84rem;
    padding: .5rem 1.9rem .5rem .75rem;
    outline: none;
    cursor: pointer;
    transition: all var(--ease);
    min-width: 200px;
}
.styled-select:focus { border-color: var(--blue-500); box-shadow: 0 0 0 3px rgba(0,96,191,.1); }

.select-arrow {
    position: absolute;
    right: .65rem; top: 50%;
    transform: translateY(-50%);
    color: var(--txt-4);
    pointer-events: none;
}

.ctrl-divider { width: 1px; height: 22px; background: var(--border); flex-shrink: 0; }

.pills { display: flex; gap: .35rem; flex-wrap: wrap; }

.pill {
    padding: .28rem .75rem;
    border-radius: 100px;
    font-size: .7rem;
    font-weight: 700;
    letter-spacing: .03em;
    cursor: pointer;
    border: 1px solid;
    background: transparent;
    font-family: var(--font);
    transition: all var(--ease);
}

.pill-all   { color: var(--txt-3); border-color: var(--border); }
.pill-all.on, .pill-all:hover { background: var(--blue-600); color: #fff; border-color: var(--blue-600); }

.pill-done  { color: var(--green); border-color: rgba(13,150,104,.3); }
.pill-done.on, .pill-done:hover { background: var(--green); color: #fff; border-color: var(--green); }

.pill-prog  { color: var(--amber); border-color: rgba(180,83,9,.25); }
[data-theme="dark"] .pill-prog { color: #fbbf24; border-color: rgba(251,191,36,.25); }
.pill-prog.on, .pill-prog:hover { background: var(--gold); color: #fff; border-color: var(--gold); }

.pill-start { color: var(--red); border-color: rgba(220,38,38,.25); }
.pill-start.on, .pill-start:hover { background: var(--red); color: #fff; border-color: var(--red); }

/* ── TABLE ───────────────────────────────────────────────── */
.table-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--r-md);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.table-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: .9rem 1.35rem;
    border-bottom: 1px solid var(--border);
    background: var(--surface-2);
}

.table-bar-title {
    font-size: .75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: var(--txt-3);
}

.rec-count { font-family: var(--mono); font-size: .7rem; color: var(--txt-4); }
.rec-count b { color: var(--blue-600); font-weight: 500; }

table { width: 100%; border-collapse: collapse; }

thead th {
    padding: .8rem 1.15rem;
    text-align: left;
    font-size: .67rem;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--txt-3);
    background: var(--surface-2);
    border-bottom: 1px solid var(--border);
    cursor: pointer;
    user-select: none;
    white-space: nowrap;
    transition: color var(--ease), background var(--ease);
}
thead th:hover { color: var(--txt-1); background: var(--bg); }
thead th.col-active { color: var(--blue-600); }
.sort-ind { margin-left: .2rem; font-size: .58rem; opacity: .6; }

tbody tr {
    border-bottom: 1px solid var(--border);
    transition: background var(--ease);
    animation: rowIn .3s ease both;
}
tbody tr:last-child { border-bottom: none; }
tbody tr:hover { background: var(--blue-50); }

td { padding: .85rem 1.15rem; vertical-align: middle; }

.td-id { font-family: var(--mono); font-size: .7rem; color: var(--txt-4); width: 52px; }

.td-name { font-weight: 600; font-size: .875rem; color: var(--txt-1); line-height: 1.35; margin-bottom: .3rem; }

.td-code {
    display: inline-flex;
    align-items: center;
    gap: .3rem;
    font-family: var(--mono);
    font-size: .63rem;
    color: var(--txt-4);
    background: var(--surface-2);
    border: 1px solid var(--border);
    padding: .12rem .45rem;
    border-radius: 4px;
}

.code-dot { width: 4px; height: 4px; background: var(--blue-500); border-radius: 50%; flex-shrink: 0; }

.sec-badge {
    display: inline-block;
    font-family: var(--mono);
    font-size: .66rem;
    font-weight: 500;
    letter-spacing: .04em;
    color: var(--txt-3);
    background: var(--surface-2);
    border: 1px solid var(--border);
    padding: .22rem .55rem;
    border-radius: var(--r-sm);
}

.prog-col { min-width: 155px; }
.prog-row { display: flex; justify-content: space-between; margin-bottom: .3rem; }
.prog-pct { font-family: var(--mono); font-size: .74rem; font-weight: 500; color: var(--txt-2); }

.prog-track { height: 5px; background: var(--border); border-radius: 3px; overflow: hidden; }
.prog-fill  { height: 100%; border-radius: 3px; width: 0; transition: width 1.3s cubic-bezier(.4,0,.2,1); }

/* chips de status */
.chip {
    display: inline-flex;
    align-items: center;
    gap: .3rem;
    padding: .26rem .65rem;
    border-radius: 100px;
    font-size: .67rem;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
    border: 1px solid;
    white-space: nowrap;
}

.chip-dot { width: 5px; height: 5px; border-radius: 50%; flex-shrink: 0; }

.chip-done  { color: var(--green); border-color: rgba(13,150,104,.3); background: var(--green-bg); }
.chip-done  .chip-dot { background: var(--green); }

.chip-prog  { color: var(--amber); border-color: rgba(180,83,9,.25); background: var(--amber-bg); }
[data-theme="dark"] .chip-prog { color: #fbbf24; }
.chip-prog  .chip-dot { background: var(--gold); }

.chip-start { color: var(--red); border-color: rgba(220,38,38,.25); background: var(--red-bg); }
.chip-start .chip-dot { background: var(--red); }

/* ── EMPTY STATE ─────────────────────────────────────────── */
.empty { padding: 4rem 2rem; text-align: center; }
.empty-icon  { font-size: 2.5rem; opacity: .25; margin-bottom: .9rem; }
.empty-title { font-size: .9rem; font-weight: 700; color: var(--txt-2); margin-bottom: .35rem; }
.empty-sub   { font-size: .8rem; color: var(--txt-4); }

.no-results      { display: none; }
.no-results.show { display: table-row; }

/* ── CARDS GRID (secretarias) ────────────────────────────── */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.15rem;
}

.sec-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--r-md);
    padding: 1.35rem 1.5rem;
    box-shadow: var(--shadow-sm);
    transition: box-shadow var(--ease), border-color var(--ease), transform var(--ease);
    display: flex;
    flex-direction: column;
    gap: .85rem;
    text-decoration: none;
    color: inherit;
    position: relative;
    overflow: hidden;
}

.sec-card::before {
    content: '';
    position: absolute;
    inset: 0 auto 0 0;
    width: 3px;
    background: var(--blue-600);
    border-radius: var(--r-md) 0 0 var(--r-md);
}

.sec-card:hover {
    box-shadow: var(--shadow-md);
    border-color: var(--border-2);
    transform: translateY(-1px);
}

.sec-card-header { display: flex; align-items: flex-start; justify-content: space-between; gap: .75rem; }

.sec-sigla {
    font-family: var(--mono);
    font-size: .72rem;
    font-weight: 500;
    color: var(--blue-600);
    background: var(--blue-50);
    border: 1px solid var(--blue-100);
    padding: .25rem .6rem;
    border-radius: var(--r-sm);
    letter-spacing: .04em;
}

.sec-name { font-size: .9rem; font-weight: 700; color: var(--txt-1); line-height: 1.3; }
.sec-dept { font-size: .72rem; color: var(--txt-3); margin-top: .15rem; }

.sec-prog-label { display: flex; justify-content: space-between; font-size: .7rem; color: var(--txt-3); margin-bottom: .3rem; }
.sec-prog-pct   { font-weight: 700; color: var(--txt-2); font-family: var(--mono); }

.sec-counters { display: flex; gap: .5rem; flex-wrap: wrap; }

.counter-badge {
    display: inline-flex;
    align-items: center;
    gap: .3rem;
    padding: .2rem .55rem;
    border-radius: 100px;
    font-size: .67rem;
    font-weight: 700;
    border: 1px solid;
}

.cb-done  { color: var(--green); border-color: rgba(13,150,104,.25); background: var(--green-bg); }
.cb-prog  { color: var(--amber); border-color: rgba(180,83,9,.2);    background: var(--amber-bg); }
[data-theme="dark"] .cb-prog { color: #fbbf24; }
.cb-start { color: var(--red);   border-color: rgba(220,38,38,.2);   background: var(--red-bg); }
.cb-total { color: var(--txt-3); border-color: var(--border);        background: var(--surface-2); }

/* ── FOOTER ──────────────────────────────────────────────── */
.page-foot {
    padding: 1.1rem 2rem;
    border-top: 1px solid var(--border);
    background: var(--surface);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.foot-text { font-size: .68rem; color: var(--txt-4); }

.foot-badge {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    font-family: var(--mono);
    font-size: .62rem;
    color: var(--txt-4);
    background: var(--surface-2);
    border: 1px solid var(--border);
    padding: .18rem .55rem;
    border-radius: var(--r-sm);
}

/* ── CONFIGURAÇÕES ───────────────────────────────────────── */
.config-section {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--r-md);
    padding: 1.5rem;
    box-shadow: var(--shadow-sm);
    margin-bottom: 1.25rem;
}

.config-section-title {
    font-size: .78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: var(--txt-3);
    margin-bottom: 1.15rem;
    padding-bottom: .75rem;
    border-bottom: 1px solid var(--border);
}

.config-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: .75rem 0;
    border-bottom: 1px solid var(--border);
    gap: 1rem;
}

.config-row:last-child { border-bottom: none; }

.config-label { font-size: .875rem; font-weight: 600; color: var(--txt-1); }
.config-desc  { font-size: .78rem; color: var(--txt-3); margin-top: .15rem; }

.config-value {
    font-family: var(--mono);
    font-size: .78rem;
    color: var(--txt-2);
    background: var(--surface-2);
    border: 1px solid var(--border);
    padding: .25rem .6rem;
    border-radius: var(--r-sm);
    white-space: nowrap;
}

/* ── ANIMATIONS ──────────────────────────────────────────── */
@keyframes rowIn {
    from { opacity: 0; transform: translateY(5px); }
    to   { opacity: 1; transform: translateY(0); }
}

@keyframes fadeUp {
    from { opacity: 0; transform: translateY(10px); }
    to   { opacity: 1; transform: translateY(0); }
}

tbody tr:nth-child(1)  { animation-delay: .04s; }
tbody tr:nth-child(2)  { animation-delay: .08s; }
tbody tr:nth-child(3)  { animation-delay: .12s; }
tbody tr:nth-child(4)  { animation-delay: .16s; }
tbody tr:nth-child(5)  { animation-delay: .20s; }
tbody tr:nth-child(6)  { animation-delay: .24s; }
tbody tr:nth-child(7)  { animation-delay: .28s; }
tbody tr:nth-child(8)  { animation-delay: .32s; }
tbody tr:nth-child(9)  { animation-delay: .36s; }
tbody tr:nth-child(10) { animation-delay: .40s; }

.cards-grid .sec-card:nth-child(1)  { animation: fadeUp .3s ease .04s both; }
.cards-grid .sec-card:nth-child(2)  { animation: fadeUp .3s ease .08s both; }
.cards-grid .sec-card:nth-child(3)  { animation: fadeUp .3s ease .12s both; }
.cards-grid .sec-card:nth-child(4)  { animation: fadeUp .3s ease .16s both; }
.cards-grid .sec-card:nth-child(5)  { animation: fadeUp .3s ease .20s both; }
.cards-grid .sec-card:nth-child(6)  { animation: fadeUp .3s ease .24s both; }
.cards-grid .sec-card:nth-child(7)  { animation: fadeUp .3s ease .28s both; }
.cards-grid .sec-card:nth-child(8)  { animation: fadeUp .3s ease .32s both; }
.cards-grid .sec-card:nth-child(9)  { animation: fadeUp .3s ease .36s both; }
.cards-grid .sec-card:nth-child(10) { animation: fadeUp .3s ease .40s both; }

/* ── SCROLLBAR ───────────────────────────────────────────── */
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border-2); border-radius: 3px; }

/* ── RESPONSIVE ──────────────────────────────────────────── */
@media (max-width: 1024px) {
    .stats-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
    :root { --sidebar-w: 0px; }
    .sidebar { width: 265px; transform: translateX(-100%); transition: transform .3s ease; }
    .sidebar.open { transform: translateX(0); }
    .main { margin-left: 0; }
    .stats-grid { grid-template-columns: 1fr; }
    .controls { flex-direction: column; align-items: stretch; }
    .ctrl-divider { display: none; }
}

/* ── PAGINATION ──────────────────────────────────────────── */
.pagination {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.25rem;
    border-top: 1px solid var(--border);
    gap: 1rem;
    flex-wrap: wrap;
}

.pagination-info {
    font-size: .75rem;
    color: var(--txt-3);
    font-weight: 500;
    white-space: nowrap;
}

.pagination-btns {
    display: flex;
    align-items: center;
    gap: .25rem;
}

.pagination-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 32px;
    height: 32px;
    padding: 0 .6rem;
    border: 1px solid var(--border);
    border-radius: var(--r-sm);
    background: var(--surface);
    color: var(--txt-2);
    font-size: .75rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: all .15s ease;
    user-select: none;
}

.pagination-btn:hover:not(.disabled):not(.active) {
    background: var(--blue-50);
    border-color: var(--blue-400);
    color: var(--blue-600);
}

.pagination-btn.active {
    background: var(--blue-600);
    border-color: var(--blue-600);
    color: #fff;
}

.pagination-btn.disabled {
    opacity: .4;
    cursor: not-allowed;
}

.pagination-ellipsis {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 28px;
    height: 32px;
    color: var(--txt-4);
    font-size: .75rem;
    font-weight: 600;
    user-select: none;
}

@media (max-width: 768px) {
    .pagination { flex-direction: column; align-items: center; }
    .pagination-btns { flex-wrap: wrap; justify-content: center; }
}
