/* ===================================================================
   Alice AI Portal — Design System
   =================================================================== */

/* ===================================================================
   1. DESIGN TOKENS
   =================================================================== */
:root {
  /* Brand — Orange (expanded) */
  --al-orange-50: #fff7f0;
  --al-orange-100: #ffe8d6;
  --al-orange-200: #ffc299;
  --al-orange-300: #ffa366;
  --al-orange-400: #ff8c3f;
  --al-orange-500: #ff7a2f;
  --al-orange-600: #e66a20;
  --al-orange-700: #cc5a11;
  --al-orange-800: #b34a02;
  --al-orange-900: #993a00;

  /* Brand — Amber / Gold accent */
  --al-amber-400: #fbbf24;
  --al-amber-500: #f59e0b;

  /* Neutral */
  --al-neutral-50: #f8fafc;
  --al-neutral-100: #e2e8f0;
  --al-neutral-200: #cbd5e1;
  --al-neutral-300: #a8b5b2;
  --al-neutral-400: #64748b;
  --al-neutral-500: #475569;
  --al-neutral-600: #1e293b;
  --al-neutral-700: #0f1a19;
  --al-neutral-800: #081211;
  --al-neutral-900: #050f0e;

  /* Semantic */
  --al-cyan: #55d6c2;
  --al-cyan-400: #2dd4bf;
  --al-green: #8fd46b;
  --al-green-400: #4ade80;
  --al-danger: #ff6d6d;
  --al-danger-400: #f87171;
  --al-warning: #fbbf24;

  /* Surfaces — layered depth */
  --al-bg-primary: #07100f;
  --al-bg-surface: rgba(8, 18, 17, 0.82);
  --al-bg-surface-hover: rgba(255, 255, 255, 0.08);
  --al-bg-elevated: rgba(15, 28, 26, 0.95);
  --al-bg-glass: rgba(7, 16, 15, 0.78);
  --al-bg-card: rgba(10, 22, 21, 0.75);
  --al-bg-card-hover: rgba(14, 28, 26, 0.85);
  --al-bg-input: rgba(0, 0, 0, 0.32);
  --al-bg-tooltip: rgba(15, 28, 26, 0.98);
  --al-border: rgba(255, 255, 255, 0.12);
  --al-border-light: rgba(255, 255, 255, 0.06);
  --al-border-strong: rgba(255, 255, 255, 0.18);
  --al-border-focus: rgba(255, 177, 93, 0.8);

  /* Typography */
  --al-font-sans: "Inter", "Noto Sans", "Segoe UI", Arial, sans-serif;
  --al-font-display: "Space Grotesk", "Noto Sans", "Segoe UI", Arial, sans-serif;
  --al-text-primary: #f8fafc;
  --al-text-secondary: #a8b5b2;
  --al-text-accent: #ffb15d;
  --al-text-dimmed: #6b7d7a;

  /* Spacing (4px base) */
  --al-space-1: 4px;
  --al-space-2: 8px;
  --al-space-3: 12px;
  --al-space-4: 16px;
  --al-space-5: 20px;
  --al-space-6: 24px;
  --al-space-8: 32px;
  --al-space-10: 40px;
  --al-space-12: 48px;

  /* Radius */
  --al-radius-sm: 6px;
  --al-radius-md: 10px;
  --al-radius-lg: 14px;
  --al-radius-xl: 20px;
  --al-radius-full: 9999px;

  /* Shadows — multi-layer depth system */
  --al-shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.2), 0 1px 2px rgba(0, 0, 0, 0.15);
  --al-shadow-md: 0 8px 32px rgba(0, 0, 0, 0.28), 0 2px 6px rgba(0, 0, 0, 0.18);
  --al-shadow-lg: 0 24px 80px rgba(0, 0, 0, 0.38), 0 6px 16px rgba(0, 0, 0, 0.22);
  --al-shadow-glow: 0 0 40px rgba(255, 122, 47, 0.3), 0 0 80px rgba(255, 122, 47, 0.1);
  --al-shadow-glow-cyan: 0 0 24px rgba(85, 214, 194, 0.2);
  --al-shadow-inner: inset 0 1px 3px rgba(0, 0, 0, 0.3);
  --al-shadow-card-hover: 0 12px 40px rgba(0, 0, 0, 0.35), 0 0 0 1px rgba(255, 122, 47, 0.15);

  /* Animation */
  --al-transition-fast: 0.15s ease;
  --al-transition: 0.25s ease;
  --al-transition-slow: 0.4s cubic-bezier(0.16, 1, 0.3, 1);

  /* Z-index */
  --al-z-dropdown: 100;
  --al-z-sticky: 20;
  --al-z-overlay: 200;
  --al-z-modal: 1000;
}

/* ===================================================================
   2. RESET / BASE
   =================================================================== */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  background:
    linear-gradient(180deg, rgba(7, 16, 15, 0.92), rgba(7, 16, 15, 1) 54%),
    radial-gradient(ellipse at 10% 10%, rgba(255, 122, 47, 0.1), transparent 40%),
    radial-gradient(ellipse at 90% 80%, rgba(85, 214, 194, 0.06), transparent 40%),
    var(--al-bg-primary);
  color: var(--al-text-primary);
  font-family: var(--al-font-sans);
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a { color: inherit; text-decoration: none; }
button, textarea, select, input { font: inherit; }
img { max-width: 100%; height: auto; }
.hidden { display: none !important; }

/* Subtle grid pattern overlay */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.015) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.015) 1px, transparent 1px);
  background-size: 64px 64px;
  opacity: 0.5;
}

/* Scrollbar */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.08); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,0.16); }

/* ===================================================================
   3. TYPOGRAPHY
   =================================================================== */
h1, h2, h3, h4 { font-family: var(--al-font-display); margin: 0; letter-spacing: -0.02em; }
h1 { font-size: clamp(28px, 3.5vw, 40px); line-height: 1.15; }
h2 { font-size: clamp(20px, 2.2vw, 28px); line-height: 1.25; }
h3 { font-size: 18px; line-height: 1.35; }

.al-eyebrow {
  margin: 0 0 var(--al-space-3);
  color: var(--al-cyan);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.al-text--muted { color: var(--al-text-secondary); }
.al-text--accent { color: var(--al-text-accent); }
.al-text--positive { color: var(--al-green); font-weight: 700; }
.al-text--negative { color: var(--al-danger); font-weight: 700; }
.al-text--dimmed { color: var(--al-text-dimmed); }

.al-gradient-text {
  background: linear-gradient(135deg, var(--al-orange-400), var(--al-orange-200));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.al-divider {
  width: 100%;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--al-border), transparent);
  margin: var(--al-space-6) 0;
  border: none;
}

/* ===================================================================
   4. BUTTONS
   =================================================================== */
.al-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--al-space-2);
  min-height: 44px;
  padding: 0 20px;
  border: 1px solid rgba(255, 122, 47, 0.4);
  border-radius: var(--al-radius-md);
  background: linear-gradient(135deg, var(--al-orange-500), var(--al-orange-400));
  color: #1b0f09;
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
  transition: all var(--al-transition);
  white-space: nowrap;
  box-shadow: 0 2px 8px rgba(255, 122, 47, 0.15);
}
.al-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 28px rgba(255, 122, 47, 0.3);
  border-color: rgba(255, 122, 47, 0.6);
}
.al-btn:active { transform: translateY(0); box-shadow: 0 1px 4px rgba(255, 122, 47, 0.2); }
.al-btn:focus-visible {
  outline: 2px solid rgba(255, 177, 93, 0.8);
  outline-offset: 2px;
}

.al-btn--secondary {
  background: rgba(255, 255, 255, 0.06);
  color: var(--al-text-primary);
  border-color: var(--al-border);
  box-shadow: none;
}
.al-btn--secondary:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: var(--al-border-strong);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}

.al-btn--ghost {
  background: transparent;
  color: var(--al-text-secondary);
  border-color: transparent;
  box-shadow: none;
}
.al-btn--ghost:hover { background: rgba(255, 255, 255, 0.06); color: var(--al-text-primary); box-shadow: none; }

.al-btn--danger {
  background: rgba(255, 109, 109, 0.1);
  color: var(--al-danger);
  border-color: rgba(255, 109, 109, 0.25);
  box-shadow: none;
}
.al-btn--danger:hover { background: rgba(255, 109, 109, 0.2); border-color: rgba(255, 109, 109, 0.4); box-shadow: none; }

.al-btn--link {
  background: transparent;
  color: var(--al-cyan);
  border: none;
  padding: 0;
  min-height: auto;
  font-weight: 700;
  font-size: 14px;
  box-shadow: none;
}
.al-btn--link:hover { color: var(--al-orange-300); transform: none; box-shadow: none; }

.al-btn--sm {
  min-height: 36px;
  padding: 0 14px;
  font-size: 13px;
}

.al-btn--disabled,
.al-btn:disabled {
  opacity: 0.45;
  pointer-events: none;
  cursor: not-allowed;
}

/* ===================================================================
   5. FORMS
   =================================================================== */
.al-input {
  width: 100%;
  min-height: 46px;
  padding: 0 14px;
  border: 1px solid var(--al-border);
  border-radius: var(--al-radius-md);
  background: var(--al-bg-input);
  color: var(--al-text-primary);
  font-size: 14px;
  outline: none;
  transition: border-color var(--al-transition-fast), box-shadow var(--al-transition-fast), background var(--al-transition-fast);
}
.al-input:hover { border-color: var(--al-border-strong); }
.al-input:focus {
  border-color: var(--al-border-focus);
  box-shadow: 0 0 0 3px rgba(255, 122, 47, 0.1), 0 0 20px rgba(255, 122, 47, 0.06);
  background: rgba(0, 0, 0, 0.4);
}
.al-input::placeholder { color: var(--al-text-dimmed); opacity: 0.7; }

.al-input--textarea {
  min-height: 112px;
  padding: var(--al-space-3) 14px;
  resize: vertical;
  line-height: 1.6;
}

select.al-input {
  cursor: pointer;
  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='%23a8b5b2' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 36px;
}

.al-field {
  display: grid;
  gap: var(--al-space-2);
  color: var(--al-text-secondary);
  font-weight: 600;
  font-size: 13px;
  min-width: 160px;
}
.al-field > span {
  color: var(--al-text-secondary);
  font-weight: 600;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* ===================================================================
   6. CARDS
   =================================================================== */
.al-card {
  display: flex;
  align-items: center;
  gap: var(--al-space-4);
  padding: var(--al-space-5);
  border: 1px solid var(--al-border);
  border-radius: var(--al-radius-lg);
  background: var(--al-bg-card);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: var(--al-shadow-sm);
  transition: transform var(--al-transition), border-color var(--al-transition), box-shadow var(--al-transition), background var(--al-transition);
}
.al-card:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 122, 47, 0.2);
  box-shadow: var(--al-shadow-card-hover);
  background: var(--al-bg-card-hover);
}

.al-card-icon {
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  width: 42px;
  height: 42px;
  border-radius: var(--al-radius-md);
  background: linear-gradient(135deg, rgba(255, 122, 47, 0.18), rgba(255, 122, 47, 0.08));
  color: var(--al-orange-300);
  font-weight: 900;
  font-size: 18px;
  box-shadow: 0 2px 8px rgba(255, 122, 47, 0.1);
}

.al-card strong { display: block; margin: 4px 0; font-size: 26px; font-family: var(--al-font-display); }
.al-card small { display: block; color: var(--al-text-secondary); font-size: 13px; line-height: 1.5; }
.al-card > div { min-width: 0; }

.al-card--green .al-card-icon { background: linear-gradient(135deg, rgba(143, 212, 107, 0.18), rgba(143, 212, 107, 0.08)); color: var(--al-green); box-shadow: 0 2px 8px rgba(143, 212, 107, 0.1); }
.al-card--orange .al-card-icon { background: linear-gradient(135deg, rgba(255, 122, 47, 0.18), rgba(255, 122, 47, 0.08)); color: var(--al-orange-300); box-shadow: 0 2px 8px rgba(255, 122, 47, 0.1); }
.al-card--purple .al-card-icon { background: linear-gradient(135deg, rgba(85, 214, 194, 0.18), rgba(85, 214, 194, 0.06)); color: var(--al-cyan); box-shadow: 0 2px 8px rgba(85, 214, 194, 0.1); }

/* ===================================================================
   7. PANELS
   =================================================================== */
.al-panel {
  padding: var(--al-space-6);
  border: 1px solid var(--al-border);
  border-radius: var(--al-radius-lg);
  background: var(--al-bg-card);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: var(--al-shadow-md);
  position: relative;
  overflow: hidden;
}
.al-panel::after {
  content: '';
  position: absolute;
  top: 0; left: 16px; right: 16px;
  height: 2px;
  border-radius: 0 0 2px 2px;
  background: linear-gradient(90deg, transparent, rgba(255, 122, 47, 0.3), transparent);
  opacity: 0;
  transition: opacity var(--al-transition);
}
.al-panel:hover::after { opacity: 1; }

.al-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--al-space-4);
  margin-bottom: var(--al-space-5);
  flex-wrap: wrap;
}
.al-panel-header h2 { margin: 0; }

.al-panel--strong {
  background: var(--al-bg-elevated);
  backdrop-filter: blur(12px);
  border-color: var(--al-border-strong);
}

.al-panel--gradient {
  background: linear-gradient(135deg, rgba(255, 122, 47, 0.06), rgba(85, 214, 194, 0.03));
  backdrop-filter: blur(16px);
  border-color: rgba(255, 122, 47, 0.15);
}

/* Glass effect utility */
.al-glass {
  background: var(--al-bg-glass);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--al-border);
}

/* ===================================================================
   8. TABLES
   =================================================================== */
.al-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--al-border);
  border-radius: var(--al-radius-lg);
  background: rgba(0, 0, 0, 0.15);
}

.al-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 640px;
}

.al-table th {
  padding: 14px 18px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.01));
  color: var(--al-cyan);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  text-align: left;
  border-bottom: 2px solid rgba(255, 255, 255, 0.08);
}

.al-table td {
  padding: 14px 18px;
  border-bottom: 1px solid var(--al-border-light);
  color: #eaf1ee;
  font-size: 14px;
}

.al-table tr:last-child td { border-bottom: none; }

.al-table tbody tr {
  transition: background var(--al-transition-fast);
}
.al-table tbody tr:nth-child(even) { background: rgba(255, 255, 255, 0.015); }
.al-table tbody tr:hover td { background: rgba(255, 122, 47, 0.04); }

/* First/last row rounded corners */
.al-table tbody tr:first-child td:first-child { border-radius: var(--al-radius-lg) 0 0 0; }
.al-table tbody tr:first-child td:last-child { border-radius: 0 var(--al-radius-lg) 0 0; }
.al-table tbody tr:last-child td:first-child { border-radius: 0 0 0 var(--al-radius-lg); }
.al-table tbody tr:last-child td:last-child { border-radius: 0 0 var(--al-radius-lg) 0; }

/* ===================================================================
   9. BADGES / TAGS
   =================================================================== */
.al-badge {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 12px;
  border-radius: var(--al-radius-full);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.03em;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--al-border);
  color: var(--al-text-secondary);
}

.al-badge--orange {
  background: linear-gradient(135deg, rgba(255, 122, 47, 0.15), rgba(255, 122, 47, 0.06));
  border-color: rgba(255, 122, 47, 0.25);
  color: var(--al-orange-300);
}

.al-badge--green {
  background: linear-gradient(135deg, rgba(143, 212, 107, 0.15), rgba(143, 212, 107, 0.06));
  border-color: rgba(143, 212, 107, 0.25);
  color: var(--al-green);
}

.al-badge--cyan {
  background: linear-gradient(135deg, rgba(85, 214, 194, 0.15), rgba(85, 214, 194, 0.05));
  border-color: rgba(85, 214, 194, 0.25);
  color: var(--al-cyan);
}

.al-badge--danger {
  background: linear-gradient(135deg, rgba(255, 109, 109, 0.15), rgba(255, 109, 109, 0.05));
  border-color: rgba(255, 109, 109, 0.25);
  color: var(--al-danger);
}

.al-pill {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 0 12px;
  border-radius: var(--al-radius-full);
  background: linear-gradient(135deg, var(--al-cyan), var(--al-cyan-400));
  color: #0a1a18;
  font-weight: 700;
  font-size: 11px;
  letter-spacing: 0.02em;
  box-shadow: var(--al-shadow-glow-cyan);
}
.al-card.complete .al-pill,
.al-pill--green { background: linear-gradient(135deg, var(--al-green), var(--al-green-400)); }

/* ===================================================================
   10. LAYOUT
   =================================================================== */

/* App Layout */
.al-app {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  min-height: 100vh;
}

/* Sidebar */
.al-sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  gap: var(--al-space-5);
  padding: var(--al-space-6) var(--al-space-4);
  border-right: 1px solid var(--al-border-light);
  background: linear-gradient(180deg, rgba(6, 15, 14, 0.98), rgba(8, 18, 17, 0.95));
  overflow-y: auto;
  z-index: var(--al-z-sticky);
}

.al-brand {
  display: inline-flex;
  align-items: center;
  gap: var(--al-space-3);
  min-width: max-content;
}

.al-logo {
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
  border-radius: var(--al-radius-md);
  box-shadow: var(--al-shadow-glow);
}

.al-nav {
  display: flex;
  flex-direction: column;
  gap: var(--al-space-1);
}

.al-nav-section {
  margin: var(--al-space-4) var(--al-space-2) var(--al-space-1);
  color: var(--al-text-dimmed);
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.al-nav-link {
  position: relative;
  display: flex;
  align-items: center;
  gap: var(--al-space-3);
  min-height: 40px;
  padding: 0 var(--al-space-3);
  border-radius: var(--al-radius-md);
  color: #cbd8d4;
  font-weight: 600;
  font-size: 14px;
  transition: all var(--al-transition);
}
.al-nav-link:hover { background: rgba(255, 255, 255, 0.06); color: #fff; }

.al-nav-link--active {
  background: linear-gradient(135deg, rgba(255, 122, 47, 0.12), rgba(255, 122, 47, 0.04));
  color: var(--al-orange-300);
  box-shadow: inset 0 0 0 1px rgba(255, 122, 47, 0.15);
}
.al-nav-link--active::before {
  content: '';
  position: absolute;
  left: -4px;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 20px;
  border-radius: 3px;
  background: var(--al-orange-500);
  box-shadow: 0 0 8px rgba(255, 122, 47, 0.4);
}

.al-nav-icon {
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  width: 30px;
  height: 30px;
  border-radius: var(--al-radius-sm);
  background: linear-gradient(135deg, rgba(255, 122, 47, 0.14), rgba(255, 122, 47, 0.05));
  color: var(--al-orange-300);
  font-weight: 900;
  font-size: 12px;
}

.al-sidebar-footer {
  margin-top: auto;
  display: grid;
  gap: var(--al-space-2);
  padding-top: var(--al-space-4);
  border-top: 1px solid var(--al-border-light);
}

/* Main */
.al-main { min-width: 0; padding: 28px clamp(18px, 4vw, 44px) 44px; }

.al-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--al-space-5);
  margin-bottom: var(--al-space-6);
  flex-wrap: wrap;
}

.al-page-title h1 { margin: 0; font-size: clamp(24px, 3vw, 32px); }
.al-page-title p { margin: var(--al-space-1) 0 0; color: var(--al-text-secondary); }

.al-top-actions {
  display: flex;
  align-items: center;
  gap: var(--al-space-3);
  flex-wrap: wrap;
}

.al-userbox {
  display: inline-flex;
  align-items: center;
  gap: var(--al-space-3);
  min-height: 44px;
  padding: 0 var(--al-space-3);
  border: 1px solid var(--al-border);
  border-radius: var(--al-radius-md);
  transition: border-color var(--al-transition-fast);
}
.al-userbox:hover { border-color: rgba(255, 255, 255, 0.25); }

.al-userbox small { display: block; color: var(--al-text-secondary); font-size: 12px; line-height: 1.2; }

/* Grid */
.al-grid { display: grid; gap: var(--al-space-5); }
.al-grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.al-grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.al-grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.al-grid--1 { grid-template-columns: minmax(0, 1fr); }

/* Controls */
.al-control-row {
  display: flex;
  align-items: center;
  gap: var(--al-space-3);
  flex-wrap: wrap;
}

.al-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--al-space-4);
  flex-wrap: wrap;
}

/* ===================================================================
   11. AVATAR / BALANCE PILL
   =================================================================== */
.al-avatar {
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  width: 36px;
  height: 36px;
  border-radius: var(--al-radius-md);
  background: linear-gradient(135deg, var(--al-orange-500), var(--al-orange-200));
  color: #1b0f09;
  font-weight: 800;
  font-size: 14px;
}

.al-balance-pill {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 0 14px;
  border: 1px solid var(--al-border);
  border-radius: var(--al-radius-md);
  background: rgba(255, 255, 255, 0.06);
  color: #dff7f1;
  font-size: 14px;
  font-weight: 700;
  gap: var(--al-space-2);
}

/* ===================================================================
   12. AI CHAT / CONSOLE
   =================================================================== */
.al-chat-wrap {
  display: grid;
  gap: var(--al-space-4);
}

.al-chat-messages {
  display: grid;
  gap: var(--al-space-3);
  min-height: 200px;
  max-height: 440px;
  overflow-y: auto;
  padding: var(--al-space-5);
  border: 1px solid var(--al-border);
  border-radius: var(--al-radius-lg);
  background:
    linear-gradient(rgba(255,255,255,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.03) 1px, transparent 1px),
    rgba(0,0,0,0.25);
  background-size: 32px 32px;
}

.al-chat-message {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: var(--al-space-3);
  align-items: start;
  max-width: 82%;
}

.al-chat-message--user {
  justify-self: end;
  grid-template-columns: minmax(0, 1fr) 34px;
}

.al-chat-message__avatar {
  width: 34px;
  height: 34px;
  border-radius: var(--al-radius-md);
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 13px;
  background: linear-gradient(135deg, var(--al-orange-500), var(--al-orange-200));
  color: #1b0f09;
}

.al-chat-message--user .al-chat-message__avatar { order: 1; }

.al-chat-message__bubble {
  padding: var(--al-space-3) var(--al-space-4);
  border: 1px solid var(--al-border);
  border-radius: var(--al-radius-lg);
  background: rgba(255, 255, 255, 0.075);
  color: #e8efed;
  line-height: 1.6;
}

.al-chat-message--user .al-chat-message__bubble {
  background: rgba(255, 122, 47, 0.14);
  border-color: rgba(255, 122, 47, 0.25);
}

/* ===================================================================
   13. LISTS
   =================================================================== */
.al-list { display: grid; gap: var(--al-space-3); }

.al-list-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--al-space-3);
  padding: var(--al-space-3) 0;
  border-bottom: 1px solid var(--al-border);
}
.al-list-item:last-child { border-bottom: none; }
.al-list-item strong { display: block; }
.al-list-item small { display: block; margin-top: 2px; color: var(--al-text-secondary); font-size: 12px; }

.al-list-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--al-space-4);
  padding: var(--al-space-4) var(--al-space-5);
  border: 1px solid var(--al-border);
  border-radius: var(--al-radius-md);
  background: rgba(255, 255, 255, 0.03);
  transition: all var(--al-transition);
}
.al-list-row:hover {
  border-color: var(--al-border-strong);
  background: rgba(255, 255, 255, 0.05);
  transform: translateX(2px);
}
.al-list-row h3, .al-list-row p { margin: 4px 0; }

/* ===================================================================
   14. HOME / LANDING PAGE
   =================================================================== */
.al-page--home { min-height: 100vh; }

.al-topbar--home {
  position: sticky;
  top: 0;
  z-index: var(--al-z-sticky);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--al-space-4);
  padding: var(--al-space-4) clamp(18px, 4vw, 56px);
  border-bottom: 1px solid var(--al-border);
  background: var(--al-bg-glass);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.al-nav--horizontal {
  display: flex;
  align-items: center;
  gap: clamp(10px, 1.8vw, 22px);
  color: var(--al-text-secondary);
  font-size: 13px;
}
.al-nav--horizontal a:hover { color: var(--al-text-primary); }

.al-hero {
  position: relative;
  min-height: 640px;
  display: grid;
  align-items: center;
  overflow: hidden;
  border-bottom: 1px solid var(--al-border);
  background-image: linear-gradient(90deg, rgba(7,16,15,0.94), rgba(7,16,15,0.5)), url("assets/alice-portal-hero.png");
  background-size: cover;
  background-position: center;
}

.al-hero__glow {
  position: absolute;
  top: -20%;
  right: -10%;
  width: 600px;
  height: 600px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 122, 47, 0.12), transparent 70%);
  pointer-events: none;
  animation: al-glow-pulse 6s ease-in-out infinite;
}
@keyframes al-glow-pulse {
  0%, 100% { opacity: 0.6; transform: scale(1); }
  50% { opacity: 0.9; transform: scale(1.1); }
}

.al-hero__content {
  width: min(800px, calc(100% - 36px));
  margin: 0 auto;
  padding: 100px 0 140px;
  position: relative;
  z-index: 1;
}

.al-hero__content h1 {
  font-size: clamp(38px, 5.5vw, 70px);
  line-height: 1.04;
  max-width: 720px;
  margin-bottom: var(--al-space-5);
}

.al-hero__copy {
  max-width: 600px;
  color: #dce7e4;
  font-size: 18px;
  line-height: 1.7;
  margin: 0;
}

.al-hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--al-space-3);
  margin-top: var(--al-space-8);
}

.al-hero__stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border: 1px solid var(--al-border);
  border-radius: var(--al-radius-lg);
  background: var(--al-bg-glass);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  overflow: hidden;
}

.al-hero__stat {
  padding: var(--al-space-5);
  border-right: 1px solid var(--al-border);
  transition: background var(--al-transition);
}
.al-hero__stat:hover { background: rgba(255, 255, 255, 0.03); }
.al-hero__stat:last-child { border-right: none; }
.al-hero__stat span { display: block; color: var(--al-text-secondary); font-size: 13px; }
.al-hero__stat strong { display: block; margin-top: var(--al-space-1); font-family: var(--al-font-display); font-size: 22px; }
.al-hero__stat-icon { font-size: 20px; margin-bottom: var(--al-space-1); display: block; }

.al-section {
  padding: clamp(50px, 6vw, 80px) clamp(18px, 5vw, 72px);
  border-top: 1px solid var(--al-border);
}

.al-section--compact { padding-top: 48px; padding-bottom: 48px; }

.al-section__head {
  max-width: 800px;
  margin-bottom: var(--al-space-6);
}
.al-section__head h2 { margin: 0; font-size: clamp(28px, 3.6vw, 44px); }
.al-section__head p { color: var(--al-text-secondary); line-height: 1.65; }

.al-feature-grid,
.al-step-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--al-space-5);
}

.al-feature-card {
  padding: var(--al-space-6);
  border: 1px solid var(--al-border);
  border-radius: var(--al-radius-lg);
  background: rgba(8, 18, 17, 0.68);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: var(--al-shadow-sm);
}

.al-feature-card span {
  display: inline-grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: var(--al-radius-md);
  background: linear-gradient(135deg, rgba(255, 122, 47, 0.15), rgba(255, 122, 47, 0.06));
  color: var(--al-orange-300);
  font-weight: 900;
  font-size: 18px;
  box-shadow: 0 2px 8px rgba(255, 122, 47, 0.1);
}
.al-feature-card__icon {
  font-size: 24px;
  background: linear-gradient(135deg, rgba(255, 122, 47, 0.15), rgba(85, 214, 194, 0.08)) !important;
}

.al-feature-card h3 { margin: var(--al-space-4) 0 var(--al-space-2); font-size: 20px; }
.al-feature-card p { color: var(--al-text-secondary); line-height: 1.65; margin: 0; }

.al-step-card { min-height: 200px; background: linear-gradient(180deg, rgba(255, 177, 93, 0.07), rgba(255, 255, 255, 0.03)); }
.al-step-card strong {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 30px;
  border: 1px solid rgba(85, 214, 194, 0.4);
  border-radius: var(--al-radius-md);
  color: var(--al-cyan);
  font-family: var(--al-font-display);
  font-weight: 700;
}

.al-database-card {
  background: var(--al-bg-elevated);
}
.al-database-card .al-btn--link { width: fit-content; }

/* ===================================================================
   15. LOGIN PAGE
   =================================================================== */
.al-login-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 28px;
}

.al-login-page > div {
  width: min(900px, 100%);
  display: grid;
  grid-template-columns: minmax(0, 1fr) 400px;
  gap: var(--al-space-6);
  align-items: center;
}

.al-login-brand img { width: 60px; height: 60px; border-radius: var(--al-radius-lg); }
.al-login-brand h1 { font-size: clamp(32px, 4vw, 52px); margin: var(--al-space-3) 0; }

.al-login-card { padding: var(--al-space-8); }
.al-login-card form { display: grid; gap: var(--al-space-4); }

.al-auth-switch {
  display: grid;
  gap: var(--al-space-3);
  margin-top: var(--al-space-4);
  text-align: center;
}
.al-auth-switch button {
  border: 0;
  background: transparent;
  color: var(--al-orange-200);
  font-weight: 800;
  cursor: pointer;
}

/* ===================================================================
   16. ADMIN PANEL
   =================================================================== */
.al-admin-shell {
  min-height: 100vh;
  padding: clamp(24px, 5vw, 72px);
}

.al-admin-login {
  min-height: calc(100vh - 144px);
  display: grid;
  place-items: center;
}

.al-admin-login-card {
  width: min(480px, 100%);
  display: grid;
  gap: var(--al-space-4);
}

.al-admin-logo {
  width: 68px;
  height: 68px;
  border-radius: var(--al-radius-lg);
  object-fit: contain;
  background: var(--al-orange-500);
  box-shadow: var(--al-shadow-glow);
}
.al-admin-logo--sm { width: 48px; height: 48px; }

.al-admin-header {
  display: flex;
  justify-content: space-between;
  gap: var(--al-space-5);
  align-items: end;
  margin-bottom: var(--al-space-6);
  flex-wrap: wrap;
}
.al-admin-header__brand {
  display: flex;
  align-items: center;
  gap: var(--al-space-4);
}
.al-admin-header h1 { font-size: clamp(38px, 5vw, 64px); }

.al-admin-dashboard { max-width: 1400px; margin: 0 auto; }

.al-stats-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: var(--al-space-3);
  margin-bottom: var(--al-space-5);
}

.al-stat {
  padding: var(--al-space-5);
  border: 1px solid var(--al-border);
  border-radius: var(--al-radius-lg);
  background: rgba(8, 18, 17, 0.68);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  position: relative;
  overflow: hidden;
}
/* 每个统计卡片的顶部彩色条 */
.al-stat::before {
  content: '';
  position: absolute;
  top: 0; left: 12px; right: 12px;
  height: 3px;
  border-radius: 0 0 3px 3px;
  background: linear-gradient(90deg, var(--al-orange-500), var(--al-orange-300));
  opacity: 0.6;
}
.al-stat:nth-child(2)::before { background: linear-gradient(90deg, var(--al-cyan), var(--al-cyan-400)); }
.al-stat:nth-child(3)::before { background: linear-gradient(90deg, var(--al-green), var(--al-green-400)); }
.al-stat:nth-child(4)::before { background: linear-gradient(90deg, #a78bfa, #818cf8); }
.al-stat:nth-child(5)::before { background: linear-gradient(90deg, var(--al-warning), var(--al-amber-400)); }
.al-stat:nth-child(6)::before { background: linear-gradient(90deg, var(--al-danger), var(--al-danger-400)); }
.al-stat span {
  display: block;
  font-size: 12px;
  color: var(--al-text-secondary);
  margin-bottom: var(--al-space-1);
  margin-top: 4px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.al-stat strong {
  display: block;
  font-size: 30px;
  font-weight: 800;
  color: var(--al-text-primary);
  font-family: var(--al-font-display);
}

.al-actions {
  display: flex;
  gap: var(--al-space-2);
  align-items: center;
  flex-wrap: wrap;
}

.al-form { display: grid; gap: var(--al-space-3); }

.al-form-note {
  display: grid;
  gap: 4px;
  padding: 12px 14px;
  border: 1px solid rgba(255, 142, 72, 0.28);
  border-radius: var(--al-radius-md);
  background: rgba(255, 142, 72, 0.08);
  color: var(--al-text-secondary);
  font-size: 13px;
  line-height: 1.55;
}

.al-form-note strong {
  color: var(--al-text-primary);
}

.al-email-status-row {
  display: grid;
  grid-template-columns: repeat(5, minmax(160px, 1fr));
  gap: var(--al-space-3);
  overflow-x: auto;
  padding-bottom: 2px;
}

.al-email-status-card {
  min-width: 160px;
  padding: 14px;
  border: 1px solid var(--al-border);
  border-radius: var(--al-radius-md);
  background: rgba(255, 255, 255, 0.035);
}

.al-email-status-card span,
.al-email-status-card small {
  display: block;
  color: var(--al-text-secondary);
  font-size: 12px;
}

.al-email-status-card strong {
  display: block;
  margin: 7px 0 4px;
  color: var(--al-text-primary);
  font-size: 15px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.al-admin-item {
  padding: var(--al-space-5);
  border: 1px solid var(--al-border);
  border-radius: var(--al-radius-lg);
  background: rgba(8, 18, 17, 0.72);
  backdrop-filter: blur(12px);
}

.al-admin-item--cols {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(240px, 0.5fr);
  gap: var(--al-space-5);
}

.al-admin-item--row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: var(--al-space-5);
}

.al-admin-actions {
  display: grid;
  gap: var(--al-space-2);
  align-content: start;
}

.al-deposit-address {
  padding: var(--al-space-4);
  border: 1px solid rgba(255, 122, 47, 0.3);
  border-radius: var(--al-radius-md);
  background: rgba(255, 122, 47, 0.06);
  word-break: break-all;
  color: #ffe3c5;
  font-size: 13px;
  font-family: monospace;
}

.al-code-block {
  margin: 0;
  min-height: 180px;
  padding: var(--al-space-4);
  border: 1px solid rgba(85, 214, 194, 0.22);
  border-radius: var(--al-radius-md);
  background: rgba(3, 9, 12, 0.76);
  color: #dffaf4;
  overflow-x: auto;
  white-space: pre-wrap;
  word-break: break-word;
  font: 13px/1.65 ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
}

.al-client-tabs {
  display: flex;
  gap: var(--al-space-2);
  margin-bottom: var(--al-space-4);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.al-client-tab {
  flex: 0 0 auto;
  padding: 8px 14px;
  border: 1px solid var(--al-border);
  border-radius: var(--al-radius-md);
  background: rgba(255, 255, 255, 0.03);
  color: var(--al-text-secondary);
  font-weight: 700;
  cursor: pointer;
}

.al-client-tab--active {
  border-color: rgba(85, 214, 194, 0.6);
  background: rgba(85, 214, 194, 0.12);
  color: var(--al-cyan);
}

.al-quick-panel h2 {
  margin: var(--al-space-1) 0 var(--al-space-2);
  font-size: 20px;
  overflow-wrap: anywhere;
}

.al-gateway-panel {
  max-width: 1280px;
  margin: 0 auto var(--al-space-5);
}

.al-gateway-panel h3 {
  margin: 0 0 var(--al-space-3);
  font-size: 18px;
}

/* ── Admin Tab Navigation ── */
.al-admin-tabs {
  display: flex;
  gap: 6px;
  margin-bottom: var(--al-space-6);
  padding: 5px;
  border-radius: var(--al-radius-lg);
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid var(--al-border-light);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.al-admin-tab {
  padding: 10px 22px;
  font-size: 14px;
  font-weight: 700;
  color: var(--al-text-secondary);
  background: transparent;
  border: 1px solid transparent;
  border-radius: var(--al-radius-md);
  cursor: pointer;
  white-space: nowrap;
  transition: all var(--al-transition);
}
.al-admin-tab:hover { color: #fff; background: rgba(255, 255, 255, 0.06); }
.al-admin-tab--active {
  color: #fff;
  background: linear-gradient(135deg, var(--al-orange-500), var(--al-orange-600));
  border-color: rgba(255, 255, 255, 0.2);
  box-shadow: 0 4px 16px rgba(255, 122, 47, 0.35), 0 0 0 1px rgba(255, 122, 47, 0.3);
}

/* ── Admin Section ── */
.al-admin-section { animation: al-fade-in 0.2s ease-out; }

/* ── Banned user row ── */
.al-row--banned { opacity: 0.55; }
.al-row--banned td { text-decoration: line-through; text-decoration-color: var(--al-text-secondary); }

/* ── Badge variants ── */
.al-badge--positive { background: rgba(143, 212, 107, 0.15); color: #8fd46b; }
.al-badge--danger { background: rgba(255, 82, 82, 0.15); color: #ff5252; }
.al-badge--warning { background: rgba(255, 193, 7, 0.15); color: #ffc107; }

/* ── Dimmed admin item ── */
.al-admin-item--dim { opacity: 0.6; }

/* ── Stats grid 4-col ── */
.al-stats-grid--4 {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--al-space-3);
  margin-bottom: var(--al-space-5);
}

/* ── Button group ── */
.al-btn-group {
  display: flex;
  gap: 0;
  border: 1px solid var(--al-border);
  border-radius: var(--al-radius-md);
  overflow: hidden;
}
.al-btn-group .al-btn,
.al-btn-group .al-btn--sm {
  border: none;
  border-radius: 0;
  background: none;
  color: var(--al-text-secondary);
}
.al-btn-group .al-btn--active {
  background: var(--al-orange-500);
  color: #fff;
}

/* ── Button xs ── */
.al-btn--xs {
  padding: 4px 12px;
  font-size: 12px;
  font-weight: 600;
  border: 1px solid var(--al-border);
  border-radius: var(--al-radius-md);
  background: none;
  color: var(--al-text-secondary);
  cursor: pointer;
  transition: color 0.15s, background 0.15s, border-color 0.15s;
}
.al-btn--xs:hover { color: var(--al-text-primary); border-color: var(--al-orange-500); }
.al-btn--xs.al-btn--active {
  background: var(--al-orange-500);
  color: #fff;
  border-color: var(--al-orange-500);
}

/* ── Modal ── */
.al-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  display: grid;
  place-items: center;
  z-index: var(--al-z-modal);
  padding: var(--al-space-4);
  animation: al-fade-in 0.2s ease-out;
}
.al-modal {
  width: min(800px, 100%);
  max-height: 85vh;
  display: grid;
  grid-template-rows: auto 1fr;
  background: var(--al-bg-elevated);
  border: 1px solid var(--al-border-strong);
  border-radius: var(--al-radius-xl);
  box-shadow: var(--al-shadow-lg), 0 0 60px rgba(0, 0, 0, 0.5);
  overflow: hidden;
  animation: al-modal-in 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes al-modal-in {
  from { opacity: 0; transform: translateY(20px) scale(0.97); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
.al-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--al-space-5) var(--al-space-6);
  border-bottom: 1px solid var(--al-border-light);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.03), transparent);
}
.al-modal-header h2 { margin: 0; font-size: 20px; }
.al-modal-header .al-btn--ghost {
  font-size: 24px;
  padding: 0 8px;
  line-height: 1;
  border-radius: var(--al-radius-sm);
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.al-modal-header .al-btn--ghost:hover { background: rgba(255, 109, 109, 0.15); color: var(--al-danger); }
.al-modal-body {
  overflow-y: auto;
  padding: var(--al-space-6);
}
.al-modal-tabs {
  display: flex;
  gap: var(--al-space-1);
  border-bottom: 1px solid var(--al-border-light);
  margin-bottom: var(--al-space-5);
  overflow-x: auto;
  padding-bottom: 0;
}
.al-modal-tab {
  padding: var(--al-space-2) var(--al-space-4);
  font-size: 13px;
  font-weight: 600;
  color: var(--al-text-secondary);
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  cursor: pointer;
  white-space: nowrap;
  transition: all var(--al-transition-fast);
  margin-bottom: -1px;
}
.al-modal-tab:hover { color: var(--al-text-primary); }
.al-modal-tab--active {
  color: var(--al-orange-400);
  border-bottom-color: var(--al-orange-500);
}
.al-modal-content { min-height: 100px; }

.al-model-select-list {
  display: grid;
  max-height: 360px;
  overflow: auto;
  border: 1px solid var(--al-border);
  border-radius: var(--al-radius-md);
  background: rgba(0, 0, 0, 0.16);
}
.al-model-select-row {
  display: grid;
  grid-template-columns: 20px 1fr;
  gap: var(--al-space-3);
  align-items: center;
  padding: var(--al-space-3) var(--al-space-4);
  border-bottom: 1px solid var(--al-border);
  cursor: pointer;
}
.al-model-select-row:last-child { border-bottom: 0; }
.al-model-select-row:hover { background: rgba(255, 255, 255, 0.04); }
.al-model-select-row strong,
.al-model-select-row small {
  display: block;
}
.al-model-select-row small {
  margin-top: 3px;
  color: var(--al-text-secondary);
}

/* ── Detail grid ── */
.al-detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--al-space-3);
}
.al-detail-grid div {
  padding: var(--al-space-2) 0;
}
.al-detail-grid strong {
  display: block;
  font-size: 11px;
  text-transform: uppercase;
  color: var(--al-text-secondary);
  letter-spacing: 0.5px;
  margin-bottom: 2px;
}
.al-detail-grid p { margin: 0; }

/* ── Ledger list ── */
.al-ledger-list {
  display: grid;
  gap: 1px;
  background: var(--al-border);
  border: 1px solid var(--al-border);
  border-radius: var(--al-radius-md);
  overflow: hidden;
}
.al-ledger-row {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: var(--al-space-3);
  align-items: center;
  padding: var(--al-space-3) var(--al-space-4);
  background: var(--al-bg);
  font-size: 13px;
}
.al-ledger-row small { color: var(--al-text-secondary); font-size: 11px; }

.hidden { display: none !important; }

/* ── Text colors ── */
.al-text--danger { color: #ff5252; }

/* ===================================================================
   17. UTILITY / MISC
   =================================================================== */
.al-question-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--al-space-5);
}

.al-quest-card {
  display: grid;
  grid-template-rows: auto 1fr auto auto;
  gap: var(--al-space-4);
  padding: var(--al-space-5);
  border: 1px solid var(--al-border);
  border-radius: var(--al-radius-lg);
  background: var(--al-bg-elevated);
}

.al-quest-card.complete { border-color: rgba(143, 212, 107, 0.3); }

.al-quest-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--al-space-2);
}

.al-field--proof {
  display: grid;
  gap: var(--al-space-1);
  color: var(--al-text-secondary);
  font-size: 13px;
  font-weight: 700;
}

.al-inline-adjust {
  display: flex;
  gap: var(--al-space-2);
  align-items: center;
  flex-wrap: wrap;
}

.al-qty-table { width: 100%; min-width: 600px; border-collapse: collapse; }
.al-qty-table th,
.al-qty-table td { padding: 12px; border-bottom: 1px solid var(--al-border); text-align: left; }
.al-qty-table th { color: var(--al-cyan); font-size: 12px; text-transform: uppercase; }

/* ===================================================================
   18. ANIMATIONS
   =================================================================== */
@keyframes al-fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes al-slide-up {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes al-slide-down {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes al-scale-in {
  from { opacity: 0; transform: scale(0.95); }
  to { opacity: 1; transform: scale(1); }
}

@keyframes al-shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

@keyframes al-pulse-ring {
  0% { box-shadow: 0 0 0 0 rgba(255, 122, 47, 0.4); }
  70% { box-shadow: 0 0 0 10px rgba(255, 122, 47, 0); }
  100% { box-shadow: 0 0 0 0 rgba(255, 122, 47, 0); }
}

@keyframes al-glow-pulse {
  0%, 100% { opacity: 0.6; transform: scale(1); }
  50% { opacity: 0.9; transform: scale(1.1); }
}

/* Animation utility classes */
.al-animate-fade-in { animation: al-fade-in var(--al-transition-slow) ease-out both; }
.al-animate-slide-up { animation: al-slide-up var(--al-transition-slow) ease-out both; }
.al-animate-scale-in { animation: al-scale-in var(--al-transition-slow) ease-out both; }

/* Staggered card animations */
.al-stagger > * {
  opacity: 0;
  animation: al-slide-up 0.4s ease-out forwards;
}
.al-stagger > *:nth-child(1) { animation-delay: 0.05s; }
.al-stagger > *:nth-child(2) { animation-delay: 0.1s; }
.al-stagger > *:nth-child(3) { animation-delay: 0.15s; }
.al-stagger > *:nth-child(4) { animation-delay: 0.2s; }
.al-stagger > *:nth-child(5) { animation-delay: 0.25s; }
.al-stagger > *:nth-child(6) { animation-delay: 0.3s; }

/* Shimmer loading effect */
.al-shimmer {
  background: linear-gradient(90deg, transparent 0%, rgba(255,255,255,0.04) 50%, transparent 100%);
  background-size: 200% 100%;
  animation: al-shimmer 2s ease-in-out infinite;
}

/* Pulse ring for attention */
.al-pulse-ring {
  animation: al-pulse-ring 2s ease-out infinite;
}

/* ===================================================================
   19. RESPONSIVE
   =================================================================== */

/* Tablet landscape */
@media (max-width: 1100px) {
  .al-grid--4,
  .al-feature-grid,
  .al-step-grid,
  .al-stats-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .al-question-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .al-hero__stats { grid-template-columns: repeat(2, 1fr); }
  .al-hero__stat:nth-child(2) { border-right: none; }
  .al-hero__stat:nth-child(3),
  .al-hero__stat:nth-child(4) { border-top: 1px solid var(--al-border); }
  .al-hero__glow { width: 400px; height: 400px; top: -10%; right: -20%; }
}

/* Tablet portrait */
@media (max-width: 860px) {
  .al-app { grid-template-columns: 1fr; }
  .al-sidebar {
    position: static;
    height: auto;
    flex-direction: row;
    flex-wrap: wrap;
    padding: var(--al-space-3) var(--al-space-4);
    gap: var(--al-space-2);
    border-right: none;
    border-bottom: 1px solid var(--al-border);
  }
  .al-nav { flex-direction: row; flex-wrap: wrap; gap: var(--al-space-1); }
  .al-nav-section { display: none; }
  .al-sidebar-footer { margin-top: 0; flex-direction: row; margin-left: auto; border-top: none; padding-top: 0; }
  .al-nav-link--active::before { display: none; }
  .al-topbar,
  .al-login-page > div,
  .al-admin-item--cols,
  .al-admin-item--row {
    flex-direction: column;
    align-items: stretch;
  }
  .al-login-page > div { grid-template-columns: 1fr; }
  .al-grid--2 { grid-template-columns: 1fr; }
  .al-grid--3 { grid-template-columns: 1fr; }
  .al-stats-grid { grid-template-columns: repeat(3, 1fr); }
  .al-admin-tabs { gap: var(--al-space-1); }
  .al-admin-tab { padding: var(--al-space-2) var(--al-space-3); font-size: 13px; }
  .al-main { padding: 20px 16px 32px; }
}

/* Mobile */
@media (max-width: 640px) {
  /* Grids */
  .al-stats-grid { grid-template-columns: repeat(2, 1fr); }
  .al-grid--4,
  .al-feature-grid,
  .al-step-grid,
  .al-question-grid {
    grid-template-columns: 1fr;
  }

  /* Top actions */
  .al-top-actions { width: 100%; justify-content: stretch; }
  .al-top-actions .al-btn,
  .al-top-actions .al-btn--secondary,
  .al-top-actions .al-btn--ghost { flex: 1; text-align: center; }

  /* Hero */
  .al-hero {
    min-height: auto;
  }
  .al-hero__content {
    padding: 48px 0 40px;
  }
  .al-hero__content h1 { font-size: 28px; }
  .al-hero__content h1 br { display: none; }
  .al-hero__copy { font-size: 15px; }
  .al-hero__actions {
    flex-direction: column;
  }
  .al-hero__actions .al-btn,
  .al-hero__actions .al-btn--secondary { width: 100%; text-align: center; }
  .al-hero__stats { grid-template-columns: 1fr; }
  .al-hero__stat { border-right: none; border-bottom: 1px solid var(--al-border); }
  .al-hero__stat:last-child { border-bottom: none; }
  .al-hero__glow { width: 250px; height: 250px; top: 0; right: -30%; }

  /* Sections */
  .al-section {
    padding-top: 36px;
    padding-bottom: 36px;
  }
  .al-section__head h2 { font-size: 24px; }

  /* Feature cards */
  .al-feature-card {
    padding: 18px;
  }
  .al-feature-card h3 {
    font-size: 18px;
  }

  /* Sidebar — compact */
  .al-brand span,
  .al-brand small {
    display: none;
  }
  .al-sidebar {
    gap: var(--al-space-2);
    padding: var(--al-space-2);
  }
  .al-nav-link {
    min-height: 36px;
    padding: 0 var(--al-space-2);
    font-size: 13px;
  }
  .al-nav-icon { width: 24px; height: 24px; font-size: 10px; }

  /* Login */
  .al-login-card {
    padding: 20px;
  }
  .al-login-brand h1 { font-size: 28px; }

  /* Admin header */
  .al-admin-header h1 {
    font-size: clamp(28px, 8vw, 42px);
  }
  .al-admin-header__brand { gap: var(--al-space-2); }
  .al-admin-logo--sm { width: 36px; height: 36px; }

  /* Admin tabs */
  .al-admin-tabs {
    gap: 4px;
    padding: 4px;
    border-radius: var(--al-radius-md);
  }
  .al-admin-tab {
    padding: 6px 12px;
    font-size: 12px;
  }

  /* Admin stats */
  .al-stat {
    padding: 14px;
  }
  .al-stat strong {
    font-size: 22px;
  }

  /* Admin review cards */
  .al-admin-item {
    padding: 16px;
  }
  .al-admin-item--cols {
    grid-template-columns: 1fr;
  }
  .al-admin-item--cols .al-actions {
    display: grid;
    gap: var(--al-space-2);
  }
  .al-admin-item--cols .al-actions input {
    width: 100%;
  }
  .al-admin-item--cols .al-actions .al-btn,
  .al-admin-item--cols .al-actions .al-btn--secondary {
    width: 100%;
    justify-content: center;
  }

  /* Table */
  .al-table th,
  .al-table td {
    padding: 10px 10px;
    font-size: 13px;
  }

  /* User adjust row */
  .al-inline-adjust {
    flex-direction: column;
    align-items: stretch;
  }
  .al-inline-adjust select,
  .al-inline-adjust input,
  .al-inline-adjust .al-btn--secondary {
    width: 100%;
  }

  /* Chat */
  .al-chat-message { max-width: 100%; }
  .al-chat-messages { padding: var(--al-space-3); }

  /* Topbar — home page */
  .al-topbar--home { flex-direction: column; align-items: flex-start; gap: var(--al-space-3); }

  /* Home nav — compact */
  .al-nav--horizontal {
    gap: 8px;
    font-size: 12px;
    flex-wrap: wrap;
  }

  /* Panel */
  .al-panel { padding: var(--al-space-4); }

  /* Modal */
  .al-modal { max-height: 90vh; border-radius: var(--al-radius-lg); }
  .al-modal-header { padding: var(--al-space-3) var(--al-space-4); }
  .al-modal-body { padding: var(--al-space-4); }
}

/* ===================================================================
   20. UTILITY / EMPTY STATES
   =================================================================== */
.al-empty-state {
  text-align: center;
  padding: var(--al-space-10) var(--al-space-5);
  color: var(--al-text-dimmed);
}
.al-empty-state__icon {
  font-size: 48px;
  display: block;
  margin-bottom: var(--al-space-4);
  opacity: 0.5;
}
.al-empty-state h3 {
  margin-bottom: var(--al-space-2);
  color: var(--al-text-secondary);
}
.al-empty-state p {
  margin: 0;
  font-size: 14px;
}

.al-divider {
  width: 100%;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--al-border), transparent);
  margin: var(--al-space-6) 0;
  border: none;
}

.al-highlight-box {
  padding: var(--al-space-4) var(--al-space-5);
  border: 1px solid rgba(255, 122, 47, 0.2);
  border-radius: var(--al-radius-md);
  background: linear-gradient(135deg, rgba(255, 122, 47, 0.06), rgba(255, 122, 47, 0.01));
  color: var(--al-text-primary);
}

/* ===================================================================
   21. LANGUAGE SWITCHER
   =================================================================== */
.alice-lang-switcher {
  display: inline-flex;
  align-items: center;
  gap: var(--al-space-2);
  min-height: 36px;
  padding: 0 10px;
  border: 1px solid var(--al-border);
  border-radius: var(--al-radius-md);
  background: rgba(0, 0, 0, 0.28);
  color: var(--al-text-primary);
  font-weight: 700;
  font-size: 13px;
  font-family: var(--al-font-sans);
  white-space: nowrap;
}
.alice-lang-switcher select {
  min-height: 28px;
  border-radius: var(--al-radius-sm);
  border: 1px solid var(--al-border);
  background: #0b1716;
  color: var(--al-text-primary);
  padding: 0 6px;
  font-size: 13px;
  font-family: var(--al-font-sans);
  outline: none;
  cursor: pointer;
}
.alice-lang-switcher option {
  background: #ffffff;
  color: #111827;
}

/* ===================================================================
   22. SaaS Workspace Polish
   =================================================================== */
.al-app {
  grid-template-columns: 248px minmax(0, 1fr);
  background: linear-gradient(180deg, rgba(7, 16, 15, 0.96), rgba(7, 16, 15, 1));
}

.al-sidebar {
  gap: 18px;
  padding: 20px 14px;
  background: rgba(5, 15, 14, 0.96);
  border-right-color: rgba(255, 255, 255, 0.08);
}

.al-sidebar .al-brand {
  min-height: 44px;
  padding: 0 8px;
}

.al-logo {
  width: 36px;
  height: 36px;
  border-radius: 8px;
}

.al-nav {
  gap: 2px;
}

.al-nav-section {
  margin: 16px 10px 6px;
  color: #71817e;
  font-size: 10px;
}

.al-nav-link {
  min-height: 38px;
  border-radius: 8px;
  color: #b9c8c4;
}

.al-nav-link--active {
  background: rgba(255, 122, 47, 0.13);
  box-shadow: inset 0 0 0 1px rgba(255, 122, 47, 0.22);
}

.al-nav-icon {
  width: 26px;
  height: 26px;
  border-radius: 7px;
}

.al-main {
  padding: 24px clamp(18px, 3vw, 36px) 40px;
}

.al-topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  margin: -24px calc(clamp(18px, 3vw, 36px) * -1) 22px;
  padding: 18px clamp(18px, 3vw, 36px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(7, 16, 15, 0.88);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.al-page-title h1 {
  font-size: clamp(22px, 2vw, 28px);
}

.al-page-title p {
  max-width: 760px;
  font-size: 14px;
}

.al-card,
.al-panel,
.al-stat,
.al-admin-item,
.al-table-wrap {
  border-radius: 8px;
  background: rgba(10, 22, 21, 0.62);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.22);
}

.al-card,
.al-stat {
  padding: 16px;
}

.al-panel,
.al-admin-item {
  padding: 20px;
}

.al-panel::after {
  display: none;
}

.al-card:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.25);
}

.al-card-icon {
  width: 36px;
  height: 36px;
  border-radius: 8px;
}

.al-card strong {
  font-size: 22px;
}

.al-panel-header {
  margin-bottom: 16px;
}

.al-panel-header h2 {
  font-size: 19px;
}

.al-stats-grid {
  gap: 12px;
}

.al-stat strong {
  font-size: 24px;
}

.al-table-wrap {
  background: rgba(0, 0, 0, 0.12);
}

.al-table th {
  padding: 12px 14px;
  color: #8fd8cc;
  background: rgba(255, 255, 255, 0.035);
}

.al-table td {
  padding: 12px 14px;
}

.al-btn,
.al-btn--secondary,
.al-btn--ghost,
.al-userbox,
.al-balance-pill,
.al-input,
.al-badge {
  border-radius: 8px;
}

.al-page--home {
  background: #07100f;
}

.al-topbar--home {
  padding: 14px clamp(18px, 4vw, 56px);
  background: rgba(7, 16, 15, 0.9);
}

.al-hero {
  min-height: min(720px, 86vh);
  background-image: linear-gradient(90deg, rgba(7,16,15,0.96), rgba(7,16,15,0.68) 52%, rgba(7,16,15,0.38)), url("assets/alice-portal-hero.png");
}

.al-hero__content {
  width: min(1080px, calc(100% - 40px));
  padding: 90px 0 120px;
}

.al-hero__content h1 {
  max-width: 760px;
  font-size: clamp(42px, 5vw, 68px);
}

.al-hero__copy {
  max-width: 680px;
}

.al-section {
  padding: clamp(42px, 5vw, 68px) clamp(18px, 5vw, 72px);
}

.al-feature-card {
  border-radius: 8px;
  background: rgba(10, 22, 21, 0.58);
}

.al-doc-simple-tools {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--al-border-light);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.035);
}

.al-doc-simple-tools span {
  color: var(--al-text-secondary);
  font-size: 13px;
  font-weight: 700;
}

.al-doc-editor-grid {
  align-items: stretch;
  margin-top: var(--al-space-4);
}

.al-doc-editor-field,
.al-doc-preview-panel {
  height: 100%;
}

.al-doc-textarea {
  min-height: 520px;
  resize: vertical;
  line-height: 1.72;
  font-size: 15px;
}

.al-doc-preview-panel {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.02)),
    rgba(10, 22, 21, 0.6);
}

.al-doc-prose {
  color: var(--al-text-secondary);
  line-height: 1.78;
}

.al-doc-prose h2,
.al-doc-prose h3 {
  margin: 26px 0 10px;
  color: var(--al-text-primary);
  font-family: var(--al-font-display);
  letter-spacing: -0.02em;
}

.al-doc-prose h2:first-child,
.al-doc-prose h3:first-child {
  margin-top: 0;
}

.al-doc-prose h2 {
  font-size: clamp(22px, 2vw, 30px);
}

.al-doc-prose h3 {
  font-size: 19px;
}

.al-doc-prose p {
  margin: 0 0 14px;
}

.al-doc-prose ul {
  display: grid;
  gap: 10px;
  margin: 12px 0 18px;
  padding: 0;
  list-style: none;
}

.al-doc-prose li {
  position: relative;
  padding: 12px 14px 12px 36px;
  border: 1px solid var(--al-border-light);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.035);
}

.al-doc-prose li::before {
  content: "";
  position: absolute;
  left: 15px;
  top: 20px;
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: var(--al-orange-400);
  box-shadow: 0 0 18px rgba(255, 122, 47, 0.45);
}

.al-doc-prose code {
  padding: 2px 6px;
  border: 1px solid var(--al-border-light);
  border-radius: 6px;
  color: var(--al-text-primary);
  background: rgba(0, 0, 0, 0.25);
}

.al-doc-prose a {
  color: var(--al-text-accent);
  text-decoration: none;
}

.al-doc-prose a:hover {
  text-decoration: underline;
}

@media (max-width: 860px) {
  .al-topbar {
    position: static;
    margin: 0 0 18px;
    padding: 0;
    border-bottom: 0;
    background: transparent;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }

  .al-sidebar {
    position: sticky;
    top: 0;
    z-index: 30;
  }

  .al-doc-textarea {
    min-height: 360px;
  }
}

@media (max-width: 640px) {
  .al-main {
    padding: 16px 12px 28px;
  }

  .al-card,
  .al-stat,
  .al-panel,
  .al-admin-item {
    padding: 16px;
  }
}

/* ===================================================================
   23. Home Refresh
   =================================================================== */
.al-page--home {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(circle at 14% 10%, rgba(255, 122, 47, 0.14), transparent 28%),
    radial-gradient(circle at 86% 4%, rgba(85, 214, 194, 0.13), transparent 26%),
    linear-gradient(180deg, #07100f 0%, #07100f 46%, #091513 100%);
}

.al-topbar--home {
  justify-content: center;
  gap: clamp(16px, 4vw, 72px);
}

.al-home-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.al-home-hero {
  position: relative;
  padding: clamp(72px, 9vw, 132px) clamp(18px, 5vw, 72px) clamp(48px, 7vw, 88px);
}

.al-home-hero__grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(340px, 0.72fr);
  gap: clamp(28px, 5vw, 76px);
  align-items: center;
  width: min(1180px, 100%);
  margin: 0 auto;
}

.al-home-hero__copy h1 {
  max-width: 760px;
  margin: 0;
  color: var(--al-text-primary);
  font-size: clamp(44px, 6.2vw, 86px);
  line-height: 0.95;
  letter-spacing: -0.07em;
}

.al-home-hero__copy > p:not(.al-eyebrow) {
  max-width: 650px;
  margin: 24px 0 0;
  color: #b9c9c5;
  font-size: clamp(17px, 1.45vw, 21px);
  line-height: 1.72;
}

.al-home-hero__orb {
  position: absolute;
  border-radius: 999px;
  filter: blur(8px);
  opacity: 0.8;
  pointer-events: none;
}

.al-home-hero__orb--orange {
  right: 8%;
  top: 18%;
  width: 240px;
  height: 240px;
  background: radial-gradient(circle, rgba(255, 122, 47, 0.24), transparent 68%);
}

.al-home-hero__orb--cyan {
  left: 5%;
  bottom: 4%;
  width: 180px;
  height: 180px;
  background: radial-gradient(circle, rgba(85, 214, 194, 0.18), transparent 68%);
}

.al-home-console {
  position: relative;
  padding: 22px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 14px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.03)),
    rgba(4, 10, 10, 0.74);
  box-shadow: 0 32px 90px rgba(0, 0, 0, 0.38);
  backdrop-filter: blur(22px);
  -webkit-backdrop-filter: blur(22px);
}

.al-home-console__bar {
  display: flex;
  gap: 7px;
  margin-bottom: 22px;
}

.al-home-console__bar span {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: var(--al-orange-400);
}

.al-home-console__bar span:nth-child(2) { background: var(--al-amber-400); }
.al-home-console__bar span:nth-child(3) { background: var(--al-cyan); }

.al-home-console__row {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.09);
}

.al-home-console__row small {
  color: var(--al-text-dimmed);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.al-home-console__row strong {
  color: var(--al-text-primary);
  text-align: right;
}

.al-home-console__code {
  display: grid;
  gap: 8px;
  margin-top: 16px;
  padding: 16px;
  border-radius: 10px;
  color: #8fd8cc;
  background: rgba(0, 0, 0, 0.36);
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 13px;
}

.al-home-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  width: min(1180px, calc(100% - 36px));
  margin: 0 auto clamp(42px, 6vw, 76px);
  border: 1px solid var(--al-border);
  border-radius: 14px;
  background: rgba(10, 22, 21, 0.64);
  overflow: hidden;
}

.al-home-strip article {
  min-height: 150px;
  padding: 22px;
  border-right: 1px solid var(--al-border);
}

.al-home-strip article:last-child {
  border-right: 0;
}

.al-home-strip strong,
.al-home-strip span {
  display: block;
}

.al-home-strip strong {
  margin-bottom: 10px;
  color: var(--al-text-primary);
  font-size: 17px;
}

.al-home-strip span {
  color: var(--al-text-secondary);
  line-height: 1.6;
}

.al-home-product,
.al-home-split,
.al-home-docs {
  width: min(1180px, 100%);
  margin: 0 auto;
}

.al-home-setup {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.al-home-setup article {
  display: grid;
  gap: 14px;
  padding: 22px;
  border: 1px solid var(--al-border);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.04);
}

.al-home-setup span {
  color: var(--al-orange-300);
  font-weight: 900;
}

.al-home-setup strong {
  color: var(--al-text-primary);
  font-size: 22px;
}

.al-home-setup code {
  width: 100%;
  overflow-wrap: anywhere;
  color: #8fd8cc;
}

.al-home-split {
  display: grid;
  grid-template-columns: minmax(280px, 0.72fr) minmax(0, 1fr);
  gap: clamp(24px, 4vw, 54px);
  align-items: start;
}

.al-home-split h2,
.al-home-cta h2 {
  margin: 0;
  color: var(--al-text-primary);
  font-size: clamp(28px, 3.4vw, 48px);
  line-height: 1.05;
  letter-spacing: -0.04em;
}

.al-feature-grid--home {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.al-home-cta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  width: min(1180px, calc(100% - 36px));
  margin: clamp(28px, 5vw, 60px) auto;
  padding: clamp(24px, 4vw, 44px);
  border: 1px solid rgba(255, 122, 47, 0.2);
  border-radius: 16px;
  background:
    radial-gradient(circle at 92% 12%, rgba(255, 122, 47, 0.18), transparent 28%),
    rgba(10, 22, 21, 0.72);
}

@media (max-width: 860px) {
  .al-home-hero__grid,
  .al-home-split {
    grid-template-columns: 1fr;
  }

  .al-home-strip,
  .al-home-setup,
  .al-feature-grid--home {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .al-topbar--home {
    align-items: stretch;
    gap: 12px;
  }

  .al-nav--horizontal,
  .al-home-actions {
    width: 100%;
    justify-content: center;
    flex-wrap: wrap;
  }

  .al-home-actions .alice-lang-switcher {
    flex: 0 0 100%;
    justify-content: center;
  }

  .al-home-hero {
    padding-top: 48px;
  }

  .al-home-hero__copy h1 {
    font-size: 38px;
  }

  .al-home-console__row {
    flex-direction: column;
  }

  .al-home-console__row strong {
    text-align: left;
    overflow-wrap: anywhere;
  }

  .al-home-strip,
  .al-home-setup,
  .al-feature-grid--home {
    grid-template-columns: 1fr;
  }

  .al-home-strip article {
    min-height: auto;
    border-right: 0;
    border-bottom: 1px solid var(--al-border);
  }

  .al-home-strip article:last-child {
    border-bottom: 0;
  }

  .al-home-cta {
    align-items: stretch;
    flex-direction: column;
  }
}

/* ===================================================================
   (end)
   =================================================================== */
