/* AFServiceAcs — painel. 2026-11-13 — AFService (solicitante Adrian).
   Estilo "framed-sheet": moldura azul-acinzentada (tom da marca AFService) em L com a barra de cima, folha branca
   recuada 8px à direita e embaixo, sem sombra. Cor só nos dados: azul AFService no principal; vermelho só no logo.
   Grade: folha com 24px de padding; colunas com um único vão de 16px. */
:root {
  --chrome: #eef2f7;
  --surface: #ffffff;
  --raised: #f5f7fa;
  --active: #e3e8ef;
  --border: #e4e8ee;
  --rule: #eef1f4;
  --control: #cdd4de;
  --text: #0b1626;
  --muted: #536072;
  --faint: #677285;
  --accent: #1f63d6;
  --accent-pale: #e8f0fd;
  --primary: #0b1626;
  --primary-ink: #ffffff;
  --brand: #ff3046;
  --positive: #1f7a4c; --negative: #c4242a; --warning: #8a4a07;
  --pill-positive-bg: #dcf5e6; --pill-positive-ink: #0d3a22;
  --pill-negative-bg: #ffe9e7; --pill-negative-ink: #7e1a1d;
  --pill-warning-bg: #fff4dc; --pill-warning-ink: #7a3f05;
  --pill-neutral-bg: #eceff3; --pill-neutral-ink: #333c4a;
  --pill-accent-bg: #e8f0fd; --pill-accent-ink: #123f8a;
  --font: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, Consolas, monospace; /* taste-skill-ignore: só serial, MAC, IP e nomes de parâmetro (folha framed-sheet) */
  --fs-title: 22px; --fs-section: 16px; --fs-kpi: 28px; --fs-body: 14px; --fs-small: 12px;
  --sidebar: 228px; --top: 48px; --pad: 24px; --gap: 16px; --card-pad: 20px;
  --r-sheet: 16px; --r-card: 8px; --r-control: 6px; --ctl: 32px; --row: 48px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --sheet-edge: #e6e9ee; --primary-hover: #1c2b44; --field: #ffffff; --field-edge: #dfe3e9; --well: #fafbfc;
  --z-ruim: #fbecec; --z-fraco: #fdf4e3; --z-bom: #eef4fd; --z-otimo: #e9f6ef; --dot-ring: rgba(11,22,38,.18);
  --weak: #b46a0a; --toast: #0b1626;
  --logo: url(logo-marca-claro.png);
  color-scheme: light;
}

/* tema escuro: segue o sistema, ou o que a pessoa escolheu no menu */
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) {
  --chrome: #0a0a0a; --surface: #111111; --raised: #1a1a1a; --active: #262626; --border: #262626; --rule: #1f1f1f;
  --control: #404040; --text: #fafafa; --muted: #b4b4b4; --faint: #949494; --accent: #5b8def; --accent-pale: #16233b;
  --primary: #fafafa; --primary-ink: #0a0a0a; --primary-hover: #ffffff; --negative: #e5566f; --positive: #3fc07a;
  --pill-positive-bg: #12271b; --pill-positive-ink: #6fd69c; --pill-negative-bg: #2c161b; --pill-negative-ink: #f08a9c;
  --pill-warning-bg: #2b2212; --pill-warning-ink: #e0a43a; --pill-neutral-bg: #222222; --pill-neutral-ink: #d4d4d4;
  --pill-accent-bg: #16233b; --pill-accent-ink: #9dbcf6;
  --sheet-edge: #1f1f1f; --field: #0a0a0a; --field-edge: #333333; --well: #161616;
  --z-ruim: #2c1619; --z-fraco: #2a2112; --z-bom: #141f33; --z-otimo: #11241a; --dot-ring: rgba(0,0,0,.6);
  --weak: #e0a43a; --toast: #262626;
  --logo: url(logo-marca.png);
  color-scheme: dark;
} }
:root[data-theme="dark"] {
  --chrome: #0a0a0a; --surface: #111111; --raised: #1a1a1a; --active: #262626; --border: #262626; --rule: #1f1f1f;
  --control: #404040; --text: #fafafa; --muted: #b4b4b4; --faint: #949494; --accent: #5b8def; --accent-pale: #16233b;
  --primary: #fafafa; --primary-ink: #0a0a0a; --primary-hover: #ffffff; --negative: #e5566f; --positive: #3fc07a;
  --pill-positive-bg: #12271b; --pill-positive-ink: #6fd69c; --pill-negative-bg: #2c161b; --pill-negative-ink: #f08a9c;
  --pill-warning-bg: #2b2212; --pill-warning-ink: #e0a43a; --pill-neutral-bg: #222222; --pill-neutral-ink: #d4d4d4;
  --pill-accent-bg: #16233b; --pill-accent-ink: #9dbcf6;
  --sheet-edge: #1f1f1f; --field: #0a0a0a; --field-edge: #333333; --well: #161616;
  --z-ruim: #2c1619; --z-fraco: #2a2112; --z-bom: #141f33; --z-otimo: #11241a; --dot-ring: rgba(0,0,0,.6);
  --weak: #e0a43a; --toast: #262626;
  --logo: url(logo-marca.png);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--chrome); color: var(--text); font: var(--fs-body)/20px var(--font); -webkit-font-smoothing: antialiased; }
h1, h2, h3, p, ul, ol, dl, dd, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
button, input, select { font: inherit; color: inherit; }
a { color: inherit; text-decoration: none; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
.num, table, .kpi-value { font-variant-numeric: tabular-nums; }
.mono { font-family: var(--mono); font-size: 13px; }
.muted { color: var(--muted); }
.faint { color: var(--faint); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
[hidden] { display: none !important; }

/* ---------- moldura em L ---------- */
.app { display: grid; grid-template-columns: var(--sidebar) minmax(0, 1fr); grid-template-rows: var(--top) minmax(0, 1fr); min-height: 100svh; }
.side { grid-row: 1 / 3; display: flex; flex-direction: column; gap: 2px; padding: 12px 12px 16px; position: sticky; top: 0; height: 100svh; }
.brand { display: flex; align-items: center; gap: 10px; padding: 0 8px; margin-bottom: 4px; }
/* 2026-11-15 — AFService (solicitante Adrian): a marca inteira (pássaro + AF SERVICE), escrita clara ou escura conforme o tema */
.brand-mark { display: block; flex: none; width: 164px; aspect-ratio: 1335 / 500; background: var(--logo) no-repeat center / contain; }
.brand-name { font-weight: 700; letter-spacing: -0.01em; }
.scope { margin: 0 8px 14px; font-size: var(--fs-small); color: var(--muted); }
.nav-item { display: flex; align-items: center; gap: 10px; height: 32px; padding: 0 10px; border-radius: var(--r-control); color: var(--muted); font-weight: 500; transition: background-color .15s, color .15s; }
.nav-item:hover { background: var(--active); color: var(--text); }
.nav-item[aria-current="page"] { background: var(--active); color: var(--text); }
.nav-count { margin-left: auto; font-size: var(--fs-small); color: var(--muted); }
.nav-ico { flex: none; opacity: .85; }
.nav-item[aria-current="page"] .nav-ico { opacity: 1; }
.nav-txt { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.side-foot { margin-top: auto; padding: 8px; font-size: var(--fs-small); color: var(--muted); display: grid; gap: 6px; }
.side-foot button { justify-self: start; border: 0; background: none; padding: 0; color: var(--muted); cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }

.top { display: flex; align-items: center; justify-content: center; gap: 12px; padding: 0 16px 0 0; position: relative; }
.top-search { width: min(548px, 100%); height: 32px; border: 1px solid var(--control); border-radius: var(--r-control); background: var(--surface); padding: 0 12px 0 34px; outline: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%238a96a8' stroke-width='2'%3E%3Ccircle cx='7' cy='7' r='5'/%3E%3Cpath d='m11 11 3 3'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: 11px 8px; }
.top-search:focus { border-color: var(--accent); }
.top-who { position: absolute; right: 16px; font-size: var(--fs-small); color: var(--muted); }

.sheet { background: var(--surface); border: 1px solid var(--sheet-edge); border-radius: var(--r-sheet); margin: 0 8px 8px 0; padding: var(--pad); min-width: 0; }
.top .menu-toggle { display: none; }
@media (max-width: 1000px) { .hide-md { display: none; } }

/* ---------- título, abas, botões ---------- */
.crumbs { display: flex; align-items: center; gap: 8px; font-size: 16px; font-weight: 600; min-height: 32px; flex-wrap: wrap; }
.crumbs a { color: var(--muted); }
.crumbs a:hover { color: var(--text); }
.crumb-sep { color: var(--faint); }
.title-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
h1 { font-size: var(--fs-title); line-height: 28px; font-weight: 600; letter-spacing: -0.01em; }
.crumbs h1 { font-size: 16px; line-height: 24px; }
.chip { display: inline-flex; align-items: center; height: 24px; padding: 0 8px; border-radius: 6px; background: var(--raised); color: var(--muted); font-size: var(--fs-small); font-weight: 500; }
.finding { margin-top: 6px; color: var(--muted); }
.finding strong { color: var(--text); font-weight: 600; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; }
.btn { height: var(--ctl); padding: 0 12px; border-radius: var(--r-control); border: 1px solid var(--control); background: var(--surface); font-weight: 500; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; transition: background-color .15s, border-color .15s, transform .12s; }
.btn:hover { background: var(--raised); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .5; cursor: default; transform: none; }
.btn-primary { background: var(--primary); border-color: var(--primary); color: var(--primary-ink); }
.btn-primary:hover { background: var(--primary-hover); }
.btn-danger { color: var(--negative); }
.btn-danger:hover { background: var(--pill-negative-bg); }
.btn-text { border-color: transparent; background: none; color: var(--accent); padding: 0 6px; }
.btn-text:hover { background: var(--accent-pale); }
.tabs { display: flex; gap: 20px; border-bottom: 1px solid var(--border); margin: 16px calc(-1 * var(--pad)) 0; padding: 0 var(--pad); overflow-x: auto; scrollbar-width: none; }
.tab { position: relative; height: 40px; display: inline-flex; align-items: center; color: var(--muted); font-weight: 500; white-space: nowrap; cursor: pointer; border: 0; background: none; padding: 0; }
.tab:hover { color: var(--text); }
.tab[aria-selected="true"] { color: var(--text); }
.tab[aria-selected="true"]::after { content: ""; position: absolute; left: -4px; right: -4px; bottom: -1px; height: 2px; background: var(--text); border-radius: 2px; }
.tab .num { margin-left: 6px; color: var(--faint); font-weight: 400; }
.toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 22px 0 8px; flex-wrap: wrap; }
.search { height: 32px; width: 300px; max-width: 100%; border: 1px solid var(--control); border-radius: var(--r-control); padding: 0 10px; outline: none; }
.search:focus, .input:focus { border-color: var(--accent); }
.stamp { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 13px; }

.andamento { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 12px; padding: 10px 14px; border-radius: 8px; background: var(--accent-pale); }

/* ---------- pills ---------- */
.pill { display: inline-flex; align-items: center; gap: 6px; height: 22px; padding: 0 8px; border-radius: 999px; font-size: var(--fs-small); font-weight: 500; white-space: nowrap; background: var(--pill-neutral-bg); color: var(--pill-neutral-ink); }
.pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: .8; }
.pill.ok { background: var(--pill-positive-bg); color: var(--pill-positive-ink); }
.pill.bad { background: var(--pill-negative-bg); color: var(--pill-negative-ink); }
.pill.warn { background: var(--pill-warning-bg); color: var(--pill-warning-ink); }
.pill.acc { background: var(--pill-accent-bg); color: var(--pill-accent-ink); }
.pill.plain::before { display: none; }

/* ---------- tabela ---------- */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th { text-align: left; font-size: var(--fs-small); font-weight: 500; color: var(--muted); padding: 8px 12px; white-space: nowrap; }
td { padding: 0 12px; height: var(--row); border-top: 1px solid var(--rule); vertical-align: middle; }
th:first-child, td:first-child { padding-left: 0; }
th:last-child, td:last-child { padding-right: 0; }
td.r, th.r { text-align: right; }
tbody tr.link { cursor: pointer; transition: background-color .15s; }
tbody tr.link:hover { background: var(--raised); }
.cell-main { font-weight: 500; }
.cell-sub { font-size: var(--fs-small); color: var(--muted); }
.empty { padding: 32px 0; color: var(--muted); }
.empty strong { display: block; color: var(--text); font-weight: 600; margin-bottom: 4px; }

/* ---------- grade da ficha ---------- */
.grid { display: grid; gap: var(--gap); grid-template-columns: repeat(12, minmax(0, 1fr)); margin-top: 24px; }
.c4 { grid-column: span 4; } .c5 { grid-column: span 5; } .c6 { grid-column: span 6; } .c7 { grid-column: span 7; } .c8 { grid-column: span 8; } .c12 { grid-column: span 12; }
.card { border: 1px solid var(--border); border-radius: var(--r-card); padding: var(--card-pad); min-width: 0; display: flex; flex-direction: column; gap: 14px; }
.card-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.card-head h2 { font-size: var(--fs-section); line-height: 22px; font-weight: 600; }
.card-head .meta { font-size: var(--fs-small); color: var(--muted); }
.kpis { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--gap); margin-top: 24px; }
.kpi { border: 1px solid var(--border); border-radius: var(--r-card); padding: 16px var(--card-pad); }
.kpi-value { font-size: var(--fs-kpi); line-height: 34px; font-weight: 400; letter-spacing: -0.02em; }
.kpi-value small { font-size: 15px; color: var(--muted); margin-left: 4px; letter-spacing: 0; }
.kpi-label { font-weight: 600; margin-top: 2px; }
.kpi-sub { font-size: 13px; color: var(--muted); margin-top: 2px; }
.kv { display: grid; grid-template-columns: minmax(110px, 40%) 1fr; gap: 8px 12px; }
.kv dt { color: var(--muted); }
.kv dd { min-width: 0; overflow-wrap: anywhere; }

/* ---------- mapa do sinal da casa ---------- */
.signal { display: grid; gap: 18px; }
.band-head { display: flex; justify-content: space-between; font-size: 13px; color: var(--muted); margin-bottom: 6px; }
.band-head strong { color: var(--text); font-weight: 600; }
.scale { position: relative; height: 54px; border-radius: 6px; display: flex; }
.zone { height: 100%; }
.z-ruim { width: 16.66%; background: var(--z-ruim); border-radius: 6px 0 0 6px; }
.z-fraco { width: 16.67%; background: var(--z-fraco); }
.z-bom { width: 16.67%; background: var(--z-bom); }
.z-otimo { width: 50%; background: var(--z-otimo); border-radius: 0 6px 6px 0; }
.scale-zones { display: grid; grid-template-columns: 16.66% 16.67% 16.67% 50%; font-size: 11px; color: var(--muted); margin-top: 4px; }
.scale-zones span:last-child { text-align: right; }
.dot { position: absolute; top: 50%; width: 12px; height: 12px; margin: -6px 0 0 -6px; border-radius: 50%; background: var(--accent); border: 2px solid var(--surface); outline: 1px solid var(--dot-ring); cursor: default; transition: transform .15s var(--ease); }
.dot:hover, .dot:focus { transform: scale(1.35); z-index: 2; }
.dot.fraco { background: var(--weak); } .dot.ruim { background: var(--negative); }
.dot-label { position: absolute; top: -2px; transform: translateX(-50%); font-size: 11px; color: var(--muted); white-space: nowrap; pointer-events: none; }
.tick { position: absolute; bottom: -18px; transform: translateX(-50%); font-size: 11px; color: var(--faint); }

/* ---------- sinal na tabela ---------- */
.bar { display: inline-block; width: 64px; height: 6px; border-radius: 3px; background: var(--rule); vertical-align: middle; margin-right: 8px; overflow: hidden; }
.bar i { display: block; height: 100%; background: var(--accent); border-radius: 3px; }
.bar.fraco i { background: var(--weak); } .bar.ruim i { background: var(--negative); }

/* ---------- formulários ---------- */
.form { display: grid; gap: 16px; }
.field { display: grid; gap: 8px; }
.field label { font-weight: 500; }
.field .hint { font-size: var(--fs-small); color: var(--muted); }
.input, select.input { height: 40px; border: 1px solid var(--field-edge); border-radius: 10px; padding: 0 12px; background: var(--field); outline: none; width: 100%; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.switch { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.toggle { position: relative; width: 32px; height: 18px; flex: none; }
.toggle input { position: absolute; inset: 0; opacity: 0; cursor: pointer; margin: 0; }
.toggle span { position: absolute; inset: 0; border-radius: 999px; background: var(--control); transition: background-color .15s; pointer-events: none; }
.toggle span::after { content: ""; position: absolute; top: 2px; left: 2px; width: 14px; height: 14px; border-radius: 50%; background: #fff; transition: transform .15s var(--ease); }
.toggle input:checked + span { background: var(--accent); }
.toggle input:checked + span::after { transform: translateX(14px); }
.toggle input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.note { font-size: 13px; color: var(--muted); }
.result { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.result .kpi-value { font-size: 22px; line-height: 28px; }
.result .kpi-label { font-weight: 500; color: var(--muted); font-size: 13px; }

/* ---------- configurações ---------- */
.settings { max-width: 1152px; }
.set-row { display: grid; grid-template-columns: 400px minmax(0, 1fr); gap: 32px; padding: 32px 0; border-top: 1px solid var(--border); }
.set-row:first-of-type { border-top: 0; }
.set-row h2 { font-size: 16px; font-weight: 500; margin-top: 6px; }
.set-row p { color: var(--muted); margin-top: 4px; }
.set-panel { background: var(--well); border-radius: 16px; padding: 16px; display: grid; gap: 16px; }

/* ---------- avisos e diálogo ---------- */
.toast { position: fixed; right: 24px; bottom: 24px; max-width: 420px; background: var(--toast); color: #fff; padding: 12px 16px; border-radius: 8px; box-shadow: 0 8px 24px rgba(11,22,38,.24); z-index: 30; transform: translateY(16px); opacity: 0; transition: transform .2s var(--ease), opacity .2s; }
.toast.on { transform: none; opacity: 1; }
.toast.err { background: var(--negative); }
dialog { border: 1px solid var(--border); background: var(--surface); color: var(--text); border-radius: 12px; padding: 24px; max-width: 460px; width: calc(100% - 32px); box-shadow: 0 16px 48px rgba(11,22,38,.28); }
dialog::backdrop { background: rgba(11,22,38,.35); }
dialog h2 { font-size: 18px; margin-bottom: 8px; }
dialog p { color: var(--muted); }
dialog .actions { justify-content: flex-end; margin-top: 20px; }
.skeleton { height: 14px; border-radius: 4px; background: var(--raised); animation: pulse 1.2s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .5; } }
.working { display: inline-flex; align-items: center; gap: 8px; color: var(--muted); font-size: 13px; }
.working::before { content: ""; width: 12px; height: 12px; border-radius: 50%; border: 2px solid var(--control); border-top-color: var(--accent); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- entrar ---------- */
.login { min-height: 100svh; display: grid; place-items: center; padding: 16px; }
.login-box { width: min(400px, 100%); background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: 28px; display: grid; gap: 18px; }

/* ---------- tablet e celular ---------- */
@media (max-width: 1100px) {
  .c4, .c5, .c6, .c7, .c8 { grid-column: span 12; }
  .set-row { grid-template-columns: 1fr; gap: 12px; }
}
@media (max-width: 760px) {
  .app { grid-template-columns: 1fr; grid-template-rows: var(--top) auto; }
  .side { position: fixed; inset: 0 auto 0 0; width: 260px; z-index: 20; background: var(--chrome); transform: translateX(-100%); transition: transform .2s var(--ease); box-shadow: 0 0 0 100vmax rgba(11,22,38,0); }
  .side.open { transform: none; box-shadow: 0 0 0 100vmax rgba(11,22,38,.35); }
  .top .menu-toggle { display: inline-flex; position: absolute; left: 8px; }
  .top { padding: 0 12px 0 52px; }
  .top-who { display: none; }
  .sheet { margin: 0; border-radius: 0; border-width: 1px 0 0; padding: 16px; }
  .tabs { margin: 12px -16px 0; padding: 0 16px; }
  .kpis { grid-template-columns: 1fr; }
  .result { grid-template-columns: 1fr 1fr; }
  .row2 { grid-template-columns: 1fr; }
  .hide-sm { display: none; }
  .search { width: 100%; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }

/* ---------- chave de tema ---------- */
.tema { display: inline-flex; gap: 2px; padding: 2px; border-radius: 8px; background: var(--active); width: max-content; }
.tema button { border: 0; background: none; padding: 3px 8px; border-radius: 6px; font-size: 12px; color: var(--muted); cursor: pointer; text-decoration: none; }
.tema button[aria-pressed="true"] { background: var(--surface); color: var(--text); }

/* ---------- aparelhos com ícone ---------- */
.aparelho { display: flex; align-items: center; gap: 12px; }
.ico-wrap { width: 36px; height: 36px; flex: none; border-radius: 10px; background: var(--raised); color: var(--muted); display: grid; place-items: center; }
.nota { display: inline-block; min-width: 34px; padding: 2px 6px; border-radius: 6px; text-align: center; font-weight: 600; background: var(--raised); }

/* ---------- KPIs em 4, portas, gráficos ---------- */
.kpis4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 1100px) { .kpis4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 760px) { .kpis4 { grid-template-columns: 1fr; } }
.portas { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.porta { display: grid; justify-items: center; gap: 4px; padding: 10px 4px; border-radius: 8px; background: var(--raised); font-size: 12px; text-align: center; }
.porta-ico { width: 26px; height: 20px; border: 2px solid var(--control); border-radius: 3px; position: relative; }
.porta-ico::after { content: ""; position: absolute; left: 6px; right: 6px; bottom: -2px; height: 6px; border: 2px solid var(--control); border-bottom: 0; background: var(--raised); }
.porta.on .porta-ico, .porta.on .porta-ico::after { border-color: var(--positive); }
.grafico { min-height: 120px; }
.g-svg { width: 100%; height: auto; display: block; overflow: visible; }
.g-grade { stroke: var(--rule); stroke-width: 1; }
.g-eixo { fill: var(--faint); font-size: 11px; font-family: var(--font); }
.g-linha { fill: none; stroke: var(--accent); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.g-area { fill: var(--accent); opacity: .10; }
.g-ponto { fill: var(--accent); stroke: var(--surface); stroke-width: 2; }
.g-barra { fill: var(--accent); }
.g-barra2 { fill: var(--control); }
.g-agora { font-size: 13px; color: var(--muted); margin-top: 6px; }
.g-agora strong { color: var(--text); }
.g-leg { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 6px; vertical-align: -1px; }
.g-leg1 { background: var(--accent); } .g-leg2 { background: var(--control); margin-left: 4px; }

/* ---------- o que cada perfil vê (o servidor confere de novo) ---------- */
html[data-perfil="leitura"] .p-suporte, html:not([data-perfil="admin"]) .p-admin { display: none !important; }

/* ---------- restauração ---------- */
.restaura { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-top: 12px; padding: 14px 16px; border-radius: 8px; background: var(--pill-warning-bg); color: var(--pill-warning-ink); }
.restaura .note { color: inherit; opacity: .85; margin-top: 2px; }
.opcao { display: flex; gap: 10px; align-items: flex-start; padding: 8px 0; cursor: pointer; }
.opcao input { margin-top: 3px; accent-color: var(--accent); }
.opcao > span { display: grid; gap: 2px; }

.erp-busca { display: grid; grid-template-columns: auto 1fr; gap: 8px; align-items: start; }
.erp-busca .btn { height: 32px; padding: 0 8px; }

/* ======================================================================= 2026-11-13 — AFService (solicitante Adrian)
   Dashboard, janelas pop-up e seletores horizontais, no jeito do AFService Ops (cartões, rosca, barras deitadas). */
.secao { margin: 28px 0 10px; font-size: 14px; font-weight: 600; color: var(--text); }
.rotulo { font-weight: 500; }
.btn-ico { flex: none; width: var(--ctl); height: var(--ctl); padding: 0; justify-content: center; }
#jan-fechar { border-color: transparent; background: transparent; color: var(--muted); border-radius: 8px; margin: -4px -8px 0 0; }
#jan-fechar:hover { background: var(--active); color: var(--text); }
.actions.fim { justify-content: flex-end; }

/* dropdown com seta própria */
select.input { appearance: none; -webkit-appearance: none; padding-right: 36px; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='none' stroke='%238a96a8' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='m3 4.5 3 3 3-3'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center; }
.input:hover { border-color: var(--control); }

/* chave liga/desliga (bolinha) um pouco maior */
.toggle { width: 40px; height: 22px; }
.toggle span::after { width: 18px; height: 18px; }
.toggle input:checked + span::after { transform: translateX(18px); }
.chave { padding: 12px 14px; border: 1px solid var(--border); border-radius: 10px; background: var(--well); cursor: pointer; }
.chave > span:first-child { display: grid; gap: 2px; }

/* seletor horizontal com bolinha */
.seg { display: inline-flex; flex-wrap: wrap; gap: 4px; padding: 4px; border-radius: 10px; background: var(--well); border: 1px solid var(--border); width: max-content; max-width: 100%; }
.seg-op { position: relative; cursor: pointer; }
.seg-op input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.seg-op span { display: inline-flex; align-items: center; gap: 8px; height: 30px; padding: 0 12px; border-radius: 7px; color: var(--muted); font-weight: 500; transition: background-color .15s, color .15s; }
.seg-op span::before { content: ""; width: 8px; height: 8px; border-radius: 50%; border: 1.5px solid var(--control); transition: background-color .15s, border-color .15s; }
.seg-op:hover span { color: var(--text); }
.seg-op input:checked + span { background: var(--active); color: var(--text); }
.seg-op input:checked + span::before { background: var(--accent); border-color: var(--accent); }
.seg-op input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 1px; }
.seg-op input:disabled + span { opacity: .6; cursor: default; }

/* janela pop-up */
.janela { max-width: 720px; width: calc(100% - 32px); padding: 0; max-height: calc(100dvh - 48px); overflow: hidden; border-radius: 14px; }
.janela[open] { display: flex; flex-direction: column; animation: surgir .18s var(--ease); }
.janela::backdrop { background: rgba(0,0,0,.62); }
@keyframes surgir { from { opacity: 0; transform: translateY(8px) scale(.985); } }
.jan-cab { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; padding: 20px 24px 16px; border-bottom: 1px solid var(--border); }
.jan-cab h2 { font-size: 18px; margin: 0 0 4px; }
.jan-cab p { color: var(--muted); }
.jan-corpo { padding: 20px 24px 24px; overflow-y: auto; display: grid; gap: 18px; }
.bloco { border: 1px solid var(--border); border-radius: 10px; padding: 14px 16px; background: var(--well); }
.kv2 { display: grid; grid-template-columns: minmax(140px, 45%) 1fr; gap: 10px 16px; }
.kv2 > span { color: var(--muted); }
.kv2 > strong { font-weight: 500; overflow-wrap: anywhere; }
.mini-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.mini-kpis > div { border: 1px solid var(--border); border-radius: 10px; padding: 12px; display: grid; gap: 2px; }
.mini-kpis span { font-size: 12px; color: var(--muted); }
.mini-kpis strong { font-size: 18px; font-weight: 500; }
.provs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.prov { position: relative; cursor: pointer; }
.prov input { position: absolute; opacity: 0; }
.prov > span { display: grid; gap: 6px; justify-items: start; padding: 14px; border: 1px solid var(--border); border-radius: 10px; background: var(--well); height: 100%; transition: border-color .15s, background-color .15s; }
.prov:hover > span { border-color: var(--control); }
.prov input:checked + span { border-color: var(--accent); background: var(--accent-pale); }
.prov input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }

/* configurações em cartões */
.cab-adm { border: 1px solid var(--border); border-radius: 12px; padding: 20px 24px; background: var(--well); display: grid; gap: 4px; }
.cfg-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--gap); }
.cfg-card { text-align: left; display: grid; gap: 8px; align-content: start; padding: 18px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); cursor: pointer; transition: border-color .15s, background-color .15s, transform .15s var(--ease); }
.cfg-card:hover { border-color: var(--control); background: var(--raised); }
.cfg-card:active { transform: translateY(1px); }
.cfg-card > strong { font-size: 15px; margin-top: 6px; }
.cfg-topo { display: flex; justify-content: space-between; align-items: flex-start; }
.cfg-ico { width: 34px; height: 34px; border-radius: 9px; display: grid; place-items: center; }
.cfg-tag { font-size: 12px; font-weight: 500; color: var(--faint); }
.cfg-txt { color: var(--muted); font-size: 13px; }
.cfg-estado:empty { display: none; }
.cfg-abrir { color: var(--accent); font-size: 12px; font-weight: 500; display: inline-flex; align-items: center; gap: 4px; margin-top: 4px; }
.cfg-ico, .dk-ico { background: var(--raised); color: var(--muted); }
:root { --roxo-bg: #ece6fd; --roxo-ink: #4b2aa8; }
:root[data-theme="dark"] { --roxo-bg: #221a3a; --roxo-ink: #b9a5f5; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --roxo-bg: #221a3a; --roxo-ink: #b9a5f5; } }

/* dashboard */
.dash-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; flex-wrap: wrap; }
.tit-linha { display: flex; align-items: center; gap: 10px; }
.chip-vivo { display: inline-flex; align-items: center; gap: 6px; height: 22px; padding: 0 8px; border-radius: 6px; font-size: 12px; font-weight: 600; background: var(--pill-positive-bg); color: var(--pill-positive-ink); }
.chip-vivo::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; animation: pulse 1.6s ease-in-out infinite; }
.chip-caixa { display: inline-flex; align-items: center; gap: 6px; height: var(--ctl); padding: 0 12px; border: 1px solid var(--border); border-radius: var(--r-control); color: var(--muted); font-size: 13px; }
.chip-caixa strong { color: var(--text); font-family: var(--mono); font-weight: 500; }
.dkpis { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: var(--gap); }
.dkpi { display: grid; gap: 4px; align-content: start; padding: 16px; border: 1px solid var(--border); border-radius: 12px; transition: border-color .15s, background-color .15s; }
.dkpi:hover { border-color: var(--control); background: var(--raised); }
.dk-ico { width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center; margin-bottom: 6px; }
.dk-rot { font-size: 13px; font-weight: 500; color: var(--muted); }
.dk-val { font-size: 30px; line-height: 36px; letter-spacing: -0.02em; }
.dk-val small { font-size: 14px; color: var(--muted); margin-left: 2px; }
.dk-sub { font-size: 12px; color: var(--muted); }
.dk-pe { display: flex; justify-content: space-between; align-items: center; margin-top: 8px; padding-top: 10px; border-top: 1px solid var(--rule); font-size: 12px; color: var(--accent); }
.g-dash { margin-top: 0; }
.rosca { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; }
.rosca circle { stroke: var(--rule); }
.r-ok { stroke: var(--positive) !important; } .r-bad { stroke: var(--negative) !important; } .r-acc { stroke: var(--accent) !important; }
.r-warn { stroke: var(--weak) !important; } .r-neu { stroke: var(--control) !important; } .r-vazio { stroke: var(--rule) !important; }
.r-num { fill: var(--text); font-size: 22px; font-weight: 600; font-family: var(--font); }
.r-rot { fill: var(--muted); font-size: 11px; font-family: var(--font); }
.legenda { display: grid; gap: 8px; flex: 1; min-width: 150px; }
.legenda li { display: grid; grid-template-columns: 10px 1fr auto 36px; align-items: center; gap: 8px; font-size: 13px; }
.legenda .faint { text-align: right; font-size: 12px; }
.bola { width: 9px; height: 9px; border-radius: 50%; }
.bola.r-ok { background: var(--positive); } .bola.r-bad { background: var(--negative); } .bola.r-acc { background: var(--accent); }
.bola.r-warn { background: var(--weak); } .bola.r-neu { background: var(--control); }
.hbarras { display: grid; gap: 10px; }
.hbarras li { display: grid; grid-template-columns: minmax(80px, 38%) 1fr auto; align-items: center; gap: 10px; font-size: 13px; }
.hb-nome { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); }
.hb-trilho { position: relative; height: 10px; border-radius: 5px; background: var(--rule); overflow: hidden; }
.hb-trilho i, .hb-trilho b { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 5px; }
.hb-trilho i { background: var(--control); } .hb-trilho b { background: var(--accent); }
.hb-n { min-width: 44px; text-align: right; }
.lista-at, .linha-tempo { display: grid; }
.lista-at a { display: grid; grid-template-columns: 30px 1fr 16px; align-items: center; gap: 12px; padding: 10px 6px; border-top: 1px solid var(--rule); border-radius: 6px; color: var(--muted); }
.lista-at li:first-child a { border-top: 0; }
.lista-at a:hover { background: var(--raised); }
.lista-at strong { display: block; color: var(--text); font-weight: 500; }
.at-ico { width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center; }
.at-ico.bad { background: var(--pill-negative-bg); color: var(--pill-negative-ink); } .at-ico.warn { background: var(--pill-warning-bg); color: var(--pill-warning-ink); }
.linha-tempo li { display: grid; grid-template-columns: 48px 1fr; gap: 12px; padding: 9px 0; border-top: 1px solid var(--rule); }
.linha-tempo li:first-child { border-top: 0; }
.lt-hora { font-family: var(--mono); font-size: 12px; color: var(--accent); padding-top: 1px; }
.linha-tempo strong { display: block; font-weight: 500; }
.linha-tempo a { color: var(--accent); }
.tiles { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: var(--gap); }
.tile { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-radius: 12px; border: 1px solid var(--border); transition: filter .15s; }
.tile:hover { filter: brightness(1.08); }
.tile strong { display: block; font-size: 22px; line-height: 26px; font-weight: 600; }
.tile span span { font-size: 12px; }
.tile-ico { width: 32px; height: 32px; border-radius: 8px; display: grid; place-items: center; border: 1px solid currentColor; opacity: .9; flex: none; }
.tile.bad { background: var(--pill-negative-bg); color: var(--pill-negative-ink); border-color: transparent; }
.tile.warn { background: var(--pill-warning-bg); color: var(--pill-warning-ink); border-color: transparent; }
.tile.acc { background: var(--pill-accent-bg); color: var(--pill-accent-ink); border-color: transparent; }
.tile.neu { color: var(--muted); }

@media (max-width: 1100px) {
  .dkpis, .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cfg-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  .dkpis, .tiles, .cfg-grid, .provs { grid-template-columns: 1fr; }
  .mini-kpis { grid-template-columns: 1fr 1fr; }
  .jan-cab, .jan-corpo { padding-left: 16px; padding-right: 16px; }
  .kv2 { grid-template-columns: 1fr; gap: 2px 0; }
  .kv2 > strong { margin-bottom: 8px; }
}

/* ---------- ficha do equipamento (resumo no estilo do ACS do IXC, mais completo) ---------- */
.crumbs.mini { font-size: 13px; font-weight: 500; min-height: 20px; margin-bottom: 10px; }
.crumbs.mini span:last-child { color: var(--text); }
.eq-cab { display: flex; align-items: center; gap: 16px; padding: 16px 18px; border: 1px solid var(--border); border-radius: 12px; background: var(--well); flex-wrap: wrap; }
.eq-ico { width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center; background: var(--raised); color: var(--muted); border: 1px solid var(--border); flex: none; }
.eq-ico.on { color: var(--accent); }
.eq-id { flex: 1; min-width: 260px; display: grid; gap: 6px; }
.eq-id h1 { font-size: 19px; line-height: 24px; }
.eq-meta { display: flex; flex-wrap: wrap; gap: 6px 18px; color: var(--muted); font-size: 12px; }
.eq-m { display: inline-flex; align-items: center; gap: 6px; }
.eq-m .mono { font-size: 12px; color: var(--text); }
.eq-acoes { display: flex; gap: 8px; flex-wrap: wrap; }
.eq-flags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.flag { display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 10px; border-radius: 999px; font-size: 12px; font-weight: 600; border: 1px solid transparent; }
.flag::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.flag.ok { background: var(--pill-positive-bg); color: var(--pill-positive-ink); }
.flag.bad { background: var(--pill-negative-bg); color: var(--pill-negative-ink); }
.flag.warn { background: var(--pill-warning-bg); color: var(--pill-warning-ink); }
.flag.acc { background: var(--pill-accent-bg); color: var(--pill-accent-ink); }
.flag.neu { background: var(--pill-neutral-bg); color: var(--pill-neutral-ink); }
.conteudo { margin-top: 4px; }
.c3 { grid-column: span 3; }
.g-ficha { margin-top: 20px; }
.g-ficha .card { background: var(--surface); }
.card-head h2 { display: inline-flex; align-items: center; gap: 8px; }
.card-head .seg { padding: 3px; }
.card-head .seg-op span { height: 26px; padding: 0 10px; font-size: 12px; }

.copiar { border: 0; background: none; color: var(--faint); cursor: pointer; padding: 4px; border-radius: 6px; display: inline-grid; place-items: center; transition: color .15s, background-color .15s; }
.copiar:hover { color: var(--text); background: var(--active); }

.info2 { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 14px; }
.info-lista, .dg-lista { display: grid; gap: 8px; }
.info-lista li, .dg-lista li { display: grid; grid-template-columns: 30px minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 10px; background: var(--well); border: 1px solid var(--rule); }
.li-ico { width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center; color: var(--muted); background: var(--raised); }
.li-txt { display: grid; min-width: 0; }
.li-txt strong { font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.li-txt span { font-size: 11px; color: var(--muted); }
.info-lado { display: grid; gap: 14px; align-content: start; }
.mini-tit { display: block; font-size: 12px; font-weight: 600; color: var(--muted); margin-bottom: 8px; }
.mini-portas { display: flex; gap: 6px; flex-wrap: wrap; }
.mp { display: grid; justify-items: center; gap: 2px; width: 40px; padding: 6px 0 4px; border-radius: 8px; border: 1px solid var(--border); color: var(--faint); }
.mp small { font-size: 10px; }
.mp.on { color: var(--positive); border-color: var(--positive); background: var(--pill-positive-bg); }
.optico { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.optico > div { padding: 10px; border-radius: 10px; background: var(--well); border: 1px solid var(--rule); display: grid; }
.optico strong { font-size: 18px; font-weight: 500; }
.optico span { font-size: 11px; color: var(--muted); }

.net-ip { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 10px; background: var(--well); border: 1px solid var(--rule); color: var(--muted); }
.net-ip .mono { color: var(--text); font-size: 14px; flex: 1; }
.ponto-ok { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--positive); }
.ponto-ok::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.net-tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.nt { display: grid; grid-template-columns: 16px minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 10px; border-radius: 10px; border: 1px solid var(--rule); color: var(--muted); }
.nt > span { display: grid; min-width: 0; }
.nt strong { color: var(--text); font-weight: 500; font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nt strong.mono { font-size: 12px; }
.nt span span { font-size: 11px; }

.resumo-auto { background: linear-gradient(var(--accent-pale), var(--accent-pale)) padding-box; border-color: var(--accent-pale); }
.g-ficha .resumo-auto { background: var(--well); border-color: var(--border); }
.resumo-txt { display: grid; gap: 8px; font-size: 13px; line-height: 20px; color: var(--muted); }
.resumo-txt strong { color: var(--text); font-weight: 600; }
.resumo-acoes { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: auto; }
.resumo-acoes .btn { justify-content: center; }

.aps2 { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 14px; }
.ap-lista { display: grid; gap: 8px; }
.ap-lista li { display: grid; grid-template-columns: 36px minmax(0, 1fr) 54px; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 10px; border: 1px solid var(--rule); background: var(--well); }
.ap-txt { display: grid; min-width: 0; font-size: 12px; }
.ap-txt strong { font-size: 13px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ap-txt .mono { font-size: 11px; color: var(--muted); }
.banda { font-size: 10px; font-weight: 600; padding: 1px 5px; border-radius: 4px; background: var(--raised); color: var(--muted); margin-left: 4px; vertical-align: 1px; }
.ap-q { font-size: 11px; }
.ap-q.ok { color: var(--positive); } .ap-q.warn { color: var(--weak); } .ap-q.bad { color: var(--negative); } .ap-q.neu { color: var(--muted); }
.ap-nota { display: grid; justify-items: center; gap: 3px; }
.ap-nota strong { font-size: 16px; line-height: 18px; }
.ap-nota i { display: block; width: 100%; height: 4px; border-radius: 2px; background: var(--rule); position: relative; overflow: hidden; }
.ap-nota.ok strong { color: var(--positive); } .ap-nota.warn strong { color: var(--weak); } .ap-nota.bad strong { color: var(--negative); }
.ap-nota.ok i { background: var(--positive); } .ap-nota.warn i { background: var(--weak); } .ap-nota.bad i { background: var(--negative); }
.ap-nota small { font-size: 10px; color: var(--muted); }
.aps-lado { display: grid; gap: 12px; align-content: start; }
.big { display: grid; gap: 4px; padding: 12px; border-radius: 10px; border: 1px solid var(--rule); background: var(--well); }
.big > span:first-child { font-size: 12px; color: var(--muted); }
.big strong { font-size: 30px; line-height: 34px; font-weight: 500; letter-spacing: -0.02em; }
.big strong small { font-size: 13px; color: var(--muted); margin-left: 2px; }
.big strong.ok { color: var(--positive); } .big strong.warn { color: var(--weak); } .big strong.bad { color: var(--negative); }
.trilho { display: block; height: 6px; border-radius: 3px; background: var(--rule); overflow: hidden; }
.trilho i { display: block; height: 100%; border-radius: 3px; background: var(--accent); }
.trilho i.ok { background: var(--positive); } .trilho i.warn { background: var(--weak); } .trilho i.bad { background: var(--negative); }
.spark { margin-top: 4px; min-height: 0; }

.dg-lista li { grid-template-columns: 30px minmax(0, 1fr) 32px; }
.play { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: var(--active); color: var(--text); transition: background-color .15s, transform .12s; }
.play:hover { background: var(--accent); color: #fff; }
.play:active { transform: scale(.95); }
.play.off { opacity: .35; }
.dg.off .li-txt strong { color: var(--muted); }

.redes { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.rede { display: grid; gap: 6px; padding: 12px; border-radius: 10px; border: 1px solid var(--rule); background: var(--well); transition: border-color .15s; }
.rede:hover { border-color: var(--control); }
.rede.off { opacity: .6; }
.rede-top { display: grid; grid-template-columns: 16px minmax(0, 1fr) 8px; align-items: center; gap: 8px; color: var(--muted); }
.rede-top strong { color: var(--text); font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bolinha { width: 8px; height: 8px; border-radius: 50%; }
.bolinha.ok { background: var(--positive); box-shadow: 0 0 0 3px var(--pill-positive-bg); } .bolinha.bad { background: var(--negative); }
.rede-sub { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); }

@media (max-width: 1280px) {
  .g-ficha .c3 { grid-column: span 6; }
  .g-ficha .c5, .g-ficha .c4, .g-ficha .c7 { grid-column: span 6; }
}
@media (max-width: 1100px) {
  .g-ficha .c3, .g-ficha .c4, .g-ficha .c5, .g-ficha .c6, .g-ficha .c7 { grid-column: span 12; }
}
@media (max-width: 760px) {
  .info2, .aps2, .net-tiles, .redes { grid-template-columns: 1fr; }
  .eq-acoes { width: 100%; }
}

.dg-lista .li-txt strong { white-space: normal; }
#cfg-erp { display: grid; gap: 16px; }

/* ---------- 2026-11-13 — AFService: aviso por cima das janelas, selo da marca, WAN, internet e canais ---------- */
.toast[popover] { inset: auto 24px 24px auto; margin: 0; border: 0; overflow: visible; }
.toast[popover]:not(:popover-open) { display: none; }
.ico-wrap { position: relative; }
.selo { position: absolute; right: -5px; bottom: -5px; width: 17px; height: 17px; border-radius: 50%; display: grid; place-items: center;
  font: 700 10px/1 var(--font); color: #fff; background: var(--c, var(--accent)); border: 2px solid var(--surface); }
.mp.wan { border-style: dashed; }
.mp.wan.on { border-style: solid; color: var(--accent); border-color: var(--accent); background: var(--accent-pale); }
.net-acoes { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: auto; padding-top: 4px; }
.v6 { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); }
.canais { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--gap); }
.canal-banda { display: grid; gap: 12px; align-content: start; padding: 16px; border: 1px solid var(--rule); border-radius: 12px; background: var(--well); }
.cb-top { display: flex; justify-content: space-between; align-items: center; }
.cb-num { display: grid; grid-template-columns: auto auto; justify-content: start; gap: 2px 24px; align-items: end; }
.cb-num span { font-size: 12px; color: var(--muted); grid-row: 1; }
.cb-num strong { font-size: 30px; line-height: 34px; font-weight: 500; grid-row: 2; }
.cb-num strong.rec { color: var(--positive); }
.cb-acoes { display: grid; gap: 10px; }
.cb-acoes:empty { display: none; }
.espectro { display: flex; align-items: flex-end; gap: 3px; height: 110px; padding-bottom: 18px; position: relative; }
.esp { flex: 1; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; position: relative; min-width: 0; }
.esp i { display: block; width: 100%; border-radius: 3px 3px 0 0; background: var(--control); }
.esp small { position: absolute; bottom: -17px; font-size: 10px; color: var(--faint); }
.esp.dfs i { opacity: .55; }
.esp.atual i { background: var(--accent); }
.esp.rec i { background: var(--positive); }
.esp.atual small, .esp.rec small { color: var(--text); font-weight: 600; }
@media (max-width: 900px) { .canais { grid-template-columns: 1fr; } }
.mp { width: auto; min-width: 40px; padding: 6px 6px 4px; }
.mp.incerta { border-style: dotted; }
.provs3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 760px) { .provs3 { grid-template-columns: 1fr 1fr; } }

/* ---------- portas físicas (2026-11-13: ícone maior, nome e estado de cada porta) ---------- */
.portas-fis { display: grid; grid-template-columns: repeat(auto-fill, minmax(76px, 1fr)); gap: 8px; }
.pf { position: relative; display: grid; justify-items: center; gap: 2px; padding: 10px 6px 8px; border: 1px solid var(--border); border-radius: 10px; color: var(--faint); background: var(--well); }
.pf strong { font-size: 13px; color: var(--muted); }
.pf-est { font-size: 11px; }
.pf-num { position: absolute; top: 4px; left: 7px; font-size: 10px; font-weight: 600; color: var(--faint); }
.pf.on { color: var(--positive); border-color: var(--positive); background: var(--pill-positive-bg); }
.pf.on strong { color: var(--pill-positive-ink); }
.pf.wan.on { color: var(--accent); border-color: var(--accent); background: var(--accent-pale); }
.pf.wan.on strong { color: var(--pill-accent-ink); }
.pf.incerta { border-style: dotted; }

/* ---------- dropdown próprio ---------- */
.dd { position: relative; }
.dd > select { position: absolute; inset: 0; opacity: 0; pointer-events: none; }
.dd-btn { text-align: left; cursor: pointer; display: flex; align-items: center; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; padding-right: 36px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='none' stroke='%238a96a8' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='m3 4.5 3 3 3-3'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center; }
.dd-btn:disabled { opacity: .6; cursor: default; }
.dd.aberto .dd-btn { border-color: var(--accent);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='none' stroke='%238a96a8' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='m3 7.5 3-3 3 3'/%3E%3C/svg%3E"); }
.dd-lista { display: none; position: fixed; z-index: 60; margin: 0; padding: 4px; overflow-y: auto; background: var(--surface); border: 1px solid var(--border);
  border-radius: 10px; box-shadow: 0 12px 32px rgba(0,0,0,.35); }
.dd.aberto .dd-lista { display: block; animation: surgir .12s var(--ease); }
.dd-lista li { padding: 8px 10px 8px 28px; border-radius: 7px; cursor: pointer; position: relative; white-space: nowrap; }
.dd-lista li.foco, .dd-lista li:hover { background: var(--active); }
.dd-lista li[aria-selected="true"] { color: var(--text); font-weight: 500; }
.dd-lista li[aria-selected="true"]::before { content: ""; position: absolute; left: 8px; top: 50%; width: 14px; height: 14px; margin-top: -7px; background: var(--accent);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5 10 17l9-10'/%3E%3C/svg%3E") center / 14px no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5 10 17l9-10'/%3E%3C/svg%3E") center / 14px no-repeat; }
.dd-lista li[aria-disabled="true"] { opacity: .45; cursor: default; }

/* ---------- diagnóstico rodando na linha do Resumo ---------- */
.dg-lista li { position: relative; overflow: hidden; }
.dg-lista button.play { border: 0; cursor: pointer; }
.dg-lista button.play:disabled { opacity: .5; cursor: default; }
.dg-barra { position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: transparent; display: none; overflow: hidden; }
.dg.rodando .dg-barra { display: block; background: var(--rule); }
.dg-barra i { position: absolute; top: 0; bottom: 0; width: 35%; background: var(--accent); border-radius: 2px; animation: andando 1.2s ease-in-out infinite; }
@keyframes andando { from { left: -35%; } to { left: 100%; } }
.dg.rodando { border-color: var(--accent); }
.dg.rodando .li-ico { color: var(--accent); }
.dg.rodando .dg-sub { color: var(--text); }
.dg.ok .dg-sub { color: var(--positive); }
.dg.erro .dg-sub { color: var(--negative); }
.dg .li-txt span.dg-sub { white-space: normal; }
.dg.na-fila .dg-sub { color: var(--weak); }

/* ---------- OLTs ---------- */
.olt-card { cursor: pointer; }
.olt-card.sel { border-color: var(--accent); background: var(--accent-pale); }
.olt-nums { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; margin-top: 6px; }
.olt-nums span { display: grid; font-size: 11px; color: var(--muted); }
.olt-nums strong { font-size: 18px; color: var(--text); font-weight: 500; }
.olt-nums .ok strong { color: var(--positive); } .olt-nums .bad strong { color: var(--negative); } .olt-nums .warn strong { color: var(--weak); }
.pons { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.pon { display: inline-flex; gap: 8px; align-items: center; padding: 6px 10px; border-radius: 8px; border: 1px solid var(--border); font-size: 12px; color: var(--muted); }
.pon strong { color: var(--text); font-weight: 600; }
.pon.bad { border-color: var(--negative); color: var(--negative); }
.rx.ok { color: var(--positive); } .rx.warn { color: var(--weak); } .rx.bad { color: var(--negative); font-weight: 600; }
.optico strong.ok { color: var(--positive); } .optico strong.warn { color: var(--weak); } .optico strong.bad { color: var(--negative); }
.olt-card .actions { margin-top: 6px; }
.olt-card .actions .btn { gap: 6px; }

.olt-resp { font-size: 12px; color: var(--muted); }
.olt-resp summary { cursor: pointer; color: var(--accent); }
.olt-resp pre { margin: 6px 0 0; max-height: 220px; overflow: auto; padding: 8px; border-radius: 8px; background: var(--chrome); color: var(--text);
  font: 11px/1.4 var(--mono); white-space: pre-wrap; word-break: break-word; }

html[data-perfil="admin"] .sem-p-admin { display: none; }

.erp-linha { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin: -2px 0 10px; }
.g-limite { stroke: var(--negative); stroke-width: 1; stroke-dasharray: 4 3; opacity: .7; }
.olt-nums { grid-template-columns: repeat(auto-fit, minmax(60px, 1fr)); }

.card.pend { margin-bottom: 18px; border-color: color-mix(in srgb, var(--warning, #e0a43a) 45%, var(--border, #333)); }
.pend-vazio { display: flex; align-items: center; gap: 6px; margin: 0 0 12px; }
.at-ico.acc { background: var(--pill-accent-bg); color: var(--pill-accent-ink); }

.pend-vazio { justify-content: space-between; flex-wrap: wrap; }
.card.pend .card-head { gap: 10px; flex-wrap: wrap; }
pre.cmds { background: var(--surface-2, rgba(127,127,127,.08)); border: 1px solid var(--border, rgba(127,127,127,.2)); border-radius: 8px; padding: 10px 12px;
  font: 12px/1.55 var(--mono, ui-monospace, monospace); white-space: pre-wrap; word-break: break-all; max-height: 260px; overflow: auto; margin: 0 0 12px; }

.lista-simples { list-style: none; padding: 0; margin: 0 0 12px; display: grid; gap: 6px; }
.lista-simples li { display: flex; align-items: center; gap: 6px; }

/* 2026-11-13 — AFService: só a logo no menu; respiro entre blocos do dashboard e da OLT */
.brand-so-logo { padding: 6px 8px 0; margin-bottom: 18px; }
.login .brand-so-logo { justify-content: center; margin-bottom: 12px; }
.login .brand-so-logo .brand-mark { width: 208px; }
.dkpis + .grid, .dkpis + .g-dash { margin-top: var(--gap); }
.g-dash + .g-dash { margin-top: var(--gap); }
.cfg-grid + #onus-olt .card.pend, #onus-olt > .card.pend:first-child { margin-top: 20px; }
#onus-olt > .pend-vazio:first-child { margin-top: 18px; }
.card.pend .card-head .meta { margin-right: auto; }

/* alerta de rompimento */
.romp { display: grid; gap: 8px; margin: 0 0 var(--gap); }
.romp-item { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 10px; text-decoration: none; color: inherit;
  background: var(--pill-negative-bg); border: 1px solid color-mix(in srgb, var(--negative) 45%, transparent); }
.romp-item:hover { border-color: var(--negative); }
.romp-ico { color: var(--negative); display: grid; place-items: center; }
.romp-txt { display: grid; gap: 2px; flex: 1; min-width: 0; }
.romp-txt strong { color: var(--pill-negative-ink); }
.romp-txt span { font-size: var(--fs-small); color: var(--muted); overflow-wrap: anywhere; }
.romp .note { margin: 0; }

/* ficha da ONU: abas, checagem do TR-069, aviso de "em teste" */
.abas-onu { margin: -4px 0 14px; }
.checagem { list-style: none; padding: 0; margin: 0 0 12px; display: grid; gap: 8px; }
.checagem li { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--border, rgba(127,127,127,.2)); }
.checagem li > span:last-child { display: grid; gap: 2px; min-width: 0; }
.checagem .ck-ico { width: 24px; height: 24px; border-radius: 7px; display: grid; place-items: center; flex: none; }
.checagem li.ok .ck-ico { background: var(--pill-positive-bg, rgba(63,192,122,.15)); color: var(--positive); }
.checagem li.bad .ck-ico { background: var(--pill-negative-bg); color: var(--negative); }
.checagem li.neu .ck-ico { background: var(--pill-neutral-bg); color: var(--muted); }
.em-teste { display: flex; gap: 6px; align-items: flex-start; border-left: 3px solid var(--warning, #e0a43a); padding-left: 10px; margin-bottom: 12px; }
.em-teste { display: block; }
.em-teste svg { vertical-align: -2px; margin-right: 4px; }
#onu-aba .seg { margin-bottom: 14px; }
@media (max-width: 640px) {
  .dkpis { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .dkpi { padding: 12px; }
  .dkpi .dk-pe { display: none; }
  .dkpi .dk-val { font-size: 24px; }
}

/* aba Configurações do equipamento e ações perigosas */
.cfg-card.cfg-off { opacity: .55; cursor: not-allowed; }
.cfg-card.cfg-off .cfg-abrir { color: var(--muted); }
.acoes-perigo { display: grid; gap: 12px; }
.acoes-perigo .bloco { display: grid; gap: 6px; }
.acoes-perigo .bloco .note { margin: 0; }

/* campanhas de firmware */
.barra-camp { display: block; height: 6px; border-radius: 3px; background: var(--pill-neutral-bg); overflow: hidden; }
.barra-camp > span { display: block; height: 100%; background: var(--accent); border-radius: 3px; }
.lista-simples li.bloco { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }

/* diagnóstico guiado */
.gd-conc { display: flex; gap: 12px; align-items: flex-start; padding: 14px; border-radius: 12px; margin-bottom: 14px; border: 1px solid var(--border, rgba(127,127,127,.2)); }
.gd-conc > span:last-child { display: grid; gap: 4px; min-width: 0; }
.gd-conc.bad { background: var(--pill-negative-bg); border-color: color-mix(in srgb, var(--negative) 45%, transparent); }
.gd-conc.warn { background: var(--pill-warning-bg); }
.gd-conc.ok { background: var(--pill-positive-bg, rgba(63,192,122,.12)); }
.gd-conc.bad .gd-ico { color: var(--negative); } .gd-conc.ok .gd-ico { color: var(--positive); } .gd-conc.warn .gd-ico { color: var(--pill-warning-ink); }
.gd-txt, .gd-fazer { font-size: var(--fs-small); }
.gd-fazer { margin-top: 4px; }
.gd-dica { color: var(--text, inherit); }

/* alertas */
.nav-count.bad { background: var(--pill-negative-bg); color: var(--pill-negative-ink); }
.lista-alertas li { display: flex; align-items: center; gap: 8px; }
.lista-alertas li > a { flex: 1; min-width: 0; }
.lista-alertas li.fechado { opacity: .6; }
.lista-alertas .cell-sub { display: block; }

/* aviso de licença/cota (fixo no rodapé) */
.faixa-licenca { position: fixed; left: 50%; transform: translateX(-50%); bottom: 12px; z-index: 40; max-width: min(760px, calc(100vw - 32px));
  padding: 10px 16px; border-radius: 10px; font-size: var(--fs-small); font-weight: 600; box-shadow: 0 6px 24px rgba(0,0,0,.35); }
.faixa-licenca.bad { background: var(--negative); color: #fff; }
.faixa-licenca.warn { background: var(--pill-warning-bg); color: var(--pill-warning-ink); border: 1px solid currentColor; }

/* 2026-11-15 — AFService: seletor de arquivo do painel (sem o botão nativo do navegador) */
.row2 { align-items: start; }
.hint-solta { margin-top: -10px; font-size: var(--fs-small); color: var(--muted); }
.prov > span { align-content: center; min-height: 52px; }
.arq-drop { position: relative; display: flex; align-items: center; gap: 12px; padding: 14px; border: 1px dashed var(--control); border-radius: 10px; background: var(--well); cursor: pointer; transition: border-color .15s, background-color .15s; }
.arq-drop:hover, .arq-drop.sobre { border-color: var(--accent); background: var(--accent-pale); }
.arq-drop.tem { border-style: solid; }
.arq-drop input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.arq-drop:focus-within { outline: 2px solid var(--accent); outline-offset: 2px; }
.arq-ico { flex: none; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 8px; background: var(--surface); border: 1px solid var(--border); color: var(--muted); }
.arq-txt { display: grid; gap: 2px; min-width: 0; flex: 1; }
.arq-txt strong { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.arq-txt span { font-size: var(--fs-small); color: var(--muted); }
.arq-btn { flex: none; pointer-events: none; }
@media (max-width: 560px) { .arq-drop { flex-wrap: wrap; } .arq-btn { width: 100%; justify-content: center; } }
