/* ============================================================
   DEEP VOID — Neuranum PCN Design System
   Charcoal Glassmorphism Edition
   Mobile-first, max-w-md centered layout
   ============================================================ */

/* Self-hosted fonts — no external requests */
@font-face {
  font-family: 'Space Grotesk';
  src: url('/static/fonts/SpaceGrotesk-Variable-latin.woff2') format('woff2');
  font-weight: 300 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'JetBrains Mono';
  src: url('/static/fonts/JetBrainsMono-Regular.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'JetBrains Mono';
  src: url('/static/fonts/JetBrainsMono-Medium.woff2') format('woff2');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'JetBrains Mono';
  src: url('/static/fonts/JetBrainsMono-Bold.woff2') format('woff2');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Syncopate';
  src: url('/static/fonts/Syncopate-Regular.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Syncopate';
  src: url('/static/fonts/Syncopate-Bold.woff2') format('woff2');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  /* --- Charcoal palette --- */
  --base-bg: #0C0C0E;
  --surface: rgba(255, 255, 255, 0.04);
  --surface-hover: rgba(255, 255, 255, 0.07);
  --surface-active: rgba(255, 255, 255, 0.10);
  --surface-solid: #161618;
  --surface-elevated: rgba(255, 255, 255, 0.06);

  /* --- Borders --- */
  --border: rgba(255, 255, 255, 0.06);
  --border-hover: rgba(255, 255, 255, 0.12);
  --border-active: rgba(255, 255, 255, 0.18);
  --border-glow: rgba(255, 255, 255, 0.08);

  /* --- Text --- */
  --text-primary: #E8E8ED;
  --text-secondary: #8E8E93;
  --text-muted: #636366;
  --text-dim: #48484A;

  /* --- Status --- */
  --status-protected: #34d399;
  --status-connecting: #60a5fa;
  --status-attention: #FF6178;
  --status-risk: #fb7185;
  --status-neutral: #94a3b8;

  /* --- Accent (monochrome) --- */
  --accent: #ffffff;
  --accent-hover: #e4e4e7;
  --accent-dim: rgba(255, 255, 255, 0.06);
  --danger: #fb7185;
  --emerald-600: rgba(255, 255, 255, 0.25);

  /* --- Glow --- */
  --glow-white: rgba(255, 255, 255, 0.04);
  --glow-white-strong: rgba(255, 255, 255, 0.08);
  --glow-accent: rgba(255, 255, 255, 0.04);

  /* --- Fonts --- */
  --font-sans: 'Space Grotesk', ui-sans-serif, system-ui, -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, monospace;
  --font-brand: 'Syncopate', sans-serif;

  /* --- Radius --- */
  --radius-sm: 10px;
  --radius-md: 14px;
  --radius-lg: 18px;
  --radius-xl: 22px;
  --radius-2xl: 28px;
  --radius-full: 9999px;

  /* --- Glass (charcoal solid gradient style) --- */
  --glass-blur: blur(40px);
  --glass-blur-heavy: blur(60px);
  --glass-bg: linear-gradient(145deg, rgba(255,255,255,0.08) 0%, rgba(255,255,255,0.02) 100%);
  --glass-bg-flat: rgba(255, 255, 255, 0.06);
  --glass-bg-hover-flat: rgba(255, 255, 255, 0.09);
  --glass-border: rgba(255, 255, 255, 0.13);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  background-color: var(--base-bg);
  color: var(--text-primary);
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  line-height: 1.6;
  overflow-x: hidden;
  position: relative;
}

/* --- Noise grain overlay --- */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 9999;
  pointer-events: none;
  opacity: 0.04;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: 256px 256px;
}

a { color: var(--accent); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--accent-hover); }

::-webkit-scrollbar { display: none; }
* { -ms-overflow-style: none; scrollbar-width: none; }

/* --- App Shell --- */
.app-shell {
  min-height: 100vh;
  min-height: 100dvh;
  overflow: hidden;
  position: relative;
}

.page-content {
  display: flex;
  flex-direction: column;
  height: 100vh;
  height: 100dvh;
  padding: 48px 24px 96px;
  max-width: 448px;
  margin: 0 auto;
  overflow-y: auto;
}

/* ============================================================
   BOTTOM NAVIGATION — Frosted glass pill
   ============================================================ */
/* Modern mobile menu — InteractiveMenu port */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 50;
  padding: 8px 16px 24px;
  pointer-events: none;
}

.menu {
  --component-active-color: #ffffff;
  --component-inactive-color: rgba(255, 255, 255, 0.3);
  --component-bg: rgba(20, 20, 22, 0.95);
  max-width: 420px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-around;
  background: var(--component-bg);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-radius: 18px;
  padding: 8px 12px;
  pointer-events: auto;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.4);
}

.menu__item {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 6px;
  padding: 10px 12px;
  background: none;
  border: none;
  cursor: pointer;
  position: relative;
  color: var(--component-inactive-color);
}

.menu__item.active {
  color: var(--component-active-color);
}

/* Icon — fixed size, never moves */
.menu__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  flex-shrink: 0;
}

.menu__icon svg {
  width: 24px;
  height: 24px;
  stroke-width: 1.5;
}

.menu__item.active .menu__icon svg {
  stroke-width: 2;
}

/* Text — slides in via max-width, only transition that exists */
.menu__text {
  font-size: 11px;
  text-transform: capitalize;
  font-weight: 600;
  display: block;
  overflow: hidden;
  white-space: nowrap;
  max-width: 0;
  opacity: 0;
  transition: max-width 0.3s ease, opacity 0.2s ease;
}

.menu__text.active {
  max-width: 80px;
  opacity: 1;
}


/* ============================================================
   SECTION HEADERS
   ============================================================ */
.section-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-bottom: 12px;
}

/* ============================================================
   CARDS — Glassmorphism
   ============================================================ */
.card {
  background: radial-gradient(ellipse at 20% 20%, #2a2a30 0%, #1a1a1e 40%, #141416 100%);
  border: none;
  border-radius: var(--radius-xl);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: none;
  position: relative;
}
.card:hover {
  background: radial-gradient(ellipse at 20% 20%, #2e2e35 0%, #1c1c20 40%, #161618 100%);
}
.card-static:hover {
  background: radial-gradient(ellipse at 20% 20%, #2a2a30 0%, #1a1a1e 40%, #141416 100%);
}

.card-padded { padding: 20px 16px; }

.card-divided > * { border-bottom: 1px solid rgba(255,255,255,0.04); }
.card-divided > *:last-child { border-bottom: none; }

/* Card header (admin) */
.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid rgba(255,255,255,0.04);
}
.card-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
}

/* ============================================================
   SHIELD / STATUS ICON
   ============================================================ */
.shield-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  margin-top: 16px;
  margin-bottom: auto;
}

.shield-icon {
  margin-bottom: 16px;
  transition: color 0.3s;
}
.shield-icon svg { width: 48px; height: 48px; stroke-width: 1.5; }

.shield-icon.protected { }
.shield-icon.neutral { }
.shield-icon.failed { }
.shield-icon.connecting { opacity: 0.5; }

.shield-icon.pulse svg {
  animation: shield-pulse 1.5s ease-in-out infinite;
}

@keyframes shield-pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}

.status-title {
  font-size: 30px;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin-bottom: 8px;
}

.status-subtitle {
  font-size: 14px;
  color: var(--text-secondary);
  white-space: pre-line;
  line-height: 1.5;
}

/* ============================================================
   PRIMARY ACTION BUTTON — Charcoal glass with glow
   ============================================================ */
.action-btn-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin: 32px 0;
  position: relative;
}

.action-btn-glow {
  position: absolute;
  inset: -8px;
  border-radius: var(--radius-full);
  background: radial-gradient(ellipse, rgba(255, 255, 255, 0.06) 0%, transparent 70%);
  filter: blur(16px);
  pointer-events: none;
  animation: glow-pulse 4s ease-in-out infinite;
}

@keyframes glow-pulse {
  0%, 100% { opacity: 0.3; }
  50% { opacity: 1; }
}

.action-btn {
  position: relative;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 16px 36px;
  border-radius: var(--radius-full);
  border: none;
  font-size: 15px;
  font-weight: 600;
  font-family: var(--font-sans);
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  background: linear-gradient(180deg, #1d1d22 0%, #16161a 100%);
}

.action-btn:active { transform: scale(0.97); }

.action-btn.protected {
  background: linear-gradient(180deg, #1d1d22 0%, #16161a 100%);
  color: white;
}
.action-btn.protected:hover {
  background: radial-gradient(ellipse at 20% 20%, #2e2e35 0%, #1e1e22 40%, #18181b 100%);
}
.action-btn.protected svg { color: #ffffff; filter: drop-shadow(0 0 8px rgba(255, 255, 255, 0.25)); }

.action-btn.neutral {
  background: linear-gradient(165deg, #1e1e22 0%, #141416 100%);
  color: var(--text-secondary);
}
.action-btn.neutral:hover {
  background: linear-gradient(165deg, #242428 0%, #18181b 100%);
}

.action-btn.failed {
  background: linear-gradient(165deg, #1e1418 0%, #141214 100%);
  color: var(--status-risk);
}
.action-btn.failed:hover {
  background: linear-gradient(165deg, #241a1e 0%, #181416 100%);
}

.action-btn:disabled {
  background: #141416;
  color: var(--text-muted);
  cursor: not-allowed;
  box-shadow: none;
}

.spinner {
  width: 20px;
  height: 20px;
  border: 2px solid rgba(255, 255, 255, 0.1);
  border-top-color: rgba(255, 255, 255, 0.6);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* ============================================================
   PRIVACY POSTURE CARD
   ============================================================ */
.posture-card {
  padding: 20px;
  background: radial-gradient(ellipse at 20% 20%, #2a2a30 0%, #1a1a1e 40%, #141416 100%) !important;
}

.posture-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.posture-label {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-primary);
}

.posture-value {
  font-size: 14px;
  font-weight: 500;
}
.posture-value.strong { color: rgba(255, 255, 255, 0.7); text-shadow: 0 0 12px rgba(255, 255, 255, 0.15); }
.posture-value.exposed { color: rgba(255, 97, 120, 0.9); text-shadow: 0 0 12px rgba(255, 97, 120, 0.2); }
.posture-value.compromised { color: rgba(251, 113, 133, 0.9); text-shadow: 0 0 12px rgba(251, 113, 133, 0.2); }

.status-chips {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.status-chip {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 500;
  padding: 10px 12px;
  border-radius: var(--radius-md);
  background: #131315;
  border: none;
  color: var(--text-muted);
  pointer-events: none;
  user-select: none;
  cursor: default;
}

.status-chip.full-width {
  grid-column: 1 / -1;
}

.chip-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
}
.chip-dot.on { background: rgba(255, 255, 255, 0.7); box-shadow: 0 0 8px rgba(255, 255, 255, 0.3); }
.chip-dot.on.blue { background: #5A8CEF; box-shadow: 0 0 8px rgba(90, 140, 239, 0.4); }
.chip-dot.on.green { background: #4B7A63; box-shadow: 0 0 8px rgba(75, 122, 99, 0.4); }
.chip-dot.danger { background: #FF6178; box-shadow: 0 0 8px rgba(255, 97, 120, 0.4); }
.chip-dot.off { background: var(--text-dim); }

/* ============================================================
   ROUTE CARD
   ============================================================ */
.route-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 18px;
  cursor: pointer;
  width: 100%;
  background: #151517;
  border: none;
  border-radius: var(--radius-xl);
  text-align: left;
  font-family: var(--font-sans);
  color: var(--text-primary);
  transition: background 0.2s;
}
.route-card:hover {
  background: #1a1a1e;
}
.route-card:active { transform: none; }

.route-left {
  display: flex;
  align-items: center;
  gap: 14px;
}

.route-icon { color: var(--text-secondary); }

.route-city {
  font-size: 14px;
  font-weight: 500;
}

.route-note {
  font-size: 12px;
  color: var(--text-secondary);
  margin-top: 2px;
  text-transform: capitalize;
}

.route-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.route-latency {
  font-size: 14px;
  font-family: var(--font-mono);
  color: var(--text-secondary);
}

.route-chevron { color: var(--text-dim); transition: color 0.2s; }
.route-card:hover .route-chevron { color: var(--text-secondary); }

/* ============================================================
   LOCATION LIST
   ============================================================ */
.search-container {
  position: relative;
  margin-bottom: 24px;
}

.search-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-dim);
}

.search-input {
  width: 100%;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-full);
  padding: 12px 16px 12px 42px;
  font-size: 14px;
  color: var(--text-primary);
  font-family: var(--font-sans);
  outline: none;
  transition: all 0.3s;
}
.search-input::placeholder { color: var(--text-dim); }
.search-input:focus {
  border-color: rgba(255, 255, 255, 0.14);
}

.location-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 16px 18px;
  border-radius: var(--radius-xl);
  border: none;
  background: #151517;
  cursor: pointer;
  text-align: left;
  font-family: var(--font-sans);
  color: var(--text-primary);
  transition: background 0.2s;
  margin-bottom: 8px;
}
.location-item:hover {
  background: #1a1a1e;
}
.location-item.active {
  background: #1c1c20;
}

.location-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.location-icon-wrap {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: #1a1a1f;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
}

.location-city {
  font-size: 14px;
  font-weight: 500;
}

.location-note {
  font-size: 12px;
  color: var(--text-secondary);
  margin-top: 2px;
}

.location-right { text-align: right; }

.location-latency {
  font-size: 14px;
  font-family: var(--font-mono);
  color: var(--text-secondary);
}

.location-active-label {
  font-size: 10px;
  font-weight: 500;
  color: #ffffff;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-top: 4px;
  text-shadow: 0 0 8px rgba(255, 255, 255, 0.2);
}

/* ============================================================
   ACTIVITY TIMELINE
   ============================================================ */
.filter-pills {
  display: flex;
  gap: 6px;
  margin-bottom: 32px;
  overflow-x: auto;
  padding-bottom: 8px;
}

.filter-pill {
  padding: 6px 14px;
  border-radius: var(--radius-full);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  white-space: nowrap;
  cursor: pointer;
  border: none;
  background: radial-gradient(ellipse at 20% 20%, #2a2a30 0%, #1a1a1e 40%, #141416 100%);
  color: var(--text-secondary);
  font-family: var(--font-sans);
  transition: all 0.3s;
}
.filter-pill:hover {
  color: var(--text-primary);
  background: radial-gradient(ellipse at 20% 20%, #2e2e35 0%, #1c1c20 40%, #161618 100%);
}
.filter-pill.active {
  background: radial-gradient(ellipse at 25% 15%, #32323a 0%, #222228 40%, #1a1a1e 100%);
  color: #ffffff;
}

.timeline {
  position: relative;
  border-left: 1px solid rgba(255,255,255,0.04);
  margin-left: 16px;
  padding-bottom: 16px;
}

.timeline-item {
  position: relative;
  padding-left: 24px;
  margin-bottom: 24px;
}

.timeline-dot {
  position: absolute;
  left: -17px;
  top: 2px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: radial-gradient(ellipse at 20% 20%, #2a2a30 0%, #1a1a1e 40%, #141416 100%);
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.timeline-time {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-bottom: 4px;
}

.timeline-desc {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* ============================================================
   SETTINGS — Toggle rows
   ============================================================ */
.settings-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
}

.settings-row-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  width: 100%;
  background: none;
  border: none;
  cursor: pointer;
  text-align: left;
  font-family: var(--font-sans);
  color: var(--text-primary);
  transition: all 0.2s;
  border-radius: 0;
}
.settings-row-btn:hover { background: rgba(255, 255, 255, 0.04); }
.card-divided > .settings-row-btn:first-child { border-radius: var(--radius-xl) var(--radius-xl) 0 0; }
.card-divided > .settings-row-btn:last-child { border-radius: 0 0 var(--radius-xl) var(--radius-xl); }

.settings-title {
  font-size: 14px;
  font-weight: 500;
}

.settings-desc {
  font-size: 12px;
  color: var(--text-secondary);
  margin-top: 2px;
}

.settings-danger .settings-title { color: var(--status-risk); }
.settings-danger .settings-desc { color: rgba(251, 113, 133, 0.7); }
.settings-danger:hover { background: rgba(251, 113, 133, 0.06) !important; }

/* Toggle switch */
.toggle {
  position: relative;
  width: 44px;
  height: 24px;
  border-radius: var(--radius-full);
  background: #1e1e22;
  cursor: pointer;
  border: none;
  padding: 0;
  transition: all 0.3s;
  flex-shrink: 0;
}
.toggle.on {
  background: #5A8CEF;
}

.toggle-knob {
  position: absolute;
  top: 4px;
  left: 4px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: white;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.toggle.on .toggle-knob { transform: translateX(20px); }

/* ============================================================
   PROTOCOL TABS
   ============================================================ */
.protocol-tabs {
  display: flex;
  gap: 4px;
  padding: 4px;
  background: #141416;
  border-radius: var(--radius-md);
  border: none;
  margin-bottom: 16px;
  overflow-x: auto;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.protocol-tab {
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 500;
  color: var(--text-muted);
  cursor: pointer;
  border: none;
  background: transparent;
  font-family: var(--font-sans);
  white-space: nowrap;
  transition: all 0.2s;
}
.protocol-tab:hover { color: var(--text-primary); background: rgba(255, 255, 255, 0.05); }
.protocol-tab.active {
  color: var(--base-bg);
  background: rgba(255, 255, 255, 0.90);
}

/* Code/config blocks */
.code-block {
  background: #0e0e10;
  border: none;
  border-radius: var(--radius-md);
  padding: 16px;
  font-family: var(--font-mono);
  font-size: 12px;
  overflow-x: auto;
  white-space: pre;
  color: var(--text-secondary);
  position: relative;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

/* ============================================================
   BUTTONS — Charcoal glass
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 22px;
  border: none;
  border-radius: var(--radius-full);
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}
.btn:active { transform: scale(0.97); }

.btn-primary {
  background: radial-gradient(ellipse at 25% 15%, #32323a 0%, #222228 40%, #1a1a1e 100%);
  color: #ffffff;
  border: none;
}
.btn-primary:hover {
  background: radial-gradient(ellipse at 25% 15%, #363640 0%, #262630 40%, #1e1e22 100%);
  transform: translateY(-2px);
}

.btn-danger {
  background: rgba(251, 113, 133, 0.12);
  color: var(--danger);
  border: none;
}
.btn-danger:hover {
  background: rgba(251, 113, 133, 0.20);
}

.btn-ghost {
  background: radial-gradient(ellipse at 20% 20%, #2a2a30 0%, #1a1a1e 40%, #141416 100%);
  color: var(--text-secondary);
  border: none;
}
.btn-ghost:hover {
  background: radial-gradient(ellipse at 20% 20%, #2e2e35 0%, #1c1c20 40%, #161618 100%);
  color: var(--text-primary);
}

.btn-sm { padding: 6px 16px; font-size: 13px; border-radius: var(--radius-full); }
.btn-lg { padding: 14px 36px; font-size: 16px; border-radius: var(--radius-full); }
.btn:disabled { opacity: 0.4; cursor: not-allowed; transform: none; box-shadow: none; }

/* ============================================================
   INPUTS — Charcoal glass
   ============================================================ */
.input {
  width: 100%;
  padding: 10px 14px;
  background: radial-gradient(ellipse at 20% 20%, #2a2a30 0%, #1a1a1e 40%, #141416 100%);
  border: none;
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 14px;
  outline: none;
  transition: all 0.3s;
}
.input:focus {
  background: radial-gradient(ellipse at 20% 20%, #2e2e35 0%, #1c1c20 40%, #161618 100%);
}
.input::placeholder { color: var(--text-muted); }

select.input {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23636366' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 32px;
}

/* ============================================================
   BADGES — Glass
   ============================================================ */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  font-size: 12px;
  font-weight: 600;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.badge-active { background: rgba(255, 255, 255, 0.10); color: #ffffff; }
.badge-error { background: rgba(251, 113, 133, 0.12); color: var(--status-risk); }
.badge-pending { background: rgba(251, 191, 36, 0.12); color: var(--status-attention); }
.badge-neutral { background: rgba(148, 163, 184, 0.12); color: var(--status-neutral); }

/* ============================================================
   MODAL — Glass overlay
   ============================================================ */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
}
.modal-overlay.active { opacity: 1; pointer-events: all; }

.modal {
  background: linear-gradient(180deg, #1a1a1f 0%, #141416 100%);
  border: none;
  border-radius: var(--radius-2xl);
  padding: 32px;
  max-width: 400px;
  width: 90%;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.06);
}
.modal-title { font-size: 18px; font-weight: 600; margin-bottom: 16px; }

/* ============================================================
   TABLES — Charcoal glass
   ============================================================ */
.table { width: 100%; border-collapse: collapse; }
.table th {
  text-align: left;
  padding: 12px 16px;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  border-bottom: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.02);
}
.table td {
  padding: 12px 16px;
  font-size: 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.03);
  color: var(--text-secondary);
}
.table tr:hover td {
  background: rgba(255, 255, 255, 0.03);
}
.table tr:last-child td { border-bottom: none; }

/* ============================================================
   TOAST
   ============================================================ */
@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

/* ============================================================
   TOP NAV — Glass
   ============================================================ */
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 0;
  border-bottom: none;
}
.nav-brand {
  font-family: var(--font-brand);
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: 0.05em;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  text-decoration: none;
}
.nav-links { display: flex; gap: 24px; list-style: none; align-items: center; }
.nav-links a {
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 500;
  transition: color 0.2s;
}
.nav-links a:hover, .nav-links a.active { color: var(--text-primary); }

/* ============================================================
   UTILITIES
   ============================================================ */
.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.text-center { text-align: center; }
.text-sm { font-size: 14px; }
.text-xs { font-size: 12px; }
.text-muted { color: var(--text-muted); }
.text-secondary { color: var(--text-secondary); }
.text-accent { color: var(--accent); }
.font-mono { font-family: var(--font-mono); }
.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mt-4 { margin-top: 32px; }
.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }
.gap-2 { gap: 16px; }
.space-y-2 > * + * { margin-top: 8px; }
.space-y-4 > * + * { margin-top: 16px; }
.space-y-6 > * + * { margin-top: 24px; }
.space-y-8 > * + * { margin-top: 32px; }
.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.hidden { display: none; }
.grid { display: grid; gap: 16px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.mt-auto { margin-top: auto; }

.page-title {
  font-size: 24px;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin-bottom: 16px;
}

.page-subtitle {
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 24px;
}

/* ============================================================
   LANDING — Hero, Features, Pricing
   ============================================================ */
.hero { text-align: center; padding: 120px 0 80px; }
.hero h1 {
  font-size: 48px;
  font-weight: 700;
  line-height: 1.1;
  max-width: 700px;
  margin: 0 auto 24px;
  letter-spacing: -0.03em;
}
.hero h1 span { color: var(--accent); text-shadow: 0 0 40px rgba(52, 211, 153, 0.15); }
.hero p {
  font-size: 18px;
  color: var(--text-secondary);
  max-width: 560px;
  margin: 0 auto 40px;
  line-height: 1.7;
}

.footer {
  border-top: none;
  padding: 40px 0;
  text-align: center;
  color: var(--text-muted);
  font-size: 14px;
}

/* ============================================================
   QR CONTAINER
   ============================================================ */
.qr-container {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: white;
  border-radius: var(--radius-lg);
  width: fit-content;
  margin: 16px auto;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (min-width: 769px) {
  .bottom-nav { display: none; }
  .page-content { padding-bottom: 32px; }
}
@media (max-width: 768px) {
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .container { padding: 0 24px; }
}
@media (max-width: 480px) {
  .container { padding: 0 20px; }
}
@media (max-width: 640px) {
  .hero h1 { font-size: 32px; }
  .hero p { font-size: 16px; }
}

/* ============================================================
   AMBIENT GLOW ANIMATION (for backgrounds)
   ============================================================ */
@keyframes ambient-drift {
  0%, 100% { transform: translate(0, 0) scale(1); opacity: 0.3; }
  33% { transform: translate(30px, -20px) scale(1.1); opacity: 0.5; }
  66% { transform: translate(-20px, 15px) scale(0.95); opacity: 0.35; }
}
