/* ICARUS Design System (SaaS) */
@import url('icarus-kpi-cards.css');
@import url('app-shell.css');
@import url('dashboard-hero.css');
@import url('operational-polish.css');
@import url('light-mode-polish.css');
@import url('icarus-ui.css');
@import url('portal-shell.css');
@import url('sprint-a-bridge.css');
@import url('sprint-b-shell.css');
@import url('sprint-c-data.css');
@import url('sprint-d-polish.css');
@import url('sprint-e-polish.css');
@import url('sprint-f-polish.css');

/* -----------------------------
   1) TOKENS (Light default)
------------------------------ */
:root {
  /* BACKGROUND */
  --bg-main: #f7f8fa;
  --bg-card: #ffffff;
  --bg-hover: #f0f2f6;

  /* TEXTO */
  --text-primary: #16181d;
  --text-secondary: #667085;

  /* BORDAS */
  --border: #e6e8ec;
  --border-strong: #d4d7dd;

  /* CORES STATUS (acento índigo contido; status corporativos) */
  --green: #1f883d;
  --green-bg: #eafbef;

  --red: #d1242f;
  --red-bg: #fdecec;

  --yellow: #9a6700;
  --yellow-bg: #fdf6e3;

  --blue: #5b63f0;
  --blue-bg: #eef0fe;

  /* UI */
  --radius: 12px;
  --radius-sm: 8px;
  --radius-lg: 16px;
  --shadow: 0 1px 2px rgba(16,24,40,0.05), 0 4px 12px rgba(16,24,40,0.06);

  /* TYPO / LAYOUT */
  --font-sans: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, "DM Sans", Arial, "Noto Sans", "Liberation Sans", sans-serif;
  --font-display: 'Outfit', ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, "DM Sans", Arial, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  --container: 1400px;

  /* MOTION */
  --t: 0.2s;
  --e: cubic-bezier(.2,.8,.2,1);

  /* FOCUS (anel de acento) */
  --focus: 0 0 0 3px rgba(91,99,240,0.18);

  /* Sprint A — ponte legacy (--icarus-* → design system) */
  --icarus-bg: var(--bg-main);
  --icarus-fg: var(--text-primary);
  --icarus-muted: var(--text-secondary);
  --icarus-muted-2: color-mix(in srgb, var(--text-secondary) 78%, transparent);
  --icarus-surface: color-mix(in srgb, var(--bg-card) 92%, transparent);
  --icarus-surface-2: color-mix(in srgb, var(--bg-card) 88%, transparent);
  --icarus-surface-3: var(--bg-card);
  --icarus-input: var(--bg-card);
  --icarus-border: var(--border);
  --icarus-divider: color-mix(in srgb, var(--border) 85%, transparent);
  --icarus-green: var(--green);
  --icarus-red: var(--red);
  --icarus-blue: var(--blue);
  --icarus-ease: var(--e);
  --icarus-t: var(--t);
  --icarus-shadow-hover: 0 12px 32px rgba(15, 23, 42, 0.12);
  --icarus-shadow-press: 0 6px 18px rgba(15, 23, 42, 0.10);
}

/* -----------------------------
   2) DARK MODE
------------------------------ */
[data-theme="dark"] {
  /* Superfícies — Ardósia azul (dark blue-slate), elevação por hairline */
  --bg-main: #18212e;
  --bg-card: #212d3d;
  --bg-hover: #2a3a4e;

  --text-primary: #eaf0f8;
  --text-secondary: #8592a4;

  --border: rgba(150, 180, 220, 0.16);
  --border-strong: rgba(150, 180, 220, 0.24);

  /* Status — corporativos, dessaturados (não neon) */
  --green: #3fb950;
  --red: #f85149;
  --yellow: #d29922;
  --blue: #6e79ff;

  /* Status backgrounds — sutis sobre fundo escuro */
  --green-bg: rgba(63, 185, 80, 0.13);
  --red-bg: rgba(248, 81, 73, 0.13);
  --yellow-bg: rgba(210, 153, 34, 0.14);
  --blue-bg: rgba(110, 121, 255, 0.14);

  /* Sombras subtis; a elevação vem sobretudo do hairline da borda */
  --shadow: 0 4px 16px rgba(0, 0, 0, 0.35);
  --focus: 0 0 0 3px rgba(110, 121, 255, 0.22);

  --icarus-shadow-hover: 0 16px 40px rgba(0, 0, 0, 0.5);
  --icarus-shadow-press: 0 8px 22px rgba(0, 0, 0, 0.4);
}

/* -----------------------------
   3) BASE / RESETS
------------------------------ */
* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: var(--font-sans);
  background: var(--bg-main);
  color: var(--text-primary);
}

/* Dark mode background (Ardósia azul — leve degradê p/ profundidade) */
html[data-theme="dark"] body {
  background: radial-gradient(circle at top left, #1e2a3a, #141d28);
}

/* Nota: NÃO definimos `.hidden` aqui para não quebrar Tailwind (ex.: `hidden md:flex`). */
.ds-hidden { display: none; }

a { color: inherit; }

/* -----------------------------
   MAPA DE REDE (ISP/NOC)
------------------------------ */
.map-page .page-header {
  margin-bottom: 8px;
  gap: 10px;
}
.map-page .page-subtitle {
  display: none;
}
.map-page .page-title {
  font-size: 1.35rem;
  line-height: 1.2;
}
main.page:has(.map-page) {
  min-width: 0;
  flex: 1 1 auto;
  width: 100%;
  max-width: none;
  padding-top: 12px;
  padding-bottom: 10px;
  padding-left: 10px;
  padding-right: 10px;
}
@media (min-width: 768px) {
  main.page:has(.map-page) {
    padding-top: 16px;
    padding-left: 12px;
    padding-right: 12px;
  }
}
@media (min-width: 1280px) {
  main.page:has(.map-page) {
    padding-left: 8px;
    padding-right: 8px;
  }
}

/* Topbar SaaS: margens negativas padrão (-40px) assumem .page { padding: 40px } */
@media (min-width: 769px) {
  body.icarus-desktop-shell main.page:has(.map-page) > .icarus-topbar {
    margin: -16px -12px 12px;
    padding: 12px 12px;
  }
}
@media (min-width: 769px) and (max-width: 1024px) {
  body.icarus-desktop-shell main.page:has(.map-page) > .icarus-topbar {
    margin: -16px -12px 12px;
    padding: 12px 12px;
    flex-wrap: nowrap;
  }
}
@media (min-width: 1280px) {
  body.icarus-desktop-shell main.page:has(.map-page) > .icarus-topbar {
    margin-left: -8px;
    margin-right: -8px;
    padding-left: 8px;
    padding-right: 8px;
  }
}

.map-container,
.map-page.map-container {
  max-width: none !important;
  width: 100%;
  margin: 0 !important;
  padding-left: 0 !important;
  padding-right: 0 !important;
}

/* Modo foco / TV NOC — alinhado ao noc-war-room */
body.map-war-room aside.sidebar {
  display: none !important;
}
body.map-war-room main.page:has(.map-page) {
  padding-top: 8px;
  padding-bottom: 8px;
  padding-left: 10px;
  padding-right: 10px;
}
body.map-war-room main.page:has(.map-page) > .icarus-topbar {
  margin: 0 0 8px;
  padding: 8px 10px;
}
.map-page.map-page--focus .map-page-hero,
.map-page.map-page--focus .page-hero {
  display: none !important;
}
.map-page.map-page--focus .map-shell {
  min-height: calc(100vh - 80px);
}
.map-page.map-page--focus .map-center {
  min-height: calc(100vh - 96px);
}
.map-page.map-page--focus .map-stage,
.map-page.map-page--focus .map-canvas {
  min-height: calc(100vh - 112px);
}
body.map-war-room .map-page.map-page--focus .map-shell {
  min-height: calc(100vh - 64px);
}
body.map-war-room .map-page.map-page--focus .map-center {
  min-height: calc(100vh - 80px);
}
body.map-war-room .map-page.map-page--focus .map-stage,
body.map-war-room .map-page.map-page--focus .map-canvas {
  min-height: calc(100vh - 96px);
}
.map-layout-toggle--focus.map-war-toggle.is-active,
.map-layout-toggle--focus.map-war-toggle[aria-pressed="true"] {
  background: color-mix(in srgb, var(--accent) 18%, transparent);
  border-color: color-mix(in srgb, var(--accent) 45%, transparent);
  color: var(--accent);
}

.map-shell {
  display: flex;
  flex-direction: row;
  align-items: stretch;
  gap: 8px;
  min-height: calc(100vh - 200px);
  width: 100%;
}
.map-shell .map-side {
  flex: 0 0 280px;
  width: 280px;
  max-width: 280px;
}
.map-shell .map-details {
  flex: 0 0 360px;
  width: 360px;
  max-width: 360px;
}
.map-shell .map-center {
  flex: 1 1 auto;
  min-width: 0;
  width: auto;
}
.map-shell--side-hidden .map-side {
  display: none;
}
.map-shell--details-hidden .map-details {
  display: none;
}
@media (max-width: 1100px) {
  .map-shell {
    flex-direction: column;
    min-height: 0;
  }
  .map-shell .map-side,
  .map-shell .map-details {
    flex: 0 0 auto;
    width: 100%;
    max-width: none;
  }
}
.map-shell--bleed {
  margin-left: 0;
  margin-right: 0;
  padding-left: 0;
  padding-right: 0;
}

.map-side {
  position: sticky;
  top: 24px;
  align-self: flex-start;
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: calc(100vh - 120px);
  overflow: auto;
  background: transparent;
  border: none;
  box-shadow: none;
}
html[data-theme="light"] .map-side { background: transparent; }

.map-side-card {
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(15, 23, 42, 0.58);
  backdrop-filter: blur(12px);
  box-shadow: 0 12px 32px rgba(0,0,0,0.28);
  overflow: hidden;
}
html[data-theme="light"] .map-side-card {
  background: rgba(255,255,255,0.94);
  border-color: rgba(15,23,42,0.10);
  box-shadow: var(--shadow);
}
.map-side-card__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 14px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
html[data-theme="light"] .map-side-card__head { border-bottom-color: rgba(15,23,42,0.08); }
.map-side-card__title {
  margin: 0;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  color: var(--text-secondary);
}
.map-side-card__chev {
  border: 0;
  background: transparent;
  color: var(--text-secondary);
  padding: 2px;
  cursor: pointer;
  line-height: 0;
}
.map-side-card__chev svg { width: 16px; height: 16px; }
.map-side-card.is-collapsed .map-side-card__body { display: none; }
.map-side-card.is-collapsed .map-side-card__chev svg { transform: rotate(-90deg); }
.map-side-card__body { padding: 12px 14px 14px; }
.map-side-card__sub {
  margin: 0 0 10px;
  font-size: 11px;
  color: var(--text-secondary);
  font-family: var(--font-mono);
}

.map-resumo { margin: 0; padding: 0; }
.map-resumo__item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid rgba(255,255,255,0.05);
}
html[data-theme="light"] .map-resumo__item { border-bottom-color: rgba(15,23,42,0.06); }
.map-resumo__item:last-child { border-bottom: 0; padding-bottom: 0; }
.map-resumo__item:first-child { padding-top: 0; }
.map-resumo__label {
  font-size: 12px;
  color: var(--text-secondary);
  font-weight: 600;
}
.map-resumo__value {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 22px;
  font-weight: 900;
  letter-spacing: -0.02em;
  line-height: 1;
}
.map-resumo__item--online .map-resumo__num { color: #4ade80; }
.map-resumo__item--offline .map-resumo__num { color: #f87171; }
.map-resumo__item--warn .map-resumo__num { color: #fbbf24; }
.map-resumo__suffix {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-secondary);
}
.map-resumo__pill {
  display: inline-flex;
  align-items: center;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
  line-height: 1;
}
.map-resumo__pill--green {
  color: #86efac;
  background: rgba(34,197,94,0.14);
  border: 1px solid rgba(34,197,94,0.22);
}
.map-resumo__pill--red {
  color: #fca5a5;
  background: rgba(239,68,68,0.12);
  border: 1px solid rgba(239,68,68,0.22);
}
.map-resumo__item.is-loading .map-resumo__value {
  position: relative;
  color: transparent !important;
  min-width: 48px;
  min-height: 22px;
  border-radius: 8px;
  overflow: hidden;
}
.map-resumo__item.is-loading .map-resumo__value::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(90deg, rgba(255,255,255,0.04) 0%, rgba(255,255,255,0.12) 50%, rgba(255,255,255,0.04) 100%);
  background-size: 200% 100%;
  animation: skeletonShimmer 1.2s ease-in-out infinite;
}
.map-resumo__item.is-loading .map-resumo__pill { visibility: hidden; }

.map-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.map-toolbar .row { gap: 10px; }

.map-stage {
  position: relative;
  flex: 1;
  min-height: calc(100vh - 248px);
  display: flex;
  flex-direction: column;
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,0.06);
  background: rgba(10,11,13, 0.55);
  box-shadow: 0 12px 36px rgba(0,0,0,0.35);
  overflow: hidden;
}
html[data-theme="light"] .map-stage {
  background: color-mix(in srgb, var(--bg-card) 92%, transparent);
  border-color: color-mix(in srgb, var(--border) 80%, transparent);
  box-shadow: var(--shadow);
}

.map-marquee {
  position: absolute;
  z-index: 12;
  border: 2px dashed rgba(110,121,255, 0.9);
  background: rgba(110,121,255, 0.14);
  border-radius: 6px;
  pointer-events: none;
  box-sizing: border-box;
}

.map-canvas {
  flex: 1;
  width: 100%;
  min-height: calc(100vh - 248px);
  height: 100%;
}
@media (max-width: 768px) {
  .map-canvas { min-height: calc(100vh - 300px); }
  .map-stage { min-height: calc(100vh - 300px); }
}

.map-topbar {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto;
  gap: 8px;
  align-items: center;
  padding: 8px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(10,11,13,0.55);
  backdrop-filter: blur(12px);
}
html[data-theme="light"] .map-topbar {
  background: rgba(255,255,255,0.92);
  border-color: rgba(15,23,42,0.12);
}
.map-topbar__left {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}
.map-topbar__search { width: 100%; min-width: 0; }
.map-topbar__right {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.map-center {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
  min-height: calc(100vh - 210px);
}

.map-topbar--outside {
  margin: 0 0 12px 0;
}

/* Controles menores (igual ao print) */
.map-topbar .input,
.map-topbar .btn {
  border-radius: 12px;
}
.map-topbar .input {
  padding: 7px 10px;
  font-size: 12px;
  line-height: 1.1;
}
.map-topbar .btn {
  padding: 7px 10px;
  font-size: 12px;
}
.map-topbar__left .map-topbar__search {
  padding: 8px 10px;
  font-size: 12px;
}
@media (max-width: 900px) {
  .map-shell { grid-template-columns: 1fr; }
  .map-topbar { grid-template-columns: 1fr; }
  .map-topbar__right { justify-content: flex-start; }
}

.map-mini {
  position: absolute;
  right: 14px;
  bottom: 14px;
  width: 220px;
  height: 140px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(10,11,13,0.55);
  backdrop-filter: blur(10px);
  overflow: hidden;
  box-shadow: 0 10px 24px rgba(0,0,0,0.35);
}
html[data-theme="light"] .map-mini {
  background: rgba(255,255,255,0.75);
  border-color: rgba(15,23,42,0.12);
}
.map-mini canvas { width: 100%; height: 100%; display: block; }

.map-panel {
  position: sticky;
  top: 24px;
  align-self: flex-start;
  max-height: calc(100vh - 120px);
  overflow: auto;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(15, 23, 42, 0.58);
  backdrop-filter: blur(12px);
  box-shadow: 0 12px 32px rgba(0,0,0,0.28);
}
html[data-theme="light"] .map-panel {
  background: rgba(255,255,255,0.94);
  border-color: rgba(15,23,42,0.10);
  box-shadow: var(--shadow);
}
.map-panel__header {
  padding: 14px 14px 12px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 10px;
}
.map-panel__title { margin: 0; font-weight: 900; letter-spacing: -0.01em; }
.map-panel__sub { margin: 4px 0 0; font-size: 12px; color: var(--text-secondary); font-family: var(--font-mono); }
.map-panel__body { padding: 14px; }

/* Host detail panel (lateral direita) */
.map-host-empty {
  padding: 28px 18px;
  text-align: center;
  color: var(--text-secondary);
  font-size: 13px;
  line-height: 1.5;
}
.map-host-empty__icon {
  width: 48px;
  height: 48px;
  margin: 0 auto 12px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: rgba(110,121,255,0.12);
  border: 1px solid rgba(110,121,255,0.22);
  color: #93c5fd;
}
.map-host-detail__hero {
  display: grid;
  grid-template-columns: 44px 1fr auto;
  gap: 12px;
  align-items: start;
  padding: 16px 16px 14px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
html[data-theme="light"] .map-host-detail__hero { border-bottom-color: rgba(15,23,42,0.08); }
.map-host-detail__icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: rgba(110,121,255,0.14);
  border: 1px solid rgba(110,121,255,0.24);
  color: #93c5fd;
}
.map-host-detail__icon svg { width: 22px; height: 22px; }
.map-host-detail__name {
  margin: 0;
  font-size: 17px;
  font-weight: 900;
  letter-spacing: -0.02em;
  line-height: 1.2;
  word-break: break-word;
}
.map-host-detail__meta {
  margin: 4px 0 0;
  font-size: 12px;
  color: var(--text-secondary);
}
.map-host-detail__uptime {
  margin: 4px 0 0;
  font-size: 11px;
  color: var(--text-secondary);
  font-family: var(--font-mono);
}
.map-host-badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
  white-space: nowrap;
}
.map-host-badge--online {
  color: #86efac;
  background: rgba(34,197,94,0.14);
  border: 1px solid rgba(34,197,94,0.24);
}
.map-host-badge--offline {
  color: #fca5a5;
  background: rgba(239,68,68,0.12);
  border: 1px solid rgba(239,68,68,0.22);
}
.map-host-tabs {
  display: flex;
  gap: 0;
  padding: 0 8px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  overflow-x: auto;
}
html[data-theme="light"] .map-host-tabs { border-bottom-color: rgba(15,23,42,0.08); }
.map-host-tab {
  flex: 0 0 auto;
  border: 0;
  background: transparent;
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 700;
  padding: 10px 10px;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  transition: color var(--t) var(--e), border-color var(--t) var(--e);
}
.map-host-tab.is-active {
  color: #93c5fd;
  border-bottom-color: var(--blue);
}
.map-host-tabpanel { padding: 14px 16px 16px; }
.map-host-tabpanel.ds-hidden { display: none; }

.map-metric-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 14px;
}
.map-metric-tile {
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.06);
  background: rgba(10,11,13,0.35);
  padding: 10px 10px 8px;
  min-height: 72px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
html[data-theme="light"] .map-metric-tile {
  background: var(--bg-hover);
  border-color: var(--border);
}
.map-metric-tile__label {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-secondary);
}
.map-metric-tile__value {
  font-size: 20px;
  font-weight: 900;
  letter-spacing: -0.02em;
  line-height: 1.1;
}
.map-metric-tile__spark {
  margin-top: auto;
  align-self: flex-end;
  opacity: 0.85;
}
.map-spark { display: block; }

.map-host-section { margin-top: 14px; }
.map-host-section__title {
  margin: 0 0 8px;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  color: var(--text-secondary);
}
.map-host-kv {
  margin: 0;
  display: grid;
  gap: 6px;
}
.map-host-kv__row {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  font-size: 12px;
  padding: 6px 0;
  border-bottom: 1px solid rgba(255,255,255,0.04);
}
html[data-theme="light"] .map-host-kv__row { border-bottom-color: rgba(15,23,42,0.06); }
.map-host-kv__row:last-child { border-bottom: 0; }
.map-host-kv__key { color: var(--text-secondary); }
.map-host-kv__val { font-weight: 700; text-align: right; word-break: break-word; }

.map-host-links { display: flex; flex-direction: column; gap: 8px; }
.map-host-link {
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,0.06);
  background: rgba(10,11,13,0.28);
  padding: 8px 10px;
}
html[data-theme="light"] .map-host-link { background: var(--bg-hover); border-color: var(--border); }
.map-host-link__name { font-size: 12px; font-weight: 800; }
.map-host-link__meta {
  margin-top: 4px;
  font-size: 11px;
  color: var(--text-secondary);
  font-family: var(--font-mono);
}
.map-host-link__bar {
  margin-top: 6px;
  height: 4px;
  border-radius: 999px;
  background: rgba(255,255,255,0.08);
  overflow: hidden;
}
.map-host-link__bar > span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #22c55e, var(--blue));
}

.map-host-actions {
  padding: 12px 14px 14px;
  border-top: 1px solid rgba(255,255,255,0.06);
  display: flex;
  flex-direction: column;
  gap: 8px;
}
html[data-theme="light"] .map-host-actions { border-top-color: rgba(15,23,42,0.08); }
.map-host-actions .btn { width: 100%; justify-content: flex-start; }

.map-status-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 999px;
  margin-right: 4px;
  vertical-align: middle;
}
.map-status-dot--online { background: #22c55e; }
.map-status-dot--offline { background: #ef4444; }

.map-kpis { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.map-kpi { border-radius: 14px; border: 1px solid rgba(255,255,255,0.06); background: rgba(10,11,13,0.40); padding: 10px 12px; }
html[data-theme="light"] .map-kpi { background: var(--bg-hover); border-color: var(--border); }
.map-kpi__label { font-size: 10px; font-weight: 900; letter-spacing: 0.12em; text-transform: uppercase; color: var(--text-secondary); }
.map-kpi__value { font-size: 22px; font-weight: 900; letter-spacing: -0.02em; margin-top: 4px; }

.map-topology {
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(10,11,13,0.35);
  border-radius: 14px;
  padding: 10px;
  max-height: min(36vh, 320px);
  overflow: auto;
}
.map-topology__footer {
  margin-top: 8px;
  padding: 6px 8px;
  font-size: 11px;
  color: var(--text-secondary);
  text-align: center;
  border-top: 1px solid rgba(255,255,255,0.06);
}
.map-layout-toggle[aria-pressed="true"] {
  color: #93c5fd;
  border-color: rgba(110,121,255,0.35);
  background: rgba(110,121,255,0.12);
}
.map-layout-toggle--focus[aria-pressed="true"] {
  color: #6ee7b7;
  border-color: rgba(16,185,129,0.35);
  background: rgba(16,185,129,0.12);
}
html[data-theme="light"] .map-topology {
  background: var(--bg-hover);
  border-color: var(--border);
}
html[data-theme="light"] .map-topology__hdr {
  background: rgba(15,23,42,0.04);
  border-color: rgba(15,23,42,0.08);
  color: #64748b;
}
html[data-theme="light"] .map-topology__item {
  background: #ffffff;
  border-color: rgba(15,23,42,0.10);
}
html[data-theme="light"] .map-topology__item:hover {
  background: rgba(110,121,255,0.06);
  border-color: rgba(110,121,255,0.22);
}
html[data-theme="light"] .map-topology__name {
  color: #0f172a;
}
html[data-theme="light"] .map-topology__meta {
  color: #64748b;
}
html[data-theme="light"] .map-tool--active,
html[data-theme="light"] .btn.map-tool--active {
  color: #1e3a8a !important;
  background: rgba(110,121,255,0.10) !important;
  border-color: rgba(110,121,255,0.28) !important;
}
html[data-theme="light"] #network {
  background: #f8fafc !important;
}
html[data-theme="light"] .map-legend {
  background: rgba(255,255,255,0.94);
  border-color: rgba(15,23,42,0.10);
  color: #334155;
}
html[data-theme="light"] .map-legend__title {
  color: #0f172a;
}
.map-topology__group { margin-bottom: 10px; }
.map-topology__hdr {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #94a3b8;
  padding: 6px 8px;
  border-radius: 10px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.06);
}
.map-topology__list { margin: 8px 0 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 6px; }
.map-topology__item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.06);
  background: rgba(10,11,13,0.25);
  cursor: pointer;
  transition: background var(--t) var(--e), border-color var(--t) var(--e), transform var(--t) var(--e);
}
.map-topology__item:hover { background: rgba(110,121,255,0.08); border-color: rgba(110,121,255,0.25); transform: translateY(-1px); }
.map-topology__name { font-size: 12px; font-weight: 800; color: #e5e7eb; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.map-topology__meta { font-size: 11px; color: #64748b; font-family: var(--font-mono); }

/* Fase B — SaaS UX (loading, empty, toolbar, sync) */
.map-sync-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(10,11,13,0.35);
  font-size: 11px;
  font-weight: 700;
  color: var(--text-secondary);
  font-family: var(--font-mono);
  white-space: nowrap;
}
.map-sync-badge.is-live { color: #86efac; border-color: rgba(16,185,129,0.25); background: rgba(16,185,129,0.08); }
.map-sync-badge.is-stale { color: #fcd34d; border-color: rgba(245,158,11,0.25); }
.map-sync-badge.is-error { color: #fca5a5; border-color: rgba(244,63,94,0.25); background: rgba(244,63,94,0.08); }
html[data-theme="light"] .map-sync-badge { background: var(--bg-hover); border-color: var(--border); }

.map-toolbar--saas {
  flex-direction: column;
  align-items: stretch;
  gap: 10px;
}
.map-toolbar__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.map-toolbar__primary,
.map-toolbar__secondary {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.map-toolbar-menu { position: relative; }
.map-toolbar-menu__panel {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  min-width: 220px;
  padding: 6px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(10,11,13,0.96);
  box-shadow: 0 16px 40px rgba(0,0,0,0.45);
  z-index: 30;
}
html[data-theme="light"] .map-toolbar-menu__panel {
  background: rgba(255,255,255,0.98);
  border-color: var(--border);
  box-shadow: var(--shadow);
}
.map-toolbar-menu__panel .btn {
  width: 100%;
  justify-content: flex-start;
  border-radius: 10px;
}
.map-toolbar-menu__panel .btn + .btn { margin-top: 4px; }

.map-kpi.is-loading .map-kpi__value {
  color: transparent;
  position: relative;
  min-height: 28px;
}
.map-kpi.is-loading .map-kpi__value::after {
  content: '';
  position: absolute;
  inset: 4px 0 0;
  border-radius: 8px;
  background: linear-gradient(
    90deg,
    color-mix(in srgb, var(--bg-hover) 68%, transparent) 0%,
    color-mix(in srgb, var(--bg-hover) 88%, transparent) 40%,
    color-mix(in srgb, var(--bg-hover) 68%, transparent) 80%
  );
  background-size: 220% 100%;
  animation: skeletonShimmer 1.2s ease-in-out infinite;
}

.map-topology.is-loading {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 120px;
}
.map-topology__skel {
  height: 14px;
  border-radius: 8px;
  background: linear-gradient(
    90deg,
    color-mix(in srgb, var(--bg-hover) 68%, transparent) 0%,
    color-mix(in srgb, var(--bg-hover) 88%, transparent) 40%,
    color-mix(in srgb, var(--bg-hover) 68%, transparent) 80%
  );
  background-size: 220% 100%;
  animation: skeletonShimmer 1.2s ease-in-out infinite;
}
.map-topology__skel--sm { width: 45%; height: 10px; }
.map-topology__skel--md { width: 72%; }
.map-topology__skel--lg { width: 100%; height: 36px; border-radius: 12px; }

.map-loading-overlay,
.map-empty-state {
  position: absolute;
  inset: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transition: opacity 220ms var(--e), visibility 220ms var(--e);
}
.map-loading-overlay.is-visible,
.map-empty-state.is-visible {
  opacity: 1;
  visibility: visible;
}
.map-empty-state { pointer-events: auto; }

.map-loading-overlay__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  text-align: center;
}
.map-loading-overlay__spinner {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 3px solid rgba(110,121,255,0.15);
  border-top-color: rgba(110,121,255,0.85);
  animation: mapSpin 0.8s linear infinite;
}
@keyframes mapSpin { to { transform: rotate(360deg); } }
.map-loading-overlay__label {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-secondary);
}

.map-empty-state__card {
  max-width: 360px;
  width: 100%;
  padding: 22px 20px;
  border-radius: 16px;
  border: 1px dashed rgba(255,255,255,0.12);
  background: rgba(10,11,13,0.72);
  text-align: center;
  backdrop-filter: blur(8px);
}
html[data-theme="light"] .map-empty-state__card {
  background: rgba(255,255,255,0.92);
  border-color: var(--border);
}
.map-empty-state__icon {
  width: 44px;
  height: 44px;
  margin: 0 auto 12px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(110,121,255,0.12);
  color: #93c5fd;
}
.map-empty-state__title {
  margin: 0;
  font-size: 15px;
  font-weight: 900;
  letter-spacing: -0.01em;
}
.map-empty-state__text {
  margin: 8px 0 0;
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.45;
}
.map-empty-state__actions {
  display: flex;
  gap: 8px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 16px;
}

.map-guide {
  margin-bottom: 14px;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid rgba(110,121,255,0.18);
  background: rgba(110,121,255,0.06);
}
.map-guide__title {
  margin: 0 0 8px;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #93c5fd;
}
.map-guide__steps {
  margin: 0;
  padding-left: 18px;
  font-size: 12px;
  line-height: 1.55;
  color: var(--text-secondary);
}
.map-guide__steps li + li { margin-top: 6px; }

.map-mode-hint {
  margin: 0 0 10px;
  padding: 10px 14px;
  border-radius: 12px;
  border: 1px solid rgba(245,158,11,0.25);
  background: rgba(245,158,11,0.08);
  color: #fcd34d;
  font-size: 13px;
  font-weight: 600;
}
html[data-theme="light"] .map-mode-hint {
  background: rgba(245,158,11,0.12);
  color: #b45309;
}

.map-tool--active,
.btn.map-tool--active {
  border-color: rgba(110,121,255,0.45) !important;
  background: rgba(110,121,255,0.16) !important;
  color: #e5e7eb !important;
}

.map-tool-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  margin-right: 8px;
  flex-shrink: 0;
  color: #94a3b8;
}

.map-tool-icon svg {
  width: 16px;
  height: 16px;
  display: block;
}

.map-tool--shape:hover .map-tool-icon,
.map-tool--shape.map-tool--active .map-tool-icon {
  color: var(--blue);
}

html[data-theme="light"] .map-tool-icon {
  color: #64748b;
}

html[data-theme="light"] .map-tool--shape:hover .map-tool-icon,
html[data-theme="light"] .map-tool--shape.map-tool--active .map-tool-icon {
  color: var(--blue);
}

.map-panel-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.map-panel-actions .btn { width: 100%; justify-content: flex-start; }

.map-legend {
  position: absolute;
  left: 14px;
  bottom: 14px;
  z-index: 4;
  pointer-events: none;
  min-width: 148px;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(10,11,13,0.78);
  backdrop-filter: blur(10px);
  box-shadow: 0 8px 28px rgba(0,0,0,0.35);
}
html[data-theme="light"] .map-legend {
  background: rgba(255,255,255,0.92);
  border-color: var(--border);
  box-shadow: var(--shadow);
}
.map-legend__title {
  margin: 0 0 10px;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-secondary);
}
.map-legend__section + .map-legend__section {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid rgba(255,255,255,0.06);
}
html[data-theme="light"] .map-legend__section + .map-legend__section {
  border-top-color: var(--border);
}
.map-legend__label {
  display: block;
  margin-bottom: 6px;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-secondary);
  opacity: 0.85;
}
.map-legend__row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-primary, #e2e8f0);
  line-height: 1.4;
}
.map-legend__row + .map-legend__row { margin-top: 5px; }
.map-legend__dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  flex-shrink: 0;
  box-shadow: 0 0 0 2px rgba(255,255,255,0.06);
}
.map-legend__dot--online { background: #22c55e; }
.map-legend__dot--offline { background: #ef4444; }
.map-legend__line {
  width: 22px;
  height: 0;
  border-top-width: 3px;
  border-top-style: solid;
  flex-shrink: 0;
  border-radius: 2px;
}
.map-legend__line--fibra { border-top-color: #06b6d4; }
.map-legend__line--cabo { border-top-color: #94a3b8; border-top-width: 2px; }
.map-legend__line--wireless {
  border-top-color: #a855f7;
  border-top-style: dashed;
  border-top-width: 2px;
}

/* -----------------------------
   OBSERVABILIDADE (KPIs do topo)
------------------------------ */
.obs-kpi-grid .card.metric-card {
  padding: 12px 14px;
}
.obs-kpi-grid .card.metric-card .value {
  font-size: 22px;
  line-height: 1.1;
}
.obs-kpi-grid .card.metric-card .hint {
  font-size: 11px;
}
.obs-kpi-grid .card.metric-card .label {
  font-size: 11px;
}
.obs-kpi-grid .card.metric-card .badge.info {
  padding: 8px 10px !important;
}
.seg-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.10);
  background: rgba(10,11,13,0.35);
  font-size: 12px;
  font-weight: 900;
  color: #cbd5e1;
}
.seg-pill[aria-pressed="true"] {
  border-color: rgba(110,121,255,0.45);
  background: rgba(110,121,255,0.14);
  color: #e5e7eb;
}
.seg-pill:hover { background: rgba(255,255,255,0.05); }

/* Scrollbar (não intrusivo) */
@supports (scrollbar-color: auto) {
  * { scrollbar-color: rgba(156,163,175,0.55) transparent; scrollbar-width: thin; }
}

/* Reduz animações para acessibilidade */
@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 1ms !important; animation-iteration-count: 1 !important; transition-duration: 1ms !important; scroll-behavior: auto !important; }
}

/* -----------------------------
   4) LAYOUT HELPERS
------------------------------ */
.app-shell { min-height: 100vh; display: flex; }
.container { width: 100%; max-width: var(--container); margin: 0 auto; }
.page { flex: 1; padding: 24px; }
@media (min-width: 768px) { .page { padding: 40px; } }

.page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
}
/* Cabeçalho compacto padronizado — opt-out do hero card (page_hero.js) via data-no-hero */
.page-header[data-no-hero] {
  align-items: center;
  flex-wrap: wrap;
  gap: 10px 20px;
  margin-bottom: 16px;
}
.page-header[data-no-hero] > .row { flex: 1 1 auto; justify-content: flex-end; }
.page-title {
  font-size: 26px;
  line-height: 1.15;
  margin: 0;
  font-weight: 680;
  letter-spacing: -0.03em;
}
.page-subtitle { margin: 6px 0 0; color: var(--text-secondary); font-size: 14px; }

.row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.stack { display: flex; flex-direction: column; gap: 10px; }

.grid { display: grid; gap: 16px; }
.grid.kpis { grid-template-columns: repeat(1, minmax(0, 1fr)); }
@media (min-width: 640px) { .grid.kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1024px) { .grid.kpis { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

.grid.cards { grid-template-columns: repeat(1, minmax(0, 1fr)); }
@media (min-width: 640px) { .grid.cards { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1024px) { .grid.cards { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

/* -----------------------------
   5) COMPONENTS
------------------------------ */

/* 5.1 Card */
.card {
  background: var(--bg-card);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  padding: 16px;
  transition: transform var(--t) var(--e), background var(--t) var(--e), border-color var(--t) var(--e), box-shadow var(--t) var(--e);
}
.card:hover { transform: translateY(-1px); border-color: var(--border-strong, color-mix(in srgb, var(--border) 60%, var(--text-secondary))); }

/* Card variants */
.card.soft { background: color-mix(in srgb, var(--bg-card) 86%, transparent); }
.card.clickable { cursor: pointer; text-align: left; width: 100%; }
.card.clickable:active { transform: translateY(-1px); }
.card.selected { box-shadow: var(--shadow), 0 0 0 3px rgba(110,121,255,0.16); border-color: color-mix(in srgb, var(--blue) 45%, var(--border)); }

.card-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.card-title { font-weight: 620; letter-spacing: -0.01em; margin: 0; }
.card-meta { margin: 6px 0 0; font-size: 12px; color: var(--text-secondary); font-family: var(--font-mono); }

/* 5.2 Metric Card */
.metric-card { display: flex; flex-direction: column; gap: 6px; }
.metric-card .label { font-size: 12px; color: var(--text-secondary); font-weight: 550; letter-spacing: 0.02em; }
.metric-card .value { font-size: 28px; font-weight: 680; color: var(--text-primary); letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.metric-card .trend { font-size: 12px; color: var(--green); font-weight: 600; }
.metric-card .hint { font-size: 12px; color: var(--text-secondary); }

/* 5.3 Alerts */
.alert {
  padding: 12px;
  border-radius: 8px;
  font-size: 13px;
  border: 1px solid var(--border);
  background: var(--bg-card);
  transition: background var(--t) var(--e), transform var(--t) var(--e);
}
.alert.critical { background: var(--red-bg); border-left: 4px solid var(--red); }
.alert.warning { background: var(--yellow-bg); border-left: 4px solid var(--yellow); }
.alert.ok { background: var(--green-bg); border-left: 4px solid var(--green); }

html[data-theme="dark"] .alert {
  border-color: rgba(255, 255, 255, 0.08);
  color: #e2e8f0;
}
html[data-theme="dark"] .alert.ok {
  color: #a7f3d0;
  border-color: rgba(52, 211, 153, 0.28);
}
html[data-theme="dark"] .alert.warning {
  color: #fde68a;
  border-color: rgba(251, 191, 36, 0.28);
}
html[data-theme="dark"] .alert.critical {
  color: #fecdd3;
  border-color: rgba(251, 113, 133, 0.32);
}

/* 5.4 Table */
.table { width: 100%; border-collapse: collapse; }
.table th {
  text-align: left;
  font-size: 11px;
  color: var(--text-secondary);
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 10px 14px;
}
.table td {
  padding: 12px 14px;
  border-top: 1px solid var(--border);
}
.table tr:nth-child(even) { background: transparent; }
.table tbody tr { transition: background var(--t) var(--e); }
.table tr:hover { background: var(--bg-hover); }
.table-wrap { overflow: auto; border-radius: var(--radius); border: 1px solid var(--border); }

/* Dark-mode table polish (neutro; separadores hairline) */
html[data-theme="dark"] .table-wrap {
  background: var(--bg-card);
  border-color: var(--border);
  box-shadow: none;
}
html[data-theme="dark"] .table th {
  color: var(--text-secondary);
  background: color-mix(in srgb, var(--bg-hover) 55%, var(--bg-card));
  border-bottom: 1px solid var(--border);
}
html[data-theme="dark"] .table td {
  border-top: 0;
  border-bottom: 1px solid var(--border);
}
html[data-theme="dark"] .table tr:nth-child(even) { background: transparent; }
html[data-theme="dark"] .table tr:hover { background: var(--bg-hover); }

/* 5.5 Badges */
.badge {
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid color-mix(in srgb, var(--border) 70%, transparent);
  background: color-mix(in srgb, var(--bg-card) 88%, transparent);
}
.badge::before { content: ''; width: 6px; height: 6px; border-radius: 999px; background: currentColor; opacity: 0.85; }
.badge.online { background: var(--green-bg); color: var(--green); border-color: color-mix(in srgb, var(--green) 25%, var(--border)); }
.badge.offline { background: var(--red-bg); color: var(--red); border-color: color-mix(in srgb, var(--red) 25%, var(--border)); }
.badge.warning,
.badge.degraded { background: var(--yellow-bg); color: var(--yellow); border-color: color-mix(in srgb, var(--yellow) 25%, var(--border)); }
.badge.info { background: var(--blue-bg); color: var(--blue); border-color: color-mix(in srgb, var(--blue) 25%, var(--border)); }

/* Alias requested */
.badge-online { background: rgba(34,197,94,0.15); color: #22c55e; border: 1px solid rgba(34,197,94,0.3); }

/* 5.6 Inputs */
.input {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  color: var(--text-primary);
  transition: box-shadow var(--t) var(--e), border-color var(--t) var(--e), background var(--t) var(--e);
  font: inherit;
}
.select { appearance: none; }
.select option { color: initial; }
html:not([data-theme="light"]) .select { color-scheme: dark; }
html[data-theme="light"] .select { color-scheme: light; }

.field-label {
  display: block;
  font-size: 12px;
  color: var(--text-secondary);
  font-weight: 800;
  letter-spacing: 0.10em;
  text-transform: uppercase;
}

.tone-green { color: var(--green); }
.tone-red { color: var(--red); }
.tone-yellow { color: var(--yellow); }
.tone-blue { color: var(--blue); }
.input::placeholder { color: color-mix(in srgb, var(--text-secondary) 82%, transparent); }
.input:focus { outline: none; border-color: var(--blue); box-shadow: var(--focus); }

/* Dark inputs/selects (Datadog-ish) */
.input-dark,
html[data-theme="dark"] .input.input-dark,
html[data-theme="dark"] .input-group.input-dark {
  background: rgba(10,11,13,0.60);
  border: 1px solid rgba(255,255,255,0.08);
  color: #e5e7eb;
}
.input-dark::placeholder { color: #64748b; }
.input-dark:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 2px rgba(110,121,255,0.30);
}
.select-dark,
html[data-theme="dark"] .input.select.select-dark {
  background: rgba(10,11,13,0.60);
  border: 1px solid rgba(255,255,255,0.08);
  color: #e5e7eb;
}

/* Make default DS inputs match improved dark look */
html[data-theme="dark"] .input:not(.input--plain) {
  background: rgba(10,11,13,0.60);
  border-color: rgba(255,255,255,0.08);
  color: #e5e7eb;
}
html[data-theme="dark"] .input:focus { box-shadow: 0 0 0 2px rgba(110,121,255,0.30); }
html[data-theme="dark"] .input::placeholder { color: #64748b; }

html[data-theme="dark"] .input-group {
  background: rgba(10,11,13,0.55);
  border-color: rgba(255,255,255,0.08);
}

/* 5.7 Buttons */
.btn {
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text-primary);
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  font-weight: 550;
  letter-spacing: -0.01em;
  transition: transform var(--t) var(--e), background var(--t) var(--e), box-shadow var(--t) var(--e), border-color var(--t) var(--e);
}
.btn:hover:not(.primary):not(.ghost):not(.dash-hero__cta):not(.page-hero__cta) {
  background: var(--bg-hover);
}
.btn:active { transform: translateY(1px); }
.btn:focus-visible { outline: none; box-shadow: var(--focus); border-color: var(--blue); }
.btn.ghost { background: transparent; }
.btn.primary {
  background: linear-gradient(90deg, color-mix(in srgb, var(--blue) 92%, var(--blue)), var(--blue));
  border-color: color-mix(in srgb, var(--blue) 30%, var(--border));
  color: #fff;
  box-shadow: 0 14px 34px rgba(110,121,255,0.18);
}
.btn.primary:hover {
  background: linear-gradient(90deg, color-mix(in srgb, var(--blue) 92%, var(--blue)), var(--blue));
  box-shadow: 0 18px 45px rgba(110,121,255,0.22);
  transform: translateY(-1px);
}
.btn.primary:active { transform: translateY(1px); }

/* Input group (ícone + input) */
.input-group {
  display: flex;
  align-items: center;
  gap: 10px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: color-mix(in srgb, var(--bg-card) 92%, transparent);
  padding: 10px 12px;
  transition: box-shadow var(--t) var(--e), border-color var(--t) var(--e), background var(--t) var(--e);
}
.input-group:focus-within {
  border-color: var(--blue);
  box-shadow: var(--focus);
}
.input-group .icon { color: var(--text-secondary); }
.input-group input.input {
  border: 0;
  box-shadow: none;
  padding: 0;
  background: transparent;
  width: 100%;
}
.input-group input.input:focus { border-color: transparent; box-shadow: none; }

/* Filter block (primary UX improvement) */
.filter-card {
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255,255,255,0.05);
  border-radius: 14px;
  padding: 20px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.4);
}
html[data-theme="light"] .filter-card {
  background: color-mix(in srgb, var(--bg-card) 92%, transparent);
  border-color: color-mix(in srgb, var(--border) 80%, transparent);
  box-shadow: var(--shadow);
}

.filter-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr auto;
  gap: 12px;
  align-items: center;
}
@media (max-width: 900px) {
  .filter-grid { grid-template-columns: 1fr; align-items: stretch; }
}

.filter-label {
  font-size: 12px;
  color: #64748b;
  margin-bottom: 6px;
  font-weight: 700;
}

.btn-clear {
  background: transparent;
  border: 1px solid rgba(255,255,255,0.1);
  color: #9ca3af;
  border-radius: 10px;
  padding: 10px 14px;
  transition: background var(--t) var(--e), color var(--t) var(--e), border-color var(--t) var(--e);
}
.btn-clear:hover { background: rgba(255,255,255,0.05); color: #ffffff; }

/* Filter layout helpers */
.filter-actions {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
}

/* Spacing utilities (safe) */
.mb-14 { margin-bottom: 14px; }
.mb-18 { margin-bottom: 18px; }
.mt-8 { margin-top: 8px; }
.gap-16 { gap: 16px; }
.gap-8 { gap: 8px; }
.mb-26 { margin-bottom: 26px; }
.mb-28 { margin-bottom: 28px; }
.resize-y { resize: vertical; }

/* Max-width helpers (safe) */
.container-sm { max-width: 980px; }
.container-md { max-width: 1152px; }
.container-xl { max-width: 1280px; }
.container-2xl { max-width: 1400px; }

/* Button sizing helpers */
.btn.block { width: 100%; }
.btn.lg { padding: 14px 14px; border-radius: 12px; }
.btn.icon { padding: 8px 10px; }

/* Input helpers */
.input.icon-left { padding-left: 36px; }

/* Badge sizing */
.badge.xs { font-size: 10px; padding: 3px 9px; }

/* Danger ghost button (for destructive quick actions) */
.btn.danger-ghost {
  padding: 6px 10px;
  font-size: 11px;
  font-weight: 900;
  color: var(--red);
  border-color: color-mix(in srgb, var(--red) 22%, var(--border));
  background: color-mix(in srgb, var(--red-bg) 55%, transparent);
}

/* Simple popover / autocomplete list */
.ds-rel { position: relative; }
.ds-suggest {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 8px);
  padding: 8px;
  z-index: 10;
}

/* Checkbox row */
.check-row { display: flex; align-items: center; gap: 10px; margin-top: 8px; }
.check-label { font-size: 13px; color: var(--text-secondary); font-weight: 700; }

/* Page title size (for non-shell pages) */
.page-title.page-title--lg { font-size: 26px; }

/* Flush variants (remove padding / borders) */
.card.card--flush { padding: 0; }
.table-wrap.table-wrap--flush { border: 0; border-radius: 0; }
.filter-card.filter-card--flush { padding: 0; overflow: hidden; }
.ds-modal__footer.ds-footer--flush { border-top: 0; padding: 10px 0 0; }

/* Min-width helpers (tables) */
.minw-800 { min-width: 800px; }
.minw-900 { min-width: 900px; }
.minw-920 { min-width: 920px; }

/* PDF / print (light, deterministic) */
.ds-print {
  font-family: "DM Sans", system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  color: #0f172a;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}
.ds-print__top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  flex-wrap: wrap;
}
.ds-print__brand { font-size: 18px; font-weight: 800; color: #0f172a; }
.ds-print__subtitle { font-size: 12px; color: #64748b; margin-top: 2px; }
.ds-print__meta {
  text-align: right;
  flex: 1 1 220px;
  min-width: 0;
  max-width: 100%;
}
.ds-print__metaBlock {
  margin-top: 12px;
  padding: 10px 12px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  width: 100%;
  box-sizing: border-box;
}
.ds-print__metaRow {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 10px;
  align-items: baseline;
  margin-top: 6px;
}
.ds-print__metaRow:first-child { margin-top: 0; }
.ds-print__metaKey {
  flex: 0 0 auto;
  font-size: 9px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #64748b;
  min-width: 72px;
}
.ds-print__metaVal {
  flex: 1 1 180px;
  min-width: 0;
  font-size: 11px;
  font-weight: 600;
  color: #0f172a;
  word-wrap: break-word;
  overflow-wrap: anywhere;
  white-space: normal;
  line-height: 1.45;
}
.ds-print__metaTitle,
.ds-print__metaLine,
.ds-print__metaHint {
  word-wrap: break-word;
  overflow-wrap: anywhere;
  white-space: normal;
  line-height: 1.45;
  max-width: 100%;
}
.ds-print__metaTitle { font-size: 12px; font-weight: 700; color: #0f172a; }
.ds-print__metaLine { font-size: 10px; color: #64748b; margin-top: 2px; }
.ds-print__metaHint { font-size: 10px; color: #94a3b8; margin-top: 2px; }
.ds-print__divider { border: none; border-top: 3px solid var(--blue); margin: 16px 0; }

.ds-print__kpis { width: 100%; border-collapse: collapse; margin-bottom: 14px; }
.ds-print__kpiCard { border: 1px solid #e2e8f0; border-radius: 14px; padding: 12px; }
.ds-print__kpiSpacer { width: 12px; }
.ds-print__kpiLabel { font-size: 10px; color: #64748b; font-weight: 800; text-transform: uppercase; }
.ds-print__kpiValue { font-size: 18px; font-weight: 900; color: #0f172a; margin-top: 4px; }
.ds-print__kpiValue--xl { font-size: 28px; margin-top: 2px; color: var(--blue); }
.ds-print__kpiValue--ok { color: #16a34a; }
.ds-print__kpiValue--bad { color: #dc2626; }

.ds-print__sectionTitle {
  margin: 14px 0 8px;
  font-size: 11px;
  font-weight: 800;
  color: #334155;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.ds-print__sectionTitle--tight { margin-top: 10px; }

.ds-print-table { width: 100%; border-collapse: collapse; }
.ds-print-table th {
  background: #f1f5f9;
  padding: 8px 10px;
  text-align: left;
  font-weight: 700;
  color: #475569;
  text-transform: uppercase;
  font-size: 9px;
  letter-spacing: 0.04em;
  border-bottom: 1px solid #e2e8f0;
}
.ds-print-table td {
  padding: 7px 10px;
  border-bottom: 1px solid #e8ecf1;
  font-size: 11px;
}
.ds-print-table .t-right { text-align: right; }
.ds-print-table .t-strong { font-weight: 700; }
.ds-print-table .t-mono { font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace; }
.ds-print-table .c-1 { color: #1e293b; }
.ds-print-table .c-2 { color: #334155; }
.ds-print-table .c-3 { color: #475569; }
.ds-print-table .c-muted { color: #64748b; }

.ds-print__footnote { margin-top: 10px; font-size: 9px; color: #94a3b8; }

/* 5.8 Sidebar */
.sidebar {
  background: var(--bg-card);
  border-right: 1px solid var(--border);
}
.sidebar-item {
  padding: 10px 14px;
  border-radius: 8px;
  color: var(--text-secondary);
  transition: background var(--t) var(--e), color var(--t) var(--e), transform var(--t) var(--e);
}
.sidebar-item:hover { background: var(--bg-hover); color: var(--text-primary); }
.sidebar-item.active { background: var(--blue-bg); color: var(--blue); }

/* -----------------------------
   6) CHARTS (Chart.js friendly)
------------------------------ */
.chart {
  height: 220px;
  position: relative;
}
canvas { max-width: 100%; }

/* -----------------------------
   7) SKELETON LOADING
------------------------------ */
.skeleton, .icarus-skeleton {
  display: inline-block;
  border-radius: 10px;
  background: linear-gradient(
    90deg,
    color-mix(in srgb, var(--bg-hover) 68%, transparent) 0%,
    color-mix(in srgb, var(--bg-hover) 88%, transparent) 40%,
    color-mix(in srgb, var(--bg-hover) 68%, transparent) 80%
  );
  background-size: 220% 100%;
  animation: skeletonShimmer 1.2s ease-in-out infinite;
}
@keyframes skeletonShimmer {
  0% { background-position: 100% 0; }
  100% { background-position: -100% 0; }
}

/* -----------------------------
   8) NOC-SPECIFIC BRIDGE
   (mantém compat enquanto migra do Tailwind)
------------------------------ */
.noc-kpi { padding: 18px; border-radius: 16px; }
.noc-kpi .metric-card .value { font-size: 34px; }
.noc-muted { color: var(--text-secondary); }
.mono { font-family: var(--font-mono); }

/* -----------------------------
   9) LEGACY ALIASES (safe)
   Mantém consistência sem quebrar páginas antigas
------------------------------ */
.card-glass {
  background: color-mix(in srgb, var(--bg-card) 86%, transparent);
  border-radius: calc(var(--radius) + 4px);
  border: 1px solid color-mix(in srgb, var(--border) 70%, transparent);
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
  transition: transform var(--t) var(--e), background var(--t) var(--e), border-color var(--t) var(--e), box-shadow var(--t) var(--e);
}
.card-glass:hover { transform: translateY(-2px); }

.ring-soft { box-shadow: 0 0 0 1px color-mix(in srgb, var(--border) 65%, transparent) inset; }

/* Tipografia utilitária usada no projeto */
.font-display { font-family: var(--font-display); }

/* -----------------------------
   10) MODALS (Design System)
   Compatível com `.modal` + `.active`
------------------------------ */
.ds-modal {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  visibility: hidden;
  opacity: 0;
  transition: opacity 220ms var(--e), visibility 220ms var(--e);
}
.ds-modal.active {
  visibility: visible;
  opacity: 1;
}

.ds-modal__overlay {
  position: absolute;
  inset: 0;
  background: rgba(10,11,13, 0.72);
  backdrop-filter: blur(10px);
  opacity: 0;
  transition: opacity 220ms var(--e);
}
html[data-theme="light"] .ds-modal__overlay { background: rgba(15, 23, 42, 0.38); }

.ds-modal__panel {
  position: relative;
  z-index: 1;
  width: min(720px, calc(100vw - 28px));
  max-height: min(86vh, 820px);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-strong);
  background: var(--bg-card);
  box-shadow: var(--icarus-shadow-hover, 0 16px 48px rgba(0,0,0,0.5));
  transform: translateY(8px) scale(0.985);
  opacity: 0;
  transition: transform 220ms var(--e), opacity 220ms var(--e);
}

.ds-modal.active .ds-modal__overlay { opacity: 1; }
.ds-modal.active .ds-modal__panel { opacity: 1; transform: translateY(0) scale(1); }

.ds-modal__header {
  padding: 16px 16px 12px;
  border-bottom: 1px solid color-mix(in srgb, var(--border) 75%, transparent);
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  flex-shrink: 0;
}
.ds-modal__title { margin: 0; font-weight: 900; letter-spacing: -0.01em; }
.ds-modal__subtitle { margin: 6px 0 0; color: var(--text-secondary); font-size: 13px; }

.ds-modal__body {
  padding: 14px 16px 16px;
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
}

.ds-modal__footer {
  padding: 14px 16px 16px;
  border-top: 1px solid color-mix(in srgb, var(--border) 75%, transparent);
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  flex-shrink: 0;
}

/* -----------------------------
   11) TINY UTILITIES (safe)
   Sem `!important` para não brigar com Tailwind
------------------------------ */
.text-right { text-align: right; }
.text-center { text-align: center; }
.w-full { width: 100%; }
.min-w-0 { min-width: 0; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* -----------------------------
   12) MOBILE — layout e imagens
------------------------------ */
@media (max-width: 767px) {
  html,
  body {
    overflow-x: hidden;
    max-width: 100%;
  }
  .app-shell {
    flex-direction: column;
    min-width: 0;
  }
  main.page {
    padding: 12px 14px 28px !important;
    min-width: 0;
    width: 100%;
    max-width: 100%;
  }
  .page-header {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }
  .page-title {
    font-size: 1.35rem !important;
    line-height: 1.2;
  }
  .container {
    max-width: 100% !important;
    padding-left: 0;
    padding-right: 0;
  }
  img,
  video {
    max-width: 100%;
    height: auto;
  }
  img[width] {
    height: auto;
  }
  canvas {
    max-width: 100%;
  }
  .table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    max-width: 100%;
  }
  .card,
  .card-glass {
    min-width: 0;
  }
  .sidebar-brand__img {
    width: auto;
    max-width: 48px;
    height: auto;
  }
}


/* ============================================================
   Polimento premium (aditivo) — scrollbars, seleção, foco
   ============================================================ */
::selection { background: color-mix(in srgb, var(--blue) 32%, transparent); }

/* Scrollbars finas e discretas */
* { scrollbar-width: thin; scrollbar-color: var(--border-strong) transparent; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: var(--border-strong);
  border-radius: 999px;
  border: 2px solid transparent;
  background-clip: padding-box;
}
::-webkit-scrollbar-thumb:hover { background: var(--text-secondary); }

/* Foco de teclado consistente (acessibilidade) */
:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
}

/* -----------------------------
   Etapa 3 — Ardósia: campos/terminais com hex chumbado (#030712) no HTML.
   Só tema escuro; forms e blocos de código (não toca overlays/backdrops).
------------------------------ */
html[data-theme="dark"] input[class*="030712"],
html[data-theme="dark"] select[class*="030712"],
html[data-theme="dark"] textarea[class*="030712"] {
  background: rgba(20, 29, 41, 0.55) !important;
  border-color: rgba(150, 180, 220, 0.16) !important;
  color: var(--text-primary) !important;
}
html[data-theme="dark"] input[class*="030712"]:focus,
html[data-theme="dark"] select[class*="030712"]:focus,
html[data-theme="dark"] textarea[class*="030712"]:focus {
  border-color: var(--blue) !important;
  box-shadow: var(--focus) !important;
}
html[data-theme="dark"] pre[class*="030712"],
html[data-theme="dark"] .ds-pre,
html[data-theme="dark"] .terminal-output {
  background: rgba(19, 28, 39, 0.72) !important;
  border-color: rgba(150, 180, 220, 0.14) !important;
}

/* ── Painel de preferências de som/avisos (NotifySound.openPrefs) ────────── */
.nsnd-overlay {
  position: fixed; inset: 0; z-index: 210;
  display: flex; align-items: center; justify-content: center; padding: 20px;
  background: rgba(3,7,18,.62); backdrop-filter: blur(3px);
  opacity: 0; transition: opacity .16s ease;
}
.nsnd-overlay.is-open { opacity: 1; }
.nsnd {
  width: 100%; max-width: 420px;
  background: var(--bg-card); color: var(--text-primary);
  border: 1px solid var(--border-strong); border-radius: 16px;
  box-shadow: 0 24px 60px rgba(0,0,0,.45);
  transform: translateY(8px) scale(.98); transition: transform .16s ease;
  overflow: hidden;
}
.nsnd-overlay.is-open .nsnd { transform: none; }
.nsnd__head { display: flex; align-items: center; justify-content: space-between; padding: 16px 18px; border-bottom: 1px solid var(--border); }
.nsnd__head h3 { margin: 0; font-size: 15px; font-weight: 700; }
.nsnd__x { background: transparent; border: 0; color: var(--text-secondary); cursor: pointer; padding: 4px; border-radius: 8px; }
.nsnd__x:hover { color: var(--text-primary); background: var(--bg-hover); }
.nsnd__body { padding: 14px 18px 18px; }
.nsnd__group { margin: 6px 0 4px; padding-left: 4px; border-left: 2px solid var(--border); transition: opacity .15s ease; }
.nsnd__row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 9px 0; font-size: 13.5px; }
.nsnd__hr { border: 0; border-top: 1px solid var(--border); margin: 10px 0 4px; }
.nsnd__hint { font-size: 11.5px; color: var(--text-secondary); margin: 2px 0 8px; line-height: 1.4; }
.nsnd__range { width: 130px; accent-color: var(--blue); }
.nsnd__test { background: transparent; border: 1px solid var(--border-strong); color: var(--text-secondary); border-radius: 6px; font-size: 9px; padding: 1px 6px; margin-left: 4px; cursor: pointer; }
.nsnd__test:hover { color: var(--blue); border-color: var(--blue); }
.nsnd__dnd { display: flex; gap: 14px; padding: 4px 0 8px; font-size: 12.5px; color: var(--text-secondary); }
.nsnd__dnd input { background: var(--bg-hover); border: 1px solid var(--border-strong); border-radius: 7px; color: var(--text-primary); padding: 3px 6px; margin-left: 4px; }
.nsnd__perm { margin-top: 8px; font-size: 12px; }
.nsnd__perm--on { color: var(--green); }
.nsnd__perm--off { color: var(--text-secondary); }

/* toggle switch */
.nsnd__toggle { width: 40px; height: 22px; border-radius: 999px; border: 1px solid var(--border-strong); background: var(--bg-hover); position: relative; cursor: pointer; flex: 0 0 40px; transition: background .15s ease, border-color .15s ease; }
.nsnd__toggle span { position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 999px; background: var(--text-secondary); transition: transform .15s ease, background .15s ease; }
.nsnd__toggle.is-on { background: color-mix(in srgb, var(--blue) 30%, transparent); border-color: var(--blue); }
.nsnd__toggle.is-on span { transform: translateX(18px); background: var(--blue); }

/* ── Modal de detalhe de alerta (Central de Alertas) — substitui window.alert ── */
.ca-det-overlay {
  position: fixed; inset: 0; z-index: 200;
  display: flex; align-items: center; justify-content: center; padding: 20px;
  background: rgba(3,7,18,.66); backdrop-filter: blur(3px);
  opacity: 0; transition: opacity .15s ease;
}
.ca-det-overlay.is-open { opacity: 1; }
.ca-det {
  width: 100%; max-width: 460px;
  background: var(--bg-card); color: var(--text-primary);
  border: 1px solid var(--border-strong); border-radius: 16px;
  box-shadow: 0 24px 60px rgba(0,0,0,.45);
  overflow: hidden;
  transform: translateY(8px) scale(.98); transition: transform .15s ease;
}
.ca-det-overlay.is-open .ca-det { transform: none; }
/* faixa de severidade no topo */
.ca-det::before { content: ''; display: block; height: 4px; background: var(--blue); }
.ca-det--critical::before { background: var(--red); }
.ca-det--warning::before { background: var(--yellow); }
.ca-det__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 16px 18px 12px; }
.ca-det__head-l { display: flex; align-items: center; gap: 12px; min-width: 0; }
.ca-det__title { font-size: 15px; font-weight: 700; line-height: 1.25; }
.ca-det__sub { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-top: 5px; }
.ca-det__type { font-size: 11px; color: var(--text-secondary); font-weight: 600; }
.ca-det__x { background: transparent; border: 0; color: var(--text-secondary); cursor: pointer; padding: 4px; border-radius: 8px; flex: 0 0 auto; }
.ca-det__x:hover { color: var(--text-primary); background: var(--bg-hover); }
.ca-det__body { padding: 4px 18px 8px; }
.ca-det__row { display: flex; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--border); font-size: 13px; }
.ca-det__row:last-child { border-bottom: 0; }
.ca-det__label { flex: 0 0 96px; color: var(--text-secondary); font-weight: 600; font-size: 11.5px; text-transform: uppercase; letter-spacing: .03em; padding-top: 1px; }
.ca-det__val { flex: 1 1 auto; min-width: 0; color: var(--text-primary); word-break: break-word; }
.ca-det__val--mono { font-family: ui-monospace, "SF Mono", Menlo, monospace; color: var(--blue); }
.ca-det__foot { padding: 12px 18px 16px; display: flex; justify-content: flex-end; }
.ca-det__foot .btn { min-width: 110px; justify-content: center; }
