:root{
  --bg:#F2F4F9; --surface:#FFFFFF; --surface-2:#E9EDF5; --ink:#1B2130; --ink-muted:#5C6578;
  --border:#DAE1EC; --accent:#2E5AA8; --accent-ink:#163463; --accent-soft:#E4EAF6;
  --good:#1B8172; --good-soft:#E2F2EE; --warn:#9C6516; --warn-soft:#F7ECD9;
  --critical:#B23A3A; --critical-soft:#F6E3E1; --grid:#E3E8F1;
  --mock:#767B84; --mock-soft:#EEF0F2; --mock-ink:#4B4F57;
  --shadow: 0 1px 2px rgba(20,22,28,.05), 0 8px 24px -12px rgba(20,22,28,.14);
  /* Chrome da barra superior — cor fixa (não muda com o tema claro/escuro), a identidade visual do produto */
  --topbar-bg:#153260; --topbar-ink:#FFFFFF; --topbar-ink-muted:rgba(255,255,255,.64);
  --topbar-pill-bg:rgba(255,255,255,.08); --topbar-pill-border:rgba(255,255,255,.16);
  --topbar-pill-hover-bg:rgba(255,255,255,.16); --topbar-active-bg:#FFFFFF; --topbar-active-ink:#153260;
  --sidebar-bg:#12172B; --sidebar-ink:#EAEBF5; --sidebar-ink-muted:#8C90AC;
  --sidebar-active:#26305C; --sidebar-border: rgba(255,255,255,.09);
  --tooltip-bg:#1B2130; --tooltip-ink:#F2F4F9;
}
@media (prefers-color-scheme: dark){
  :root:not([data-theme="light"]){
    --bg:#12151E; --surface:#1A1F2B; --surface-2:#222838; --ink:#E4E8F0; --ink-muted:#98A0B2;
    --border:#2E3547; --accent:#7C97D9; --accent-ink:#D2DCF3; --accent-soft:#25304A;
    --good:#3FB39C; --good-soft:#1B3330; --warn:#D6A144; --warn-soft:#3A2E18;
    --critical:#D97C70; --critical-soft:#3A2422; --grid:#293042;
    --mock:#9BA0AA; --mock-soft:#262B33; --mock-ink:#C7CBD2;
    --shadow: 0 1px 2px rgba(0,0,0,.35), 0 8px 24px -12px rgba(0,0,0,.5);
    --sidebar-bg:#0A0D12; --sidebar-ink:#E6E8EC; --sidebar-ink-muted:#7C8189;
    --sidebar-active:#232A3A; --sidebar-border: rgba(255,255,255,.08);
    --tooltip-bg:#E4E8F0; --tooltip-ink:#12151E;
  }
}
:root[data-theme="dark"]{
  --bg:#12151E; --surface:#1A1F2B; --surface-2:#222838; --ink:#E4E8F0; --ink-muted:#98A0B2;
  --border:#2E3547; --accent:#7C97D9; --accent-ink:#D2DCF3; --accent-soft:#25304A;
  --good:#3FB39C; --good-soft:#1B3330; --warn:#D6A144; --warn-soft:#3A2E18;
  --critical:#D97C70; --critical-soft:#3A2422; --grid:#293042;
  --mock:#9BA0AA; --mock-soft:#262B33; --mock-ink:#C7CBD2;
  --shadow: 0 1px 2px rgba(0,0,0,.35), 0 8px 24px -12px rgba(0,0,0,.5);
  --sidebar-bg:#0A0D12; --sidebar-ink:#E6E8EC; --sidebar-ink-muted:#7C8189;
  --sidebar-active:#232A3A; --sidebar-border: rgba(255,255,255,.08);
  --tooltip-bg:#E4E8F0; --tooltip-ink:#12151E;
}
*{box-sizing:border-box;}
[hidden]{ display:none !important; }
body{ background:var(--bg); color:var(--ink); font-family:'Source Sans 3',sans-serif; margin:0; }
h1,h2,h3{ font-family:'Manrope',sans-serif; margin:0; text-wrap:balance; }
.mono{ font-family:'IBM Plex Mono',monospace; font-variant-numeric:tabular-nums; }
button,select,input{font-family:inherit;}
svg{ display:block; }

.shell{ display:flex; flex-direction:column; min-height:100vh; }
.topbar{ background:var(--topbar-bg); border-bottom:1px solid rgba(255,255,255,.07); padding:14px 26px; padding-top:calc(14px + env(safe-area-inset-top,0px)); display:flex; align-items:center; gap:22px; flex-wrap:wrap; position:sticky; top:0; z-index:5; box-shadow:0 2px 14px -4px rgba(8,16,32,.35); }
.topbar-brand{ display:flex; flex-direction:row; align-items:center; gap:11px; flex:none; }
.topbar-brand .brand-logo{ height:32px; width:auto; flex:none; display:block; }
.topbar-brand .brand-text{ display:flex; flex-direction:column; }
.topbar-brand .org{ font-size:10.5px; font-weight:700; letter-spacing:.08em; text-transform:uppercase; color:var(--topbar-ink-muted); }
.topbar-brand .name{ font-family:'Manrope',sans-serif; font-weight:800; font-size:15px; color:var(--topbar-ink); margin-top:1px; white-space:nowrap; }
.side-nav{ display:flex; flex-direction:row; flex-wrap:wrap; gap:7px; flex:1; }
.side-link{ display:inline-flex; align-items:center; gap:7px; padding:7px 13px; border-radius:999px; border:1px solid var(--topbar-pill-border); color:var(--topbar-ink-muted); font-weight:700; font-size:12.5px; cursor:pointer; background:var(--topbar-pill-bg); text-align:left; font-family:'Manrope',sans-serif; white-space:nowrap; transition:background .12s, color .12s, border-color .12s; }
.side-link svg{ width:15px; height:15px; flex:none; stroke:currentColor; fill:none; stroke-width:1.8; stroke-linecap:round; stroke-linejoin:round; }
.side-link:hover{ background:var(--topbar-pill-hover-bg); color:var(--topbar-ink); border-color:rgba(255,255,255,.32); }
.side-link[data-active="true"]{ background:var(--topbar-active-bg); border-color:var(--topbar-active-bg); color:var(--topbar-active-ink); }
.side-sep{ display:none; }

.main{ flex:1; min-width:0; display:flex; flex-direction:column; }
.main-inner{ max-width:1220px; width:100%; margin:0 auto; padding:28px 30px 70px; display:flex; flex-direction:column; gap:26px; }
.main-header{ display:flex; justify-content:space-between; align-items:flex-end; gap:16px; flex-wrap:wrap; }
.eyebrow{ font-size:11px; font-weight:700; letter-spacing:.08em; text-transform:uppercase; color:var(--accent); }
.main-header h1{ font-size:24px; font-weight:800; margin-top:6px; color:var(--ink); }
.main-header .subtitle{ color:var(--ink-muted); font-size:13px; margin-top:6px; max-width:60ch; }

.mock-banner{ display:flex; align-items:center; gap:10px; background:var(--mock-soft); border:1px solid var(--mock); border-radius:10px; padding:10px 15px; font-size:12.5px; color:var(--mock-ink); flex-wrap:wrap; }
.mock-banner b{font-weight:800;}
.mock-tag{ display:inline-flex; align-items:center; gap:4px; padding:1px 7px; border-radius:999px; font-size:9.5px; font-weight:800; letter-spacing:.04em; background:var(--mock); color:#fff; text-transform:uppercase; white-space:nowrap; }
.real-tag{ display:inline-flex; align-items:center; gap:4px; padding:1px 7px; border-radius:999px; font-size:9.5px; font-weight:800; letter-spacing:.04em; background:var(--good); color:#fff; text-transform:uppercase; white-space:nowrap; }

.banner{ display:flex; align-items:center; gap:12px; background:var(--surface-2); border:1px solid var(--border); border-radius:10px; padding:14px 18px; font-size:13px; color:var(--ink-muted); flex-wrap:wrap; }
.tab-panel{ display:flex; flex-direction:column; gap:16px; }
#app-content{ display:flex; flex-direction:column; gap:28px; }

.filters-row{ display:flex; align-items:center; gap:12px; flex-wrap:wrap; background:var(--surface); border:1px solid var(--border); border-radius:12px; padding:13px 16px; box-shadow:var(--shadow); }
.filters-row label{ font-size:11.5px; font-weight:700; color:var(--ink-muted); }
.filters-row select, .filters-row input[type="date"], .filters-row input[type="search"]{ font-family:'IBM Plex Mono',monospace; font-size:13px; padding:7px 10px; border-radius:8px; border:1px solid var(--border); background:var(--surface); color:var(--ink); cursor:pointer; }
.filters-row input[type="date"]{ min-width:142px; }
.filters-row input[type="search"]{ font-family:'Source Sans 3',sans-serif; cursor:text; min-width:170px; }
.filters-row select:hover, .filters-row input:hover{ background:var(--surface-2); }
.filters-clear{ margin-left:auto; font-size:12px; font-weight:700; color:var(--accent); background:none; border:none; cursor:pointer; padding:4px 6px; }
.filters-clear:hover{ text-decoration:underline; }

.section-label{ font-size:11px; font-weight:700; text-transform:uppercase; letter-spacing:.04em; color:var(--ink-muted); }

.stats{ display:grid; grid-template-columns:repeat(4,1fr); gap:16px; }
.stat-card{ background:var(--surface); border:1px solid var(--border); border-radius:14px; padding:19px 20px; box-shadow:var(--shadow); display:flex; flex-direction:column; gap:3px; }
.stat-label{ font-size:11px; font-weight:700; text-transform:uppercase; letter-spacing:.04em; color:var(--ink-muted); display:flex; align-items:center; gap:6px; }
.dot{ width:8px; height:8px; border-radius:50%; flex:none; }
.stat-value{ font-size:22px; font-weight:700; margin-top:8px; white-space:nowrap; }
.stat-sub{ font-size:11.5px; color:var(--ink-muted); margin-top:3px; }
.c360-sec .stats > *{ min-width:0; }
.c360-sec .stat-value{ overflow-wrap:anywhere; }
.stat-obs{ display:flex; flex-wrap:wrap; gap:2px 10px; margin-top:8px; padding-top:7px; border-top:1px dashed var(--border); font-size:11px; color:var(--ink-muted); line-height:1.35; }
.stat-obs b{ color:var(--ink); font-weight:700; font-variant-numeric:tabular-nums; }
.d1-fonte{ padding:0 17px 16px; font-size:11.5px; line-height:1.45; color:var(--ink-muted); }

.card{ background:var(--surface); border:1px solid var(--border); border-radius:14px; box-shadow:var(--shadow); overflow:hidden; }
.card-head{ padding:19px 21px 12px; display:flex; align-items:flex-start; justify-content:space-between; gap:10px; flex-wrap:wrap; }
details.card{ padding:0; }
details.card > summary{ cursor:pointer; list-style:none; }
details.card > summary::-webkit-details-marker{ display:none; }
details.card > summary::marker{ content:''; }
details.card > summary .chevron{ width:17px; height:17px; stroke:var(--ink-muted); fill:none; stroke-width:2; stroke-linecap:round; stroke-linejoin:round; transition:transform .15s ease; flex:none; margin-top:2px; }
details.card[open] > summary .chevron{ transform:rotate(90deg); }
details.card > summary:hover .chevron{ stroke:var(--ink); }
.mini-toggle{ margin:4px 21px 20px; }
.mini-toggle > summary{ cursor:pointer; list-style:none; display:inline-flex; align-items:center; gap:6px; font-size:12px; font-weight:700; color:var(--accent); }
.mini-toggle > summary::-webkit-details-marker{ display:none; }
.mini-toggle > summary::marker{ content:''; }
.mini-toggle > summary .chevron{ width:14px; height:14px; stroke:currentColor; fill:none; stroke-width:2; stroke-linecap:round; stroke-linejoin:round; transition:transform .15s ease; flex:none; }
.mini-toggle[open] > summary .chevron{ transform:rotate(90deg); }
.mini-toggle .mini-toggle-body{ padding-top:10px; }
.card-head h3{ font-size:14.5px; font-weight:700; }
.card-head .sub{ font-size:12px; color:var(--ink-muted); margin-top:3px; }
.rank-leader-chip{ display:flex; flex-direction:column; align-items:flex-end; text-align:right; flex:none; }
.rank-leader-chip-label{ font-size:9.5px; font-weight:800; text-transform:uppercase; letter-spacing:.06em; color:var(--accent); }
.rank-leader-chip-name{ font-size:13px; font-weight:800; color:var(--ink); margin-top:2px; white-space:nowrap; max-width:160px; overflow:hidden; text-overflow:ellipsis; }
.card-body{ padding:10px 21px 22px; }
.table-scroll{ overflow-x:auto; }
table{ width:100%; border-collapse:collapse; font-size:13px; }
.wide-table{ min-width:600px; }
.just-btn{ font:inherit; font-size:12px; font-weight:600; color:var(--accent-ink); background:var(--accent-soft); border:1px solid var(--border); border-radius:8px; padding:3px 10px; cursor:pointer; }
.just-btn:hover{ border-color:var(--accent); }
.just-overlay{ position:fixed; inset:0; z-index:1000; background:rgba(15,20,32,.45); display:flex; align-items:center; justify-content:center; padding:16px; }
.just-box{ background:var(--surface); color:var(--ink); border:1px solid var(--border); border-radius:14px; width:min(420px,100%); max-height:80vh; overflow:auto; padding:16px 18px 18px; box-shadow:0 12px 40px rgba(0,0,0,.28); }
.just-head{ display:flex; align-items:center; justify-content:space-between; gap:12px; margin-bottom:10px; }
.just-head h4{ margin:0; font-size:15px; }
.just-close{ font:inherit; font-size:20px; line-height:1; width:30px; height:30px; border-radius:8px; border:1px solid var(--border); background:var(--surface-2); color:var(--ink); cursor:pointer; }
.just-meta{ display:grid; grid-template-columns:1fr 1fr; gap:8px 14px; font-size:12.5px; margin-bottom:12px; }
.just-meta span{ display:block; font-size:10.5px; font-weight:700; text-transform:uppercase; letter-spacing:.05em; color:var(--ink-muted); }
.just-label{ font-size:10.5px; font-weight:700; text-transform:uppercase; letter-spacing:.05em; color:var(--ink-muted); margin:10px 0 3px; }
.just-motivo{ font-size:13.5px; font-weight:600; }
.just-texto{ font-size:13.5px; line-height:1.5; white-space:pre-wrap; overflow-wrap:anywhere; background:var(--surface-2); border-radius:10px; padding:10px 12px; }
.just-origem{ margin-top:10px; font-size:12px; color:var(--ink-muted); }
.compact-table{ min-width:0; }
.compact-table thead th{ white-space:normal; padding:10px 8px; line-height:1.25; vertical-align:bottom; }
.compact-table tbody td{ white-space:normal; padding:10px 8px; }
.compact-table thead th:first-child, .compact-table tbody td:first-child{ padding-left:14px; }
@media (max-width:560px){ .compact-table thead th{ padding:8px 3px; font-size:9.5px; } .compact-table tbody td{ padding:9px 3px; font-size:12px; } .compact-table thead th:first-child, .compact-table tbody td:first-child{ padding-left:10px; } .compact-table thead th:last-child, .compact-table tbody td:last-child{ padding-right:10px; } }
.compact-table thead th:last-child, .compact-table tbody td:last-child{ padding-right:14px; }
.baixas-tbl .mapa-sub{ display:none; }
.c360h-tbl .mapa-sub{ display:none; }
@media (max-width:560px){ .c360h-tbl th:nth-child(3), .c360h-tbl td:nth-child(3), .c360h-tbl th:nth-child(4), .c360h-tbl td:nth-child(4){ display:none; } .c360h-tbl .mapa-sub{ display:block; font-size:10.5px; color:var(--ink-muted); font-weight:400; } }
.d1-status{ margin:10px 2px 14px; font-size:12.5px; color:var(--ink-muted); }
.d1-status b{ color:var(--ink); }
.d1-flash{ animation:d1flash 1.1s ease-out; }
@keyframes d1flash{ 0%{ background:var(--accent-soft); box-shadow:0 0 0 6px var(--accent-soft); border-radius:8px; } 100%{ background:transparent; box-shadow:0 0 0 6px transparent; } }
@media (prefers-reduced-motion:reduce){ .d1-flash{ animation:none; } }
.pend-scroll{ max-height:560px; overflow-y:auto; }
.pend-scroll thead th{ position:sticky; top:0; z-index:1; background:var(--surface); }
@media (max-width:560px){ .d1nc-tbl th:nth-child(5), .d1nc-tbl td:nth-child(5){ display:none; } }
@media (max-width:560px){ .pend-tbl th:nth-child(6), .pend-tbl td:nth-child(6){ display:none; } }
@media (max-width:560px){ .baixas-tbl th:nth-child(2), .baixas-tbl td:nth-child(2){ display:none; } .baixas-tbl .mapa-sub{ display:block; font-size:10.5px; color:var(--ink-muted); font-weight:400; } .baixas-tbl thead th{ font-size:9px; } }

@media (max-width:560px){ .compact-table .rank-badge{ display:none; } .compact-table td .just-btn{ padding:2px 6px; font-size:11px; } .compact-table thead th{ font-size:9px; } .compact-table tbody td{ font-size:11px; } }

thead th{ text-align:right; padding:10px 14px; font-size:10.5px; text-transform:uppercase; letter-spacing:.03em; color:var(--ink-muted); border-bottom:1px solid var(--border); white-space:nowrap; }
thead th:first-child, tbody td:first-child{ text-align:left; }
tbody td{ padding:10px 14px; border-bottom:1px solid var(--border); text-align:right; white-space:nowrap; }
tbody tr:last-child td{ border-bottom:none; }
tbody tr.total-row td{ font-weight:700; background:var(--surface-2); border-top:2px solid var(--border); }
tbody tr:hover td{ background:var(--surface-2); }
.rank-badge{ display:inline-flex; align-items:center; justify-content:center; width:19px; height:19px; border-radius:50%; background:var(--accent-soft); color:var(--accent-ink); font-size:11px; font-weight:700; margin-right:8px; flex:none; }

.bar-list{ display:flex; flex-direction:column; padding:6px 21px 18px; }
.bar-row{ display:flex; flex-direction:column; gap:6px; padding:11px 10px; border-bottom:1px solid var(--border); border-radius:10px; margin:0 -10px; }
.bar-row:last-child{ border-bottom:none; }
.bar-row-lead{ background:var(--accent-soft); border-bottom-color:transparent; }
.bar-row-lead .bar-name{ font-weight:800; color:var(--accent-ink); }
.bar-row-lead .bar-value{ color:var(--accent-ink); }
.bar-row-top{ display:flex; align-items:baseline; justify-content:space-between; gap:8px; }
.bar-name{ display:flex; align-items:center; min-width:0; font-size:12px; font-weight:600; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.bar-value{ font-size:12px; font-weight:700; flex:none; }
.bar-track{ height:6px; border-radius:3px; background:var(--surface-2); overflow:hidden; }
.bar-fill{ height:100%; border-radius:3px; }
.bar-sub{ font-size:10.5px; color:var(--ink-muted); text-align:right; }
.rules-note{ display:grid; grid-template-columns:repeat(3, minmax(0,1fr)); gap:1px; background:var(--border); border:1px solid var(--border); border-radius:12px; overflow:hidden; margin-top:12px; }
.rules-note-item{ background:var(--surface-2); padding:12px 16px; font-size:12.5px; line-height:1.45; color:var(--ink); }
.rules-note-label{ display:block; font-size:10.5px; font-weight:700; text-transform:uppercase; letter-spacing:.05em; color:var(--ink-muted); margin-bottom:3px; }
.fix-note{ display:flex; align-items:center; justify-content:space-between; gap:12px 24px; flex-wrap:wrap; margin-top:10px; padding:12px 16px; background:var(--surface); border:1px dashed var(--border); border-radius:12px; font-size:12.5px; line-height:1.45; color:var(--ink); }
.fix-note-text{ flex:1 1 280px; min-width:0; }
.fix-chips{ display:flex; flex-wrap:wrap; gap:6px; flex:0 1 auto; }
.fix-chip{ display:inline-flex; align-items:baseline; gap:6px; padding:4px 10px; background:var(--surface-2); border-radius:999px; font-size:12px; font-variant-numeric:tabular-nums; white-space:nowrap; }
.fix-chip s{ color:var(--ink-muted); }
.fix-chip i{ font-style:normal; color:var(--ink-muted); }
@media (max-width:760px){ .rules-note{ grid-template-columns:1fr; } }
.tmc{ --c1:150px; --c3:56px; --gp:14px; padding:8px 21px 18px; }
.tmc-body{ position:relative; }
.tmc-row{ display:grid; grid-template-columns:var(--c1) 1fr var(--c3); align-items:center; gap:var(--gp); padding:9px 0; }
.tmc-name{ font-size:13px; font-weight:700; min-width:0; }
.tmc-name small{ display:block; font-size:11px; font-weight:400; color:var(--ink-muted); margin-top:1px; }
.tmc-plot{ position:relative; height:100%; min-height:22px; display:flex; align-items:center; }
.tmc-track{ position:relative; width:100%; height:22px; background:var(--surface-2); border-radius:0 6px 6px 0; }
.tmc-bar{ height:100%; border-radius:0 6px 6px 0; background:var(--accent); min-width:3px; }
.tmc-bar.below{ background:var(--accent-soft); box-shadow:inset 0 0 0 1px var(--accent); }
.tmc-val{ font-family:'IBM Plex Mono',monospace; font-size:13px; font-weight:700; text-align:right; }
.tmc-ref{ position:absolute; top:0; bottom:0; width:0; border-left:2px dashed var(--ink-muted); pointer-events:none; }
.tmc-ref span{ position:absolute; top:-20px; left:50%; transform:translateX(-50%); font-size:10.5px; font-weight:700; color:var(--ink-muted); white-space:nowrap; background:var(--surface); padding:0 4px; }
.tmc-axis{ display:grid; grid-template-columns:var(--c1) 1fr var(--c3); gap:var(--gp); margin-top:4px; }
.tmc-axis-line{ position:relative; height:16px; border-top:1px solid var(--border); }
.tmc-axis-line span{ position:absolute; top:3px; transform:translateX(-50%); font-size:10.5px; color:var(--ink-muted); font-family:'IBM Plex Mono',monospace; }
.tmc-axis-line span:first-child{ transform:none; }
.tmc-legend{ display:flex; gap:16px; flex-wrap:wrap; font-size:11.5px; color:var(--ink-muted); padding:12px 0 0; }
.tmc-legend i{ display:inline-block; width:12px; height:12px; border-radius:3px; margin-right:6px; vertical-align:-2px; }
@media (max-width:560px){ .tmc{ --c1:104px; --c3:46px; --gp:8px; } }
.bar-avatar{ display:inline-flex; align-items:center; justify-content:center; width:22px; height:22px; border-radius:50%; font-size:9.5px; font-weight:800; font-family:'Manrope',sans-serif; color:#fff; background:var(--accent); flex:none; margin-right:8px; letter-spacing:.01em; }
.bar-row:not(.bar-row-lead) .bar-avatar{ background:var(--accent-soft); color:var(--accent-ink); }

.grid-2{ display:grid; grid-template-columns:1fr 1fr; gap:20px; }
.grid-3{ display:grid; grid-template-columns:repeat(3,1fr); gap:20px; }
.legend-row{ display:flex; align-items:center; gap:16px; font-size:12px; color:var(--ink-muted); padding:0 21px; }
.legend-row .key{ display:flex; align-items:center; gap:6px; }
.legend-row .key .sw{ width:10px; height:10px; border-radius:3px; }
.chart-wrap{ position:relative; padding:8px 21px 14px; }
.mini-chart{ width:100%; aspect-ratio:340/158; overflow:visible; }
.chart-hit{ cursor:pointer; }
.chart-tooltip{ position:fixed; z-index:1000; pointer-events:none; background:var(--tooltip-bg); color:var(--tooltip-ink); padding:6px 11px; border-radius:8px; font-size:12px; line-height:1.4; box-shadow:var(--shadow); white-space:nowrap; }
.chart-tooltip-label{ font-size:10px; font-weight:700; opacity:.7; text-transform:uppercase; letter-spacing:.05em; }
.chart-tooltip-value{ font-weight:800; font-variant-numeric:tabular-nums; }
.chart-hint{ font-size:11.5px; color:var(--ink-muted); margin-top:2px; }
.grid-line{ stroke:var(--grid); stroke-width:1; }
.grid-label{ font-family:'IBM Plex Mono',monospace; font-size:8.5px; fill:var(--ink-muted); }

.badge{ display:inline-flex; align-items:center; gap:5px; padding:3px 9px; border-radius:999px; font-size:11px; font-weight:700; white-space:nowrap; background:var(--surface-2); color:var(--ink-muted); }
.badge-ok{ background:var(--good-soft); color:var(--good); }
.badge-warn{ background:var(--warn-soft); color:var(--warn); }
.badge-critical{ background:var(--critical-soft); color:var(--critical); }
.badge-accent{ background:var(--accent-soft); color:var(--accent-ink); }
.badge-mock{ background:var(--mock-soft); color:var(--mock-ink); }
.tag-dot{ display:inline-flex; align-items:center; gap:6px; font-size:12.5px; color:var(--ink); font-weight:600; white-space:nowrap; }
.tag-dot .dot{ width:7px; height:7px; border-radius:50%; flex:none; }

.pill-toggle{ display:inline-flex; border:1px solid var(--border); border-radius:999px; overflow:hidden; }
.pill-toggle button{ border:none; background:var(--surface); color:var(--ink-muted); padding:6px 13px; font-size:12px; font-weight:700; cursor:pointer; }
.pill-toggle button[data-active="true"]{ background:var(--accent); color:#fff; }

/* Colaborador 360°: abas internas e gráfico por tipo */
.c360-tabs{ display:flex; gap:6px; overflow-x:auto; padding:2px 0 12px; margin:4px 0 6px; -webkit-overflow-scrolling:touch; }
.c360-tab{ flex:0 0 auto; border:1px solid var(--border); background:var(--surface); color:var(--ink-muted); padding:7px 14px; border-radius:999px; font-size:12.5px; font-weight:700; cursor:pointer; white-space:nowrap; }
.c360-tab[data-active="true"]{ background:var(--accent); border-color:var(--accent); color:#fff; }
.c360-tab:focus-visible{ outline:2px solid var(--accent); outline-offset:2px; }
.c360-sec{ display:flex; flex-direction:column; gap:20px; }
.c360-hdr{ font-size:19px; margin:34px 2px 12px; padding-bottom:8px; border-bottom:2px solid var(--accent); color:var(--ink); }
.c360-aviso{ margin:0 0 16px; padding:12px 14px; border-radius:12px; border:1px solid var(--warn); background:var(--surface); color:var(--ink); font-size:13px; line-height:1.45; }
.c360-sec > .d1-fonte{ margin-bottom:-6px; }
.tp-chart{ display:flex; flex-direction:column; }
.tp-legend{ display:flex; gap:16px; flex-wrap:wrap; font-size:11.5px; color:var(--ink-muted); padding:2px 0 10px; }
.tp-legend i{ display:inline-block; width:10px; height:10px; border-radius:3px; margin-right:6px; vertical-align:-1px; }
.tp-row{ display:grid; grid-template-columns:minmax(120px,1.1fr) minmax(120px,2.4fr) 70px 110px 110px; align-items:center; column-gap:14px; padding:11px 0; border-top:1px solid var(--border); }
.tp-row:first-of-type{ border-top:none; }
.tp-name{ font-weight:700; font-size:13px; color:var(--ink); }
.tp-bar{ display:flex; gap:2px; height:12px; }
.tp-seg{ display:block; height:100%; min-width:0; }
.tp-rest{ background:var(--accent); border-radius:4px 0 0 4px; }
.tp-pend{ background:var(--warn); border-radius:0 4px 4px 0; }
.tp-rest:only-child, .tp-seg[style*="width:0%"] + .tp-pend{ border-radius:4px; }
.tp-num{ display:flex; flex-direction:column; align-items:flex-end; font-family:'IBM Plex Mono',monospace; }
.tp-num b{ font-size:13px; color:var(--ink); font-weight:600; }
.tp-num small{ font-family:inherit; font-size:10px; color:var(--ink-muted); }
@media (max-width:640px){
  .tp-row{ grid-template-columns:1fr 1fr 1fr; row-gap:8px; }
  .tp-name{ grid-column:1 / -1; }
  .tp-bar{ grid-column:1 / -1; }
  .tp-num{ align-items:flex-start; }
}
.c360b-tbl .mapa-sub, .c360m-tbl .mapa-sub, .c360a-tbl .mapa-sub{ display:none; }
@media (max-width:560px){ .c360a-tbl th:nth-child(2), .c360a-tbl td:nth-child(2){ display:none; } .c360a-tbl .mapa-sub{ display:block; font-size:10.5px; color:var(--ink-muted); font-weight:400; } }
@media (max-width:560px){ .c360b-tbl th:nth-child(2), .c360b-tbl td:nth-child(2){ display:none; } .c360b-tbl .mapa-sub{ display:block; font-size:10.5px; color:var(--ink-muted); font-weight:400; } .c360m-tbl th:nth-child(5), .c360m-tbl td:nth-child(5){ display:none; } }

/* Colaborador 360 */
.c360-search{ display:flex; gap:8px; flex-wrap:wrap; align-items:center; }
.c360-search input[type="search"]{ font-family:'Source Sans 3',sans-serif; font-size:13.5px; padding:9px 13px; border-radius:10px; border:1px solid var(--border); background:var(--surface); color:var(--ink); min-width:280px; }

/* Busca dentro de tabela (ex.: Todas as baixas, por vale ou mapa) */
.table-search-row{ display:flex; align-items:center; gap:8px; padding:0 21px 12px; }
.table-search-row svg{ width:15px; height:15px; color:var(--ink-muted); flex:none; }
.table-search-row input[type="search"]{ font-family:'Source Sans 3',sans-serif; font-size:13px; padding:8px 12px; border-radius:9px; border:1px solid var(--border); background:var(--surface); color:var(--ink); flex:1; min-width:0; }
.c360-results{ display:flex; flex-direction:column; gap:2px; max-height:260px; overflow-y:auto; border:1px solid var(--border); border-radius:10px; background:var(--surface); box-shadow:var(--shadow); }
.c360-result-row{ display:flex; align-items:center; justify-content:space-between; gap:10px; padding:9px 13px; border-bottom:1px solid var(--border); cursor:pointer; font-size:13px; }
.c360-result-row:last-child{ border-bottom:none; }
.c360-result-row:hover{ background:var(--surface-2); }
.c360-result-row .name{ font-weight:700; }
.c360-result-row .codes{ font-size:11px; color:var(--ink-muted); font-family:'IBM Plex Mono',monospace; }
.c360-profile-head{ display:flex; align-items:center; justify-content:space-between; gap:16px; flex-wrap:wrap; background:var(--surface); border:1px solid var(--border); border-radius:14px; padding:19px 21px; box-shadow:var(--shadow); }
.c360-avatar{ width:46px; height:46px; border-radius:50%; background:var(--accent); color:#fff; display:flex; align-items:center; justify-content:center; font-weight:800; font-size:16px; flex:none; }
.c360-name-row{ display:flex; align-items:center; gap:8px; }
.c360-casa{ display:flex; gap:4px 14px; flex-wrap:wrap; font-size:12.5px; color:var(--ink-muted); margin-top:5px; }
.c360-casa b{ color:var(--ink); font-weight:700; }
.c360-codes{ display:flex; gap:12px; flex-wrap:wrap; font-size:11.5px; color:var(--ink-muted); font-family:'IBM Plex Mono',monospace; margin-top:3px; }
.export-btn{ border:1px solid var(--accent); border-radius:10px; padding:9px 16px; font-size:13px; font-weight:700; font-family:'Manrope',sans-serif; cursor:pointer; background:var(--accent); color:#fff; white-space:nowrap; }
.export-btn:hover{ background:var(--accent-ink); }
.export-btn.secondary{ background:var(--surface); color:var(--accent); }
.export-btn.secondary:hover{ background:var(--accent-soft); }
.empty-state{ padding:36px 18px; text-align:center; color:var(--ink-muted); font-size:13.5px; }

/* Upload */
.upload-note{ font-size:13px; }
.upload-grid{ display:grid; grid-template-columns:repeat(2,1fr); gap:14px; padding:8px 21px 21px; }
.upload-field{ position:relative; border:1.5px dashed var(--border); border-radius:12px; padding:14px; display:flex; flex-direction:column; gap:8px; }
.upload-field[data-filled="true"]{ border-style:solid; border-color:var(--accent); background:var(--accent-soft); }
.upload-field-head{ display:flex; align-items:center; justify-content:space-between; gap:8px; }
.upload-field-name{ font-size:13px; font-weight:700; font-family:'Manrope',sans-serif; }
.upload-status{ font-size:10px; font-weight:700; text-transform:uppercase; letter-spacing:.03em; padding:2px 8px; border-radius:999px; background:var(--surface-2); color:var(--ink-muted); white-space:nowrap; }
.upload-status[data-ok="true"]{ background:var(--good-soft); color:var(--good); }
.upload-status[data-err="true"]{ background:var(--critical-soft); color:var(--critical); }
.upload-drop{ display:flex; align-items:center; gap:9px; border:1px solid var(--border); background:var(--surface); border-radius:9px; padding:9px 11px; cursor:pointer; font-size:12px; color:var(--ink-muted); }
.upload-drop:hover{ background:var(--surface-2); }
.upload-drop svg{ width:16px; height:16px; stroke:currentColor; fill:none; stroke-width:1.8; stroke-linecap:round; stroke-linejoin:round; flex:none; }
.upload-field input[type="file"]{ position:absolute; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip:rect(0,0,0,0); white-space:nowrap; border:0; }
.upload-drop .fname{ overflow:hidden; text-overflow:ellipsis; white-space:nowrap; color:var(--ink); font-weight:600; }
.upload-sub{ font-size:10.5px; color:var(--ink-muted); }
.import-stats{ display:grid; grid-template-columns:repeat(4,1fr); gap:14px; padding:4px 21px 21px; }
.import-stat{ background:var(--surface-2); border-radius:10px; padding:10px 12px; }
.import-stat .n{ font-size:17px; font-weight:700; }
.import-stat .l{ font-size:10.5px; color:var(--ink-muted); text-transform:uppercase; letter-spacing:.03em; }

footer.note{ font-size:11.5px; color:var(--ink-muted); text-align:center; padding-top:6px; }

@media (max-width:900px){
  .topbar{ padding:10px 14px; padding-top:calc(10px + env(safe-area-inset-top,0px)); gap:12px; }
  .topbar-brand .org{ display:none; }
  .side-nav{ overflow-x:auto; flex-wrap:nowrap; width:100%; }
}
@media (max-width:760px){
  .stats{ grid-template-columns:repeat(2,1fr); }
  .grid-2, .grid-3{ grid-template-columns:1fr; }
  .upload-grid{ grid-template-columns:1fr; }
  .import-stats{ grid-template-columns:repeat(2,1fr); }
  .main-header{ align-items:flex-start; }
  .main-inner{ padding:20px 18px 50px; gap:20px; }
  #app-content{ gap:20px; }
  .card-head{ padding:16px 17px 10px; }
  .card-body{ padding:8px 17px 18px; }
  .stat-card{ padding:15px 16px; }
}

/* Base da página (no claude.ai isso vinha do esqueleto de publicação) */
html{ color-scheme:light; }
img{ max-width:100%; }
[hidden]{ display:none!important; }
