/* ============================================================
 *  J.A.R.V.I.S. v10 — "AEGIS"
 *  Liquid Glass + Tesla/SpaceX/Apple Vision Pro + Iron Man HUD
 *  Senhor Gabriel — design system unificado
 * ============================================================ */

/* ============== S8: PALETA CONSOLIDADA ============== */
:root {
  /* Primária Iron Man canon */
  --aegis-cyan:        #00E5FF;
  --aegis-cyan-soft:   #5FFFFF;
  --aegis-cyan-deep:   #007BFF;

  /* Backgrounds (midnight navy — não preto) */
  --aegis-bg-base:     #020A10;
  --aegis-bg-deep:     #010508;
  --aegis-bg-elev:     #03121C;

  /* Glass tints */
  --aegis-glass-1:     rgba(0, 229, 255, 0.03);
  --aegis-glass-2:     rgba(0, 229, 255, 0.06);
  --aegis-glass-3:     rgba(0, 229, 255, 0.10);
  --aegis-glass-line:  rgba(0, 229, 255, 0.18);
  --aegis-glass-edge:  rgba(0, 229, 255, 0.35);

  /* Texto */
  --aegis-text:        #E6F8FF;
  --aegis-text-dim:    rgba(230, 248, 255, 0.55);
  --aegis-text-mute:   rgba(230, 248, 255, 0.30);

  /* Estado */
  --aegis-warning:     #FF3D00;
  --aegis-success:     #00FF9C;

  /* Curvas de animação (Linear-style) */
  --aegis-ease:        cubic-bezier(0.32, 0.72, 0, 1);
  --aegis-ease-smooth: cubic-bezier(0.4, 0, 0.2, 1);
  --aegis-ease-snap:   cubic-bezier(0.5, 0, 0, 1);

  /* Geometria */
  --aegis-radius:      14px;
  --aegis-radius-lg:   24px;
  --aegis-blur:        24px;
  --aegis-blur-soft:   12px;
}

/* ============== S7: TIPOGRAFIA GEIST (2-tier) ============== */
@import url('https://fonts.cdnfonts.com/css/geist-sans');
@import url('https://fonts.cdnfonts.com/css/geist-mono');

.aegis-ui,
.aegis-ui * {
  font-family: 'Geist Sans', 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  font-feature-settings: 'cv11', 'ss01', 'ss03';
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

.aegis-mono {
  font-family: 'Geist Mono', 'JetBrains Mono', 'SF Mono', Menlo, monospace;
  font-feature-settings: 'zero', 'ss01';
  letter-spacing: 0.02em;
}

/* ============== S1: LIQUID GLASS MATERIAL ============== */
/*
 * O segredo do Liquid Glass:
 *  1. backdrop-filter: blur() + saturate() (vidro fosco real)
 *  2. background com 2-3 camadas: tint + gradient + noise
 *  3. border com gradiente cônico que simula refração
 *  4. inset shadow para "espessura" do vidro
 *  5. ::after camada de noise sutil (textura)
 */
.aegis-glass {
  position: relative;
  /* Fallback sólido para garantir visibilidade mesmo sem backdrop-filter */
  background-color: rgba(3, 18, 28, 0.85);
  background-image:
    linear-gradient(135deg, var(--aegis-glass-2) 0%, var(--aegis-glass-1) 50%, var(--aegis-glass-3) 100%);
  backdrop-filter: blur(var(--aegis-blur)) saturate(180%);
  -webkit-backdrop-filter: blur(var(--aegis-blur)) saturate(180%);
  border: 1px solid var(--aegis-glass-line);
  border-radius: var(--aegis-radius);
  box-shadow:
    inset 0 1px 0 0 rgba(255,255,255,0.06),
    inset 0 0 0 1px rgba(0,229,255,0.04),
    0 8px 32px 0 rgba(0,229,255,0.05),
    0 1px 2px rgba(0,0,0,0.4);
  overflow: hidden;
}
/* Quando backdrop-filter está disponível, usamos tons mais transparentes */
@supports (backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px)) {
  .aegis-glass {
    background-color: rgba(3, 18, 28, 0.35);
  }
}
/* Camada noise (textura sutil) */
.aegis-glass::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='200' height='200'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' seed='5'/><feColorMatrix values='0 0 0 0 0  0 0 0 0 0.9  0 0 0 0 1  0 0 0 0.04 0'/></filter><rect width='200' height='200' filter='url(%23n)'/></svg>");
  background-size: 200px 200px;
  opacity: 0.6;
  mix-blend-mode: overlay;
  pointer-events: none;
  z-index: 0;
}
/* Camada refração (gradiente cônico animado nas bordas) */
.aegis-glass::after {
  content: '';
  position: absolute;
  inset: -1px;
  padding: 1px;
  border-radius: inherit;
  background: conic-gradient(
    from var(--aegis-refraction-angle, 0deg),
    transparent 0%,
    var(--aegis-glass-edge) 25%,
    transparent 35%,
    transparent 65%,
    var(--aegis-glass-edge) 75%,
    transparent 100%
  );
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
          mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
          mask-composite: exclude;
  pointer-events: none;
  z-index: 1;
  opacity: 0.7;
}
.aegis-glass:hover::after {
  --aegis-refraction-angle: 45deg;
}
.aegis-glass > * { position: relative; z-index: 2; }

/* Variante mais leve (sub-cards) */
.aegis-glass-light {
  background: var(--aegis-glass-1);
  backdrop-filter: blur(var(--aegis-blur-soft)) saturate(150%);
  -webkit-backdrop-filter: blur(var(--aegis-blur-soft)) saturate(150%);
  border: 1px solid var(--aegis-glass-line);
  border-radius: var(--aegis-radius);
}

/* ============== S9: BACKGROUND + DEPTH ============== */
.aegis-stage {
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse at 50% 0%, rgba(0,229,255,0.06) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 100%, rgba(0,123,255,0.04) 0%, transparent 60%),
    radial-gradient(ellipse at 50% 50%, var(--aegis-bg-elev) 0%, var(--aegis-bg-base) 70%, var(--aegis-bg-deep) 100%);
  z-index: -10;
  pointer-events: none;
}

/* Blueprint grid sutil (estilo Vercel) */
.aegis-grid-bg {
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(0,229,255,0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0,229,255,0.025) 1px, transparent 1px);
  background-size: 48px 48px;
  background-position: 50% 50%;
  -webkit-mask-image: radial-gradient(ellipse at center, black 0%, transparent 75%);
          mask-image: radial-gradient(ellipse at center, black 0%, transparent 75%);
  z-index: -9;
  pointer-events: none;
  animation: aegis-grid-drift 60s linear infinite;
}
@keyframes aegis-grid-drift {
  0%   { background-position: 0% 0%; }
  100% { background-position: 48px 48px; }
}

/* Vignette + scanlines */
.aegis-vignette {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -8;
  background:
    radial-gradient(ellipse at center, transparent 50%, rgba(0,0,0,0.6) 100%);
}

/* Camadas de partículas (canvas controlado por JS) */
.aegis-particles {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -7;
}

/* ============== S9: PARALLAX LAYERS ============== */
.aegis-parallax {
  transform: translate3d(var(--px, 0), var(--py, 0), 0);
  transition: transform 0.4s var(--aegis-ease);
  will-change: transform;
}
.aegis-parallax[data-depth="1"] { --px-factor: 0.15; --py-factor: 0.15; }
.aegis-parallax[data-depth="2"] { --px-factor: 0.30; --py-factor: 0.30; }
.aegis-parallax[data-depth="3"] { --px-factor: 0.60; --py-factor: 0.60; }

/* ============== S2: LAYOUT ZEN ============== */
.aegis-layout {
  position: relative;
  min-height: 100vh;
  width: 100vw;
  overflow: hidden;
  color: var(--aegis-text);
  background: transparent;
}

/* Top bar minimalista (Tesla style) */
.aegis-top {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  z-index: 100;
  background: linear-gradient(180deg, var(--aegis-bg-base) 0%, transparent 100%);
  pointer-events: none;
}
.aegis-top > * { pointer-events: auto; }

.aegis-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  letter-spacing: 0.3em;
  font-weight: 600;
  font-size: 12px;
  color: var(--aegis-text);
}
.aegis-brand-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--aegis-cyan);
  box-shadow: 0 0 12px var(--aegis-cyan);
  animation: aegis-pulse 2s var(--aegis-ease-smooth) infinite;
}
@keyframes aegis-pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%      { opacity: 0.5; transform: scale(0.7); }
}

.aegis-top-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.aegis-icon-btn {
  width: 36px; height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background: var(--aegis-glass-1);
  border: 1px solid var(--aegis-glass-line);
  color: var(--aegis-text-dim);
  cursor: pointer;
  transition: all 0.2s var(--aegis-ease);
  backdrop-filter: blur(12px);
}
.aegis-icon-btn:hover {
  background: var(--aegis-glass-3);
  color: var(--aegis-cyan);
  border-color: var(--aegis-glass-edge);
  transform: translateY(-1px);
}
.aegis-icon-btn.active {
  background: rgba(0, 229, 255, 0.12);
  color: var(--aegis-cyan);
  border-color: var(--aegis-cyan);
  box-shadow: 0 0 16px rgba(0,229,255,0.25);
}
.aegis-icon-btn i { font-size: 14px; }

/* Pill ⌘K */
.aegis-cmd-pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  height: 36px;
  padding: 0 14px;
  border-radius: 10px;
  background: var(--aegis-glass-1);
  border: 1px solid var(--aegis-glass-line);
  color: var(--aegis-text-dim);
  font-size: 12px;
  letter-spacing: 0.05em;
  cursor: pointer;
  transition: all 0.2s var(--aegis-ease);
  backdrop-filter: blur(12px);
}
.aegis-cmd-pill:hover {
  background: var(--aegis-glass-2);
  border-color: var(--aegis-glass-edge);
  color: var(--aegis-text);
}
.aegis-cmd-pill kbd {
  font-family: 'Geist Mono', monospace;
  font-size: 10px;
  padding: 2px 6px;
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--aegis-glass-line);
  border-radius: 4px;
  color: var(--aegis-text-dim);
}

/* ============== HERO CENTRAL (core + chat + waveform) ============== */
.aegis-hero {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: min(880px, 90vw);
  z-index: 10;
  display: flex;
  flex-direction: column;
  align-items: center;
  pointer-events: none;
}
.aegis-hero > * { pointer-events: auto; }

/* Core: arc reactor + waveform radial */
.aegis-core-wrap {
  position: relative;
  width: 360px;
  height: 360px;
  margin-bottom: 32px;
}
.aegis-core-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.aegis-core-status {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
  pointer-events: none;
  font-family: 'Geist Mono', monospace;
  font-size: 9px;
  letter-spacing: 0.4em;
  color: var(--aegis-text-mute);
  text-transform: uppercase;
}
.aegis-core-status .big {
  display: block;
  font-family: 'Geist Sans', sans-serif;
  font-size: 11px;
  letter-spacing: 0.3em;
  font-weight: 500;
  color: var(--aegis-cyan);
  margin-top: 4px;
}

/* Chat zone */
.aegis-chat-zone {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-height: 40vh;
}
.aegis-chat-feed {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--aegis-glass-line) transparent;
  padding: 8px 4px;
  max-height: 28vh;
  -webkit-mask-image: linear-gradient(180deg, transparent 0%, black 12%, black 100%);
          mask-image: linear-gradient(180deg, transparent 0%, black 12%, black 100%);
}
.aegis-chat-feed::-webkit-scrollbar { width: 4px; }
.aegis-chat-feed::-webkit-scrollbar-thumb { background: var(--aegis-glass-line); border-radius: 2px; }

.aegis-msg {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 10px 14px;
  border-radius: 12px;
  backdrop-filter: blur(12px);
  max-width: 92%;
  animation: aegis-msg-in 0.4s var(--aegis-ease) both;
}
@keyframes aegis-msg-in {
  from { opacity: 0; transform: translateY(8px) scale(0.98); filter: blur(4px); }
  to   { opacity: 1; transform: translateY(0) scale(1); filter: blur(0); }
}
.aegis-msg-user {
  align-self: flex-end;
  background: rgba(0, 229, 255, 0.08);
  border: 1px solid var(--aegis-glass-line);
  text-align: right;
}
.aegis-msg-jarvis {
  align-self: flex-start;
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid rgba(255,255,255,0.06);
}
.aegis-msg-label {
  font-family: 'Geist Mono', monospace;
  font-size: 9px;
  letter-spacing: 0.25em;
  color: var(--aegis-text-mute);
  text-transform: uppercase;
}
.aegis-msg-body {
  font-size: 14px;
  line-height: 1.5;
  color: var(--aegis-text);
}
.aegis-msg.streaming .aegis-msg-body::after {
  content: '▊';
  display: inline-block;
  margin-left: 2px;
  color: var(--aegis-cyan);
  animation: aegis-cursor 0.7s infinite;
}
@keyframes aegis-cursor { 0%,100% { opacity: 1 } 50% { opacity: 0.2 } }
.aegis-msg-interim {
  opacity: 0.6;
  font-style: italic;
}

/* Input */
.aegis-input-wrap {
  position: relative;
  width: 100%;
}
.aegis-input {
  width: 100%;
  height: 52px;
  padding: 0 56px 0 22px;
  background: var(--aegis-glass-2);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border: 1px solid var(--aegis-glass-line);
  border-radius: 26px;
  color: var(--aegis-text);
  font-size: 14px;
  outline: none;
  transition: all 0.3s var(--aegis-ease);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.05),
    0 4px 24px rgba(0,0,0,0.3);
}
.aegis-input::placeholder { color: var(--aegis-text-mute); }
.aegis-input:focus {
  border-color: var(--aegis-cyan);
  background: var(--aegis-glass-3);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.06),
    0 0 0 4px rgba(0,229,255,0.08),
    0 8px 32px rgba(0,229,255,0.1);
}
.aegis-input-mic {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  width: 36px; height: 36px;
  border-radius: 50%;
  border: 1px solid var(--aegis-glass-line);
  background: rgba(0, 229, 255, 0.06);
  color: var(--aegis-cyan);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s var(--aegis-ease);
}
.aegis-input-mic:hover {
  background: var(--aegis-cyan);
  color: var(--aegis-bg-base);
  box-shadow: 0 0 16px var(--aegis-cyan);
}
.aegis-input-mic.listening {
  background: var(--aegis-cyan);
  color: var(--aegis-bg-base);
  animation: aegis-listening-pulse 1.2s ease-in-out infinite;
}
@keyframes aegis-listening-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(0,229,255,0.6); }
  50%      { box-shadow: 0 0 0 12px rgba(0,229,255,0); }
}

/* ============== TELEMETRIA FLUTUANTE NAS MARGENS ============== */
.aegis-telemetry {
  position: fixed;
  display: flex;
  flex-direction: column;
  gap: 16px;
  font-family: 'Geist Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.15em;
  color: var(--aegis-text-mute);
  text-transform: uppercase;
  z-index: 5;
  pointer-events: none;
  user-select: none;
}
.aegis-telemetry-left  { top: 96px; left: 24px; }
.aegis-telemetry-right { top: 96px; right: 24px; align-items: flex-end; }
.aegis-telemetry-bottom { bottom: 24px; left: 50%; transform: translateX(-50%); flex-direction: row; gap: 24px; }
.aegis-tlm-line {
  display: flex;
  align-items: center;
  gap: 8px;
  opacity: 0.7;
}
.aegis-tlm-key { color: var(--aegis-text-mute); }
.aegis-tlm-val { color: var(--aegis-cyan-soft); font-weight: 500; }
.aegis-tlm-dot {
  width: 4px; height: 4px;
  border-radius: 50%;
  background: var(--aegis-cyan);
  box-shadow: 0 0 6px var(--aegis-cyan);
}

/* ============== CORNER BRACKETS (Iron Man canon) ============== */
.aegis-bracket {
  position: fixed;
  width: 60px;
  height: 60px;
  z-index: 6;
  pointer-events: none;
  opacity: 0.4;
}
.aegis-bracket::before,
.aegis-bracket::after {
  content: '';
  position: absolute;
  background: var(--aegis-cyan);
  box-shadow: 0 0 8px var(--aegis-cyan);
}
.aegis-bracket-tl { top: 16px; left: 16px; }
.aegis-bracket-tr { top: 16px; right: 16px; }
.aegis-bracket-bl { bottom: 16px; left: 16px; }
.aegis-bracket-br { bottom: 16px; right: 16px; }
.aegis-bracket-tl::before { top: 0; left: 0; width: 24px; height: 1px; }
.aegis-bracket-tl::after  { top: 0; left: 0; width: 1px; height: 24px; }
.aegis-bracket-tr::before { top: 0; right: 0; width: 24px; height: 1px; }
.aegis-bracket-tr::after  { top: 0; right: 0; width: 1px; height: 24px; }
.aegis-bracket-bl::before { bottom: 0; left: 0; width: 24px; height: 1px; }
.aegis-bracket-bl::after  { bottom: 0; left: 0; width: 1px; height: 24px; }
.aegis-bracket-br::before { bottom: 0; right: 0; width: 24px; height: 1px; }
.aegis-bracket-br::after  { bottom: 0; right: 0; width: 1px; height: 24px; }

/* ============== S2: DECK LATERAL (cards secundários) ============== */
.aegis-deck-toggle {
  position: fixed;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  width: 28px;
  height: 88px;
  border-radius: 14px 0 0 14px;
  background: var(--aegis-glass-2);
  border: 1px solid var(--aegis-glass-line);
  border-right: none;
  backdrop-filter: blur(16px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  color: var(--aegis-text-dim);
  cursor: pointer;
  z-index: 50;
  transition: all 0.3s var(--aegis-ease);
}
.aegis-deck-toggle:hover {
  background: var(--aegis-glass-3);
  color: var(--aegis-cyan);
  width: 36px;
}
.aegis-deck-toggle i {
  font-size: 12px;
}
.aegis-deck-toggle span {
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  font-family: 'Geist Mono', monospace;
  font-size: 9px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
}

.aegis-deck {
  position: fixed;
  top: 0;
  right: 0;
  width: 420px;
  max-width: 92vw;
  height: 100vh;
  background: rgba(2, 10, 16, 0.85);
  backdrop-filter: blur(32px) saturate(180%);
  -webkit-backdrop-filter: blur(32px) saturate(180%);
  border-left: 1px solid var(--aegis-glass-line);
  z-index: 49;
  transform: translateX(100%);
  transition: transform 0.5s var(--aegis-ease);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.aegis-deck.open { transform: translateX(0); }
.aegis-deck-header {
  padding: 20px 24px 16px;
  border-bottom: 1px solid var(--aegis-glass-line);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.aegis-deck-title {
  font-family: 'Geist Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--aegis-text-dim);
}
.aegis-deck-tabs {
  display: flex;
  gap: 4px;
  padding: 12px 20px 0;
  flex-wrap: wrap;
}
.aegis-deck-tab {
  padding: 6px 12px;
  border-radius: 8px;
  background: transparent;
  border: 1px solid transparent;
  color: var(--aegis-text-dim);
  font-size: 11px;
  letter-spacing: 0.05em;
  cursor: pointer;
  transition: all 0.2s var(--aegis-ease);
}
.aegis-deck-tab:hover { color: var(--aegis-text); background: var(--aegis-glass-1); }
.aegis-deck-tab.active {
  background: rgba(0, 229, 255, 0.10);
  border-color: var(--aegis-glass-line);
  color: var(--aegis-cyan);
}
.aegis-deck-body {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.aegis-deck-body::-webkit-scrollbar { width: 6px; }
.aegis-deck-body::-webkit-scrollbar-thumb { background: var(--aegis-glass-line); border-radius: 3px; }

.aegis-deck-card {
  padding: 14px 16px;
  border-radius: 12px;
  background: var(--aegis-glass-1);
  border: 1px solid var(--aegis-glass-line);
  backdrop-filter: blur(8px);
  transition: all 0.25s var(--aegis-ease);
}
.aegis-deck-card:hover {
  background: var(--aegis-glass-2);
  border-color: var(--aegis-glass-edge);
  transform: translateY(-1px);
}
.aegis-deck-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}
.aegis-deck-card-label {
  font-family: 'Geist Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--aegis-text-dim);
}
.aegis-deck-card-value {
  font-size: 14px;
  color: var(--aegis-text);
}

/* ============== S6: COMMAND PALETTE FULLSCREEN ============== */
.aegis-cmd-overlay {
  position: fixed;
  inset: 0;
  background: rgba(2, 10, 16, 0.65);
  backdrop-filter: blur(20px) saturate(140%);
  -webkit-backdrop-filter: blur(20px) saturate(140%);
  z-index: 999;
  display: none;
  align-items: flex-start;
  justify-content: center;
  padding-top: 18vh;
  opacity: 0;
  transition: opacity 0.25s var(--aegis-ease);
}
.aegis-cmd-overlay.open { display: flex; opacity: 1; }

.aegis-cmd-box {
  width: min(640px, 90vw);
  background: rgba(3, 18, 28, 0.85);
  backdrop-filter: blur(40px) saturate(180%);
  border: 1px solid var(--aegis-glass-edge);
  border-radius: 18px;
  box-shadow:
    0 24px 80px rgba(0,0,0,0.6),
    inset 0 1px 0 rgba(255,255,255,0.08),
    0 0 60px rgba(0,229,255,0.1);
  overflow: hidden;
  transform: translateY(-10px) scale(0.98);
  opacity: 0;
  transition: all 0.3s var(--aegis-ease);
}
.aegis-cmd-overlay.open .aegis-cmd-box {
  transform: translateY(0) scale(1);
  opacity: 1;
}
.aegis-cmd-input-wrap {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px 22px;
  border-bottom: 1px solid var(--aegis-glass-line);
}
.aegis-cmd-input-wrap i {
  color: var(--aegis-cyan);
  font-size: 16px;
}
.aegis-cmd-input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: var(--aegis-text);
  font-size: 16px;
  font-weight: 400;
}
.aegis-cmd-input::placeholder { color: var(--aegis-text-mute); }
.aegis-cmd-input-hint {
  font-family: 'Geist Mono', monospace;
  font-size: 10px;
  color: var(--aegis-text-mute);
}
.aegis-cmd-list {
  max-height: 50vh;
  overflow-y: auto;
  padding: 8px;
}
.aegis-cmd-list::-webkit-scrollbar { width: 4px; }
.aegis-cmd-list::-webkit-scrollbar-thumb { background: var(--aegis-glass-line); }
.aegis-cmd-section {
  padding: 8px 14px 4px;
  font-family: 'Geist Mono', monospace;
  font-size: 9px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--aegis-text-mute);
}
.aegis-cmd-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 14px;
  border-radius: 10px;
  cursor: pointer;
  transition: background 0.15s var(--aegis-ease);
}
.aegis-cmd-item:hover,
.aegis-cmd-item.active {
  background: rgba(0, 229, 255, 0.08);
}
.aegis-cmd-item.active {
  border: 1px solid var(--aegis-glass-line);
  padding: 9px 13px;
}
.aegis-cmd-item-icon {
  width: 32px; height: 32px;
  border-radius: 8px;
  background: var(--aegis-glass-2);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--aegis-cyan);
  font-size: 13px;
  flex-shrink: 0;
}
.aegis-cmd-item-body { flex: 1; min-width: 0; }
.aegis-cmd-item-title {
  font-size: 13px;
  color: var(--aegis-text);
  margin-bottom: 2px;
}
.aegis-cmd-item-desc {
  font-size: 11px;
  color: var(--aegis-text-mute);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.aegis-cmd-item-key {
  font-family: 'Geist Mono', monospace;
  font-size: 10px;
  color: var(--aegis-text-mute);
  padding: 2px 6px;
  background: var(--aegis-glass-1);
  border: 1px solid var(--aegis-glass-line);
  border-radius: 4px;
}

/* ============== S3: BOOT SEQUENCE ============== */
.aegis-boot {
  position: fixed;
  inset: 0;
  background: var(--aegis-bg-deep);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  cursor: pointer;
}
.aegis-boot.complete {
  opacity: 0;
  transform: scale(1.1);
  filter: blur(8px);
  transition: all 0.6s var(--aegis-ease);
  pointer-events: none;
}
.aegis-boot-core {
  position: relative;
  width: 280px;
  height: 280px;
}
.aegis-boot-core svg {
  width: 100%;
  height: 100%;
  overflow: visible;
}
.aegis-boot-core svg .ring,
.aegis-boot-core svg .reticle,
.aegis-boot-core svg .core-fill {
  stroke: var(--aegis-cyan);
  fill: none;
  stroke-width: 1;
  opacity: 0;
  stroke-dasharray: 1000;
  stroke-dashoffset: 1000;
  animation: aegis-boot-draw 0.6s var(--aegis-ease) forwards;
  filter: drop-shadow(0 0 4px var(--aegis-cyan));
}
.aegis-boot-core svg .core-fill { fill: var(--aegis-cyan); stroke: none; opacity: 0; transform-origin: center; }

@keyframes aegis-boot-draw {
  0%   { opacity: 0; stroke-dashoffset: 1000; }
  60%  { opacity: 1; stroke-dashoffset: 0; }
  100% { opacity: 0.8; stroke-dashoffset: 0; }
}
.aegis-boot-core svg .ring:nth-child(1) { animation-delay: 0.0s; }
.aegis-boot-core svg .ring:nth-child(2) { animation-delay: 0.15s; }
.aegis-boot-core svg .ring:nth-child(3) { animation-delay: 0.30s; }
.aegis-boot-core svg .reticle           { animation-delay: 0.45s; }
.aegis-boot-core svg .core-fill         { animation: aegis-boot-core-flash 0.6s 0.9s var(--aegis-ease) forwards; }

@keyframes aegis-boot-core-flash {
  0%   { opacity: 0; transform: scale(0); }
  50%  { opacity: 1; transform: scale(1.4); }
  100% { opacity: 0.9; transform: scale(1); }
}

.aegis-boot-tlm-left,
.aegis-boot-tlm-right {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  font-family: 'Geist Mono', monospace;
  font-size: 10px;
  color: var(--aegis-text-dim);
  display: flex;
  flex-direction: column;
  gap: 4px;
  opacity: 0;
  animation: aegis-boot-tlm-in 0.3s 0.3s var(--aegis-ease) forwards;
}
.aegis-boot-tlm-left  { left: 6vw; }
.aegis-boot-tlm-right { right: 6vw; align-items: flex-end; }
@keyframes aegis-boot-tlm-in { to { opacity: 0.7; } }
.aegis-boot-tlm-line { animation: aegis-boot-line-in 0.2s var(--aegis-ease) both; }
.aegis-boot-tlm-line.ok::after { content: ' ✓'; color: var(--aegis-cyan); }

@keyframes aegis-boot-line-in {
  from { opacity: 0; transform: translateX(-8px); }
  to   { opacity: 1; transform: translateX(0); }
}

.aegis-boot-title {
  position: absolute;
  bottom: 12vh;
  left: 50%;
  transform: translateX(-50%);
  text-align: center;
  letter-spacing: 0.6em;
  font-size: 14px;
  font-weight: 300;
  color: var(--aegis-text);
  opacity: 0;
  animation: aegis-boot-title-in 0.5s 1.0s var(--aegis-ease) forwards;
}
.aegis-boot-subtitle {
  margin-top: 8px;
  font-family: 'Geist Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.3em;
  color: var(--aegis-text-mute);
}
@keyframes aegis-boot-title-in {
  from { opacity: 0; letter-spacing: 1.2em; }
  to   { opacity: 1; letter-spacing: 0.6em; }
}

.aegis-boot-skip {
  position: absolute;
  bottom: 24px;
  right: 24px;
  font-family: 'Geist Mono', monospace;
  font-size: 10px;
  color: var(--aegis-text-mute);
  letter-spacing: 0.2em;
  opacity: 0;
  animation: aegis-boot-tlm-in 0.3s 1.3s var(--aegis-ease) forwards;
}
.aegis-boot-skip kbd {
  padding: 2px 6px;
  background: var(--aegis-glass-1);
  border: 1px solid var(--aegis-glass-line);
  border-radius: 4px;
}

.aegis-boot-flash {
  position: absolute;
  inset: 0;
  background: white;
  opacity: 0;
  pointer-events: none;
  animation: aegis-boot-flash 0.2s 1.5s var(--aegis-ease) forwards;
}
@keyframes aegis-boot-flash {
  0%   { opacity: 0; }
  30%  { opacity: 0.9; }
  100% { opacity: 0; }
}

/* ============== S4: LOGIN CINEMATOGRÁFICO ============== */
.aegis-login {
  position: fixed;
  inset: 0;
  background: var(--aegis-bg-deep);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  overflow: hidden;
}
.aegis-login-stage {
  position: relative;
  width: min(640px, 92vw);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 32px;
  z-index: 2;
}

.aegis-login-greeting {
  text-align: center;
  letter-spacing: 0.05em;
  animation: aegis-fade-in 0.6s 0.4s var(--aegis-ease) both;
}
.aegis-login-greeting-mono {
  font-family: 'Geist Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--aegis-cyan);
  margin-bottom: 12px;
}
.aegis-login-greeting-name {
  font-size: 32px;
  font-weight: 300;
  letter-spacing: 0.08em;
  color: var(--aegis-text);
}
.aegis-login-greeting-sub {
  margin-top: 8px;
  font-family: 'Geist Mono', monospace;
  font-size: 11px;
  color: var(--aegis-text-mute);
  letter-spacing: 0.15em;
}
@keyframes aegis-fade-in {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* 6 anéis de PIN */
.aegis-pin-rings {
  display: flex;
  gap: 16px;
  align-items: center;
  justify-content: center;
  animation: aegis-fade-in 0.6s 0.6s var(--aegis-ease) both;
}
.aegis-pin-ring {
  position: relative;
  width: 54px;
  height: 54px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s var(--aegis-ease);
}
.aegis-pin-ring svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  animation: aegis-pin-spin 8s linear infinite;
}
.aegis-pin-ring svg circle {
  fill: none;
  stroke: var(--aegis-glass-line);
  stroke-width: 1.5;
  stroke-dasharray: 8 6;
}
.aegis-pin-ring.filled svg {
  animation: none;
}
.aegis-pin-ring.filled svg circle {
  stroke: var(--aegis-cyan);
  stroke-dasharray: none;
  filter: drop-shadow(0 0 6px var(--aegis-cyan));
}
.aegis-pin-ring-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--aegis-text-mute);
  transition: all 0.3s var(--aegis-ease);
}
.aegis-pin-ring.filled .aegis-pin-ring-dot {
  background: var(--aegis-cyan);
  box-shadow: 0 0 12px var(--aegis-cyan);
  transform: scale(1.4);
}
.aegis-pin-ring.error svg circle {
  stroke: var(--aegis-warning);
  filter: drop-shadow(0 0 6px var(--aegis-warning));
}
.aegis-pin-ring.error .aegis-pin-ring-dot { background: var(--aegis-warning); }
.aegis-pin-rings.shake {
  animation: aegis-shake 0.4s var(--aegis-ease);
}
@keyframes aegis-shake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-6px); }
  40% { transform: translateX(6px); }
  60% { transform: translateX(-4px); }
  80% { transform: translateX(4px); }
}
@keyframes aegis-pin-spin {
  to { transform: rotate(360deg); }
}

.aegis-pin-hidden-input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.aegis-login-hint {
  margin-top: 16px;
  font-family: 'Geist Mono', monospace;
  font-size: 11px;
  color: var(--aegis-text-mute);
  letter-spacing: 0.15em;
  text-align: center;
  animation: aegis-fade-in 0.6s 0.9s var(--aegis-ease) both;
}
.aegis-login-hint kbd {
  padding: 2px 8px;
  background: var(--aegis-glass-1);
  border: 1px solid var(--aegis-glass-line);
  border-radius: 4px;
  color: var(--aegis-cyan-soft);
  margin: 0 4px;
}

/* Anel maior de fundo (decoração) */
.aegis-login-orbit {
  position: absolute;
  width: 90vmin;
  height: 90vmin;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  z-index: 1;
  opacity: 0.5;
  pointer-events: none;
}
.aegis-login-orbit svg { width: 100%; height: 100%; }
.aegis-login-orbit circle {
  fill: none;
  stroke: var(--aegis-glass-line);
  stroke-width: 0.5;
}
.aegis-login-orbit-rotate {
  transform-origin: center;
  animation: aegis-pin-spin 80s linear infinite;
}
.aegis-login-orbit-rotate-rev {
  transform-origin: center;
  animation: aegis-pin-spin 60s linear infinite reverse;
}

/* ============== UTILS ============== */
.aegis-hide { display: none !important; }
@keyframes aegis-blink {
  0%, 100% { opacity: 1; }
  50%      { opacity: 0.3; }
}
.aegis-blink { animation: aegis-blink 1.5s ease-in-out infinite; }

/* Mobile responsive */
@media (max-width: 768px) {
  .aegis-hero { width: 95vw; }
  .aegis-core-wrap { width: 260px; height: 260px; }
  .aegis-telemetry-left,
  .aegis-telemetry-right { display: none; }
  .aegis-bracket { width: 40px; height: 40px; }
  .aegis-deck { width: 100vw; }
  .aegis-cmd-pill span { display: none; }
}

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

/* ============================================================
 *  AEGIS — FAB (Floating Action Buttons)
 * ============================================================ */
.aegis-fab {
  position: fixed;
  right: 24px;
  bottom: 24px;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--aegis-cyan);
  font-size: 18px;
  cursor: pointer;
  z-index: 1000;
  transition: all 0.3s var(--aegis-ease);
  box-shadow: 0 8px 32px rgba(0, 229, 255, 0.18);
}
.aegis-fab:hover {
  transform: translateY(-2px) scale(1.05);
  box-shadow: 0 12px 40px rgba(0, 229, 255, 0.32);
  color: var(--aegis-cyan-soft);
}
.aegis-fab:active { transform: scale(0.96); }
.aegis-fab-cmd {
  right: auto;
  left: 24px;
}

/* ============================================================
 *  AEGIS — Toast notifications
 * ============================================================ */
.aegis-toasts {
  position: fixed;
  top: 24px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}
.aegis-toast {
  padding: 12px 20px;
  border-radius: 999px;
  font-size: 12px;
  letter-spacing: 0.12em;
  color: var(--aegis-text);
  text-transform: uppercase;
  opacity: 0;
  transform: translateY(-8px);
  transition: all 0.4s var(--aegis-ease);
  pointer-events: auto;
}
.aegis-toast.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ============================================================
 *  AEGIS — DECK (Lateral panel) — components
 * ============================================================ */
.aegis-deck-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(2, 10, 16, 0.6);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s var(--aegis-ease);
  z-index: 1500;
}
.aegis-deck-backdrop.is-open {
  opacity: 1;
  pointer-events: auto;
}
.aegis-deck {
  position: fixed;
  top: 0;
  right: 0;
  width: 420px;
  max-width: 92vw;
  height: 100vh;
  z-index: 1600;
  transform: translateX(100%);
  transition: transform 0.45s var(--aegis-ease);
  padding: 16px;
}
.aegis-deck.is-open { transform: translateX(0); }
.aegis-deck-inner {
  height: 100%;
  border-radius: var(--aegis-radius-lg);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.aegis-deck-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px 16px;
  border-bottom: 1px solid var(--aegis-glass-line);
}
.aegis-deck-title {
  font-size: 11px;
  letter-spacing: 0.3em;
  color: var(--aegis-cyan);
}
.aegis-deck-close {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: var(--aegis-text-dim);
  cursor: pointer;
  transition: all 0.2s var(--aegis-ease);
  background: transparent;
  border: 1px solid transparent;
}
.aegis-deck-close:hover {
  color: var(--aegis-cyan);
  background: var(--aegis-glass-2);
  border-color: var(--aegis-glass-line);
}
.aegis-deck-tabs {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  padding: 12px 16px;
  gap: 4px;
  border-bottom: 1px solid var(--aegis-glass-line);
}
.aegis-deck-tab {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 10px 4px;
  border-radius: 10px;
  font-size: 10px;
  letter-spacing: 0.08em;
  color: var(--aegis-text-dim);
  background: transparent;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.2s var(--aegis-ease);
}
.aegis-deck-tab i { font-size: 14px; }
.aegis-deck-tab:hover {
  color: var(--aegis-cyan);
  background: var(--aegis-glass-1);
}
.aegis-deck-tab.is-active {
  color: var(--aegis-cyan);
  background: var(--aegis-glass-2);
  border-color: var(--aegis-glass-line);
  box-shadow: inset 0 0 18px rgba(0, 229, 255, 0.08);
}
.aegis-deck-body {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.aegis-deck-body::-webkit-scrollbar { width: 4px; }
.aegis-deck-body::-webkit-scrollbar-thumb { background: var(--aegis-glass-edge); border-radius: 4px; }

.aegis-deck-card {
  border-radius: var(--aegis-radius);
  padding: 0;
  overflow: hidden;
}
.aegis-deck-card-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--aegis-cyan);
  border-bottom: 1px solid var(--aegis-glass-line);
  background: var(--aegis-glass-1);
}
.aegis-deck-card-body {
  padding: 16px;
  font-size: 13px;
  color: var(--aegis-text);
}

.aegis-stat-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}
.aegis-stat-label {
  font-family: 'Geist Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.2em;
  color: var(--aegis-text-mute);
  margin-bottom: 4px;
}
.aegis-stat-val {
  font-size: 20px;
  font-weight: 500;
  color: var(--aegis-cyan);
}

.aegis-quick-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}
.aegis-quick {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 14px 8px;
  border-radius: 10px;
  background: var(--aegis-glass-1);
  border: 1px solid var(--aegis-glass-line);
  color: var(--aegis-text);
  font-size: 11px;
  letter-spacing: 0.08em;
  cursor: pointer;
  transition: all 0.2s var(--aegis-ease);
}
.aegis-quick i { color: var(--aegis-cyan); font-size: 16px; }
.aegis-quick:hover {
  background: var(--aegis-glass-2);
  border-color: var(--aegis-glass-edge);
  transform: translateY(-1px);
}

.aegis-mirror {
  font-size: 12px;
  line-height: 1.6;
  max-height: 360px;
  overflow-y: auto;
  color: var(--aegis-text);
}
.aegis-mirror::-webkit-scrollbar { width: 3px; }
.aegis-mirror::-webkit-scrollbar-thumb { background: var(--aegis-glass-edge); }
.aegis-mirror * { color: inherit !important; }

.aegis-deck-cta {
  margin-top: 8px;
  width: 100%;
  padding: 12px;
  border-radius: 10px;
  background: linear-gradient(135deg, rgba(0,229,255,0.18), rgba(0,229,255,0.08));
  border: 1px solid var(--aegis-glass-edge);
  color: var(--aegis-cyan);
  font-family: 'Geist Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  cursor: pointer;
  transition: all 0.2s var(--aegis-ease);
}
.aegis-deck-cta:hover {
  background: linear-gradient(135deg, rgba(0,229,255,0.28), rgba(0,229,255,0.14));
  box-shadow: 0 0 18px rgba(0, 229, 255, 0.3);
}

.aegis-tel-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px 12px;
  font-size: 11px;
  letter-spacing: 0.12em;
  color: var(--aegis-text-dim);
}
.aegis-tel-grid > div:nth-child(odd) { color: var(--aegis-text-mute); }
.aegis-tel-grid > div:nth-child(even) { color: var(--aegis-cyan); text-align: right; }

.aegis-toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
}
.aegis-toggle {
  width: 42px;
  height: 22px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--aegis-glass-line);
  cursor: pointer;
  position: relative;
  transition: all 0.2s var(--aegis-ease);
}
.aegis-toggle-dot {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--aegis-text-mute);
  transition: all 0.25s var(--aegis-ease);
}
.aegis-toggle.is-on {
  background: var(--aegis-glass-2);
  border-color: var(--aegis-cyan);
}
.aegis-toggle.is-on .aegis-toggle-dot {
  left: 22px;
  background: var(--aegis-cyan);
  box-shadow: 0 0 10px var(--aegis-cyan);
}

/* ============================================================
 *  AEGIS — COMMAND PALETTE
 * ============================================================ */
.aegis-cmd-overlay {
  position: fixed;
  inset: 0;
  background: rgba(2, 10, 16, 0.55);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 2000;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: 14vh;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s var(--aegis-ease);
}
.aegis-cmd-overlay.is-open {
  opacity: 1;
  pointer-events: auto;
}
.aegis-cmd-box {
  width: 92%;
  max-width: 560px;
  border-radius: 16px;
  overflow: hidden;
  transform: translateY(-8px) scale(0.98);
  transition: transform 0.3s var(--aegis-ease);
}
.aegis-cmd-overlay.is-open .aegis-cmd-box {
  transform: translateY(0) scale(1);
}
.aegis-cmd-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--aegis-glass-line);
}
.aegis-cmd-icon {
  color: var(--aegis-cyan);
  font-size: 16px;
}
.aegis-cmd-input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: var(--aegis-text);
  font-size: 16px;
  font-family: inherit;
  letter-spacing: 0.02em;
}
.aegis-cmd-input::placeholder { color: var(--aegis-text-mute); }
.aegis-cmd-kbd {
  font-family: 'Geist Mono', monospace;
  font-size: 10px;
  padding: 3px 8px;
  border-radius: 4px;
  background: var(--aegis-glass-2);
  border: 1px solid var(--aegis-glass-line);
  color: var(--aegis-text-dim);
  letter-spacing: 0.1em;
}
.aegis-cmd-list {
  max-height: 420px;
  overflow-y: auto;
  padding: 8px;
}
.aegis-cmd-list::-webkit-scrollbar { width: 3px; }
.aegis-cmd-list::-webkit-scrollbar-thumb { background: var(--aegis-glass-edge); }
.aegis-cmd-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 14px;
  border-radius: 10px;
  font-size: 13px;
  color: var(--aegis-text);
  cursor: pointer;
  transition: all 0.15s var(--aegis-ease);
}
.aegis-cmd-item i { color: var(--aegis-cyan); width: 18px; text-align: center; }
.aegis-cmd-item.is-selected,
.aegis-cmd-item:hover {
  background: var(--aegis-glass-2);
  border: none;
}
.aegis-cmd-item.is-selected {
  box-shadow: inset 2px 0 0 var(--aegis-cyan);
}
.aegis-cmd-label { flex: 1; }
.aegis-cmd-empty {
  padding: 24px;
  text-align: center;
  font-size: 12px;
  letter-spacing: 0.15em;
}
.aegis-cmd-footer {
  display: flex;
  gap: 16px;
  padding: 10px 20px;
  font-size: 10px;
  letter-spacing: 0.15em;
  color: var(--aegis-text-mute);
  border-top: 1px solid var(--aegis-glass-line);
}

/* ============================================================
 *  AEGIS — BOOT screen (new structure with line steps)
 * ============================================================ */
#aegis-boot {
  position: fixed;
  inset: 0;
  background: var(--aegis-bg-deep);
  z-index: 9000;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  transition: opacity 0.6s var(--aegis-ease);
  opacity: 1;
}
#aegis-boot.is-done {
  opacity: 0;
  pointer-events: none;
}
/* Safety: força fade-out + boot lines aparecem automaticamente via CSS — funciona MESMO sem JS */
#aegis-boot {
  animation: aegis-boot-auto-hide 4.5s linear forwards;
}
@keyframes aegis-boot-auto-hide {
  0%, 80%  { opacity: 1; pointer-events: auto; visibility: visible; }
  95%      { opacity: 0.2; }
  100%     { opacity: 0; pointer-events: none; visibility: hidden; }
}
/* Boot lines aparecem em sequência por CSS animation */
#aegis-boot .aegis-boot-line-1 { animation: aegis-line-fade 0.5s 0.3s forwards; }
#aegis-boot .aegis-boot-line-2 { animation: aegis-line-fade 0.5s 0.9s forwards; }
#aegis-boot .aegis-boot-line-3 { animation: aegis-line-fade 0.5s 1.6s forwards; }
#aegis-boot .aegis-boot-line-4 { animation: aegis-line-fade 0.5s 2.3s forwards; }
@keyframes aegis-line-fade {
  to { opacity: 1; }
}
#aegis-boot.is-done { animation: none; opacity: 0 !important; pointer-events: none; visibility: hidden; }
#aegis-boot::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at center, rgba(0, 229, 255, 0.05) 0%, transparent 60%),
    linear-gradient(transparent 95%, rgba(0, 229, 255, 0.04) 95%),
    linear-gradient(90deg, transparent 95%, rgba(0, 229, 255, 0.04) 95%);
  background-size: 100% 100%, 48px 48px, 48px 48px;
  mask-image: radial-gradient(ellipse at center, black 0%, transparent 80%);
  pointer-events: none;
}
.aegis-boot-core {
  position: relative;
  width: 200px;
  height: 200px;
  margin-bottom: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.aegis-boot-core::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 1px solid var(--aegis-glass-edge);
  animation: aegis-pulse-ring 2s var(--aegis-ease) infinite;
}
.aegis-boot-core::after {
  content: '';
  position: absolute;
  inset: 20px;
  border-radius: 50%;
  border: 1px dashed var(--aegis-glass-line);
  animation: aegis-pin-spin 6s linear infinite;
}
@keyframes aegis-pulse-ring {
  0%, 100% { transform: scale(1); opacity: 0.6; }
  50%      { transform: scale(1.1); opacity: 1; }
}
.aegis-boot-core-dot {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--aegis-cyan);
  box-shadow:
    0 0 24px var(--aegis-cyan),
    0 0 60px rgba(0, 229, 255, 0.5),
    0 0 120px rgba(0, 229, 255, 0.3);
  animation: aegis-pulse-ring 1.4s var(--aegis-ease) infinite;
}
.aegis-boot-lines {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-family: 'Geist Mono', monospace;
  font-size: 12px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--aegis-cyan);
  width: 320px;
  text-align: center;
}
.aegis-boot-line {
  opacity: 0;
  transition: opacity 0.4s var(--aegis-ease);
}
.aegis-boot-line.is-visible { opacity: 1; }
.aegis-boot-line .aegis-boot-line-ok {
  color: var(--aegis-success);
  margin-left: 8px;
}
.aegis-boot-skip,
.aegis-boot-skip-btn {
  position: fixed;
  bottom: 32px;
  right: 32px;
  font-family: 'Geist Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.2em;
  color: var(--aegis-cyan);
  text-transform: uppercase;
  background: rgba(0, 229, 255, 0.08);
  border: 1px solid var(--aegis-glass-edge);
  padding: 12px 22px;
  border-radius: 999px;
  cursor: pointer;
  z-index: 10000;
  transition: all 0.2s var(--aegis-ease);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.aegis-boot-skip-btn:hover {
  background: rgba(0, 229, 255, 0.18);
  box-shadow: 0 0 20px rgba(0, 229, 255, 0.35);
  transform: translateY(-1px);
}
#aegis-boot.is-flash::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at center, rgba(0, 229, 255, 0.3), transparent 70%);
  animation: aegis-boot-flash 0.6s var(--aegis-ease);
  pointer-events: none;
}
@keyframes aegis-boot-flash {
  0% { opacity: 0; }
  30% { opacity: 1; }
  100% { opacity: 0; }
}

/* ============================================================
 *  AEGIS — LOGIN (visible by default, boot overlays on top)
 * ============================================================ */
#aegis-login {
  opacity: 1;
  transform: scale(1);
  transition: opacity 0.6s var(--aegis-ease), transform 0.6s var(--aegis-ease);
  pointer-events: auto;
  z-index: 10;
}
#aegis-login.is-success {
  animation: aegis-login-success 0.9s var(--aegis-ease) forwards;
}
#aegis-login.is-shake { animation: aegis-shake 0.5s var(--aegis-ease); }
@keyframes aegis-login-success {
  0%   { transform: scale(1); filter: blur(0); }
  50%  { transform: scale(1.05); filter: blur(0); box-shadow: 0 0 200px rgba(0, 229, 255, 0.8); }
  100% { transform: scale(1.2); opacity: 0; filter: blur(12px); }
}
.aegis-pin-error {
  margin-top: 12px;
  font-family: 'Geist Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--aegis-warning);
  text-align: center;
  opacity: 0;
  transition: opacity 0.3s var(--aegis-ease);
}
.aegis-pin-error.is-visible { opacity: 1; }

.aegis-pin-submit {
  margin-top: 24px;
  padding: 14px 36px;
  border-radius: 999px;
  background: var(--aegis-glass-2);
  border: 1px solid var(--aegis-glass-edge);
  color: var(--aegis-cyan);
  font-family: 'Geist Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  cursor: pointer;
  transition: all 0.25s var(--aegis-ease);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.aegis-pin-submit:hover {
  background: var(--aegis-glass-3);
  box-shadow: 0 0 20px rgba(0, 229, 255, 0.35);
  transform: translateY(-1px);
}

/* ============================================================
 *  AEGIS — Body flash effect
 * ============================================================ */
body.aegis-flash {
  animation: aegis-body-flash 0.6s var(--aegis-ease);
}
@keyframes aegis-body-flash {
  0% { filter: brightness(1); }
  30% { filter: brightness(1.4) saturate(1.3); }
  100% { filter: brightness(1); }
}

/* ============================================================
 *  AEGIS — Esconder elementos legados na página de LOGIN
 * (quando o body contém #aegis-login, escondemos o que não deve aparecer)
 * ============================================================ */
body:has(#aegis-login) #jarvis-v8-dock,
body:has(#aegis-login) #particles-bg,
body:has(#aegis-login) .hud-grid-bg,
body:has(#aegis-login) .hud-scanlines,
body:has(#aegis-login) .hud-stars {
  display: none !important;
}
/* Fallback para browsers sem :has() */
.aegis-page-login #jarvis-v8-dock,
.aegis-page-login #particles-bg {
  display: none !important;
}

/* ============================================================
 *  AEGIS — Login painel centralizado (regra forte)
 * ============================================================ */
#aegis-login {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  position: fixed !important;
  inset: 0 !important;
  z-index: 100 !important;
}
.aegis-login-panel {
  position: relative;
  z-index: 101;
  min-width: 480px;
  max-width: 92vw;
  padding: 48px 56px;
  border-radius: var(--aegis-radius-lg);
}
@media (max-width: 540px) {
  .aegis-login-panel { min-width: 0; width: 92vw; padding: 32px 24px; }
}

/* ============================================================
 *  AEGIS — FINAL v10.2 — Login responsivo, semântico e acessível
 *  Mobile-first: 320px → 480px → 768px → 1024px+
 *  Cobre as classes novas referenciadas em src/index.tsx (M1)
 * ============================================================ */

/* —— Utility: screen-reader only —— */
.sr-only {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* —— Utility: text color cyan —— */
.aegis-cyan { color: var(--aegis-cyan); }

/* —— Página de login: garante BG midnight e altura cheia mesmo em iOS —— */
.aegis-login-page {
  position: relative;
  min-height: 100vh;
  min-height: 100dvh; /* dynamic viewport — iOS Safari URL bar */
  width: 100%;
  background:
    radial-gradient(ellipse at 50% 40%, var(--aegis-bg-elev) 0%, var(--aegis-bg-base) 60%, var(--aegis-bg-deep) 100%);
  color: var(--aegis-text);
  overflow: hidden;
  isolation: isolate;
}

/* —— Wrapper centralizador (substitui inline position:fixed inset:0) —— */
.aegis-login-wrapper {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
  z-index: 100;
}

/* —— Painel principal (VISUAL completo: glass + border + shadow) —— */
.aegis-login-panel {
  position: relative;
  z-index: 101;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  width: 100%;
  max-width: 480px;
  padding: 40px 32px;
  background:
    linear-gradient(135deg, var(--aegis-glass-2) 0%, var(--aegis-glass-1) 50%, var(--aegis-glass-3) 100%);
  backdrop-filter: blur(var(--aegis-blur)) saturate(180%);
  -webkit-backdrop-filter: blur(var(--aegis-blur)) saturate(180%);
  border: 1px solid var(--aegis-glass-line);
  border-radius: var(--aegis-radius-lg);
  box-shadow:
    0 24px 80px rgba(0, 0, 0, 0.5),
    0 0 80px rgba(0, 229, 255, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
  /* sem min-width que travava em mobile */
  min-width: 0;
  animation: aegis-fade-in 0.7s var(--aegis-ease) both;
}

/* —— Badge "J.A.R.V.I.S. · ONLINE" —— */
.aegis-status-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border: 1px solid var(--aegis-glass-edge);
  border-radius: 999px;
  background: var(--aegis-glass-1);
  color: var(--aegis-cyan);
  font-family: 'Geist Mono', 'JetBrains Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  text-shadow: 0 0 8px rgba(0, 229, 255, 0.45);
  animation: aegis-fade-in 0.6s 0.1s var(--aegis-ease) both;
}
.aegis-status-badge::before {
  content: '';
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--aegis-success);
  box-shadow: 0 0 8px var(--aegis-success);
  animation: aegis-pulse 2s var(--aegis-ease-smooth) infinite;
}

/* —— Núcleo decorativo (anéis pulsantes + ponto) —— */
.aegis-login-core {
  position: relative;
  width: 72px;
  height: 72px;
  margin: 4px 0 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: aegis-fade-in 0.6s 0.2s var(--aegis-ease) both;
}
.aegis-login-core-ring1,
.aegis-login-core-ring2 {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 1px solid var(--aegis-cyan);
  opacity: 0.35;
}
.aegis-login-core-ring1 {
  animation: aegis-core-pulse 2.4s var(--aegis-ease-smooth) infinite;
}
.aegis-login-core-ring2 {
  inset: 10px;
  animation: aegis-core-pulse 2.4s 0.6s var(--aegis-ease-smooth) infinite;
  opacity: 0.55;
}
.aegis-login-core-dot {
  width: 14px; height: 14px;
  border-radius: 50%;
  background: var(--aegis-cyan);
  box-shadow:
    0 0 16px var(--aegis-cyan),
    0 0 32px rgba(0, 229, 255, 0.5);
  animation: aegis-pulse 2s var(--aegis-ease-smooth) infinite;
}
@keyframes aegis-core-pulse {
  0%   { transform: scale(0.9); opacity: 0.6; }
  60%  { transform: scale(1.15); opacity: 0; }
  100% { transform: scale(1.15); opacity: 0; }
}

/* —— Greeting (overline · nome · subtitle) —— */
.aegis-greeting {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  animation: aegis-fade-in 0.6s 0.3s var(--aegis-ease) both;
}
.aegis-greeting-overline {
  font-family: 'Geist Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--aegis-text-mute);
}
.aegis-greeting-name {
  margin: 0;
  font-family: 'Geist Sans', 'Inter', sans-serif;
  font-size: clamp(22px, 5vw, 30px);
  font-weight: 300;
  letter-spacing: 0.04em;
  color: var(--aegis-text);
  text-shadow: 0 0 24px rgba(0, 229, 255, 0.15);
  line-height: 1.15;
}
.aegis-greeting-sub {
  margin: 0;
  font-family: 'Geist Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--aegis-text-dim);
}

/* —— SVG circles dentro do ring de PIN (compat com .aegis-pin-ring svg circle existente) —— */
.aegis-pin-ring-outer { /* circle externo */ }
.aegis-pin-ring-inner { /* circle interno — opcional, mais sutil */
  opacity: 0.4;
}

/* —— Input PIN escondido (nova classe — mantém compat com .aegis-pin-hidden-input) —— */
.aegis-pin-hidden {
  position: absolute;
  opacity: 0;
  pointer-events: none;
  width: 1px; height: 1px;
  /* Mas RECEBE foco — não usamos display:none */
}
/* Quando o input ganha foco, halo sutil ao redor dos rings */
.aegis-pin-hidden:focus-visible ~ .aegis-pin-rings .aegis-pin-ring {
  box-shadow: 0 0 0 2px rgba(0, 229, 255, 0.15);
}

/* —— Wrapper do botão Autenticar (espaçamento + animação) —— */
.aegis-pin-submit-wrap {
  margin-top: 4px;
  animation: aegis-fade-in 0.6s 0.7s var(--aegis-ease) both;
}
/* Override .aegis-pin-submit já existente para incluir ícone e ser tap-friendly */
.aegis-pin-submit {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px; /* alvo de toque WCAG-AA */
  padding: 12px 32px;
}
.aegis-pin-submit i { font-size: 13px; }
.aegis-pin-submit:focus-visible {
  outline: 2px solid var(--aegis-cyan);
  outline-offset: 4px;
  box-shadow: 0 0 24px rgba(0, 229, 255, 0.45);
}

/* —— Hint (PIN inicial: 1234) —— */
.aegis-pin-hint {
  margin: 12px 0 0;
  text-align: center;
  font-family: 'Geist Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.12em;
  color: var(--aegis-text-mute);
  line-height: 1.7;
  animation: aegis-fade-in 0.6s 0.9s var(--aegis-ease) both;
}
.aegis-pin-hint strong {
  color: var(--aegis-cyan);
  font-weight: 500;
  letter-spacing: 0.2em;
}
.aegis-pin-hint span {
  display: inline-block;
  margin-top: 2px;
  font-size: 10px;
  color: var(--aegis-text-mute);
  opacity: 0.7;
}

/* ============================================================
 *  Focus-visible global (M3 parcial) — aplicado já aqui
 * ============================================================ */
.aegis-ui *:focus { outline: none; }
.aegis-ui *:focus-visible {
  outline: 2px solid var(--aegis-cyan);
  outline-offset: 3px;
  border-radius: 6px;
}

/* ============================================================
 *  Mobile-first breakpoints — login responsivo de 320px a 4K
 * ============================================================ */

/* —— ≤ 380px: smartphones muito pequenos (iPhone SE 1) —— */
@media (max-width: 380px) {
  .aegis-login-wrapper { padding: 16px 8px; }
  .aegis-login-panel { padding: 28px 18px; gap: 12px; border-radius: var(--aegis-radius); }
  .aegis-login-core { width: 56px; height: 56px; }
  .aegis-login-core-dot { width: 10px; height: 10px; }
  .aegis-greeting-name { font-size: 22px; }
  .aegis-pin-rings { gap: 8px; flex-wrap: wrap; max-width: 100%; }
  .aegis-pin-ring { width: 38px; height: 38px; }
  .aegis-pin-ring-dot { width: 6px; height: 6px; }
  .aegis-status-badge { font-size: 9px; padding: 5px 10px; letter-spacing: 0.22em; }
  .aegis-pin-submit { padding: 12px 24px; font-size: 10px; letter-spacing: 0.24em; }
}

/* —— ≤ 480px: smartphones padrão —— */
@media (max-width: 480px) {
  .aegis-telemetry-left,
  .aegis-telemetry-right { display: none !important; }
  .aegis-bracket { width: 28px; height: 28px; }
  .aegis-bracket-tl, .aegis-bracket-tr { top: 8px; }
  .aegis-bracket-bl, .aegis-bracket-br { bottom: 8px; }
  .aegis-bracket-tl, .aegis-bracket-bl { left: 8px; }
  .aegis-bracket-tr, .aegis-bracket-br { right: 8px; }
  .aegis-login-panel { padding: 32px 22px; }
  .aegis-pin-ring { width: 42px; height: 42px; }
  .aegis-greeting-overline { font-size: 9px; letter-spacing: 0.24em; }
  .aegis-greeting-sub { font-size: 10px; letter-spacing: 0.16em; }
}

/* —— ≤ 768px: tablets pequenos e mobile landscape —— */
@media (max-width: 768px) {
  .aegis-telemetry-left,
  .aegis-telemetry-right { display: none !important; }
  .aegis-login-panel { max-width: 92vw; }
}

/* —— ≥ 1024px: desktop confortável —— */
@media (min-width: 1024px) {
  .aegis-login-panel { max-width: 520px; padding: 48px 44px; gap: 18px; }
  .aegis-login-core { width: 80px; height: 80px; }
  .aegis-greeting-name { font-size: 32px; }
  .aegis-pin-ring { width: 56px; height: 56px; }
}

/* —— ≥ 1600px: telas grandes / 4K —— */
@media (min-width: 1600px) {
  .aegis-login-panel { max-width: 560px; padding: 56px 48px; }
  .aegis-greeting-name { font-size: 34px; }
}

/* —— Landscape em mobile (altura curta) —— */
@media (max-height: 540px) and (orientation: landscape) {
  .aegis-login-wrapper { padding: 8px; align-items: flex-start; padding-top: 8px; overflow-y: auto; }
  .aegis-login-panel { padding: 16px 24px; gap: 10px; }
  .aegis-login-core { width: 44px; height: 44px; margin: 0; }
  .aegis-login-core-dot { width: 8px; height: 8px; }
  .aegis-greeting-overline { display: none; }
  .aegis-greeting-name { font-size: 20px; }
  .aegis-greeting-sub { font-size: 10px; }
  .aegis-pin-ring { width: 36px; height: 36px; }
  .aegis-pin-rings { gap: 8px; }
  .aegis-pin-hint { display: none; }
}

/* —— Acessibilidade: prefers-reduced-motion —— */
@media (prefers-reduced-motion: reduce) {
  .aegis-login-panel,
  .aegis-status-badge,
  .aegis-login-core,
  .aegis-greeting,
  .aegis-pin-rings,
  .aegis-pin-submit-wrap,
  .aegis-pin-hint { animation: none !important; }
  .aegis-login-core-ring1,
  .aegis-login-core-ring2,
  .aegis-login-core-dot,
  .aegis-status-badge::before,
  .aegis-pin-ring svg { animation: none !important; }
  .aegis-ui *,
  .aegis-ui *::before,
  .aegis-ui *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}

/* —— Acessibilidade: high contrast —— */
@media (prefers-contrast: more) {
  .aegis-login-panel { border-color: var(--aegis-cyan); }
  .aegis-greeting-overline,
  .aegis-greeting-sub,
  .aegis-pin-hint { color: var(--aegis-text); }
}

/* ============================================================
 *  M3 — Skip link de acessibilidade
 * ============================================================ */
.aegis-skip-link {
  position: absolute;
  top: -100px;
  left: 16px;
  z-index: 9999;
  padding: 12px 20px;
  background: var(--aegis-cyan);
  color: var(--aegis-bg-deep);
  font-family: 'Geist Mono', monospace;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  text-decoration: none;
  border-radius: 8px;
  box-shadow: 0 8px 32px rgba(0, 229, 255, 0.5);
  transition: top 0.25s var(--aegis-ease);
}
.aegis-skip-link:focus,
.aegis-skip-link:focus-visible {
  top: 16px;
  outline: 2px solid var(--aegis-text);
  outline-offset: 2px;
}

/* ============================================================
 *  M5 — Geist font fallback chain
 *  Se @import do CDN falhar, system-ui assume com métricas similares
 * ============================================================ */
@font-face {
  font-family: 'Geist Sans Fallback';
  src: local('Inter'), local('SF Pro Text'), local('Segoe UI'), local('system-ui');
  size-adjust: 100%;
  ascent-override: 90%;
  descent-override: 22%;
  line-gap-override: 0%;
}
@font-face {
  font-family: 'Geist Mono Fallback';
  src: local('SF Mono'), local('Consolas'), local('Menlo'), local('Courier New');
  size-adjust: 100%;
}
/* Override de robustez: se Geist Sans/Mono não baixar, cai automaticamente */
.aegis-ui,
.aegis-ui *:not(.aegis-mono):not(.aegis-mono *) {
  font-family: 'Geist Sans', 'Geist Sans Fallback', 'Inter', 'SF Pro Text',
               'Segoe UI', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
}
.aegis-mono,
.aegis-mono * {
  font-family: 'Geist Mono', 'Geist Mono Fallback', 'JetBrains Mono',
               'SF Mono', 'Consolas', Menlo, monospace;
}

/* ============================================================
 *  M6 — Skeleton loading state (para uso futuro pelo JS)
 * ============================================================ */
.aegis-skeleton {
  position: relative;
  overflow: hidden;
  background: var(--aegis-glass-1);
  border-radius: 6px;
}
.aegis-skeleton::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(90deg,
    transparent 0%,
    rgba(0, 229, 255, 0.08) 50%,
    transparent 100%);
  animation: aegis-shimmer 1.4s linear infinite;
}
@keyframes aegis-shimmer {
  from { transform: translateX(-100%); }
  to   { transform: translateX(100%); }
}

/* Toasts globais (jarvis-final.js os cria) */
.aegis-toast { transition: opacity .4s var(--aegis-ease); }

