/* ============================================================
   SteveCo AI Agent Platform - Dark PCB Infrastructure Theme
   ============================================================ */

:root {
  --bg: #0f1117;
  --bg-deep: #0a0c11;
  --surface: #161922;
  --surface-2: #1c2030;
  --surface-3: #222739;
  --fg: #e4e7ef;
  --fg-dim: #a8aecc;
  --muted: #7a8094;
  --border: #252937;
  --border-bright: #3a3f5c;
  --accent: #00d4ff;
  --accent-glow: rgba(0, 212, 255, 0.4);
  --accent-dim: rgba(0, 212, 255, 0.12);
  --accent-2: #6366f1;
  --accent-2-glow: rgba(99, 102, 241, 0.3);
  --danger: #ff5566;
  --danger-dim: rgba(255, 85, 102, 0.15);
  --success: #00ff88;
  --success-dim: rgba(0, 255, 136, 0.12);
  --warning: #ffaa00;
  --warning-dim: rgba(255, 170, 0, 0.12);
  --radius: 8px;
  --radius-sm: 4px;
  --radius-lg: 14px;
  --transition: 200ms cubic-bezier(0.2, 0, 0, 1);
  --font-mono: 'SF Mono', 'Cascadia Code', 'Fira Code', 'Consolas', monospace;
  --font-sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
}

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

html { font-size: 15px; scroll-behavior: smooth; }

body {
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--fg);
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* PCB circuit trace background pattern */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(0, 212, 255, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 212, 255, 0.025) 1px, transparent 1px);
  background-size: 40px 40px;
  pointer-events: none;
  z-index: 0;
}

body::after {
  content: '';
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse at 20% 0%, rgba(0, 212, 255, 0.06), transparent 50%),
    radial-gradient(ellipse at 80% 100%, rgba(99, 102, 241, 0.05), transparent 50%);
  pointer-events: none;
  z-index: 0;
}

/* ============================================================
   Ambient Background Decorations
   ============================================================ */

.ambient-glow {
  position: fixed;
  pointer-events: none;
  z-index: 0;
  border-radius: 50%;
  filter: blur(80px);
}

.ambient-glow-tl {
  top: -150px;
  left: -150px;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(0, 212, 255, 0.08), transparent 70%);
  animation: ambientPulseTL 8s ease-in-out infinite;
}

.ambient-glow-br {
  bottom: -200px;
  right: -200px;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(99, 102, 241, 0.06), transparent 70%);
  animation: ambientPulseBR 10s ease-in-out infinite;
}

@keyframes ambientPulseTL {
  0%, 100% { opacity: 0.4; transform: scale(1); }
  50% { opacity: 0.7; transform: scale(1.1); }
}

@keyframes ambientPulseBR {
  0%, 100% { opacity: 0.3; transform: scale(1); }
  50% { opacity: 0.6; transform: scale(1.15); }
}

/* Subtle starfield — CSS box-shadow dots */
.ambient-stars {
  position: fixed;
  top: 0;
  left: 0;
  width: 1px;
  height: 1px;
  z-index: 0;
  pointer-events: none;
  box-shadow:
    120px 80px rgba(0, 212, 255, 0.3),
    340px 200px rgba(255, 255, 255, 0.15),
    580px 50px rgba(0, 212, 255, 0.2),
    800px 300px rgba(255, 255, 255, 0.1),
    1100px 150px rgba(0, 212, 255, 0.25),
    250px 450px rgba(99, 102, 241, 0.2),
    670px 380px rgba(255, 255, 255, 0.12),
    950px 480px rgba(0, 212, 255, 0.18),
    150px 600px rgba(255, 255, 255, 0.1),
    420px 550px rgba(0, 212, 255, 0.15),
    720px 620px rgba(99, 102, 241, 0.15),
    1050px 580px rgba(255, 255, 255, 0.08),
    300px 700px rgba(0, 212, 255, 0.2),
    880px 720px rgba(255, 255, 255, 0.1),
    550px 750px rgba(0, 212, 255, 0.12),
    200px 850px rgba(99, 102, 241, 0.18),
    680px 880px rgba(0, 212, 255, 0.15),
    1000px 820px rgba(255, 255, 255, 0.08);
  animation: starsTwinkle 6s ease-in-out infinite;
}

@keyframes starsTwinkle {
  0%, 100% { opacity: 0.5; }
  50% { opacity: 0.9; }
}

/* ============================================================
   Top Bar / Navigation
   ============================================================ */

.topbar {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  height: 56px;
  background: rgba(15, 17, 23, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.topbar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--fg);
  text-decoration: none;
}

.topbar-brand svg { width: 22px; height: 22px; color: var(--accent); }

/* Pulsing hexagon logo */
.topbar-hex {
  width: 28px;
  height: 28px;
  flex-shrink: 0;
  filter: drop-shadow(0 0 4px rgba(0, 212, 255, 0.3));
}

.topbar-hex circle:last-child {
  animation: hexCorePulse 2.5s ease-in-out infinite;
  transform-origin: center;
  transform-box: fill-box;
}

@keyframes hexCorePulse {
  0%, 100% { opacity: 1; r: 3; }
  50% { opacity: 0.5; r: 2; }
}

.topbar-hex polygon:first-child {
  animation: hexSpin 8s linear infinite;
  transform-origin: center;
  transform-box: fill-box;
}

@keyframes hexSpin {
  0%, 100% { opacity: 0.8; }
  50% { opacity: 0.4; }
}

.topbar-brand-icon {
  display: none;
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 16px;
}

/* Breadcrumb */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--muted);
  letter-spacing: 0.02em;
}

.breadcrumb .crumb-current {
  color: var(--accent);
}

.breadcrumb-sep { color: var(--border-bright); }

/* Language selector */
.lang-selector-wrap {
  display: flex;
  align-items: center;
  gap: 6px;
}

.lang-selector-wrap svg { width: 14px; height: 14px; color: var(--muted); }

#lang-select,
#lang-selector {
  background: var(--surface);
  color: var(--fg-dim);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 5px 8px;
  font-family: var(--font-mono);
  font-size: 12px;
  cursor: pointer;
  outline: none;
  transition: border-color var(--transition);
}

#lang-select:hover,
#lang-selector:hover { border-color: var(--accent); }

#lang-select:focus-visible,
#lang-selector:focus-visible { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-dim); }

/* ============================================================
   Main container
   ============================================================ */

.app-container {
  position: relative;
  z-index: 1;
  max-width: 1200px;
  margin: 0 auto;
  padding: 24px 24px 100px;
  min-height: calc(100vh - 56px);
}

/* ============================================================
   Card system - SPA show/hide
   ============================================================ */

.card {
  display: none;
  animation: cardEnter 280ms cubic-bezier(0.2, 0, 0, 1);
}

.card:not(.hidden) {
  display: block;
}

@keyframes cardEnter {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Dashboard card — canvas is now fullscreen, card just holds content */
#dashboardCard {
  position: relative;
}

/* Dashboard canvas — fullscreen background */
.dash-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 0;
  pointer-events: auto;
}

/* Content sits above canvas, but lets mouse events pass through
   to canvas except on interactive elements */
.dash-content {
  position: relative;
  z-index: 1;
  pointer-events: none;
}

.dash-content .dash-grid,
.dash-content .account-section,
.dash-content .admin-nav,
.dash-content .theme-switcher {
  pointer-events: auto;
}

.theme-switcher {
  display: flex;
  gap: 8px;
  margin-bottom: 20px;
  pointer-events: auto;
}

.theme-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  height: 36px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: rgba(22, 25, 34, 0.85);
  color: var(--fg-dim);
  font-family: var(--font-mono);
  font-size: 12px;
  cursor: pointer;
  transition: all var(--transition);
  backdrop-filter: blur(8px);
}

.theme-btn:hover {
  border-color: var(--border-bright);
  color: var(--fg);
  background: rgba(28, 32, 48, 0.9);
}

.theme-btn.active {
  border-color: var(--accent);
  box-shadow: 0 0 12px rgba(0, 212, 255, 0.3);
  color: var(--fg);
}

.theme-btn svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.theme-btn.theme-forest.active { border-color: #5a8c5a; box-shadow: 0 0 12px rgba(90, 140, 90, 0.4); }
.theme-btn.theme-urban.active { border-color: #00d4ff; box-shadow: 0 0 12px rgba(0, 212, 255, 0.3); }
.theme-btn.theme-space.active { border-color: #ffdd44; box-shadow: 0 0 12px rgba(255, 221, 68, 0.4); }

/* ============================================================
   Auth Card
   ============================================================ */

.auth-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: calc(100vh - 120px);
  padding: 20px 0;
}

.auth-panel {
  width: 100%;
  max-width: 420px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 36px 32px;
  position: relative;
  overflow: hidden;
}

/* Corner trace decorations */
.auth-panel::before {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 60px; height: 60px;
  border-top: 2px solid var(--accent);
  border-left: 2px solid var(--accent);
  border-radius: var(--radius-lg) 0 0 0;
  opacity: 0.5;
}

.auth-panel::after {
  content: '';
  position: absolute;
  bottom: 0; right: 0;
  width: 60px; height: 60px;
  border-bottom: 2px solid var(--accent);
  border-right: 2px solid var(--accent);
  border-radius: 0 0 var(--radius-lg) 0;
  opacity: 0.5;
}

.auth-logo {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 28px;
}

/* Agent network graphic — living circuit traces */
.auth-network {
  width: 100%;
  max-width: 420px;
  margin: 0 auto 20px;
  display: flex;
  justify-content: center;
  align-items: center;
  pointer-events: none;
}

.auth-network-svg {
  width: 100%;
  max-height: 160px;
  height: auto;
  filter: drop-shadow(0 0 6px rgba(0, 212, 255, 0.15));
}

.auth-network-svg .net-node circle:last-child {
  filter: drop-shadow(0 0 4px rgba(0, 212, 255, 0.5));
}

.auth-logo-icon {
  width: 48px;
  height: 48px;
  margin-bottom: 12px;
  color: var(--accent);
}

.auth-logo h1 {
  font-family: var(--font-mono);
  font-size: 24px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.auth-logo p {
  font-size: 13px;
  color: var(--muted);
  margin-top: 4px;
  letter-spacing: 0.01em;
}

/* Form fields */
.field-group {
  margin-bottom: 16px;
}

.field-group label {
  display: block;
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--fg-dim);
  margin-bottom: 6px;
}

.field-input {
  width: 100%;
  background: var(--bg-deep);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  color: var(--fg);
  font-family: var(--font-sans);
  font-size: 14px;
  outline: none;
  transition: border-color var(--transition), box-shadow var(--transition);
}

.field-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-dim);
}

.field-input::placeholder { color: var(--muted); }

textarea.field-input {
  resize: vertical;
  min-height: 80px;
  font-family: var(--font-sans);
}

/* Auth mode toggle */
.auth-mode-toggle {
  text-align: center;
  margin-top: 16px;
  font-size: 13px;
  color: var(--muted);
}

#switchMode {
  color: var(--accent);
  text-decoration: none;
  font-weight: 500;
  cursor: pointer;
}

#switchMode:hover { text-decoration: underline; }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px;
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.04em;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  color: var(--fg);
  cursor: pointer;
  transition: all var(--transition);
  text-decoration: none;
  white-space: nowrap;
}

.btn:hover {
  border-color: var(--border-bright);
  background: var(--surface-3);
}

.btn:active { transform: scale(0.98); }

.btn-primary {
  background: var(--accent);
  border-color: var(--accent);
  color: #0a0c11;
  font-weight: 600;
}

.btn-primary:hover {
  background: #33ddff;
  border-color: #33ddff;
  box-shadow: 0 0 16px var(--accent-glow);
}

.btn-ghost {
  background: transparent;
  border-color: var(--border);
  color: var(--fg-dim);
}

.btn-ghost:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-dim);
}

.btn-danger {
  border-color: rgba(255, 85, 102, 0.3);
  color: var(--danger);
}

.btn-danger:hover {
  background: var(--danger-dim);
  border-color: var(--danger);
}

.btn-sm {
  padding: 6px 12px;
  font-size: 12px;
}

.btn-full { width: 100%; }

.btn svg { width: 14px; height: 14px; }

/* Auth info / messages */
.auth-info {
  margin-top: 20px;
  padding: 14px;
  background: var(--bg-deep);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  display: flex;
  gap: 10px;
  align-items: flex-start;
}

.auth-info svg {
  width: 16px;
  height: 16px;
  color: var(--accent);
  flex-shrink: 0;
  margin-top: 1px;
}

.auth-info-text {
  font-size: 12px;
  color: var(--fg-dim);
  line-height: 1.5;
}

.auth-info-text p + p { margin-top: 4px; }

/* Message boxes — hidden by default, shown via showMsg() */
.msg-error,
.msg-success,
.msg-info {
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  margin-bottom: 12px;
  display: none;
  align-items: center;
  gap: 8px;
}

.msg-error {
  background: var(--danger-dim);
  border: 1px solid rgba(255, 85, 102, 0.3);
  color: var(--danger);
}

.msg-success {
  background: var(--success-dim);
  border: 1px solid rgba(0, 255, 136, 0.3);
  color: var(--success);
}

.msg-info {
  background: var(--accent-dim);
  border: 1px solid rgba(0, 212, 255, 0.2);
  color: var(--accent);
}

.msg-error svg,
.msg-success svg,
.msg-info svg { width: 16px; height: 16px; flex-shrink: 0; }

/* ============================================================
   Dashboard
   ============================================================ */

.dash-header {
  margin-bottom: 28px;
}

.dash-header h2 {
  font-family: var(--font-mono);
  font-size: 22px;
  font-weight: 600;
  letter-spacing: 0.01em;
  margin-bottom: 6px;
}

.dash-header p {
  font-size: 14px;
  color: var(--muted);
  max-width: 60ch;
}

/* Dashboard choice grid */
.dash-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 32px;
}

.dash-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  cursor: pointer;
  transition: all var(--transition);
  position: relative;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  display: block;
}

.dash-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 2px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--transition);
}

.dash-card:hover {
  border-color: var(--accent);
  background: var(--surface-2);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3), 0 0 0 1px var(--accent-dim);
}

.dash-card:hover::before { transform: scaleX(1); }

.dash-card-graphic {
  width: 56px;
  height: 56px;
  margin-bottom: 14px;
  color: var(--accent);
  transition: transform var(--transition);
  filter: drop-shadow(0 0 3px rgba(0, 212, 255, 0.1));
}

.dash-card:hover .dash-card-graphic { transform: scale(1.08); filter: drop-shadow(0 0 8px rgba(0, 212, 255, 0.25)); }

/* Fallback for any remaining dash-card-icon */
.dash-card-icon {
  width: 56px;
  height: 56px;
  margin-bottom: 14px;
  color: var(--accent);
  transition: transform var(--transition);
}

.dash-card:hover .dash-card-icon { transform: scale(1.1); }

.dash-card h3 {
  font-family: var(--font-mono);
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 6px;
  letter-spacing: 0.01em;
}

.dash-card p {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.5;
}

/* Account section */
.account-section {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.account-label {
  font-family: var(--font-mono);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  margin-right: auto;
}

/* Admin nav */
.admin-nav {
  margin-top: 16px;
  display: none;
  gap: 8px;
  flex-wrap: wrap;
}

.admin-nav:not(.hidden) { display: flex; }

.admin-nav .btn { font-size: 12px; }

/* ============================================================
   Section headers (shared across cards)
   ============================================================ */

.section-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 24px;
}

.section-header h2 {
  font-family: var(--font-mono);
  font-size: 20px;
  font-weight: 600;
  letter-spacing: 0.01em;
}

.section-header .back-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--muted);
  cursor: pointer;
  background: none;
  border: none;
  transition: color var(--transition);
  padding: 4px 8px;
  border-radius: var(--radius-sm);
}

.section-header .back-btn:hover {
  color: var(--accent);
  background: var(--accent-dim);
}

.section-header .back-btn svg { width: 14px; height: 14px; }

.section-subtitle {
  font-size: 14px;
  color: var(--muted);
  margin-bottom: 20px;
  max-width: 65ch;
}

/* ============================================================
   Ecosystem / Discover
   ============================================================ */

.eco-section {
  margin-bottom: 32px;
}

.eco-section-title {
  font-family: var(--font-mono);
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 4px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.eco-section-title .section-badge {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  padding: 2px 8px;
  border-radius: 100px;
  background: var(--accent-dim);
  color: var(--accent);
  font-weight: 600;
}

.eco-section-desc {
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 16px;
}

/* Automation item card */
.auto-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  margin-bottom: 12px;
  transition: all var(--transition);
}

.auto-item:hover {
  border-color: var(--border-bright);
  background: var(--surface-2);
}

.auto-item-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 10px;
}

.auto-item-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--fg);
}

.auto-item-layman {
  font-size: 12px;
  color: var(--accent);
  font-family: var(--font-mono);
  margin-top: 2px;
}

.auto-item-desc {
  font-size: 13px;
  color: var(--fg-dim);
  line-height: 1.5;
  margin-bottom: 12px;
}

.auto-item-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  font-size: 12px;
  color: var(--muted);
  font-family: var(--font-mono);
  margin-bottom: 14px;
}

.auto-item-meta span {
  display: flex;
  align-items: center;
  gap: 4px;
}

.auto-item-meta svg { width: 12px; height: 12px; }

.auto-item-actions {
  display: flex;
  gap: 8px;
}

/* Empty state */
.empty-state {
  text-align: center;
  padding: 40px 20px;
  color: var(--muted);
  font-size: 14px;
  background: var(--surface);
  border: 1px dashed var(--border);
  border-radius: var(--radius);
}

/* ============================================================
   Ecosystem Detail
   ============================================================ */

.detail-body {
  display: grid;
  gap: 16px;
}

.detail-row {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 16px;
  padding: 14px 18px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.detail-label {
  font-family: var(--font-mono);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
}

.detail-value {
  font-size: 14px;
  color: var(--fg);
}

/* Rating section */
.rating-section {
  margin-top: 24px;
  padding: 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.rating-stars {
  display: flex;
  gap: 4px;
  margin-bottom: 12px;
}

.rating-star {
  width: 24px;
  height: 24px;
  cursor: pointer;
  color: var(--border-bright);
  transition: color 100ms;
}

.rating-star.active,
.rating-star:hover { color: var(--warning); }

.rating-star:hover ~ .rating-star { color: var(--border-bright); }

/* ============================================================
   Request Form
   ============================================================ */

.request-form {
  max-width: 720px;
}

.detail-level-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
  margin: 12px 0;
}

.detail-level-btn {
  padding: 12px 8px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--transition);
  text-align: center;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--fg-dim);
}

.detail-level-btn .level-num {
  display: block;
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 4px;
  color: var(--muted);
}

.detail-level-btn:hover {
  border-color: var(--border-bright);
  color: var(--fg);
}

.detail-level-btn.active {
  border-color: var(--accent);
  background: var(--accent-dim);
  color: var(--accent);
}

.detail-level-btn.active .level-num { color: var(--accent); }

.detail-level-desc {
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 16px;
  padding: 12px;
  background: var(--bg-deep);
  border-radius: var(--radius-sm);
  border-left: 2px solid var(--accent);
}

/* Affiliate box */
.affiliate-box {
  padding: 16px 20px;
  background: linear-gradient(135deg, var(--accent-dim), transparent);
  border: 1px solid rgba(0, 212, 255, 0.2);
  border-radius: var(--radius);
  margin: 16px 0;
  display: flex;
  align-items: center;
  gap: 16px;
}

.affiliate-pct {
  font-family: var(--font-mono);
  font-size: 32px;
  font-weight: 700;
  color: var(--accent);
  line-height: 1;
}

.affiliate-text {
  font-size: 13px;
  color: var(--fg-dim);
  line-height: 1.5;
}

/* Creator checkbox */
.creator-toggle {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin: 16px 0;
  cursor: pointer;
  transition: border-color var(--transition);
}

.creator-toggle:hover { border-color: var(--border-bright); }

.creator-toggle input[type="checkbox"] {
  appearance: none;
  width: 18px;
  height: 18px;
  border: 2px solid var(--border-bright);
  border-radius: var(--radius-sm);
  cursor: pointer;
  position: relative;
  flex-shrink: 0;
  margin-top: 1px;
  transition: all var(--transition);
}

.creator-toggle input[type="checkbox"]:checked {
  background: var(--accent);
  border-color: var(--accent);
}

.creator-toggle input[type="checkbox"]:checked::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 5px;
  width: 5px;
  height: 9px;
  border: solid #0a0c11;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.creator-toggle-text {
  font-size: 14px;
  color: var(--fg);
}

.creator-toggle-text p {
  font-size: 12px;
  color: var(--muted);
  margin-top: 4px;
  line-height: 1.5;
}

/* Optional fields grid */
.optional-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 16px;
}

/* Request list */
.request-list-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 18px;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.request-list-item .req-title {
  font-size: 14px;
  font-weight: 500;
}

.request-list-item .req-detail {
  font-size: 12px;
  color: var(--muted);
  font-family: var(--font-mono);
}

/* ============================================================
   Demand Board
   ============================================================ */

.demand-form {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 24px;
}

.demand-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 18px;
  margin-bottom: 10px;
  display: flex;
  align-items: flex-start;
  gap: 16px;
  transition: border-color var(--transition);
}

.demand-item:hover { border-color: var(--border-bright); }

.upvote-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  min-width: 44px;
  padding: 8px;
  background: var(--bg-deep);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--transition);
  flex-shrink: 0;
}

.upvote-btn:hover {
  border-color: var(--accent);
  background: var(--accent-dim);
}

.upvote-btn svg { width: 16px; height: 16px; color: var(--accent); }

.upvote-count {
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 700;
  color: var(--fg);
}

.demand-content { flex: 1; min-width: 0; }

.demand-content h4 {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 4px;
}

.demand-content p {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.5;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: 100px;
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-top: 8px;
}

.status-pending {
  background: var(--warning-dim);
  color: var(--warning);
}

.status-fulfilled {
  background: var(--success-dim);
  color: var(--success);
}

/* ============================================================
   Community Feed
   ============================================================ */

.feed-toolbar {
  display: flex;
  gap: 12px;
  margin-bottom: 16px;
  flex-wrap: wrap;
  align-items: center;
}

.feed-search-wrap {
  display: flex;
  flex: 1;
  min-width: 200px;
  gap: 0;
}

.feed-search-input {
  flex: 1;
  background: var(--surface);
  border: 1px solid var(--border);
  border-right: none;
  border-radius: var(--radius-sm) 0 0 var(--radius-sm);
  padding: 8px 12px;
  color: var(--fg);
  font-size: 13px;
  outline: none;
  transition: border-color var(--transition);
}

.feed-search-input:focus { border-color: var(--accent); }

.feed-search-btn {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  padding: 8px 14px;
  color: var(--fg-dim);
  cursor: pointer;
  transition: all var(--transition);
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-family: var(--font-mono);
}

.feed-search-btn:hover {
  background: var(--accent-dim);
  color: var(--accent);
  border-color: var(--accent);
}

.feed-search-btn svg { width: 14px; height: 14px; }

.semantic-toggle {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--muted);
  font-family: var(--font-mono);
  cursor: pointer;
}

.semantic-toggle input[type="checkbox"] {
  appearance: none;
  width: 28px;
  height: 16px;
  background: var(--border);
  border-radius: 100px;
  cursor: pointer;
  position: relative;
  transition: background var(--transition);
}

.semantic-toggle input[type="checkbox"]::after {
  content: '';
  position: absolute;
  top: 2px; left: 2px;
  width: 12px; height: 12px;
  background: var(--fg-dim);
  border-radius: 50%;
  transition: all var(--transition);
}

.semantic-toggle input[type="checkbox"]:checked {
  background: var(--accent);
}

.semantic-toggle input[type="checkbox"]:checked::after {
  left: 14px;
  background: #0a0c11;
}

/* Feed tabs */
.feed-tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.feed-tab {
  padding: 6px 14px;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--muted);
  cursor: pointer;
  transition: all var(--transition);
}

.feed-tab:hover {
  border-color: var(--border-bright);
  color: var(--fg-dim);
}

.feed-tab.active {
  background: var(--accent-dim);
  border-color: var(--accent);
  color: var(--accent);
}

/* Post card */
.post-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  margin-bottom: 12px;
  cursor: pointer;
  transition: all var(--transition);
}

.post-card:hover {
  border-color: var(--border-bright);
  background: var(--surface-2);
}

.post-card-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.post-avatar {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  background: var(--surface-3);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 600;
  color: var(--accent);
  flex-shrink: 0;
}

.post-meta {
  flex: 1;
  min-width: 0;
}

.post-author {
  font-size: 13px;
  font-weight: 600;
}

.post-time {
  font-size: 11px;
  color: var(--muted);
  font-family: var(--font-mono);
}

.post-category {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 2px 8px;
  border-radius: 100px;
  background: var(--surface-3);
  color: var(--fg-dim);
}

.post-card h4 {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 6px;
}

.post-card p {
  font-size: 13px;
  color: var(--fg-dim);
  line-height: 1.5;
}

.post-card-footer {
  display: flex;
  gap: 16px;
  margin-top: 12px;
  font-size: 12px;
  color: var(--muted);
  font-family: var(--font-mono);
}

.post-card-footer span {
  display: flex;
  align-items: center;
  gap: 4px;
}

.post-card-footer svg { width: 12px; height: 12px; }

/* New post form */
.new-post-form {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 20px;
  display: none;
}

.new-post-form:not(.hidden) { display: block; }

.new-post-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  background: var(--surface);
  border: 1px dashed var(--border-bright);
  border-radius: var(--radius);
  cursor: pointer;
  transition: all var(--transition);
  margin-bottom: 16px;
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--accent);
}

.new-post-toggle:hover {
  border-style: solid;
  border-color: var(--accent);
  background: var(--accent-dim);
}

.new-post-toggle svg { width: 16px; height: 16px; }

/* Post detail */
.post-detail {
  display: none;
}

.post-detail:not(.hidden) { display: block; }

.reply-item {
  padding: 14px 16px;
  background: var(--bg-deep);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  margin-bottom: 8px;
}

.reply-item .reply-author {
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 4px;
}

.reply-item .reply-text {
  font-size: 13px;
  color: var(--fg-dim);
  line-height: 1.5;
}

/* ============================================================
   Workspace
   ============================================================ */

.ws-tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 20px;
  border-bottom: 1px solid var(--border);
}

.ws-tab {
  padding: 10px 20px;
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--muted);
  cursor: pointer;
  transition: all var(--transition);
  margin-bottom: -1px;
}

.ws-tab:hover { color: var(--fg-dim); }

.ws-tab.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

.ws-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 18px;
  margin-bottom: 10px;
}

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

.ws-item-title {
  font-size: 15px;
  font-weight: 600;
}

.ws-item-actions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

/* Edit panel */
.ws-edit-panel {
  margin-top: 12px;
  padding: 16px;
  background: var(--bg-deep);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  display: none;
}

.ws-edit-panel:not(.hidden) { display: block; }

.override-row {
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  gap: 8px;
  margin-bottom: 8px;
}

.override-row .field-input { padding: 6px 10px; font-size: 13px; }

/* ============================================================
   Creators
   ============================================================ */

.creator-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 16px;
  transition: all var(--transition);
  cursor: default;
}

.creator-card:hover {
  border-color: var(--border-bright);
  background: var(--surface-2);
}

.creator-avatar {
  width: 48px;
  height: 48px;
  border-radius: var(--radius);
  background: var(--surface-3);
  border: 1px solid var(--border-bright);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 18px;
  font-weight: 700;
  color: var(--accent);
  flex-shrink: 0;
}

.creator-info { flex: 1; min-width: 0; }

.creator-name {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 4px;
}

.creator-stats {
  display: flex;
  gap: 20px;
  font-size: 12px;
  color: var(--muted);
  font-family: var(--font-mono);
}

.creator-stats span {
  display: flex;
  align-items: center;
  gap: 4px;
}

.creator-stats svg { width: 12px; height: 12px; color: var(--accent); }

/* Creator profile */
.creator-profile-header {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 24px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 24px;
}

.creator-profile-header .creator-avatar {
  width: 64px;
  height: 64px;
  font-size: 24px;
}

.creator-profile-name {
  font-family: var(--font-mono);
  font-size: 22px;
  font-weight: 700;
}

.creator-profile-stats {
  display: flex;
  gap: 24px;
  margin-top: 8px;
  font-size: 13px;
  color: var(--muted);
  font-family: var(--font-mono);
}

/* ============================================================
   Template Form - Split Pane
   ============================================================ */

.template-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 20px;
  min-height: 400px;
}

.template-form-pane {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  overflow-y: auto;
  max-height: 70vh;
}

.template-preview-pane {
  background: var(--bg-deep);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.preview-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--muted);
}

.preview-live-dot {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--success);
}

.live-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--success);
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; box-shadow: 0 0 0 0 var(--success-dim); }
  50% { opacity: 0.6; box-shadow: 0 0 0 6px transparent; }
}

#previewFrame {
  flex: 1;
  width: 100%;
  border: none;
  background: white;
  min-height: 400px;
}

/* Template calculation box */
.calc-box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  margin-bottom: 20px;
}

.calc-box-title {
  font-family: var(--font-mono);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  margin-bottom: 12px;
}

.calc-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
  font-size: 14px;
}

.calc-row:last-child {
  border-bottom: none;
  font-weight: 700;
  font-size: 16px;
  color: var(--accent);
  padding-top: 14px;
}

.calc-label { color: var(--fg-dim); }

.calc-value {
  font-family: var(--font-mono);
  font-weight: 600;
}

/* Signature section */
.sig-section {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  margin-bottom: 20px;
}

.sig-toggle-row {
  display: flex;
  gap: 8px;
  margin-bottom: 14px;
}

.sig-mode-btn {
  padding: 6px 14px;
  background: var(--bg-deep);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--muted);
  cursor: pointer;
  transition: all var(--transition);
}

.sig-mode-btn.active {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-dim);
}

#sig_canvas {
  width: 100%;
  height: 150px;
  background: var(--bg-deep);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: crosshair;
  display: block;
}

#field_unterschrift {
  width: 100%;
  margin-bottom: 8px;
}

/* Progress bar */
.progress-bar-wrap {
  margin: 20px 0;
}

.progress-bar-header {
  display: flex;
  justify-content: space-between;
  margin-bottom: 8px;
  font-family: var(--font-mono);
  font-size: 12px;
}

.progress-bar-count { color: var(--accent); }

.progress-bar-text { color: var(--muted); }

.progress-bar {
  height: 6px;
  background: var(--bg-deep);
  border: 1px solid var(--border);
  border-radius: 100px;
  overflow: hidden;
}

.progress-bar-fill {
  height: 100%;
  background: var(--accent);
  border-radius: 100px;
  width: 0%;
  transition: width 300ms cubic-bezier(0.2, 0, 0, 1);
  box-shadow: 0 0 8px var(--accent-glow);
}

/* ============================================================
   Change Password
   ============================================================ */

.change-pwd-form {
  max-width: 480px;
}

/* ============================================================
   Admin cards
   ============================================================ */

.admin-list-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 18px;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.admin-item-content { flex: 1; min-width: 0; }

.admin-item-title {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 4px;
}

.admin-item-meta {
  font-size: 12px;
  color: var(--muted);
  font-family: var(--font-mono);
}

.admin-item-actions {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}

.affiliate-input {
  width: 80px;
  padding: 6px 8px;
  background: var(--bg-deep);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--fg);
  font-family: var(--font-mono);
  font-size: 13px;
  text-align: center;
}

.affiliate-input:focus {
  border-color: var(--accent);
  outline: none;
}

/* Admin log */
.log-entry {
  padding: 12px 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  margin-bottom: 6px;
  font-family: var(--font-mono);
  font-size: 12px;
  display: flex;
  gap: 16px;
  align-items: center;
}

.log-time { color: var(--muted); min-width: 140px; }

.log-action { font-weight: 600; }

.log-action.approve { color: var(--success); }
.log-action.reject { color: var(--danger); }

.log-target { color: var(--fg-dim); flex: 1; }

/* ============================================================
   Footer
   ============================================================ */

.app-footer {
  position: relative;
  z-index: 1;
  border-top: 1px solid var(--border);
  padding: 24px;
  text-align: center;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--muted);
  background: var(--bg-deep);
}

/* Footer circuit trace decoration */
.footer-trace {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 40px;
  pointer-events: none;
  overflow: hidden;
}

.footer-trace-svg {
  width: 100%;
  height: 100%;
  display: block;
}

.footer-trace-svg circle {
  animation: nodeBlink 4s ease-in-out infinite;
}

.footer-trace-svg circle:nth-child(4) { animation-delay: 0.5s; }
.footer-trace-svg circle:nth-child(5) { animation-delay: 1s; }
.footer-trace-svg circle:nth-child(6) { animation-delay: 1.5s; }
.footer-trace-svg circle:nth-child(7) { animation-delay: 2s; }
.footer-trace-svg circle:nth-child(8) { animation-delay: 2.5s; }
.footer-trace-svg circle:nth-child(9) { animation-delay: 3s; }

@keyframes nodeBlink {
  0%, 100% { opacity: 0.2; }
  50% { opacity: 0.6; }
}

.app-footer .footer-tagline {
  margin-bottom: 4px;
}

.app-footer .footer-url {
  color: var(--accent);
  text-decoration: none;
}

.app-footer .footer-url:hover { text-decoration: underline; }

/* ============================================================
   Mobile Bottom Nav
   ============================================================ */

.mobile-nav {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 200;
  background: rgba(15, 17, 23, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-top: 1px solid var(--border);
  padding: 6px 0;
  padding-bottom: env(safe-area-inset-bottom, 6px);
}

.mobile-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 6px;
  color: var(--muted);
  cursor: pointer;
  transition: color var(--transition);
  background: none;
  border: none;
  flex: 1;
}

.mobile-nav-item svg { width: 20px; height: 20px; }

.mobile-nav-item span {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.02em;
}

.mobile-nav-item:hover,
.mobile-nav-item.active { color: var(--accent); }

/* ============================================================
   Responsive
   ============================================================ */

@media (max-width: 900px) {
  .dash-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .template-split {
    grid-template-columns: 1fr;
  }

  .optional-fields {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .app-container {
    padding: 16px 16px 90px;
  }

  .topbar {
    padding: 0 16px;
  }

  .breadcrumb { display: none; }

  .dash-grid {
    grid-template-columns: 1fr;
  }

  .detail-row {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  .detail-label { margin-bottom: 2px; }

  .auto-item-header {
    flex-direction: column;
    gap: 8px;
  }

  .auto-item-actions { flex-wrap: wrap; }

  .mobile-nav { display: flex; }

  .dash-card { padding: 18px; }

  .feed-toolbar { flex-direction: column; align-items: stretch; }

  .feed-search-wrap { width: 100%; }

  .account-section {
    flex-wrap: wrap;
    gap: 10px;
  }

  .admin-list-item {
    flex-direction: column;
    align-items: flex-start;
  }

  .admin-item-actions { width: 100%; }

  .creator-card {
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
  }

  .creator-stats { flex-wrap: wrap; gap: 12px; }

  .creator-profile-header {
    flex-direction: column;
    text-align: center;
    align-items: center;
  }

  .section-header h2 { font-size: 18px; }

  .override-row {
    grid-template-columns: 1fr;
  }

  .override-row .btn { width: 100%; }

  .detail-level-grid {
    grid-template-columns: repeat(5, 1fr);
    gap: 4px;
  }

  .detail-level-btn {
    padding: 8px 4px;
    font-size: 9px;
  }

  .detail-level-btn .level-num { font-size: 16px; }

  .affiliate-box {
    flex-direction: column;
    text-align: center;
  }

  .dash-header h2 { font-size: 20px; }
}

@media (max-width: 480px) {
  .auth-panel {
    padding: 24px 20px;
  }

  .feed-tabs {
    overflow-x: auto;
    flex-wrap: nowrap;
    -webkit-overflow-scrolling: touch;
  }

  .feed-tab { white-space: nowrap; }

  .ws-tabs { overflow-x: auto; flex-wrap: nowrap; }
  .ws-tab { white-space: nowrap; }
}

/* ============================================================
   Utility
   ============================================================ */

.hidden { display: none !important; }

.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mb-16 { margin-bottom: 16px; }
.mb-24 { margin-bottom: 24px; }

.flex-row { display: flex; gap: 12px; align-items: center; }
.flex-wrap { flex-wrap: wrap; }
.gap-8 { gap: 8px; }

.text-center { text-align: center; }

/* Scrollbar styling */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: var(--bg-deep); }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 100px; }
::-webkit-scrollbar-thumb:hover { background: var(--border-bright); }

/* Focus visible */
*:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

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