/* Painel NOC - LG SEC. Identidade: #0B1220 principal, #E10600 destaque, #E6E8EF neutro, #334155 apoio.
   Titulos em Montserrat, texto e interface em Inter. Severidade usa a paleta de status (sempre com icone e texto). */
:root {
  /* motion tokens (transitions.dev) */
  --duration-stagger: 40ms; --duration-micro: 80ms; --duration-quick: 150ms; --duration-fast: 250ms;
  --duration-medium: 350ms; --duration-slow: 400ms; --duration-very-slow: 500ms;
  --ease-smooth-out: cubic-bezier(0.22, 1, 0.36, 1); --ease-in-out: ease-in-out; --ease-out: ease-out; --ease-linear: linear;
  --toast-open: 350ms; --toast-close: 250ms; --toast-distance: 16px; --toast-blur: 2px; --toast-scale: 0.97;
  --toast-ease: cubic-bezier(0.22, 1, 0.36, 1);
  --shimmer-dur: 2000ms; --shimmer-band: 400%; --shimmer-ease: linear;
  --subtle-dur: 455ms; --subtle-distance: 0.14em; --subtle-blur: 0.042em; --subtle-ease: cubic-bezier(0.22, 1, 0.36, 1);
  --pulse-dur: 1000ms; --pulse-min: 0.5; --reveal-dur: 400ms; --reveal-blur: 2px;
  --acc-dur: 300ms; --tabs-dur: 250ms;

  --brand: #e10600; --brand-ink: #ffffff; --brand-soft: rgba(225, 6, 0, .14);
  --font-head: "Montserrat", system-ui, sans-serif; --font-body: "Inter", system-ui, sans-serif;
  --mono: ui-monospace, "JetBrains Mono", SFMono-Regular, Menlo, Consolas, monospace;
  --r-s: 6px; --r-m: 10px; --r-l: 14px;
  --side: 248px;

  /* status (dataviz) */
  --good: #0ca30c; --warning: #fab219; --serious: #ec835a; --critical: #d03b3b; --info: #3987e5; --neutral-s: #8a94a6;
  color-scheme: dark;
  --bg: #0b1220; --plane: #0e1628; --surface: #111a2e; --surface-2: #16213a; --raise: #1b2844;
  --line: #22304d; --line-2: #2c3c5e;
  --ink: #e6e8ef; --ink-2: #b4bccc; --muted: #8a94a6;
  --grid: rgba(230, 232, 239, .07);
  --shimmer-base: #8a94a6; --shimmer-highlight: #ffffff;
  --shadow: 0 1px 0 rgba(255,255,255,.03) inset, 0 12px 32px rgba(0,0,0,.28);
}
:root[data-theme="light"] {
  color-scheme: light;
  --bg: #f3f4f7; --plane: #eceef3; --surface: #ffffff; --surface-2: #f6f7fa; --raise: #eef0f5;
  --line: #dde1ea; --line-2: #c9cfdb;
  --ink: #0b1220; --ink-2: #334155; --muted: #5b6478;
  --grid: rgba(11, 18, 32, .07);
  --brand-soft: rgba(225, 6, 0, .08);
  --shimmer-base: #5b6478; --shimmer-highlight: #0b1220;
  --shadow: 0 1px 2px rgba(11,18,32,.05), 0 10px 28px rgba(11,18,32,.07);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink); font: 15px/1.5 var(--font-body);
  font-feature-settings: "cv11", "ss01"; -webkit-font-smoothing: antialiased;
}
h1, h2, h3 { font-family: var(--font-head); letter-spacing: -.01em; margin: 0; }
h1 { font-size: 24px; font-weight: 800; }
h2 { font-size: 16px; font-weight: 700; }
h3 { font-size: 14px; font-weight: 700; }
p { margin: 0; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
.num, .tabular { font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); }
.mono { font-family: var(--mono); font-size: 13px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; border-radius: 4px; }
.skip { position: fixed; left: 12px; top: -60px; z-index: 100; background: var(--brand); color: #fff; padding: 10px 14px;
  border-radius: var(--r-s); text-decoration: none; font-weight: 600; }
.skip:focus { top: 12px; }

/* ------------------------------------------------ marca */
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.brand-logo { width: 34px; height: 34px; object-fit: contain; display: none; }
.brand.has-logo .brand-logo { display: block; }
.brand-word { font-family: var(--font-head); font-weight: 800; font-style: italic; font-size: 21px; letter-spacing: -.02em; line-height: 1; }
.brand-word b { color: var(--brand); font-weight: 800; }
.brand-sub { display: block; font-family: var(--font-head); font-style: normal; font-weight: 600; font-size: 10px;
  letter-spacing: .34em; color: var(--muted); margin-top: 4px; }

/* ------------------------------------------------ estrutura */
.app { display: grid; grid-template-columns: var(--side) minmax(0, 1fr); min-height: 100vh; }
.side {
  position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; gap: 22px;
  padding: 22px 14px 16px; background: var(--plane); border-right: 1px solid var(--line);
}
.side .brand { padding: 0 8px; }
.nav { display: flex; flex-direction: column; gap: 2px; overflow-y: auto; }
.nav-label { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); padding: 14px 10px 6px; }
.nav a {
  position: relative; display: flex; align-items: center; gap: 11px; min-height: 40px; padding: 8px 10px; border-radius: var(--r-s);
  color: var(--ink-2); text-decoration: none; font-weight: 500;
  transition: background-color var(--duration-quick) var(--ease-out), color var(--duration-quick) var(--ease-out);
}
.nav a:hover { background: var(--surface-2); color: var(--ink); }
.nav a[aria-current="page"] { background: var(--brand-soft); color: var(--ink); }
.nav a[aria-current="page"]::before { content: ""; position: absolute; left: -14px; top: 9px; bottom: 9px; width: 3px; border-radius: 0 3px 3px 0; background: var(--brand); }
.nav .ic { width: 18px; height: 18px; flex: none; }
.nav .count { margin-left: auto; min-width: 22px; padding: 0 7px; border-radius: 999px; font-size: 12px; font-weight: 700; line-height: 20px; text-align: center;
  background: var(--critical); color: #fff; }
.nav .count[hidden] { display: none; }
.side-foot { margin-top: auto; display: flex; flex-direction: column; gap: 10px; padding: 12px 10px 0; border-top: 1px solid var(--line); }
.side-user { display: flex; align-items: center; gap: 10px; font-size: 13px; }
.side-user .avatar { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: var(--raise); font-weight: 700; font-size: 12px; }

.scrim { display: none; }
.main { min-width: 0; display: flex; flex-direction: column; }
.top {
  position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 12px; min-height: 68px; padding: 12px 28px;
  background: color-mix(in srgb, var(--bg) 86%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line);
}
.top h1 { font-size: 20px; }
.top .crumb { font-size: 13px; color: var(--muted); }
.top-actions { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.updated { font-size: 13px; color: var(--muted); display: flex; align-items: center; gap: 6px; }
.live-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--good); box-shadow: 0 0 0 0 rgba(12,163,12,.5); animation: live 2.4s var(--ease-out) infinite; }
@keyframes live { 0% { box-shadow: 0 0 0 0 rgba(12,163,12,.45); } 70%, 100% { box-shadow: 0 0 0 8px rgba(12,163,12,0); } }
.menu-btn { display: none; }
.content { padding: 24px 28px 48px; display: flex; flex-direction: column; gap: 20px; max-width: 1480px; width: 100%; }

/* ------------------------------------------------ botoes */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 40px; padding: 0 16px; border-radius: var(--r-s);
  border: 1px solid var(--line-2); background: var(--surface); color: var(--ink); font-weight: 600; font-size: 14px; cursor: pointer; text-decoration: none;
  transition: transform var(--duration-quick) var(--ease-smooth-out), background-color var(--duration-quick) var(--ease-out), border-color var(--duration-quick) var(--ease-out);
}
.btn:hover { background: var(--surface-2); border-color: var(--muted); transform: translateY(-1px); }
.btn:active { transform: translateY(0) scale(.98); }
.btn.primary { background: var(--brand); border-color: var(--brand); color: var(--brand-ink); }
.btn.primary:hover { background: #c90500; border-color: #c90500; }
.btn.ghost { background: transparent; border-color: transparent; }
.btn.ghost:hover { background: var(--surface-2); }
.btn.icon { width: 40px; padding: 0; }
.btn .ic { width: 17px; height: 17px; }
.btn[disabled] { opacity: .55; cursor: not-allowed; transform: none; }
.btn.spin .ic { animation: spin 0.9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.link { display: inline-flex; align-items: center; gap: 6px; color: var(--ink-2); font-weight: 600; font-size: 13px; text-decoration: none; }
.link .ic { width: 14px; height: 14px; transition: transform var(--duration-fast) var(--ease-smooth-out); }
.link:hover { color: var(--ink); }
.link:hover .ic { transform: translate(2px, -2px); }

/* ------------------------------------------------ cartoes */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-l); box-shadow: var(--shadow); min-width: 0; }
.card-head { display: flex; align-items: center; gap: 10px; padding: 16px 18px 0; }
.card-head .sub { font-size: 13px; color: var(--muted); }
.card-head .right { margin-left: auto; }
.card-body { padding: 16px 18px 18px; }
.grid { display: grid; gap: 16px; }
.g-kpi { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.g-2 { grid-template-columns: minmax(0, 1.65fr) minmax(0, 1fr); }
.g-2e { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g-tools { grid-template-columns: repeat(4, minmax(0, 1fr)); }

/* faixa de estado */
.status-hero {
  position: relative; overflow: hidden; display: flex; align-items: center; gap: 18px; padding: 22px 24px; border-radius: var(--r-l);
  border: 1px solid var(--line); background:
    radial-gradient(120% 140% at 100% 0%, rgba(225,6,0,.16), transparent 55%),
    linear-gradient(135deg, var(--surface) 0%, var(--plane) 100%);
}
.status-hero .badge-24 { font-family: var(--font-head); font-weight: 800; font-style: italic; font-size: 13px; color: #fff; background: var(--brand);
  padding: 3px 8px; border-radius: 4px; transform: skewX(-8deg); display: inline-block; }
.status-hero h2 { font-size: 22px; font-weight: 800; margin-top: 6px; }
.status-hero p { color: var(--ink-2); margin-top: 4px; }
.status-hero .orb { width: 52px; height: 52px; border-radius: 50%; flex: none; display: grid; place-items: center; }
.status-hero .orb .ic { width: 26px; height: 26px; }
.orb.ok { background: rgba(12,163,12,.14); color: var(--good); }
.orb.warn { background: rgba(250,178,25,.14); color: var(--warning); }
.orb.bad { background: rgba(208,59,59,.16); color: var(--critical); }
.status-hero .hero-actions { margin-left: auto; display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }

/* KPI */
.kpi { padding: 18px; display: flex; flex-direction: column; gap: 10px; text-decoration: none; color: inherit;
  transition: transform var(--duration-fast) var(--ease-smooth-out), border-color var(--duration-fast) var(--ease-out); }
a.kpi:hover { transform: translateY(-2px); border-color: var(--line-2); }
.kpi-top { display: flex; align-items: center; gap: 8px; color: var(--ink-2); font-size: 13px; font-weight: 600; }
.kpi-top .ic { width: 16px; height: 16px; color: var(--muted); }
.kpi-value { font-family: var(--font-head); font-weight: 800; font-size: 34px; line-height: 1.05; letter-spacing: -.02em; }
.kpi-value small { font-size: 16px; font-weight: 700; color: var(--muted); margin-left: 4px; }
.kpi-foot { font-size: 13px; color: var(--muted); display: flex; align-items: center; gap: 6px; min-height: 20px; }
.sevbar { display: flex; gap: 2px; height: 8px; border-radius: 4px; overflow: hidden; background: var(--raise); }
.sevbar span { display: block; height: 100%; }
.sevbar span:first-child { border-radius: 4px 0 0 4px; }
.sevbar span:last-child { border-radius: 0 4px 4px 0; }

/* severidade e estado */
.sev { display: inline-flex; align-items: center; gap: 6px; padding: 2px 8px 2px 6px; border-radius: 999px; font-size: 12px; font-weight: 600;
  border: 1px solid var(--line-2); background: var(--surface-2); color: var(--ink); white-space: nowrap; }
.sev i { width: 8px; height: 8px; border-radius: 2px; display: inline-block; flex: none; }
.sev[data-s="0"] i, .sev[data-s="1"] i { background: var(--info); border-radius: 50%; }
.sev[data-s="2"] i { background: var(--warning); transform: rotate(45deg); }
.sev[data-s="3"] i { background: var(--serious); }
.sev[data-s="4"] i, .sev[data-s="5"] i { background: var(--critical); clip-path: polygon(50% 0, 100% 100%, 0 100%); border-radius: 0; width: 10px; height: 9px; }
.sev[data-s="5"] { background: var(--critical); border-color: var(--critical); color: #fff; }
.sev[data-s="5"] i { background: #fff; }
.state { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; white-space: nowrap; }
.state .ic { width: 16px; height: 16px; }
.state.ok { color: var(--good); } .state.bad { color: var(--critical); } .state.warn { color: var(--warning); } .state.unk { color: var(--muted); }
.state span { color: var(--ink); }
.pill { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; padding: 1px 8px; border-radius: 999px; background: var(--raise); color: var(--ink-2); white-space: nowrap; }
.pill.ia { background: var(--brand-soft); color: var(--ink); }
.pill.ia .ic { width: 12px; height: 12px; color: var(--brand); }

/* grafico de barras */
.chart { position: relative; }
.chart svg { display: block; width: 100%; height: 220px; overflow: visible; }
.chart .gridline { stroke: var(--grid); stroke-width: 1; }
.chart .axis { fill: var(--muted); font-size: 11px; font-family: var(--font-body); }
.chart .hit { fill: transparent; cursor: crosshair; }
.chart .hit:hover + g rect, .chart g.hot rect { opacity: 1; }
.legend { display: flex; flex-wrap: wrap; gap: 14px; font-size: 13px; color: var(--ink-2); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
.tip { position: absolute; z-index: 5; pointer-events: none; min-width: 150px; padding: 10px 12px; border-radius: var(--r-m); background: var(--raise);
  border: 1px solid var(--line-2); box-shadow: var(--shadow); font-size: 13px; opacity: 0; transform: translateY(4px) scale(.98);
  transition: opacity var(--duration-quick) var(--ease-out), transform var(--duration-quick) var(--ease-out); }
.tip.on { opacity: 1; transform: none; }
.tip b { display: block; margin-bottom: 4px; }
.tip div { display: flex; align-items: center; gap: 6px; justify-content: space-between; }
.tip i { width: 8px; height: 8px; border-radius: 2px; display: inline-block; margin-right: 6px; }

/* ferramentas */
.tool { display: flex; flex-direction: column; gap: 12px; padding: 16px; text-decoration: none; color: inherit;
  transition: transform var(--duration-fast) var(--ease-smooth-out), border-color var(--duration-fast) var(--ease-out); }
a.tool:hover { transform: translateY(-2px); border-color: var(--line-2); }
.tool-head { display: flex; align-items: center; gap: 12px; }
.tool-icon { width: 40px; height: 40px; border-radius: 10px; background: #fff; display: grid; place-items: center; flex: none; border: 1px solid var(--line); }
.tool-icon img { width: 24px; height: 24px; }
.tool-icon.glyph { background: var(--raise); color: var(--ink); }
.tool-icon.glyph img { filter: none; }
.tool-name { font-weight: 700; }
.tool-role { font-size: 13px; color: var(--muted); }
.tool-foot { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); margin-top: auto; }
.tool-foot .link { margin-left: auto; }

/* listas */
.list { list-style: none; margin: 0; padding: 0; }
.list > li { display: flex; align-items: flex-start; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line); }
.list > li:first-child { border-top: 0; }
.tl-time { width: 52px; flex: none; font-size: 12px; color: var(--muted); padding-top: 2px; }
.tl-main { min-width: 0; flex: 1; }
.tl-main .t { font-weight: 600; font-size: 14px; overflow-wrap: anywhere; }
.tl-main .s { font-size: 13px; color: var(--muted); }
.ai-card .ai-text { white-space: pre-wrap; font-size: 14px; color: var(--ink-2); line-height: 1.6; max-height: 260px; overflow: auto; }
.empty { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 8px; padding: 34px 16px; color: var(--muted); }
.empty .ic { width: 28px; height: 28px; color: var(--good); }
.empty.neutral .ic { color: var(--muted); }
.empty strong { color: var(--ink); font-size: 15px; }
.alert-line { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: var(--r-m); border: 1px solid rgba(250,178,25,.4);
  background: rgba(250,178,25,.08); font-size: 13px; }
.alert-line .ic { width: 16px; height: 16px; color: var(--warning); flex: none; margin-top: 2px; }

/* barra de ferramentas da pagina */
.toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.search { position: relative; flex: 1 1 260px; max-width: 420px; }
.search .ic { position: absolute; left: 12px; top: 50%; width: 16px; height: 16px; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.input, .search input, select.input, textarea.input {
  width: 100%; min-height: 40px; padding: 8px 12px; border-radius: var(--r-s); border: 1px solid var(--line-2); background: var(--surface); color: var(--ink);
  transition: border-color var(--duration-quick) var(--ease-out), box-shadow var(--duration-quick) var(--ease-out);
}
.search input { padding-left: 36px; }
.input:focus, .search input:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
textarea.input { min-height: 84px; resize: vertical; }
label.field { display: flex; flex-direction: column; gap: 6px; font-size: 13px; font-weight: 600; color: var(--ink-2); }
label.field small { font-weight: 400; color: var(--muted); }
.field-error { color: var(--critical); font-size: 13px; font-weight: 500; min-height: 18px; }

/* abas deslizantes (transitions.dev 16) */
.t-tabs { position: relative; display: inline-flex; gap: 2px; padding: 3px; border-radius: 9px; background: var(--surface-2); border: 1px solid var(--line); }
.t-tabs-pill { position: absolute; top: 3px; bottom: 3px; left: 0; border-radius: 7px; background: var(--raise); box-shadow: 0 1px 2px rgba(0,0,0,.2);
  transition: transform var(--tabs-dur) var(--ease-smooth-out), width var(--tabs-dur) var(--ease-smooth-out); }
.t-tab { position: relative; z-index: 1; min-height: 34px; padding: 0 14px; border: 0; background: none; border-radius: 7px; cursor: pointer;
  font-weight: 600; font-size: 13px; color: var(--muted); transition: color var(--duration-quick) var(--ease-out); white-space: nowrap; }
.t-tab[aria-selected="true"] { color: var(--ink); }
.t-tab .n { margin-left: 6px; font-variant-numeric: tabular-nums; color: var(--muted); }

/* tabela */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th { text-align: left; font-size: 12px; font-weight: 600; color: var(--muted); padding: 10px 14px; border-bottom: 1px solid var(--line); white-space: nowrap; }
td { padding: 12px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
tr:last-child td { border-bottom: 0; }
tbody tr { transition: background-color var(--duration-quick) var(--ease-out); }
tbody tr:hover { background: var(--surface-2); }
td .t { font-weight: 600; }
td .s { font-size: 12px; color: var(--muted); }

/* problemas (accordion - transitions.dev 21) */
.prob { border-top: 1px solid var(--line); }
.prob:first-child { border-top: 0; }
.prob-head { width: 100%; display: grid; grid-template-columns: 118px minmax(0, 1fr) auto auto 22px; gap: 14px; align-items: center; padding: 14px 18px;
  background: none; border: 0; text-align: left; cursor: pointer; min-height: 56px; transition: background-color var(--duration-quick) var(--ease-out); }
.prob-head:hover { background: var(--surface-2); }
.prob-head .t { font-weight: 600; overflow-wrap: anywhere; }
.prob-head .s { font-size: 13px; color: var(--muted); }
.prob-head .chev { width: 18px; height: 18px; color: var(--muted); transition: transform var(--acc-dur) var(--ease-smooth-out); }
.prob-head[aria-expanded="true"] .chev { transform: scaleY(-1); }
.t-acc-panel { display: grid; grid-template-rows: 0fr; transition: grid-template-rows var(--acc-dur) var(--ease-smooth-out); }
.t-acc-panel[data-open="true"] { grid-template-rows: 1fr; }
.t-acc-panel > .t-acc-panel-inner { overflow: hidden; min-height: 0; }
.prob-body { padding: 4px 18px 18px 150px; display: flex; flex-direction: column; gap: 14px; }
.comments { display: flex; flex-direction: column; gap: 10px; }
.comment { padding: 12px 14px; border-radius: var(--r-m); background: var(--surface-2); border: 1px solid var(--line); }
.comment.ia { border-color: rgba(225,6,0,.35); background: linear-gradient(180deg, var(--brand-soft), transparent 70%), var(--surface-2); }
.comment .who { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--muted); margin-bottom: 6px; }
.comment .txt { white-space: pre-wrap; font-size: 14px; color: var(--ink-2); }
.ack-form { display: flex; gap: 8px; flex-wrap: wrap; }
.ack-form .input { flex: 1 1 260px; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; }
@media (prefers-reduced-motion: reduce) {
  .t-acc-panel, .prob-head .chev { transition: none !important; }
}

/* disponibilidade */
.check { display: flex; flex-direction: column; gap: 12px; padding: 16px; }
.check-top { display: flex; align-items: flex-start; gap: 10px; }
.check-top .t { font-weight: 700; overflow-wrap: anywhere; }
.check-top .s { font-size: 12px; color: var(--muted); }
.check-top .state { margin-left: auto; }
.ticks { display: grid; grid-template-columns: repeat(30, minmax(0, 1fr)); gap: 2px; height: 26px; }
.ticks i { display: block; border-radius: 2px; background: var(--good); opacity: .85; }
.ticks i.bad { background: var(--critical); opacity: 1; }
.ticks i.none { background: var(--raise); }
.check-foot { display: flex; gap: 14px; font-size: 13px; color: var(--muted); }
.check-foot b { color: var(--ink); font-variant-numeric: tabular-nums; }

/* logs */
.logbox { font-family: var(--mono); font-size: 12.5px; line-height: 1.6; max-height: 62vh; overflow: auto; padding: 6px 0; }
.logbox div { display: grid; grid-template-columns: 150px 110px minmax(0, 1fr); gap: 12px; padding: 3px 18px; }
.logbox div:hover { background: var(--surface-2); }
.logbox time, .logbox .o { color: var(--muted); }
.logbox span { overflow-wrap: anywhere; color: var(--ink-2); }

/* assistente */
.chat { display: flex; flex-direction: column; height: calc(100vh - 200px); min-height: 440px; }
.chat-log { flex: 1; overflow-y: auto; display: flex; flex-direction: column; gap: 16px; padding: 20px; }
.msg { max-width: 760px; display: flex; gap: 12px; }
.msg .av { width: 32px; height: 32px; border-radius: 9px; flex: none; display: grid; place-items: center; background: var(--raise); }
.msg.ia .av { background: var(--brand); color: #fff; }
.msg .av .ic { width: 17px; height: 17px; }
.msg .bubble { padding: 12px 14px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--line); white-space: pre-wrap; overflow-wrap: anywhere; font-size: 14px; line-height: 1.6; }
.msg.me { align-self: flex-end; flex-direction: row-reverse; }
.msg.me .bubble { background: var(--brand-soft); border-color: rgba(225,6,0,.3); }
.msg .meta { font-size: 12px; color: var(--muted); margin-top: 6px; }
.chat-form { display: flex; gap: 10px; padding: 14px; border-top: 1px solid var(--line); }
.chat-form textarea { flex: 1; min-height: 46px; max-height: 160px; }
.suggest { display: flex; flex-wrap: wrap; gap: 8px; }
.suggest button { min-height: 36px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--line-2); background: var(--surface); cursor: pointer; font-size: 13px;
  transition: border-color var(--duration-quick) var(--ease-out), transform var(--duration-quick) var(--ease-smooth-out); }
.suggest button:hover { border-color: var(--brand); transform: translateY(-1px); }

/* streaming (transitions.dev 30, simplificado) */
.t-stream-word { display: inline; opacity: 0; filter: blur(2px); animation: t-stream-in 380ms var(--ease-smooth-out) forwards; }
@keyframes t-stream-in { to { opacity: 1; filter: blur(0); } }
@media (prefers-reduced-motion: reduce) { .t-stream-word { animation: none; opacity: 1; filter: none; } }

/* shimmer (transitions.dev 15) */
.t-shimmer { position: relative; display: inline-block; color: var(--shimmer-base); }
.t-shimmer::before {
  content: attr(data-text); position: absolute; inset: 0; pointer-events: none;
  background-image: linear-gradient(90deg, transparent 0%, transparent 40%, var(--shimmer-highlight) 50%, transparent 60%, transparent 100%);
  background-size: var(--shimmer-band) 100%; background-repeat: no-repeat; -webkit-background-clip: text; background-clip: text;
  color: transparent; -webkit-text-fill-color: transparent; animation: t-shimmer var(--shimmer-dur) var(--shimmer-ease) infinite;
}
@keyframes t-shimmer { 0% { background-position: 100% 0; } 100% { background-position: 0% 0; } }
@media (prefers-reduced-motion: reduce) { .t-shimmer::before { animation: none !important; } }

/* skeleton (transitions.dev 14) */
.skel { display: block; border-radius: 6px; background: var(--raise); animation: t-skel-pulse var(--pulse-dur) ease-in-out infinite; }
@keyframes t-skel-pulse { 0%, 100% { opacity: 1; } 50% { opacity: var(--pulse-min); } }
.reveal { animation: t-reveal var(--reveal-dur) var(--ease-in-out) both; }
@keyframes t-reveal { from { opacity: 0; filter: blur(var(--reveal-blur)); } }
@media (prefers-reduced-motion: reduce) { .skel, .reveal { animation: none !important; } }

/* numero (transitions.dev 36) */
.t-subtle-number { display: inline-flex; align-items: baseline; font-variant-numeric: tabular-nums; }
.t-subtle-slot { position: relative; display: inline-block; }
.t-subtle-new { display: inline-block; }
.t-subtle-old { position: absolute; inset: 0; text-align: center; pointer-events: none; }
.t-subtle-number.is-animating .t-subtle-new { animation: t-subtle-in var(--subtle-dur) var(--subtle-ease) both; }
.t-subtle-number.is-animating .t-subtle-old { animation: t-subtle-out var(--subtle-dur) var(--subtle-ease) both; }
@keyframes t-subtle-in { from { transform: translateY(calc(var(--subtle-distance) * var(--subtle-dir, 1))); opacity: 0; filter: blur(var(--subtle-blur)); } }
@keyframes t-subtle-out { to { transform: translateY(calc(var(--subtle-distance) * var(--subtle-dir, 1) * -1)); opacity: 0; filter: blur(var(--subtle-blur)); } }
@media (prefers-reduced-motion: reduce) {
  .t-subtle-number .t-subtle-new { animation: none !important; }
  .t-subtle-number .t-subtle-old { display: none; }
}

/* toast (transitions.dev 22) */
.toasts { position: fixed; right: 20px; bottom: 20px; z-index: 60; display: flex; flex-direction: column; gap: 8px; align-items: flex-end; }
.t-toast { display: flex; align-items: center; gap: 10px; max-width: 420px; padding: 12px 14px; border-radius: var(--r-m); background: var(--raise);
  border: 1px solid var(--line-2); box-shadow: var(--shadow); font-size: 14px;
  opacity: 0; transform: translateY(var(--toast-distance)) scale(var(--toast-scale)); filter: blur(var(--toast-blur));
  will-change: transform, opacity, filter;
  transition: opacity var(--toast-close) var(--toast-ease), transform var(--toast-close) var(--toast-ease), filter var(--toast-close) var(--toast-ease); }
.t-toast.is-open { opacity: 1; transform: translateY(0) scale(1); filter: blur(0);
  transition: opacity var(--toast-open) var(--toast-ease), transform var(--toast-open) var(--toast-ease), filter var(--toast-open) var(--toast-ease); }
.t-toast .ic { width: 18px; height: 18px; flex: none; }
.t-toast.ok .ic { color: var(--good); } .t-toast.bad .ic { color: var(--critical); }
@media (prefers-reduced-motion: reduce) { .t-toast { transition: none !important; } }

/* modal (transitions.dev 06) */
.t-modal-backdrop { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; padding: 16px; background: rgba(5, 8, 15, .6); backdrop-filter: blur(4px);
  opacity: 0; transition: opacity var(--duration-fast) var(--ease-smooth-out); }
.t-modal-backdrop[data-open="true"] { opacity: 1; }
.t-modal { width: min(560px, 100%); max-height: calc(100vh - 32px); overflow: auto; background: var(--surface); border: 1px solid var(--line-2); border-radius: var(--r-l);
  box-shadow: 0 30px 80px rgba(0,0,0,.45); transform: scale(.96); transition: transform var(--duration-fast) var(--ease-smooth-out); }
.t-modal-backdrop[data-open="true"] .t-modal { transform: scale(1); }
.t-modal header { display: flex; align-items: center; gap: 10px; padding: 18px 20px 0; }
.t-modal header .btn { margin-left: auto; }
.t-modal form { display: flex; flex-direction: column; gap: 14px; padding: 18px 20px 20px; }
.t-modal .row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.t-modal .actions { display: flex; gap: 8px; justify-content: flex-end; margin-top: 4px; }
.seg { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.seg label { display: flex; flex-direction: column; gap: 2px; padding: 10px 12px; border: 1px solid var(--line-2); border-radius: var(--r-m); cursor: pointer; font-size: 13px; font-weight: 600;
  transition: border-color var(--duration-quick) var(--ease-out), background-color var(--duration-quick) var(--ease-out); }
.seg label small { font-weight: 400; color: var(--muted); }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg label:has(input:checked) { border-color: var(--brand); background: var(--brand-soft); }
.seg label:has(input:focus-visible) { outline: 2px solid var(--brand); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) { .t-modal-backdrop, .t-modal { transition: none !important; } }

/* login */
.login-page { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(380px, .9fr); }
.login-art { position: relative; overflow: hidden; padding: 48px; display: flex; flex-direction: column; justify-content: space-between;
  background:
    radial-gradient(70% 60% at 85% 10%, rgba(225,6,0,.28), transparent 60%),
    radial-gradient(60% 50% at 10% 100%, rgba(57,135,229,.14), transparent 60%),
    linear-gradient(160deg, #0b1220 0%, #0a0f1b 100%);
  color: #e6e8ef; border-right: 1px solid #1b2742; }
.login-art::after { content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .5;
  background-image: linear-gradient(rgba(230,232,239,.05) 1px, transparent 1px), linear-gradient(90deg, rgba(230,232,239,.05) 1px, transparent 1px);
  background-size: 44px 44px; mask-image: radial-gradient(80% 70% at 60% 40%, #000, transparent 85%); }
.login-art > * { position: relative; z-index: 1; }
.login-art .brand-word { font-size: 30px; }
.login-art .brand-sub { color: #8a94a6; }
.login-claim { max-width: 520px; }
.login-claim h1 { font-size: clamp(30px, 3.4vw, 46px); line-height: 1.08; font-weight: 800; }
.login-claim h1 em { font-style: italic; color: #e10600; }
.login-claim p { margin-top: 14px; color: #b4bccc; font-size: 16px; max-width: 440px; }
.login-stack { display: flex; flex-wrap: wrap; gap: 10px; }
.login-stack span { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px 6px 6px; border-radius: 999px; background: rgba(255,255,255,.04); border: 1px solid #22304d; font-size: 13px; color: #b4bccc; }
.login-stack img { width: 22px; height: 22px; padding: 3px; border-radius: 6px; background: #fff; }
.login-stack .g img { background: #1b2844; }
.login-form-wrap { display: grid; place-items: center; padding: 32px 20px; background: var(--bg); }
.login-form { width: min(380px, 100%); display: flex; flex-direction: column; gap: 16px; }
.login-form h2 { font-size: 24px; font-weight: 800; }
.login-form .btn { width: 100%; min-height: 46px; }
.login-note { font-size: 13px; color: var(--muted); display: flex; gap: 8px; align-items: center; }
.login-note .ic { width: 15px; height: 15px; }

/* ------------------------------------------------ responsivo */
@media (max-width: 1240px) {
  .g-kpi, .g-tools { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .g-2 { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 900px) {
  .app { grid-template-columns: minmax(0, 1fr); }
  .side { position: fixed; z-index: 40; left: 0; top: 0; bottom: 0; width: min(300px, 86vw); transform: translateX(-102%);
    transition: transform var(--duration-fast) var(--ease-smooth-out); box-shadow: 30px 0 60px rgba(0,0,0,.35); }
  .app[data-menu="open"] .side { transform: none; }
  .scrim { display: block; position: fixed; inset: 0; z-index: 35; background: rgba(5,8,15,.55); opacity: 0; pointer-events: none; transition: opacity var(--duration-fast) var(--ease-out); }
  .app[data-menu="open"] .scrim { opacity: 1; pointer-events: auto; }
  .menu-btn { display: inline-flex; }
  .top { padding: 10px 16px; }
  .content { padding: 18px 16px 40px; }
  .g-2e { grid-template-columns: minmax(0, 1fr); }
  .prob-head { grid-template-columns: minmax(0, 1fr) auto 22px; }
  .prob-head .c-sev { grid-column: 1 / -1; }
  .prob-head .c-age { display: none; }
  .prob-body { padding: 4px 16px 18px; }
  .login-page { grid-template-columns: minmax(0, 1fr); }
  .login-art { padding: 28px 20px; gap: 28px; border-right: 0; border-bottom: 1px solid #1b2742; }
  .login-claim h1 { font-size: 28px; }
  .updated .txt { display: none; }
  .status-hero { flex-wrap: wrap; }
  .status-hero .hero-actions { margin-left: 0; width: 100%; justify-content: flex-start; }
  .logbox div { grid-template-columns: minmax(0, 1fr); gap: 0; padding: 6px 16px; }
}
@media (max-width: 560px) {
  .g-kpi, .g-tools { grid-template-columns: minmax(0, 1fr); }
  .t-modal .row, .seg { grid-template-columns: minmax(0, 1fr); }
  .top h1 { font-size: 17px; }
  .top .crumb { display: none; }
  .toolbar .btn { width: 100%; }
  .t-tabs { width: 100%; overflow-x: auto; }
  .kpi-value { font-size: 30px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; }
  .live-dot { animation: none; }
  .btn, .kpi, .tool, .link .ic, .side { transition: none !important; }
}
.small { font-size: 12px; }
.ic { width: 18px; height: 18px; flex: none; }
.tool-icon img[src*='zabbix'], .login-stack img[src*='zabbix'] { width: 30px; height: auto; }
.login-stack img[src*='zabbix'] { width: 34px; height: 22px; object-fit: contain; }
#conteudo:focus { outline: none; }
@media (max-width: 560px) {
  .g-kpi { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .kpi { padding: 14px; gap: 8px; }
  .kpi-value { font-size: 26px; }
  .kpi-top { font-size: 12px; }
  .kpi-foot { font-size: 12px; }
}
