/* Computer-tution — design tokens + base */
:root {
  --blue: #1E3A8A;
  --blue-700: #1E40AF;
  --blue-600: #2563EB;
  --blue-100: #E0E7FF;
  --blue-50:  #EEF2FF;
  --ink: #1F2937;
  --ink-2: #4B5563;
  --ink-3: #6B7280;
  --line: #E5E7EB;
  --line-2: #F1F2F4;
  --paper: #F9FAFB;
  --white: #FFFFFF;
  --amber: #F59E0B;
  --amber-100: #FEF3C7;
  --green: #059669;
  --green-100: #D1FAE5;
  --red: #DC2626;
  --red-100: #FEE2E2;

  --r-sm: 6px;
  --r:    10px;
  --r-lg: 16px;
  --r-xl: 22px;

  --shadow-sm: 0 1px 2px rgba(15,23,42,.04), 0 1px 1px rgba(15,23,42,.04);
  --shadow:    0 2px 4px rgba(15,23,42,.04), 0 8px 24px -8px rgba(15,23,42,.12);
  --shadow-lg: 0 4px 12px rgba(15,23,42,.06), 0 24px 60px -20px rgba(30,58,138,.25);

  --font-display: 'Plus Jakarta Sans', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, monospace;
}

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font-display);
  color: var(--ink);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

button { font-family: inherit; cursor: pointer; }
a { color: inherit; }

/* ───── App shell ───── */
.app {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ───── Universal building blocks ───── */
.container { max-width: 1200px; margin: 0 auto; padding: 0 32px; }
.container-narrow { max-width: 880px; margin: 0 auto; padding: 0 32px; }
.container-wide  { max-width: 1400px; margin: 0 auto; padding: 0 32px; }

.eyebrow {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--blue);
}

h1, h2, h3, h4 { margin: 0; letter-spacing: -0.02em; line-height: 1.05; }
h1 { font-size: clamp(48px, 6.4vw, 88px); font-weight: 700; }
h2 { font-size: clamp(34px, 3.8vw, 52px); font-weight: 700; }
h3 { font-size: 24px; font-weight: 600; letter-spacing: -0.01em; }
h4 { font-size: 17px; font-weight: 600; letter-spacing: -0.005em; }
p  { margin: 0; line-height: 1.55; }

/* ───── Buttons ───── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 48px;
  padding: 0 22px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-weight: 600;
  font-size: 15px;
  letter-spacing: -0.005em;
  transition: transform .12s ease, background .15s ease, color .15s ease, border-color .15s ease;
  text-decoration: none;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--blue); color: #fff; }
.btn-primary:hover { background: var(--blue-700); }
.btn-secondary { background: var(--white); color: var(--ink); border-color: var(--line); }
.btn-secondary:hover { background: var(--paper); border-color: #D1D5DB; }
.btn-ghost { background: transparent; color: var(--ink); }
.btn-ghost:hover { background: var(--paper); }
.btn-dark { background: var(--ink); color: #fff; }
.btn-dark:hover { background: #111827; }
.btn-sm { height: 36px; padding: 0 16px; font-size: 13px; }
.btn-lg { height: 56px; padding: 0 28px; font-size: 16px; }
.btn-block { width: 100%; }

/* ───── Cards ───── */
.card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 24px;
}
.card-flat { background: var(--paper); border-color: transparent; }
.card-dark { background: var(--ink); color: #fff; border-color: var(--ink); }
.card-dark .muted { color: rgba(255,255,255,.6); }

/* ───── Inputs ───── */
.field { display: flex; flex-direction: column; gap: 6px; }
.field-label { font-size: 13px; font-weight: 500; color: var(--ink-2); }
.input, .select, .textarea {
  width: 100%;
  height: 44px;
  padding: 0 14px;
  border-radius: var(--r);
  border: 1px solid var(--line);
  background: var(--white);
  color: var(--ink);
  font-family: inherit;
  font-size: 15px;
  outline: none;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.input:focus, .select:focus, .textarea:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(30,58,138,.12);
}
.textarea { height: auto; padding: 12px 14px; min-height: 96px; resize: vertical; }
.select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg width='10' height='6' viewBox='0 0 10 6' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1L5 5L9 1' stroke='%231F2937' stroke-width='1.5'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; padding-right: 34px; }

/* ───── Pills / badges ───── */
.pill {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 500;
  background: var(--blue-50);
  color: var(--blue);
}
.pill-mono { font-family: var(--font-mono); letter-spacing: 0.02em; }
.pill-amber { background: var(--amber-100); color: #92400E; }
.pill-green { background: var(--green-100); color: #065F46; }
.pill-red   { background: var(--red-100); color: #991B1B; }
.pill-gray  { background: var(--line-2); color: var(--ink-2); }
.pill-dot::before {
  content: "";
  width: 6px; height: 6px; border-radius: 50%;
  background: currentColor;
  display: inline-block;
}

/* ───── Helpers ───── */
.row { display: flex; }
.col { display: flex; flex-direction: column; }
.gap-4 { gap: 4px; } .gap-6 { gap: 6px; } .gap-8 { gap: 8px; } .gap-12 { gap: 12px; }
.gap-16 { gap: 16px; } .gap-20 { gap: 20px; } .gap-24 { gap: 24px; } .gap-32 { gap: 32px; }
.center { align-items: center; }
.between { justify-content: space-between; }
.muted { color: var(--ink-3); }
.mono  { font-family: var(--font-mono); }
.divider { height: 1px; background: var(--line); }
.section { padding: 96px 0; }
.section-sm { padding: 48px 0; }
.full { width: 100%; }

/* ───── Image-slot styling overrides ───── */
image-slot {
  display: block;
  background: var(--blue-50);
  border: 1px dashed rgba(30,58,138,.3);
  color: var(--blue);
}

/* ───── Locked overlay ───── */
.locked-wrap { position: relative; }
.locked-blur > * { filter: blur(6px); pointer-events: none; user-select: none; }
.locked-overlay {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center; flex-direction: column;
  gap: 16px; padding: 32px;
  background: rgba(249,250,251,.6);
  backdrop-filter: blur(2px);
  border-radius: var(--r-lg);
  text-align: center;
}
.locked-overlay .lock-icon {
  width: 56px; height: 56px; border-radius: 50%;
  background: var(--blue); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 22px;
}

/* ───── Video poster ───── */
.video-frame {
  position: relative;
  width: 100%;
  aspect-ratio: 16/9;
  background: linear-gradient(135deg, #0F172A, #1E3A8A);
  border-radius: var(--r-lg);
  overflow: hidden;
  display: flex; align-items: center; justify-content: center;
  color: #fff;
}
.video-frame .play-btn {
  width: 80px; height: 80px;
  border-radius: 50%;
  background: rgba(255,255,255,.95);
  color: var(--blue);
  display: flex; align-items: center; justify-content: center;
  font-size: 28px; padding-left: 6px;
  box-shadow: 0 12px 40px rgba(0,0,0,.3);
  border: none;
}
.video-meta {
  position: absolute; bottom: 16px; left: 16px;
  display: flex; gap: 8px; align-items: center;
  font-family: var(--font-mono);
  font-size: 12px;
  color: rgba(255,255,255,.85);
}
.video-bars {
  position: absolute; top: 16px; right: 16px;
  display: flex; gap: 4px;
}
.video-bars span {
  width: 4px; background: rgba(255,255,255,.4); border-radius: 2px;
}

/* ───── Striped placeholder ───── */
.stripe-ph {
  background-image: repeating-linear-gradient(45deg, rgba(30,58,138,.06) 0 8px, transparent 8px 16px);
  background-color: var(--blue-50);
  border: 1px dashed rgba(30,58,138,.25);
  color: var(--blue);
  font-family: var(--font-mono);
  font-size: 11px;
  display: flex; align-items: center; justify-content: center;
  text-align: center;
  border-radius: var(--r);
}

/* ───── Tables ───── */
.tbl { width: 100%; border-collapse: collapse; font-size: 14px; }
.tbl th {
  text-align: left;
  font-weight: 500;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-3);
  padding: 10px 14px;
  border-bottom: 1px solid var(--line);
  background: var(--paper);
}
.tbl td { padding: 14px; border-bottom: 1px solid var(--line-2); vertical-align: middle; }
.tbl tr:hover td { background: var(--paper); }

/* ───── Brand mark ───── */
.brandmark {
  display: inline-flex; align-items: center; gap: 10px;
  font-weight: 700; font-size: 18px; letter-spacing: -0.015em;
  color: var(--ink);
  text-decoration: none;
}
.brandmark .mark {
  width: 32px; height: 32px;
  border-radius: 8px;
  background: var(--blue);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0;
}

/* ───── Sidebar (dashboard / admin) ───── */
.shell-with-sidebar { display: grid; grid-template-columns: 240px 1fr; min-height: 100vh; }
.sidebar {
  background: var(--white);
  border-right: 1px solid var(--line);
  padding: 24px 16px;
  display: flex; flex-direction: column; gap: 4px;
  position: sticky; top: 0; height: 100vh;
}
.sidebar .nav-link {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 14px;
  border-radius: var(--r);
  text-decoration: none;
  color: var(--ink-2);
  font-size: 14px;
  font-weight: 500;
  border: none; background: transparent; text-align: left; width: 100%;
}
.sidebar .nav-link:hover { background: var(--paper); color: var(--ink); }
.sidebar .nav-link.active { background: var(--blue); color: #fff; }
.sidebar .nav-section { font-size: 10px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-3); padding: 16px 14px 6px; }
.sidebar-foot { margin-top: auto; }

.main-area { padding: 40px; background: var(--paper); }
.main-area .page-head { margin-bottom: 32px; display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.main-area .page-head h2 { font-size: 36px; font-weight: 700; }

/* ───── Tabs/segmented ───── */
.tabs { display: inline-flex; padding: 4px; background: var(--paper); border-radius: 999px; gap: 2px; }
.tabs button {
  border: none; background: transparent;
  padding: 8px 16px; border-radius: 999px;
  font-size: 13px; font-weight: 500; color: var(--ink-2);
}
.tabs button.active { background: var(--white); color: var(--ink); box-shadow: var(--shadow-sm); }

/* ───── Auth pages ───── */
.auth-shell { min-height: 100vh; display: grid; grid-template-columns: 1fr 1fr; }
.auth-shell .auth-art {
  background: var(--blue);
  color: #fff;
  padding: 48px;
  display: flex; flex-direction: column; justify-content: space-between;
  position: relative;
  overflow: hidden;
}
.auth-shell .auth-form-side {
  display: flex; align-items: center; justify-content: center;
  padding: 48px;
  background: var(--white);
}
.auth-form { width: 100%; max-width: 380px; }
@media (max-width: 900px) {
  .auth-shell { grid-template-columns: 1fr; }
  .auth-shell .auth-art { display: none; }
}

/* ───── Status dots ───── */
.dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.dot-green { background: var(--green); }
.dot-amber { background: var(--amber); }
.dot-red   { background: var(--red); }

/* ───── Print/animation utilities ───── */
@keyframes fadein { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.page-anim { animation: fadein .25s ease both; }
