[hidden] { display: none !important; }

/* Layout: aplicativo de monitoramento — barra superior com navegação, conteúdo em painéis; esboço funcional com dados de exemplo. */
:root {
  --bg: #eef1f0; --surface: #fcfcfb; --surface-2: #f4f6f5; --fg: #16201e; --muted: #5b6763; --faint: #8e9995;
  --line: #d7dedb; --accent: #00498e; --accent-soft: #e0eaf5; --brand-y: #fbb040;
  --series: #2a78d6; --series-soft: #d9e7f8; --ref: #8e9995;
  --good: #0ca30c; --warn: #fab219; --serious: #ec835a; --crit: #d03b3b; --idle: #9aa5a1;
  --good-soft: #e1f3e1; --warn-soft: #fdf1d6; --serious-soft: #fbe6dd; --crit-soft: #f8dfdf; --idle-soft: #e6eae8;
  --font-display: "IBM Plex Sans Condensed", "Arial Narrow", system-ui, sans-serif;
  --font-body: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, Consolas, monospace;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #111615; --surface: #1a1a19; --surface-2: #20262a; --fg: #e6ebe9; --muted: #9ea9a5; --faint: #6f7a76;
    --line: #2e3836; --accent: #6aa8ec; --accent-soft: #15283d; --series: #3987e5; --series-soft: #1c2c40; --ref: #7d8884;
    --good-soft: #17301a; --warn-soft: #3a3016; --serious-soft: #3b261d; --crit-soft: #3d1f1f; --idle-soft: #262d2b;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #111615; --surface: #1a1a19; --surface-2: #20262a; --fg: #e6ebe9; --muted: #9ea9a5; --faint: #6f7a76;
  --line: #2e3836; --accent: #6aa8ec; --accent-soft: #15283d; --series: #3987e5; --series-soft: #1c2c40; --ref: #7d8884;
  --good-soft: #17301a; --warn-soft: #3a3016; --serious-soft: #3b261d; --crit-soft: #3d1f1f; --idle-soft: #262d2b;
  color-scheme: dark;
}
* { box-sizing: border-box; }
body { background: var(--bg); color: var(--fg); font-family: var(--font-body); font-size: 14px; line-height: 1.5; }
h1, h2, h3 { font-family: var(--font-display); margin: 0; line-height: 1.15; text-wrap: balance; }
button { font: inherit; color: inherit; }
button:focus-visible, a:focus-visible, select:focus-visible, input:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.num { font-variant-numeric: tabular-nums; }
.mono { font-family: var(--font-mono); font-size: 12px; }

/* barra superior */
.topbar { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 10; background: var(--surface); border-bottom: 1px solid var(--line); }
.topbar-in { max-width: 1240px; margin: 0 auto; padding-inline: 16px; display: flex; align-items: center; gap: 18px; min-height: 54px; flex-wrap: wrap; }
.brand { font-family: var(--font-display); font-weight: 700; font-size: 17px; letter-spacing: 0.01em; display: flex; align-items: center; gap: 8px; }
.brand-mark { width: 22px; height: 22px; border-radius: 50%; border: 2.5px solid var(--accent); position: relative; }
.brand-mark::after { content: ""; position: absolute; left: 50%; top: 50%; width: 2px; height: 8px; background: var(--accent); transform-origin: bottom; transform: translate(-50%, -100%) rotate(40deg); }
nav.main { display: flex; gap: 4px; }
nav.main button { background: none; border: 0; padding: 8px 12px; border-radius: 6px; cursor: pointer; font-family: var(--font-display); font-weight: 600; font-size: 15px; color: var(--muted); display: flex; gap: 6px; align-items: center; }
nav.main button[aria-current="page"] { color: var(--fg); background: var(--surface-2); }
.count { min-width: 20px; padding: 0 6px; border-radius: 999px; background: var(--crit); color: #fff; font-size: 12px; line-height: 20px; text-align: center; }
.proto { margin-left: auto; font-size: 12px; color: var(--muted); border: 1px dashed var(--line); border-radius: 999px; padding: 3px 10px; }

main { max-width: 1240px; margin: 0 auto; padding-inline: 16px; padding-block: 20px 60px; display: grid; gap: 18px; }
.head { display: flex; align-items: end; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.head h1 { font-size: 26px; }
.sub { color: var(--muted); font-size: 13.5px; }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; background: var(--surface); }
.seg button { border: 0; background: none; padding: 6px 12px; cursor: pointer; font-size: 13px; color: var(--muted); }
.seg button[aria-pressed="true"] { background: var(--accent); color: #fff; }
.variant-note { font-size: 12px; color: var(--muted); }
.ctrls { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }

/* pílulas de estado */
.pill { display: inline-flex; align-items: center; gap: 5px; padding: 2px 9px 2px 7px; border-radius: 999px; font-family: var(--font-display); font-weight: 600; font-size: 12.5px; white-space: nowrap; }
.pill::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.st-good { background: var(--good-soft); color: var(--good); }
.st-warn { background: var(--warn-soft); color: #9a6a00; }
.st-serious { background: var(--serious-soft); color: #b5532c; }
.st-crit { background: var(--crit-soft); color: var(--crit); }
.st-idle { background: var(--idle-soft); color: var(--muted); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .st-warn { color: var(--warn); } :root:not([data-theme="light"]) .st-serious { color: var(--serious); } }
:root[data-theme="dark"] .st-warn { color: var(--warn); } :root[data-theme="dark"] .st-serious { color: var(--serious); }

/* resumo da frota */
.summary { display: flex; gap: 8px; flex-wrap: wrap; }
.summary button { border: 1px solid var(--line); background: var(--surface); border-radius: 8px; padding: 8px 12px; cursor: pointer; display: flex; gap: 8px; align-items: baseline; }
.summary button[aria-pressed="true"] { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.summary b { font-family: var(--font-display); font-size: 20px; }

/* cartões da frota */
.fleet { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.mcard { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 14px; display: grid; gap: 10px; cursor: pointer; text-align: left; position: relative; overflow: hidden; }
.mcard:hover { border-color: var(--accent); }
.mcard .stripe { position: absolute; left: 0; top: 0; bottom: 0; width: 4px; }
.mcard .top { display: flex; justify-content: space-between; gap: 8px; align-items: start; }
.mcard h3 { font-size: 17px; }
.mcard .who { font-size: 12.5px; color: var(--muted); }
.mcard .vals { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.kv { display: grid; gap: 0; min-width: 0; }
.kv .k { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.05em; font-family: var(--font-display); }
.kv .v { font-family: var(--font-display); font-weight: 700; font-size: 20px; font-variant-numeric: tabular-nums; }
.kv .v small { font-size: 12px; font-weight: 500; color: var(--muted); margin-left: 2px; }
.mcard .msg { font-size: 13px; border-top: 1px dashed var(--line); padding-top: 8px; }
.mcard .foot { display: flex; justify-content: space-between; font-size: 12px; color: var(--muted); }
.spark { height: 26px; width: 100%; display: block; }

/* tabela */
.tbl-wrap { overflow-x: auto; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; }
table { border-collapse: collapse; width: 100%; font-size: 13.5px; }
th, td { padding: 9px 12px; border-bottom: 1px solid var(--line); text-align: left; white-space: nowrap; }
th { font-family: var(--font-display); font-weight: 600; font-size: 12.5px; color: var(--muted); background: var(--surface-2); }
tr:last-child td { border-bottom: 0; }
tbody tr.click { cursor: pointer; } tbody tr.click:hover { background: var(--surface-2); }
td.r, th.r { text-align: right; font-variant-numeric: tabular-nums; }
td.wrapt { white-space: normal; min-width: 220px; }

/* máquina */
.back { background: none; border: 0; color: var(--accent); cursor: pointer; padding: 0; font-weight: 600; }
.mhead { display: flex; justify-content: space-between; gap: 14px; flex-wrap: wrap; align-items: start; }
.mhead h1 { font-size: 28px; }
.ident { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; font-size: 13px; color: var(--muted); margin-top: 6px; }
.btns { display: flex; gap: 8px; flex-wrap: wrap; }
.btn { border: 1px solid var(--accent); color: var(--accent); background: var(--surface); border-radius: 8px; padding: 7px 12px; cursor: pointer; font-family: var(--font-display); font-weight: 600; font-size: 13.5px; }
.btn:hover { background: var(--accent-soft); }
.btn.primary { background: var(--accent); color: #fff; }
.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.tabs button { background: none; border: 0; border-bottom: 2px solid transparent; padding: 9px 14px; cursor: pointer; font-family: var(--font-display); font-weight: 600; font-size: 15px; color: var(--muted); margin-bottom: -1px; }
.tabs button[aria-selected="true"] { color: var(--fg); border-bottom-color: var(--accent); }
.banner { border-radius: 10px; padding: 12px 16px; display: flex; gap: 12px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.banner.crit { background: var(--crit-soft); border: 1px solid var(--crit); }
.banner.serious { background: var(--serious-soft); border: 1px solid var(--serious); }
.banner b { font-family: var(--font-display); font-size: 16px; }
.grid { display: grid; grid-template-columns: repeat(12, 1fr); gap: 12px; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 14px 16px; display: grid; gap: 10px; align-content: start; min-width: 0; }
.panel h2 { font-size: 15px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: 0.06em; }
.span12 { grid-column: span 12; } .span8 { grid-column: span 8; } .span6 { grid-column: span 6; } .span4 { grid-column: span 4; } .span3 { grid-column: span 3; }
@media (max-width: 900px) { .span8, .span6, .span4 { grid-column: span 12; } .span3 { grid-column: span 6; } }
@media (max-width: 520px) { .span3 { grid-column: span 12; } }
.bigval { font-family: var(--font-display); font-weight: 700; font-size: 38px; font-variant-numeric: tabular-nums; line-height: 1; }
.bigval small { font-size: 16px; color: var(--muted); font-weight: 500; }
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.tile { background: var(--surface-2); border-radius: 8px; padding: 10px 12px; display: grid; gap: 2px; }
.tile .v { font-family: var(--font-display); font-weight: 700; font-size: 24px; font-variant-numeric: tabular-nums; }
.tile .v small { font-size: 13px; color: var(--muted); font-weight: 500; }
.tile .k { font-size: 12px; color: var(--muted); }
.tile.alert { box-shadow: inset 3px 0 0 var(--crit); }
.bandbar { position: relative; height: 34px; }
.mbar { display: grid; gap: 4px; }
.mbar .row { display: flex; justify-content: space-between; font-size: 13px; }
.mbar .track { height: 8px; border-radius: 4px; background: var(--line); overflow: hidden; }
.mbar .fill { height: 100%; border-radius: 4px; }
.prev { font-size: 12.5px; }
.cfg-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.cfgt td { vertical-align: middle; }
.cfgt input[type=text] { min-width: 170px; }
#cfg input, #cfg select { font: inherit; padding: 5px 7px; border-radius: 6px; border: 1px solid var(--line); background: var(--surface); color: var(--fg); }
#cfg input[type=number] { width: 90px; font-variant-numeric: tabular-nums; }
#cfg input[type=checkbox] { padding: 0; }
.inl { display: inline-flex; gap: 6px; align-items: center; white-space: nowrap; }
.icon { border: 1px solid var(--line); background: var(--surface); border-radius: 6px; width: 30px; height: 30px; cursor: pointer; color: var(--muted); }
.icon:hover { color: var(--crit); border-color: var(--crit); }
.regra { border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; display: grid; gap: 8px; background: var(--surface-2); }
.regra.off { opacity: .6; }
.regra-l { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; font-size: 13.5px; }
.sw { display: inline-flex; gap: 5px; align-items: center; cursor: pointer; }
.agora { margin-left: auto; }
.cfg-save { display: flex; justify-content: flex-end; gap: 12px; align-items: center; }
.uso { display: grid; gap: 6px; border-top: 1px dashed var(--line); padding-top: 10px; }
.uso .row { display: flex; justify-content: space-between; font-size: 13px; }
.note-src { font-size: 12px; color: var(--muted); }
.absent { font-size: 12.5px; color: var(--muted); border: 1px dashed var(--line); border-radius: 8px; padding: 8px 10px; }

/* sinótico */
.syn svg { width: 100%; height: auto; display: block; }
.syn text { font-family: var(--font-display); fill: var(--fg); }
.syn .lbl { fill: var(--muted); font-size: 11px; }
.syn .val { font-size: 17px; font-weight: 700; }
.syn .box { fill: var(--surface-2); stroke: var(--line); stroke-width: 1.5; }
.syn .pipe { stroke: var(--accent); stroke-width: 3; fill: none; }
.syn .boxalert { stroke: var(--crit); stroke-width: 2.5; }

/* gráficos */
.chartctl { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; justify-content: space-between; }
.chk { display: flex; gap: 12px; flex-wrap: wrap; font-size: 13px; }
.chk label { display: flex; gap: 5px; align-items: center; cursor: pointer; }
.charts { position: relative; display: grid; gap: 6px; }
.chart { position: relative; }
.chart .ttl { font-family: var(--font-display); font-weight: 600; font-size: 13.5px; display: flex; gap: 8px; align-items: baseline; }
.chart .ttl span { color: var(--muted); font-weight: 500; font-size: 12px; }
.chart svg { width: 100%; display: block; overflow: visible; }
.chart text { font-family: var(--font-body); font-size: 11px; fill: var(--muted); }
.tip { position: absolute; pointer-events: none; background: var(--surface); border: 1px solid var(--line); box-shadow: 0 4px 14px rgba(0,0,0,.12); border-radius: 8px; padding: 8px 10px; font-size: 12.5px; min-width: 170px; z-index: 5; display: grid; gap: 2px; }
.tip b { font-family: var(--font-display); }
.tip .r { display: flex; justify-content: space-between; gap: 14px; font-variant-numeric: tabular-nums; }
.periodo { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; font-size: 13px; }
.periodo label { display: flex; gap: 6px; align-items: center; color: var(--muted); }
.periodo input { font: inherit; padding: 5px 8px; border-radius: 6px; border: 1px solid var(--line); background: var(--surface); color: var(--fg); }
.zoombar { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.dica { font-size: 12px; color: var(--faint); }
@media (hover: none) { .dica { display: none; } }
.charts { user-select: none; -webkit-user-select: none; }
@media (hover: hover) { .charts { cursor: crosshair; } }
.charts.arrastando { cursor: col-resize; }
.sel { position: absolute; top: 18px; bottom: 0; background: var(--series-soft); opacity: .75; border-left: 1.5px solid var(--series); border-right: 1.5px solid var(--series); pointer-events: none; z-index: 4; }
.sel span { position: absolute; top: -18px; left: 50%; transform: translateX(-50%); white-space: nowrap; font-size: 11.5px; font-weight: 600; color: var(--fg); background: var(--surface); border: 1px solid var(--line); border-radius: 4px; padding: 0 6px; }
.periodo-info { font-size: 12.5px; color: var(--muted); font-variant-numeric: tabular-nums; }
.erro { font-size: 13px; color: var(--crit); background: var(--crit-soft); border-radius: 6px; padding: 6px 10px; }
.legend { display: flex; gap: 12px; flex-wrap: wrap; font-size: 12px; color: var(--muted); align-items: center; }
.legend i { display: inline-block; width: 12px; height: 10px; border-radius: 2px; margin-right: 4px; vertical-align: -1px; }

/* alarmes */
.alist { display: grid; gap: 8px; }
.arow { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; display: grid; grid-template-columns: auto 1fr auto; gap: 4px 14px; align-items: center; }
.arow.ack { opacity: .72; }
.arow .t { font-weight: 600; }
.arow .m { font-size: 12.5px; color: var(--muted); }
.arow .act { grid-row: span 2; display: grid; gap: 4px; justify-items: end; }
@media (max-width: 620px) { .arow { grid-template-columns: 1fr; } .arow .act { grid-row: auto; justify-items: start; } }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chips button { border: 1px solid var(--line); background: var(--surface); border-radius: 999px; padding: 4px 11px; cursor: pointer; font-size: 13px; }
.chips button[aria-pressed="true"] { background: var(--fg); color: var(--surface); border-color: var(--fg); }
select { font: inherit; padding: 5px 8px; border-radius: 6px; border: 1px solid var(--line); background: var(--surface); color: var(--fg); }

/* histórico */
.timeline { display: grid; gap: 4px; }
.tlr { display: grid; grid-template-columns: 54px 1fr; gap: 8px; align-items: center; font-size: 12px; color: var(--muted); }
.tlbar { display: flex; height: 14px; border-radius: 3px; overflow: hidden; gap: 1px; }

nav.user { margin-left: 0; }
.logo { height: 30px; width: auto; display: block; }
.tema { display: inline-flex; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; background: var(--surface); }
.tema button { border: 0; background: none; padding: 5px 10px; cursor: pointer; font-size: 12.5px; color: var(--muted); }
.tema button[aria-pressed="true"] { background: var(--accent); color: #fff; }
#tema-topo { margin-left: 4px; }
.login-tema { display: flex; gap: 10px; align-items: center; }
@media (max-width: 700px) { #tema-topo { order: 9; } }
.brand-sep { width: 1px; height: 24px; background: var(--line); margin: 0 4px; }
.logo-escuro { display: none; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .logo-claro { display: none; } :root:not([data-theme="light"]) .logo-escuro { display: block; } }
:root[data-theme="dark"] .logo-claro { display: none; } :root[data-theme="dark"] .logo-escuro { display: block; }
.tvhead .logo { height: 40px; }
/* login */
body:has(.login) main { max-width: none; padding: 0; }
.login { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(320px, 0.9fr); background: var(--surface); }
.login-lado { background: #00498e; color: #fff; position: relative; overflow: hidden; display: flex; align-items: flex-end; padding: 48px; }
.login-lado::before { content: ""; position: absolute; right: -120px; top: -140px; width: 520px; height: 520px; border-radius: 50%; border: 70px solid rgba(251, 176, 64, .9); }
.login-lado-in { position: relative; display: grid; gap: 14px; max-width: 520px; }
.login-faixa { width: 64px; height: 6px; background: #fbb040; border-radius: 3px; }
.login-claim { font-family: var(--font-display); font-weight: 700; font-size: clamp(30px, 3.4vw, 46px); line-height: 1.05; text-wrap: balance; }
.login-sub { font-size: 16px; opacity: .85; max-width: 40ch; }
.login-form { display: grid; align-content: center; gap: 14px; padding: 48px clamp(20px, 5vw, 64px); max-width: 480px; width: 100%; justify-self: center; }
.login-form form { display: grid; gap: 14px; }
.login-logo { width: 220px; max-width: 70%; height: auto; margin-bottom: 8px; }
.login-form h1 { font-size: 28px; }
.login-form input[type=email], .login-form input[type=password], .login-form input[type=text] { font: inherit; font-size: 15px; padding: 10px 12px; border-radius: 8px; border: 1px solid var(--line); background: var(--surface); color: var(--fg); width: 100%; }
.pw { position: relative; display: block; }
.pw .link { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); }
.btn.grande { padding: 11px 16px; font-size: 16px; }
.link { background: none; border: 0; color: var(--accent); cursor: pointer; font: inherit; font-size: 13.5px; padding: 0; justify-self: start; text-decoration: underline; text-underline-offset: 3px; }
.login-nota { font-size: 12px; color: var(--muted); border-top: 1px dashed var(--line); padding-top: 10px; }
.ok-msg { background: var(--good-soft); color: var(--fg); border-radius: 8px; padding: 10px 12px; font-size: 14px; }
.zh { display: grid; gap: 10px; border-top: 1px dashed var(--line); padding-top: 10px; }
.zh input[type=time] { font: inherit; padding: 5px 8px; border-radius: 6px; border: 1px solid var(--line); background: var(--surface); color: var(--fg); }
.gh { display: grid; gap: 3px; max-width: 720px; }
.gh-h, .gh-r { display: grid; grid-template-columns: 34px repeat(24, 1fr); gap: 2px; align-items: center; }
.gh-h span { font-size: 10.5px; color: var(--muted); }
.gh-d { font-size: 11.5px; color: var(--muted); }
.gh-c { height: 14px; border-radius: 2px; background: var(--line); }
.gh-c.on { background: var(--series); }
.prov { background: var(--warn-soft); border-radius: 6px; padding: 6px 10px; color: var(--fg); font-size: 13px; }
@media (max-width: 760px) { .login { grid-template-columns: 1fr; } .login-lado { min-height: 180px; padding: 28px 20px; } .login-lado::before { width: 300px; height: 300px; border-width: 40px; right: -90px; top: -110px; } }
.tvsom { display: flex; gap: 12px; flex-wrap: wrap; align-items: end; }
.tvsom input[type=range] { width: 160px; }
.editbox input[type=text], .editbox input[type=email], .editbox input[type=tel] { font: inherit; padding: 6px 8px; border-radius: 6px; border: 1px solid var(--line); background: var(--surface); color: var(--fg); }
.proto { margin-left: auto; }
/* modo TV */
body.modo-tv main { max-width: none; padding-block: 0; padding-inline: 0; }
.tv { min-height: 100vh; padding: 18px 22px; display: grid; gap: 16px; align-content: start; background: var(--bg); }
.tvhead { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.tvhead .brand { font-size: 22px; }
.tvclock { font-family: var(--font-display); font-size: clamp(20px, 2.4vw, 34px); font-weight: 600; }
.tvctl { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.tvctl .btn[aria-pressed="true"] { background: var(--good-soft); border-color: var(--good); color: var(--good); }
.tvgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 360px), 1fr)); gap: 16px; }
.tvcard { background: var(--surface); border: 1px solid var(--line); border-left: 8px solid var(--st); border-radius: 12px; padding: 18px 20px; display: grid; gap: 12px; }
.tvtop { display: flex; justify-content: space-between; gap: 10px; align-items: start; }
.tvtop .pill { font-size: 16px; padding: 4px 12px 4px 10px; }
.tvname { font-family: var(--font-display); font-weight: 700; font-size: clamp(22px, 2vw, 30px); line-height: 1.1; }
.tvwho { color: var(--muted); font-size: 16px; }
.tvvals { display: flex; gap: 28px; }
.tvv { font-family: var(--font-display); font-weight: 700; font-size: clamp(38px, 3.6vw, 56px); line-height: 1; }
.tvu { color: var(--muted); font-size: 16px; margin-left: 6px; }
.tvmsg { font-size: 16px; border-top: 1px dashed var(--line); padding-top: 10px; }
.tvalert { position: fixed; inset: 0; z-index: 30; background: rgba(120, 10, 10, .55); display: grid; place-items: center; padding: 24px; }
.tvalert-in { background: var(--surface); border: 6px solid var(--crit); border-radius: 16px; padding: 26px 30px; width: min(1100px, 100%); display: grid; gap: 16px; box-shadow: 0 20px 60px rgba(0,0,0,.4); }
@media (prefers-reduced-motion: no-preference) { .tvalert-in { animation: pulso 1.2s ease-in-out infinite alternate; } }
@keyframes pulso { from { border-color: var(--crit); } to { border-color: var(--serious); } }
.tvalert-t { font-family: var(--font-display); font-weight: 700; font-size: clamp(30px, 4vw, 56px); color: var(--crit); letter-spacing: .04em; }
.tvalert-row { display: grid; grid-template-columns: auto 1fr; gap: 16px; align-items: center; border-top: 1px solid var(--line); padding-top: 14px; }
.tvalert-row .pill { font-size: 16px; }
.tvalert-m { font-family: var(--font-display); font-weight: 700; font-size: clamp(24px, 2.6vw, 38px); }
.tvalert-m span { font-weight: 500; color: var(--muted); font-size: .7em; }
.tvalert-x { font-size: clamp(17px, 1.6vw, 24px); }
.tvalert-f { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; align-items: center; color: var(--muted); font-size: 14px; }
/* conta e usuários */
.fld { display: grid; gap: 4px; font-size: 13px; color: var(--muted); }
.fld input, .fld select, #conta input, #conta select, .editbox select, .regra-l input, .regra-l select, .panel select { font: inherit; padding: 6px 8px; border-radius: 6px; border: 1px solid var(--line); background: var(--surface); color: var(--fg); }
td.c, th.c { text-align: center; }
.grps { display: grid; gap: 8px; }
.grp { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; font-size: 13.5px; }
.grp b { min-width: 140px; }
.zap { background: #e7ddd3; border-radius: 10px; padding: 12px; }
.zap-b { background: #dcf8c6; color: #111; border-radius: 8px; padding: 8px 10px; font-size: 13.5px; max-width: 320px; line-height: 1.45; box-shadow: 0 1px 1px rgba(0,0,0,.12); }
.zap-l { color: #0b6bcb; }
.mail { border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; display: grid; gap: 2px; font-size: 13.5px; }
.role { display: inline-block; padding: 2px 9px; border-radius: 4px; font-family: var(--font-display); font-weight: 600; font-size: 12.5px; background: var(--accent-soft); color: var(--accent); }
.role.r-cliente { background: var(--surface-2); color: var(--fg); border: 1px solid var(--line); }
.role.r-painel { background: var(--idle-soft); color: var(--muted); }
.editrow td { background: var(--surface-2); }
.editbox { display: flex; gap: 18px; flex-wrap: wrap; align-items: start; padding: 6px 0; white-space: normal; }
.editbox .fld .sw { color: var(--fg); }
.toast { position: fixed; left: 50%; bottom: calc(20px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); background: var(--fg); color: var(--surface); padding: 10px 16px; border-radius: 8px; font-size: 13.5px; max-width: calc(100% - 32px); z-index: 20; }
.empty { color: var(--muted); padding: 20px; text-align: center; }
@media (prefers-reduced-motion: no-preference) { .mcard, .btn, .summary button { transition: border-color .15s, background .15s; } }

/* ---- sistema real ---- */
.carregando { color: var(--muted); padding: 30px; text-align: center; }
.wiz { display: grid; gap: 14px; }
.wiz-passos { display: flex; gap: 6px; flex-wrap: wrap; }
.wiz-passos span { font-family: var(--font-display); font-weight: 600; font-size: 13px; padding: 4px 10px; border-radius: 999px; background: var(--surface-2); color: var(--muted); }
.wiz-passos span.on { background: var(--accent); color: #fff; }
.wiz-passos span.ok { background: var(--good-soft); color: var(--good); }
.res-erp { display: grid; gap: 6px; }
.res-erp button { text-align: left; border: 1px solid var(--line); background: var(--surface); border-radius: 8px; padding: 8px 12px; cursor: pointer; display: grid; gap: 2px; }
.res-erp button:hover, .res-erp button[aria-pressed="true"] { border-color: var(--accent); background: var(--accent-soft); }
.form-g { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.form-g input, .form-g select, .wiz input, .wiz select { font: inherit; padding: 7px 9px; border-radius: 6px; border: 1px solid var(--line); background: var(--surface); color: var(--fg); width: 100%; }
.cfgbloco { display: grid; gap: 8px; }
.cfgbloco pre { margin: 0; background: var(--surface-2); border: 1px solid var(--line); border-radius: 8px; padding: 10px; overflow-x: auto; font-family: var(--font-mono); font-size: 12px; white-space: pre-wrap; word-break: break-all; }
.kvt { display: grid; grid-template-columns: max-content 1fr; gap: 4px 14px; font-size: 13.5px; }
.kvt dt { color: var(--muted); } .kvt dd { margin: 0; font-family: var(--font-mono); font-size: 12.5px; }
