/* NEWSTRIX Control Room - visual layer
   Brand is intentionally limited to the official logo and core colors. */

:root {
  --bg: #f7f9fc;
  --bg2: #edf1f7;
  --surface: #ffffff;
  --surface-2: #f7f9fc;
  --border: #e6ebf2;
  --border-strong: #d6deea;
  --ink: #122238;
  --ink-2: #465568;
  --ink-3: #718096;
  --ink-4: #a0acbc;
  --brand: #1e5bff;
  --brand-600: #1749d1;
  --brand-050: #edf3ff;
  --brand-100: #dce8ff;
  --ok: #16a34a;
  --ok-bg: #eaf9ef;
  --warn: #d97706;
  --warn-bg: #fff6e5;
  --crit: #e5484d;
  --crit-bg: #fff0f0;
  --info: #1e5bff;
  --info-bg: #edf3ff;
  --chart-1: #1e5bff;
  --chart-1b: #1e5bff;
  --chart-2: #38bdf8;
  --vivid-blue: #1e5bff;
  --vivid-sky: #38bdf8;
  --shadow-sm: 0 1px 2px rgba(10, 26, 46, .025), 0 4px 12px rgba(10, 26, 46, .025);
  --shadow: 0 1px 2px rgba(10, 26, 46, .025), 0 12px 32px rgba(10, 26, 46, .035);
  --shadow-lg: 0 28px 70px rgba(7, 17, 32, .2);
  --radius: 18px;
  --radius-sm: 12px;
  --radius-lg: 24px;
  --sidebar-w: 264px;
}

html[data-theme="dark"] {
  --bg: #07111f;
  --bg2: #101e33;
  --surface: #0d1b2f;
  --surface-2: #12243d;
  --border: rgba(111, 168, 255, .12);
  --border-strong: rgba(111, 168, 255, .25);
  --ink: #f7f9fc;
  --ink-2: #dce5f1;
  --ink-3: #91a0b5;
  --ink-4: #64748b;
  --brand: #6fa8ff;
  --brand-600: #8bb8ff;
  --brand-050: rgba(30, 91, 255, .14);
  --brand-100: rgba(30, 91, 255, .23);
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, .22);
  --shadow: 0 18px 48px rgba(0, 0, 0, .2);
  --shadow-lg: 0 30px 80px rgba(0, 0, 0, .55);
}

body {
  background:
    radial-gradient(circle at 92% -8%, rgba(56, 189, 248, .085), transparent 25rem),
    radial-gradient(circle at 72% -14%, rgba(30, 91, 255, .075), transparent 32rem),
    linear-gradient(180deg, var(--bg), var(--bg));
}

body::before {
  width: 700px;
  height: 520px;
  opacity: .36;
  background:
    linear-gradient(rgba(30, 91, 255, .035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(30, 91, 255, .035) 1px, transparent 1px);
  background-size: 48px 48px;
  -webkit-mask-image: radial-gradient(circle at 100% 0, #000, transparent 70%);
  mask-image: radial-gradient(circle at 100% 0, #000, transparent 70%);
}

/* Shell */
.layout { grid-template-columns: var(--sidebar-w) minmax(0, 1fr); }

.sidebar {
  padding: 24px 16px 18px;
  overflow-y: auto;
  background:
    radial-gradient(circle at 10% 5%, rgba(56, 189, 248, .2), transparent 20rem),
    linear-gradient(180deg, #102d4c 0%, #0a1f37 100%);
  border-right: 1px solid rgba(111, 168, 255, .09);
}

.sidebar::after {
  height: 300px;
  opacity: .18;
  background: radial-gradient(circle at 35% 100%, rgba(30, 91, 255, .32), transparent 65%);
}

.brand {
  gap: 12px;
  min-height: 66px;
  margin: 0 2px 12px;
  padding: 6px 10px 20px;
  border-bottom: 1px solid rgba(255, 255, 255, .07);
}

.brand .brandmark { width: 37px !important; }
.brand .bt b { font-size: 16px; }
.brand .bt span { color: #6fa8ff; font-size: 7.5px; }

.nav { gap: 3px; margin-top: 0; }
.nav-label {
  display: block;
  margin: 17px 12px 7px;
  color: #64748b;
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
}
.nav-label:first-child { margin-top: 2px; }

.nav a {
  min-height: 41px;
  gap: 11px;
  padding: 9px 11px;
  border: 1px solid transparent;
  border-radius: 11px;
  color: #9dacc0;
  font-size: 13px;
  font-weight: 550;
}
.nav a svg { width: 18px; height: 18px; opacity: .82; }
.nav a:hover {
  color: #f7f9fc;
  background: rgba(255, 255, 255, .045);
  border-color: rgba(255, 255, 255, .04);
}
.nav a.active {
  color: #fff;
  background: linear-gradient(90deg, rgba(30, 91, 255, .24), rgba(56, 189, 248, .055));
  border-color: rgba(111, 168, 255, .16);
  box-shadow: inset 3px 0 0 #6fa8ff;
}
.nav a.active svg { color: #8bb8ff; }

.sidebar .sfoot {
  margin: 20px 4px 0;
  padding: 14px 10px 4px;
  border-color: rgba(255, 255, 255, .07);
}

.main { min-width: 0; }
.topbar {
  min-height: 104px;
  padding: 24px 32px 17px;
  gap: 12px;
  border: 0;
  background: color-mix(in srgb, var(--bg) 94%, transparent);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  backdrop-filter: blur(18px) saturate(140%);
}

html[data-theme="dark"] .topbar {
  background: color-mix(in srgb, var(--bg) 88%, transparent);
}

.topbar .tt { display: flex; flex-direction: column; }
.page-eyebrow {
  order: -1;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
  color: var(--brand);
  font-size: 9.5px;
  font-weight: 750;
  letter-spacing: .16em;
  text-transform: uppercase;
}
.page-eyebrow::before {
  content: "";
  width: 18px;
  height: 2px;
  border-radius: 3px;
  background: linear-gradient(90deg, #1e5bff, #38bdf8);
}
.topbar h1 {
  font-family: "Sora", var(--sans);
  font-size: clamp(22px, 1.8vw, 29px);
  font-weight: 600;
  letter-spacing: -.035em;
  line-height: 1.15;
}
.topbar .sub { margin-top: 5px; font-size: 12.5px; }

.search {
  min-width: 260px;
  padding: 10px 13px;
  border-color: color-mix(in srgb, var(--border) 76%, transparent);
  border-radius: 13px;
  background: color-mix(in srgb, var(--surface) 82%, transparent);
  box-shadow: none;
}
.search:focus-within {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px var(--brand-050);
}
.live {
  padding: 7px 10px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: color-mix(in srgb, var(--surface) 80%, transparent);
  font-size: 11.5px;
}
.iconbtn {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: color-mix(in srgb, var(--surface) 84%, transparent);
  box-shadow: none;
}
.user {
  min-height: 40px;
  padding: 4px 10px 4px 4px;
  border-radius: 13px;
  background: color-mix(in srgb, var(--surface) 84%, transparent);
  box-shadow: none;
}
.user .av { width: 31px; height: 31px; }

.filters {
  width: 100%;
  max-width: 1720px;
  margin-inline: auto;
  padding: 2px 32px 18px;
}
.selpill {
  min-height: 38px;
  padding: 8px 12px;
  border-radius: 11px;
  background: color-mix(in srgb, var(--surface) 82%, transparent);
  box-shadow: none;
}

.content {
  width: 100%;
  max-width: 1720px;
  margin-inline: auto;
  padding: 0 32px 48px;
  gap: 0;
}
.view { display: grid; gap: 20px; }

/* Surfaces */
.card,
.kpi,
.stat {
  border: 1px solid color-mix(in srgb, var(--border) 88%, transparent);
  border-radius: var(--radius);
  background: color-mix(in srgb, var(--surface) 99%, transparent);
  box-shadow: var(--shadow);
}
.card { padding: 20px; }
.card-h { margin-bottom: 16px; }
.card-h .ct {
  font-family: "Sora", var(--sans);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: -.02em;
}
.card-h .cs { margin-top: 4px; color: var(--ink-3); }
.card-h .link,
.stat .link {
  color: var(--brand);
  font-size: 11.5px;
  font-weight: 700;
}

.card,
.kpi,
.stat,
.iconbtn,
.selpill,
.search,
.user {
  transition: border-color var(--dur-fast), box-shadow var(--dur-fast), transform var(--dur-fast), background var(--dur-fast);
}
.card:hover,
.kpi:hover,
.stat:hover {
  border-color: color-mix(in srgb, var(--brand) 22%, var(--border));
  box-shadow: 0 16px 38px rgba(10, 26, 46, .055);
}
html[data-theme="dark"] .card:hover,
html[data-theme="dark"] .kpi:hover,
html[data-theme="dark"] .stat:hover { box-shadow: 0 22px 52px rgba(0, 0, 0, .28); }

/* KPI hierarchy */
.kpi-row { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 14px; }
.kpi {
  --k-accent: var(--vivid-blue);
  min-height: 140px;
  padding: 17px;
  overflow: hidden;
}
.kpi::before {
  content: "";
  position: absolute;
  inset: 0 18px auto;
  height: 3px;
  border-radius: 0 0 4px 4px;
  background: linear-gradient(90deg, var(--k-accent), color-mix(in srgb, var(--k-accent) 18%, transparent));
  opacity: .9;
}
.kpi:nth-child(2) { --k-accent: var(--vivid-sky); }
.kpi:nth-child(3) { --k-accent: #6fa8ff; }
.kpi:nth-child(4) { --k-accent: #22c55e; }
.kpi:nth-child(5) { --k-accent: #f59e0b; }
.kpi:has(.kico.ok) { --k-accent: #22c55e; }
.kpi:has(.kico.warn) { --k-accent: #f59e0b; }
.kpi:has(.kico.crit) { --k-accent: #ef4444; }
.kpi::after {
  content: "";
  position: absolute;
  right: -38px;
  top: -48px;
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(30, 91, 255, .075), transparent 70%);
  pointer-events: none;
}
.kpi .kh { gap: 10px; margin-bottom: 11px; }
.kpi .kico {
  width: 36px;
  height: 36px;
  border-radius: 11px;
  box-shadow: 0 8px 20px color-mix(in srgb, var(--k-accent) 14%, transparent);
}
.kpi .kico svg { width: 18px; height: 18px; }
.kpi .klab { color: var(--ink-3); font-size: 11.5px; font-weight: 600; }
.kpi .kval { font-size: clamp(26px, 2vw, 34px); letter-spacing: -.045em; }
.kpi .ksub { padding-top: 10px; font-size: 11.5px; }

#view-visaogeral #kpis { grid-template-columns: repeat(6, minmax(0, 1fr)); }
#view-visaogeral #kpis .kpi:first-child {
  grid-column: span 2;
  background:
    radial-gradient(circle at 90% 10%, rgba(56, 189, 248, .16), transparent 11rem),
    linear-gradient(135deg, #ffffff, #edf4ff 78%);
  border-color: rgba(30, 91, 255, .14);
  box-shadow: var(--shadow);
}
#view-visaogeral #kpis .kpi:first-child::after {
  width: 180px;
  height: 180px;
  right: -48px;
  top: -70px;
  background: radial-gradient(circle, rgba(30, 91, 255, .12), transparent 70%);
}
#view-visaogeral #kpis .kpi:first-child .kico {
  color: #1e5bff;
  background: #edf3ff;
  border: 1px solid rgba(30, 91, 255, .1);
}
#view-visaogeral #kpis .kpi:first-child .klab,
#view-visaogeral #kpis .kpi:first-child .ksub,
#view-visaogeral #kpis .kpi:first-child .kval small { color: var(--ink-3); }
#view-visaogeral #kpis .kpi:first-child .kval { color: var(--ink); }

html[data-theme="dark"] #view-visaogeral #kpis .kpi:first-child {
  background:
    radial-gradient(circle at 90% 10%, rgba(111, 168, 255, .18), transparent 11rem),
    linear-gradient(135deg, #12294d, #0d2140 78%);
  border-color: rgba(111, 168, 255, .18);
}
html[data-theme="dark"] #view-visaogeral #kpis .kpi:first-child .kico {
  color: #8bb8ff;
  background: rgba(111, 168, 255, .12);
  border-color: rgba(111, 168, 255, .18);
}
html[data-theme="dark"] #view-visaogeral #kpis .kpi:first-child .klab,
html[data-theme="dark"] #view-visaogeral #kpis .kpi:first-child .ksub,
html[data-theme="dark"] #view-visaogeral #kpis .kpi:first-child .kval small { color: #91a8c5; }
html[data-theme="dark"] #view-visaogeral #kpis .kpi:first-child .kval { color: #f7f9fc; }

/* Dashboard composition */
.mid-grid { gap: 20px; align-items: stretch; }
.overview-primary { grid-template-columns: minmax(0, 1.45fr) minmax(260px, .72fr) minmax(320px, 1fr); }
.overview-secondary { grid-template-columns: minmax(0, 1.15fr) minmax(260px, .7fr) minmax(320px, 1fr); }
.overview-primary > .card,
.overview-secondary > .card { height: 100%; }

.glowcard {
  position: relative;
  overflow: hidden;
  background: var(--surface) !important;
}
.glowcard::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 4px;
  background: linear-gradient(90deg, #1e5bff, #38bdf8, #6fa8ff, transparent 88%);
}
.glowcard .gc-ico {
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 11px;
  box-shadow: none;
  background: linear-gradient(135deg, #edf3ff, #e9f8ff);
}
.glowcard .gc-t b {
  font-family: "Sora", var(--sans);
  font-size: 14px;
  font-weight: 600;
}
.glowcard .gc-kebab { border: 0; background: var(--surface-2); }
.glowcard .gc-legend { padding-top: 3px; border-top: 1px solid var(--border); }

.avail-grid { gap: 16px; }
.donutwrap svg { filter: drop-shadow(0 8px 18px rgba(30, 91, 255, .08)); }
.donutwrap .dcenter b { font-size: 24px; }

.rail-item { padding: 12px 0; }
.rail-item .ri-ico { width: 32px; height: 32px; border-radius: 10px; }
.rail-item .ri-t { font-size: 12.5px; }
.rail-chip { padding: 12px 0; }

/* Tables behave like operational data surfaces, not documents. */
.tablewrap {
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface);
}
table { font-size: 12.5px; }
thead { background: var(--surface-2); }
thead th {
  padding: 12px 14px;
  border-bottom-color: var(--border);
  color: var(--ink-3);
  font-size: 9.5px;
  font-weight: 750;
  letter-spacing: .075em;
}
tbody td { padding: 14px; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: color-mix(in srgb, var(--brand-050) 45%, var(--surface)); }
td .nm { font-weight: 650; }
.cellbar .bar { height: 5px; background: var(--bg2); }
.badge { padding: 4px 9px; border-radius: 999px; font-size: 10.5px; }
.badge.ok { box-shadow: inset 0 0 0 1px rgba(22, 163, 74, .08); }
.badge.warn { box-shadow: inset 0 0 0 1px rgba(217, 119, 6, .08); }
.badge.crit { box-shadow: inset 0 0 0 1px rgba(229, 72, 77, .08); }

/* Secondary cards */
.bottom-row { gap: 14px; }
.stat { min-height: 160px; padding: 17px; }
.stat .sh .si { width: 34px; height: 34px; border-radius: 10px; }
.stat .sv { margin-top: 3px; font-size: 26px; }
.statusbar {
  border: 1px solid var(--border);
  border-radius: 14px;
  background: color-mix(in srgb, var(--surface) 72%, transparent);
  box-shadow: none;
}

.srv-grid { gap: 20px; }
.srv-rail { gap: 20px; }
.qaction { padding: 12px 8px; border-radius: 10px; }
.qaction:hover { background: var(--surface-2); }
.modal { border: 1px solid var(--border); border-radius: 20px; }
.menu { border-radius: 14px; }

/* Login */
#login {
  background:
    radial-gradient(circle at 50% 10%, rgba(30, 91, 255, .09), transparent 28rem),
    #f7f9fc;
}
.lcard {
  max-width: 390px;
  padding: 38px 34px;
  border-color: #e6ebf2;
  border-radius: 24px;
  background: rgba(255, 255, 255, .92);
  color: #122238;
  -webkit-backdrop-filter: blur(18px);
  backdrop-filter: blur(18px);
}
.lcard .lk-word { color: #0a1a2e; }
.lcard .lk-sig { color: #1e5bff; }
.lcard h1 { color: #465568 !important; }
.lcard p { color: #718096; }
#login input { color: #122238; background: #f7f9fc; border-color: #d6deea; }
html[data-theme="dark"] .lcard .lk-word { color: #0a1a2e; }
html[data-theme="dark"] .lcard .lk-sig { color: #1e5bff; }

/* Responsive */
@media (max-width: 1500px) {
  .kpi-row { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  #view-visaogeral #kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .overview-primary,
  .overview-secondary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .overview-primary .rail-card,
  .overview-secondary .rail-card { grid-column: 1 / -1; }
}

@media (max-width: 1180px) {
  .topbar { padding-inline: 24px; }
  .filters { padding-inline: 24px; }
  .content { padding-inline: 24px; }
  .search { min-width: 210px; }
}

@media (max-width: 1024px) {
  :root { --sidebar-w: 0px; }
  .layout { grid-template-columns: 1fr; }
  .sidebar { width: 264px; }
  .topbar { min-height: 88px; }
}

@media (max-width: 760px) {
  .topbar { padding: 16px; }
  .filters { padding: 0 16px 16px; }
  .content { padding: 0 16px 36px; }
  .page-eyebrow { display: none; }
  #view-visaogeral #kpis,
  .kpi-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  #view-visaogeral #kpis .kpi:first-child { grid-column: 1 / -1; }
  .overview-primary,
  .overview-secondary,
  .mid-grid,
  .low-grid { grid-template-columns: 1fr; }
  .overview-primary .rail-card,
  .overview-secondary .rail-card { grid-column: auto; }
  .view { gap: 14px; }
  .card { padding: 16px; }
}

@media (max-width: 560px) {
  body { background: var(--bg); }
  .topbar { min-height: 70px; background: var(--bg); }
  .topbar h1 { font-size: 17px; }
  .filters { gap: 8px; overflow-x: auto; flex-wrap: nowrap; }
  .selpill { white-space: nowrap; }
  .content { padding-inline: 12px; }
  .kpi { min-height: 118px; padding: 14px; }
  .kpi .kico { width: 32px; height: 32px; }
  .kpi .klab { font-size: 10.5px; }
  .kpi .kval { font-size: 26px; }
  #view-visaogeral #kpis .kpi:first-child { min-height: 132px; }
  .tablewrap { border: 0; background: transparent; }
  .tablewrap tbody tr {
    border-radius: 15px;
    padding: 12px 14px;
    box-shadow: var(--shadow-sm);
  }
  .bottom-row { gap: 12px; }
  .stat { min-height: 142px; }
}

@media (min-width: 1800px) {
  .topbar { padding-left: max(32px, calc((100% - 1720px) / 2 + 32px)); padding-right: max(32px, calc((100% - 1720px) / 2 + 32px)); }
}

/* ========================================================================== 
   NEWSTRIX Control Room 2026 — operational premium / mobile first
   ========================================================================== */
:root {
  --bg: #f5f7fb;
  --bg2: #eaf0f7;
  --surface: #ffffff;
  --surface-2: #f7f9fc;
  --border: #e2e8f0;
  --border-strong: #cbd5e1;
  --ink: #102138;
  --ink-2: #405168;
  --ink-3: #6c7d92;
  --ink-4: #94a3b8;
  --ok: #128a45;
  --ok-bg: #e9f8ef;
  --warn: #b96508;
  --warn-bg: #fff4df;
  --crit: #d8393e;
  --crit-bg: #fff0f0;
  --shadow-sm: 0 1px 2px rgba(15, 31, 52, .04), 0 5px 14px rgba(15, 31, 52, .035);
  --shadow: 0 1px 3px rgba(15, 31, 52, .04), 0 14px 34px rgba(15, 31, 52, .045);
  --shadow-lg: 0 28px 70px rgba(7, 17, 32, .2);
  --radius: 16px;
  --radius-sm: 11px;
  --radius-lg: 22px;
  --dock-h: 74px;
}

html[data-theme="dark"] {
  --bg: #07111f;
  --bg2: #0b192b;
  --surface: #0d1b2f;
  --surface-2: #10233c;
  --border: rgba(148, 180, 222, .13);
  --border-strong: rgba(148, 180, 222, .25);
  --ink: #f5f8fc;
  --ink-2: #d6e0ed;
  --ink-3: #92a3b8;
  --ink-4: #64748b;
  --ok: #43d17a;
  --warn: #ffb340;
  --crit: #ff6b70;
}

html { scroll-behavior: smooth; }
body { letter-spacing: -.004em; }
button, a, input, select { -webkit-tap-highlight-color: transparent; }
:where(button, a, input, select, [tabindex]):focus-visible {
  outline: 3px solid color-mix(in srgb, var(--brand) 35%, transparent);
  outline-offset: 2px;
}

/* Shell and navigation */
.sidebar {
  background:
    radial-gradient(circle at 8% 2%, rgba(56, 189, 248, .16), transparent 18rem),
    linear-gradient(180deg, #0e2947 0%, #081a2f 72%, #071526 100%);
}
.nav a { min-height: 44px; }
.nav a.active { box-shadow: inset 3px 0 0 #6fa8ff, 0 8px 24px rgba(0, 0, 0, .08); }
.topbar { position: sticky; top: 0; min-height: 92px; padding-top: 20px; z-index: 40; }
.topbar h1 { font-weight: 650; }
.page-eyebrow { color: var(--brand); }
.content { padding-bottom: 54px; }
.view { gap: 18px; }

/* Operational hero */
.ops-hero {
  --hero: var(--ok);
  --hero-bg: var(--ok-bg);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 128px;
  padding: 22px 24px;
  overflow: hidden;
  position: relative;
  border: 1px solid color-mix(in srgb, var(--hero) 22%, var(--border));
  border-radius: var(--radius-lg);
  background:
    radial-gradient(circle at 82% 0, color-mix(in srgb, var(--hero) 12%, transparent), transparent 22rem),
    linear-gradient(135deg, color-mix(in srgb, var(--hero-bg) 58%, var(--surface)), var(--surface) 62%);
  box-shadow: var(--shadow);
}
.ops-hero::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: var(--hero);
}
.ops-hero[data-state="warning"] { --hero: var(--warn); --hero-bg: var(--warn-bg); }
.ops-hero[data-state="critical"], .ops-hero[data-state="offline"] { --hero: var(--crit); --hero-bg: var(--crit-bg); }
.ops-hero[data-state="connecting"] { --hero: var(--ink-4); --hero-bg: var(--surface-2); }
.ops-hero-status { display: flex; align-items: center; gap: 16px; min-width: 0; }
.ops-hero-icon {
  width: 48px;
  height: 48px;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: 15px;
  color: var(--hero);
  background: color-mix(in srgb, var(--hero) 12%, var(--surface));
  border: 1px solid color-mix(in srgb, var(--hero) 16%, transparent);
}
.ops-hero-icon svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 2; }
.ops-eyebrow {
  display: block;
  margin-bottom: 4px;
  color: var(--ink-3);
  font-size: 9.5px;
  font-weight: 750;
  letter-spacing: .14em;
  text-transform: uppercase;
}
.ops-hero h2 { margin: 0; color: var(--ink); font: 650 clamp(18px, 1.5vw, 24px)/1.2 "Sora", var(--sans); letter-spacing: -.035em; }
.ops-hero p { margin: 6px 0 0; color: var(--ink-3); font-size: 12.5px; }
.ops-hero-actions { display: flex; gap: 8px; flex: none; }
.ops-hero-actions button {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 13px;
  border: 1px solid var(--border);
  border-radius: 12px;
  color: var(--ink-2);
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  font: 650 12px var(--sans);
}
.ops-hero-actions button:hover { color: var(--brand); border-color: color-mix(in srgb, var(--brand) 35%, var(--border)); transform: translateY(-1px); }
.ops-hero-actions svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.8; }

/* Information hierarchy across every view */
.card, .kpi, .stat { box-shadow: var(--shadow-sm); }
.card:hover, .kpi:hover, .stat:hover { transform: none; box-shadow: var(--shadow); }
.card-h .ct { font-size: 14px; font-weight: 650; }
.kpi { min-height: 132px; }
.kpi .kval { font-variant-numeric: tabular-nums; }
.kpi .ksub { line-height: 1.35; }
.rail-item { min-height: 54px; }
.badge { font-weight: 700; letter-spacing: .01em; }
.tablewrap { overflow: hidden; }
thead th { background: color-mix(in srgb, var(--surface-2) 86%, transparent); }
tbody tr { transition: background 160ms ease; }
.menu { border-radius: 14px; padding: 6px; }
.menu button { min-height: 40px; border-radius: 9px; }
.modal { border-radius: 20px; }
.modal button { min-height: 42px; border-radius: 11px; }
#toast {
  bottom: max(26px, calc(env(safe-area-inset-bottom) + 18px)) !important;
  border-radius: 12px !important;
  background: #0a1a2e !important;
  color: #f7f9fc !important;
}

/* Mobile dock and sheets are inert on desktop */
.mobile-dock, .mobile-sheet, .mobile-sheet-scrim { display: none; }

@media (max-width: 1024px) {
  .topbar { min-height: 82px; }
}

@media (max-width: 760px) {
  body { padding-bottom: calc(var(--dock-h) + env(safe-area-inset-bottom)); }
  body.sheet-open { overflow: hidden; }
  .menu-btn { display: none !important; }
  .topbar {
    min-height: 66px;
    padding: 10px 14px;
    border-bottom: 1px solid var(--border);
    background: color-mix(in srgb, var(--bg) 96%, transparent);
  }
  .topbar .tt { flex: 1; min-width: 0; }
  .topbar h1 { font-size: 17px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .topbar .sub, .topbar .grow, .topbar .live, .topbar .search, .topbar .user { display: none; }
  .topbar .iconbtn { width: 44px; height: 44px; }
  .filters { padding: 10px 12px 12px; gap: 8px; scrollbar-width: none; }
  .filters::-webkit-scrollbar { display: none; }
  .content { padding: 0 12px 28px; }
  .view { gap: 14px; }
  .ops-hero { align-items: flex-start; min-height: 0; padding: 18px 16px; gap: 16px; flex-direction: column; }
  .ops-hero-status { align-items: flex-start; }
  .ops-hero-icon { width: 42px; height: 42px; border-radius: 13px; }
  .ops-hero h2 { font-size: 18px; }
  .ops-hero p { font-size: 12px; }
  .ops-hero-actions { width: 100%; display: grid; grid-template-columns: repeat(3, 1fr); }
  .ops-hero-actions button { justify-content: center; padding-inline: 8px; }
  #view-visaogeral .overview-primary .rail-card { order: -1; }
  .kpi-row, #view-visaogeral #kpis { gap: 10px; }
  .kpi { min-height: 112px; border-radius: 15px; }
  .card { border-radius: 15px; }
  .tablewrap tbody tr { border-radius: 14px; }

  .mobile-dock {
    position: fixed;
    z-index: 100;
    left: 0;
    right: 0;
    bottom: 0;
    height: calc(var(--dock-h) + env(safe-area-inset-bottom));
    padding: 7px 8px max(7px, env(safe-area-inset-bottom));
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    border-top: 1px solid var(--border);
    background: color-mix(in srgb, var(--surface) 96%, transparent);
    -webkit-backdrop-filter: blur(20px) saturate(150%);
    backdrop-filter: blur(20px) saturate(150%);
    box-shadow: 0 -12px 35px rgba(7, 17, 32, .08);
  }
  .mobile-dock button {
    min-width: 0;
    min-height: 56px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    padding: 4px 2px;
    border: 0;
    border-radius: 12px;
    color: var(--ink-4);
    background: transparent;
    font: 650 9.5px var(--sans);
  }
  .mobile-dock button.active { color: var(--brand); background: var(--brand-050); }
  .mobile-dock svg { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 1.8; }
  .dock-icon { position: relative; display: grid; place-items: center; }
  #dockAlertCount {
    position: absolute;
    top: -7px;
    right: -10px;
    min-width: 16px;
    height: 16px;
    display: none;
    place-items: center;
    padding: 0 4px;
    border: 2px solid var(--surface);
    border-radius: 999px;
    background: var(--warn);
    color: #fff;
    font: 750 8.5px var(--sans);
    font-style: normal;
  }
  #dockAlertCount.show { display: grid; }
  #dockAlertCount.crit { background: var(--crit); }

  .mobile-sheet-scrim {
    display: block;
    position: fixed;
    z-index: 109;
    inset: 0;
    pointer-events: none;
    opacity: 0;
    background: rgba(4, 12, 24, .55);
    transition: opacity 220ms ease;
  }
  .mobile-sheet {
    display: block;
    position: fixed;
    z-index: 110;
    left: 0;
    right: 0;
    bottom: 0;
    max-height: min(82vh, 720px);
    padding: 8px 16px calc(18px + env(safe-area-inset-bottom));
    overflow-y: auto;
    border: 1px solid var(--border);
    border-bottom: 0;
    border-radius: 24px 24px 0 0;
    background: var(--surface);
    box-shadow: 0 -30px 80px rgba(4, 12, 24, .28);
    transform: translateY(105%);
    transition: transform 260ms cubic-bezier(.16, 1, .3, 1);
  }
  body.sheet-open .mobile-sheet-scrim { opacity: 1; pointer-events: auto; }
  body.sheet-open .mobile-sheet { transform: none; }
  .mobile-sheet-handle { width: 42px; height: 4px; margin: 0 auto 12px; border-radius: 999px; background: var(--border-strong); }
  .mobile-sheet header { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 12px; }
  .mobile-sheet h2 { margin: 0; font: 650 20px "Sora", var(--sans); letter-spacing: -.03em; }
  #mobileSheetClose { width: 44px; height: 44px; display: grid; place-items: center; border: 1px solid var(--border); border-radius: 13px; color: var(--ink-2); background: var(--surface-2); }
  #mobileSheetClose svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 2; }
  .mobile-sheet-grid { display: grid; gap: 8px; }
  .mobile-sheet-grid > button {
    width: 100%;
    min-height: 68px;
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr) 20px;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: 14px;
    color: var(--ink);
    background: var(--surface);
    text-align: left;
  }
  .sheet-item-icon { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 12px; color: var(--brand); background: var(--brand-050); }
  .sheet-item-icon svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; }
  .mobile-sheet-grid b { display: block; font-size: 13px; font-weight: 700; }
  .mobile-sheet-grid small { display: block; margin-top: 2px; color: var(--ink-3); font-size: 11px; }
  .sheet-chevron { width: 18px; height: 18px; fill: none; stroke: var(--ink-4); stroke-width: 2; }
  .ovl { align-items: end; padding: 0; }
  .ovl .modal { max-width: none; border-radius: 22px 22px 0 0; padding: 22px 18px calc(18px + env(safe-area-inset-bottom)); }
  .modal .mact { display: grid; grid-template-columns: 1fr 1fr; }
  .modal .mact button { min-height: 46px; }
  #toast { bottom: calc(var(--dock-h) + env(safe-area-inset-bottom) + 12px) !important; max-width: calc(100vw - 24px) !important; }
}

@media (max-width: 380px) {
  .ops-hero-actions button span { display: none; }
  .ops-hero-actions button svg { width: 20px; height: 20px; }
  .mobile-dock button { font-size: 9px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .mobile-sheet, .mobile-sheet-scrim { transition: none; }
}

/* MFA, autorização reforçada e histórico */
.login-field-label { display: block; margin: 12px 0 6px; color: #465568; font-size: 11px; font-weight: 700; text-align: left; }
.login-link { margin-top: 10px; padding: 4px; border: 0; color: var(--brand); background: transparent; font: 650 11.5px var(--sans); }
.security-feature { display: flex; align-items: center; justify-content: space-between; gap: 14px; min-height: 68px; padding: 12px 0; border-top: 1px solid var(--border); }
.security-feature:first-child { border-top: 0; padding-top: 0; }
.security-feature:last-child { padding-bottom: 0; }
.security-feature b { display: block; color: var(--ink); font-size: 13px; }
.security-feature small { display: block; margin-top: 3px; color: var(--ink-3); font-size: 11px; }
.security-feature button { min-height: 40px; padding: 8px 12px; border: 1px solid var(--border); border-radius: 10px; color: var(--brand); background: var(--brand-050); font: 700 11.5px var(--sans); }
.security-feature button:disabled { color: var(--ok); background: var(--ok-bg); opacity: .8; }
.secure-modal label { display: grid; gap: 6px; margin: 12px 0; color: var(--ink-2); font-size: 12px; font-weight: 650; }
.secure-modal label small { color: var(--ink-3); font-weight: 400; }
.secure-input { width: 100%; min-height: 46px; padding: 10px 12px; border: 1px solid var(--border-strong); border-radius: 11px; color: var(--ink); background: var(--surface-2); font: 500 15px var(--sans); outline: 0; }
.secure-input:focus { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-050); }
.mfa-qr { display: block; width: min(230px, 70vw); aspect-ratio: 1; margin: 14px auto; border: 10px solid #fff; border-radius: 14px; }
.manual-secret { display: grid; gap: 4px; padding: 10px 12px; border: 1px dashed var(--border-strong); border-radius: 11px; text-align: center; }
.manual-secret span { color: var(--ink-3); font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; }
.manual-secret code { overflow-wrap: anywhere; color: var(--ink); font-size: 12px; }
.recovery-modal pre { max-height: 280px; overflow: auto; padding: 14px; border-radius: 12px; color: var(--ink); background: var(--surface-2); font: 650 13px/1.7 var(--mono); text-align: center; user-select: all; }
.history-modal { max-width: 620px; }
.history-list { display: grid; gap: 8px; max-height: min(55vh, 480px); margin: 14px 0; overflow-y: auto; }
.history-row { display: grid; grid-template-columns: auto 1fr; align-items: start; gap: 10px; padding: 11px; border: 1px solid var(--border); border-radius: 11px; }
.history-row b, .history-row small { display: block; }
.history-row b { color: var(--ink); font-size: 12px; }
.history-row small { margin-top: 3px; color: var(--ink-3); font-size: 10.5px; }
.skel { border-radius: 9px; }

@media (max-width: 560px) {
  .security-feature { align-items: flex-start; }
  .security-feature button { min-height: 44px; }
  .enrollment-modal { max-height: 92vh; overflow-y: auto; }
  .recovery-modal .mact { grid-template-columns: 1fr; }
}
