/* ==========================================================================
   ADB Remote — theme.css
   Tokens + primitivas compartilhadas por TODAS as páginas.
   Carregar ANTES dos CSS de página. Nenhum recurso externo.
   ========================================================================== */

:root {
  /* superfícies */
  --c-bg: #f4f7fd;
  --c-bg-2: #eef3fb;
  --c-surface: #ffffff;
  --c-surface-2: #f7faff;
  --c-surface-3: #eef5ff;
  --c-glass: rgba(255, 255, 255, .78);
  --c-glass-2: rgba(255, 255, 255, .9);
  --c-screen: #07090d;

  /* tinta */
  --c-ink: #101828;
  --c-ink-2: #344054;
  --c-muted: #667085;
  --c-faint: #98a2b3;

  /* linhas */
  --c-line: #e4ecf8;
  --c-line-2: #d3e0f2;
  --c-line-3: #c2d6ef;

  /* marca */
  --c-accent: #0b6bff;
  --c-accent-2: #0757d1;
  --c-accent-3: #1a7bff;
  --c-accent-soft: #e9f2ff;
  --c-accent-ring: rgba(11, 107, 255, .16);
  --c-violet: #6c5cff;
  --c-violet-soft: #efeaff;

  /* semântica */
  --c-ok: #0e9f5b;
  --c-ok-2: #12b76a;
  --c-ok-soft: #e7f7ee;
  --c-ok-strong: #0b7a44;
  --c-warn: #b54708;
  --c-warn-soft: #fef4e6;
  --c-err: #d92d20;
  --c-err-soft: #fef3f2;
  --c-info: #175cd3;
  --c-info-soft: #eff6ff;

  /* raios */
  --r-xs: 6px;
  --r-sm: 8px;
  --r-md: 10px;
  --r-lg: 12px;
  --r-xl: 16px;
  --r-2xl: 20px;
  --r-3xl: 24px;
  --r-pill: 999px;

  /* elevação */
  --e-1: 0 1px 2px rgba(16, 24, 40, .05), 0 1px 3px rgba(16, 24, 40, .04);
  --e-2: 0 4px 12px rgba(16, 24, 40, .05), 0 1px 3px rgba(16, 24, 40, .04);
  --e-3: 0 18px 44px rgba(16, 45, 95, .12), 0 2px 8px rgba(16, 24, 40, .05);
  --e-4: 0 32px 84px rgba(10, 32, 70, .26), 0 4px 14px rgba(16, 24, 40, .06);
  --e-focus: 0 0 0 4px var(--c-accent-ring);
  --e-inset: inset 0 1px 0 rgba(255, 255, 255, .7);

  /* espaço */
  --s-1: 4px;
  --s-2: 8px;
  --s-3: 12px;
  --s-4: 16px;
  --s-5: 20px;
  --s-6: 24px;
  --s-7: 32px;
  --s-8: 48px;

  /* tipografia */
  --f-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --f-mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
  --t-2xs: 10.5px;
  --t-xs: 11.5px;
  --t-sm: 12.5px;
  --t-md: 13.5px;
  --t-lg: 15px;
  --t-xl: 17px;
  --t-2xl: 21px;
  --t-3xl: 26px;
  --t-4xl: 34px;
  --t-5xl: 44px;

  /* movimento */
  --d-fast: 150ms;
  --d-med: 200ms;
  --d-slow: 300ms;
  --ease-out: cubic-bezier(.22, .61, .36, 1);
  --ease-inout: cubic-bezier(.4, 0, .2, 1);
  --ease-spring: cubic-bezier(.34, 1.4, .64, 1);

  /* layout */
  --h-topbar: 60px;
  --w-dock: 380px;
  --w-thumb: 218px;
}

/* --------------------------------------------------------------- base --- */
::selection { background: rgba(11, 107, 255, .18); }

:focus-visible {
  outline: 2px solid var(--c-accent);
  outline-offset: 2px;
  border-radius: inherit;
}

* { scrollbar-width: thin; scrollbar-color: var(--c-line-3) transparent; }
*::-webkit-scrollbar { width: 10px; height: 10px; }
*::-webkit-scrollbar-track { background: transparent; }
*::-webkit-scrollbar-thumb {
  background: #cfdcee;
  border: 3px solid transparent;
  background-clip: padding-box;
  border-radius: var(--r-pill);
}
*::-webkit-scrollbar-thumb:hover { background: #b6c9e2; background-clip: padding-box; }

/* ---------------------------------------------------------- utilidades --- */
.u-sr {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
.tnum { font-variant-numeric: tabular-nums; font-feature-settings: "tnum" 1; }
.mono { font-family: var(--f-mono); }
.grad-text {
  background: linear-gradient(100deg, var(--c-accent) 6%, var(--c-violet) 94%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.glass {
  background: var(--c-glass);
  backdrop-filter: blur(18px) saturate(1.4);
  -webkit-backdrop-filter: blur(18px) saturate(1.4);
}
.hairline-t { border-top: 1px solid var(--c-line); }
.hairline-b { border-bottom: 1px solid var(--c-line); }

/* ponto “ao vivo” com pulso */
.live-dot {
  position: relative; width: 7px; height: 7px; flex: 0 0 auto;
  border-radius: 50%; background: var(--c-ok-2);
}
.live-dot::after {
  content: ""; position: absolute; inset: -4px; border-radius: 50%;
  border: 1px solid rgba(18, 183, 106, .5);
  animation: live-pulse 2.2s var(--ease-out) infinite;
}
.live-dot.is-idle::after { animation: none; border-color: rgba(152, 162, 179, .35); }
.live-dot.is-idle { background: var(--c-faint); }
@keyframes live-pulse {
  0% { transform: scale(.7); opacity: .9; }
  70% { transform: scale(1.5); opacity: 0; }
  100% { transform: scale(1.5); opacity: 0; }
}

/* skeleton shimmer — nunca desloca layout */
.skel {
  position: relative; overflow: hidden; border-radius: var(--r-md);
  background: linear-gradient(180deg, #eef3fb, #e7eefa);
}
.skel::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .72), transparent);
  transform: translateX(-100%);
  animation: skel-sweep 1.4s var(--ease-inout) infinite;
}
@keyframes skel-sweep { to { transform: translateX(100%); } }

/* fundo decorativo (dot grid) */
.dot-grid {
  background-image: radial-gradient(rgba(16, 24, 40, .07) 1px, transparent 1px);
  background-size: 22px 22px;
}

/* entrada de superfícies */
.rise-in { animation: rise-in var(--d-slow) var(--ease-out) both; }
@keyframes rise-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* ------------------------------------------------- acessibilidade/motion --- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
    scroll-behavior: auto !important;
  }
}

/* impressão: sem sombras/cores de fundo pesadas */
@media print {
  body { background: #fff !important; }
}
