/* Interface própria do ACS */
/* O atributo hidden vale sempre, mesmo quando a classe define display (ex.: .stack, .talk-acts) */
[hidden] { display: none !important; }
:root { --bg: #f3f3f4; --panel: #ffffff; --line: #dedee1; --line2: #b5b5ba; --tx: #1c1c1f; --tx2: #55555c; --accent: #3a3a40; --accent-soft: #e6e6e9; --btn: #3a3a40; --btn-tx: #ffffff; --ok: #13773f; --warn: #8a5300; --bad: #b3192f; --off: #62626a; color-scheme: light; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --bg: #111113; --panel: #1b1c1f; --line: #2c2d31; --line2: #4c4d53; --tx: #ededef; --tx2: #a6a7ad; --accent: #d6d7db; --accent-soft: #2b2c31; --btn: #d6d7db; --btn-tx: #18181b; --ok: #5bcf8c; --warn: #f0b651; --bad: #ff8593; --off: #9c9da4; color-scheme: dark; } }
:root[data-theme="dark"] { --bg: #111113; --panel: #1b1c1f; --line: #2c2d31; --line2: #4c4d53; --tx: #ededef; --tx2: #a6a7ad; --accent: #d6d7db; --accent-soft: #2b2c31; --btn: #d6d7db; --btn-tx: #18181b; --ok: #5bcf8c; --warn: #f0b651; --bad: #ff8593; --off: #9c9da4; color-scheme: dark; }
* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body { background: var(--bg); color: var(--tx); font: 15px/1.5 "Segoe UI", system-ui, -apple-system, Roboto, sans-serif; }
#app { display: flex; height: 100%; }
h1, h2, p, dl, dd { margin: 0; }
h1 { font-size: 1.5rem; font-weight: 650; line-height: 1.2; letter-spacing: -0.01em; overflow-wrap: anywhere; }
h2 { margin-bottom: 12px; font-size: 1rem; font-weight: 600; }
a { color: inherit; text-decoration: none; }
button, input, select { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.ic { flex: none; width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.dim { color: var(--tx2); }
.ok { color: var(--ok); } .warn { color: var(--warn); } .bad { color: var(--bad); }
.err { min-height: 1.5em; color: var(--bad); }
.err.ok { color: var(--ok); } .err.warn { color: var(--warn); } .err.dim { color: var(--tx2); }
.empty { padding: 64px 16px; color: var(--tx2); text-align: center; }
.note { margin-top: 16px; padding: 10px 14px; border-left: 3px solid var(--warn); background: var(--panel); color: var(--tx2); }

.side { position: relative; z-index: 20; display: flex; flex: none; flex-direction: column; gap: 4px; align-items: center; width: 64px; padding: 14px 0; border-right: 1px solid var(--line); background: var(--panel); }
.brand { display: block; margin-bottom: 12px; border-radius: 8px; }
.brand img { display: block; width: 34px; height: 34px; border-radius: 8px; }
.item { position: relative; display: grid; place-items: center; width: 44px; height: 44px; padding: 0; border: 0; border-radius: 10px; background: transparent; color: var(--tx2); cursor: pointer; }
.item:hover { background: var(--bg); color: var(--tx); }
.item.on { background: var(--accent-soft); color: var(--accent); }
/* Nome da tela: só ao passar o mouse ou chegar pelo teclado */
.item span { position: absolute; left: calc(100% + 12px); top: 50%; padding: 6px 12px; border: 1px solid var(--line2); border-radius: 8px; background: var(--panel); color: var(--tx); font-size: 0.875rem; font-weight: 500; white-space: nowrap; box-shadow: 0 4px 14px rgb(0 0 0 / 0.25); transform: translateY(-50%); visibility: hidden; pointer-events: none; }
.item:hover span, .item:focus-visible span { visibility: visible; }
.side .foot { display: flex; flex-direction: column; gap: 4px; margin-top: auto; padding-top: 10px; border-top: 1px solid var(--line); }
.main { flex: 1; min-width: 0; padding: 28px 32px; overflow-y: auto; outline: 0; }
.main:has(> .frame) { padding: 0; }
.frame { display: block; width: 100%; height: 100%; border: 0; }
.top { display: flex; flex-wrap: wrap; gap: 12px 24px; align-items: center; justify-content: space-between; }
.right { text-align: right; }
.back { display: inline-flex; gap: 6px; align-items: center; margin-bottom: 12px; color: var(--accent); }
.bar { display: flex; flex-wrap: wrap; gap: 12px; margin: 20px 0 16px; }
.bar input { flex: 1; min-width: 220px; }
input, select { min-height: 42px; padding: 0 12px; border: 1px solid var(--line2); border-radius: 8px; background: var(--panel); }
.chips { display: flex; gap: 8px; }
.chip { display: inline-flex; gap: 8px; align-items: center; min-height: 38px; padding: 0 14px; border: 1px solid var(--line); border-radius: 20px; background: var(--panel); cursor: pointer; }
.chip strong { font-variant-numeric: tabular-nums; }
.chip.on { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); }
.btn { min-height: 38px; padding: 0 14px; border: 1px solid var(--line2); border-radius: 8px; background: var(--panel); cursor: pointer; }
.btn:disabled { opacity: 0.45; cursor: default; }
.btn.primary { border-color: transparent; background: var(--btn); color: var(--btn-tx); font-weight: 600; }
.card { border: 1px solid var(--line); border-radius: 12px; background: var(--panel); }
.pad { padding: 18px 20px; }
.scroll { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
th { padding: 12px 16px; border-bottom: 1px solid var(--line); color: var(--tx2); font-size: 0.875rem; font-weight: 500; text-align: left; white-space: nowrap; }
td { padding: 12px 16px; border-bottom: 1px solid var(--line); overflow-wrap: anywhere; }
tbody tr:last-child td { border-bottom: 0; }
.pad th, .pad td { padding-inline: 8px; }
.sort { padding: 0; border: 0; background: transparent; color: inherit; cursor: pointer; }
.sort:hover { color: var(--tx); }
.name { display: flex; flex-direction: column; }
.name strong { color: var(--accent); font-weight: 600; }
.name:hover strong { text-decoration: underline; }
.name small { color: var(--tx2); }
.st { display: inline-flex; gap: 8px; align-items: center; white-space: nowrap; }
.st i { width: 9px; height: 9px; border-radius: 50%; background: currentColor; }
.st.off { color: var(--off); }
.st.off i { background: transparent; border: 2px solid currentColor; }
.pager { display: flex; gap: 12px; align-items: center; justify-content: flex-end; margin-top: 14px; }
.pager > :first-child { margin-right: auto; }
.tabs { display: flex; gap: 4px; margin: 22px 0 16px; overflow-x: auto; border-bottom: 1px solid var(--line); }
.tab { flex: none; min-height: 42px; padding: 0 14px; border: 0; border-bottom: 2px solid transparent; background: transparent; color: var(--tx2); cursor: pointer; }
.tab.on { border-color: var(--accent); color: var(--accent); font-weight: 600; }
.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.wide { grid-column: 1 / -1; min-width: 0; }
dl { display: grid; grid-template-columns: auto 1fr; gap: 8px 20px; }
dt { color: var(--tx2); }
dd { overflow-wrap: anywhere; }
.chart { display: block; width: 100%; height: auto; margin-top: 14px; }
.chart text { fill: var(--tx2); font-size: 11px; }
.chart .grid { stroke: var(--line); }
.chart .ln { fill: none; stroke: var(--accent); stroke-width: 2; }
.chart .pt { fill: var(--accent); }
.center { display: grid; flex: 1; place-items: center; padding: 16px; }
.login { display: flex; flex-direction: column; gap: 14px; width: min(380px, 100%); padding: 32px; border: 1px solid var(--line); border-radius: 16px; background: var(--panel); }
.login img { width: 56px; height: 56px; border-radius: 12px; }
.login label { display: flex; flex-direction: column; gap: 6px; }
.login .btn { min-height: 46px; }

@media (max-width: 860px) {
  #app { flex-direction: column; }
  .side { flex-direction: row; gap: 2px; width: auto; padding: 6px; overflow-x: auto; border-right: 0; border-bottom: 1px solid var(--line); }
  .brand { display: none; }
  .item { flex: 0 1 44px; min-width: 34px; }
  .item span { display: none; }
  .side .foot { flex-direction: row; margin: 0 0 0 auto; padding: 0; border: 0; }
  .main { padding: 18px 14px; }
  .grid2 { grid-template-columns: 1fr; }
}
@media (max-width: 620px) {
  .side { gap: 0; }
  thead { display: none; }
  tr { display: block; padding: 10px 14px; border-bottom: 1px solid var(--line); }
  tbody tr:last-child { border-bottom: 0; }
  td { display: flex; justify-content: space-between; gap: 16px; padding: 4px 0 !important; border: 0; text-align: right; }
  td::before { content: attr(data-label); flex: none; color: var(--tx2); }
  .name { align-items: flex-end; }
}

/* Início */
.main > .top + .grid2 { margin-top: 20px; }
h2.sub { margin: 22px 0 0; }
.bigs { display: flex; flex-wrap: wrap; gap: 12px 56px; }
.big { display: flex; flex-direction: column; }
.big strong { font-size: 2.5rem; font-weight: 650; line-height: 1.1; font-variant-numeric: tabular-nums; }
.big span { color: var(--tx2); }
.big.off strong { color: var(--off); }
a.big:hover span { text-decoration: underline; }
.bars, .rows { display: flex; flex-direction: column; gap: 12px; margin: 0; padding: 0; list-style: none; }
.lb { display: flex; gap: 16px; justify-content: space-between; margin-bottom: 4px; overflow-wrap: anywhere; }
.bg { height: 8px; border-radius: 4px; background: var(--bg); overflow: hidden; }
.bg i { display: block; height: 100%; border-radius: 4px; background: var(--accent); }
.rows { gap: 0; }
.rows li { display: flex; gap: 16px; justify-content: space-between; padding: 8px 0; border-bottom: 1px solid var(--line); }
.rows li:last-child { border-bottom: 0; }
.rows .nm { overflow-wrap: anywhere; }
a.nm { color: var(--accent); }
a.nm:hover { text-decoration: underline; }

/* Usuários, grupos e conta */
a.tab { display: inline-flex; align-items: center; }
.acts { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; }
td .acts { justify-content: flex-start; }
.field { display: flex; flex-direction: column; gap: 6px; }
.check { display: flex; gap: 10px; align-items: center; min-height: 36px; cursor: pointer; }
.check input { flex: none; width: 18px; min-height: 18px; height: 18px; margin: 0; accent-color: var(--accent); }
.btn.danger { border-color: transparent; background: #b3192f; color: #fff; font-weight: 600; }
.dlg { width: min(680px, calc(100vw - 24px)); max-height: calc(100dvh - 24px); padding: 0; border: 1px solid var(--line); border-radius: 14px; background: var(--panel); color: var(--tx); overflow: auto; }
.dlg::backdrop { background: rgb(0 0 0 / 0.55); }
.dlg form { display: flex; flex-direction: column; gap: 14px; padding: 24px; }
.dlg h2 { margin: 0; font-size: 1.25rem; }
.dlg form > .acts { position: sticky; bottom: 0; margin: 0 -24px -24px; padding: 14px 24px; border-top: 1px solid var(--line); background: var(--panel); }
.caps { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
fieldset { min-width: 0; margin: 0; padding: 8px 14px 10px; border: 1px solid var(--line); border-radius: 10px; }
legend { padding: 0 6px; font-weight: 600; }
.form { display: flex; flex-direction: column; gap: 14px; max-width: 420px; margin-top: 20px; }
@media (max-width: 620px) { .caps { grid-template-columns: 1fr; } td .acts { justify-content: flex-end; } }

/* Ações na ONT */
.ask { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; }
.ask .field { flex: 1; min-width: 220px; }
.slot { display: contents; }
.log { display: flex; flex-direction: column; margin: 0; padding: 0; list-style: none; }
.log li { padding: 10px 0; border-bottom: 1px solid var(--line); overflow-wrap: anywhere; }
.log li:last-child { border-bottom: 0; }
.stack { display: flex; flex-direction: column; gap: 14px; }

/* Sistema */
textarea { width: 100%; padding: 10px 12px; border: 1px solid var(--line2); border-radius: 8px; background: var(--panel); color: inherit; font: inherit; resize: vertical; }
.pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.pair input { width: 100%; }
.notes { margin: 0; padding-left: 20px; }
.pkg { display: flex; flex-direction: column; gap: 8px; padding-bottom: 14px; border-bottom: 1px solid var(--line); overflow-wrap: anywhere; }
.pkg:last-child { padding-bottom: 0; border-bottom: 0; }

/* Assistente */
.main.full { padding: 0; overflow: hidden; }
.ai { display: grid; grid-template-columns: 240px minmax(0, 1fr); height: 100%; }
.chats { display: flex; flex-direction: column; gap: 4px; padding: 20px 12px; border-right: 1px solid var(--line); overflow-y: auto; }
.chats > .btn { flex: none; margin-bottom: 10px; }
.row { display: flex; align-items: center; border-radius: 8px; }
.row:hover, .row.on { background: var(--panel); }
.chat, .x { border: 0; background: transparent; cursor: pointer; }
.chat { flex: 1; min-width: 0; min-height: 40px; padding: 0 10px; overflow: hidden; text-align: left; text-overflow: ellipsis; white-space: nowrap; }
.row.on .chat { color: var(--accent); font-weight: 600; }
.x { flex: none; width: 36px; height: 36px; color: var(--tx2); font-size: 1.125rem; }
.talk { display: flex; flex-direction: column; gap: 8px; min-width: 0; min-height: 0; padding: 0 32px 20px; }
/* Conversa na largura toda da área (antes 860 px no centro): tabelas de ONTs cabem sem quebrar */
.talk > * { width: 100%; max-width: none; margin-inline: auto; }
.msgs { display: flex; flex: 1; flex-direction: column; gap: 16px; min-height: 0; padding: 24px 0 8px; overflow-y: auto; }
.msg { overflow-wrap: anywhere; }
.msg.user { align-self: flex-end; max-width: 80%; padding: 10px 14px; border-radius: 14px; background: var(--accent-soft); white-space: pre-wrap; }
.msg.bot { display: flex; flex-direction: column; gap: 8px; }
.msg h3 { margin: 6px 0 0; font-size: 1.0625rem; }
.msg ul, .msg ol { margin: 0; padding-left: 22px; }
.msg pre { margin: 0; padding: 12px 14px; border: 1px solid var(--line); border-radius: 8px; background: var(--panel); overflow-x: auto; }
code { font-family: Consolas, "Cascadia Mono", monospace; font-size: 0.9em; }
.say { display: flex; gap: 10px; align-items: flex-end; }
.say textarea { flex: 1; resize: none; }
.say .btn { min-height: 46px; }
.talk .dim { font-size: 0.875rem; }
@media (max-width: 860px) {
  .ai { grid-template-columns: 1fr; grid-template-rows: auto minmax(0, 1fr); }
  .chats { flex-direction: row; padding: 8px 14px; border-right: 0; border-bottom: 1px solid var(--line); overflow-x: auto; }
  .chats > .btn { margin: 0; }
  .row { flex: none; max-width: 200px; }
  .talk { padding: 0 14px 12px; }
}

/* Rede */
.netbox { display: flex; flex-direction: column; height: 100%; }
.tabs.net { flex: none; margin: 0; padding: 6px 20px 0; }
.netbox .frame { flex: 1; min-height: 0; }

/* Painel da ONT */
:root { --accent2: #8a8a92; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --accent2: #74757d; } }
:root[data-theme="dark"] { --accent2: #74757d; }
.board { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; align-items: start; }
.col { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.strip { display: flex; flex-wrap: wrap; grid-column: 1 / -1; gap: 14px 40px; justify-content: space-between; padding: 16px 20px; }
.strip > div { display: flex; flex-direction: column; }
.strip strong { font-size: 1.25rem; font-weight: 650; font-variant-numeric: tabular-nums; white-space: nowrap; }
.strip .dim { font-size: 0.875rem; }
.board .chart { margin-top: 4px; }
.b1 { fill: var(--accent); } .b2 { fill: var(--accent2); }
.key { display: flex; gap: 8px; align-items: center; margin-top: 8px; color: var(--tx2); font-size: 0.875rem; }
.key i { width: 10px; height: 10px; border-radius: 3px; }
.key .k1 { background: var(--accent); } .key .k2 { margin-left: 10px; background: var(--accent2); }
.ports { display: grid; grid-template-columns: repeat(auto-fit, minmax(60px, 1fr)); gap: 12px 8px; margin: 0; padding: 14px 10px 12px; border: 1px solid color-mix(in srgb, var(--tx) 9%, transparent); border-radius: 12px; background: color-mix(in srgb, var(--tx) 3.5%, transparent); list-style: none; }
.ports li { display: flex; flex-direction: column; align-items: center; min-width: 0; color: var(--tx2); text-align: center; line-height: 1.3; }
.ports svg { width: 46px; height: 44px; margin-bottom: 6px; }
.ports strong { font-size: 0.8125rem; font-weight: 600; }
.ports span { font-size: 0.75rem; }
.ports .on strong { color: var(--tx); }
.p-box { fill: color-mix(in srgb, var(--tx) 10%, transparent); stroke: var(--line2); stroke-width: 1.2; }
.on .p-box { stroke: var(--accent); }
.p-hole { fill: var(--bg); stroke: color-mix(in srgb, var(--tx) 30%, transparent); stroke-width: 1; }
.p-edge { fill: none; stroke: color-mix(in srgb, var(--tx) 30%, transparent); stroke-width: 1; }
.p-plug { fill: var(--accent); }
.p-pin { stroke: color-mix(in srgb, var(--tx) 35%, transparent); stroke-width: 1.3; }
.p-pin.on { stroke: var(--bg); }
.p-led { fill: color-mix(in srgb, var(--tx) 18%, transparent); }
.p-led.on, .p-light { fill: var(--ok); }
.p-dark { fill: var(--tx2); }
.ports.old { opacity: 0.6; }
.rows li > div:first-child { display: flex; flex-direction: column; min-width: 0; overflow-wrap: anywhere; }
.sig .val { flex: none; width: 110px; text-align: right; }
.sig .bg { margin-top: 4px; }
.bg i.ok { background: var(--ok); } .bg i.warn { background: var(--warn); } .bg i.bad { background: var(--bad); }
.copy { padding: 0; border: 0; background: transparent; color: inherit; text-align: left; cursor: copy; overflow-wrap: anywhere; }
.copy:hover { color: var(--accent); text-decoration: underline; }
.copy.done::after { content: " copiado"; color: var(--ok); }
.refresh { display: flex; flex-direction: column; gap: 4px; align-items: flex-end; }
.path { overflow-wrap: anywhere; }
@media (max-width: 1300px) { .board { grid-template-columns: repeat(2, minmax(0, 1fr)); } .board .col:last-child { grid-column: 1 / -1; } }
@media (max-width: 860px) { .board { grid-template-columns: 1fr; } .strip { gap: 14px 24px; justify-content: flex-start; } .strip > div { min-width: 120px; } .right { text-align: left; } .refresh { align-items: flex-start; } }
.heads { display: flex; flex-wrap: wrap; gap: 8px 28px; align-items: center; }
.small { font-size: 0.8125rem; }

/* Início: boas-vindas e cartões translúcidos sobre luz fixa */
.main.home { --bg: #f3f4f5; --panel: rgb(255 255 255 / 0.62); --line: rgb(23 40 60 / 0.1); --line2: rgb(23 26 29 / 0.18); --tx: #171a1d; --tx2: #50565d; --accent: #0a7793; --accent-soft: rgb(10 119 147 / 0.12); --ok: #15803d; --track: rgb(23 26 29 / 0.1); --accent2: #6247b5; --off: #5d636a; --bar: rgb(255 255 255 / 0.88); --pop: #ffffff; --sky-a: rgb(112 196 234 / 0.6); --sky-b: rgb(158 172 248 / 0.5); --sky-c: rgb(120 216 170 / 0.14); padding: 0 24px 24px; color: var(--tx); background: radial-gradient(100% 130% at 14% -12%, var(--sky-a), transparent 72%), radial-gradient(80% 125% at 98% -8%, var(--sky-b), transparent 72%), radial-gradient(120% 70% at 70% 118%, var(--sky-c), transparent 75%), var(--bg); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .main.home { --bg: #111214; --panel: rgb(150 185 220 / 0.085); --line: rgb(200 225 255 / 0.13); --line2: rgb(236 239 241 / 0.16); --tx: #eceff1; --tx2: #a6abb2; --accent: #4fc3df; --accent-soft: rgb(79 195 223 / 0.14); --ok: #4cc38a; --track: rgb(236 239 241 / 0.1); --accent2: #a994f2; --off: #a6abb2; --bar: rgb(17 20 28 / 0.78); --pop: #1b1e24; --sky-a: rgb(14 92 140 / 0.62); --sky-b: rgb(30 40 140 / 0.55); --sky-c: rgb(0 110 74 / 0.11); } }
:root[data-theme="dark"] .main.home { --bg: #111214; --panel: rgb(150 185 220 / 0.085); --line: rgb(200 225 255 / 0.13); --line2: rgb(236 239 241 / 0.16); --tx: #eceff1; --tx2: #a6abb2; --accent: #4fc3df; --accent-soft: rgb(79 195 223 / 0.14); --ok: #4cc38a; --track: rgb(236 239 241 / 0.1); --accent2: #a994f2; --off: #a6abb2; --bar: rgb(17 20 28 / 0.78); --pop: #1b1e24; --sky-a: rgb(14 92 140 / 0.62); --sky-b: rgb(30 40 140 / 0.55); --sky-c: rgb(0 110 74 / 0.11); }
.home .card { border-radius: 18px; }
.home .bg { background: var(--track); }
.bg i.ok { background: var(--ok); }
.hero { position: relative; z-index: 5; display: flex; flex-direction: column; align-items: center; padding: 48px 8px 52px; text-align: center; }
.hero-date { margin-bottom: 8px; color: var(--tx2); font-size: 0.8125rem; font-weight: 500; }
.hero h1 { margin-bottom: 32px; font-size: clamp(1.75rem, 3vw, 2.25rem); font-weight: 600; letter-spacing: -0.02em; }
.hero-search { position: relative; z-index: 2; width: min(100%, 900px); }
.hero-bar { display: flex; gap: 12px; align-items: center; height: 60px; padding: 0 20px; border: 1px solid var(--line2); border-radius: 30px; background: var(--bar); cursor: text; }
.hero-bar:focus-within { border-color: var(--accent); }
.hero svg { flex: none; width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; color: var(--tx2); }
.hero-bar input { flex: 1; min-width: 0; min-height: 0; padding: 0; border: 0; outline: 0; background: transparent; text-overflow: ellipsis; }
.hero-bar input::placeholder { color: var(--tx2); opacity: 1; }
.hero-bar kbd { flex: none; padding: 2px 8px; border: 1px solid var(--line2); border-radius: 6px; color: var(--tx2); font: 500 0.6875rem "Segoe UI", sans-serif; }
.hero-list { position: absolute; top: 68px; inset-inline: 0; max-height: 340px; padding: 8px; border: 1px solid var(--line2); border-radius: 16px; background: var(--pop); box-shadow: 0 12px 32px rgb(0 0 0 / 0.28); text-align: left; overflow: auto; }
.hero-list[hidden] { display: none; }
.hero-note { padding: 8px 12px; color: var(--tx2); font-size: 0.875rem; }
.hero-item { display: flex; gap: 12px; align-items: center; min-height: 48px; padding: 6px 12px; border-radius: 8px; cursor: pointer; }
.hero-item[aria-selected="true"] { background: var(--accent-soft); }
.hero-item span { display: flex; flex-direction: column; min-width: 0; }
.hero-item strong, .hero-item small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hero-item strong { font-weight: 500; }
.hero-item small { color: var(--tx2); }
.hero-chips { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-top: 20px; }
.hero-chip { display: inline-flex; gap: 8px; align-items: center; min-height: 36px; padding: 0 16px; border: 1px solid var(--line2); border-radius: 18px; background: var(--bar); font-size: 0.8125rem; font-weight: 500; cursor: pointer; }
.hero-chip:hover { border-color: var(--accent); }
.homegrid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.homegrid .empty { grid-column: 1 / -1; }
.stat { display: flex; flex-direction: column; }
.stat-top { display: flex; gap: 16px; align-items: flex-end; justify-content: space-between; }
.stat-n { font-size: 3rem; font-weight: 600; line-height: 1; letter-spacing: -0.03em; }
.stat-top .right { display: flex; flex-direction: column; }
.stat-pct { color: var(--ok); font-size: 1.25rem; font-weight: 600; line-height: 1.2; }
.stat-bar { height: 8px; margin-top: 16px; border-radius: 4px; background: var(--track); overflow: hidden; }
.stat-bar i { display: block; height: 100%; border-radius: 4px; background: var(--ok); }
.stat-keys { display: flex; gap: 20px; margin-top: 10px; color: var(--tx2); font-size: 0.875rem; }
.stat-key { display: inline-flex; gap: 8px; align-items: center; }
.stat-key i { width: 8px; height: 8px; border-radius: 50%; background: var(--tx2); }
.stat-key.on i { background: var(--ok); }
.stat-key strong { color: var(--tx); }
a.stat-key:hover { text-decoration: underline; }
.stat-head { display: flex; gap: 12px; justify-content: space-between; margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line); font-size: 0.875rem; }
.stat-head span:last-child { text-align: right; }
.stat-plot { display: flex; height: 72px; margin-top: 10px; }
.stat-plot div { position: relative; flex: 1; }
.stat-plot div::before { content: ""; position: absolute; inset: 0 2px; border-radius: 3px; background: var(--track); }
.stat-plot .none::before { top: auto; height: 3px; }
.stat-plot i { position: absolute; inset: auto 2px 0; border-radius: 3px; background: var(--ok); }
.stat-axis { display: flex; justify-content: space-between; margin-top: 6px; color: var(--tx2); font-size: 0.75rem; }
@media (max-width: 1300px) { .homegrid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 860px) { .homegrid { grid-template-columns: 1fr; } .main.home { padding: 0 14px 18px; } .hero { padding-block: 32px; } .hero-bar kbd { display: none; } }

/* Dispositivos no estilo do Início */
.hero.short { padding: 36px 8px 32px; }
.hero.short h1 { margin-bottom: 24px; }
.hero.short .chips { flex-wrap: wrap; justify-content: center; }
.home .chip { min-height: 36px; border-color: var(--line2); background: var(--bar); font-size: 0.8125rem; font-weight: 500; }
.home .chip:hover { border-color: var(--accent); }
.home .chip.on { border-color: var(--accent); color: var(--accent); }
.home .hero-chips select { max-width: 220px; min-height: 36px; border-color: var(--line2); border-radius: 18px; background: var(--bar); font-size: 0.8125rem; font-weight: 500; }
.home select option { background: var(--pop); color: var(--tx); }
.home .pager .btn { border-radius: 18px; background: var(--bar); }
.home tbody tr:hover { background: var(--accent-soft); }
.home table { font-size: 0.9375rem; }

/* ONT no estilo do Início */
.off { color: var(--off); }
.main.ont { padding-top: 24px; }
.ont .top h1 { font-size: clamp(1.5rem, 2.4vw, 2rem); font-weight: 600; letter-spacing: -0.02em; }
.ont .btn { border-radius: 19px; background: var(--bar); border-color: var(--line2); font-size: 0.875rem; }
.ont .btn:hover:not(:disabled) { border-color: var(--accent); }
.ont .note { border-radius: 0 12px 12px 0; }
.ont input:not([type="checkbox"]) { border-color: var(--line2); border-radius: 21px; background: var(--bar); }
.ont .tabs { border-color: var(--line2); }

/* Cabeçalho da ONT */
.main.ont { padding-top: 16px; }
.ont-head { display: flex; gap: 12px; align-items: center; }
.ont-back { display: grid; flex: none; place-items: center; width: 34px; height: 34px; border: 1px solid var(--line2); border-radius: 50%; background: var(--bar); color: var(--tx2); }
.ont-back:hover { border-color: var(--accent); color: var(--accent); }
.ont-back .ic { width: 16px; height: 16px; }
.ont-id { flex: 1; min-width: 0; }
.ont-title { display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: center; }
.ont-title h1 { font-size: 1.25rem; font-weight: 600; }
.ont-pill { display: inline-flex; gap: 6px; align-items: center; padding: 1px 10px; border: 1px solid var(--line2); border-radius: 12px; background: var(--bar); color: var(--off); font-size: 0.75rem; font-weight: 600; }
.ont-pill.ok { color: var(--ok); }
.ont-pill i { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.ont-pill:not(.ok) i { background: transparent; border: 1.5px solid currentColor; }
.ont-meta { display: flex; flex-wrap: wrap; gap: 0 18px; margin-top: 2px; color: var(--tx2); font-size: 0.8125rem; }
.ont-meta .warn { color: var(--warn); }
.ont-acts { position: relative; display: flex; flex: none; gap: 8px; align-items: center; }
.ont-acts .btn { display: inline-flex; align-items: center; min-height: 32px; padding: 0 13px; border-radius: 16px; font-size: 0.8125rem; white-space: nowrap; }
.ont-acts .refresh { position: relative; }
.ont-acts .refresh small { position: absolute; top: calc(100% + 2px); right: 4px; font-size: 0.75rem; white-space: nowrap; }
.ont .tabs { margin: 12px 0 14px; }
.ont .tab { min-height: 38px; padding: 0 12px; font-size: 0.875rem; }
@media (max-width: 860px) { .ont-head { flex-wrap: wrap; } .ont-acts { flex-wrap: wrap; width: 100%; } .ont-acts .refresh { align-items: flex-start; } .ont-acts .refresh small { position: static; white-space: normal; } }

/* Mini gráficos da ONT */
.minis { display: grid; grid-column: 1 / -1; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 12px; }
.mini { display: flex; flex-direction: column; min-width: 0; padding: 12px 14px 10px; --tone: var(--accent); }
.mini.t-b { --tone: var(--accent2); } .mini.t-ok { --tone: var(--ok); }
.mini-l { color: var(--tx2); font-size: 0.8125rem; }
.mini strong { font-size: 1.1875rem; font-weight: 650; line-height: 1.35; font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mini-svg { display: block; width: 100%; height: 34px; margin: 6px 0 4px; overflow: visible; }
.mini-none { display: grid; place-items: center; height: 34px; margin: 6px 0 4px; color: var(--tx2); font-size: 0.75rem; }
.mini-line { fill: none; stroke: var(--tone); stroke-width: 1.75; vector-effect: non-scaling-stroke; stroke-linejoin: round; stroke-linecap: round; }
.mini-area { opacity: 1; }
.mini-svg .fade-top { stop-color: var(--tone); stop-opacity: 0.32; }
.mini-svg .fade-end { stop-color: var(--tone); stop-opacity: 0.03; }
.mini-bar { fill: var(--tone); opacity: 0.5; } .mini-bar.now { opacity: 1; }
.mini-empty, .mini-off { fill: var(--track, var(--line)); }
.mini-on { fill: var(--tone); }
.mini .hit { fill: transparent; } .mini .hit:hover { fill: var(--tx); fill-opacity: 0.12; }
.mini-f { color: var(--tx2); font-size: 0.75rem; line-height: 1.35; }
@media (max-width: 1200px) { .minis { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 620px) { .minis { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; } }

/* Cartões de texto: linhas e colunas suaves */
.card dl { --soft: color-mix(in srgb, var(--tx) 9%, transparent); grid-template-columns: minmax(92px, 34%) minmax(0, 1fr); gap: 0; border: 1px solid var(--soft); border-radius: 12px; overflow: hidden; font-size: 0.9375rem; }
.card dt, .card dd { padding: 7px 12px; border-bottom: 1px solid var(--soft); }
.card dt { border-right: 1px solid var(--soft); background: color-mix(in srgb, var(--tx) 3.5%, transparent); overflow-wrap: anywhere; }
.card dt:last-of-type, .card dd:last-of-type { border-bottom: 0; }

/* Atalhos da ONT */
.quick { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 4px; }
.qk { display: flex; flex-direction: column; gap: 8px; align-items: center; min-width: 0; padding: 6px 2px; border: 0; border-radius: 10px; background: transparent; color: var(--tx); font-size: 0.75rem; line-height: 1.25; text-align: center; cursor: pointer; }
.qi { display: grid; place-items: center; color: var(--accent); transition: transform 140ms ease; }
.qi svg { width: 32px; height: 32px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.qk:hover { color: var(--accent); }
.qk:hover .qi { transform: translateY(-2px); }
@media (prefers-reduced-motion: reduce) { .qi { transition: none; } .qk:hover .qi { transform: none; } }
.hint { outline: 2px solid var(--accent); outline-offset: 3px; }

/* Gráfico de linha */
/* Mesmo traço dos minigráficos dos cartões: linha fina, área suave e o trecho sem leitura em branco */
.chart .ln { stroke-width: 1.75; stroke-linejoin: round; stroke-linecap: round; }
.chart .area { opacity: 1; }
.chart .fade-top { stop-color: var(--accent); stop-opacity: 0.28; }
.chart .fade-end { stop-color: var(--accent); stop-opacity: 0.02; }
.chart .gap { display: none; }
.chart .hit { fill: transparent; cursor: crosshair; }
.chart .tip { pointer-events: none; }
.chart .cross { stroke: var(--tx2); stroke-width: 1; stroke-dasharray: 3 3; }
.chart .tb { fill: var(--pop, var(--panel)); stroke: var(--line2); }
.chart .tv { fill: var(--tx); font-weight: 600; }

/* ONT: botões e campos translúcidos */
.main.ont { --bar: rgb(255 255 255 / 0.4); }
:root[data-theme="dark"] .main.ont { --bar: rgb(255 255 255 / 0.07); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .main.ont { --bar: rgb(255 255 255 / 0.07); } }

/* Assistente da ONT: janela flutuante */
.dock { --panel: #ffffff; --line: rgb(23 40 60 / 0.12); --line2: rgb(23 26 29 / 0.16); --tx: #171a1d; --tx2: #454b52; --accent: #0a7793; --accent-soft: rgb(10 119 147 / 0.14); --ok: #15803d; --glass: rgb(244 248 251 / 0.8); --gl-a: rgb(112 196 234 / 0.45); --gl-b: rgb(158 172 248 / 0.42); --bar: rgb(255 255 255 / 0.5); --top: rgb(255 255 255 / 0.9); position: fixed; inset: 76px 22px 22px auto; z-index: 25; display: flex; flex-direction: column; gap: 10px; width: 400px; padding: 14px 16px 12px; border: 1px solid var(--line); border-radius: 20px; background: radial-gradient(120% 60% at 0% 0%, var(--gl-a), transparent 70%), radial-gradient(110% 55% at 100% 0%, var(--gl-b), transparent 70%), var(--glass); -webkit-backdrop-filter: blur(22px) saturate(1.2); backdrop-filter: blur(22px) saturate(1.2); box-shadow: inset 0 1px 0 var(--top), 0 18px 50px rgb(0 8 20 / 0.45); color: var(--tx); animation: dock-in 180ms cubic-bezier(0.23, 1, 0.32, 1); }
:root[data-theme="dark"] .dock { --panel: #1b1e24; --line: rgb(200 225 255 / 0.13); --line2: rgb(236 239 241 / 0.16); --tx: #eceff1; --tx2: #a6abb2; --accent: #4fc3df; --accent-soft: rgb(79 195 223 / 0.16); --ok: #4cc38a; --glass: rgb(16 22 34 / 0.72); --gl-a: rgb(14 92 140 / 0.5); --gl-b: rgb(40 44 150 / 0.45); --bar: rgb(255 255 255 / 0.07); --top: rgb(255 255 255 / 0.08); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .dock { --panel: #1b1e24; --line: rgb(200 225 255 / 0.13); --line2: rgb(236 239 241 / 0.16); --tx: #eceff1; --tx2: #a6abb2; --accent: #4fc3df; --accent-soft: rgb(79 195 223 / 0.16); --ok: #4cc38a; --glass: rgb(16 22 34 / 0.72); --gl-a: rgb(14 92 140 / 0.5); --gl-b: rgb(40 44 150 / 0.45); --bar: rgb(255 255 255 / 0.07); --top: rgb(255 255 255 / 0.08); } }
@keyframes dock-in { from { opacity: 0; transform: translateY(10px) scale(0.985); } }
@media (prefers-reduced-motion: reduce) { .dock { animation: none; } }
.dock-h { display: flex; gap: 8px; align-items: center; padding-bottom: 10px; border-bottom: 1px solid var(--line); }
.dock-h div { display: flex; flex: 1; flex-direction: column; min-width: 0; }
.dock-h strong { font-size: 1.0625rem; font-weight: 600; }
.dock-h small { color: var(--tx2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dock .btn { min-height: 32px; padding: 0 13px; border-color: var(--line2); border-radius: 16px; background: var(--bar); font-size: 0.8125rem; }
.dock .btn:hover { border-color: var(--accent); }
.dock .dock-x { width: 32px; padding: 0; font-size: 1.125rem; }
.dock .msgs { gap: 12px; padding: 4px 4px 4px 0; font-size: 0.9375rem; scrollbar-width: thin; }
.dock .msg.user { max-width: 90%; border-radius: 16px 16px 4px 16px; }
.dock .msg.bot { padding: 10px 14px; border: 1px solid var(--line); border-radius: 16px 16px 16px 4px; background: var(--bar); }
.dock .msg pre { background: var(--bar); }
.dock td, .dock th { padding: 6px 8px; }
.dock-tips { display: flex; flex-wrap: wrap; gap: 8px; }
.dock-acts { display: flex; flex-direction: column; gap: 6px; }
.dock-acts:empty { display: none; }
.dock-act { padding: 5px 12px; border-left: 2px solid var(--line2); color: var(--tx2); font-size: 0.8125rem; }
.dock-act.run { border-color: var(--accent); color: var(--tx); } .dock-act.ok { border-color: var(--ok); } .dock-act.error { border-color: var(--bad); }
.dock-ask { display: flex; flex-direction: column; gap: 8px; padding: 12px 14px; border: 1px solid var(--warn); border-radius: 14px; background: var(--bar); font-size: 0.875rem; }
.dock .err:empty { min-height: 0; }
.dock .say { align-items: center; padding: 5px 6px 5px 14px; border: 1px solid var(--line2); border-radius: 24px; background: var(--bar); }
.dock .say:focus-within { border-color: var(--accent); }
.dock .say textarea { min-height: 36px; padding: 7px 0; border: 0; border-radius: 0; outline: 0; background: transparent; line-height: 1.45; }
.dock .say textarea::placeholder { color: var(--tx2); opacity: 1; }
.dock .say .btn { align-self: flex-end; min-height: 36px; border-radius: 18px; }
.dock-n { color: var(--tx2); font-size: 0.6875rem; text-align: center; }
@media (max-width: 620px) { .dock { inset: auto 8px 8px; width: auto; height: 78vh; } }

/* Login */
.gatebg { --g-panel: rgb(255 255 255 / 0.68); --g-edge: rgb(255 255 255 / 0.7); --g-field: rgb(255 255 255 / 0.7); --g-fill: #f3f8f8; --g-line: rgb(20 33 44 / 0.5); --g-tx: #0d1a24; --g-tx2: #2b3842; --g-link: #005a20; --g-btn: rgb(0 110 37 / 0.84); --g-btn2: rgb(0 110 37 / 0.96); --g-err: #9b1026; position: relative; flex: 1; min-height: 100%; background: linear-gradient(rgb(3 18 43 / 0.42), rgb(3 18 43 / 0.42)), #03122b var(--art) left center / cover no-repeat; overflow: hidden; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .gatebg { --g-panel: rgb(4 20 34 / 0.38); --g-edge: rgb(255 255 255 / 0.16); --g-field: rgb(2 14 26 / 0.45); --g-fill: #07202f; --g-line: rgb(255 255 255 / 0.4); --g-tx: #f4f8f9; --g-tx2: #d3dee2; --g-link: #7fe3ae; --g-btn: rgb(0 150 60 / 0.46); --g-btn2: rgb(0 150 60 / 0.66); --g-err: #ffb3bd; } :root:not([data-theme="light"]) .gl-l { display: none; } :root:not([data-theme="light"]) .gl-d { display: block; } }
:root[data-theme="dark"] .gatebg { --g-panel: rgb(4 20 34 / 0.38); --g-edge: rgb(255 255 255 / 0.16); --g-field: rgb(2 14 26 / 0.45); --g-fill: #07202f; --g-line: rgb(255 255 255 / 0.4); --g-tx: #f4f8f9; --g-tx2: #d3dee2; --g-link: #7fe3ae; --g-btn: rgb(0 150 60 / 0.46); --g-btn2: rgb(0 150 60 / 0.66); --g-err: #ffb3bd; }
.gate { position: absolute; inset: 50% clamp(24px, 4vw, 72px) auto auto; display: flex; flex-direction: column; width: 432px; max-width: calc(100% - 32px); min-height: min(660px, calc(100% - 32px)); max-height: calc(100% - 32px); padding: 28px 36px 32px; border: 1px solid var(--g-edge); border-radius: 28px; background: var(--g-panel); -webkit-backdrop-filter: blur(18px) saturate(1.2); backdrop-filter: blur(18px) saturate(1.2); box-shadow: 0 24px 64px rgb(0 10 24 / 0.35); color: var(--g-tx); transform: translateY(-50%); overflow: hidden auto; scrollbar-width: thin; }
.gate-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 44px; }
.gate-top img { width: 126px; }
.gl-d { display: none; }
:root[data-theme="dark"] .gl-d { display: block; filter: brightness(1.35); } :root[data-theme="dark"] .gl-l { display: none; }
:root[data-theme="light"] .gl-l { display: block; } :root[data-theme="light"] .gl-d { display: none; }
.gate-th { display: grid; place-items: center; width: 34px; height: 34px; border: 1px solid var(--g-edge); border-radius: 50%; background: var(--g-field); color: var(--g-tx); cursor: pointer; }
.gate-th .ic { width: 17px; height: 17px; }
.gate h1 { font-size: 1.75rem; font-weight: 600; letter-spacing: -0.02em; }
.gate-p { margin: 18px 0 40px; color: var(--g-tx2); font-size: 0.875rem; }
.gate a { color: var(--g-link); }
.gate a:hover { text-decoration: underline; }
.gate-f { display: flex; flex-direction: column; gap: 6px; margin-bottom: 18px; font-size: 0.875rem; font-weight: 500; }
.gate-f input { width: 100%; height: 48px; padding: 0 14px; border: 1px solid var(--g-line); border-radius: 14px; outline: 0; background: var(--g-field); color: var(--g-tx); font-weight: 400; }
.gate-f input:focus { border-color: var(--g-link); box-shadow: 0 0 0 1px var(--g-link); }
.gate-f input::placeholder { color: var(--g-tx2); opacity: 1; }
.gate-f input:-webkit-autofill { -webkit-text-fill-color: var(--g-tx); caret-color: var(--g-tx); box-shadow: 0 0 0 40px var(--g-fill) inset; }
.gate-pw { position: relative; display: block; }
.gate-pw input { padding-right: 48px; }
.gate-eye { position: absolute; inset: 0 4px 0 auto; display: grid; place-items: center; width: 42px; border: 0; background: transparent; color: var(--g-tx2); cursor: pointer; }
.gate-k { display: flex; gap: 8px; align-items: center; color: var(--g-tx2); font-size: 0.8125rem; cursor: pointer; }
.gate-k input { width: 16px; height: 16px; min-height: 0; margin: 0; accent-color: #00802b; }
.gate .err { min-height: 1.5em; margin: 8px 0; color: var(--g-err); font-size: 0.875rem; }
.gate-go { min-height: 48px; border: 1px solid rgb(127 227 174 / 0.5); border-radius: 14px; background: var(--g-btn); color: #fff; font-size: 0.9375rem; font-weight: 600; cursor: pointer; }
.gate-go:hover { background: var(--g-btn2); }
.gate-go:disabled { opacity: 0.6; cursor: default; }
.gate-l { margin-top: 22px; font-size: 0.875rem; text-align: center; }
.gate :focus-visible:not(input) { outline-color: var(--g-link); }
@media (max-width: 1080px), (max-aspect-ratio: 5/4) { .gatebg { background-position: 72% center; } .gate { inset: 50% auto auto 50%; transform: translate(-50%, -50%); } }
@media (max-width: 480px) { .gate { padding-inline: 26px; } .gate-p { margin-bottom: 30px; } }

/* Card Wi-Fi: uma coluna por faixa */
.wf { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); }
.wf-col { min-width: 0; --tone: var(--accent); }
.wf-col.five { --tone: var(--accent2); }
.wf-col:not(:first-child) { padding-left: 18px; border-left: 1px solid color-mix(in srgb, var(--tx) 14%, transparent); }
.wf-col:not(:last-child) { padding-right: 18px; }
.wf-h { display: flex; gap: 10px; align-items: center; color: var(--tx2); font-size: 0.8125rem; font-weight: 600; }
.wf-i { color: var(--tone); }
.wf-i svg { display: block; width: 32px; height: 32px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.wf-n { margin-top: 10px; }
.wf-n + .wf-n { padding-top: 10px; border-top: 1px solid color-mix(in srgb, var(--tx) 9%, transparent); }
.wf-n strong { display: block; margin-bottom: 4px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wf-n p { display: flex; gap: 8px; justify-content: space-between; padding: 3px 0; color: var(--tx2); font-size: 0.8125rem; }
.wf-n b { color: var(--tx); font-weight: 500; text-align: right; }

/* Consumo em linhas */
.u1 { --tone: var(--accent); } .u2 { --tone: var(--accent2); }
.u-ln { fill: none; stroke: var(--tone); stroke-width: 2.25; stroke-linejoin: round; stroke-linecap: round; }
.u-area { fill: var(--tone); opacity: 0.1; }
.u-gap { fill: none; stroke: var(--tone); stroke-width: 1.5; stroke-dasharray: 2 6; stroke-linecap: round; opacity: 0.45; }
.u-pt { fill: var(--tone); }
.u-pt.open { fill: var(--pop, var(--panel)); stroke: var(--tone); stroke-width: 2; }

/* Botão com ícone */
.with-ic { display: inline-flex; gap: 8px; align-items: center; }
.with-ic svg { flex: none; width: 16px; height: 16px; fill: none; stroke: var(--accent); stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }

/* Janelas no estilo do Início */
.dlg { --panel: #ffffff; --line: rgb(23 40 60 / 0.12); --line2: rgb(23 26 29 / 0.18); --tx: #171a1d; --tx2: #454b52; --accent: #0a7793; --accent-soft: rgb(10 119 147 / 0.14); --glass: rgb(244 248 251 / 0.9); --gl-a: rgb(112 196 234 / 0.45); --gl-b: rgb(158 172 248 / 0.42); --bar: rgb(255 255 255 / 0.55); --top: rgb(255 255 255 / 0.9); --foot: rgb(244 248 251 / 0.95); border-radius: 20px; background: radial-gradient(90% 70% at 0% 0%, var(--gl-a), transparent 70%), radial-gradient(90% 70% at 100% 0%, var(--gl-b), transparent 70%), var(--glass); -webkit-backdrop-filter: blur(22px) saturate(1.2); backdrop-filter: blur(22px) saturate(1.2); box-shadow: inset 0 1px 0 var(--top), 0 24px 64px rgb(0 8 20 / 0.5); scrollbar-width: thin; }
:root[data-theme="dark"] .dlg { --panel: #1b1e24; --line: rgb(200 225 255 / 0.13); --line2: rgb(236 239 241 / 0.18); --tx: #eceff1; --tx2: #a6abb2; --accent: #4fc3df; --accent-soft: rgb(79 195 223 / 0.16); --glass: rgb(16 22 34 / 0.86); --gl-a: rgb(14 92 140 / 0.5); --gl-b: rgb(40 44 150 / 0.45); --bar: rgb(255 255 255 / 0.07); --top: rgb(255 255 255 / 0.08); --foot: rgb(20 26 38 / 0.92); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .dlg { --panel: #1b1e24; --line: rgb(200 225 255 / 0.13); --line2: rgb(236 239 241 / 0.18); --tx: #eceff1; --tx2: #a6abb2; --accent: #4fc3df; --accent-soft: rgb(79 195 223 / 0.16); --glass: rgb(16 22 34 / 0.86); --gl-a: rgb(14 92 140 / 0.5); --gl-b: rgb(40 44 150 / 0.45); --bar: rgb(255 255 255 / 0.07); --top: rgb(255 255 255 / 0.08); --foot: rgb(20 26 38 / 0.92); } }
.dlg::backdrop { background: rgb(3 10 20 / 0.5); }
.dlg h2 { font-weight: 600; letter-spacing: -0.01em; }
.dlg input:not([type="checkbox"]), .dlg select { height: 44px; padding: 0 16px; border-color: var(--line2); border-radius: 22px; background: var(--bar); outline: 0; }
.dlg input:not([type="checkbox"]):focus, .dlg select:focus { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.dlg select option { background: var(--panel); color: var(--tx); }
.dlg .field small { padding-left: 4px; }
.dlg .err:empty { min-height: 0; }
.dlg form > .acts { background: var(--foot); border-radius: 0 0 20px 20px; }
.dlg .btn { border-radius: 20px; border-color: var(--line2); background: var(--bar); }
.dlg .btn:hover:not(:disabled) { border-color: var(--accent); }
.dlg .btn.primary { border-color: var(--accent); background: var(--accent-soft); color: var(--tx); }
.dlg .btn.danger { border-color: transparent; background: #b3192f; color: #fff; }
.dlg fieldset { border-radius: 14px; background: color-mix(in srgb, var(--tx) 3%, transparent); }

/* Redes: criar, ativar e desativar */
.nets { display: flex; flex-wrap: wrap; gap: 10px; }
.net { display: inline-flex; gap: 4px; align-items: center; }
.net-n { padding: 0 10px; }
.net .with-ic:not(.off) { border-radius: 19px 8px 8px 19px; }
.net .off { width: 40px; padding: 0; justify-content: center; border-radius: 8px 19px 19px 8px; }
.with-ic.off svg { stroke: var(--bad); } .with-ic.on svg { stroke: var(--ok); }
.with-ic.off:hover:not(:disabled) { border-color: var(--bad); }
.with-ic.new { border-style: dashed; }

/* Alterações na lateral */
.wl { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 16px; align-items: start; }
.wl:has(> .wl-side:empty) { grid-template-columns: minmax(0, 1fr); }
.wl-side { position: sticky; top: 0; min-width: 0; }
.wl-side .card { display: flex; flex-direction: column; max-height: calc(100dvh - 40px); }
.tl { margin: 0; padding: 0 4px 0 0; list-style: none; overflow-y: auto; scrollbar-width: thin; }
.tl li { position: relative; padding: 0 0 18px 20px; font-size: 0.875rem; overflow-wrap: anywhere; }
.tl li::before { content: ""; position: absolute; left: 4px; top: 14px; bottom: -6px; width: 1px; background: color-mix(in srgb, var(--tx) 16%, transparent); }
.tl li:last-child { padding-bottom: 0; }
.tl li:last-child::before { display: none; }
.tl li::after { content: ""; position: absolute; left: 0; top: 6px; width: 9px; height: 9px; border-radius: 50%; background: currentColor; }
.tl-w { color: var(--tx); }
.tl-w::first-letter { text-transform: uppercase; }
.tl small { display: block; margin-top: 2px; }
@media (max-width: 1100px) { .wl { grid-template-columns: minmax(0, 1fr); } .wl-side { position: static; } .wl-side .card { max-height: 420px; } }

/* Dispositivos: busca e filtros translúcidos */
.hero.short, .hero.short ~ div .pager { --bar: rgb(255 255 255 / 0.45); }
:root[data-theme="dark"] .hero.short, :root[data-theme="dark"] .hero.short ~ div .pager { --bar: rgb(255 255 255 / 0.07); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) :is(.hero.short, .hero.short ~ div .pager) { --bar: rgb(255 255 255 / 0.07); } }

/* Dispositivos: escala menor */
.hero.short { padding: 22px 8px 20px; }
.hero.short h1 { margin-bottom: 14px; font-size: 1.5rem; }
.hero.short .hero-date { margin-bottom: 2px; font-size: 0.75rem; }
.hero.short .hero-search { width: min(100%, 720px); }
.hero.short .hero-bar { height: 46px; padding: 0 16px; border-radius: 23px; }
.hero.short .hero-bar input { font-size: 0.875rem; }
.hero.short svg { width: 16px; height: 16px; }
.hero.short .hero-chips { gap: 6px; margin-top: 12px; }
.hero.short .chips { gap: 6px; }
.hero.short .chip, .hero.short .hero-chips select { min-height: 30px; padding: 0 12px; border-radius: 15px; font-size: 0.75rem; }
.hero.short ~ div table { font-size: 0.875rem; }
.hero.short ~ div th { padding: 9px 14px; font-size: 0.8125rem; }
.hero.short ~ div td { padding: 8px 14px; }
.hero.short ~ div .name small { font-size: 0.75rem; }
.hero.short ~ div .st i { width: 8px; height: 8px; }
.hero.short ~ div .pager { gap: 10px; margin-top: 10px; font-size: 0.8125rem; }
.hero.short ~ div .pager .btn { min-height: 30px; padding: 0 11px; }
@media (max-width: 620px) { .hero.short ~ div td { padding: 3px 0; } }

/* Reinícios em colunas */
.cols { display: flex; flex-direction: column; gap: 10px; }
.cols-p { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 8px; }
.cols-c { display: flex; flex-direction: column; gap: 5px; align-items: center; min-width: 0; }
.cols-c strong { min-height: 1.5em; line-height: 1.5; font-size: 0.8125rem; font-weight: 600; font-variant-numeric: tabular-nums; }
.cols-b { display: flex; align-items: flex-end; justify-content: center; width: 100%; height: 110px; border-radius: 8px; background: color-mix(in srgb, var(--tx) 5%, transparent); overflow: hidden; }
.cols-b i { display: block; width: 100%; border-radius: 8px 8px 0 0; background: var(--accent); opacity: 0.65; }
.cols-c.now i, .cols-c:hover i { opacity: 1; }
.cols-c.none .cols-b { background: repeating-linear-gradient(135deg, color-mix(in srgb, var(--tx) 6%, transparent) 0 4px, transparent 4px 9px); }
.cols-c.none i { display: none; }
.cols-c small { color: var(--tx2); font-size: 0.75rem; }
.cols-c.now small { color: var(--tx); font-weight: 600; }

/* Engrenagem do cartão */
.with-gear { position: relative; }
.with-gear h2 { padding-right: 40px; }
.gear { position: absolute; top: 12px; right: 12px; display: grid; place-items: center; width: 32px; height: 32px; border: 1px solid transparent; border-radius: 50%; background: transparent; color: var(--tx2); cursor: pointer; }
.gear:hover { border-color: var(--line2); color: var(--accent); }
.gear svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linejoin: round; }

/* Topologia da rede da casa */
.topo { margin-top: 12px; overflow-x: auto; }
.topo-h { display: flex; flex-direction: column; align-items: center; }
.topo-n { display: inline-flex; gap: 10px; align-items: center; max-width: 100%; padding: 8px 14px; border: 1px solid color-mix(in srgb, var(--tx) 14%, transparent); border-radius: 14px; background: color-mix(in srgb, var(--tx) 4%, transparent); }
.topo-n svg { flex: none; width: 22px; height: 22px; fill: none; stroke: var(--tone, var(--tx2)); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.topo-n > div { display: flex; flex-direction: column; min-width: 0; line-height: 1.25; }
.topo-n strong { font-size: 0.875rem; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.topo-n small { color: var(--tx2); font-size: 0.75rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.topo-n.net { --tone: var(--off); } .topo-n.net.on { --tone: var(--ok); }
.topo-n.ont { --tone: var(--accent); border-color: var(--accent); }
.topo-v { width: 2px; height: 18px; background: color-mix(in srgb, var(--tx) 22%, transparent); }
.topo-l { display: block; width: 100%; height: 44px; }
.topo-l path { fill: none; stroke-width: 2; vector-effect: non-scaling-stroke; opacity: 0.7; }
.topo .lan { --tone: var(--ok); } .topo .two { --tone: var(--accent); } .topo .five { --tone: var(--accent2); }
.topo-l path { stroke: var(--tone); }
.topo-cols { display: grid; gap: 12px; align-items: start; }
.topo-c { display: flex; flex-direction: column; align-items: center; min-width: 0; }
.topo-c > .topo-n { border-color: color-mix(in srgb, var(--tone) 55%, transparent); }
.topo-c ul { position: relative; display: flex; flex-direction: column; gap: 6px; width: 100%; margin: 0; padding: 12px 0 0; list-style: none; }
.topo-d { display: flex; gap: 8px; align-items: center; width: 100%; padding: 6px 10px; border: 1px solid color-mix(in srgb, var(--tx) 9%, transparent); border-left: 2px solid var(--tone); border-radius: 10px; background: color-mix(in srgb, var(--tx) 3%, transparent); text-align: left; cursor: pointer; }
.topo-d:hover { border-color: var(--tone); }
.topo-d > i { flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--tx2); }
.topo-d > i.ok { background: var(--ok); } .topo-d > i.warn { background: var(--warn); } .topo-d > i.bad { background: var(--bad); }
.topo-d span { display: flex; flex: 1; flex-direction: column; min-width: 0; line-height: 1.25; }
.topo-d strong { font-size: 0.8125rem; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.topo-d small { color: var(--tx2); font-size: 0.6875rem; }
.topo-d em { font-size: 0.75rem; font-style: normal; font-variant-numeric: tabular-nums; }
.topo-d.blocked { border-left-color: var(--bad); opacity: 0.65; }
.topo-d.blocked strong { text-decoration: line-through; }
.err.wide:empty { display: none; }
td .with-ic { min-height: 30px; padding: 0 12px; font-size: 0.8125rem; }
.dlg dl { width: 100%; }
.dlg dl { --soft: color-mix(in srgb, var(--tx) 10%, transparent); grid-template-columns: minmax(92px, 34%) minmax(0, 1fr); gap: 0; border: 1px solid var(--soft); border-radius: 12px; overflow: hidden; }
.dlg dt, .dlg dd { padding: 7px 12px; border-bottom: 1px solid var(--soft); }
.dlg dt:last-of-type, .dlg dd:last-of-type { border-bottom: 0; }

/* Sincronizar */
.ont-acts .btn.sync { gap: 7px; }
.btn.sync .ic { width: 15px; height: 15px; }
.btn.sync.spin { opacity: 1; border-color: var(--accent); color: var(--accent); }
.ring { position: relative; flex: none; width: 15px; height: 15px; border: 1.5px solid color-mix(in srgb, currentColor 35%, transparent); border-radius: 50%; animation: turn 1s linear infinite; }
.ring::after { content: ''; position: absolute; top: -3.75px; left: 50%; width: 6px; height: 6px; margin-left: -3px; border-radius: 50%; background: currentColor; }
@keyframes turn { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .ring { animation-duration: 4s; } }

/* Redes próximas */
.nb-top { display: flex; flex-wrap: wrap; gap: 12px 20px; align-items: center; }
.nb-facts { display: flex; flex-wrap: wrap; gap: 8px 28px; margin-left: auto; }
.nb-facts > div { display: flex; gap: 8px; align-items: baseline; }
.nb-facts strong { font-size: 1.25rem; font-weight: 650; font-variant-numeric: tabular-nums; }
.nb-facts span { font-size: 0.8125rem; }
.chs { margin-top: 4px; }
.ch-b { fill: var(--accent); opacity: 0.7; }
.ch-own { fill: color-mix(in srgb, var(--ok) 13%, transparent); }
.chart .ch-me { fill: var(--ok); font-weight: 600; }
.ch-l { fill: none; stroke: var(--accent2); stroke-width: 2.25; stroke-linejoin: round; stroke-linecap: round; }
.ch-d { fill: var(--accent2); stroke: var(--pop, var(--panel)); stroke-width: 1.5; }
.chart .ch-s { fill: var(--accent2); }
.ch-hit { fill: transparent; } .ch-hit:hover { fill: var(--tx); fill-opacity: 0.06; }
.ch-tip { min-height: 3em; margin-top: 8px; color: var(--tx2); font-size: 0.8125rem; overflow-wrap: anywhere; }
.nb-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.nb-chips .chip { min-height: 32px; padding: 0 13px; border-radius: 16px; }
.nb-n { display: flex; flex-wrap: wrap; gap: 4px 8px; align-items: center; }
.nb-tag { padding: 1px 8px; border: 1px solid color-mix(in srgb, var(--warn) 55%, transparent); border-radius: 10px; color: var(--warn); font-size: 0.6875rem; }
.nb-s { min-width: 110px; }
.nb-s .bg { height: 5px; margin-top: 3px; }
@media (max-width: 620px) { .nb-facts { margin-left: 0; } .nb-n { justify-content: flex-end; } }

/* Testes */
.tests { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 330px), 1fr)); gap: 16px; align-items: start; }
.tests > .wide, .tests .wide { grid-column: 1 / -1; }
.tcard { display: flex; flex-direction: column; gap: 14px; min-width: 0; min-height: 300px; }
.tcard.run { border-color: color-mix(in srgb, var(--accent) 60%, transparent); }
.thead { display: flex; gap: 10px; align-items: center; }
.thead svg { width: 24px; height: 24px; flex: none; fill: none; stroke: var(--accent); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.thead h2 { margin: 0; flex: 1; }
.tbadge { padding: 2px 10px; border: 1px solid currentColor; border-radius: 11px; font-size: 0.75rem; white-space: nowrap; }
.tform { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.tform input, .tform > span { flex: 1; min-width: 150px; }
.tform input { min-height: 38px; }
.tform input:read-only { opacity: 0.6; }
.tcard .err:empty { display: none; }
.tout { display: flex; flex-direction: column; gap: 14px; flex: 1; }
.tnone { margin: auto; }
.tgo { display: flex; justify-content: space-between; gap: 12px; }
.tclock { font-variant-numeric: tabular-nums; white-space: nowrap; }
.tbar { position: relative; height: 5px; border-radius: 3px; background: var(--track, var(--bg)); overflow: hidden; }
.tbar::after { content: ''; position: absolute; inset: 0 auto 0 0; width: 35%; border-radius: 3px; background: var(--accent); animation: tgo 1.4s ease-in-out infinite; }
@keyframes tgo { from { transform: translateX(-100%); } to { transform: translateX(290%); } }
.tsteps { display: grid; grid-template-columns: repeat(4, 1fr); margin: 4px 0 0; padding: 0; list-style: none; color: var(--tx2); font-size: 0.75rem; text-align: center; }
.tsteps li { position: relative; padding: 20px 2px 0; }
.tsteps li::before { content: ''; position: absolute; z-index: 1; top: 2px; left: 50%; width: 10px; height: 10px; margin-left: -6px; border: 2px solid var(--line2); border-radius: 50%; }
.tsteps li + li::after { content: ''; position: absolute; top: 8px; right: calc(50% + 10px); width: calc(100% - 20px); height: 2px; background: var(--line2); }
.tsteps .done::before { border-color: var(--ok); background: var(--ok); } .tsteps .done + li::after { background: var(--ok); }
.tsteps .now { color: var(--tx); font-weight: 600; }
.tsteps .now::before { border-color: var(--accent); background: var(--accent); animation: tnow 1.2s ease-in-out infinite alternate; }
@keyframes tnow { to { opacity: 0.35; } }
.tres { display: flex; flex-direction: column; gap: 14px; }
.tres + .tres { padding-top: 14px; border-top: 1px solid var(--line); }
.thost { overflow-wrap: anywhere; }
.tbig > div strong { font-size: 2.25rem; font-weight: 650; line-height: 1.1; font-variant-numeric: tabular-nums; }
.tbig > span { display: block; font-size: 0.8125rem; }
.ttwo { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.tok > div:first-child { display: flex; justify-content: space-between; margin-bottom: 6px; }
.tok .bg { height: 6px; }
.tfacts { display: grid; grid-template-columns: repeat(3, 1fr); border: 1px solid color-mix(in srgb, var(--tx) 9%, transparent); border-radius: 12px; }
.tfacts > div { display: flex; flex-direction: column; gap: 2px; padding: 9px 12px; font-variant-numeric: tabular-nums; }
.tfacts > div + div { border-left: 1px solid color-mix(in srgb, var(--tx) 9%, transparent); }
.tfacts span { font-size: 0.75rem; }
.thops { display: flex; flex-direction: column; gap: 10px; margin: 0; padding: 0; list-style: none; font-size: 0.875rem; }
.thops li { display: grid; grid-template-columns: 22px minmax(0, 1fr); gap: 8px; }
.thops b { color: var(--tx2); font-weight: 500; text-align: right; }
.thops .none { color: var(--tx2); }
.thop { display: flex; justify-content: space-between; gap: 10px; overflow-wrap: anywhere; }
.thop strong { white-space: nowrap; font-weight: 600; font-variant-numeric: tabular-nums; }
.thops .bg { height: 4px; margin-top: 4px; }
.tfoot { margin-top: auto; font-size: 0.8125rem; }
@media (prefers-reduced-motion: reduce) { .tbar::after { animation-duration: 5s; } .tsteps .now::before { animation: none; } }
.tact { display: flex; flex-direction: column; gap: 14px; }
.tsup { display: flex; flex-direction: column; gap: 12px; overflow-wrap: anywhere; }
.tsup .tfacts { grid-template-columns: 1fr 1fr; }
.tway { display: flex; flex-direction: column; gap: 4px; min-width: 0; padding: 14px; border: 1px solid color-mix(in srgb, var(--tx) 9%, transparent); border-radius: 12px; overflow-wrap: anywhere; }
.tway.now { border-color: var(--accent); }
.tdir { color: var(--tx2); font-size: 0.875rem; }
.tval strong { font-size: 2rem; font-weight: 650; line-height: 1.15; font-variant-numeric: tabular-nums; }
.tway small { font-size: 0.75rem; }
.tsup { padding-top: 12px; border-top: 1px solid var(--line); gap: 8px; font-size: 0.8125rem; }
.tsl { display: flex; flex-wrap: wrap; gap: 6px 16px; align-items: center; }
.tsl i { display: inline-block; width: 8px; height: 8px; margin-right: 7px; border-radius: 50%; background: currentColor; }
.tlink { margin-left: auto; padding: 4px 0; border: 0; background: transparent; color: var(--accent); cursor: pointer; }
.tlink:hover { text-decoration: underline; } .tlink:disabled { opacity: 0.5; }

/* Aparelhos: lista e contagem lado a lado */
.ap-pair { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(0, 1fr); gap: 16px; }
.ap-pair > .card { display: flex; flex-direction: column; height: 620px; min-width: 0; }
.ap-in { display: flex; flex: 1; flex-direction: column; gap: 12px; min-height: 0; }
.ap-in > div:last-child { flex: 1; min-height: 0; overflow: auto; }
.with-ic.free svg { stroke: var(--ok); }
.ap-list .scroll { overflow: visible; }
.ap-list thead th { position: sticky; z-index: 1; top: 0; background: var(--pop, var(--panel)); }
.ap-list th, .ap-list td { padding-block: 7px; font-size: 0.875rem; }
.ap-list .btn { min-height: 30px; padding: 0 10px; font-size: 0.8125rem; }
.ap-n { display: flex; flex-direction: column; line-height: 1.35; }
.ap-n small { font-size: 0.75rem; font-variant-numeric: tabular-nums; white-space: pre-wrap; }
.ap-c { display: flex; flex: 1; flex-direction: column; gap: 12px; min-height: 0; }
.ap-c .chart { flex: none; margin-top: 0; }
.ap-h { flex: 1; min-height: 0; margin: 0; padding: 0 6px 0 0; overflow-y: auto; list-style: none; font-size: 0.8125rem; }
.ap-h li { display: grid; grid-template-columns: 110px minmax(0, 1fr) 30px; gap: 10px; align-items: center; padding: 5px 0; }
.ap-h .bg { height: 6px; } .ap-h strong { text-align: right; font-variant-numeric: tabular-nums; }
@media (max-width: 1100px) { .ap-pair { grid-template-columns: minmax(0, 1fr); } .ap-pair > .card { height: auto; max-height: 620px; } }
@media (max-width: 620px) { .ap-list thead th { position: static; } .ap-n { align-items: flex-end; } }

/* Modelos */
.m-name { display: flex; flex-direction: column; padding: 0; border: 0; background: transparent; color: inherit; text-align: left; cursor: pointer; }
.m-name:hover strong { color: var(--accent); }
.tbadge.acc { color: var(--accent); }
.main > .nb-chips { margin-bottom: 16px; }
.m-caps { max-height: 46vh; overflow: auto; }
.m-caps th, .m-caps td { padding: 7px 8px; font-size: 0.875rem; }
.m-caps .scroll { overflow: visible; }

.cap-why { display: block; font-size: 0.75rem; line-height: 1.3; }

.wl-last { display: flex; flex-direction: column; gap: 3px; padding: 10px 14px; border: 1px solid currentColor; border-left-width: 4px; border-radius: 12px; overflow-wrap: anywhere; }
.wl-last span, .wl-last small { color: var(--tx); } .wl-last small { color: var(--tx2); }

/* Ferramentas */
.tools { display: flex; flex-direction: column; gap: 12px; }
.tool { display: flex; gap: 16px; align-items: center; justify-content: space-between; color: inherit; text-decoration: none; }
.tool > div { display: flex; flex-direction: column; gap: 3px; }
.tool:not(.off):hover { border-color: var(--accent); }
.tool.off { opacity: 0.6; }
.tool-go { color: var(--tx2); font-size: 1.5rem; }
.tfacts.srv { grid-template-columns: repeat(3, 1fr); }
.urls { display: flex; flex-wrap: wrap; gap: 8px; }
.urls code { padding: 6px 10px; border: 1px solid var(--line2); border-radius: 8px; overflow-wrap: anywhere; user-select: all; }

.grid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
@media (max-width: 620px) { .grid3 { grid-template-columns: 1fr; } }
pre.code { margin: 0; padding: 12px 14px; border: 1px solid var(--line2); border-radius: 10px; overflow-x: auto; font-size: 0.8125rem; white-space: pre; }

fieldset.pc { margin: 0; padding: 10px 14px; border: 1px solid var(--line2); border-radius: 12px; }
.pc-in { margin-top: 10px; }

/* Observação e etiquetas */
.ont-notes { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; margin-top: 6px; font-size: 0.8125rem; }
.ont-notes .note { color: var(--tx2); overflow-wrap: anywhere; }
.ont-notes .tlink { margin-left: 0; }
.tag { display: inline-block; padding: 1px 9px; border: 1px solid color-mix(in srgb, var(--accent) 55%, transparent); border-radius: 10px; color: var(--accent); font-size: 0.75rem; white-space: nowrap; }
.name .tags { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 3px; }

.todo { display: flex; flex-direction: column; gap: 10px; margin: 0; padding-left: 18px; }
.todo li { display: flex; flex-direction: column; gap: 2px; }
.todo span { font-size: 0.8125rem; overflow-wrap: anywhere; }

.meter { display: flex; flex-direction: column; gap: 4px; }
.meter-h { display: flex; justify-content: space-between; }
.meter .bg { height: 8px; }
.meter small { overflow-wrap: anywhere; }

pre.code.kb-text, .kb-text { max-height: 50vh; overflow: auto; white-space: pre-wrap; overflow-wrap: anywhere; }

.term-host { margin-top: 12px; }
.term-host .tt { margin-top: 0; }

.ai-sum p { margin: 0; overflow-wrap: anywhere; }
.ai-sum + .err:empty { min-height: 0; }

.sec-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.sec-row > .dim { min-width: 120px; font-size: 0.8125rem; }
.sec-row code.sec { flex: 1; min-width: 160px; padding: 7px 10px; border: 1px solid var(--line2); border-radius: 8px; overflow-wrap: anywhere; user-select: all; }
.sec-row .btn { min-height: 32px; padding: 0 12px; }

.section-title { margin: 12px 0 0; font-size: 1.125rem; }
.ext-bar { justify-content: space-between; flex-wrap: wrap; }
.ext-bar input[type="search"] { flex: 1; min-width: 160px; max-width: 320px; }

.qr-row { display: flex; flex-wrap: wrap; gap: 16px; align-items: center; }
.qr { width: 180px; height: 180px; padding: 8px; border-radius: 12px; background: #fff; }
.qr-key { display: block; padding: 8px 10px; border: 1px solid var(--line2); border-radius: 8px; letter-spacing: 0.08em; overflow-wrap: anywhere; user-select: all; }
.gate-link { margin-top: 14px; border: 0; background: none; color: var(--g-tx2); text-decoration: underline; cursor: pointer; align-self: center; font: inherit; font-size: 0.875rem; }
.gate-code { display: flex; flex-direction: column; gap: 12px; }
.gate-code input { letter-spacing: 0.4em; font-size: 1.25rem; text-align: center; }
.gate-limited { min-height: 0; }
.gate-limited .gate-top { margin-bottom: 24px; }
.gate-limited .gate-p { margin: 12px 0 20px; }
.gate-limited .field span, .gate-limited .dim { color: var(--g-tx2); }
.gate-limited .qr-key { border-color: var(--g-edge); }

.sec-opt { display: flex; gap: 16px; align-items: center; justify-content: space-between; padding: 12px 0; border-bottom: 1px solid var(--line); }
.sec-opt:last-of-type { border-bottom: 0; }
.sec-opt select { min-width: 180px; }
.switch { position: relative; display: inline-block; width: 44px; height: 24px; flex: none; }
.switch input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; z-index: 1; }
.switch .knob { position: absolute; inset: 0; border-radius: 12px; background: var(--line2); transition: background 0.15s; }
.switch .knob::after { content: ''; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; transition: transform 0.15s; }
.switch input:checked + .knob { background: var(--ok); }
.switch input:checked + .knob::after { transform: translateX(20px); }
.switch input:focus-visible + .knob { outline: 2px solid var(--ok); outline-offset: 2px; }
@media (max-width: 640px) { .sec-opt { flex-direction: column; align-items: stretch; } }

.ports-fix { margin-top: 10px; text-align: right; }
.linkish { padding: 0; border: 0; background: none; color: var(--tx2); text-decoration: underline; cursor: pointer; font: inherit; }
.linkish:hover { color: var(--tx); }

/* Teste rápido no cartão "Teste" */
.qs { display: flex; flex-direction: column; gap: 8px; }
.qs-head { display: flex; align-items: center; gap: 10px; }
.qs-head strong { flex: 1; }
.qs-back { padding: 4px 8px; border: 1px solid var(--line); border-radius: 8px; background: transparent; color: var(--tx2); cursor: pointer; font: inherit; font-size: 0.8125rem; }
.qs-back:hover { color: var(--tx); }
.qs-svg { display: block; width: 100%; max-width: 360px; height: auto; margin: 0 auto; }
.qs-status { margin: 0; font-size: 0.875rem; text-align: center; }
.qs-node { fill: var(--accent); }
.qs-node.far { fill: var(--accent2); }
.qs-track { stroke: var(--line2); stroke-width: 1.5; stroke-dasharray: 2 5; stroke-linecap: round; }
.qs-lbl { fill: var(--tx2); font-size: 9px; }
.qs-wave { fill: none; stroke: var(--accent); stroke-width: 1.5; opacity: 0; animation: qs-wave 1.8s ease-out infinite; transform-box: fill-box; transform-origin: center; }
@keyframes qs-wave { 0% { transform: scale(1); opacity: 0.8; } 100% { transform: scale(5); opacity: 0; } }
.qs-packet { fill: var(--accent); animation: qs-go 1.2s ease-in-out infinite alternate; }
@keyframes qs-go { from { transform: translateX(0); } to { transform: translateX(136px); } }
.qs-ok { fill: var(--ok); } .qs-bad { fill: var(--bad); }
.qs-route { fill: none; stroke: var(--accent); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; opacity: 0.7; }
.qs-route.run { stroke-dasharray: 6 8; animation: qs-dash 1s linear infinite; }
@keyframes qs-dash { to { stroke-dashoffset: -28; } }
.qs-hop { fill: var(--accent); }
.qs-hop.slow { fill: var(--warn); } .qs-hop.none { fill: var(--off); }
.qs-hop.run { animation: qs-blink 2.1s ease-in-out infinite; }
@keyframes qs-blink { 0%, 100% { opacity: 0.25; } 30% { opacity: 1; } }
.qs-arc { fill: none; stroke: var(--line2); stroke-width: 8; stroke-linecap: round; }
.qs-arc.on { stroke: var(--accent); }
.qs-tick { stroke: var(--tx2); stroke-width: 1; }
.qs-needle { transition: transform 900ms cubic-bezier(.2,.8,.2,1); }
.qs-needle.run { animation: qs-sweep 2.4s ease-in-out infinite alternate; }
@keyframes qs-sweep { from { transform: rotate(-70deg); } to { transform: rotate(40deg); } }
.qs-needle-l { stroke: var(--tx); stroke-width: 2.5; stroke-linecap: round; }
.qs-ring { fill: none; stroke: var(--line2); stroke-width: 1; }
.qs-sweep { animation: qs-spin 2.4s linear infinite; }
@keyframes qs-spin { to { transform: rotate(360deg); } }
.qs-beam { fill: var(--accent); opacity: 0.35; }
.qs-net { fill: var(--accent); } .qs-net.five { fill: var(--accent2); }
.qs-nums { display: grid; grid-template-columns: repeat(auto-fit, minmax(80px, 1fr)); gap: 8px; text-align: center; }
.qs-num strong { font-size: 1.25rem; }
.qs-num > span { display: block; font-size: 0.75rem; }
.qs-dots { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px; margin-top: 8px; }
.qs-dots i { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); }
.qs-dots i.bad { background: var(--bad); }
.qs-when { display: block; margin-top: 6px; text-align: center; }
.qs-form { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; justify-content: center; }
.qs-form input[type="text"] { flex: 1; min-width: 140px; }
.qs-confirm { flex-basis: 100%; }
.qs-ctl { display: flex; justify-content: center; }
@media (prefers-reduced-motion: reduce) { .qs-wave, .qs-packet, .qs-route.run, .qs-hop.run, .qs-needle.run, .qs-sweep { animation: none; } .qs-wave { opacity: 0.4; } .qs-needle { transition: none; } }
.qs .btn.primary { border-color: var(--accent); background: var(--accent-soft); color: var(--tx); }
.qs .btn.primary:hover:not(:disabled) { background: var(--accent); color: var(--bg, #111); }

/* Rede: a barra das abas tem a cor da barra lateral e "dobra" sobre o conteúdo, com o canto arredondado */
@media (min-width: 861px) {
  .netbox { background: var(--panel); }
  .tabs.net { background: var(--panel); border-bottom: 0; padding: 8px 20px 6px; }
  .netbox .frame { border-top: 1px solid var(--line); border-left: 1px solid var(--line); border-top-left-radius: 22px; background: #111113; }
  .side:has(~ .main .netbox) { border-right-color: transparent; }
}

/* ---- Login animado (vidro fosco, borda que reflete o cursor, rede de pontos) ---- */
.gatebg { isolation: isolate; }
.gate-art { position: absolute; inset: -24px; z-index: -2; background: inherit; background-position: inherit; transform: translate3d(var(--mx, 0), var(--my, 0), 0) scale(1.03); transition: transform 0.6s cubic-bezier(.2,.8,.2,1); animation: gate-drift 38s ease-in-out infinite alternate; }
@keyframes gate-drift { from { background-position: left center; } to { background-position: 46% 44%; } }
.gate-net { position: absolute; inset: 0; z-index: -1; width: 100%; height: 100%; pointer-events: none; }
.gate { border-radius: 32px; box-shadow: 0 30px 80px rgb(0 10 24 / 0.45), inset 0 1px 0 rgb(255 255 255 / 0.12); animation: gate-in 0.7s cubic-bezier(.2,.8,.2,1) both; }
@keyframes gate-in { from { opacity: 0; transform: translateY(calc(-50% + 28px)) scale(0.98); filter: blur(8px); } to { opacity: 1; transform: translateY(-50%) scale(1); filter: blur(0); } }
/* Borda especular: um brilho segue o cursor pela moldura do painel */
.gate::before { content: ''; position: absolute; inset: 0; border-radius: inherit; padding: 1px; pointer-events: none; background: radial-gradient(260px circle at var(--px, 50%) var(--py, 0%), rgb(127 227 174 / 0.75), transparent 60%); -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude; opacity: 0.9; }
.gate::after { content: ''; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; background: radial-gradient(420px circle at var(--px, 50%) var(--py, -20%), rgb(127 227 174 / 0.06), transparent 65%); }
.gate > * { position: relative; z-index: 1; }
.gate-up { animation: gate-up 0.55s cubic-bezier(.2,.8,.2,1) both; animation-delay: calc(0.18s + var(--i, 0) * 0.06s); }
@keyframes gate-up { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
.gate-out { animation: gate-out 0.4s cubic-bezier(.4,0,.6,1) forwards; }
@keyframes gate-out { to { opacity: 0; transform: translateY(calc(-50% - 16px)) scale(0.97); filter: blur(6px); } }
.gate-leave .gate-art { transform: scale(1.12); transition: transform 0.8s ease; }
.gate-leave .gate-net { opacity: 0; transition: opacity 0.4s; }
.gate-shake { animation: gate-shake 0.45s cubic-bezier(.36,.07,.19,.97) both; }
@keyframes gate-shake { 10%, 90% { transform: translate(-2px, -50%); } 20%, 80% { transform: translate(4px, -50%); } 30%, 50%, 70% { transform: translate(-7px, -50%); } 40%, 60% { transform: translate(7px, -50%); } }
.gate .err:not(:empty) { animation: gate-up 0.3s ease both; }
/* Campos com ícone */
.gate-in { position: relative; display: block; }
.gate-in .gate-ic { position: absolute; left: 14px; top: 50%; z-index: 1; display: grid; place-items: center; width: 18px; height: 18px; color: var(--g-tx2); transform: translateY(-50%); transition: color 0.2s, transform 0.2s; pointer-events: none; }
.gate-in .gate-ic .ic { width: 18px; height: 18px; }
.gate-in input { padding-left: 44px !important; }
.gate-in:focus-within .gate-ic { color: var(--g-link); transform: translateY(-50%) scale(1.08); }
.gate-f input { transition: border-color 0.2s, box-shadow 0.25s, background 0.2s; }
.gate-f input:focus { box-shadow: 0 0 0 1px var(--g-link), 0 0 0 5px rgb(127 227 174 / 0.14); }
.gate-caps { display: block; height: 0; overflow: hidden; color: #f0b651; font-size: 0.75rem; font-weight: 500; opacity: 0; transition: height 0.2s, opacity 0.2s, margin 0.2s; }
.gate-caps.on { height: 1.3em; margin-top: 6px; opacity: 1; }
.gate-eye .ic { transition: transform 0.25s; }
.gate-eye:active .ic { transform: scale(0.85); }
/* Botão: seta que avança, brilho que atravessa, anel girando e confirmação */
.gate-go { position: relative; display: inline-flex; gap: 8px; align-items: center; justify-content: center; overflow: hidden; border-radius: 16px; transition: background 0.2s, transform 0.15s, box-shadow 0.25s; }
.gate-go::after { content: ''; position: absolute; inset: 0; background: linear-gradient(105deg, transparent 35%, rgb(255 255 255 / 0.22) 50%, transparent 65%); transform: translateX(-120%); }
.gate-go:hover:not(:disabled)::after { transform: translateX(120%); transition: transform 0.75s ease; }
.gate-go:hover:not(:disabled) { box-shadow: 0 8px 26px rgb(0 150 60 / 0.35); }
.gate-go:active:not(:disabled) { transform: scale(0.985); }
.gate-go-i { display: grid; place-items: center; width: 18px; height: 18px; transition: transform 0.25s; }
.gate-go-i .ic { width: 18px; height: 18px; }
.gate-go:hover:not(:disabled) .gate-go-i { transform: translateX(4px); }
.gate-go.busy, .gate-go.done { opacity: 1 !important; cursor: default; }
.gate-go.done { background: rgb(0 160 70 / 0.85); }
.gate-go.done .gate-go-i .ic { stroke-dasharray: 24; stroke-dashoffset: 24; animation: gate-check 0.4s ease forwards; }
@keyframes gate-check { to { stroke-dashoffset: 0; } }
.gate-ring { position: relative; display: block; width: 16px; height: 16px; border: 2px solid rgb(255 255 255 / 0.3); border-radius: 50%; animation: gate-spin 0.9s linear infinite; }
.gate-ring::after { content: ''; position: absolute; top: -4px; left: 50%; width: 6px; height: 6px; margin-left: -3px; border-radius: 50%; background: #fff; }
@keyframes gate-spin { to { transform: rotate(360deg); } }
@media (max-width: 1080px), (max-aspect-ratio: 5/4) {
  .gate { animation-name: gate-in-c; }
  @keyframes gate-in-c { from { opacity: 0; transform: translate(-50%, calc(-50% + 28px)) scale(0.98); filter: blur(8px); } to { opacity: 1; transform: translate(-50%, -50%) scale(1); filter: blur(0); } }
  .gate-out { animation-name: gate-out-c; }
  @keyframes gate-out-c { to { opacity: 0; transform: translate(-50%, calc(-50% - 16px)) scale(0.97); filter: blur(6px); } }
  .gate-shake { animation-name: gate-shake-c; }
  @keyframes gate-shake-c { 10%, 90% { transform: translate(calc(-50% - 2px), -50%); } 20%, 80% { transform: translate(calc(-50% + 4px), -50%); } 30%, 50%, 70% { transform: translate(calc(-50% - 7px), -50%); } 40%, 60% { transform: translate(calc(-50% + 7px), -50%); } }
}
@media (prefers-reduced-motion: reduce) {
  .gate, .gate-up, .gate-art, .gate-out, .gate-shake, .gate .err:not(:empty) { animation: none !important; }
  .gate-art { transition: none; }
  .gate-ring { animation-duration: 2.4s; }
}

/* Teste rápido: voltar redondo, "Detalhes" em pílula e progresso em pílula com barra */
.qs-head strong { font-size: 0.9375rem; letter-spacing: -0.01em; }
.qs-ico { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.qs-back { display: grid; place-items: center; width: 32px; height: 32px; padding: 0; border: 1px solid var(--line); border-radius: 50%; background: rgb(255 255 255 / 0.04); color: var(--tx2); transition: background 0.2s, color 0.2s, border-color 0.2s, transform 0.2s; }
.qs-back:hover { background: rgb(255 255 255 / 0.09); color: var(--tx); border-color: var(--line2); transform: translateX(-2px); }
.qs-more { display: inline-flex; gap: 6px; align-items: center; height: 32px; padding: 0 12px 0 14px; border: 1px solid rgb(79 195 223 / 0.3); border-radius: 9999px; background: var(--accent-soft, rgb(79 195 223 / 0.12)); color: var(--accent); font: inherit; font-size: 0.8125rem; font-weight: 600; cursor: pointer; transition: background 0.2s, border-color 0.2s; }
.qs-more:hover { background: rgb(79 195 223 / 0.2); border-color: rgb(79 195 223 / 0.5); }
.qs-more .qs-ico { transition: transform 0.2s; }
.qs-more:hover .qs-ico { transform: translate(2px, -2px); }
.qs-back:focus-visible, .qs-more:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.qs-status.qs-run { position: relative; display: inline-flex; gap: 10px; align-items: center; align-self: center; max-width: 100%; padding: 8px 14px 10px; overflow: hidden; border: 1px solid rgb(255 255 255 / 0.08); border-radius: 9999px; background: rgb(255 255 255 / 0.04); color: var(--tx); text-align: left; }
.qs-spin { flex: none; width: 14px; height: 14px; border: 2px solid rgb(79 195 223 / 0.22); border-top-color: var(--accent); border-radius: 50%; animation: qs-spin 0.8s linear infinite; }
@keyframes qs-spin { to { transform: rotate(360deg); } }
.qs-label { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 0.8125rem; }
.qs-time { flex: none; padding: 2px 8px; border-radius: 9999px; background: rgb(79 195 223 / 0.14); color: var(--accent); font-size: 0.75rem; font-weight: 600; font-variant-numeric: tabular-nums; }
.qs-track { position: absolute; left: 0; right: 0; bottom: 0; height: 2px; overflow: hidden; background: rgb(255 255 255 / 0.05); }
.qs-track::after { content: ''; position: absolute; top: 0; bottom: 0; width: 35%; border-radius: 2px; background: linear-gradient(90deg, transparent, var(--accent), transparent); animation: qs-track 1.6s ease-in-out infinite; }
@keyframes qs-track { from { left: -35%; } to { left: 100%; } }
@media (prefers-reduced-motion: reduce) { .qs-spin, .qs-track::after { animation: none; } .qs-back:hover, .qs-more:hover .qs-ico { transform: none; } }

/* ---- Usuários: filtros, avatar, selos e campo de senha ---- */
.us-bar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.us-bar input[type="search"] { flex: 1; min-width: 220px; }
.us-bar select { min-width: 170px; }
.us-sum { margin: -6px 0 12px; }
.us-who { display: flex; gap: 12px; align-items: center; min-width: 0; }
.us-who > div { display: flex; flex-direction: column; min-width: 0; }
.us-who strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.us-who small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.us-av { position: relative; display: grid; flex: none; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); font-size: 0.75rem; font-weight: 700; letter-spacing: 0.02em; }
.us-dot { position: absolute; right: -1px; bottom: -1px; width: 10px; height: 10px; border: 2px solid var(--panel); border-radius: 50%; background: var(--ok); }
.us-st { display: flex; flex-wrap: wrap; gap: 6px; }
.pill { display: inline-flex; align-items: center; padding: 2px 10px; border-radius: 9999px; font-size: 0.75rem; font-weight: 600; white-space: nowrap; }
.pill.ok { background: rgb(76 195 138 / 0.14); color: var(--ok); }
.pill.off { background: rgb(160 160 170 / 0.14); color: var(--off); }
.pill.warn { background: rgb(240 182 81 / 0.14); color: var(--warn); }
.us-table tr.us-off td { opacity: 0.72; }
.us-table .acts { flex-wrap: wrap; justify-content: flex-end; }
.pw-wrap { position: relative; display: block; }
.pw-wrap input { width: 100%; padding-right: 84px; }
.pw-eye { position: absolute; top: 50%; right: 6px; padding: 4px 10px; border: 0; border-radius: 9999px; background: rgb(255 255 255 / 0.06); color: var(--tx2); font: inherit; font-size: 0.75rem; cursor: pointer; transform: translateY(-50%); }
.pw-eye:hover { color: var(--tx); }
.pw-rules { display: none; flex-wrap: wrap; gap: 6px; margin: 6px 0 0; padding: 0; list-style: none; }
.pw-rules.show { display: flex; }
.pw-rules li { padding: 2px 9px; border-radius: 9999px; background: rgb(255 255 255 / 0.05); color: var(--tx2); font-size: 0.75rem; transition: background 0.2s, color 0.2s; }
.pw-rules li::before { content: '○ '; }
.pw-rules li.ok { background: rgb(76 195 138 / 0.14); color: var(--ok); }
.pw-rules li.ok::before { content: '✓ '; }
.pw-gen { align-self: flex-start; margin-top: 8px; }

/* Assistente: apagar todas as conversas, discreto no fim da lista */
.chats-wipe { order: 99; margin-top: auto; padding: 8px; border: 0; background: none; color: var(--tx2); font: inherit; font-size: 0.75rem; text-decoration: underline; cursor: pointer; }
.chats-wipe:hover { color: var(--bad); }

/* ---- Assistente: começo, mensagens, fontes, ações e lista ---- */
.ai-ico { width: 16px; height: 16px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.chats { gap: 6px; }
.chats > .btn.primary { margin-bottom: 6px; }
.chats > input[type="search"] { margin-bottom: 4px; border-radius: 9999px; }
.chat-list { display: flex; flex-direction: column; gap: 2px; }
.chat-group { margin: 10px 10px 2px; color: var(--tx2); font-size: 0.6875rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; }
.chat-none { padding: 8px 10px; }
.chats .row { display: flex; align-items: center; border-radius: 10px; transition: background 0.15s; }
.chats .row:hover, .chats .row.on { background: rgb(255 255 255 / 0.05); }
.chats .chat { display: flex; gap: 8px; align-items: center; color: var(--tx); }
.chats .chat span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chats .chat .ai-ico { color: var(--accent); }
.chats .row .x { width: 30px; height: 30px; opacity: 0; transition: opacity 0.15s; }
.chats .row:hover .x, .chats .row.on .x, .chats .row .x:focus-visible { opacity: 1; }
.chats .row .ren .ai-ico { width: 14px; height: 14px; }
@media (hover: none) { .chats .row .x { opacity: 1; } }
.ai-start { display: flex; flex-direction: column; align-items: center; gap: 12px; margin: auto 0; padding: 24px 0; text-align: center; }
.ai-start h2 { margin: 0; font-size: 1.5rem; font-weight: 600; letter-spacing: -0.02em; }
.ai-start > .dim { max-width: 520px; margin: 0; }
.ai-hero { display: grid; place-items: center; width: 52px; height: 52px; border-radius: 16px; background: var(--accent-soft); color: var(--accent); }
.ai-hero .ai-ico { width: 26px; height: 26px; }
.ai-subject { display: flex; flex-direction: column; align-items: center; gap: 8px; width: 100%; max-width: 460px; }
.subj-pick, .subj-chip { display: inline-flex; gap: 8px; align-items: center; height: 36px; padding: 0 14px; border: 1px solid var(--line2); border-radius: 9999px; background: transparent; color: var(--tx); font: inherit; font-size: 0.875rem; cursor: pointer; }
.subj-pick:hover { border-color: var(--accent); color: var(--accent); }
.subj-chip { padding-right: 4px; border-color: rgb(79 195 223 / 0.4); background: var(--accent-soft); cursor: default; }
.subj-chip .x { width: 28px; height: 28px; }
.ai-subject input[type="search"] { width: 100%; border-radius: 9999px; }
.subj-res { display: flex; flex-direction: column; gap: 4px; width: 100%; text-align: left; }
.subj-opt { display: flex; flex-direction: column; gap: 2px; padding: 8px 14px; border: 1px solid var(--line); border-radius: 12px; background: transparent; color: var(--tx); font: inherit; cursor: pointer; }
.subj-opt:hover { border-color: var(--accent); }
.ai-suggest { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; width: 100%; max-width: 640px; margin-top: 8px; }
.sug { padding: 14px 16px; border: 1px solid var(--line); border-radius: 16px; background: rgb(255 255 255 / 0.03); color: var(--tx); font: inherit; font-size: 0.875rem; line-height: 1.4; text-align: left; cursor: pointer; transition: border-color 0.15s, background 0.15s, transform 0.15s; }
.sug:hover { border-color: rgb(79 195 223 / 0.5); background: var(--accent-soft); transform: translateY(-1px); }
@media (max-width: 640px) { .ai-suggest { grid-template-columns: 1fr; } }
.msg.user { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; padding: 0; background: none; }
.msg.user .msg-body { padding: 10px 14px; border-radius: 16px 16px 4px 16px; background: var(--accent-soft); white-space: pre-wrap; }
.msg.bot { flex-direction: row; gap: 12px; align-items: flex-start; }
.msg-av { display: grid; flex: none; place-items: center; width: 30px; height: 30px; margin-top: 2px; border-radius: 10px; background: var(--accent-soft); color: var(--accent); }
.msg-col { display: flex; flex: 1; flex-direction: column; gap: 8px; min-width: 0; }
.msg-body { display: flex; flex-direction: column; gap: 8px; overflow-wrap: anywhere; }
.msg-at { color: var(--tx2); font-size: 0.6875rem; }
.msg-src { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; font-size: 0.75rem; }
.msg-src:empty { display: none; }
.src-chip { display: inline-flex; gap: 6px; align-items: center; max-width: 260px; padding: 3px 10px; border: 1px solid var(--line); border-radius: 9999px; color: var(--tx2); text-decoration: none; }
.src-chip span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.src-chip .ai-ico { width: 13px; height: 13px; }
a.src-chip:hover { border-color: var(--accent); color: var(--accent); }
.msg-acts { display: flex; gap: 2px; align-items: center; }
.msg-acts .msg-at { margin-left: 8px; }
.msg-btn { display: grid; place-items: center; width: 30px; height: 30px; border: 0; border-radius: 8px; background: transparent; color: var(--tx2); cursor: pointer; transition: background 0.15s, color 0.15s; }
.msg-btn:hover { background: rgb(255 255 255 / 0.06); color: var(--tx); }
.msg-btn.on, .msg-btn.ok { color: var(--accent); }
.typing { display: inline-flex; gap: 4px; align-items: center; height: 22px; }
.typing i { width: 7px; height: 7px; border-radius: 50%; background: var(--tx2); animation: ai-typing 1.2s ease-in-out infinite; }
.typing i:nth-child(2) { animation-delay: 0.15s; } .typing i:nth-child(3) { animation-delay: 0.3s; }
@keyframes ai-typing { 0%, 60%, 100% { opacity: 0.25; transform: translateY(0); } 30% { opacity: 1; transform: translateY(-3px); } }
.say { padding: 8px 8px 8px 14px; border: 1px solid var(--line2); border-radius: 20px; background: rgb(255 255 255 / 0.03); transition: border-color 0.15s, box-shadow 0.2s; }
.say:focus-within { border-color: rgb(79 195 223 / 0.55); box-shadow: 0 0 0 4px rgb(79 195 223 / 0.1); }
.say textarea { min-height: 44px; max-height: 200px; padding: 10px 0; border: 0; background: transparent; box-shadow: none; outline: 0; }
.say .btn { min-height: 40px; border-radius: 14px; }
.ai-about { margin: 0 auto; padding: 0 14px; text-align: center; font-size: 0.75rem !important; }
.ai-meta { color: var(--tx2); }
@media (prefers-reduced-motion: reduce) { .typing i { animation: none; opacity: 0.6; } .sug:hover { transform: none; } }

/* Ferramentas: situação de cada ferramenta no cartão */
.tool-st { display: inline-flex; gap: 7px; align-items: center; margin-top: 8px; color: var(--tx); font-size: 0.8125rem; font-weight: 500; }
.tool-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); flex: none; }
.tool-dot.ok { background: var(--ok); } .tool-dot.warn { background: var(--warn); } .tool-dot.dim { background: var(--off); }
.tool-st.sk-line { width: 160px; height: 14px; border-radius: 6px; background: linear-gradient(100deg, rgb(255 255 255 / 0.05) 30%, rgb(255 255 255 / 0.11) 50%, rgb(255 255 255 / 0.05) 70%); background-size: 300% 100%; animation: tool-sk 1.6s ease-in-out infinite; }
@keyframes tool-sk { from { background-position: 150% 0; } to { background-position: -50% 0; } }
@media (prefers-reduced-motion: reduce) { .tool-st.sk-line { animation: none; } }
.main > .top + .tools { margin-top: 20px; }

/* Documentação da API (Clientes API) */
.apidoc h3 { margin: 10px 0 0; font-size: 0.9375rem; }
.apidoc-pre { position: relative; }
.apidoc-pre pre { margin: 0; padding-right: 84px; overflow-x: auto; }
.apidoc-pre .btn { position: absolute; top: 8px; right: 8px; }
.apidoc input[type=search] { width: 100%; }
.apidoc-list { display: flex; flex-direction: column; gap: 6px; }
.apidoc-fn { border: 1px solid var(--line); border-radius: 10px; padding: 0 12px; }
.apidoc-fn[open] { padding-bottom: 12px; }
.apidoc-fn summary { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; padding: 10px 0; cursor: pointer; }
.apidoc-fn summary code { word-break: break-all; }
.apidoc-p { margin-left: auto; }
.apidoc-m { font: 600 0.6875rem/1 ui-monospace, monospace; padding: 4px 7px; border-radius: 6px; background: rgb(96 165 250 / 0.16); color: #60a5fa; min-width: 48px; text-align: center; }
.apidoc-m.post { background: rgb(52 211 153 / 0.16); color: #34d399; }
.apidoc-m.patch { background: rgb(251 191 36 / 0.16); color: #fbbf24; }
/* Pré-configuração: escolher a ONT do teste */
.pc-pick { display: flex; flex-direction: column; gap: 6px; max-height: 240px; overflow-y: auto; }
.pc-opt { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; text-align: left; padding: 8px 10px; border-radius: 8px; border: 1px solid var(--line); background: transparent; color: inherit; cursor: pointer; }
.pc-opt:hover { border-color: var(--accent); }
.pc-opt.on { border-color: var(--accent); background: rgb(96 165 250 / 0.12); }

/* Atualizações: envio do pacote */
.upbar { height: 6px; border-radius: 6px; background: var(--accent-soft); overflow: hidden; margin: -4px 0 12px; }
.upbar i { display: block; height: 100%; width: 0; border-radius: 6px; background: #3b82f6; transition: width .2s ease; }
.upbar.busy i { width: 100% !important; background: linear-gradient(90deg, #3b82f6 0%, #93c5fd 50%, #3b82f6 100%); background-size: 200% 100%; animation: upbar 1.2s linear infinite; }
@keyframes upbar { from { background-position: 200% 0; } to { background-position: 0 0; } }
@media (prefers-reduced-motion: reduce) { .upbar.busy i { animation: none; } }
.updrop { display: flex; flex-direction: column; gap: 4px; align-items: center; justify-content: center; width: 100%; padding: 22px 16px; border: 1.5px dashed var(--line2); border-radius: 12px; background: transparent; color: inherit; cursor: pointer; text-align: center; }
.updrop:hover, .updrop.on { border-color: #3b82f6; background: rgb(59 130 246 / 0.08); }

/* Configurações: esqueleto de carregamento */
.skel-grid { grid-column: 1 / -1; }
.skel { display: flex; flex-direction: column; gap: 12px; min-height: 150px; }
.skel i { display: block; height: 12px; border-radius: 6px; background: linear-gradient(100deg, var(--accent-soft) 30%, color-mix(in srgb, var(--accent-soft) 60%, var(--tx) 12%) 50%, var(--accent-soft) 70%); background-size: 300% 100%; animation: skel 1.5s ease-in-out infinite; }
.skel .sk-t { width: 40%; height: 16px; margin-bottom: 6px; }
.skel .sk-l { width: 92%; } .skel .s2 { width: 76%; } .skel .s3 { width: 58%; }
@keyframes skel { from { background-position: 150% 0; } to { background-position: -50% 0; } }
@media (prefers-reduced-motion: reduce) { .skel i { animation: none; } }
/* Abas: no celular rolam para o lado, com sombra indicando que há mais */
nav.tabs { overflow-x: auto; scrollbar-width: none; flex-wrap: nowrap; }
nav.tabs::-webkit-scrollbar { display: none; }
nav.tabs .tab { white-space: nowrap; flex: none; }
nav.tabs.more-r { -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 36px), transparent); mask-image: linear-gradient(90deg, #000 calc(100% - 36px), transparent); }
nav.tabs.more-l { -webkit-mask-image: linear-gradient(90deg, transparent, #000 36px); mask-image: linear-gradient(90deg, transparent, #000 36px); }
nav.tabs.more-l.more-r { -webkit-mask-image: linear-gradient(90deg, transparent, #000 36px, #000 calc(100% - 36px), transparent); mask-image: linear-gradient(90deg, transparent, #000 36px, #000 calc(100% - 36px), transparent); }
/* Auditoria: filtros de período */
.bar label.inline { display: inline-flex; align-items: center; gap: 6px; }
/* Marca */
.brand-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; }
.brand-slot { display: flex; flex-direction: column; gap: 6px; }
.brand-img { height: 84px; border: 1px solid var(--line); border-radius: 10px; display: flex; align-items: center; justify-content: center; padding: 8px; background: repeating-conic-gradient(var(--accent-soft) 0 25%, transparent 0 50%) 0 0 / 14px 14px; }
.brand-img img { max-width: 100%; max-height: 100%; object-fit: contain; }

/* Dispositivos: filtros, seleção e abas da ONT no celular */
.dv-filters { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; align-items: center; margin-top: 10px; }
.dv-filters { gap: 6px; margin-top: 8px; }
.dv-filters select { width: auto; max-width: 260px; min-height: 30px; padding: 0 30px 0 12px; border: 1px solid var(--line2); border-radius: 15px; background-color: var(--bar); font-size: 0.75rem; font-weight: 500; }
.dv-filters select.on { border-color: var(--accent); color: var(--accent); }
.dv-filters .tlink { font-size: 0.75rem; }
.dv-filters .dv-csv { min-height: 30px; padding: 0 12px; border-radius: 15px; font-size: 0.75rem; display: inline-flex; align-items: center; }
.dv-sel[hidden] { display: none; }
.dv-sel { position: sticky; top: 0; z-index: 3; display: flex; flex-wrap: wrap; gap: 14px; align-items: center; margin-bottom: 10px; padding: 10px 14px; border: 1px solid var(--accent); border-radius: 12px; background: var(--panel); }
.dv-sel .btn { margin-left: auto; }
.dv-ckcol { width: 34px; }
.dv-off { display: block; margin-top: 2px; }
.pager select { width: auto; min-height: 30px; padding: 0 30px 0 12px; border-radius: 15px; font-size: 0.75rem; }
div.tabs { overflow-x: auto; scrollbar-width: none; flex-wrap: nowrap; }
div.tabs::-webkit-scrollbar { display: none; }
div.tabs .tab { white-space: nowrap; flex: none; }
div.tabs.more-r { -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 36px), transparent); mask-image: linear-gradient(90deg, #000 calc(100% - 36px), transparent); }
div.tabs.more-l { -webkit-mask-image: linear-gradient(90deg, transparent, #000 36px); mask-image: linear-gradient(90deg, transparent, #000 36px); }
div.tabs.more-l.more-r { -webkit-mask-image: linear-gradient(90deg, transparent, #000 36px, #000 calc(100% - 36px), transparent); mask-image: linear-gradient(90deg, transparent, #000 36px, #000 calc(100% - 36px), transparent); }

/* Modelos: filtros, firmwares e colunas do detalhe sem quebrar palavras */
.md-bar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.md-bar input { flex: 1; min-width: 220px; }
.md-bar select { width: auto; }
.md-bar select.on { border-color: var(--accent); }
.m-fw { display: flex; flex-direction: column; gap: 6px; margin-top: 6px; }
.m-caps td:nth-child(2), .m-caps td:nth-child(3), .m-caps th { white-space: nowrap; }
.m-caps td:first-child { width: 100%; }

/* Assistente: conversas do assistente da ONT, carregar mais e aviso só para leitor de tela */
.chats .chat .chat-tag { flex: none; margin-left: auto; padding: 1px 6px; border: 1px solid var(--line); border-radius: 9999px; color: var(--tx2); font-size: 0.625rem; font-weight: 700; letter-spacing: 0.04em; }
.chats-more { margin: 6px 10px; padding: 6px 0; border: 0; background: none; color: var(--accent); font: inherit; font-size: 0.8125rem; text-align: left; cursor: pointer; }
.chats-more:disabled { opacity: 0.5; cursor: default; }
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.ai-start .btn.primary { margin-top: 14px; }

/* Assistente: copiar ou baixar a conversa aberta */
.talk-acts { display: flex; gap: 8px; justify-content: flex-end; padding: 10px 20px 0; }
.talk-acts .btn { min-height: 32px; padding: 0 12px; font-size: 0.8125rem; }

/* Base de conhecimento: filtros e ordem */
.kb-filters { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 4px 0 14px; }
.kb-filters select { width: auto; min-width: 160px; }
.kb-filters .kb-unused { min-height: 36px; padding: 0 6px; }

/* Backup externo: código de autorização do Google */
.g-code { margin: 4px 0; font: 700 1.75rem/1.2 ui-monospace, Consolas, monospace; letter-spacing: 0.12em; text-align: center; }

/* Backup externo: chave do envio automático */
.ext-onoff { margin: 4px 0 12px; }
.ext-onoff .check { align-items: flex-start; }
.ext-onoff .check input { margin-top: 3px; }

/* Backup externo: andamento do envio */
.ext-prog { margin: 8px 0 0 28px; max-width: 560px; }
.ext-prog .bg { height: 6px; border-radius: 9999px; background: var(--line); overflow: hidden; }
.ext-prog .bg i { display: block; height: 100%; background: var(--ok); transition: width 0.4s; }

/* Início: primeiros passos (administrador) */
.setup-card { grid-column: 1 / -1; }
.setup-h { display: flex; align-items: center; gap: 12px; font-size: 0.875rem; }
.setup-h .bg { flex: 1; max-width: 320px; height: 6px; border-radius: 9999px; background: var(--line); overflow: hidden; }
.setup-h .bg i { display: block; height: 100%; background: var(--ok); }
ul.setup { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 10px 20px; }
ul.setup li { display: flex; gap: 10px; align-items: flex-start; }
ul.setup .setup-i { flex: none; width: 20px; height: 20px; border-radius: 9999px; border: 2px solid var(--line2); display: grid; place-items: center; font-size: 0.75rem; font-weight: 700; }
ul.setup li.ok .setup-i { border-color: var(--ok); background: var(--ok); color: var(--bg); }
ul.setup li.unk .setup-i { border-color: var(--warn); color: var(--warn); }
ul.setup li.ok .setup-t { color: var(--tx2); }
ul.setup .setup-t { font-weight: 600; }
ul.setup small { display: block; margin-top: 2px; }

/* Backups: andamento */
ul.bk-steps { grid-template-columns: 1fr; }
ul.setup li.cur .setup-i { border-color: transparent; color: var(--accent); }
ul.setup li.cur .setup-t { color: var(--tx); }
ul.setup li:not(.ok):not(.cur) .setup-t { color: var(--tx2); font-weight: 400; }
.bk-run { border-left: 3px solid var(--accent); }
.bk-new { padding: 1px 8px; border-radius: 9999px; background: color-mix(in srgb, var(--ok) 16%, transparent); color: var(--ok); font-weight: 600; }

/* Minha conta: códigos de recuperação e sessões */
.rc-list { display: grid; grid-template-columns: repeat(2, minmax(0, max-content)); gap: 6px 28px; margin: 4px 0; padding-left: 26px; font-family: ui-monospace, Consolas, monospace; font-size: 1rem; letter-spacing: 0.06em; }
.rc-list li::marker { color: var(--tx2); font-size: 0.8125rem; }
.card.wide { margin-top: 16px; }
h3.sub { margin: 8px 0 0; font-size: 0.9375rem; }

/* Login: marca neutra (ícone e nome) quando não há logo configurado */
.gate-logos { display: contents; }
.gate-mark { display: inline-flex; align-items: center; gap: 10px; color: var(--g-tx, var(--tx)); font-size: 1.25rem; font-weight: 700; letter-spacing: -0.01em; }
.gate-top .gate-mark img { width: 36px; height: 36px; border-radius: 9px; }
.gate-hint { color: var(--g-tx2, var(--tx2)); font-size: 0.875rem; }
