/* ============================================================
   Bolarium Design System — Signal Theme v2
   Premium analytics for ambitious Bol.com sellers.
   ============================================================ */

/* ── Tokens ──────────────────────────────────────────────── */
:root {
  --font-sans: 'Inter', 'SF Pro Display', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'SF Mono', 'Fira Code', monospace;
  color-scheme: dark;

  /* Backgrounds */
  --color-bg:               #04080f;
  --color-surface:          rgba(6, 13, 26, 0.82);
  --color-surface-elevated: rgba(8, 17, 33, 0.90);
  --color-surface-solid:    #06101c;

  /* Short aliases */
  --bg:      var(--color-bg);
  --surface: var(--color-surface);

  /* Borders */
  --color-border:        rgba(255, 255, 255, 0.07);
  --color-border-soft:   rgba(255, 255, 255, 0.04);
  --color-border-bright: rgba(16, 185, 129, 0.22);
  --border:              var(--color-border);

  /* Typography */
  --color-text:         #edf4fc;
  --color-muted:        #526882;
  --color-strong-muted: #97b0c4;
  --text:               var(--color-text);
  --muted:              var(--color-muted);

  /* ── Brand palette ── */
  /* Primary: emerald mint */
  --c1:             #10b981;
  --c1-bright:      #34d399;
  --c1-rgb:         16, 185, 129;
  /* Secondary: sky */
  --c2:             #38bdf8;
  --c2-bright:      #7dd3fc;
  --c2-rgb:         56, 189, 248;
  /* Tertiary: indigo */
  --c3:             #818cf8;
  --c3-rgb:         129, 140, 248;

  /* Semantic aliases that pages use */
  --color-accent:        var(--c1);
  --color-accent-strong: var(--c1-bright);
  --color-accent-soft:   rgba(16, 185, 129, 0.12);
  --color-accent-rgb:    16, 185, 129;
  --color-accent-2:      var(--c2);
  --accent:              var(--c1);
  --accent-strong:       var(--c1-bright);

  /* Semantic status */
  --color-success: #34d399;
  --color-warning: #fbbf24;
  --color-danger:  #f87171;
  --danger:        var(--color-danger);

  /* ── Gradient strings ── */
  --grad:         linear-gradient(135deg, var(--c1) 0%, var(--c2) 100%);
  --grad-reverse: linear-gradient(135deg, var(--c2) 0%, var(--c1) 100%);
  --grad-soft:    linear-gradient(135deg, rgba(16,185,129,0.13) 0%, rgba(56,189,248,0.07) 100%);
  --grad-text:    linear-gradient(135deg, #fff 25%, var(--c1) 65%, var(--c2) 100%);

  /* ── Shadows / glows ── */
  --shadow-xs:   0 1px 4px rgba(0,0,0,0.35);
  --shadow-sm:   0 2px 10px rgba(0,0,0,0.45);
  --shadow-md:   0 8px 32px rgba(0,0,0,0.55);
  --shadow-soft: 0 24px 80px rgba(1,5,18,0.62);
  --shadow-card: 0 32px 120px rgba(1,5,18,0.68);
  --shadow-rail: 0 30px 90px rgba(1,5,18,0.56), 0 0 0 1px rgba(255,255,255,0.03) inset;

  --glow-primary: 0 0 40px rgba(16,185,129,0.20), 0 0 80px rgba(16,185,129,0.10);
  --glow-blue:    0 0 40px rgba(56,189,248,0.16);
  --glow-btn:     0 4px 22px rgba(16,185,129,0.30), 0 0 0 1px rgba(16,185,129,0.18);
  --glow-btn-hover: 0 8px 36px rgba(16,185,129,0.42), 0 0 0 1px rgba(16,185,129,0.30);

  /* ── Spacing (8pt grid) ── */
  --space-0: 4px;
  --space-1: 8px;
  --space-2: 16px;
  --space-3: 24px;
  --space-4: 32px;
  --space-5: 40px;
  --space-6: 56px;

  /* ── Radii ── */
  --radius-xs:  6px;
  --radius-sm:  10px;
  --radius-md:  14px;
  --radius-lg:  20px;
  --radius-xl:  28px;
  --radius-2xl: 36px;
  --radius-full: 9999px;
  --radius:     var(--radius-md);

  /* ── Layout ── */
  --nav-height: 64px;
  --shell-rail-bg: linear-gradient(135deg, rgba(7,14,27,0.94) 0%, rgba(7,16,30,0.86) 48%, rgba(9,20,38,0.92) 100%);
  --shell-rail-border: rgba(115,154,186,0.16);
  --font-family: var(--font-sans);
}

/* ── Light mode ─────────────────────────────────────────── */
body[data-theme='light'] {
  color-scheme: light;
  --color-bg:               #f2f6ff;
  --color-surface:          rgba(255, 255, 255, 0.90);
  --color-surface-elevated: rgba(255, 255, 255, 0.98);
  --color-surface-solid:    #ffffff;
  --color-border:           rgba(15, 23, 42, 0.09);
  --color-border-soft:      rgba(15, 23, 42, 0.05);
  --color-border-bright:    rgba(16, 185, 129, 0.30);
  --color-text:             #0f172a;
  --color-muted:            #44627a;
  --color-strong-muted:     #1e364d;
  --bg:      var(--color-bg);
  --surface: var(--color-surface);
  --text:    var(--color-text);
  --muted:   var(--color-muted);
  --border:  var(--color-border);
  --shadow-soft: 0 20px 60px rgba(15,23,42,0.10);
  --shadow-card: 0 40px 120px rgba(15,23,42,0.10);
  --shadow-rail: 0 24px 72px rgba(15,23,42,0.14), 0 0 0 1px rgba(255,255,255,0.52) inset;
  --shell-rail-bg: linear-gradient(135deg, rgba(255,255,255,0.92) 0%, rgba(248,251,255,0.82) 52%, rgba(240,247,255,0.9) 100%);
  --shell-rail-border: rgba(148,163,184,0.22);
  --glow-btn: 0 4px 22px rgba(16,185,129,0.25), 0 0 0 1px rgba(16,185,129,0.20);
  --glow-btn-hover: 0 8px 36px rgba(16,185,129,0.38), 0 0 0 1px rgba(16,185,129,0.28);
}

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

html {
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body {
  font-family: var(--font-sans);
  color: var(--color-text);
  line-height: 1.6;
}

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

/* ── Aurora animated background ────────────────────────── */
.aurora {
  position: fixed;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 0;
}

.aurora__orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  will-change: transform;
}

.aurora__orb--1 {
  width: 800px; height: 800px;
  background: radial-gradient(circle, rgba(16,185,129,0.22) 0%, transparent 70%);
  top: -20%; right: 10%;
  animation: bb-blob 22s ease-in-out infinite;
}
.aurora__orb--2 {
  width: 600px; height: 600px;
  background: radial-gradient(circle, rgba(56,189,248,0.18) 0%, transparent 70%);
  top: 25%; right: -15%;
  animation: bb-blob 30s ease-in-out infinite reverse;
}
.aurora__orb--3 {
  width: 500px; height: 500px;
  background: radial-gradient(circle, rgba(129,140,248,0.13) 0%, transparent 70%);
  bottom: -5%; left: 5%;
  animation: bb-blob 26s ease-in-out infinite 4s;
}

/* ── Gradient text ──────────────────────────────────────── */
.text-grad {
  background: var(--grad-text);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

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

/* ── Gradient button ────────────────────────────────────── */
.btn-grad,
button.btn-grad,
a.btn-grad {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.82rem 1.75rem;
  border-radius: var(--radius-full);
  border: none;
  background: var(--grad);
  color: #02160e;
  font-family: var(--font-sans);
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  text-decoration: none;
  cursor: pointer;
  box-shadow: var(--glow-btn);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
  white-space: nowrap;
}

.btn-grad:hover {
  transform: translateY(-2px);
  box-shadow: var(--glow-btn-hover);
}
.btn-grad:active { transform: translateY(0px); }
.btn-grad:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
}

/* ── Outline / ghost button ─────────────────────────────── */
.btn-outline,
button.btn-outline,
a.btn-outline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.82rem 1.75rem;
  border-radius: var(--radius-full);
  border: 1px solid var(--color-border-bright);
  background: rgba(16,185,129,0.04);
  color: var(--color-text);
  font-family: var(--font-sans);
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  backdrop-filter: blur(12px);
  transition: background 0.18s ease, border-color 0.18s ease, transform 0.18s ease;
  white-space: nowrap;
}

.btn-outline:hover {
  background: rgba(16,185,129,0.09);
  border-color: rgba(16,185,129,0.40);
  transform: translateY(-1px);
}

/* ── Glass card base ────────────────────────────────────── */
.glass {
  background: var(--color-surface);
  backdrop-filter: blur(24px) saturate(1.4);
  -webkit-backdrop-filter: blur(24px) saturate(1.4);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
}

/* Card with gradient top accent line */
.card-accent {
  position: relative;
  overflow: hidden;
}
.card-accent::before {
  content: '';
  position: absolute;
  top: 0; left: 8%; right: 8%;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--c1), var(--c2), transparent);
  opacity: 0.7;
}

/* ── Form inputs ────────────────────────────────────────── */
input[type='text'],
input[type='email'],
input[type='password'],
input[type='file'],
select,
textarea {
  font-family: var(--font-sans);
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  color: var(--color-text);
  font-size: 0.95rem;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

input[type='text']:focus,
input[type='email']:focus,
input[type='password']:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--c1);
  background: rgba(16,185,129,0.04);
  box-shadow: 0 0 0 3px rgba(16,185,129,0.14);
}

/* ── Badge ──────────────────────────────────────────────── */
.bb-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.22rem 0.7rem;
  border-radius: var(--radius-full);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  background: rgba(16,185,129,0.12);
  color: var(--c1-bright);
  border: 1px solid rgba(16,185,129,0.22);
}

/* ── Keyframes ──────────────────────────────────────────── */

@keyframes bb-fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@keyframes bb-fadeInUp {
  from { opacity: 0; transform: translateY(28px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes bb-fadeInDown {
  from { opacity: 0; transform: translateY(-16px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes bb-scaleIn {
  from { opacity: 0; transform: scale(0.93); }
  to   { opacity: 1; transform: scale(1); }
}

@keyframes bb-slideInLeft {
  from { opacity: 0; transform: translateX(-18px); }
  to   { opacity: 1; transform: translateX(0); }
}

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

@keyframes bb-pulseDot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: 0.45; transform: scale(0.78); }
}

@keyframes bb-spinnerRotate {
  to { transform: rotate(360deg); }
}

@keyframes bb-blob {
  0%   { transform: translate(0, 0) scale(1); }
  33%  { transform: translate(40px, -40px) scale(1.08); }
  66%  { transform: translate(-25px, 25px) scale(0.94); }
  100% { transform: translate(0, 0) scale(1); }
}

@keyframes bb-gradientText {
  0%   { background-position: 0% 50%; }
  50%  { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* ── Animation utilities ────────────────────────────────── */
.bb-fade-in     { animation: bb-fadeIn 0.4s ease-out both; }
.bb-fade-in-up  { animation: bb-fadeInUp 0.52s ease-out both; }
.bb-scale-in    { animation: bb-scaleIn 0.38s cubic-bezier(0.34,1.42,0.64,1) both; }
.bb-slide-in    { animation: bb-slideInLeft 0.38s ease-out both; }

/* Stagger children */
.bb-stagger > * { animation: bb-fadeInUp 0.50s ease-out both; }
.bb-stagger > *:nth-child(1) { animation-delay: 0.04s; }
.bb-stagger > *:nth-child(2) { animation-delay: 0.10s; }
.bb-stagger > *:nth-child(3) { animation-delay: 0.16s; }
.bb-stagger > *:nth-child(4) { animation-delay: 0.22s; }
.bb-stagger > *:nth-child(5) { animation-delay: 0.28s; }
.bb-stagger > *:nth-child(6) { animation-delay: 0.34s; }
.bb-stagger > *:nth-child(7) { animation-delay: 0.40s; }
.bb-stagger > *:nth-child(8) { animation-delay: 0.46s; }

/* Auto page entrance */
.app-shell,
.page-main {
  animation: bb-fadeInUp 0.50s ease-out both;
}

body > .card,
body > .panel {
  animation: bb-scaleIn 0.40s cubic-bezier(0.34,1.40,0.64,1) both;
}

/* Landing */
.hero > *:first-child { animation: bb-fadeInUp 0.58s ease-out 0.06s both; }
.hero-card            { animation: bb-fadeInUp 0.58s ease-out 0.22s both; }
.feature-card         { animation: bb-fadeInUp 0.50s ease-out both; }
.step-card            { animation: bb-fadeInUp 0.50s ease-out both; }

/* ── Skeleton loader ────────────────────────────────────── */
.bb-skeleton {
  background: linear-gradient(
    90deg,
    var(--color-surface) 25%,
    var(--color-surface-elevated) 50%,
    var(--color-surface) 75%
  );
  background-size: 200% 100%;
  animation: bb-shimmer 1.8s ease-in-out infinite;
  border-radius: var(--radius-sm);
}

/* ── Spinner ────────────────────────────────────────────── */
.bb-spinner {
  display: inline-block;
  width: 18px; height: 18px;
  border: 2px solid rgba(16,185,129,0.18);
  border-top-color: var(--c1);
  border-radius: 50%;
  animation: bb-spinnerRotate 0.7s linear infinite;
  flex-shrink: 0;
}

/* ── Live dot ───────────────────────────────────────────── */
.bb-dot-live {
  display: inline-block;
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--c1);
  box-shadow: 0 0 8px rgba(16,185,129,0.55);
  animation: bb-pulseDot 2s ease-in-out infinite;
}

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

/* ── Scrollbar ──────────────────────────────────────────── */
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: rgba(16,185,129,0.20);
  border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(16,185,129,0.42);
}

/* ── Micro-interactions ─────────────────────────────────── */
button:not(:disabled),
a[href],
[role='button'] {
  transition:
    transform 0.16s ease,
    box-shadow 0.16s ease,
    opacity 0.16s ease;
}
