/* NOVA — shared holographic system for the console, login and settings pages. */

:root {
  --void: #02060c;
  --deep: #061120;
  --panel: rgba(10, 26, 44, 0.55);
  --panel-solid: #08172a;
  --edge: rgba(120, 220, 255, 0.16);
  --edge-strong: rgba(120, 220, 255, 0.38);
  --text: #e6f6ff;
  --soft: #a4c3d6;
  --muted: #6f8ea3;

  --holo: #45e6ff;      /* listening, primary */
  --think: #9b8cff;     /* thinking */
  --work: #ffb84d;      /* working on a task */
  --speak: #d3f8ff;     /* speaking */
  --ok: #5ef2b0;
  --danger: #ff6b7d;

  --hue: var(--holo);
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --radius: 4px;
  font-synthesis: none;
}

* { box-sizing: border-box; }
html { color-scheme: dark; }
html, body { height: 100%; }
body {
  margin: 0;
  color: var(--text);
  font-family: "Readex Pro", system-ui, sans-serif;
  font-weight: 350;
  font-feature-settings: "tnum" 1;
  background:
    radial-gradient(120% 80% at 70% 0%, #0b2340 0%, transparent 55%),
    radial-gradient(90% 70% at 10% 100%, #0a1b33 0%, transparent 60%),
    var(--void);
  -webkit-font-smoothing: antialiased;
}

/* hairline hex grid over the field */
body::before {
  content: "";
  position: fixed; inset: 0; z-index: 0; pointer-events: none; opacity: .5;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='42' height='72.75' viewBox='0 0 42 72.75'%3E%3Cpath d='M21 0 L42 12.12 L42 36.37 L21 48.5 L0 36.37 L0 12.12 Z M21 48.5 L21 72.75' fill='none' stroke='%236ed2ff' stroke-opacity='.16' stroke-width='.6'/%3E%3C/svg%3E");
  background-size: 42px 72.75px;
  mask-image: radial-gradient(ellipse at 60% 40%, #000 0%, transparent 75%);
}
/* drifting particle field, drawn by hud.js */
.field { position: fixed; inset: 0; z-index: 0; pointer-events: none; width: 100%; height: 100%; }

::selection { background: rgba(69, 230, 255, 0.28); color: #fff; }
input, textarea { caret-color: var(--holo); }
:focus-visible { outline: 2px solid var(--holo); outline-offset: 3px; border-radius: 8px; }
* { scrollbar-width: thin; scrollbar-color: rgba(120, 220, 255, 0.25) transparent; }
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-thumb { background: rgba(120, 220, 255, 0.22); border-radius: 8px; }
::-webkit-scrollbar-track { background: transparent; }
a { color: var(--holo); text-underline-offset: 3px; }

/* ---------------------------------------------------------------- wordmark */
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: inherit; }
.brand-mark { width: 30px; height: 30px; flex: none; }
.brand-mark circle { fill: none; stroke: var(--holo); }
.brand-name { display: flex; flex-direction: column; line-height: 1.05; }
.brand-name b { font-size: 19px; font-weight: 600; letter-spacing: 0; }
.brand-name small { font-size: 11px; letter-spacing: 0.42em; color: var(--holo); font-weight: 500; direction: ltr; text-align: right; }

/* ---------------------------------------------------------------- chips & buttons */
.chip {
  display: inline-flex; align-items: center; gap: 8px;
  font: inherit; font-size: 13px; font-weight: 400; color: var(--soft);
  padding: 8px 14px; border-radius: 999px; cursor: pointer; text-decoration: none;
  background: rgba(8, 24, 42, 0.6); border: 1px solid var(--edge);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  transition: color .2s var(--ease), border-color .2s var(--ease), box-shadow .3s var(--ease), background .2s;
}
.chip:hover { color: var(--text); border-color: var(--edge-strong); box-shadow: 0 0 18px -6px var(--holo); }
.chip svg { width: 16px; height: 16px; stroke: currentColor; fill: none; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.chip.on { color: var(--work); border-color: color-mix(in srgb, var(--work) 50%, transparent); }
.chip.danger { color: var(--danger); border-color: color-mix(in srgb, var(--danger) 40%, transparent); }
.chip.danger:hover { box-shadow: 0 0 18px -6px var(--danger); }

.btn {
  font: inherit; font-size: 14.5px; font-weight: 500; letter-spacing: 0.01em;
  padding: 12px 20px; border-radius: 12px; cursor: pointer; text-decoration: none; display: inline-flex;
  align-items: center; justify-content: center; gap: 8px;
  color: #001018; background: linear-gradient(180deg, #7cf0ff, var(--holo));
  border: 0; box-shadow: 0 8px 24px -10px rgba(69, 230, 255, 0.8), inset 0 1px 0 rgba(255, 255, 255, 0.5);
  transition: transform .15s var(--ease), box-shadow .3s var(--ease), filter .2s;
}
.btn:hover { box-shadow: 0 10px 34px -8px rgba(69, 230, 255, 0.95), inset 0 1px 0 rgba(255, 255, 255, 0.6); }
.btn:active { transform: translateY(1px) scale(0.99); }
.btn:disabled { background: rgba(69, 230, 255, 0.14); color: rgba(198, 244, 255, 0.45); cursor: default; box-shadow: none; }
.btn.secondary { color: var(--text); background: rgba(10, 30, 50, 0.6); border: 1px solid var(--edge-strong);
                 box-shadow: none; }
.btn.secondary:hover { box-shadow: 0 0 20px -8px var(--holo); }

/* ---------------------------------------------------------------- HUD panel with corner brackets */
.hud-panel {
  position: relative;
  background: var(--panel);
  border: 1px solid var(--edge);
  border-radius: var(--radius);
  outline: 1px solid rgba(120, 220, 255, 0.05); outline-offset: -6px;   /* hairline inner frame */
  backdrop-filter: blur(16px) saturate(1.2); -webkit-backdrop-filter: blur(16px) saturate(1.2);
  box-shadow: 0 30px 60px -30px rgba(0, 0, 0, 0.8), inset 0 1px 0 rgba(160, 235, 255, 0.07);
}
/* sharp L-brackets: ::before draws the top pair, ::after the bottom pair */
.hud-panel::before, .hud-panel::after {
  content: ""; position: absolute; left: -1px; right: -1px; height: 14px; pointer-events: none; opacity: .9;
  --b: linear-gradient(var(--holo), var(--holo));
}
.hud-panel::before { top: -1px;
  background: var(--b) left top / 14px 2px no-repeat, var(--b) left top / 2px 14px no-repeat,
              var(--b) right top / 14px 2px no-repeat, var(--b) right top / 2px 14px no-repeat; }
.hud-panel::after { bottom: -1px;
  background: var(--b) left bottom / 14px 2px no-repeat, var(--b) left bottom / 2px 14px no-repeat,
              var(--b) right bottom / 14px 2px no-repeat, var(--b) right bottom / 2px 14px no-repeat; }

/* ---------------------------------------------------------------- inputs */
.field-input {
  width: 100%; font: inherit; font-size: 15px; color: var(--text);
  padding: 12px 14px; border-radius: 12px; outline: none;
  background: rgba(2, 10, 20, 0.7); border: 1px solid var(--edge);
  transition: border-color .2s var(--ease), box-shadow .3s var(--ease);
}
.field-input::placeholder { color: var(--muted); }
.field-input:focus { border-color: var(--holo); box-shadow: 0 0 0 4px rgba(69, 230, 255, 0.12), 0 0 26px -10px var(--holo); }

/* ---------------------------------------------------------------- status dot (static: nothing here is live data) */
.pulse-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--ok); flex: none; }

/* ---------------------------------------------------------------- phones */
html { -webkit-text-size-adjust: 100%; }
@media (max-width: 860px) {
  /* iOS zooms the whole page into any field under 16px */
  input, textarea, select, .field-input { font-size: 16px !important; }
  .chip { min-height: 40px; }
  .btn { min-height: 46px; }
}
@media (hover: none) {
  /* no sticky hover glow after a tap */
  .chip:hover, .btn:hover, .btn.secondary:hover { box-shadow: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.12s !important; }
}
