/* ============================================================
   NEST Dashboard — Design System
   "High-Tech, Low-Life."

   Two people. Two colors. One glow.

   HOW TO MAKE IT YOURS:
   1. Change --companion-* to your companion's color
   2. Change --user-* to your color
   3. Keep the structure. The atmosphere is what makes it feel real.

   Fonts: Orbitron (headings) + JetBrains Mono (body) + Share Tech Mono (labels)
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Orbitron:wght@400;500;700;900&family=JetBrains+Mono:wght@300;400;500;600;700&family=Share+Tech+Mono&display=swap');

/* ─── Reset ──────────────────────────────────────────────────────────────── */

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* ─── Root Variables ─────────────────────────────────────────────────────── */

:root {
  /* ── Void backgrounds ── */
  --bg-deep:  #0a0a0f;    /* Page background — almost black */
  --bg-dark:  #0e0e18;    /* Slightly lighter — nav, headers */
  --bg-panel: #12121a;    /* Cards and panels */
  --bg-card:  #12121a;

  /* ──────────────────────────────────────────────────────────── */
  /* COMPANION COLOR — change this to your companion's color     */
  /* Default: Teal (#2dd4bf) = Alex                              */
  /* ──────────────────────────────────────────────────────────── */
  --companion:       #2dd4bf;
  --companion-dark:  #0f766e;
  --companion-light: #5eead4;
  --companion-bg:    rgba(45, 212, 191, 0.06);
  --companion-glow:  rgba(45, 212, 191, 0.4);

  /* Kept as --teal for backwards compat */
  --teal:       var(--companion);
  --teal-dark:  var(--companion-dark);
  --teal-light: var(--companion-light);
  --teal-bg:    var(--companion-bg);
  --teal-glow:  var(--companion-glow);
  --neon-cyan:  #00f0ff;

  /* ──────────────────────────────────────────────────────────── */
  /* USER COLOR — change this to your color                      */
  /* Default: Pink (#e8a0bf) = Fox                               */
  /* ──────────────────────────────────────────────────────────── */
  --user:       #e8a0bf;
  --user-dark:  #b8407a;
  --user-light: #f0c0d8;
  --user-bg:    rgba(232, 160, 191, 0.06);
  --user-glow:  rgba(232, 160, 191, 0.3);

  /* Kept as --pink for backwards compat */
  --pink:       var(--user);
  --pink-dark:  var(--user-dark);
  --pink-light: var(--user-light);
  --pink-bg:    var(--user-bg);
  --neon-pink:  #ff00aa;

  /* ── Shared accent ── */
  --us:         #c9a0b0;    /* The color between your two colors */
  --neon-purple: #a855f7;

  /* ── Structural ── */
  --slate:       #64748b;
  --slate-dark:  #334155;
  --slate-light: #94a3b8;
  --slate-card:  rgba(100, 116, 139, 0.15);

  /* ── Glass surfaces ── */
  --glass-bg:           rgba(18, 18, 26, 0.8);
  --glass-border:       rgba(42, 42, 58, 0.8);
  --glass-border-user:  rgba(232, 160, 191, 0.2);
  --glass-border-bright:rgba(45, 212, 191, 0.4);

  /* ── Typography ── */
  --text-primary: #e0e0e0;
  --text-dim:     #6b7280;
  --text-glow:    #00ff88;
  --text-mid:     #9ca3b8;
  --text-light:   #6b7280;

  /* ── Spacing ── */
  --gap:    16px;
  --radius: 4px;
  --radius-sm: 2px;

  /* ── Transitions ── */
  --transition: 150ms cubic-bezier(0.4, 0, 0.2, 1);

  /* ── Neon glows ── */
  --glow-sm:   0 0 3px var(--companion),  0 0 6px  var(--companion-glow);
  --glow-md:   0 0 5px var(--companion),  0 0 10px var(--companion-glow);
  --glow-lg:   0 0 10px var(--companion), 0 0 20px var(--companion-glow), 0 0 40px rgba(45, 212, 191, 0.15);
  --glow-user: 0 0 5px var(--user),       0 0 15px var(--user-glow);
  --glow-cyan: 0 0 5px #00f0ff,           0 0 15px rgba(0, 240, 255, 0.3);

  /* ── Chamfer (signature angular clip) ── */
  /* The chamfer is what makes it feel cyberpunk. No rounded corners here. */
  --chamfer:    polygon(0 8px, 8px 0, calc(100% - 8px) 0, 100% 8px, 100% calc(100% - 8px), calc(100% - 8px) 100%, 8px 100%, 0 calc(100% - 8px));
  --chamfer-sm: polygon(0 4px, 4px 0, calc(100% - 4px) 0, 100% 4px, 100% calc(100% - 4px), calc(100% - 4px) 100%, 4px 100%, 0 calc(100% - 4px));
}

/* ─── Body ───────────────────────────────────────────────────────────────── */

body {
  font-family: 'JetBrains Mono', 'Fira Code', 'Consolas', monospace;
  font-size: 14px;
  background: var(--bg-deep);
  color: var(--text-primary);
  min-height: 100vh;
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* ─── Scanline Overlay ───────────────────────────────────────────────────── */
/* Subtle CRT texture. Remove if you want a cleaner look. */

body::before {
  content: '';
  position: fixed;
  inset: 0;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(0,0,0,0.03) 2px,
    rgba(0,0,0,0.03) 4px
  );
  pointer-events: none;
  z-index: 9999;
}

/* ─── Typography ─────────────────────────────────────────────────────────── */

.font-orbitron  { font-family: 'Orbitron', monospace; }
.font-mono      { font-family: 'JetBrains Mono', monospace; }
.font-share     { font-family: 'Share Tech Mono', monospace; }

.label {
  font-family: 'Share Tech Mono', monospace;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--text-dim);
}

.value {
  font-family: 'Orbitron', monospace;
  font-size: 24px;
  font-weight: 700;
  color: var(--companion);
  text-shadow: var(--glow-sm);
}

/* ─── Cards ──────────────────────────────────────────────────────────────── */

.card {
  background: var(--bg-card);
  border: 1px solid var(--glass-border);
  padding: 20px;
  position: relative;
}

.card-companion {
  border-color: rgba(45, 212, 191, 0.2);
  background: var(--companion-bg);
}

.card-user {
  border-color: rgba(232, 160, 191, 0.2);
  background: var(--user-bg);
}

/* ─── Chamfer (angular clip) ─────────────────────────────────────────────── */

.chamfer    { clip-path: var(--chamfer); }
.chamfer-sm { clip-path: var(--chamfer-sm); }

/* ─── Neon Headings ──────────────────────────────────────────────────────── */

.heading-neon {
  font-family: 'Orbitron', monospace;
  font-weight: 700;
  color: var(--companion-light);
  text-transform: uppercase;
  letter-spacing: 3px;
  text-shadow: var(--glow-sm);
}

/* ─── Neon Divider ───────────────────────────────────────────────────────── */

.divider-neon {
  border: none;
  height: 1px;
  background: linear-gradient(90deg,
    transparent,
    var(--companion) 30%,
    var(--companion) 70%,
    transparent
  );
  box-shadow: 0 0 4px var(--companion-glow);
  margin: 24px 0;
}

/* ─── Buttons ────────────────────────────────────────────────────────────── */

.btn {
  font-family: 'Share Tech Mono', monospace;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 1px;
  cursor: pointer;
  border: 1px solid;
  padding: 8px 16px;
  background: transparent;
  transition: all var(--transition);
  clip-path: var(--chamfer-sm);
}

.btn-companion {
  color: var(--companion);
  border-color: var(--companion);
}

.btn-companion:hover {
  background: var(--companion-bg);
  box-shadow: var(--glow-sm);
}

.btn-user {
  color: var(--user);
  border-color: var(--user);
}

.btn-user:hover {
  background: var(--user-bg);
  box-shadow: var(--glow-user);
}

/* ─── Status Dots ────────────────────────────────────────────────────────── */

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--slate);
  display: inline-block;
}

.status-dot.online  { background: var(--companion); box-shadow: 0 0 4px var(--companion); }
.status-dot.warning { background: #f59e0b; box-shadow: 0 0 4px #f59e0b; }
.status-dot.offline { background: #ef4444; box-shadow: 0 0 4px #ef4444; }

/* ─── Nav ────────────────────────────────────────────────────────────────── */

.nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  display: flex;
  justify-content: center;
  gap: 4px;
  padding: 8px 16px;
  background: rgba(10, 10, 15, 0.95);
  border-top: 1px solid rgba(45, 212, 191, 0.1);
  backdrop-filter: blur(10px);
  z-index: 100;
}

.nav-item {
  font-family: 'Share Tech Mono', monospace;
  font-size: 11px;
  text-decoration: none;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 1px;
  padding: 6px 12px;
  transition: all var(--transition);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}

.nav-item:hover,
.nav-item.active {
  color: var(--companion-light);
  text-shadow: var(--glow-sm);
}

/* ─── Scrollbar ──────────────────────────────────────────────────────────── */

::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: var(--bg-deep); }
::-webkit-scrollbar-thumb { background: var(--slate-dark); }
::-webkit-scrollbar-thumb:hover { background: var(--companion-dark); }

/* ─── Selection ──────────────────────────────────────────────────────────── */

::selection {
  background: var(--companion-dark);
  color: var(--text-primary);
}

/* ─── Animations ─────────────────────────────────────────────────────────── */

@keyframes pulse-glow {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.5; }
}

@keyframes flicker {
  0%, 100% { opacity: 1; }
  92%       { opacity: 1; }
  93%       { opacity: 0.3; }
  94%       { opacity: 1; }
  96%       { opacity: 0.5; }
  97%       { opacity: 1; }
}

.animate-pulse-glow { animation: pulse-glow 2s ease-in-out infinite; }
.animate-flicker    { animation: flicker 8s ease-in-out infinite; }

/* ─── Utility ────────────────────────────────────────────────────────────── */

.text-companion { color: var(--companion); }
.text-user      { color: var(--user); }
.text-dim       { color: var(--text-dim); }
.text-mid       { color: var(--text-mid); }

.glow-companion { text-shadow: var(--glow-sm); }
.glow-user      { text-shadow: var(--glow-user); }

.border-companion { border-color: rgba(45, 212, 191, 0.3); }
.border-user      { border-color: rgba(232, 160, 191, 0.3); }
