/* ═══════════════════════════════════════════════════════════════
   Amity Assignment Helper — Design System (Staking Vent Theme)
   Inspired by Staking Vent & Modern Web3/Fintech Interface
   Palette: Electric Lime (#D4FF00) | Emerald (#10B981) | Obsidian (#111418) | Neutral (#F4F5F8)
═══════════════════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&family=JetBrains+Mono:wght@400;500;600&display=swap');

/* ── CSS Variables ──────────────────────────────────────────── */
:root {
  /* Brand Tokens (from Style Guide) */
  --primary: #D4FF00;          /* Electric Volt / Lime */
  --primary-hover: #c4ee00;
  --secondary: #10B981;        /* Emerald Green */
  --secondary-light: #ECFDF5;
  --tertiary: #111418;         /* Jet Obsidian Black */
  --neutral: #F4F5F8;          /* Crisp Canvas Gray */

  /* Surface & Canvas */
  --bg-0: #F4F5F8;             /* Canvas background */
  --bg-1: #FFFFFF;             /* Pure white card surface */
  --bg-2: #F8F9FB;             /* Sub-surface / input background */
  --bg-3: #ECEEF2;             /* Pill / active background */
  --bg-glass: #FFFFFF;
  --bg-glass-hover: #F6F7FA;

  /* Borders */
  --border: #E2E4E9;           /* Subtle card border */
  --border-hover: #CBD0D8;
  --border-light: #F0F2F5;

  /* Typography */
  --text-1: #111418;           /* High contrast obsidian black */
  --text-2: #5E6470;           /* Slate muted description */
  --text-3: #94A3B8;           /* Subtle placeholder */

  /* Accents */
  --accent: #111418;           /* Primary interactive obsidian */
  --accent-2: #242930;
  --accent-lime: #D4FF00;      /* Electric Lime accent */
  --accent-glow: rgba(212, 255, 0, 0.45);

  --green: #10B981;
  --green-glow: rgba(16, 185, 129, 0.15);
  --red: #EF4444;
  --red-glow: rgba(239, 68, 68, 0.12);
  --yellow: #F59E0B;
  --yellow-glow: rgba(245, 158, 11, 0.12);
  --blue: #3B82F6;

  --gradient-primary: linear-gradient(135deg, #111418, #232830);
  --gradient-lime: linear-gradient(135deg, #D4FF00, #B8F000);
  --gradient-card: linear-gradient(180deg, #FFFFFF 0%, #FAFAFC 100%);

  /* Corner Radius */
  --radius-xs: 6px;
  --radius-sm: 10px;
  --radius: 14px;
  --radius-lg: 18px;
  --radius-xl: 24px;
  --radius-pill: 9999px;

  /* Shadows */
  --shadow-sm: 0 1px 3px rgba(17, 20, 24, 0.04);
  --shadow: 0 2px 10px rgba(17, 20, 24, 0.03), 0 1px 3px rgba(17, 20, 24, 0.02);
  --shadow-card: 0 4px 20px -2px rgba(17, 20, 24, 0.04);
  --shadow-modal: 0 24px 48px -12px rgba(17, 20, 24, 0.18), 0 0 1px 1px rgba(17, 20, 24, 0.06);

  /* Fonts */
  --font: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  --transition: 0.18s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ── Reset & Base ───────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  background: var(--bg-0);
  color: var(--text-1);
  line-height: 1.55;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a { color: var(--text-1); text-decoration: none; transition: var(--transition); }
a:hover { color: #000; }

img, svg { display: block; max-width: 100%; }

/* ── Scrollbar ──────────────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--bg-0); }
::-webkit-scrollbar-thumb { background: #CBD0D8; border-radius: 99px; }
::-webkit-scrollbar-thumb:hover { background: #94A3B8; }

/* ── Typography ─────────────────────────────────────────────── */
h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  letter-spacing: -0.025em;
  color: var(--text-1);
}
h1 { font-size: clamp(1.75rem, 3.5vw, 2.35rem); line-height: 1.2; }
h2 { font-size: clamp(1.35rem, 2.5vw, 1.85rem); line-height: 1.25; }
h3 { font-size: 1.15rem; font-weight: 700; }

.text-muted { color: var(--text-2); }
.text-xs { font-size: 0.75rem; }
.text-sm { font-size: 0.875rem; }
.text-lg { font-size: 1.125rem; }
.text-xl { font-size: 1.25rem; }
.font-mono { font-family: var(--font-mono); }
.font-bold { font-weight: 700; }

/* ── Layout ─────────────────────────────────────────────────── */
.layout {
  display: flex;
  min-height: 100vh;
  background: var(--bg-0);
}

/* Minimalist Icon Sidebar (from Staking Vent) & Expanded Mode */
.sidebar {
  width: 76px;
  flex-shrink: 0;
  background: #FFFFFF;
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 24px 0 20px;
  position: sticky;
  top: 0;
  height: 100vh;
  z-index: 50;
  transition: width var(--transition);
}

/* Expanded sidebar support (e.g. for Admin or wider mode) */
.sidebar.sidebar-expanded,
.sidebar:not(.sidebar-compact) {
  width: 250px;
  align-items: stretch;
  padding: 24px 16px;
}

/* Compact sidebar (exact Staking Vent Image 4 pattern) */
.sidebar.sidebar-compact {
  width: 76px;
  align-items: center;
  padding: 24px 0 20px;
}

/* Logo mark */
.sidebar-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 24px;
  cursor: pointer;
  text-decoration: none;
  padding: 0 4px;
}
.sidebar.sidebar-compact .sidebar-logo {
  flex-direction: column;
  justify-content: center;
  padding: 0;
}
.sidebar-logo-icon {
  width: 42px;
  height: 42px;
  background: #111418;
  color: #FFFFFF;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  font-weight: 800;
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition);
  flex-shrink: 0;
}
.sidebar-logo-icon:hover { transform: scale(1.05); }
.sidebar-logo-text { font-weight: 800; font-size: 0.95rem; color: var(--text-1); }
.sidebar-logo-sub { color: var(--text-3); font-size: 0.72rem; }
.sidebar.sidebar-compact .sidebar-logo-text,
.sidebar.sidebar-compact .sidebar-logo-sub { display: none; }

.sidebar-nav-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  width: 100%;
}
.sidebar.sidebar-compact .sidebar-nav-group {
  align-items: center;
  gap: 12px;
  padding: 0 12px;
}

.sidebar-section-label {
  font-size: 0.68rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-3);
  padding: 14px 12px 6px;
}
.sidebar.sidebar-compact .sidebar-section-label { display: none; }

.nav-item {
  width: 100%;
  height: 42px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 14px;
  color: var(--text-2);
  background: transparent;
  border: none;
  cursor: pointer;
  position: relative;
  transition: var(--transition);
  font-size: 0.875rem;
  font-weight: 600;
  text-decoration: none;
  font-family: var(--font);
}
.sidebar.sidebar-compact .nav-item {
  width: 48px;
  height: 48px;
  justify-content: center;
  padding: 0;
  font-size: 1.15rem;
}
.nav-item:hover {
  background: #F4F5F8;
  color: var(--text-1);
}
.nav-item.active {
  background: #111418;
  color: #FFFFFF;
  box-shadow: 0 2px 8px rgba(17, 20, 24, 0.15);
}
.sidebar.sidebar-compact .nav-item.active {
  background: #F4F5F8;
  color: var(--text-1);
  box-shadow: none;
}
/* Electric lime indicator dot / pill on active nav item in compact mode */
.sidebar.sidebar-compact .nav-item.active::after {
  content: '';
  position: absolute;
  left: -12px;
  width: 4px;
  height: 24px;
  border-radius: 0 4px 4px 0;
  background: var(--primary);
}

.nav-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  color: var(--text-2);
  transition: color 0.18s ease;
}
.nav-icon svg {
  width: 20px;
  height: 20px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform 0.18s ease, stroke 0.18s ease;
}
.nav-item:hover .nav-icon {
  color: var(--text-1);
}
.nav-item:hover .nav-icon svg {
  transform: scale(1.08);
}
.nav-item.active .nav-icon {
  color: var(--text-1);
}

.sidebar-spacer { flex: 1; }

.sidebar-footer {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  width: 100%;
}

.sidebar-user-avatar {
  position: relative;
  cursor: pointer;
}
.sidebar-user-avatar .avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: #E2E4E9;
  color: #111418;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
}
.avatar-online-dot {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 11px;
  height: 11px;
  background: #10B981;
  border: 2px solid #FFFFFF;
  border-radius: 50%;
}

/* Main content view */
.main-content {
  flex: 1;
  padding: 32px 40px 60px;
  max-width: 1440px;
  margin: 0 auto;
  width: 100%;
}
@media (max-width: 900px) {
  .sidebar { width: 64px; }
  .main-content { padding: 20px 16px; }
}

/* ── Top Header Bar (from Staking Vent) ─────────────────────── */
.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 28px;
  gap: 20px;
  flex-wrap: wrap;
}
.header-titles {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.page-title {
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--text-1);
}
.page-subtitle {
  color: var(--text-2);
  font-size: 0.875rem;
  font-weight: 500;
}

.header-status-group {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Modern pill status chip */
.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #FFFFFF;
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  padding: 8px 16px;
  font-size: 0.825rem;
  font-weight: 600;
  color: var(--text-1);
  box-shadow: var(--shadow-sm);
}
.status-indicator-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--secondary);
  box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.2);
}

/* ── Cards ──────────────────────────────────────────────────── */
.card {
  background: #FFFFFF;
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 26px 28px;
  box-shadow: var(--shadow-card);
  transition: box-shadow var(--transition), border-color var(--transition);
}
.card:hover {
  border-color: #CBD0D8;
}

/* ── Top 4 Stat Cards (from Staking Vent) ────────────────────── */
.stat-card {
  background: #FFFFFF;
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 22px 24px;
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: transform var(--transition), box-shadow var(--transition);
  position: relative;
}
.stat-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px -4px rgba(17, 20, 24, 0.08);
}
.stat-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.stat-card-label-group {
  display: flex;
  align-items: center;
  gap: 8px;
}
.stat-card-icon {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.stat-card-icon svg {
  width: 12px;
  height: 12px;
  display: block;
}
.stat-label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-2);
}
.stat-value {
  font-size: 2.15rem;
  font-weight: 800;
  letter-spacing: -0.035em;
  color: var(--text-1);
  line-height: 1.1;
  margin: 4px 0 2px;
}
.stat-footer {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.775rem;
  color: var(--text-2);
}

/* Badges */
.badge-lime {
  background: var(--primary);
  color: #111418;
  font-weight: 700;
  font-size: 0.72rem;
  padding: 3px 8px;
  border-radius: var(--radius-pill);
}
.badge-black {
  background: #111418;
  color: #FFFFFF;
  font-weight: 600;
  font-size: 0.72rem;
  padding: 3px 10px;
  border-radius: var(--radius-pill);
}
.badge-emerald {
  background: var(--secondary-light);
  color: var(--secondary);
  font-weight: 700;
  font-size: 0.72rem;
  padding: 3px 8px;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(16, 185, 129, 0.2);
}

/* ── Interactive 2-Column Section (from Staking Vent) ───────── */
.staking-grid {
  display: grid;
  grid-template-columns: 420px 1fr;
  gap: 24px;
  margin-bottom: 28px;
}
@media (max-width: 1100px) {
  .staking-grid {
    grid-template-columns: 1fr;
  }
}

/* Action Staking Card (Left) */
.action-card {
  background: #FFFFFF;
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 26px 28px;
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
}

/* Text / Pill Tab Switcher */
.tab-switcher {
  display: flex;
  align-items: center;
  gap: 24px;
  margin-bottom: 24px;
  border-bottom: 1px solid var(--border-light);
  padding-bottom: 12px;
}
.tab-switcher-item {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-2);
  background: none;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 0;
  transition: var(--transition);
}
.tab-switcher-item:hover { color: var(--text-1); }
.tab-switcher-item.active {
  color: var(--text-1);
}
.tab-switcher-item.active .tab-dot {
  width: 7px;
  height: 7px;
  background: var(--primary);
  border-radius: 50%;
  display: inline-block;
  box-shadow: 0 0 6px var(--primary);
}

/* Numeric input container */
.amount-input-box {
  background: #F4F5F8;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 16px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  transition: border-color var(--transition);
}
.amount-input-box:focus-within {
  border-color: #111418;
  background: #FFFFFF;
  box-shadow: 0 0 0 2px rgba(17,20,24,0.06);
}
.amount-input-val {
  font-size: 1.45rem;
  font-weight: 800;
  color: var(--text-1);
  border: none;
  background: transparent;
  outline: none;
  width: 100%;
}
.amount-input-sub {
  font-size: 0.775rem;
  color: var(--text-3);
  margin-top: 2px;
}
.amount-max-pill {
  background: #FFFFFF;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 6px 12px;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-1);
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}
.amount-max-pill:hover {
  background: #111418;
  color: #FFFFFF;
  border-color: #111418;
}

/* Breakdown Spec Rows */
.spec-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 24px;
}
.spec-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.85rem;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--border-light);
}
.spec-row:last-child { border-bottom: none; }
.spec-label { color: var(--text-2); font-weight: 500; }
.spec-value { color: var(--text-1); font-weight: 700; }

/* Inverted Obsidian CTA Button with Glowing Lime Dot (from Image 4) */
.btn-staking-cta {
  background: #111418;
  color: #FFFFFF;
  border: none;
  border-radius: var(--radius-pill);
  padding: 16px 24px;
  font-size: 0.975rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  box-shadow: 0 4px 14px rgba(17, 20, 24, 0.25);
  transition: transform var(--transition), box-shadow var(--transition);
  text-decoration: none;
}
.btn-staking-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(17, 20, 24, 0.35);
  color: #FFFFFF;
}
.btn-staking-cta:active {
  transform: translateY(0);
}
.cta-dot-lime {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--primary);
  box-shadow: 0 0 10px var(--primary);
  display: inline-block;
}

/* Right Chart Overview Card */
.overview-chart-card {
  background: #FFFFFF;
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 26px 28px;
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.chart-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 16px;
}
.chart-pill-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #F4F5F8;
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  padding: 6px 14px;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-1);
}
.chart-dot-lime {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--primary);
  box-shadow: 0 0 8px var(--primary);
}

/* Bottom Stats Row under Chart */
.chart-metrics-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  border-top: 1px solid var(--border-light);
  padding-top: 18px;
  margin-top: 16px;
}
.chart-metric-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.chart-metric-label {
  font-size: 0.775rem;
  color: var(--text-2);
  font-weight: 500;
}
.chart-metric-val {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--text-1);
}

/* ── Recent Activity Table Card (Bottom) ────────────────────── */
.activity-card {
  background: #FFFFFF;
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 28px;
  box-shadow: var(--shadow-card);
}
.activity-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  flex-wrap: wrap;
  gap: 12px;
}
.activity-controls {
  display: flex;
  align-items: center;
  gap: 8px;
}
.activity-btn {
  background: #FFFFFF;
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  padding: 6px 16px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-1);
  cursor: pointer;
  transition: var(--transition);
}
.activity-btn:hover {
  border-color: #111418;
  background: #F4F5F8;
}

/* Clean Data Table */
.table-wrap {
  overflow-x: auto;
  width: 100%;
}
table {
  width: 100%;
  border-collapse: collapse;
}
th {
  text-align: left;
  padding: 12px 14px;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-2);
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
td {
  padding: 16px 14px;
  font-size: 0.875rem;
  color: var(--text-1);
  border-bottom: 1px solid var(--border-light);
  white-space: nowrap;
}
tr:last-child td { border-bottom: none; }
tr:hover td { background: #F8F9FA; }

/* Status pill indicator in table */
.status-cell-confirmed {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--secondary);
  font-weight: 600;
  font-size: 0.8rem;
}
.status-cell-confirmed::before {
  content: '';
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--secondary);
}

/* ── Buttons (General) ──────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: var(--radius-pill);
  font-family: var(--font);
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: var(--transition);
  white-space: nowrap;
  text-decoration: none;
}
.btn:disabled { opacity: 0.45; cursor: not-allowed; }

.btn-primary {
  background: #111418;
  color: #FFFFFF;
  box-shadow: 0 2px 8px rgba(17, 20, 24, 0.15);
}
.btn-primary:hover:not(:disabled) {
  background: #242930;
  transform: translateY(-1px);
  color: #FFFFFF;
}

.btn-lime {
  background: var(--primary);
  color: #111418;
  font-weight: 700;
  box-shadow: 0 2px 8px rgba(212, 255, 0, 0.2);
}
.btn-lime:hover:not(:disabled) {
  background: var(--primary-hover);
  transform: translateY(-1px);
}

.btn-secondary {
  background: #FFFFFF;
  color: var(--text-1);
  border: 1px solid var(--border);
}
.btn-secondary:hover:not(:disabled) {
  background: #F4F5F8;
  border-color: #CBD0D8;
}

.btn-ghost {
  background: transparent;
  color: var(--text-2);
  border: 1px solid transparent;
}
.btn-ghost:hover:not(:disabled) {
  background: #F4F5F8;
  color: var(--text-1);
}

.btn-danger { background: var(--red); color: #FFFFFF; }
.btn-danger:hover:not(:disabled) { background: #dc2626; }

.btn-sm { padding: 6px 14px; font-size: 0.8rem; }
.btn-lg { padding: 14px 28px; font-size: 1rem; }

/* ── Segmented Control (Slow | Standard | Fast from Image 1) ── */
.segmented-control {
  background: #F4F5F8;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 4px;
  display: flex;
  align-items: center;
  gap: 4px;
}
.segmented-item {
  flex: 1;
  text-align: center;
  padding: 8px 12px;
  font-size: 0.825rem;
  font-weight: 600;
  color: var(--text-2);
  background: none;
  border: none;
  border-radius: var(--radius-xs);
  cursor: pointer;
  transition: var(--transition);
}
.segmented-item.active {
  background: #111418;
  color: #FFFFFF;
  box-shadow: var(--shadow-sm);
}
.segmented-specs {
  display: flex;
  justify-content: space-between;
  margin-top: 8px;
  font-size: 0.75rem;
  color: var(--text-2);
  padding: 0 8px;
}

/* ── Modals (Exact pattern from Images 1, 2, 3) ─────────────── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(17, 20, 24, 0.4);
  backdrop-filter: blur(8px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition);
}
.modal-overlay.open { opacity: 1; pointer-events: all; }

.modal {
  background: #FFFFFF;
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 32px;
  width: 100%;
  max-width: 460px;
  transform: scale(0.96) translateY(12px);
  transition: transform var(--transition);
  box-shadow: var(--shadow-modal);
}
.modal-overlay.open .modal { transform: scale(1) translateY(0); }

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}
.modal-title {
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text-1);
}
.modal-close {
  background: none;
  border: none;
  color: var(--text-3);
  cursor: pointer;
  font-size: 1.25rem;
  padding: 4px;
  transition: var(--transition);
}
.modal-close:hover { color: var(--text-1); }

/* Form Elements */
.form-group { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; }
.form-label { font-size: 0.825rem; font-weight: 600; color: var(--text-1); }
.form-input, .form-select, .form-textarea {
  background: #F8F9FB;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-1);
  font-family: var(--font);
  font-size: 0.9rem;
  padding: 10px 14px;
  transition: var(--transition);
  width: 100%;
  outline: none;
}
.form-input:focus, .form-select:focus, .form-textarea:focus {
  border-color: #111418;
  background: #FFFFFF;
  box-shadow: 0 0 0 2px rgba(17,20,24,0.06);
}
.form-input::placeholder { color: var(--text-3); }

/* Grid helpers */
.grid { display: grid; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 900px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .grid-4, .grid-3, .grid-2 { grid-template-columns: 1fr; }
}

.gap-2 { gap: 8px; }
.gap-3 { gap: 12px; }
.gap-4 { gap: 16px; }
.gap-6 { gap: 24px; }
.w-full { width: 100%; }

/* Toast */
.toast-container {
  position: fixed;
  top: 24px;
  right: 24px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}
.toast {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 20px;
  border-radius: var(--radius-pill);
  font-size: 0.875rem;
  font-weight: 600;
  background: #FFFFFF;
  border: 1px solid var(--border);
  box-shadow: 0 8px 24px rgba(17, 20, 24, 0.12);
  pointer-events: all;
  transform: translateX(120%);
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  max-width: 360px;
}
.toast.show { transform: translateX(0); }
.toast-success { border-left: 4px solid var(--secondary); }
.toast-error { border-left: 4px solid var(--red); }
.toast-info { border-left: 4px solid #111418; }

/* Plan cards in purchase modal */
.plan-card {
  background: #FFFFFF;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 22px 18px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  transition: all var(--transition);
  cursor: pointer;
}
.plan-card:hover {
  border-color: #111418;
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(17, 20, 24, 0.08);
}
.plan-card.popular {
  border-color: #111418;
  box-shadow: 0 4px 16px rgba(17, 20, 24, 0.06);
}
.plan-badge {
  position: absolute;
  top: -10px;
  right: 14px;
  background: var(--primary);
  color: #111418;
  font-size: 0.68rem;
  font-weight: 800;
  padding: 3px 10px;
  border-radius: var(--radius-pill);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.plan-credits {
  font-size: 2.2rem;
  font-weight: 800;
  line-height: 1.1;
  color: var(--text-1);
}
.plan-price {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--text-1);
  margin: 6px 0 4px;
}

/* Animations */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}
.animate-in { animation: fadeIn 0.25s ease forwards; }

.skeleton {
  background: linear-gradient(90deg, #ECEEF2 25%, #F4F5F8 50%, #ECEEF2 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: var(--radius-sm);
}
@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

.code-block {
  background: #F4F5F8;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  word-break: break-all;
}
