/* ═══════════════════════════════════════════════════════════════════════════
   static/shared/vivian-theme.css — Vivian Unified Design System

   One theme for ALL Vivian websites. Every landing page, dashboard, and
   admin panel shares these CSS variables and base styles.

   Drop into any page:
     <link rel="stylesheet" href="/static/shared/vivian-theme.css">

   The shared navbar (vivian-navbar.css) handles the top bar.
   This file handles everything else — colors, typography, cards, buttons,
   forms, and the cross-linking footer.

   ═══════════════════════════════════════════════════════════════════════════ */

/* ── CSS Variables (the single source of truth for all colors) ── */
:root {
  /* Core palette */
  --vt-bg:       #060810;
  --vt-surface:  #0e1120;
  --vt-surface2: #161c30;
  --vt-border:   rgba(124,58,237,.15);
  --vt-border2:  rgba(255,255,255,.07);

  /* Accent colors */
  --vt-accent:   #7c3aed;
  --vt-accent2:  #4f46e5;
  --vt-accent3:  #818cf8;
  --vt-accent4:  #a78bfa;

  /* Semantic colors */
  --vt-green:    #10b981;
  --vt-cyan:     #06b6d4;
  --vt-yellow:   #f59e0b;
  --vt-red:      #ef4444;
  --vt-orange:   #f97316;
  --vt-lime:     #84cc16;
  --vt-discord:  #5865F2;

  /* Text */
  --vt-text:     #e2e8f0;
  --vt-text2:    #94a3b8;
  --vt-text3:    #64748b;

  /* Spacing & shapes */
  --vt-radius:   12px;
  --vt-radius-sm: 8px;
  --vt-shadow:   0 4px 24px rgba(0,0,0,.35);

  /* Typography */
  --vt-font:     -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --vt-font-mono: "SF Mono", "Fira Code", "Cascadia Code", monospace;
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--vt-bg);
  color: var(--vt-text);
  font-family: var(--vt-font);
  line-height: 1.6;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

/* ── Background glow (optional, add <div class="vt-bg-glow"></div> before content) ── */
.vt-bg-glow {
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background: radial-gradient(ellipse 70% 50% at 50% -5%, rgba(124,58,237,.12), transparent);
}

/* ── Links ── */
a { color: var(--vt-accent3); text-decoration: none; transition: color .15s; }
a:hover { color: var(--vt-accent4); }

/* ── Typography ── */
h1, h2, h3, h4, h5, h6 { font-weight: 700; line-height: 1.2; }
h1 { font-size: clamp(2rem, 5vw, 3.2rem); letter-spacing: -.02em; }
h2 { font-size: 1.5rem; }
h3 { font-size: 1.15rem; }
p { margin-bottom: .75rem; }

/* Gradient text utility */
.vt-gradient-text {
  background: linear-gradient(135deg, var(--vt-accent4), var(--vt-accent3));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ── Cards ── */
.vt-card {
  background: var(--vt-surface);
  border: 1px solid var(--vt-border2);
  border-radius: var(--vt-radius);
  padding: 1.5rem;
  transition: border-color .18s, box-shadow .18s, transform .18s;
}
.vt-card:hover {
  border-color: var(--vt-border);
  box-shadow: var(--vt-shadow);
  transform: translateY(-2px);
}
.vt-card-accent {
  border-top: 3px solid var(--vt-accent);
}

/* ── Buttons ── */
.vt-btn {
  display: inline-flex; align-items: center; gap: .5rem;
  padding: .6rem 1.4rem; border-radius: var(--vt-radius-sm);
  font-size: .88rem; font-weight: 600; cursor: pointer;
  border: none; text-decoration: none;
  transition: all .18s; font-family: inherit;
}
.vt-btn-primary {
  background: linear-gradient(135deg, var(--vt-accent), var(--vt-accent2));
  color: #fff;
}
.vt-btn-primary:hover { filter: brightness(1.1); transform: translateY(-1px); color: #fff; }
.vt-btn-outline {
  background: transparent; border: 1px solid rgba(255,255,255,.15); color: var(--vt-text);
}
.vt-btn-outline:hover { border-color: var(--vt-accent); color: var(--vt-accent4); }
.vt-btn-ghost {
  background: transparent; color: var(--vt-text2);
}
.vt-btn-ghost:hover { background: rgba(255,255,255,.06); color: var(--vt-text); }
.vt-btn-lg { padding: .85rem 2rem; font-size: 1rem; }
.vt-btn-sm { padding: .4rem .9rem; font-size: .78rem; }

/* ── Forms ── */
.vt-input, .vt-select, .vt-textarea {
  width: 100%; padding: .65rem .9rem;
  background: var(--vt-bg); border: 1px solid var(--vt-border2);
  border-radius: var(--vt-radius-sm); color: var(--vt-text);
  font-size: .9rem; font-family: inherit; outline: none;
  transition: border-color .15s;
}
.vt-input:focus, .vt-select:focus, .vt-textarea:focus { border-color: var(--vt-accent); }
.vt-label { display: block; font-size: .82rem; color: var(--vt-text2); margin-bottom: .35rem; }
.vt-textarea { resize: vertical; min-height: 80px; }

/* ── Badges / Tags ── */
.vt-badge {
  display: inline-flex; align-items: center; gap: .3rem;
  padding: .2rem .7rem; border-radius: 99px;
  font-size: .72rem; font-weight: 600; letter-spacing: .03em;
}
.vt-badge-accent { background: rgba(124,58,237,.15); color: var(--vt-accent4); border: 1px solid rgba(124,58,237,.25); }
.vt-badge-green  { background: rgba(16,185,129,.15); color: #34d399; border: 1px solid rgba(16,185,129,.25); }
.vt-badge-yellow { background: rgba(245,158,11,.15); color: #fbbf24; border: 1px solid rgba(245,158,11,.25); }
.vt-badge-red    { background: rgba(239,68,68,.15);  color: #f87171; border: 1px solid rgba(239,68,68,.25); }

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

/* ── Container ── */
.vt-container { max-width: 1100px; margin: 0 auto; padding: 0 1.5rem; }

/* ── Page header ── */
.vt-page-header {
  text-align: center; padding: 3rem 1.5rem 2rem;
}
.vt-page-header h1 { margin-bottom: .5rem; }
.vt-page-header .vt-subtitle { color: var(--vt-text2); font-size: .95rem; max-width: 560px; margin: 0 auto; }

/* ── Section ── */
.vt-section { padding: 3rem 0; }
.vt-section-alt { background: var(--vt-surface); border-top: 1px solid var(--vt-border2); border-bottom: 1px solid var(--vt-border2); }

/* ── Tables ── */
.vt-table-wrap { overflow-x: auto; border-radius: var(--vt-radius); border: 1px solid var(--vt-border2); }
.vt-table { width: 100%; border-collapse: collapse; font-size: .875rem; }
.vt-table thead tr { background: var(--vt-surface2); }
.vt-table th { padding: .7rem 1rem; text-align: left; font-weight: 600; color: var(--vt-text2); font-size: .72rem; text-transform: uppercase; letter-spacing: .05em; }
.vt-table td { padding: .65rem 1rem; border-top: 1px solid var(--vt-border2); }
.vt-table tbody tr:hover { background: rgba(255,255,255,.03); }

/* ── Alerts ── */
.vt-alert { padding: .75rem 1rem; border-radius: var(--vt-radius-sm); font-size: .85rem; margin-bottom: 1rem; }
.vt-alert-ok    { background: rgba(16,185,129,.12); color: #6ee7b7; border: 1px solid rgba(16,185,129,.25); }
.vt-alert-err   { background: rgba(239,68,68,.12);  color: #fca5a5; border: 1px solid rgba(239,68,68,.25); }
.vt-alert-warn  { background: rgba(245,158,11,.12); color: #fde68a; border: 1px solid rgba(245,158,11,.25); }
.vt-alert-info  { background: rgba(79,70,229,.12);  color: #a5b4fc; border: 1px solid rgba(79,70,229,.25); }

/* ── Code blocks ── */
.vt-code {
  background: var(--vt-surface2); border: 1px solid var(--vt-border2);
  border-radius: var(--vt-radius-sm); padding: 1rem 1.25rem;
  font-family: var(--vt-font-mono); font-size: .85rem;
  overflow-x: auto; line-height: 1.6; color: var(--vt-text2);
}
:not(pre) > code {
  background: rgba(255,255,255,.06); padding: .15rem .4rem;
  border-radius: 4px; font-family: var(--vt-font-mono); font-size: .85em;
}

/* ── Loading spinner ── */
.vt-spinner {
  display: inline-block; width: 20px; height: 20px;
  border: 2px solid var(--vt-border2); border-top-color: var(--vt-accent3);
  border-radius: 50%; animation: vt-spin .7s linear infinite;
}
@keyframes vt-spin { to { transform: rotate(360deg); } }

/* ── Scrollbar ── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #3a3a5a; border-radius: 3px; }

/* ═══════════════════════════════════════════════════════════════════════════
   CROSS-LINKING FOOTER — Every Vivian site links to every other Vivian site
   ═══════════════════════════════════════════════════════════════════════════ */

.vt-footer {
  border-top: 1px solid var(--vt-border2);
  padding: 2rem 1.5rem; text-align: center;
  font-size: .82rem; color: var(--vt-text3);
  background: var(--vt-bg);
}
.vt-footer-grid {
  display: flex; flex-wrap: wrap; justify-content: center;
  gap: .5rem 1.25rem; margin-bottom: 1rem;
}
.vt-footer-grid a {
  color: var(--vt-text2); text-decoration: none;
  padding: .25rem .5rem; border-radius: 4px; transition: color .15s;
}
.vt-footer-grid a:hover { color: var(--vt-accent4); }
.vt-footer-copy { margin-top: .75rem; font-size: .75rem; color: var(--vt-text3); }
