/* Portainer Hub: tokens da paleta de dataviz validada (claro/escuro), tipografia do sistema. */
:root {
    color-scheme: light;
    --page: #f9f9f7; --surface: #fcfcfb; --surface-2: #f2f2ee; --ink: #0b0b0b; --ink2: #52514e; --muted: #898781;
    --grid: #e1e0d9; --axis: #c3c2b7; --ring: rgba(11, 11, 11, 0.10); --shadow: 0 1px 2px rgba(11, 11, 11, 0.06), 0 8px 24px -12px rgba(11, 11, 11, 0.18);
    --s1: #2a78d6; --s2: #eb6834; --s3: #1baf7a; --s4: #eda100; --s5: #e87ba4; --s6: #008300; --s7: #6250d6; --s8: #e34948;
    --blue: #2a78d6; --blue-soft: #cde2fb; --good: #0ca30c; --good-text: #006300; --warn: #fab219; --serious: #ec835a; --crit: #d03b3b;
    --good-bg: rgba(12, 163, 12, 0.12); --warn-bg: rgba(250, 178, 25, 0.20); --serious-bg: rgba(236, 131, 90, 0.18); --crit-bg: rgba(208, 59, 59, 0.12); --neutral-bg: rgba(137, 135, 129, 0.16);
    --font: system-ui, -apple-system, "Segoe UI", sans-serif; --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
}
@media (prefers-color-scheme: dark) {
    :root:where(:not([data-theme="light"])) {
        color-scheme: dark;
        --page: #0d0d0d; --surface: #1a1a19; --surface-2: #232321; --ink: #f0efec; --ink2: #c3c2b7; --muted: #898781;
        --grid: #2c2c2a; --axis: #383835; --ring: rgba(255, 255, 255, 0.10); --shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 10px 28px -14px rgba(0, 0, 0, 0.7);
        --s1: #3987e5; --s2: #d95926; --s3: #199e70; --s4: #c98500; --s5: #d55181; --s6: #0ca30c; --s7: #9085e9; --s8: #e66767;
        --blue: #3987e5; --blue-soft: #184f95; --good-text: #0ca30c;
    }
}
:root[data-theme="dark"] {
    color-scheme: dark;
    --page: #0d0d0d; --surface: #1a1a19; --surface-2: #232321; --ink: #f0efec; --ink2: #c3c2b7; --muted: #898781;
    --grid: #2c2c2a; --axis: #383835; --ring: rgba(255, 255, 255, 0.10); --shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 10px 28px -14px rgba(0, 0, 0, 0.7);
    --s1: #3987e5; --s2: #d95926; --s3: #199e70; --s4: #c98500; --s5: #d55181; --s6: #0ca30c; --s7: #9085e9; --s8: #e66767;
    --blue: #3987e5; --blue-soft: #184f95; --good-text: #0ca30c;
}

* { box-sizing: border-box; margin: 0; }
html { font-family: var(--font); font-size: 15px; background: var(--page); color: var(--ink); -webkit-text-size-adjust: 100%; }
body { min-height: 100vh; line-height: 1.5; }
[hidden] { display: none !important; }
a { color: inherit; text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
button, input, select { font: inherit; color: inherit; }
ul, ol { list-style: none; padding: 0; }
h1 { font-size: 1.55rem; line-height: 1.2; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
h2 { font-size: 1.05rem; }
h3 { font-size: 0.95rem; margin: 18px 0 8px; } h4 { font-size: 0.85rem; margin: 14px 0 6px; color: var(--ink2); }
.muted { color: var(--ink2); } .small { font-size: 0.82rem; } .num { font-variant-numeric: tabular-nums; } .mono { font-family: var(--mono); font-size: 0.84rem; }
.center { text-align: center; } .right { text-align: right; } .trunc { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 260px; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--ink); color: var(--page); padding: 8px 12px; border-radius: 8px; z-index: 300; } .skip:focus { left: 8px; }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; border-radius: 6px; }
svg.lucide, .lucide { width: 18px; height: 18px; flex-shrink: 0; stroke-width: 2; }

/* estrutura */
.top { position: sticky; top: 0; z-index: 50; display: flex; align-items: center; gap: 8px; padding: 10px 16px; background: var(--surface); border-bottom: 1px solid var(--ring); }
.brand { display: flex; align-items: center; gap: 9px; font-weight: 700; letter-spacing: -0.01em; } .brand .lucide { color: var(--blue); } .brand.big { font-size: 1.4rem; margin-bottom: 6px; justify-content: center; }
.grow { flex: 1; } .spacer { flex: 1; }
.shell { display: grid; grid-template-columns: 250px 1fr; min-height: calc(100vh - 57px); }
#side { border-right: 1px solid var(--ring); background: var(--surface); padding: 14px 10px; position: sticky; top: 57px; height: calc(100vh - 57px); overflow-y: auto; }
#view { padding: 24px clamp(14px, 3vw, 32px) 70px; min-width: 0; max-width: 1400px; width: 100%; margin: 0 auto; }
.nav-item { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 10px; color: var(--ink2); font-weight: 500; }
.nav-item:hover { background: var(--surface-2); text-decoration: none; color: var(--ink); }
.nav-item.on { background: color-mix(in srgb, var(--blue) 14%, transparent); color: var(--ink); }
.nav-item.sub { padding-left: 14px; font-weight: 450; } .nav-item .nav-st { margin-left: auto; width: 15px; height: 15px; }
.nav-title { margin: 16px 10px 6px; font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); font-weight: 700; }
.pad { padding: 4px 10px; }
.good { color: var(--good-text); } .crit { color: var(--crit); }
.sw { display: inline-block; width: 10px; height: 10px; border-radius: 3px; flex-shrink: 0; } .sw.lg { width: 14px; height: 14px; border-radius: 4px; }
.only-mobile { display: none; }

/* botões e campos */
.icon-btn { position: relative; display: grid; place-items: center; width: 38px; height: 38px; border-radius: 10px; border: 1px solid transparent; background: transparent; cursor: pointer; color: var(--ink2); }
.icon-btn:hover { background: var(--surface-2); color: var(--ink); }
.icon-btn.spinning .lucide { animation: spin 0.9s linear infinite; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 8px 14px; border-radius: 10px; border: 1px solid var(--ring); background: var(--surface); cursor: pointer; font-weight: 600; min-height: 38px; transition: background 0.15s, border-color 0.15s, transform 0.1s; }
.btn:hover { background: var(--surface-2); } .btn:active { transform: translateY(1px); }
.btn.primary { background: var(--blue); border-color: var(--blue); color: #fff; } .btn.primary:hover { filter: brightness(1.08); background: var(--blue); }
.btn.danger { color: var(--crit); border-color: color-mix(in srgb, var(--crit) 40%, transparent); }
.btn.sm { padding: 4px 10px; min-height: 30px; font-size: 0.82rem; } .btn.wide { width: 100%; } .btn:disabled { opacity: 0.55; cursor: not-allowed; }
.link { background: none; border: 0; color: var(--blue); cursor: pointer; text-decoration: underline; text-underline-offset: 3px; padding: 4px; }
.badge { position: absolute; top: 2px; right: 0; min-width: 17px; height: 17px; padding: 0 5px; border-radius: 999px; font-size: 0.68rem; font-weight: 700; display: grid; place-items: center; color: #fff; background: var(--serious); }
.badge.crit { background: var(--crit); } .nav-item .badge { position: static; margin-left: auto; }
.row { display: flex; align-items: center; } .row.gap { gap: 10px; } .row.wrap { flex-wrap: wrap; } .row.top { margin-top: 14px; }
.field { display: grid; gap: 6px; font-size: 0.86rem; } .field > span { font-weight: 600; } .field small { color: var(--muted); }
input[type=text], input[type=url], input[type=password], input[type=search], input[type=file], select { width: 100%; padding: 9px 12px; border-radius: 10px; border: 1px solid var(--ring); background: var(--surface); min-height: 40px; }
input:focus, select:focus { outline: 2px solid var(--blue); outline-offset: 1px; }
.check { display: flex; align-items: center; gap: 10px; } .check input { width: 18px; height: 18px; accent-color: var(--blue); }
.form { display: grid; gap: 14px; } .form.cols { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }

/* cartões e blocos */
.stack { display: grid; gap: 18px; }
.card { background: var(--surface); border: 1px solid var(--ring); border-radius: 16px; padding: 18px; box-shadow: var(--shadow); }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 14px; flex-wrap: wrap; } .card-head a { color: var(--blue); font-size: 0.85rem; font-weight: 600; }
.page-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 14px; flex-wrap: wrap; }
.crumbs { font-size: 0.82rem; color: var(--muted); margin-bottom: 4px; } .crumbs a:hover { color: var(--ink); }
.grid.cards { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); }
.tiles { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); } .tiles.sm { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.tile { background: var(--surface); border: 1px solid var(--ring); border-radius: 14px; padding: 14px 16px; position: relative; overflow: hidden; }
.tile::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--axis); }
.tile.tone-good::before { background: var(--good); } .tile.tone-blue::before { background: var(--blue); } .tile.tone-warn::before { background: var(--warn); } .tile.tone-serious::before { background: var(--serious); } .tile.tone-crit::before { background: var(--crit); }
.tile-label { display: flex; align-items: center; gap: 7px; color: var(--ink2); font-size: 0.8rem; font-weight: 600; } .tile-label .lucide { width: 15px; height: 15px; }
.tile-value { font-size: 1.9rem; font-weight: 750; letter-spacing: -0.02em; line-height: 1.15; margin-top: 6px; font-variant-numeric: tabular-nums; } .tile-sub { color: var(--muted); font-size: 0.78rem; margin-top: 2px; }

.chip { display: inline-flex; align-items: center; gap: 6px; padding: 2px 9px 2px 7px; border-radius: 999px; font-size: 0.76rem; font-weight: 650; white-space: nowrap; background: var(--neutral-bg); color: var(--ink); }
.chip .lucide { width: 14px; height: 14px; }
.chip.tone-good { background: var(--good-bg); } .chip.tone-good .lucide { color: var(--good); }
.chip.tone-warn { background: var(--warn-bg); } .chip.tone-warn .lucide { color: #b57800; }
.chip.tone-serious { background: var(--serious-bg); } .chip.tone-serious .lucide { color: var(--serious); }
.chip.tone-crit { background: var(--crit-bg); } .chip.tone-crit .lucide { color: var(--crit); }
.chip.tone-neutral .lucide { color: var(--muted); }
:root[data-theme="dark"] .chip.tone-warn .lucide { color: var(--warn); }
@media (prefers-color-scheme: dark) { :root:where(:not([data-theme="light"])) .chip.tone-warn .lucide { color: var(--warn); } }

.inst-card, .env-card { display: grid; gap: 12px; align-content: start; background: var(--surface); border: 1px solid var(--ring); border-radius: 14px; padding: 14px; transition: border-color 0.15s, transform 0.15s, box-shadow 0.15s; }
.inst-card:hover, .env-card:hover { border-color: color-mix(in srgb, var(--blue) 55%, transparent); transform: translateY(-2px); box-shadow: var(--shadow); text-decoration: none; }
.ic-head { display: flex; align-items: center; gap: 8px; } .ic-head .chip { margin-left: auto; }
.ic-nums { display: grid; grid-template-columns: repeat(auto-fit, minmax(70px, 1fr)); gap: 8px; }
.ic-nums .n { display: grid; } .ic-nums .n b { font-size: 1.1rem; } .ic-nums .n span { font-size: 0.72rem; color: var(--muted); }
.n.tone-crit b { color: var(--crit); } .n.tone-serious b { color: var(--serious); }
.ic-err { display: flex; gap: 10px; align-items: flex-start; } .ic-err > .lucide { color: var(--crit); margin-top: 2px; }
.ok-note { display: flex; gap: 10px; align-items: center; color: var(--ink2); } .ok-note .lucide { color: var(--good); }

/* medidor, barras e tira de disponibilidade */
.meter-head { display: flex; justify-content: space-between; font-size: 0.8rem; color: var(--ink2); margin-bottom: 5px; }
.meter-track { height: 8px; border-radius: 999px; background: color-mix(in srgb, var(--blue) 16%, transparent); overflow: hidden; }
.meter-fill { height: 100%; border-radius: 999px; background: var(--blue); transition: width 0.5s ease; }
.meter-fill.tone-serious { background: var(--serious); } .meter-fill.tone-crit { background: var(--crit); } .meter-fill.tone-warn { background: var(--warn); } .meter-fill.tone-good { background: var(--good); }
.rank { display: grid; gap: 10px; } .rank-top { display: flex; align-items: center; gap: 10px; margin-bottom: 4px; font-size: 0.86rem; }
.rank-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .rank-top b { margin-left: auto; }
.rank-track { height: 8px; background: var(--surface-2); border-radius: 4px; } .rank-fill { height: 100%; background: var(--blue); border-radius: 0 4px 4px 0; border-radius: 4px; } .rank-fill.tone-warn { background: var(--warn); }
.seg { display: flex; gap: 2px; height: 16px; border-radius: 6px; overflow: hidden; } .seg span { min-width: 3px; } .segwrap { display: grid; gap: 14px; }
.legend { display: flex; flex-wrap: wrap; gap: 8px 18px; } .legend li { display: flex; align-items: center; gap: 8px; font-size: 0.84rem; } .legend b { margin-left: 4px; } .legend.row { margin-bottom: 8px; }
.strip { display: grid; grid-template-columns: repeat(48, 1fr); gap: 2px; height: 22px; }
.strip .cell { border-radius: 2px; background: var(--grid); } .strip .cell.up { background: var(--good); } .strip .cell.down { background: var(--crit); } .strip .cell.part { background: var(--warn); }
.avail-top { display: flex; justify-content: space-between; margin-bottom: 5px; }

/* gráfico */
.chart { position: relative; width: 100%; } .chart svg { display: block; overflow: visible; }
.chart .grid { stroke: var(--grid); stroke-width: 1; } .chart .axis { stroke: var(--axis); stroke-width: 1; } .chart .cross { stroke: var(--axis); stroke-width: 1; stroke-dasharray: 3 3; }
.chart .tick { fill: var(--muted); font-size: 11px; font-variant-numeric: tabular-nums; } .chart .dlabel { fill: var(--ink); font-size: 12px; font-weight: 600; } .chart .pt { stroke: var(--surface); stroke-width: 2; }
.empty { text-align: center; padding: 56px 20px; display: grid; justify-items: center; gap: 10px; color: var(--ink2); } .empty > .lucide { width: 40px; height: 40px; color: var(--muted); } .empty h2 { color: var(--ink); font-size: 1.25rem; } .empty p { max-width: 460px; } .empty.small { padding: 30px 10px; }

/* tabelas, abas, filtros */
.table-wrap { overflow-x: auto; border: 1px solid var(--ring); border-radius: 12px; background: var(--surface); }
.tbl { width: 100%; border-collapse: collapse; font-size: 0.88rem; } .tbl th, .tbl td { padding: 9px 12px; text-align: left; vertical-align: middle; border-bottom: 1px solid var(--grid); } .tbl th.num, .tbl td.num { text-align: right; }
.tbl thead th { background: var(--surface-2); font-size: 0.76rem; text-transform: uppercase; letter-spacing: 0.04em; color: var(--ink2); position: sticky; top: 0; } .tbl tr:last-child td { border-bottom: 0; }
.th-btn { background: none; border: 0; cursor: pointer; font: inherit; text-transform: inherit; letter-spacing: inherit; color: inherit; padding: 0; }
.row-click { cursor: pointer; } .row-click:hover td { background: var(--surface-2); } tr.detail td { background: var(--surface-2); }
.kv { display: grid; grid-template-columns: max-content 1fr; gap: 6px 16px; font-size: 0.84rem; } .kv dt { color: var(--muted); }
.tabs { display: flex; gap: 4px; flex-wrap: wrap; border-bottom: 1px solid var(--ring); } .tabs button { display: inline-flex; align-items: center; gap: 7px; padding: 9px 14px; border: 0; background: none; cursor: pointer; font-weight: 600; color: var(--ink2); border-bottom: 2px solid transparent; margin-bottom: -1px; }
.tabs button.on { color: var(--ink); border-bottom-color: var(--blue); } .tabs button:hover { color: var(--ink); } .tab-body { padding-top: 16px; }
.toolbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; } .search { position: relative; flex: 1; min-width: 220px; max-width: 360px; } .search .lucide { position: absolute; left: 11px; top: 50%; translate: 0 -50%; color: var(--muted); width: 16px; height: 16px; } .search input { padding-left: 34px; }
.seg-ctl { display: inline-flex; border: 1px solid var(--ring); border-radius: 10px; overflow: hidden; background: var(--surface); } .seg-ctl button { border: 0; background: none; padding: 7px 12px; cursor: pointer; font-weight: 600; color: var(--ink2); font-size: 0.84rem; } .seg-ctl button.on { background: var(--blue); color: #fff; }
.alerts { display: grid; gap: 4px; } .alerts li { display: flex; align-items: flex-start; gap: 12px; padding: 10px 4px; border-bottom: 1px solid var(--grid); } .alerts li:last-child { border-bottom: 0; }
.al-main { flex: 1; min-width: 0; } .al-where { display: inline-flex; align-items: center; gap: 4px; color: var(--blue); font-weight: 600; font-size: 0.84rem; white-space: nowrap; }

/* carregando, teste, guia */
.loading { display: flex; align-items: center; gap: 10px; color: var(--ink2); padding: 14px 4px; } .spin { width: 18px; height: 18px; border: 2px solid var(--grid); border-top-color: var(--blue); border-radius: 50%; animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.test { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border-radius: 10px; font-size: 0.86rem; background: var(--neutral-bg); } .test.ok { background: var(--good-bg); } .test.ok .lucide { color: var(--good); } .test.bad { background: var(--crit-bg); } .test.bad .lucide { color: var(--crit); } .test.info { background: color-mix(in srgb, var(--blue) 14%, transparent); }
.codewrap { position: relative; } .code { background: #0d1424; color: #d6e2ff; padding: 14px; border-radius: 10px; overflow-x: auto; font-size: 0.8rem; line-height: 1.55; } .code code { font-family: var(--mono); } .copy { position: absolute; right: 8px; top: 8px; }
.guide ol, .guide ul { list-style: revert; padding-left: 20px; display: grid; gap: 6px; margin: 6px 0; } .guide p { margin: 6px 0; } .guide code { font-family: var(--mono); background: var(--surface-2); padding: 1px 6px; border-radius: 5px; font-size: 0.85em; }

/* modal, toast, tooltip, bloqueio */
.overlay { position: fixed; inset: 0; z-index: 200; background: rgba(0, 0, 0, 0.55); display: grid; place-items: center; padding: 16px; overflow-y: auto; }
.modal { width: min(520px, 100%); background: var(--surface); border-radius: 16px; border: 1px solid var(--ring); box-shadow: 0 30px 80px -20px rgba(0, 0, 0, 0.6); max-height: 92vh; display: flex; flex-direction: column; } .modal.wide { width: min(760px, 100%); }
.modal-head { display: flex; justify-content: space-between; align-items: center; padding: 14px 18px; border-bottom: 1px solid var(--ring); } .modal-body { padding: 18px; overflow-y: auto; } .modal-actions { display: flex; gap: 10px; align-items: center; padding: 14px 18px; border-top: 1px solid var(--ring); flex-wrap: wrap; }
#toasts { position: fixed; right: 16px; bottom: 16px; z-index: 250; display: grid; gap: 8px; }
.toast { background: var(--ink); color: var(--page); padding: 10px 14px; border-radius: 10px; box-shadow: var(--shadow); max-width: 340px; font-size: 0.88rem; animation: rise 0.25s ease; border-left: 4px solid var(--blue); } .toast.good { border-left-color: var(--good); } .toast.crit { border-left-color: var(--crit); } .toast.warn { border-left-color: var(--warn); } .toast.out { opacity: 0; transition: opacity 0.4s; }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } }
#tip { position: fixed; z-index: 260; pointer-events: none; opacity: 0; background: var(--ink); color: var(--page); padding: 8px 10px; border-radius: 8px; font-size: 0.8rem; box-shadow: var(--shadow); max-width: 280px; } #tip.on { opacity: 1; }
.tip-row { display: flex; align-items: center; gap: 8px; margin-top: 3px; } .tip-row b { margin-left: auto; padding-left: 12px; }
#lock-host { min-height: 100vh; display: grid; place-items: center; padding: 20px; background: radial-gradient(ellipse at 50% 0%, color-mix(in srgb, var(--blue) 18%, transparent), transparent 60%), var(--page); }
.lock-card { width: min(420px, 100%); background: var(--surface); border: 1px solid var(--ring); border-radius: 18px; padding: 28px; box-shadow: var(--shadow); display: grid; gap: 14px; } .lock-form { display: grid; gap: 14px; } .lock-extra { display: flex; justify-content: space-between; flex-wrap: wrap; }

@media (max-width: 860px) {
    .shell { grid-template-columns: 1fr; } .only-mobile { display: grid; } .hide-sm { display: none; }
    #side { position: fixed; z-index: 60; left: 0; top: 57px; width: 270px; transform: translateX(-100%); transition: transform 0.2s; box-shadow: var(--shadow); } #side.open { transform: none; }
    .tile-value { font-size: 1.6rem; }
}
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }
@media print { .top, #side, .toolbar, .icon-btn { display: none !important; } .shell { display: block; } }

/* ===== Visual moderno (v b) ===== */
html { background: var(--page); }
body { background:
    radial-gradient(900px 420px at 85% -80px, color-mix(in srgb, var(--s1) 16%, transparent), transparent 70%),
    radial-gradient(700px 380px at -5% 120px, color-mix(in srgb, var(--s7) 10%, transparent), transparent 70%), var(--page);
    background-attachment: fixed; }
.top { background: color-mix(in srgb, var(--surface) 78%, transparent); backdrop-filter: saturate(1.4) blur(14px); -webkit-backdrop-filter: saturate(1.4) blur(14px); }
#side { background: color-mix(in srgb, var(--surface) 70%, transparent); backdrop-filter: blur(12px); }
.nav-item { transition: background .15s, color .15s, transform .15s; } .nav-item:hover { transform: translateX(2px); }
.nav-item.on { background: linear-gradient(90deg, color-mix(in srgb, var(--blue) 22%, transparent), color-mix(in srgb, var(--blue) 6%, transparent)); box-shadow: inset 2px 0 0 var(--blue); }
.card, .tile, .inst-card, .env-card, .table-wrap { background: linear-gradient(180deg, color-mix(in srgb, var(--surface) 96%, #fff), var(--surface)); }
.card { border-radius: 20px; }
.card-head h2 { font-size: 1rem; letter-spacing: -0.01em; }

/* faixa de status */
.hero { display: flex; align-items: center; gap: 18px; padding: 20px 22px; border-radius: 22px; border: 1px solid var(--ring); position: relative; overflow: hidden; box-shadow: var(--shadow); background: var(--surface); }
.hero::before { content: ""; position: absolute; inset: 0; opacity: .9; background: radial-gradient(600px 160px at 0% 0%, var(--hero-c, var(--good-bg)), transparent 70%); }
.hero.tone-good { --hero-c: color-mix(in srgb, var(--good) 22%, transparent); } .hero.tone-warn { --hero-c: color-mix(in srgb, var(--warn) 26%, transparent); }
.hero.tone-serious { --hero-c: color-mix(in srgb, var(--serious) 26%, transparent); } .hero.tone-crit { --hero-c: color-mix(in srgb, var(--crit) 26%, transparent); }
.hero > * { position: relative; }
.hero-ic { width: 54px; height: 54px; border-radius: 16px; display: grid; place-items: center; background: var(--surface); box-shadow: 0 6px 20px -8px rgba(0,0,0,.35), inset 0 0 0 1px var(--ring); }
.hero-ic .lucide { width: 28px; height: 28px; }
.hero.tone-good .hero-ic .lucide { color: var(--good); } .hero.tone-warn .hero-ic .lucide { color: var(--warn); } .hero.tone-serious .hero-ic .lucide { color: var(--serious); } .hero.tone-crit .hero-ic .lucide { color: var(--crit); }
.hero-txt h1 { font-size: clamp(1.2rem, 2.6vw, 1.7rem); } .hero-txt p { margin-top: 2px; }
.hero-live { margin-left: auto; display: flex; align-items: center; gap: 8px; white-space: nowrap; }
.pulse { width: 9px; height: 9px; border-radius: 50%; background: var(--good); box-shadow: 0 0 0 0 color-mix(in srgb, var(--good) 60%, transparent); animation: pulse 2s infinite; }
@keyframes pulse { 70% { box-shadow: 0 0 0 9px transparent; } 100% { box-shadow: 0 0 0 0 transparent; } }

/* cartões de indicador */
.tile { border-radius: 18px; padding: 16px 16px 12px; transition: transform .2s, box-shadow .2s, border-color .2s; }
.tile:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.tile::before { display: none; }
.tile::after { content: ""; position: absolute; right: -30px; top: -30px; width: 110px; height: 110px; border-radius: 50%; background: radial-gradient(closest-side, var(--tile-c, var(--axis)), transparent); opacity: .18; pointer-events: none; }
.tile.tone-good { --tile-c: var(--good); } .tile.tone-blue { --tile-c: var(--blue); } .tile.tone-warn { --tile-c: var(--warn); } .tile.tone-serious { --tile-c: var(--serious); } .tile.tone-crit { --tile-c: var(--crit); }
.tile-ic { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 8px; background: color-mix(in srgb, var(--tile-c, var(--muted)) 18%, transparent); }
.tile-ic .lucide { width: 15px; height: 15px; color: var(--tile-c, var(--ink2)); }
.tile-value { font-size: 2.1rem; font-weight: 800; background: linear-gradient(180deg, var(--ink), color-mix(in srgb, var(--ink) 72%, var(--tile-c, var(--ink)))); -webkit-background-clip: text; background-clip: text; color: transparent; }
.spark-host { margin: 8px -4px -4px; height: 38px; } .spark { width: 100%; height: 38px; display: block; }

/* roscas */
.grid.two { display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.donut { display: flex; align-items: center; gap: 22px; flex-wrap: wrap; }
.donut-ring { position: relative; flex-shrink: 0; } .donut-ring svg { display: block; }
.donut-track { stroke: var(--surface-2); }
.donut-seg { transition: opacity .15s, stroke-width .15s; animation: ring .9s cubic-bezier(.2,.7,.2,1) both; } .donut-seg:hover { stroke-width: 13; }
@keyframes ring { from { stroke-dasharray: 0 100; } }
.donut-mid { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; pointer-events: none; }
.donut-mid b { font-size: 1.9rem; font-weight: 800; line-height: 1; } .donut-mid span { font-size: .72rem; color: var(--muted); margin-top: 3px; }
.legend.col { flex-direction: column; gap: 8px; flex: 1; min-width: 150px; } .legend.col li { width: 100%; } .legend.col b { margin-left: auto; }
.mini-note { margin-top: 10px; }
.env-card .donut { gap: 14px; } .env-card .donut-mid b { font-size: 1.15rem; } .env-card .legend.col { min-width: 0; font-size: .78rem; gap: 4px; }

/* gráfico: entrada animada e brilho */
.line-in { stroke-dasharray: 1; stroke-dashoffset: 1; animation: draw 1.1s ease-out forwards; filter: drop-shadow(0 2px 5px color-mix(in srgb, currentColor 30%, transparent)); }
.area-in { opacity: 0; animation: fade .9s .25s ease-out forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } } @keyframes fade { to { opacity: 1; } }
.chart .grid { stroke-dasharray: 2 4; }
.meter-track, .rank-track { height: 9px; } .meter-fill, .rank-fill { background: linear-gradient(90deg, color-mix(in srgb, var(--blue) 70%, #fff), var(--blue)); } .rank-fill { transition: width .6s cubic-bezier(.2,.7,.2,1); }
.strip .cell { transition: transform .12s; } .strip .cell:hover { transform: scaleY(1.35); }

/* entrada escalonada */
@keyframes up { from { opacity: 0; transform: translateY(10px); } }
#view > .stack > *, .tabs + .tab-body > .stack > * { animation: up .5s cubic-bezier(.2,.7,.2,1) both; }
#view > .stack > *:nth-child(2) { animation-delay: .05s; } #view > .stack > *:nth-child(3) { animation-delay: .1s; } #view > .stack > *:nth-child(4) { animation-delay: .15s; } #view > .stack > *:nth-child(5) { animation-delay: .2s; }
.tiles > .tile { animation: up .5s cubic-bezier(.2,.7,.2,1) both; } .tiles > .tile:nth-child(2) { animation-delay: .05s; } .tiles > .tile:nth-child(3) { animation-delay: .1s; } .tiles > .tile:nth-child(4) { animation-delay: .15s; } .tiles > .tile:nth-child(5) { animation-delay: .2s; } .tiles > .tile:nth-child(6) { animation-delay: .25s; }
@media (max-width: 640px) { .hero { flex-wrap: wrap; } .hero-live { margin-left: 0; } }
