/* ============================================================
   SaasCRM v2 — Design System
   Distinctive, premium, hand-written. No build step.
   ============================================================ */

/* ─── Reset & base ─────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; font-family: 'Inter', system-ui, -apple-system, sans-serif; font-feature-settings: 'cv11', 'ss01'; color: var(--ink); background: var(--cream); line-height: 1.5; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
img, svg { display: block; max-width: 100%; }
button { font: inherit; cursor: pointer; }
a { color: inherit; text-decoration: none; }

/* ─── Tokens ──────────────────────────────────────────────── */
:root {
  /* Brand */
  --amber-50:  #FFF7ED;
  --amber-100: #FFEDD5;
  --amber-200: #FED7AA;
  --amber-300: #FDBA74;
  --amber-400: #FB923C;
  --amber-500: #F97316;
  --amber-600: #EA580C;
  --amber-700: #C2410C;
  --amber-800: #9A3412;
  --amber-900: #7C2D12;

  --purple-50:  #FAF5FF;
  --purple-100: #F3E8FF;
  --purple-200: #E9D5FF;
  --purple-300: #D8B4FE;
  --purple-400: #A78BFA;
  --purple-500: #8B5CF6;
  --purple-600: #7C3AED;
  --purple-700: #6D28D9;
  --purple-800: #5B21B6;

  /* Neutrals (warm, not gray) */
  --cream:    #FBF7F2;
  --cream-2:  #F5EFE6;
  --cream-3:  #ECE5D7;
  --line:     #E5DCC9;
  --line-2:   #D6CAB0;
  --ink:      #1A1208;
  --ink-2:    #3F2F1B;
  --ink-3:    #6B5A40;
  --ink-4:    #998A6E;
  --ink-5:    #B5A98F;
  --ink-6:    #D6CAB0;

  /* Dark surfaces (deep, not pure black) */
  --ink-950:  #0A0612;
  --ink-900:  #0F0A1E;
  --ink-850:  #15102B;
  --ink-800:  #1A1330;
  --ink-700:  #2A1F4D;
  --ink-600:  #3D2F6B;
  --ink-500:  #594787;

  /* Semantic */
  --emerald-50: #ECFDF5;
  --emerald-100: #D1FAE5;
  --emerald-500: #10B981;
  --emerald-600: #059669;
  --emerald-700: #047857;
  --red-50: #FEF2F2;
  --red-100: #FEE2E2;
  --red-500: #EF4444;
  --red-600: #DC2626;
  --red-700: #B91C1C;
  --blue-50: #EFF6FF;
  --blue-100: #DBEAFE;
  --blue-500: #3B82F6;
  --blue-600: #2563EB;
  --blue-700: #1D4ED8;

  /* Type */
  --font-display: 'Space Grotesk', 'Inter', system-ui, sans-serif;
  --font-sans: 'Inter', system-ui, -apple-system, sans-serif;
  --font-mono: ui-monospace, 'SF Mono', Menlo, monospace;

  /* Shadow */
  --shadow-sm: 0 1px 2px 0 rgba(15, 10, 30, 0.05);
  --shadow:    0 1px 3px 0 rgba(15, 10, 30, 0.08), 0 1px 2px -1px rgba(15, 10, 30, 0.06);
  --shadow-md: 0 4px 8px -2px rgba(15, 10, 30, 0.10), 0 2px 4px -2px rgba(15, 10, 30, 0.06);
  --shadow-lg: 0 12px 24px -6px rgba(15, 10, 30, 0.12), 0 4px 8px -4px rgba(15, 10, 30, 0.08);
  --shadow-xl: 0 24px 48px -12px rgba(15, 10, 30, 0.18), 0 8px 16px -6px rgba(15, 10, 30, 0.10);
  --shadow-2xl: 0 32px 64px -12px rgba(15, 10, 30, 0.25);
  --shadow-amber: 0 12px 32px -8px rgba(249, 115, 22, 0.4);
  --shadow-amber-lg: 0 24px 56px -12px rgba(249, 115, 22, 0.5);
  --shadow-purple: 0 12px 32px -8px rgba(124, 58, 237, 0.4);

  /* Radii */
  --r-sm: 0.375rem;
  --r:    0.5rem;
  --r-md: 0.75rem;
  --r-lg: 1rem;
  --r-xl: 1.25rem;
  --r-2xl: 1.5rem;
  --r-3xl: 2rem;
  --r-full: 9999px;
}

/* ─── Typography ───────────────────────────────────────────── */
.font-display { font-family: var(--font-display); letter-spacing: -0.035em; line-height: 0.95; font-weight: 700; }
.font-sans { font-family: var(--font-sans); }
.font-mono { font-family: var(--font-mono); }
.text-display-xl { font-size: clamp(2.75rem, 7vw, 6.5rem); font-family: var(--font-display); font-weight: 700; letter-spacing: -0.04em; line-height: 0.92; }
.text-display-lg { font-size: clamp(2.25rem, 5vw, 4.5rem); font-family: var(--font-display); font-weight: 700; letter-spacing: -0.035em; line-height: 0.95; }
.text-display-md { font-size: clamp(1.75rem, 3.5vw, 3rem); font-family: var(--font-display); font-weight: 700; letter-spacing: -0.03em; line-height: 1.05; }
.text-display-sm { font-size: clamp(1.5rem, 2.5vw, 2.25rem); font-family: var(--font-display); font-weight: 700; letter-spacing: -0.025em; line-height: 1.1; }
.text-eyebrow { font-size: 0.75rem; font-weight: 700; letter-spacing: 0.15em; text-transform: uppercase; }

/* ─── Layout helpers ──────────────────────────────────────── */
.container { width: 100%; max-width: 80rem; margin: 0 auto; padding: 0 1.5rem; }
@media (min-width: 640px) { .container { padding: 0 2rem; } }
.container-narrow { max-width: 56rem; }
.section { padding-top: 5rem; padding-bottom: 5rem; }
@media (min-width: 768px) { .section { padding-top: 7rem; padding-bottom: 7rem; } }
.section-sm { padding-top: 3rem; padding-bottom: 3rem; }
@media (min-width: 768px) { .section-sm { padding-top: 5rem; padding-bottom: 5rem; } }

/* ─── Backgrounds ─────────────────────────────────────────── */
.bg-cream { background-color: var(--cream); }
.bg-cream-2 { background-color: var(--cream-2); }
.bg-cream-3 { background-color: var(--cream-3); }
.bg-white { background-color: #fff; }
.bg-ink-950 { background-color: var(--ink-950); }
.bg-ink-900 { background-color: var(--ink-900); }
.bg-ink-850 { background-color: var(--ink-850); }
.bg-ink-800 { background-color: var(--ink-800); }
.bg-ink-700 { background-color: var(--ink-700); }
.bg-amber-50 { background-color: var(--amber-50); }
.bg-amber-100 { background-color: var(--amber-100); }
.bg-amber-200 { background-color: var(--amber-200); }
.bg-amber-500 { background-color: var(--amber-500); }
.bg-amber-600 { background-color: var(--amber-600); }
.bg-purple-50 { background-color: var(--purple-50); }
.bg-purple-100 { background-color: var(--purple-100); }
.bg-purple-500 { background-color: var(--purple-500); }
.bg-purple-600 { background-color: var(--purple-600); }
.bg-emerald-50 { background-color: var(--emerald-50); }
.bg-emerald-100 { background-color: var(--emerald-100); }
.bg-emerald-500 { background-color: var(--emerald-500); }
.bg-red-50 { background-color: var(--red-50); }
.bg-red-100 { background-color: var(--red-100); }
.bg-red-500 { background-color: var(--red-500); }
.bg-blue-50 { background-color: var(--blue-50); }
.bg-blue-100 { background-color: var(--blue-100); }
.bg-blue-500 { background-color: var(--blue-500); }

/* ─── Text colors ─────────────────────────────────────────── */
.text-ink { color: var(--ink); }
.text-ink-2 { color: var(--ink-2); }
.text-ink-3 { color: var(--ink-3); }
.text-ink-4 { color: var(--ink-4); }
.text-white { color: #fff; }
.text-cream { color: var(--cream); }
.text-cream-2 { color: var(--cream-2); }
.text-amber-300 { color: var(--amber-300); }
.text-amber-400 { color: var(--amber-400); }
.text-amber-500 { color: var(--amber-500); }
.text-amber-600 { color: var(--amber-600); }
.text-amber-700 { color: var(--amber-700); }
.text-purple-300 { color: var(--purple-300); }
.text-purple-400 { color: var(--purple-400); }
.text-purple-500 { color: var(--purple-500); }
.text-purple-600 { color: var(--purple-600); }
.text-emerald-500 { color: var(--emerald-500); }
.text-emerald-600 { color: var(--emerald-600); }
.text-emerald-700 { color: var(--emerald-700); }
.text-red-500 { color: var(--red-500); }
.text-red-600 { color: var(--red-600); }
.text-red-700 { color: var(--red-700); }
.text-blue-500 { color: var(--blue-500); }
.text-blue-600 { color: var(--blue-600); }
.text-blue-700 { color: var(--blue-700); }

/* ─── Borders ─────────────────────────────────────────────── */
.border-line { border-color: var(--line); }
.border-line-2 { border-color: var(--line-2); }
.border-ink-800 { border-color: var(--ink-800); }
.border-ink-700 { border-color: var(--ink-700); }
.border-amber-200 { border-color: var(--amber-200); }
.border-amber-500 { border-color: var(--amber-500); }
.border-purple-200 { border-color: var(--purple-200); }
.border-purple-500 { border-color: var(--purple-500); }
.border-emerald-200 { border-color: #A7F3D0; }
.border-emerald-500 { border-color: var(--emerald-500); }
.border-red-200 { border-color: #FECACA; }
.border-white\/10 { border-color: rgba(255, 255, 255, 0.1); }
.border-white\/20 { border-color: rgba(255, 255, 255, 0.2); }

/* ─── Gradient text ───────────────────────────────────────── */
.text-gradient-amber {
  background: linear-gradient(135deg, var(--amber-500) 0%, var(--amber-700) 50%, var(--purple-600) 100%);
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; color: transparent;
}
.text-gradient-purple {
  background: linear-gradient(135deg, var(--purple-500) 0%, var(--purple-700) 100%);
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; color: transparent;
}
.text-gradient-light {
  background: linear-gradient(135deg, var(--amber-300) 0%, var(--amber-500) 50%, var(--amber-600) 100%);
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; color: transparent;
}

/* ─── Buttons ─────────────────────────────────────────────── */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem; padding: 0.625rem 1.125rem; border-radius: var(--r-md); font-weight: 600; font-size: 0.875rem; line-height: 1.25rem; transition: all 0.2s ease; cursor: pointer; border: 1px solid transparent; text-decoration: none; white-space: nowrap; }
.btn-lg { padding: 0.75rem 1.5rem; font-size: 0.9375rem; border-radius: var(--r-md); }
.btn-xl { padding: 1rem 2rem; font-size: 1rem; border-radius: var(--r-lg); }
.btn-sm { padding: 0.375rem 0.75rem; font-size: 0.8125rem; }
.btn-amber {
  background: linear-gradient(135deg, var(--amber-500) 0%, var(--amber-600) 100%);
  color: #fff; box-shadow: var(--shadow-amber);
}
.btn-amber:hover { transform: translateY(-1px); box-shadow: var(--shadow-amber-lg); }
.btn-amber:active { transform: translateY(0); }
.btn-amber-ghost {
  background: transparent; color: var(--amber-700); border: 1.5px solid var(--amber-200);
}
.btn-amber-ghost:hover { background: var(--amber-50); border-color: var(--amber-500); }
.btn-ink { background: var(--ink); color: var(--cream); box-shadow: var(--shadow-md); }
.btn-ink:hover { background: var(--ink-2); transform: translateY(-1px); }
.btn-cream { background: var(--cream); color: var(--ink); border: 1px solid var(--line); }
.btn-cream:hover { background: #fff; border-color: var(--line-2); }
.btn-light { background: rgba(255, 255, 255, 0.1); color: #fff; border: 1px solid rgba(255, 255, 255, 0.15); backdrop-filter: blur(10px); }
.btn-light:hover { background: rgba(255, 255, 255, 0.15); }
.btn-ghost { background: transparent; color: var(--ink-2); }
.btn-ghost:hover { background: var(--cream-2); }
.btn-danger { background: var(--red-600); color: #fff; }
.btn-danger:hover { background: var(--red-700); }
.btn-success { background: var(--emerald-600); color: #fff; }
.btn-success:hover { background: var(--emerald-700); }
.btn-icon { padding: 0.5rem; }

/* ─── Cards ───────────────────────────────────────────────── */
.card { background: #fff; border: 1px solid var(--line); border-radius: var(--r-xl); transition: all 0.25s ease; }
.card:hover { border-color: var(--line-2); }
.card-v2 { background: #fff; border: 1px solid var(--line); border-radius: var(--r-xl); transition: all 0.25s ease; position: relative; overflow: hidden; }
.card-v2:hover { transform: translateY(-2px); border-color: rgba(249, 115, 22, 0.4); box-shadow: var(--shadow-xl); }
.card-v2-dark { background: linear-gradient(180deg, rgba(255, 255, 255, 0.04) 0%, rgba(255, 255, 255, 0.01) 100%); border: 1px solid rgba(255, 255, 255, 0.08); border-radius: var(--r-xl); color: var(--cream); position: relative; overflow: hidden; backdrop-filter: blur(12px); }
.card-v2-dark:hover { border-color: rgba(249, 115, 22, 0.4); transform: translateY(-2px); }
.card-feature {
  background: #fff; border: 1px solid var(--line); border-radius: var(--r-2xl);
  padding: 2rem; transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
}
.card-feature:hover { transform: translateY(-4px); box-shadow: var(--shadow-xl); border-color: rgba(249, 115, 22, 0.3); }
.card-feature::before {
  content: ''; position: absolute; inset: 0; border-radius: inherit; padding: 1px;
  background: linear-gradient(135deg, transparent 30%, rgba(249, 115, 22, 0.4) 50%, transparent 70%);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0); mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude; opacity: 0; transition: opacity 0.3s;
}
.card-feature:hover::before { opacity: 1; }

/* ─── Glassmorphism ───────────────────────────────────────── */
.glass { background: rgba(255, 255, 255, 0.7); backdrop-filter: saturate(180%) blur(20px); -webkit-backdrop-filter: saturate(180%) blur(20px); border: 1px solid rgba(255, 255, 255, 0.5); }
.glass-dark { background: rgba(15, 10, 30, 0.5); backdrop-filter: saturate(180%) blur(20px); -webkit-backdrop-filter: saturate(180%) blur(20px); border: 1px solid rgba(255, 255, 255, 0.08); }
.glass-card { background: rgba(255, 255, 255, 0.05); backdrop-filter: blur(12px); border: 1px solid rgba(255, 255, 255, 0.08); }

/* ─── Glows ───────────────────────────────────────────────── */
.glow-amber { box-shadow: 0 0 0 1px rgba(249, 115, 22, 0.3), 0 0 24px rgba(249, 115, 22, 0.4); }
.glow-amber-lg { box-shadow: 0 0 0 1px rgba(249, 115, 22, 0.3), 0 0 64px rgba(249, 115, 22, 0.5); }
.glow-purple { box-shadow: 0 0 0 1px rgba(124, 58, 237, 0.3), 0 0 24px rgba(124, 58, 237, 0.4); }
.shadow-amber { box-shadow: var(--shadow-amber); }
.shadow-amber-lg { box-shadow: var(--shadow-amber-lg); }
.shadow-purple { box-shadow: var(--shadow-purple); }
.shadow-2xl { box-shadow: var(--shadow-2xl); }

/* ─── Inputs ──────────────────────────────────────────────── */
.input {
  display: block; width: 100%; padding: 0.625rem 0.875rem; border-radius: var(--r-md);
  background: #fff; border: 1px solid var(--line-2); font-size: 0.9375rem; color: var(--ink);
  transition: all 0.2s ease; font-family: var(--font-sans);
}
.input::placeholder { color: var(--ink-5); }
.input:focus { outline: none; border-color: var(--amber-500); box-shadow: 0 0 0 3px rgba(249, 115, 22, 0.15); }
.input-v2 {
  display: block; width: 100%; padding: 0.75rem 1rem; border-radius: var(--r-md);
  background: #fff; border: 1.5px solid var(--line-2); font-size: 0.9375rem; color: var(--ink);
  transition: all 0.2s ease; font-family: var(--font-sans);
}
.input-v2::placeholder { color: var(--ink-5); }
.input-v2:focus { outline: none; border-color: var(--amber-500); box-shadow: 0 0 0 4px rgba(249, 115, 22, 0.12); }
.input-v2-dark {
  display: block; width: 100%; padding: 0.75rem 1rem; border-radius: var(--r-md);
  background: rgba(255, 255, 255, 0.05); border: 1.5px solid rgba(255, 255, 255, 0.1);
  font-size: 0.9375rem; color: #fff; transition: all 0.2s ease;
}
.input-v2-dark::placeholder { color: rgba(255, 255, 255, 0.4); }
.input-v2-dark:focus { outline: none; border-color: var(--amber-500); background: rgba(255, 255, 255, 0.08); box-shadow: 0 0 0 4px rgba(249, 115, 22, 0.15); }
.input-lg { padding: 1rem 1.25rem; font-size: 1rem; }
.input-search { padding-left: 2.5rem; background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%23998A6E' stroke-width='2'><circle cx='11' cy='11' r='8'/><line x1='21' y1='21' x2='16.65' y2='16.65'/></svg>"); background-repeat: no-repeat; background-position: 0.75rem center; }
.label { display: block; font-size: 0.8125rem; font-weight: 600; color: var(--ink-2); margin-bottom: 0.375rem; letter-spacing: 0.01em; }
.checkbox { width: 1rem; height: 1rem; border-radius: 0.25rem; border: 1.5px solid var(--line-2); color: var(--amber-500); cursor: pointer; }

/* ─── Chips / Badges ──────────────────────────────────────── */
.chip { display: inline-flex; align-items: center; gap: 0.375rem; padding: 0.25rem 0.625rem; border-radius: var(--r-full); font-size: 0.6875rem; font-weight: 600; letter-spacing: 0.025em; }
.chip-amber { background: var(--amber-50); color: var(--amber-700); border: 1px solid var(--amber-200); }
.chip-purple { background: var(--purple-50); color: var(--purple-700); border: 1px solid var(--purple-200); }
.chip-light { background: rgba(255, 255, 255, 0.1); color: #fff; border: 1px solid rgba(255, 255, 255, 0.15); }
.chip-ink { background: var(--ink-900); color: var(--cream); border: 1px solid var(--ink-700); }
.chip-emerald { background: var(--emerald-50); color: var(--emerald-700); border: 1px solid #A7F3D0; }
.chip-red { background: var(--red-50); color: var(--red-700); border: 1px solid #FECACA; }
.chip-blue { background: var(--blue-50); color: var(--blue-700); border: 1px solid #BFDBFE; }

.badge { display: inline-flex; align-items: center; gap: 0.375rem; padding: 0.25rem 0.625rem; border-radius: var(--r); font-size: 0.75rem; font-weight: 600; }
.badge-emerald { background: var(--emerald-50); color: var(--emerald-700); border: 1px solid #A7F3D0; }
.badge-amber { background: var(--amber-50); color: var(--amber-700); border: 1px solid var(--amber-200); }
.badge-red { background: var(--red-50); color: var(--red-700); border: 1px solid #FECACA; }
.badge-blue { background: var(--blue-50); color: var(--blue-700); border: 1px solid #BFDBFE; }
.badge-gray { background: var(--cream-3); color: var(--ink-3); border: 1px solid var(--line); }
.badge-purple { background: var(--purple-50); color: var(--purple-700); border: 1px solid var(--purple-200); }
.badge-dot::before { content: ''; width: 0.375rem; height: 0.375rem; border-radius: 50%; background: currentColor; }

/* ─── Animations ──────────────────────────────────────────── */
@keyframes aurora {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}
.aurora { background: linear-gradient(125deg, #F97316 0%, #EA580C 25%, #7C3AED 50%, #6D28D9 75%, #F97316 100%); background-size: 400% 400%; animation: aurora 12s ease infinite; }
.aurora-soft { background: linear-gradient(125deg, rgba(249, 115, 22, 0.4), rgba(124, 58, 237, 0.4), rgba(249, 115, 22, 0.4)); background-size: 300% 300%; animation: aurora 15s ease infinite; }
.aurora-mesh {
  background: radial-gradient(at 20% 20%, rgba(249, 115, 22, 0.4) 0px, transparent 50%),
              radial-gradient(at 80% 0%, rgba(124, 58, 237, 0.4) 0px, transparent 50%),
              radial-gradient(at 0% 80%, rgba(236, 72, 153, 0.3) 0px, transparent 50%),
              radial-gradient(at 80% 80%, rgba(249, 115, 22, 0.3) 0px, transparent 50%);
}

@keyframes float-slow { 0%, 100% { transform: translateY(0) translateX(0); } 50% { transform: translateY(-20px) translateX(10px); } }
.float-slow { animation: float-slow 8s ease-in-out infinite; }
@keyframes float-slower { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(15px); } }
.float-slower { animation: float-slower 10s ease-in-out infinite; }
@keyframes float-rotate { 0%, 100% { transform: translateY(0) rotate(0); } 50% { transform: translateY(-15px) rotate(2deg); } }
.float-rotate { animation: float-rotate 12s ease-in-out infinite; }

@keyframes pulse-soft { 0%, 100% { opacity: 0.6; transform: scale(1); } 50% { opacity: 1; transform: scale(1.05); } }
.pulse-soft { animation: pulse-soft 3s ease-in-out infinite; }
@keyframes pulse-glow { 0%, 100% { box-shadow: 0 0 0 0 rgba(249, 115, 22, 0.4); } 50% { box-shadow: 0 0 0 8px rgba(249, 115, 22, 0); } }
.pulse-glow { animation: pulse-glow 2s ease-out infinite; }

@keyframes spin-slow { to { transform: rotate(360deg); } }
.spin-slow { animation: spin-slow 20s linear infinite; }
@keyframes spin-slower { to { transform: rotate(360deg); } }
.spin-slower { animation: spin-slower 40s linear infinite; }

@keyframes marquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }
.marquee-track { animation: marquee 30s linear infinite; }
.marquee-track-slow { animation: marquee 50s linear infinite; }

@keyframes shimmer { 0% { background-position: -200% 0; } 100% { background-position: 200% 0; } }
.shimmer { background: linear-gradient(90deg, transparent 0%, rgba(255, 255, 255, 0.1) 50%, transparent 100%); background-size: 200% 100%; animation: shimmer 3s linear infinite; }

@keyframes count-up { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
.fade-up { animation: count-up 0.6s ease-out both; }

@keyframes bounce-subtle { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-4px); } }
.bounce-subtle { animation: bounce-subtle 2s ease-in-out infinite; }

/* ─── Navigation ──────────────────────────────────────────── */
.nav-sticky { position: sticky; top: 0; z-index: 40; }
.nav-v2 { background: rgba(251, 247, 242, 0.85); backdrop-filter: saturate(180%) blur(20px); -webkit-backdrop-filter: saturate(180%) blur(20px); border-bottom: 1px solid var(--line); }
.nav-v2-dark { background: rgba(10, 6, 18, 0.7); backdrop-filter: saturate(180%) blur(20px); -webkit-backdrop-filter: saturate(180%) blur(20px); border-bottom: 1px solid rgba(255, 255, 255, 0.06); }

/* ─── Tables ──────────────────────────────────────────────── */
.table { width: 100%; border-collapse: separate; border-spacing: 0; }
.table th { padding: 0.75rem 1rem; text-align: left; font-size: 0.75rem; font-weight: 600; color: var(--ink-3); text-transform: uppercase; letter-spacing: 0.05em; background: var(--cream-2); border-bottom: 1px solid var(--line); white-space: nowrap; }
.table th:first-child { border-top-left-radius: var(--r-md); }
.table th:last-child { border-top-right-radius: var(--r-md); }
.table td { padding: 1rem; border-bottom: 1px solid var(--line); color: var(--ink-2); font-size: 0.875rem; white-space: nowrap; }
.table tbody tr:hover { background: var(--cream-2); }
.table tbody tr:last-child td { border-bottom: none; }
.table tbody tr:last-child td:first-child { border-bottom-left-radius: var(--r-md); }
.table tbody tr:last-child td:last-child { border-bottom-right-radius: var(--r-md); }

/* ─── Helpers ─────────────────────────────────────────────── */
.divide-y > * + * { border-top: 1px solid var(--line); }
.ring-1 { box-shadow: 0 0 0 1px var(--line); }
.ring-2 { box-shadow: 0 0 0 2px var(--line); }
.ring-amber { box-shadow: 0 0 0 1px var(--amber-500); }
.opacity-50 { opacity: 0.5; }
.opacity-60 { opacity: 0.6; }
.opacity-70 { opacity: 0.7; }
.opacity-80 { opacity: 0.8; }
.no-scrollbar::-webkit-scrollbar { display: none; }
.no-scrollbar { scrollbar-width: none; }
.text-balance { text-wrap: balance; }

/* ─── Grid patterns (hero backgrounds) ────────────────────── */
.grid-pattern {
  background-image:
    linear-gradient(rgba(15, 10, 30, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(15, 10, 30, 0.04) 1px, transparent 1px);
  background-size: 56px 56px;
  background-position: -1px -1px;
}
.grid-pattern-dark {
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.05) 1px, transparent 1px);
  background-size: 56px 56px;
}

/* ─── Logo mark ───────────────────────────────────────────── */
.logo-mark { width: 2rem; height: 2rem; border-radius: 0.5rem; background: linear-gradient(135deg, var(--amber-500) 0%, var(--amber-600) 50%, var(--purple-600) 100%); display: inline-flex; align-items: center; justify-content: center; color: #fff; font-weight: 800; font-size: 0.875rem; box-shadow: var(--shadow-amber); flex-shrink: 0; }
.logo-mark-lg { width: 2.5rem; height: 2.5rem; font-size: 1.125rem; border-radius: 0.625rem; }
.logo-mark-sm { width: 1.5rem; height: 1.5rem; font-size: 0.75rem; border-radius: 0.375rem; }

/* ─── Sidebar (admin + tenant) ─────────────────────────────── */
.sidebar { width: 16rem; background: #fff; border-right: 1px solid var(--line); display: flex; flex-direction: column; flex-shrink: 0; }
.sidebar-dark { width: 16rem; background: var(--ink-900); color: var(--cream); border-right: 1px solid var(--ink-800); display: flex; flex-direction: column; flex-shrink: 0; }
.sidebar-section { padding: 0.75rem 1rem; font-size: 0.6875rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-4); }
.sidebar-section-dark { padding: 0.75rem 1rem; font-size: 0.6875rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: rgba(255, 255, 255, 0.4); }
.sidebar-link { display: flex; align-items: center; gap: 0.625rem; padding: 0.5rem 0.75rem; margin: 0 0.5rem; border-radius: var(--r-md); font-size: 0.875rem; font-weight: 500; color: var(--ink-2); transition: all 0.15s; }
.sidebar-link:hover { background: var(--cream-2); color: var(--ink); }
.sidebar-link.active { background: var(--amber-50); color: var(--amber-700); font-weight: 600; }
.sidebar-link-dark { display: flex; align-items: center; gap: 0.625rem; padding: 0.5rem 0.75rem; margin: 0 0.5rem; border-radius: var(--r-md); font-size: 0.875rem; font-weight: 500; color: rgba(255, 255, 255, 0.6); transition: all 0.15s; }
.sidebar-link-dark:hover { background: rgba(255, 255, 255, 0.05); color: #fff; }
.sidebar-link-dark.active { background: rgba(249, 115, 22, 0.1); color: var(--amber-500); font-weight: 600; }

/* ─── KPI tiles ───────────────────────────────────────────── */
.kpi { background: #fff; border: 1px solid var(--line); border-radius: var(--r-xl); padding: 1.25rem; transition: all 0.2s; }
.kpi:hover { border-color: var(--line-2); box-shadow: var(--shadow-md); }
.kpi-label { font-size: 0.75rem; font-weight: 600; color: var(--ink-3); text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 0.5rem; }
.kpi-value { font-family: var(--font-display); font-size: 1.875rem; font-weight: 700; color: var(--ink); letter-spacing: -0.02em; line-height: 1.1; }
.kpi-trend { font-size: 0.75rem; color: var(--ink-4); margin-top: 0.5rem; display: flex; align-items: center; gap: 0.25rem; }
.kpi-trend-up { color: var(--emerald-600); }
.kpi-trend-down { color: var(--red-600); }

/* ─── Progress bar ────────────────────────────────────────── */
.progress { height: 0.5rem; background: var(--cream-3); border-radius: 9999px; overflow: hidden; }
.progress-bar { height: 100%; background: linear-gradient(90deg, var(--amber-500), var(--amber-600)); border-radius: 9999px; transition: width 0.5s ease; }
.progress-emerald { background: linear-gradient(90deg, var(--emerald-500), var(--emerald-600)); }
.progress-purple { background: linear-gradient(90deg, var(--purple-500), var(--purple-600)); }

/* ─── Avatar ──────────────────────────────────────────────── */
.avatar { width: 2rem; height: 2rem; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; background: linear-gradient(135deg, var(--amber-500), var(--amber-700)); color: #fff; font-weight: 700; font-size: 0.75rem; flex-shrink: 0; }
.avatar-purple { background: linear-gradient(135deg, var(--purple-500), var(--purple-700)); }
.avatar-emerald { background: linear-gradient(135deg, var(--emerald-500), var(--emerald-700)); }
.avatar-blue { background: linear-gradient(135deg, var(--blue-500), var(--blue-700)); }
.avatar-pink { background: linear-gradient(135deg, #EC4899, #BE185D); }
.avatar-lg { width: 3rem; height: 3rem; font-size: 1rem; }
.avatar-sm { width: 1.5rem; height: 1.5rem; font-size: 0.625rem; }

/* ─── Tab nav ─────────────────────────────────────────────── */
.tabs { display: flex; gap: 0.25rem; padding: 0.25rem; background: var(--cream-3); border-radius: var(--r-md); }
.tab { flex: 1; padding: 0.5rem 1rem; border-radius: var(--r); font-size: 0.875rem; font-weight: 600; color: var(--ink-3); text-align: center; cursor: pointer; transition: all 0.15s; }
.tab.active { background: #fff; color: var(--ink); box-shadow: var(--shadow-sm); }
.tab:not(.active):hover { color: var(--ink-2); }

/* ─── Divider ─────────────────────────────────────────────── */
.divider { height: 1px; background: var(--line); }
.divider-dark { height: 1px; background: rgba(255, 255, 255, 0.08); }

/* ─── Modal / Drawer ─────────────────────────────────────── */
.modal-backdrop { position: fixed; inset: 0; background: rgba(15, 10, 30, 0.6); backdrop-filter: blur(4px); z-index: 50; display: flex; align-items: center; justify-content: center; padding: 1rem; }
.modal { background: #fff; border-radius: var(--r-2xl); max-width: 32rem; width: 100%; max-height: 90vh; overflow-y: auto; box-shadow: var(--shadow-2xl); }

/* ─── Livewire placeholder styling ─────────────────────────── */
[x-cloak] { display: none !important; }

/* ─── Utility animations ─────────────────────────────────── */
.transition-all { transition: all 0.2s ease; }
.transition-colors { transition: color, background-color, border-color 0.2s ease; }
.transition-transform { transition: transform 0.2s ease; }
.hover-lift { transition: all 0.25s ease; }
.hover-lift:hover { transform: translateY(-2px); }
.hover-scale { transition: transform 0.2s ease; }
.hover-scale:hover { transform: scale(1.02); }
.hover-amber:hover { color: var(--amber-600); }
.hover-bg-amber:hover { background-color: var(--amber-50); }

/* ─── Tooltip / Help text ─────────────────────────────────── */
.help { font-size: 0.75rem; color: var(--ink-4); margin-top: 0.25rem; }

/* ─── Print ───────────────────────────────────────────────── */
@media print {
  .no-print { display: none !important; }
}

/* ─── Responsive helpers ──────────────────────────────────── */
@media (max-width: 1023px) { .hide-lg { display: none !important; } }
@media (max-width: 767px) { .hide-md { display: none !important; } }
@media (max-width: 639px) { .hide-sm { display: none !important; } }
@media (min-width: 1024px) { .show-lg { display: block !important; } }
@media (min-width: 768px) { .show-md { display: block !important; } }
@media (min-width: 640px) { .show-sm { display: block !important; } }

/* ============================================================
   APP-LEVEL COMPONENTS
   ============================================================ */

/* --- Marketing nav ----------------------------------------- */
.nav-public {
  position: sticky; top: 0; z-index: 40;
  background: rgba(251, 247, 242, 0.85); backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--line);
}
.nav-public a { color: var(--ink-2); }
.nav-public a:hover { color: var(--ink); }
.nav-link {
  font-size: 0.875rem; font-weight: 500; padding: 0.5rem 0.875rem; border-radius: var(--r); transition: all 0.15s;
}
.nav-link:hover { background: var(--cream-3); color: var(--ink); }
.nav-link.active { color: var(--ink); font-weight: 600; }

/* --- Page header (admin/tenant apps) ---------------------- */
.page-header {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem;
  margin-bottom: 1.5rem; flex-wrap: wrap;
}
.page-title {
  font-family: var(--font-display); font-size: 1.75rem; font-weight: 700;
  color: var(--ink); letter-spacing: -0.02em; line-height: 1.2; margin: 0;
}
.page-subtitle { font-size: 0.875rem; color: var(--ink-3); margin-top: 0.25rem; }
.page-actions { display: flex; gap: 0.5rem; flex-wrap: wrap; }

/* --- Tables ------------------------------------------------ */
.table-wrap {
  background: #fff; border: 1px solid var(--line); border-radius: var(--r-xl);
  overflow-x: auto; overflow-y: hidden;
}
.table-wrap > * { min-width: 100%; }
.table { width: 100%; border-collapse: collapse; }
.table th {
  text-align: left; padding: 0.75rem 1rem; font-size: 0.75rem; font-weight: 600;
  color: var(--ink-3); text-transform: uppercase; letter-spacing: 0.05em;
  background: var(--cream-2); border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
.table td {
  padding: 0.875rem 1rem; font-size: 0.875rem; color: var(--ink-2);
  border-bottom: 1px solid var(--line); vertical-align: middle;
  white-space: nowrap;
}
.table tbody tr:last-child td { border-bottom: 0; }
.table tbody tr:hover { background: var(--cream); }
.table-cell-num { font-variant-numeric: tabular-nums; font-weight: 600; color: var(--ink); }
.table-empty { padding: 3rem 1rem; text-align: center; color: var(--ink-4); }
.table .cell-wrap { white-space: normal; max-width: 320px; }
.table .cell-truncate { max-width: 280px; overflow: hidden; text-overflow: ellipsis; display: block; }
/* Column width helpers */
.col-action { width: 4rem; text-align: right; }
.col-narrow { width: 6rem; }
.col-date { width: 110px; }
.col-amount { width: 130px; text-align: right; }
.col-status { width: 110px; }
.col-check { width: 2.5rem; }

/* --- Status / Badges -------------------------------------- */
.badge {
  display: inline-flex; align-items: center; gap: 0.25rem;
  padding: 0.1875rem 0.625rem; border-radius: 9999px;
  font-size: 0.75rem; font-weight: 600; line-height: 1.25;
  border: 1px solid transparent;
}
.badge-amber  { background: var(--amber-50);  color: var(--amber-700);  border-color: var(--amber-200); }
.badge-purple { background: var(--purple-50); color: var(--purple-700); border-color: var(--purple-200); }
.badge-emerald{ background: #ECFDF5;           color: #047857;           border-color: #A7F3D0; }
.badge-red    { background: #FEF2F2;           color: #B91C1C;           border-color: #FECACA; }
.badge-blue   { background: #EFF6FF;           color: #1D4ED8;           border-color: #BFDBFE; }
.badge-ink    { background: var(--cream-3);    color: var(--ink-2);      border-color: var(--line-2); }
.badge-amber-solid { background: linear-gradient(135deg, var(--amber-500), var(--amber-600)); color: #fff; border: 0; }

.chip {
  display: inline-flex; align-items: center; gap: 0.375rem;
  padding: 0.25rem 0.625rem; border-radius: var(--r); font-size: 0.75rem; font-weight: 500;
  background: var(--cream-2); color: var(--ink-2); border: 1px solid var(--line);
}
.chip-amber  { background: var(--amber-50);  color: var(--amber-700);  border-color: var(--amber-200); }
.chip-purple { background: var(--purple-50); color: var(--purple-700); border-color: var(--purple-200); }
.chip-emerald{ background: #ECFDF5;          color: #047857;           border-color: #A7F3D0; }
.chip-red    { background: #FEF2F2;          color: #B91C1C;           border-color: #FECACA; }
.chip-blue   { background: #EFF6FF;          color: #1D4ED8;           border-color: #BFDBFE; }
.chip-dot::before { content: ''; width: 0.375rem; height: 0.375rem; border-radius: 9999px; background: currentColor; }

/* --- Stat strip ------------------------------------------- */
.stat-strip {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 0.75rem;
}
.stat-card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg);
  padding: 1rem 1.25rem; transition: all 0.2s;
}
.stat-card:hover { border-color: var(--line-2); transform: translateY(-1px); box-shadow: var(--shadow-sm); }
.stat-label { font-size: 0.6875rem; font-weight: 600; color: var(--ink-3); text-transform: uppercase; letter-spacing: 0.06em; }
.stat-value { font-family: var(--font-display); font-size: 1.5rem; font-weight: 700; color: var(--ink); letter-spacing: -0.02em; margin-top: 0.25rem; }
.stat-meta { font-size: 0.75rem; color: var(--ink-4); margin-top: 0.25rem; }

/* --- Dropdown menu ------------------------------------------- */
.dropdown { position: relative; display: inline-block; }
.dropdown-trigger { display: inline-flex; align-items: center; gap: 0.375rem; padding: 0.375rem 0.625rem; background: #fff; border: 1px solid var(--line); border-radius: var(--r); font-size: 0.8125rem; color: var(--ink-2); cursor: pointer; transition: all 0.15s; font-family: inherit; }
.dropdown-trigger:hover { background: var(--cream-2); border-color: var(--line-2); color: var(--ink); }
.dropdown-trigger:focus { outline: none; border-color: var(--amber-500); box-shadow: 0 0 0 3px rgba(249, 115, 22, 0.15); }
.dropdown.open .dropdown-trigger { background: var(--cream-2); border-color: var(--line-2); color: var(--ink); }
.dropdown-menu { position: absolute; right: 0; top: calc(100% + 0.25rem); min-width: 12rem; background: #fff; border: 1px solid var(--line); border-radius: var(--r-md); box-shadow: var(--shadow-lg); z-index: 50; padding: 0.375rem; opacity: 0; visibility: hidden; transform: translateY(-4px); transition: all 0.15s; }
.dropdown.open .dropdown-menu { opacity: 1; visibility: visible; transform: translateY(0); }
.dropdown-item { display: flex; align-items: center; gap: 0.5rem; padding: 0.5rem 0.75rem; font-size: 0.8125rem; color: var(--ink-2); border-radius: var(--r-sm); cursor: pointer; transition: all 0.1s; text-decoration: none; }
.dropdown-item:hover { background: var(--cream-2); color: var(--ink); }
.dropdown-item.danger { color: var(--red-600); }
.dropdown-item.danger:hover { background: #fef2f2; color: var(--red-700); }
.dropdown-divider { height: 1px; background: var(--line); margin: 0.25rem 0; }
.dropdown-item svg { width: 0.875rem; height: 0.875rem; flex-shrink: 0; }

/* --- Icon button ---------------------------------------------- */
.icon-btn { display: inline-flex; align-items: center; justify-content: center; width: 2rem; height: 2rem; background: transparent; border: 1px solid transparent; border-radius: var(--r); color: var(--ink-3); cursor: pointer; transition: all 0.15s; }
.icon-btn:hover { background: var(--cream-2); color: var(--ink); border-color: var(--line); }
.icon-btn.danger { color: var(--red-600); }
.icon-btn.danger:hover { background: #fef2f2; border-color: #fecaca; }

/* --- Modal ----------------------------------------------------- */
.modal-backdrop { position: fixed; inset: 0; background: rgba(15, 23, 42, 0.5); z-index: 100; display: flex; align-items: center; justify-content: center; padding: 1rem; opacity: 0; visibility: hidden; transition: all 0.2s; }
.modal-backdrop.open { opacity: 1; visibility: visible; }
.modal { background: #fff; border-radius: var(--r-xl); max-width: 32rem; width: 100%; max-height: 90vh; overflow-y: auto; box-shadow: var(--shadow-xl); transform: scale(0.96); transition: all 0.2s; }
.modal-backdrop.open .modal { transform: scale(1); }
.modal-head { padding: 1.25rem 1.5rem; border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; }
.modal-title { font-family: var(--font-display); font-size: 1.125rem; font-weight: 700; color: var(--ink); margin: 0; }
.modal-body { padding: 1.5rem; }
.modal-foot { padding: 1rem 1.5rem; border-top: 1px solid var(--line); display: flex; justify-content: flex-end; gap: 0.5rem; background: var(--cream-2); border-radius: 0 0 var(--r-xl) var(--r-xl); }

/* --- Badges / chips for action status -------------------------- */
.status-badge { display: inline-flex; align-items: center; gap: 0.25rem; padding: 0.125rem 0.5rem; font-size: 0.6875rem; font-weight: 600; border-radius: var(--r-full); text-transform: uppercase; letter-spacing: 0.04em; }
.status-badge.active { background: #d1fae5; color: #065f46; }
.status-badge.inactive { background: #f3f4f6; color: #6b7280; }
.status-badge.warn { background: #fef3c7; color: #92400e; }
.status-badge.danger { background: #fee2e2; color: #991b1b; }

/* --- Toasts ---------------------------------------------------- */
.toast { background: #fff; border: 1px solid var(--line); border-left: 4px solid var(--ink-3); padding: 0.75rem 1rem; border-radius: var(--r-md); font-size: 0.875rem; color: var(--ink); box-shadow: var(--shadow-lg); opacity: 0; transform: translateX(20px); transition: all 0.25s; max-width: 22rem; }
.toast.show { opacity: 1; transform: translateX(0); }
.toast-success { border-left-color: #047857; }
.toast-error { border-left-color: #b91c1c; }
.toast-info { border-left-color: var(--amber-500); }

/* --- Inline form (used inside tables & modals) ---------------- */
.inline-form { display: inline; }


/* --- Section panels ---------------------------------------- */
.panel { background: #fff; border: 1px solid var(--line); border-radius: var(--r-xl); }
.panel-head { padding: 1.25rem 1.5rem; border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.panel-title { font-family: var(--font-display); font-size: 1.125rem; font-weight: 700; color: var(--ink); margin: 0; }
.panel-body { padding: 1.5rem; }
.panel-foot { padding: 1rem 1.5rem; border-top: 1px solid var(--line); background: var(--cream-2); }

/* --- Search bar / filters --------------------------------- */
.toolbar { display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; margin-bottom: 1rem; }
  .toolbar > svg:first-child { width: 1rem; height: 1rem; color: var(--ink-4); flex-shrink: 0; }
  .toolbar-form { display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; flex: 1 1 auto; min-width: 0; }
  /* Search field wrapper — fixed 320px so it doesn't take whole row */
  .search-field { position: relative; flex: 0 1 320px; min-width: 220px; }
  .search-field > svg { position: absolute; left: 0.75rem; top: 50%; transform: translateY(-50%); width: 1rem; height: 1rem; color: var(--ink-4); pointer-events: none; z-index: 1; }
  .search-field .input { padding-left: 2.25rem; }
  /* Legacy support — single search input that lives directly in a toolbar (no wrapper) */
  .toolbar > .input-search,
  .toolbar > input.input[placeholder^="Search"] { flex: 0 1 320px; min-width: 220px; max-width: 320px; }
  .toolbar-search { position: relative; flex: 0 1 320px; min-width: 220px; }
  .toolbar-search > svg { position: absolute; left: 0.75rem; top: 50%; transform: translateY(-50%); width: 1rem; height: 1rem; color: var(--ink-4); pointer-events: none; z-index: 1; }
  .toolbar-search .input { padding-left: 2.25rem; }
  .toolbar > svg:not(:first-child) { width: 1rem; height: 1rem; flex-shrink: 0; }
  .toolbar .spacer { flex: 1 1 auto; }
.hero {
  position: relative; overflow: hidden;
  padding: 5rem 1.5rem 6rem;
  background:
    radial-gradient(circle at 0% 0%, rgba(249, 115, 22, 0.18) 0%, transparent 50%),
    radial-gradient(circle at 100% 0%, rgba(124, 58, 237, 0.18) 0%, transparent 50%),
    var(--cream);
}
.hero h1 {
  font-family: var(--font-display); font-size: clamp(2.5rem, 5vw + 1rem, 4.5rem);
  font-weight: 800; line-height: 1.05; letter-spacing: -0.035em; color: var(--ink); margin: 0;
}
.hero p.lead { font-size: 1.125rem; color: var(--ink-3); max-width: 38rem; margin-top: 1.25rem; }

.section-eyebrow {
  display: inline-flex; align-items: center; gap: 0.5rem;
  font-size: 0.75rem; font-weight: 700; color: var(--amber-700);
  text-transform: uppercase; letter-spacing: 0.1em;
  padding: 0.375rem 0.75rem; border-radius: 9999px;
  background: var(--amber-50); border: 1px solid var(--amber-200);
}

.feature-grid {
  display: grid; gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.pricing-card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--r-2xl);
  padding: 2rem; display: flex; flex-direction: column; gap: 1rem; transition: all 0.25s;
}
.pricing-card:hover { border-color: var(--line-2); transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.pricing-card.featured {
  background: linear-gradient(180deg, #fff 0%, var(--cream) 100%);
  border-color: var(--amber-500);
  box-shadow: 0 0 0 1px var(--amber-500), 0 16px 48px -16px rgba(249, 115, 22, 0.4);
  position: relative; overflow: hidden;
}
.pricing-card.featured::after {
  content: 'MOST POPULAR'; position: absolute; top: 1rem; right: 1rem;
  font-size: 0.625rem; font-weight: 700; color: #fff;
  padding: 0.25rem 0.625rem; border-radius: 9999px; background: var(--amber-500); letter-spacing: 0.1em;
}
.price-amount { font-family: var(--font-display); font-size: 3rem; font-weight: 800; color: var(--ink); letter-spacing: -0.04em; line-height: 1; }
.price-period { font-size: 0.875rem; color: var(--ink-4); margin-left: 0.5rem; }

.checklist { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 0.625rem; }
.checklist li { display: flex; align-items: flex-start; gap: 0.625rem; font-size: 0.9375rem; color: var(--ink-2); }
.checklist li::before {
  content: ''; flex-shrink: 0; width: 1.125rem; height: 1.125rem; border-radius: 9999px;
  background: var(--amber-50); background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23F97316' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E");
  background-position: center; background-size: 0.75rem; background-repeat: no-repeat; margin-top: 0.125rem;
}

/* --- Marketing footer -------------------------------------- */
.footer {
  background: var(--ink); color: var(--cream-3);
  padding: 4rem 1.5rem 2rem; margin-top: 5rem;
}
.footer h4 { color: var(--cream); font-size: 0.875rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 1rem; }
.footer ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 0.5rem; }
.footer a { color: var(--cream-3); font-size: 0.875rem; transition: color 0.15s; }
.footer a:hover { color: var(--amber-400); }
.footer-meta { color: var(--ink-4); font-size: 0.75rem; padding-top: 2rem; border-top: 1px solid rgba(255, 255, 255, 0.08); margin-top: 2rem; }

/* --- Empty state ------------------------------------------ */
.empty {
  text-align: center; padding: 3rem 1.5rem;
  border: 2px dashed var(--line); border-radius: var(--r-xl);
  background: var(--cream-2);
}
.empty-icon {
  width: 3.5rem; height: 3.5rem; border-radius: 9999px;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--amber-50); color: var(--amber-600); margin-bottom: 0.75rem;
}
.empty-title { font-family: var(--font-display); font-size: 1.125rem; font-weight: 700; color: var(--ink); }
.empty-desc { color: var(--ink-3); font-size: 0.875rem; margin: 0.375rem 0 1rem; }

/* --- Form row --------------------------------------------- */
.form-row { display: grid; gap: 1rem; }
.form-row-2 { grid-template-columns: repeat(2, 1fr); }
.form-row-3 { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 768px) { .form-row-2, .form-row-3 { grid-template-columns: 1fr; } }
.form-field { display: flex; flex-direction: column; gap: 0.375rem; }
.form-label { font-size: 0.875rem; font-weight: 600; color: var(--ink-2); }
.form-help { font-size: 0.75rem; color: var(--ink-4); }
.form-error { font-size: 0.75rem; color: var(--red-600); margin-top: 0.25rem; }

/* --- Auth shell (centered card) --------------------------- */
.auth-shell {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  padding: 2rem 1rem;
  background:
    radial-gradient(circle at 20% 20%, rgba(249, 115, 22, 0.12) 0%, transparent 40%),
    radial-gradient(circle at 80% 80%, rgba(124, 58, 237, 0.12) 0%, transparent 40%),
    var(--cream);
}
.auth-card { background: #fff; border: 1px solid var(--line); border-radius: var(--r-2xl); padding: 2.5rem; max-width: 28rem; width: 100%; box-shadow: var(--shadow-xl); }

/* --- Admin/Tenant app shell ------------------------------- */
.app-shell { display: flex; min-height: 100vh; background: var(--cream-2); }
.app-sidebar {
  width: 16rem; flex-shrink: 0; background: #fff;
  border-right: 1px solid var(--line); display: flex; flex-direction: column;
  position: sticky; top: 0; height: 100vh; overflow-y: auto;
}
.app-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.app-topbar {
  background: #fff; border-bottom: 1px solid var(--line);
  padding: 0.875rem 1.5rem; display: flex; align-items: center; justify-content: space-between; gap: 1rem;
}
.app-content { padding: 1.5rem 2rem; flex: 1; }
@media (max-width: 1023px) {
  .app-shell { flex-direction: column; }
  .app-sidebar { width: 100%; height: auto; position: relative; }
  .app-content { padding: 1rem; }
}

/* --- Sidebar nav item ------------------------------------ */
.sb-section { padding: 0.75rem 1rem 0.375rem; font-size: 0.6875rem; font-weight: 700; color: var(--ink-4); text-transform: uppercase; letter-spacing: 0.08em; }
.sb-item { display: flex; align-items: center; gap: 0.625rem; padding: 0.5rem 0.75rem; margin: 0.0625rem 0.5rem; border-radius: var(--r); font-size: 0.875rem; color: var(--ink-2); transition: all 0.15s; }
.sb-item:hover { background: var(--cream-3); color: var(--ink); }
.sb-item.active { background: var(--amber-50); color: var(--amber-700); font-weight: 600; }
.sb-item svg { width: 1.125rem; height: 1.125rem; flex-shrink: 0; }
.sb-badge { margin-left: auto; font-size: 0.625rem; padding: 0.125rem 0.5rem; border-radius: 9999px; background: var(--amber-500); color: #fff; font-weight: 700; }
.sb-foot { padding: 1rem; border-top: 1px solid var(--line); margin-top: auto; }

/* --- Banner / alert --------------------------------------- */
.alert { display: flex; gap: 0.75rem; padding: 1rem 1.25rem; border-radius: var(--r-md); border: 1px solid; }
.alert-amber  { background: var(--amber-50);  border-color: var(--amber-200);  color: var(--amber-900); }
.alert-purple { background: var(--purple-50); border-color: var(--purple-200); color: var(--purple-800); }
.alert-emerald{ background: #ECFDF5;           border-color: #A7F3D0;            color: #065F46; }
.alert-red    { background: #FEF2F2;           border-color: #FECACA;            color: #991B1B; }
.alert-info   { background: #EFF6FF;           border-color: #BFDBFE;            color: #1E3A8A; }

/* --- Pipeline kanban -------------------------------------- */
.kanban { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(280px, 1fr); gap: 0.75rem; overflow-x: auto; padding-bottom: 0.5rem; }
.kanban-col { background: var(--cream-2); border-radius: var(--r-lg); padding: 0.75rem; min-height: 24rem; }
.kanban-col-head { display: flex; align-items: center; justify-content: space-between; padding: 0.25rem 0.5rem 0.75rem; }
.kanban-col-name { font-size: 0.8125rem; font-weight: 700; color: var(--ink-2); text-transform: uppercase; letter-spacing: 0.05em; display: flex; align-items: center; gap: 0.5rem; }
.kanban-col-count { font-size: 0.6875rem; color: var(--ink-4); font-weight: 600; background: #fff; padding: 0.125rem 0.5rem; border-radius: 9999px; border: 1px solid var(--line); }
.kanban-card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--r-md);
  padding: 0.75rem; margin-bottom: 0.5rem; transition: all 0.15s; cursor: pointer;
}
.kanban-card:hover { border-color: var(--amber-500); box-shadow: var(--shadow-md); transform: translateY(-1px); }
.kanban-card-title { font-weight: 600; font-size: 0.875rem; color: var(--ink); margin-bottom: 0.25rem; }
.kanban-card-meta { font-size: 0.75rem; color: var(--ink-3); display: flex; align-items: center; justify-content: space-between; }

/* --- Misc helpers ----------------------------------------- */
.text-balance { text-wrap: balance; }
.shadow-soft { box-shadow: 0 1px 2px rgba(15, 10, 30, 0.04), 0 4px 16px rgba(15, 10, 30, 0.04); }
.ring-amber { box-shadow: 0 0 0 4px var(--amber-100); }

.bg-grid {
  background-image: linear-gradient(rgba(15, 10, 30, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(15, 10, 30, 0.04) 1px, transparent 1px);
  background-size: 32px 32px;
}
.bg-dots {
  background-image: radial-gradient(circle, rgba(15, 10, 30, 0.08) 1px, transparent 1px);
  background-size: 20px 20px;
}
