/* ============================================================
   campaignset — full design system (ported from Next.js globals)
   Dark-mode-first · violet #8b5cf6 · Vercel/Linear aesthetic
   ============================================================ */

:root {
  --radius: 10px;

  /* Background ramp (slate navy, very dark) */
  --bg-flat: #020617;
  --bg-raised: #07101f;
  --bg-900: #0f172a;
  --bg-800: #1e293b;

  /* Ink (text) ramp */
  --ink: #f8fafc;
  --ink-2: #e2e8f0;
  --ink-3: #cbd5e1;
  --ink-4: #94a3b8;
  --ink-5: #64748b;
  --ink-6: #475569;
  --ink-7: #334155;

  /* Lines / borders */
  --line: #1e293b;
  --line-strong: #334155;

  /* Violet brand accent (default theme) */
  --v: #8b5cf6;
  --v-hover: #a78bfa;
  --v-deep: #7c3aed;

  /* Status */
  --emerald: #10b981;
  --amber: #f59e0b;
  --blue: #3b82f6;
  --red: #ef4444;

  /* shadcn semantic mapping (dark default) */
  --background: #020617;
  --foreground: #e2e8f0;
  --card: #0f172a;
  --card-foreground: #e2e8f0;
  --popover: #0f172a;
  --popover-foreground: #e2e8f0;
  --primary: #8b5cf6;
  --primary-foreground: #ffffff;
  --secondary: #1e293b;
  --secondary-foreground: #e2e8f0;
  --muted: #1e293b;
  --muted-foreground: #94a3b8;
  --border: #1e293b;
  --input: #1e293b;
  --ring: #8b5cf6;
  --sidebar: #07101f;
}

/* Light mode */
.light {
  --bg-flat: #ffffff;
  --bg-raised: #f8fafc;
  --bg-900: #ffffff;
  --bg-800: #e2e8f0;
  --ink: #0f172a;
  --ink-2: #1e293b;
  --ink-3: #334155;
  --ink-4: #64748b;
  --ink-5: #94a3b8;
  --line: #e2e8f0;
  --line-strong: #cbd5e1;
  --background: #ffffff;
  --foreground: #1e293b;
  --card: #ffffff;
  --card-foreground: #1e293b;
  --popover: #ffffff;
  --popover-foreground: #1e293b;
  --secondary: #f1f5f9;
  --secondary-foreground: #1e293b;
  --muted: #f1f5f9;
  --muted-foreground: #64748b;
  --border: #e2e8f0;
  --input: #e2e8f0;
  --sidebar: #f8fafc;
}

/* Theme picker — swaps the primary accent */
[data-theme="violet"] { --v:#8b5cf6; --v-hover:#a78bfa; --v-deep:#7c3aed; --primary:#8b5cf6; --ring:#8b5cf6; }
[data-theme="emerald"] { --v:#10b981; --v-hover:#34d399; --v-deep:#059669; --primary:#10b981; --ring:#10b981; }
[data-theme="cobalt"]  { --v:#3b82f6; --v-hover:#60a5fa; --v-deep:#2563eb; --primary:#3b82f6; --ring:#3b82f6; }
[data-theme="amber"]   { --v:#f59e0b; --v-hover:#fbbf24; --v-deep:#d97706; --primary:#f59e0b; --ring:#f59e0b; }
[data-theme="rose"]    { --v:#f43f5e; --v-hover:#fb7185; --v-deep:#e11d48; --primary:#f43f5e; --ring:#f43f5e; }

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { color-scheme: dark; -webkit-text-size-adjust: 100%; }
body {
  font-family: 'Geist', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--background);
  color: var(--foreground);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; background: none; border: none; color: inherit; }
input, textarea, select { font: inherit; color: inherit; }
img { max-width: 100%; display: block; }
ul, ol { list-style: none; }

/* Scrollbar */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #1e293b; border-radius: 6px; border: 2px solid transparent; background-clip: content-box; }
::-webkit-scrollbar-thumb:hover { background: #334155; background-clip: content-box; }

/* ---------- Layout helpers ---------- */
.container { width: 100%; max-width: 80rem; margin: 0 auto; padding: 0 1.5rem; }
.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-1 { gap: 0.25rem; } .gap-2 { gap: 0.5rem; } .gap-3 { gap: 0.75rem; } .gap-4 { gap: 1rem; } .gap-6 { gap: 1.5rem; }
.grid { display: grid; }
.hidden { display: none; }
.mt-auto { margin-top: auto; }
.text-center { text-align: center; }
.rounded { border-radius: var(--radius); }
.rounded-lg { border-radius: 14px; }
.rounded-xl { border-radius: 18px; }
.rounded-2xl { border-radius: 22px; }
.rounded-full { border-radius: 9999px; }
.overflow-hidden { overflow: hidden; }
.overflow-x-auto { overflow-x: auto; }
.overflow-y-auto { overflow-y: auto; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.relative { position: relative; }
.sticky { position: sticky; }

/* ---------- 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-ink-5 { color: var(--ink-5); }
.text-v { color: var(--v); }
.text-emerald { color: var(--emerald); }
.text-amber { color: var(--amber); }
.text-red { color: var(--red); }
.text-white { color: #fff; }

/* ---------- Backgrounds ---------- */
.bg-flat { background: var(--bg-flat); }
.bg-raised { background: var(--bg-raised); }
.bg-900 { background: var(--bg-900); }
.bg-800 { background: var(--bg-800); }
.bg-card { background: var(--card); }
.bg-v { background: var(--v); }
.bg-v-hover { background: var(--v-hover); }
.bg-sidebar { background: var(--sidebar); }

/* ---------- Borders ---------- */
.border { border: 1px solid var(--border); }
.border-line { border: 1px solid var(--line); }
.border-line-strong { border: 1px solid var(--line-strong); }
.border-v { border: 1px solid var(--v); }
.border-t { border-top: 1px solid var(--line); }
.border-b { border-bottom: 1px solid var(--line); }
.border-l { border-left: 1px solid var(--line); }
.border-r { border-right: 1px solid var(--line); }
.border-2 { border-width: 2px; border-style: solid; border-color: var(--line); }
.border-dashed { border-style: dashed; }

/* ---------- Shadows ---------- */
.shadow-card { box-shadow: 0 1px 0 #ffffff08 inset, 0 12px 30px -16px #0009; }
.shadow-mock { box-shadow: 0 30px 60px -30px #000000b3, 0 0 0 1px var(--line); }
.shadow-glow { box-shadow: 0 10px 28px -10px color-mix(in srgb, var(--v) 55%, transparent), inset 0 1px 0 #ffffff2e, 0 0 0 1px color-mix(in srgb, var(--v-hover) 40%, transparent) inset; }
.shadow-glow-hover { box-shadow: 0 14px 36px -10px color-mix(in srgb, var(--v) 70%, transparent), inset 0 1px 0 #ffffff38, 0 0 0 1px color-mix(in srgb, var(--v-hover) 55%, transparent) inset; }

/* ---------- Background patterns ---------- */
.bg-grid { background-image: linear-gradient(to right, #ffffff08 1px, transparent 1px), linear-gradient(to bottom, #ffffff08 1px, transparent 1px); background-size: 48px 48px; }
.bg-dots { background-image: radial-gradient(circle, #ffffff0d 1px, transparent 1px); background-size: 24px 24px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.375rem;
  height: 2.5rem; padding: 0 1rem; border-radius: var(--radius);
  font-size: 0.875rem; font-weight: 500; line-height: 1;
  border: 1px solid transparent; transition: all 0.15s; white-space: nowrap; cursor: pointer;
}
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn-sm { height: 2rem; padding: 0 0.75rem; font-size: 0.8125rem; }
.btn-icon { width: 2.25rem; height: 2.25rem; padding: 0; }
.btn-primary { background: var(--v); color: #fff; }
.btn-primary:hover { background: var(--v-hover); }
.btn-outline { background: transparent; border-color: var(--line); color: var(--ink-3); }
.btn-outline:hover { background: var(--bg-800); }
.btn-ghost { background: transparent; color: var(--ink-4); }
.btn-ghost:hover { background: var(--bg-800); color: var(--ink-2); }
.btn-glow { background: var(--v); color: #fff; box-shadow: var(--shadow-glow); }
.btn-glow:hover { background: var(--v-hover); box-shadow: var(--shadow-glow-hover); }

/* ---------- Cards ---------- */
.card { background: var(--card); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow-card); }
.card-padded { padding: 1.25rem; }
.card-padded-lg { padding: 1.5rem; }

/* ---------- Inputs ---------- */
.input, .textarea, .select {
  width: 100%; height: 2.5rem; padding: 0 0.75rem;
  background: var(--bg-900); border: 1px solid var(--line); border-radius: var(--radius);
  font-size: 0.875rem; color: var(--ink-2); transition: border-color 0.15s, box-shadow 0.15s;
}
.input:focus, .textarea:focus, .select:focus {
  outline: none; border-color: var(--v); box-shadow: 0 0 0 3px color-mix(in srgb, var(--v) 20%, transparent);
}
.input::placeholder, .textarea::placeholder { color: var(--ink-5); }
.textarea { height: auto; min-height: 80px; padding: 0.5rem 0.75rem; resize: vertical; line-height: 1.5; }
.label { display: block; font-size: 0.75rem; color: var(--ink-4); margin-bottom: 0.25rem; font-weight: 500; }

/* ---------- Badges ---------- */
.badge {
  display: inline-flex; align-items: center; gap: 0.25rem;
  padding: 0.125rem 0.5rem; border-radius: 9999px;
  font-size: 0.6875rem; font-weight: 500; line-height: 1.4;
}
.badge-v { background: color-mix(in srgb, var(--v) 15%, transparent); color: var(--v); }
.badge-emerald { background: color-mix(in srgb, var(--emerald) 15%, transparent); color: var(--emerald); }
.badge-amber { background: color-mix(in srgb, var(--amber) 15%, transparent); color: var(--amber); }
.badge-blue { background: color-mix(in srgb, var(--blue) 15%, transparent); color: var(--blue); }
.badge-red { background: color-mix(in srgb, var(--red) 15%, transparent); color: var(--red); }
.badge-muted { background: color-mix(in srgb, var(--ink-5) 15%, transparent); color: var(--ink-4); }
.badge-outline { background: transparent; border: 1px solid var(--line); color: var(--ink-4); }

/* ---------- Avatar ---------- */
.avatar { display: inline-flex; align-items: center; justify-content: center; border-radius: 9999px; color: #fff; font-weight: 500; flex-shrink: 0; }
.avatar-sm { width: 2rem; height: 2rem; font-size: 0.75rem; }
.avatar-md { width: 2.25rem; height: 2.25rem; font-size: 0.8125rem; }
.avatar-lg { width: 4rem; height: 4rem; font-size: 1.25rem; }

/* ---------- Eyebrow (section label) ---------- */
.eyebrow {
  display: inline-flex; align-items: center; gap: 0.5rem;
  font-size: 0.6875rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--ink-5); margin-bottom: 0.75rem;
}
.eyebrow::before { content: ''; width: 6px; height: 6px; border-radius: 9999px; background: var(--v); }

/* ---------- Headings ---------- */
h1, h2, h3 { color: var(--ink); line-height: 1.15; letter-spacing: -0.02em; }
.h1 { font-size: clamp(2rem, 5vw, 3.25rem); font-weight: 700; line-height: 1.1; }
.h2 { font-size: clamp(1.5rem, 3.5vw, 2.25rem); font-weight: 700; }
.h3 { font-size: 1.125rem; font-weight: 600; }

/* ---------- Tables ---------- */
.table { width: 100%; border-collapse: collapse; }
.table th { text-align: left; font-size: 0.6875rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; color: var(--ink-5); padding: 0.625rem 1rem; border-bottom: 1px solid var(--line); }
.table td { padding: 0.75rem 1rem; border-bottom: 1px solid color-mix(in srgb, var(--line) 50%, transparent); color: var(--ink-3); font-size: 0.875rem; }
.table tr:hover td { background: color-mix(in srgb, var(--bg-800) 40%, transparent); }

/* ---------- Utility ---------- */
.muted { color: var(--ink-5); }
.small { font-size: 0.8125rem; }
.xs { font-size: 0.6875rem; }
.font-medium { font-weight: 500; }
.font-semibold { font-weight: 600; }
.font-mono { font-family: 'Geist Mono', 'SF Mono', Consolas, monospace; }
.uppercase { text-transform: uppercase; }
.tracking-wider { letter-spacing: 0.05em; }
.transition { transition: all 0.15s; }
.cursor-pointer { cursor: pointer; }
.min-h-screen { min-height: 100vh; }
.h-screen { height: 100vh; }
.w-full { width: 100%; }
.max-w-3xl { max-width: 48rem; }
.max-w-5xl { max-width: 64rem; }
.max-w-7xl { max-width: 80rem; }
.p-4 { padding: 1rem; } .p-5 { padding: 1.25rem; } .p-6 { padding: 1.5rem; } .p-8 { padding: 2rem; }
.px-4 { padding-left: 1rem; padding-right: 1rem; }
.py-2 { padding-top: 0.5rem; padding-bottom: 0.5rem; }
.py-20 { padding-top: 5rem; padding-bottom: 5rem; }
.mb-2 { margin-bottom: 0.5rem; } .mb-3 { margin-bottom: 0.75rem; } .mb-4 { margin-bottom: 1rem; } .mb-6 { margin-bottom: 1.5rem; }
.mt-2 { margin-top: 0.5rem; } .mt-3 { margin-top: 0.75rem; } .mt-4 { margin-top: 1rem; } .mt-6 { margin-top: 1.5rem; }
.w-8 { width: 2rem; } .w-60 { width: 15rem; } .w-72 { width: 18rem; }
.gap-1\.5 { gap: 0.375rem; }

/* responsive helpers */
@media (min-width: 768px) {
  .md-flex { display: flex; }
  .md-grid-2 { grid-template-columns: repeat(2, 1fr); }
  .md-grid-3 { grid-template-columns: repeat(3, 1fr); }
  .md-block { display: block; }
  .md-hidden { display: none; }
}
@media (min-width: 1024px) {
  .lg-grid-2 { grid-template-columns: repeat(2, 1fr); }
  .lg-grid-3 { grid-template-columns: repeat(3, 1fr); }
  .lg-grid-4 { grid-template-columns: repeat(4, 1fr); }
  .lg-block { display: block; }
  .lg-hidden { display: none; }
}
