/* ─────────────────────────────────────────────────────────────────────────────
   Palette Grid — Main Stylesheet (Indigo + Cyan redesign)
   ───────────────────────────────────────────────────────────────────────────── */

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



/* ─── Design Tokens ─────────────────────────────────────────────────────────── */

:root {
  /* Brand: Indigo + Cyan (clean tech SaaS) */
  --brand: #6366f1;
  --brand-dark: #4338ca;
  --brand-light: #eef2ff;
  --accent: #06b6d4;
  /* cyan */
  --accent-dark: #0891b2;
  --accent-light: #cffafe;
  --success: #10b981;
  --danger: #ef4444;
  --warning: #f59e0b;

  --bg: #f6f8fc;
  --bg-secondary: #eef1f8;
  --surface: #ffffff;
  --surface-elevated: #ffffff;
  --border: #e6e9f2;
  --border-focus: #6366f1;

  --text: #0e1124;
  --text-secondary: #44485e;
  --text-muted: #8a8fa6;

  --sidebar-w: 240px;
  --topbar-h: 60px;

  --radius-sm: 8px;
  --radius: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-full: 99px;

  --shadow-sm: 0 1px 2px rgba(15, 17, 36, .05), 0 2px 8px rgba(15, 17, 36, .05);
  --shadow: 0 6px 18px rgba(15, 17, 36, .08), 0 2px 6px rgba(15, 17, 36, .05);
  --shadow-lg: 0 24px 60px -16px rgba(20, 18, 70, .28), 0 8px 24px rgba(15, 17, 36, .10);
  --shadow-brand: 0 12px 32px -8px rgba(99, 102, 241, .45);
  --shadow-accent: 0 12px 32px -8px rgba(6, 182, 212, .40);

  --font: 'Outfit', system-ui, sans-serif;
  --font-display: 'Sora', 'Outfit', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', 'Space Mono', monospace;

  /* Brand gradients */
  --grad-brand: linear-gradient(135deg, #6366f1 0%, #4f46e5 40%, #06b6d4 100%);
  --grad-brand-rev: linear-gradient(135deg, #06b6d4 0%, #6366f1 100%);
  --grad-text: linear-gradient(120deg, #6366f1 0%, #22d3ee 100%);
  --grad-mesh:
    radial-gradient(60% 60% at 12% 8%, rgba(99, 102, 241, .18) 0%, transparent 60%),
    radial-gradient(50% 50% at 92% 6%, rgba(6, 182, 212, .16) 0%, transparent 55%),
    radial-gradient(55% 55% at 82% 96%, rgba(99, 102, 241, .14) 0%, transparent 60%);

  --ring: 0 0 0 4px rgba(99, 102, 241, .22);
  --ease: cubic-bezier(.22, .61, .36, 1);
  --ease-bounce: cubic-bezier(.34, 1.56, .64, 1);

  --transition: 0.18s ease;
}

/* Dark Mode */
[data-theme="dark"] {
  --bg: #0a0b12;
  --bg-secondary: #11131d;
  --surface: #161824;
  --surface-elevated: #1c1f2e;
  --border: #272a3a;
  --border-focus: #818cf8;
  --text: #eef0fb;
  --text-secondary: #b4b8cf;
  --text-muted: #80849e;
  --brand: #818cf8;
  --brand-dark: #6366f1;
  --brand-light: #1d1f4a;
  --accent: #22d3ee;
  --accent-light: #0e3a44;

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .4);
  --shadow: 0 8px 24px rgba(0, 0, 0, .45);
  --shadow-lg: 0 28px 70px -18px rgba(0, 0, 0, .7), 0 10px 30px rgba(0, 0, 0, .4);
  --shadow-brand: 0 12px 32px -8px rgba(99, 102, 241, .55);
  --grad-mesh:
    radial-gradient(60% 60% at 12% 8%, rgba(99, 102, 241, .22) 0%, transparent 60%),
    radial-gradient(50% 50% at 92% 6%, rgba(34, 211, 238, .16) 0%, transparent 55%),
    radial-gradient(55% 55% at 82% 96%, rgba(99, 102, 241, .18) 0%, transparent 60%);
}

/* ─── Reset & Base ──────────────────────────────────────────────────────────── */

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

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  margin: 0;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a {
  color: var(--brand);
  text-decoration: none;
  transition: color var(--transition);
}

/* Display font for headings & key brand surfaces */
h1,
h2,
h3,
.hero-title,
.section-title,
.cta-title,
.legal-title,
.auth-title,
.plan-name,
.panel-title,
.feature-title,
.navbar-brand,
.footer-logo-text,
.sidebar-logo {
  font-family: var(--font-display);
  letter-spacing: -0.02em;
}

::selection {
  background: rgba(99, 102, 241, .28);
  color: var(--text);
}

a:hover {
  color: var(--brand-dark);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

button {
  font-family: var(--font);
  cursor: pointer;
}

/* ─── Utility Classes ──────────────────────────────────────────────────────── */

.hidden {
  display: none !important;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ─── Scrollbar ─────────────────────────────────────────────────────────────── */

::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: color-mix(in srgb, var(--brand) 35%, var(--border));
  border-radius: 99px;
  border: 2px solid var(--bg);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--brand);
}

/* ─── Toast Notifications ────────────────────────────────────────────────────── */

#toast-container {
  position: fixed;
  bottom: 28px;
  right: 28px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
}

.toast {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--text);
  color: var(--bg);
  padding: 12px 18px;
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 600;
  pointer-events: all;
  box-shadow: var(--shadow-lg);
  animation: toastIn .25s ease forwards;
  max-width: 340px;
}

[data-theme="dark"] .toast {
  background: var(--surface-elevated);
  color: var(--text);
  border: 1px solid var(--border);
}

.toast.success {
  border-left: 3px solid var(--success);
}

.toast.error {
  border-left: 3px solid var(--danger);
}

.toast.warning {
  border-left: 3px solid var(--warning);
}

.toast.fade-out {
  animation: toastOut .25s ease forwards;
}

@keyframes toastIn {
  from {
    transform: translateX(20px);
    opacity: 0;
  }

  to {
    transform: translateX(0);
    opacity: 1;
  }
}

@keyframes toastOut {
  from {
    transform: translateX(0);
    opacity: 1;
  }

  to {
    transform: translateX(20px);
    opacity: 0;
  }
}

/* ─── Navigation (Homepage) ──────────────────────────────────────────────────── */

.navbar {
  position: sticky;
  top: 0;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  z-index: 100;
}

[data-theme="dark"] .navbar {
  background: var(--bg);
}

.navbar-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  height: 64px;
  display: flex;
  align-items: center;
  gap: 32px;
}

.navbar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 1.2rem;
  color: var(--text);
  text-decoration: none;
  flex-shrink: 0;
}

.navbar-brand-icon {
  width: 38px;
  height: 38px;
  background: var(--grad-brand);
  border-radius: 11px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 19px;
  flex-shrink: 0;
  box-shadow: var(--shadow-brand);
  transition: transform .4s var(--ease-bounce);
}

.navbar-brand:hover .navbar-brand-icon {
  transform: rotate(-12deg) scale(1.08);
}

.brand-text {
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1;
}

.brand-palette {
  color: var(--text);
}

.brand-grid {
  background: var(--grad-text);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

.brand-dot {
  color: var(--text-muted);
  font-weight: 600;
  font-size: 0.85em;
}

.navbar-links {
  display: flex;
  list-style: none;
  padding: 0;
  justify-content: center;
  margin: 0;
  gap: 2px;
  flex: 1;
}

.navbar-links a {
  display: block;
  padding: 7px 14px;
  font-size: 15px;
  color: var(--text-secondary);
  font-weight: 500;
  border-radius: var(--radius-sm);
  transition: color var(--transition), background var(--transition);
}


.navbar-links a:hover {
  color: var(--brand);
  background: var(--brand-light);
}

.navbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: auto;
}

.navbar-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--text);
  font-size: 22px;
  padding: 8px;
  margin-left: auto;
}

@media (max-width: 768px) {
  .navbar-links {
    display: none;
  }

  .navbar-toggle {
    display: block;
  }

  .navbar-links.open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    padding: 12px;
    box-shadow: var(--shadow);
  }
}

/* ─── Buttons ────────────────────────────────────────────────────────────────── */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: var(--radius);
  font-family: var(--font);
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  border: 2px solid transparent;
  text-decoration: none;
  transition: all var(--transition);
  white-space: nowrap;
  line-height: 1;
}

.btn:hover:not(:disabled) {
  transform: translateY(-2px);
}

.btn:active {
  transform: translateY(0) scale(.99);
}

.btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

/* shimmer sweep on all buttons */
.btn {
  position: relative;
  isolation: isolate;
  overflow: hidden;
}

.btn::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(110deg, transparent 30%, rgba(255, 255, 255, .35) 50%, transparent 70%);
  transform: translateX(-130%);
  transition: transform .6s var(--ease);
}

.btn:hover:not(:disabled)::after {
  transform: translateX(130%);
}

.btn-primary {
  background: var(--grad-brand);
  background-size: 160% 160%;
  color: white;
  border-color: transparent;
  box-shadow: var(--shadow-brand);
}

.btn-primary:hover:not(:disabled) {
  color: white;
  box-shadow: 0 18px 40px -10px rgba(99, 102, 241, 0.55);
  animation: pg-grad-pan 3s var(--ease) infinite;
}

.btn-secondary {
  background: var(--surface);
  color: var(--text);
  border-color: var(--border);
  box-shadow: var(--shadow-sm);
}

.btn-secondary:hover:not(:disabled) {
  background: var(--surface);
  color: var(--brand-dark);
  border-color: color-mix(in srgb, var(--brand) 45%, var(--border));
  box-shadow: var(--shadow);
}

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
}

.btn-ghost:hover:not(:disabled) {
  background: color-mix(in srgb, var(--brand) 10%, transparent);
  color: var(--brand-dark);
}

.btn-danger {
  background: linear-gradient(135deg, #ef4444, #dc2626);
  color: white;
  box-shadow: 0 10px 26px -8px rgba(220, 38, 38, .5);
}

.btn-accent {
  background: linear-gradient(135deg, #06b6d4, #0891b2);
  color: white;
  box-shadow: var(--shadow-accent);
}

.btn-success {
  background: var(--success);
  color: white;
}

.btn-sm {
  padding: 7px 14px;
  font-size: 13px;
  border-radius: var(--radius-sm);
}

.btn-lg {
  padding: 14px 28px;
  font-size: 17px;
}

.btn-icon {
  padding: 8px;
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
}

/* ─── Hero Section ──────────────────────────────────────────────────────────── */

.hero {
  background: linear-gradient(140deg, #0b1437 0%, #1e2a78 45%, #0c4a6e 100%);
  min-height: 94vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 80px 24px;
  text-align: center;
  position: relative;
  overflow: hidden;
}


.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 28% 45%, rgba(99, 102, 241, 0.32) 0%, transparent 60%),
    radial-gradient(ellipse at 75% 30%, rgba(6, 182, 212, 0.26) 0%, transparent 52%),
    radial-gradient(ellipse at 60% 90%, rgba(129, 140, 248, 0.2) 0%, transparent 55%);
  animation: pg-float 16s ease-in-out infinite;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: rgba(255, 255, 255, 0.9);
  padding: 7px 16px;
  border-radius: var(--radius-full);
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 28px;
  backdrop-filter: blur(8px);
  position: relative;
}

.hero-title {
  font-size: clamp(2.8rem, 7vw, 5rem);
  font-weight: 800;
  color: white;
  line-height: 1.05;
  margin: 0 0 24px;
  letter-spacing: -0.03em;
  position: relative;
  animation: pg-rise .7s var(--ease) .08s both;
}

.hero-gradient-text {
  background: linear-gradient(90deg, #818cf8, #38bdf8, #22d3ee);
  background-size: 200% 200%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: pg-grad-pan 6s var(--ease) infinite;
}

.hero-desc {
  font-size: clamp(1rem, 2.5vw, 1.2rem);
  color: rgba(255, 255, 255, 0.72);
  max-width: 580px;
  margin: 0 auto 40px;
  line-height: 1.7;
  position: relative;
  animation: pg-rise .7s var(--ease) .16s both;
}

.hero-actions {
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
  position: relative;
  margin-bottom: 20px;
  animation: pg-rise .7s var(--ease) .24s both;
}

.btn-hero-primary {
  background: var(--grad-brand);
  background-size: 160% 160%;
  color: white;
  padding: 15px 34px;
  font-size: 16px;
  box-shadow: 0 14px 38px -8px rgba(99, 102, 241, 0.55);
}

.btn-hero-primary:hover:not(:disabled) {
  animation: pg-grad-pan 3s var(--ease) infinite;
}

.btn-hero-secondary {
  background: rgba(255, 255, 255, 0.12);
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.28);
  padding: 15px 34px;
  font-size: 16px;
  backdrop-filter: blur(6px);
}

.btn-hero-secondary:hover:not(:disabled) {
  background: rgba(255, 255, 255, .2);
  color: white;
}

.hero-sub {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.5);
  position: relative;
  animation: pg-rise .7s var(--ease) .32s both;
}

.hero-preview {
  margin-top: 60px;
  display: flex;
  gap: 10px;
  justify-content: center;
  position: relative;
}

.hero-preview-swatch {
  width: 58px;
  height: 88px;
  border-radius: 14px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
  transition: transform .4s var(--ease-bounce);
  animation: pg-swatch-in .6s var(--ease-bounce) both;
}

.hero-preview-swatch:nth-child(1) {
  animation-delay: .45s
}

.hero-preview-swatch:nth-child(2) {
  animation-delay: .52s
}

.hero-preview-swatch:nth-child(3) {
  animation-delay: .59s
}

.hero-preview-swatch:nth-child(4) {
  animation-delay: .66s
}

.hero-preview-swatch:nth-child(5) {
  animation-delay: .73s
}

.hero-preview-swatch:hover {
  transform: scale(1.12) translateY(-8px) rotate(-3deg);
}

.hero-preview:hover .hero-preview-swatch:not(:hover) {
  opacity: .6;
}

.hero-badge {
  animation: pg-rise .7s var(--ease) both;
}

/* ─── Features Section ───────────────────────────────────────────────────────── */

.section {
  padding: 94px 24px;
}

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

.section-label {
  display: inline-block;
  background: var(--brand-light);
  color: var(--brand);
  padding: 5px 14px;
  border-radius: var(--radius-full);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 14px;
}

.section-title {
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 800;
  color: var(--text);
  margin: 0 0 16px;
  letter-spacing: -0.02em;
}

.section-sub {
  font-size: 1.1rem;
  color: var(--text-secondary);
  max-width: 560px;
  margin: 0 auto 52px;
  line-height: 1.7;
}

.features-grid {
  max-width: 1100px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
}

.feature-card {
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform .3s var(--ease), box-shadow .3s var(--ease), border-color .3s var(--ease);
}

.feature-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 3px;
  background: var(--grad-brand);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .4s var(--ease);
}

.feature-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
  border-color: color-mix(in srgb, var(--brand) 30%, var(--border));
}

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

.feature-icon {
  width: 54px;
  height: 54px;
  background: color-mix(in srgb, var(--brand) 12%, var(--surface));
  border: 1px solid color-mix(in srgb, var(--brand) 18%, var(--border));
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  margin-bottom: 20px;
  transition: transform .4s var(--ease-bounce);
}

.feature-card:hover .feature-icon {
  transform: rotate(-8deg) scale(1.08);
}

.feature-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
  margin: 0 0 10px;
}

.feature-text {
  font-size: 15px;
  color: var(--text-secondary);
  line-height: 1.65;
  margin: 0;
}

/* ─── Palette Preview ───────────────────────────────────────────────────────── */

.palette-preview-section {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.preview-palette {
  max-width: 900px;
  margin: 0 auto;
  display: flex;
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  height: 200px;
}

.preview-swatch {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 16px;
  cursor: pointer;
  transition: flex var(--transition);
  position: relative;
  overflow: hidden;
}

.preview-swatch:hover {
  flex: 1.8;
}

.preview-swatch-label {
  font-size: 12px;
  font-family: var(--font-mono);
  font-weight: 700;
  padding: 4px 8px;
  background: rgba(0, 0, 0, 0.2);
  border-radius: 6px;
  color: white;
  width: fit-content;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity .2s, transform .2s;
  backdrop-filter: blur(4px);
}

.preview-swatch:hover .preview-swatch-label {
  opacity: 1;
  transform: translateY(0);
}

/* ─── Pricing ────────────────────────────────────────────────────────────────── */

.pricing-grid {
  max-width: 1000px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
  align-items: start;
}

.pricing-card {
  background: var(--surface);
  border: 2px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 36px;
  position: relative;
  box-shadow: var(--shadow-sm);
  transition: transform .3s var(--ease), box-shadow .3s var(--ease), border-color .3s;
}

.pricing-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
}

.pricing-card.featured {
  border-color: transparent;
  box-shadow: var(--shadow-lg);
  transform: scale(1.03);
  background:
    linear-gradient(var(--surface), var(--surface)) padding-box,
    var(--grad-brand) border-box;
}

.pricing-card.featured:hover {
  transform: scale(1.03) translateY(-6px);
}

.pricing-badge {
  position: absolute;
  top: -14px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--grad-brand);
  color: white;
  font-size: 12px;
  font-weight: 800;
  padding: 6px 16px;
  border-radius: var(--radius-full);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  white-space: nowrap;
  box-shadow: var(--shadow-brand);
}

.plan-name {
  font-size: 20px;
  font-weight: 800;
  color: var(--text);
  margin: 0 0 8px;
}

.plan-desc {
  font-size: 14px;
  color: var(--text-secondary);
  margin: 0 0 24px;
}

.plan-price {
  margin-bottom: 28px;
}

.plan-price-num {
  font-size: 3rem;
  font-weight: 800;
  background: var(--grad-text);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  letter-spacing: -0.04em;
}

.plan-price-period {
  font-size: 14px;
  color: var(--text-muted);
  margin-left: 4px;
}

.plan-features {
  list-style: none;
  padding: 0;
  margin: 0 0 28px;
}

.plan-features li {
  padding: 9px 0;
  font-size: 15px;
  color: var(--text-secondary);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 10px;
}

.plan-features li::before {
  content: '✓';
  color: var(--success);
  font-weight: 700;
  flex-shrink: 0;
}

.plan-features li.disabled {
  color: var(--text-muted);
}

.plan-features li.disabled::before {
  content: '×';
  color: var(--text-muted);
}

.plan-features li::before {
  color: var(--brand);
}

/* ─── CTA Section ────────────────────────────────────────────────────────────── */

.cta-section {
  position: relative;
  overflow: hidden;
  background: var(--grad-brand);
  background-size: 180% 180%;
  animation: pg-grad-pan 10s ease infinite;
  padding: 88px 24px;
  text-align: center;
}

.cta-section::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(40% 60% at 18% 12%, rgba(255, 255, 255, .22), transparent 60%),
    radial-gradient(40% 60% at 86% 88%, rgba(255, 255, 255, .16), transparent 60%);
}

.cta-title,
.cta-sub,
.cta-actions {
  position: relative;
}

.cta-title {
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 800;
  color: white;
  margin: 0 0 16px;
  letter-spacing: -0.02em;
}

.cta-sub {
  font-size: 1.15rem;
  color: rgba(255, 255, 255, 0.85);
  max-width: 480px;
  margin: 0 auto 36px;
}

.cta-actions {
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
}

.btn-cta-primary {
  background: white;
  color: var(--brand-dark);
  font-size: 16px;
  padding: 15px 34px;
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.22);
}

.btn-cta-primary:hover:not(:disabled) {
  color: var(--brand-dark);
}

.btn-cta-secondary {
  background: rgba(255, 255, 255, 0.15);
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.35);
  font-size: 16px;
  padding: 15px 34px;
  backdrop-filter: blur(6px);
}

.btn-cta-secondary:hover:not(:disabled) {
  background: rgba(255, 255, 255, .24);
  color: white;
}

/* ─── Footer ─────────────────────────────────────────────────────────────────── */

.footer {
  background: #0a0a14;
  color: rgba(255, 255, 255, 0.65);
  padding: 64px 24px 0;
}

.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr 1fr;
  gap: 40px;
}

@media (max-width: 900px) {
  .footer-inner {
    grid-template-columns: 1fr 1fr 1fr;
  }
}

@media (max-width: 600px) {
  .footer-inner {
    grid-template-columns: 1fr 1fr;
  }
}

.footer-brand {
  grid-column: span 1;
}

.footer-logo-text {
  font-size: 1.3rem;
  font-weight: 800;
  color: white;
  margin-bottom: 12px;
}

.footer-tagline {
  font-size: 14px;
  line-height: 1.7;
  margin: 0 0 20px;
}

.footer-social {
  display: flex;
  gap: 10px;
}

.footer-social a {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.7);
  font-size: 14px;
  text-decoration: none;
  transition: background var(--transition);
}

.footer-social a:hover {
  background: var(--brand);
  color: white;
}

.footer-col h4 {
  color: white;
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin: 0 0 16px;
}

.footer-col ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-col li {
  margin-bottom: 10px;
}

.footer-col a {
  color: rgba(255, 255, 255, 0.55);
  font-size: 14px;
  transition: color var(--transition);
}

.footer-col a:hover {
  color: white;
}

.footer-bottom {
  max-width: 1200px;
  margin: 48px auto 0;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding: 20px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 13px;
}

/* ─── Auth Pages ─────────────────────────────────────────────────────────────── */

.auth-page {
  min-height: 100vh;
  background: linear-gradient(140deg, #0f0c29 0%, #302b63 50%, #24243e 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  position: relative;
}

.auth-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 48px;
  width: 100%;
  max-width: 440px;
  box-shadow: var(--shadow-lg);
}

.auth-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 32px;
}

.auth-logo-icon {
  width: 36px;
  height: 36px;
  background: linear-gradient(135deg, var(--brand), #8b5cf6);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
}

.auth-logo-text {
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--text);
}

.auth-title {
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--text);
  margin: 0 0 8px;
}

.auth-sub {
  font-size: 15px;
  color: var(--text-secondary);
  margin: 0 0 32px;
}

.form-group {
  margin-bottom: 18px;
}

.form-label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 8px;
}

.form-input {
  width: 100%;
  background: var(--bg);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 16px;
  font-size: 15px;
  color: var(--text);
  font-family: var(--font);
  outline: none;
  transition: border-color var(--transition), box-shadow var(--transition);
}

.form-input:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.12);
}

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

.form-error {
  font-size: 13px;
  color: var(--danger);
  margin-top: 6px;
}

.form-submit {
  width: 100%;
  margin-top: 8px;
}

.auth-divider {
  text-align: center;
  font-size: 14px;
  color: var(--text-muted);
  margin: 24px 0;
  position: relative;
}

.auth-divider::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 1px;
  background: var(--border);
}

.auth-divider span {
  background: var(--surface);
  padding: 0 14px;
  position: relative;
}

.auth-link {
  text-align: center;
  font-size: 14px;
  color: var(--text-secondary);
  margin-top: 24px;
}

/* ─── Dashboard Layout ───────────────────────────────────────────────────────── */

.dashboard-layout {
  display: flex;
  height: 100vh;
  overflow: hidden;
}

/* Sidebar */
.sidebar {
  width: var(--sidebar-w);
  background: var(--surface);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  transition: transform .25s ease;
  z-index: 50;
  overflow-y: auto;
}

.sidebar-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 20px;
  border-bottom: 1px solid var(--border);
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--text);
  text-decoration: none;
}

.sidebar-logo-icon {
  width: 30px;
  height: 30px;
  background: linear-gradient(135deg, var(--brand), #8b5cf6);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  flex-shrink: 0;
}

.sidebar-section {
  padding: 20px 12px 8px;
}

.sidebar-section-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  padding: 0 8px;
  margin-bottom: 6px;
}

.sidebar-nav {
  list-style: none;
  padding: 0;
  margin: 0;
}

.sidebar-nav-item {
  margin-bottom: 2px;
}

.sidebar-nav-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
  text-decoration: none;
  cursor: pointer;
  transition: all var(--transition);
  border: none;
  background: none;
  width: 100%;
  text-align: left;
}

.sidebar-nav-link:hover {
  background: color-mix(in srgb, var(--brand) 9%, transparent);
  color: var(--text);
  transform: translateX(2px);
}

.sidebar-nav-link.active {
  background: var(--grad-brand);
  color: #fff;
  font-weight: 700;
  box-shadow: var(--shadow-brand);
}

.sidebar-nav-link.active .sidebar-nav-icon {
  filter: brightness(1.5);
}

.sidebar-nav-icon {
  width: 18px;
  text-align: center;
  flex-shrink: 0;
}

.sidebar-bottom {
  margin-top: auto;
  padding: 12px;
  border-top: 1px solid var(--border);
}

.sidebar-user {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px;
  border-radius: var(--radius);
  cursor: pointer;
  transition: background var(--transition);
}

.sidebar-user:hover {
  background: var(--bg-secondary);
}

.sidebar-avatar {
  width: 34px;
  height: 34px;
  background: linear-gradient(135deg, var(--brand), #8b5cf6);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 800;
  font-size: 14px;
  flex-shrink: 0;
}

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

.sidebar-user-name {
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidebar-user-plan {
  font-size: 11px;
  color: var(--text-muted);
  text-transform: capitalize;
}

/* Topbar */
.topbar {
  height: var(--topbar-h);
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  padding: 0 24px;
  gap: 16px;
  flex-shrink: 0;
}

.topbar-menu-btn {
  display: none;
  background: none;
  border: none;
  color: var(--text);
  font-size: 20px;
  padding: 6px;
  border-radius: var(--radius-sm);
  cursor: pointer;
}

.topbar-title {
  font-size: 17px;
  font-weight: 700;
  color: var(--text);
}

.topbar-spacer {
  flex: 1;
}

/* Main Content */
.main-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.workspace {
  flex: 1;
  overflow-y: auto;
  padding: 28px;
}

/* ─── Panel System ───────────────────────────────────────────────────────────── */

.panel {
  display: none;
}

.panel.active {
  display: block;
  animation: pg-rise .45s var(--ease) both;
}

/* ─── Cards ──────────────────────────────────────────────────────────────────── */

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: box-shadow .3s var(--ease);
}

.card:hover {
  box-shadow: var(--shadow);
}

.card-header {
  padding: 20px 24px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  background: color-mix(in srgb, var(--bg-secondary) 50%, var(--surface));
}

.card-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
  margin: 0;
}

.card-body {
  padding: 24px;
}

/* ─── Palette Generator ──────────────────────────────────────────────────────── */

.palette-controls {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}

.palette-type-select {
  flex: 1;
  min-width: 180px;
  background: var(--bg);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 9px 14px;
  font-size: 14px;
  color: var(--text);
  font-family: var(--font);
  cursor: pointer;
  outline: none;
  transition: border-color var(--transition);
}

.palette-type-select:focus {
  border-color: var(--brand);
}

.color-count-input {
  width: 80px;
  background: var(--bg);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 9px 14px;
  font-size: 14px;
  color: var(--text);
  font-family: var(--font);
  outline: none;
  transition: border-color var(--transition);
  text-align: center;
}

.palette-strip {
  display: flex;
  border-radius: var(--radius-lg);
  overflow: hidden;
  height: 180px;
  margin: 20px 0;
  box-shadow: var(--shadow);
}

.color-swatch {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 12px;
  position: relative;
  cursor: pointer;
  transition: flex var(--transition);
  min-width: 0;
  overflow: hidden;
}

.color-swatch:hover {
  flex: 1.6;
}

.swatch-actions {
  display: flex;
  gap: 4px;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity .2s, transform .2s;
}

.color-swatch:hover .swatch-actions {
  opacity: 1;
  transform: translateY(0);
}

.swatch-btn {
  width: 28px;
  height: 28px;
  background: rgba(0, 0, 0, 0.25);
  border: none;
  border-radius: 6px;
  color: white;
  font-size: 13px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(4px);
  transition: background .2s;
}

.swatch-btn:hover {
  background: rgba(0, 0, 0, 0.45);
}

.swatch-hex {
  font-size: 12px;
  font-family: var(--font-mono);
  font-weight: 700;
  color: white;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.4);
  text-transform: uppercase;
  margin-top: 4px;
  cursor: pointer;
}

.swatch-lock {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 26px;
  height: 26px;
  background: rgba(0, 0, 0, 0.2);
  border: none;
  border-radius: 6px;
  color: white;
  font-size: 12px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(4px);
  transition: background .2s;
}

.swatch-lock.locked {
  background: rgba(0, 0, 0, 0.5);
}

.color-info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 14px;
  margin-top: 20px;
}

.color-info-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  display: flex;
  gap: 14px;
  align-items: center;
}

.color-info-swatch {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  flex-shrink: 0;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
}

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

.color-info-hex {
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
}

.color-info-rgb {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 2px;
}

.color-info-hsl {
  font-size: 12px;
  color: var(--text-muted);
}

/* ─── Export Modal ───────────────────────────────────────────────────────────── */

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 200;
  padding: 24px;
  backdrop-filter: blur(4px);
}

.modal {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 32px;
  width: 100%;
  max-width: 600px;
  max-height: 85vh;
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
}

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

.modal-title {
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--text);
  margin: 0;
}

.modal-close {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 22px;
  cursor: pointer;
  padding: 4px;
  border-radius: 6px;
  transition: color var(--transition);
}

.modal-close:hover {
  color: var(--text);
}

.export-tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 20px;
  background: var(--bg-secondary);
  padding: 4px;
  border-radius: var(--radius);
}

.export-tab {
  flex: 1;
  padding: 8px;
  background: none;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--transition);
}

.export-tab.active {
  background: var(--surface);
  color: var(--brand);
  box-shadow: var(--shadow-sm);
}

.code-block {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--text);
  white-space: pre;
  overflow-x: auto;
  line-height: 1.7;
}

/* ─── Gradient Generator ─────────────────────────────────────────────────────── */

.gradient-preview-box {
  width: 100%;
  height: 220px;
  border-radius: var(--radius-lg);
  margin-bottom: 20px;
  box-shadow: var(--shadow);
  cursor: pointer;
  transition: transform var(--transition);
}

.gradient-preview-box:hover {
  transform: scale(1.01);
}

.gradient-controls {
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  gap: 12px;
  align-items: center;
}

.gradient-angle-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
}

.gradient-angle-label {
  font-size: 13px;
  color: var(--text-secondary);
  white-space: nowrap;
}

.gradient-angle-input {
  width: 70px;
  background: var(--bg);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 8px 10px;
  font-size: 14px;
  font-family: var(--font-mono);
  color: var(--text);
  outline: none;
  text-align: center;
}

.saved-gradients-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 20px;
  margin-top: 24px;
}

.saved-gradient-card {
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  cursor: pointer;
  transition: transform var(--transition), box-shadow var(--transition);
  position: relative;
  width: 260px;
}

.saved-gradient-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
}

.saved-gradient-preview {
  height: 80px;
}

.saved-gradient-info {
  background: var(--surface);
  padding: 14px 16px;
}

.saved-gradient-name {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  margin: 0 0 12px;
  display: block;
}

.saved-gradient-actions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

/* ─── Contrast Checker ──────────────────────────────────────────────────────── */

.contrast-demo {
  border-radius: var(--radius-lg);
  padding: 40px;
  text-align: center;
  margin: 20px 0;
  transition: background .3s, color .3s;
}

.contrast-demo-text {
  font-size: 1.5rem;
  font-weight: 700;
  margin: 0 0 8px;
}

.contrast-demo-small {
  font-size: 0.9rem;
  opacity: 0.85;
  margin: 0;
}

.contrast-ratio-display {
  font-size: 3rem;
  font-weight: 900;
  color: var(--brand);
  text-align: center;
  letter-spacing: -0.04em;
}

.wcag-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 16px;
}

.wcag-item {
  background: var(--bg-secondary);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 14px;
  text-align: center;
}

.wcag-item.pass {
  border-color: var(--success);
  background: rgba(16, 185, 129, 0.07);
}

.wcag-item.fail {
  border-color: var(--danger);
  background: rgba(239, 68, 68, 0.07);
}

.wcag-label {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.wcag-status {
  font-size: 16px;
  font-weight: 800;
}

.wcag-item.pass .wcag-status {
  color: var(--success);
}

.wcag-item.fail .wcag-status {
  color: var(--danger);
}

.color-picker-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

/* ─── Component Generator ────────────────────────────────────────────────────── */

.component-types-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 10px;
  margin-bottom: 28px;
}

.comp-type-btn {
  background: var(--bg-secondary);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 10px;
  text-align: center;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  transition: all var(--transition);
  font-family: var(--font);
}

.comp-type-btn:hover {
  border-color: var(--brand);
  color: var(--brand);
  background: var(--brand-light);
}

.comp-type-btn.selected {
  border-color: var(--brand);
  background: var(--brand-light);
  color: var(--brand);
}

.comp-type-icon {
  font-size: 20px;
  margin-bottom: 6px;
  display: block;
}

.component-preview-frame {
  border: 1.5px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  min-height: 300px;
  margin-bottom: 20px;
  background: #fff;
}

.component-preview-iframe {
  width: 100%;
  border: none;
  min-height: 300px;
  display: block;
}

.code-tabs {
  display: flex;
  gap: 2px;
  border-bottom: 1px solid var(--border);
  padding: 0 0 0 4px;
  margin-bottom: 16px;
}

.code-tab {
  padding: 10px 18px;
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  transition: all var(--transition);
  margin-bottom: -1px;
  font-family: var(--font);
}

.code-tab.active {
  color: var(--brand);
  border-bottom-color: var(--brand);
}

.code-tab:hover {
  color: var(--text);
}

/* ─── Palettes List ──────────────────────────────────────────────────────────── */

.palettes-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 20px;
}

.palette-card {
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: transform var(--transition), box-shadow var(--transition);
}

.palette-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
}

.palette-card-strip {
  display: flex;
  height: 80px;
}

.palette-card-strip-swatch {
  flex: 1;
}

.palette-card-body {
  padding: 14px 16px;
}

.palette-card-name {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  margin: 0 0 6px;
}

.palette-card-date {
  font-size: 12px;
  color: var(--text-muted);
}

.palette-card-actions {
  display: flex;
  gap: 6px;
  margin-top: 12px;
  flex-wrap: wrap;
}

/* ─── Empty States ───────────────────────────────────────────────────────────── */

.empty-state {
  text-align: center;
  padding: 60px 24px;
  color: var(--text-muted);
}

.empty-state-icon {
  font-size: 3rem;
  margin-bottom: 16px;
}

.empty-state-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-secondary);
  margin: 0 0 8px;
}

.empty-state-text {
  font-size: 15px;
  margin: 0 0 24px;
}

/* ─── Responsive Sidebar ─────────────────────────────────────────────────────── */

.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  z-index: 49;
}

@media (max-width: 768px) {
  .sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    transform: translateX(-100%);
    z-index: 50;
    box-shadow: var(--shadow-lg);
  }

  .sidebar.open {
    transform: translateX(0);
  }

  .sidebar-overlay.open {
    display: block;
  }

  .topbar-menu-btn {
    display: flex;
  }

  .workspace {
    padding: 16px;
  }
}

/* ─── Pricing Page ───────────────────────────────────────────────────────────── */

.page-pricing {
  background: var(--bg);
  min-height: 100vh;
}

/* ─── Range / Color Inputs ───────────────────────────────────────────────────── */

input[type="color"] {
  border: none;
  cursor: pointer;
  padding: 0;
  height: 44px;
  width: 60px;
  border-radius: var(--radius-sm);
  background: none;
}

input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 6px;
  border-radius: 99px;
  background: var(--border);
  outline: none;
}

input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--brand);
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(79, 70, 229, 0.3);
}

/* ─── Misc ───────────────────────────────────────────────────────────────────── */

.text-brand {
  color: var(--brand);
}

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

.text-success {
  color: var(--success);
}

.text-danger {
  color: var(--danger);
}

.flex {
  display: flex;
}

.flex-center {
  display: flex;
  align-items: center;
  justify-content: center;
}

.gap-2 {
  gap: 8px;
}

.gap-3 {
  gap: 12px;
}

.gap-4 {
  gap: 16px;
}

.w-full {
  width: 100%;
}

.mt-2 {
  margin-top: 8px;
}

.mt-4 {
  margin-top: 16px;
}

.mb-2 {
  margin-bottom: 8px;
}

.mb-4 {
  margin-bottom: 16px;
}

hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 24px 0;
}

/* ─── Custom Dialog ─────────────────────────────────────────────────────── */
.cf-dialog-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(0, 0, 0, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s;
  backdrop-filter: blur(2px);
}

.cf-dialog-overlay.open {
  opacity: 1;
  pointer-events: all;
}

.cf-dialog {
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px 28px 24px;
  width: 100%;
  max-width: 420px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
  transform: translateY(10px) scale(0.97);
  transition: transform .2s;
}

.cf-dialog-overlay.open .cf-dialog {
  transform: translateY(0) scale(1);
}

.cf-dialog-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 10px;
}

.cf-dialog-icon {
  font-size: 22px;
  width: 44px;
  height: 44px;
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--brand-light);
  flex-shrink: 0;
}

.cf-dialog-icon.confirm {
  background: rgba(239, 68, 68, 0.1);
}

.cf-dialog-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
  margin: 0;
}

.cf-dialog-message {
  font-size: 14px;
  color: var(--text-secondary);
  margin: 0 0 20px;
  line-height: 1.6;
}

.cf-dialog-input {
  width: 100%;
  box-sizing: border-box;
  background: var(--bg);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 10px 14px;
  font-size: 14px;
  color: var(--text);
  font-family: var(--font);
  outline: none;
  margin-bottom: 20px;
  transition: border-color .18s;
}

.cf-dialog-input:focus {
  border-color: var(--brand);
}

.cf-dialog-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
}

/* ─── Global Page Loader ───────────────────────────────────────────────────── */

.page-loader {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    radial-gradient(circle at 30% 20%, rgba(79, 70, 229, 0.22), transparent 35%),
    radial-gradient(circle at 70% 80%, rgba(139, 92, 246, 0.22), transparent 35%),
    rgba(248, 249, 252, 0.92);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

[data-theme="dark"] .page-loader {
  background:
    radial-gradient(circle at 30% 20%, rgba(79, 70, 229, 0.18), transparent 35%),
    radial-gradient(circle at 70% 80%, rgba(139, 92, 246, 0.18), transparent 35%),
    rgba(13, 17, 23, 0.92);
}

.page-loader.show {
  opacity: 1;
  visibility: visible;
  pointer-events: all;
}

.page-loader-card {
  width: min(92vw, 360px);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 34px 28px;
  box-shadow: var(--shadow-lg);
  text-align: center;
  transform: translateY(10px) scale(0.98);
  transition: transform 0.25s ease;
}

.page-loader.show .page-loader-card {
  transform: translateY(0) scale(1);
}

.page-loader-logo {
  width: 62px;
  height: 62px;
  margin: 0 auto 18px;
  border-radius: 18px;
  background: linear-gradient(135deg, var(--brand), #8b5cf6);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  box-shadow: var(--shadow-brand);
  animation: loaderFloat 1.4s ease-in-out infinite;
}

.page-loader-spinner {
  width: 42px;
  height: 42px;
  margin: 0 auto 18px;
  border: 4px solid var(--border);
  border-top-color: var(--brand);
  border-radius: 50%;
  animation: loaderSpin 0.75s linear infinite;
}

.page-loader-title {
  margin: 0 0 6px;
  color: var(--text);
  font-size: 20px;
  font-weight: 800;
}

.page-loader-text {
  margin: 0;
  color: var(--text-secondary);
  font-size: 14px;
}

body.is-loading {
  overflow: hidden;
}

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

@keyframes loaderFloat {

  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-6px);
  }
}

/* ─── Legal Pages ─────────────────────────────────────────────────────────── */

.legal-page {
  min-height: 100vh;
  background:
    radial-gradient(circle at top left, rgba(79, 70, 229, 0.08), transparent 34%),
    radial-gradient(circle at bottom right, rgba(139, 92, 246, 0.08), transparent 34%),
    var(--bg);
  padding: 72px 24px;
}

.legal-hero {
  max-width: 860px;
  margin: 0 auto 28px;
  text-align: center;
}

.legal-title {
  font-size: clamp(2.2rem, 5vw, 4rem);
  font-weight: 900;
  color: var(--text);
  line-height: 1.05;
  margin: 0 0 14px;
  letter-spacing: -0.04em;
}

.legal-sub {
  color: var(--text-secondary);
  font-size: 15px;
  margin: 0;
}

.legal-card {
  max-width: 860px;
  margin: 0 auto;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: clamp(28px, 5vw, 52px);
  box-shadow: var(--shadow-lg);
}

.legal-card h2 {
  color: var(--text);
  font-size: 1.25rem;
  margin: 34px 0 12px;
  letter-spacing: -0.01em;
}

.legal-card h3 {
  color: var(--text);
  font-size: 1rem;
  margin: 24px 0 8px;
}

.legal-card p {
  color: var(--text-secondary);
  font-size: 15.5px;
  line-height: 1.8;
  margin: 0 0 16px;
}

.legal-card ul {
  margin: 0 0 18px;
  padding-left: 22px;
  color: var(--text-secondary);
}

.legal-card li {
  margin-bottom: 10px;
  line-height: 1.7;
}

.legal-card a {
  font-weight: 700;
}

.legal-note {
  margin-top: 34px !important;
  padding: 16px 18px;
  border-radius: var(--radius);
  background: var(--brand-light);
  color: var(--brand) !important;
  border: 1px solid rgba(79, 70, 229, 0.18);
  font-size: 14px !important;
}

@media (max-width: 640px) {
  .legal-page {
    padding: 48px 16px;
  }

  .legal-card {
    border-radius: var(--radius-lg);
  }
}

/* ═══════════════════════════════════════════════════════════════
   Palette Grid — Responsive Media Queries (index.html only)
   Breakpoints:
     Desktop    : > 1200px  (baseline, no overrides needed)
     Laptop     : 1024px – 1199px
     Tablet     : 768px  – 1023px
     Mobile L   : 480px  – 767px
     Mobile S   : < 480px
   ═══════════════════════════════════════════════════════════════ */


/* ─── LAPTOP  (1024px – 1199px) ──────────────────────────────── */
@media (min-width: 1024px) and (max-width: 1199px) {

  .navbar-inner {
    padding: 0 20px;
    gap: 20px;
  }

  .hero {
    padding: 70px 32px;
  }

  .section {
    padding: 72px 32px;
  }

  .features-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .footer-inner {
    grid-template-columns: 1.6fr 1fr 1fr 1fr;
    gap: 28px;
  }
}


/* ─── TABLET  (768px – 1023px) ────────────────────────────────── */
@media (min-width: 768px) and (max-width: 1023px) {

  /* Navbar */
  .navbar-inner {
    padding: 0 20px;
    gap: 16px;
  }

  .navbar-links a {
    padding: 7px 10px;
    font-size: 14px;
  }

  .navbar-actions .btn-ghost {
    display: none;
    /* скриј Log in, само Get Started */
  }

  /* Hero */
  .hero {
    padding: 64px 32px;
    min-height: 80vh;
  }

  .hero-title {
    font-size: clamp(2.2rem, 5.5vw, 3.4rem);
  }

  .hero-desc {
    font-size: 1rem;
    max-width: 480px;
  }

  .hero-preview-swatch {
    width: 48px;
    height: 72px;
  }

  /* Sections */
  .section {
    padding: 64px 28px;
  }

  .section-sub {
    margin-bottom: 36px;
  }

  /* Features */
  .features-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
  }

  /* Palette preview */
  .preview-palette {
    height: 160px;
  }

  /* Color info */
  .color-info-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  /* CTA */
  .cta-section {
    padding: 64px 28px;
  }

  /* Footer */
  .footer-inner {
    grid-template-columns: 1fr 1fr 1fr;
    gap: 28px;
  }

  .footer-brand {
    grid-column: span 3;
  }
}


/* ─── MOBILE L  (480px – 767px) ───────────────────────────────── */
@media (min-width: 480px) and (max-width: 767px) {

  /* Navbar — already handled by existing style.css @768 rule,
     just tighten padding */
  .navbar-inner {
    padding: 0 16px;
  }

  /* Hero */
  .hero {
    padding: 56px 20px 48px;
    min-height: auto;
  }

  .hero-title {
    font-size: clamp(2rem, 8vw, 2.8rem);

    br {
      display: none;
    }
  }

  .hero-desc {
    font-size: 0.97rem;
    margin-bottom: 28px;
  }

  .hero-actions {
    flex-direction: column;
    align-items: center;
    gap: 10px;
  }

  .btn-hero-primary,
  .btn-hero-secondary {
    width: 100%;
    max-width: 320px;
    justify-content: center;
  }

  .hero-preview {
    margin-top: 40px;
    gap: 7px;
  }

  .hero-preview-swatch {
    width: 44px;
    height: 66px;
    border-radius: 10px;
  }

  /* Sections */
  .section {
    padding: 52px 20px;
  }

  .section-title {
    font-size: clamp(1.6rem, 5vw, 2.2rem);
  }

  .section-sub {
    font-size: 1rem;
    margin-bottom: 28px;
  }

  /* Features */
  .features-grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .feature-card {
    padding: 24px;
  }

  /* Demo buttons */
  #preview .btn {
    width: 100%;
    max-width: 300px;
  }

  /* Palette preview */
  .preview-palette {
    height: 130px;
    border-radius: var(--radius-lg);
  }

  /* Color info */
  .color-info-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }

  /* CTA */
  .cta-section {
    padding: 52px 20px;
  }

  .cta-actions {
    flex-direction: column;
    align-items: center;
  }

  .btn-cta-primary,
  .btn-cta-secondary {
    width: 100%;
    max-width: 300px;
  }

  /* Footer */
  .footer {
    padding: 48px 20px 0;
  }

  .footer-inner {
    grid-template-columns: 1fr 1fr;
    gap: 24px;
  }

  .footer-brand {
    grid-column: span 2;
  }

  .footer-bottom {
    flex-direction: column;
    text-align: center;
    gap: 6px;
  }
}


/* ─── MOBILE S  (< 480px) ─────────────────────────────────────── */
@media (max-width: 479px) {

  /* Navbar */
  .navbar-inner {
    padding: 0 14px;
    gap: 8px;
  }

  .navbar-actions {
    gap: 6px;
  }

  .navbar-actions .btn-ghost {
    display: none;
  }

  .navbar-actions .btn-primary {
    padding: 8px 14px;
    font-size: 13px;
  }

  /* Hero */
  .hero {
    padding: 48px 16px 40px;
    min-height: auto;
  }

  .hero-badge {
    font-size: 12px;
    padding: 6px 12px;
    margin-bottom: 20px;
  }

  .hero-title {
    font-size: clamp(1.8rem, 9vw, 2.4rem);
    margin-bottom: 16px;
  }

  .hero-desc {
    font-size: 0.93rem;
    margin-bottom: 24px;
  }

  .hero-actions {
    flex-direction: column;
    align-items: center;
    gap: 10px;
    width: 100%;
  }

  .btn-hero-primary,
  .btn-hero-secondary {
    width: 100%;
    padding: 13px 20px;
    font-size: 15px;
  }

  .hero-sub {
    font-size: 12px;
  }

  .hero-preview {
    margin-top: 32px;
    gap: 6px;
  }

  .hero-preview-swatch {
    width: 38px;
    height: 56px;
    border-radius: 9px;
  }

  /* Sections */
  .section {
    padding: 44px 16px;
  }

  .section-title {
    font-size: clamp(1.5rem, 7vw, 2rem);
  }

  .section-sub {
    font-size: 0.95rem;
    margin-bottom: 24px;
  }

  .section-label {
    font-size: 11px;
  }

  /* Features */
  .features-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .feature-card {
    padding: 20px;
  }

  .feature-icon {
    width: 46px;
    height: 46px;
    font-size: 20px;
    margin-bottom: 14px;
  }

  .feature-title {
    font-size: 16px;
  }

  /* Demo buttons */
  #preview>div>div {
    flex-direction: column;
    align-items: center;
  }

  #preview .btn {
    width: 100%;
    max-width: 280px;
  }

  /* Palette preview */
  .preview-palette {
    height: 110px;
    border-radius: var(--radius);
  }

  /* Color info */
  .color-info-grid {
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }

  .color-info-card {
    padding: 12px;
    gap: 10px;
  }

  .color-info-swatch {
    width: 32px;
    height: 32px;
  }

  /* CTA */
  .cta-section {
    padding: 44px 16px;
  }

  .cta-title {
    font-size: clamp(1.6rem, 7vw, 2.2rem);
  }

  .cta-sub {
    font-size: 0.97rem;
  }

  .cta-actions {
    flex-direction: column;
    align-items: center;
    gap: 10px;
  }

  .btn-cta-primary,
  .btn-cta-secondary {
    width: 100%;
    padding: 13px 20px;
    font-size: 15px;
  }

  /* Footer */
  .footer {
    padding: 40px 16px 0;
  }

  .footer-inner {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .footer-brand {
    grid-column: span 1;
  }

  .footer-bottom {
    flex-direction: column;
    text-align: center;
    gap: 6px;
    padding: 16px 0;
    font-size: 12px;
  }

  /* FAQ */
  .faq-q {
    font-size: 15px !important;
    padding: 16px 0 !important;
  }
}