/* ============================================================
   TalentBridge Design System
   Palette: Ink Navy / Signal Indigo / Sky / Amber
   Type: Sora (display) + Inter (body) + JetBrains Mono (data)
   ============================================================ */

:root {
  --color-primary: #4F46E5;
  --color-primary-dark: #3730A3;
  --color-secondary: #0EA5E9;
  --color-accent: #F59E0B;
  --color-ink: #0B1220;
  --color-ink-soft: #131C31;
  --surface: #ffffff;
  --surface-soft: #F6F7FB;
  --surface-border: #E6E8F0;
  --text-strong: #0B1220;
  --text-soft: #5B6478;
  --radius: 14px;
  --radius-sm: 8px;
  --shadow-sm: 0 1px 2px rgba(11,18,32,.06);
  --shadow-md: 0 8px 24px rgba(11,18,32,.08);
  --shadow-lg: 0 24px 60px -12px rgba(11,18,32,.25);
  --font-display: 'Sora', 'Inter', sans-serif;
  --font-body: 'Inter', -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, monospace;
}

[data-theme="dark"] {
  --surface: #0F1729;
  --surface-soft: #131C31;
  --surface-border: #232E48;
  --text-strong: #F3F5FB;
  --text-soft: #98A2B8;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  color: var(--text-strong);
  background: var(--surface-soft);
  -webkit-font-smoothing: antialiased;
  transition: background .25s ease, color .25s ease;
}
h1,h2,h3,h4,.font-display { font-family: var(--font-display); letter-spacing: -0.02em; }
.text-mono { font-family: var(--font-mono); }
a { color: var(--color-primary); text-decoration: none; }
:focus-visible { outline: 2px solid var(--color-primary); outline-offset: 2px; }

/* ---------- Layout shell ---------- */
.tb-navbar {
  background: var(--surface);
  border-bottom: 1px solid var(--surface-border);
  position: sticky; top: 0; z-index: 1000;
  backdrop-filter: saturate(180%) blur(12px);
  background: color-mix(in srgb, var(--surface) 88%, transparent);
}
.tb-navbar .navbar-brand {
  font-family: var(--font-display); font-weight: 700; font-size: 1.35rem; color: var(--text-strong);
}
.tb-navbar .navbar-brand span { color: var(--color-primary); }
.tb-navbar .nav-link { color: var(--text-soft); font-weight: 500; }
.tb-navbar .nav-link:hover, .tb-navbar .nav-link.active { color: var(--text-strong); }

/* ---------- Buttons ---------- */
.btn-tb-primary {
  background: linear-gradient(135deg, var(--color-primary), var(--color-primary-dark));
  color: #fff; border: none; border-radius: var(--radius-sm);
  padding: .65rem 1.4rem; font-weight: 600; box-shadow: var(--shadow-sm);
  transition: transform .18s ease, box-shadow .18s ease;
}
.btn-tb-primary:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); color: #fff; }
.btn-tb-outline {
  background: transparent; border: 1.5px solid var(--surface-border); color: var(--text-strong);
  border-radius: var(--radius-sm); padding: .6rem 1.35rem; font-weight: 600;
  transition: all .18s ease;
}
.btn-tb-outline:hover { border-color: var(--color-primary); color: var(--color-primary); }

/* ---------- Cards ---------- */
.tb-card {
  background: var(--surface); border: 1px solid var(--surface-border);
  border-radius: var(--radius); box-shadow: var(--shadow-sm);
  transition: transform .2s ease, box-shadow .2s ease;
}
.tb-card.hoverable:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.tb-glass {
  background: color-mix(in srgb, var(--surface) 65%, transparent);
  backdrop-filter: blur(16px) saturate(160%);
  border: 1px solid color-mix(in srgb, var(--surface-border) 70%, transparent);
  border-radius: var(--radius);
}

/* ---------- Hero ---------- */
.tb-hero {
  position: relative; overflow: hidden;
  background: radial-gradient(1200px 600px at 15% -10%, color-mix(in srgb, var(--color-primary) 18%, transparent), transparent),
              radial-gradient(1000px 500px at 100% 0%, color-mix(in srgb, var(--color-secondary) 16%, transparent), transparent),
              var(--color-ink);
  color: #fff;
}
.tb-hero .eyebrow {
  display: inline-flex; align-items: center; gap: .5rem;
  background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.14);
  padding: .35rem .9rem; border-radius: 999px; font-size: .8rem; color: #C7D0E8;
}
.tb-hero h1 { font-size: clamp(2.2rem, 5vw, 3.6rem); font-weight: 700; line-height: 1.08; }
.tb-hero p.lead { color: #AEB8D4; font-size: 1.15rem; max-width: 560px; }

/* Pipeline stepper — signature visual motif echoed from the ATS pipeline */
.tb-pipeline {
  display: flex; align-items: center; gap: 0; flex-wrap: wrap;
}
.tb-pipeline .stage {
  display: flex; align-items: center; gap: .5rem;
  background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.12);
  padding: .5rem 1rem; border-radius: 999px; font-size: .85rem; color: #E4E9F7;
  white-space: nowrap;
}
.tb-pipeline .stage.active { background: var(--color-primary); border-color: var(--color-primary); color: #fff; }
.tb-pipeline .arrow { color: #5A6690; margin: 0 .4rem; }

/* ---------- Stats ---------- */
.tb-stat .num { font-family: var(--font-display); font-size: 2.4rem; font-weight: 700; }
.tb-stat .label { color: var(--text-soft); font-size: .9rem; }

/* ---------- Job card ---------- */
.job-card { padding: 1.4rem; }
.job-card .badge-type {
  background: color-mix(in srgb, var(--color-secondary) 14%, transparent);
  color: var(--color-secondary); font-weight: 600; font-size: .72rem;
  border-radius: 999px; padding: .3rem .7rem;
}
.job-card .company-mark {
  width: 46px; height: 46px; border-radius: 12px;
  background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
  display: flex; align-items: center; justify-content: center; color: #fff; font-weight: 700;
  font-family: var(--font-display);
}

/* ---------- ATS Kanban ---------- */
.ats-board { display: flex; gap: 1rem; overflow-x: auto; padding-bottom: 1rem; }
.ats-column {
  min-width: 270px; background: var(--surface-soft); border-radius: var(--radius);
  border: 1px solid var(--surface-border); padding: .9rem; flex-shrink: 0;
}
.ats-column h6 { font-family: var(--font-display); font-size: .82rem; text-transform: uppercase; letter-spacing: .06em; color: var(--text-soft); }
.ats-card {
  background: var(--surface); border: 1px solid var(--surface-border); border-radius: var(--radius-sm);
  padding: .75rem; margin-bottom: .6rem; box-shadow: var(--shadow-sm); transition: opacity .15s ease;
}
.ats-card.ats-card-busy { opacity: .55; pointer-events: none; }
.ats-card .score-pill {
  font-family: var(--font-mono); font-size: .7rem; padding: .1rem .5rem; border-radius: 999px;
  background: color-mix(in srgb, var(--color-accent) 18%, transparent); color: #92620A;
}
.ats-card-actions {
  display: flex; align-items: center; justify-content: space-between; gap: .5rem; margin-top: .6rem;
}
.ats-move-select {
  width: auto; max-width: 132px; font-size: .74rem; padding: .2rem .45rem; border-radius: var(--radius-sm);
}
.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

/* ---------- Dashboard shell ---------- */
.dash-sidebar {
  width: 250px; background: var(--color-ink); color: #C7D0E8; min-height: 100vh;
  position: sticky; top: 0;
}
.dash-sidebar a {
  display: flex; align-items: center; gap: .7rem; color: #97A2C2; padding: .65rem 1.2rem;
  border-radius: var(--radius-sm); margin: .15rem .7rem; font-weight: 500; font-size: .92rem;
}
.dash-sidebar a:hover, .dash-sidebar a.active { background: rgba(255,255,255,.08); color: #fff; }
.dash-sidebar .brand { color: #fff; font-family: var(--font-display); font-weight: 700; padding: 1.2rem; }
.dash-main { flex: 1; min-width: 0; }
.dash-topbar {
  background: var(--surface); border-bottom: 1px solid var(--surface-border);
  padding: .9rem 1.5rem; position: sticky; top: 0; z-index: 900;
}
.widget { background: var(--surface); border: 1px solid var(--surface-border); border-radius: var(--radius); padding: 1.25rem; }

/* ---------- Loading / skeleton ---------- */
.skeleton {
  background: linear-gradient(90deg, var(--surface-border) 25%, var(--surface-soft) 37%, var(--surface-border) 63%);
  background-size: 400% 100%; animation: skeleton-loading 1.4s ease infinite; border-radius: var(--radius-sm);
}
@keyframes skeleton-loading { 0% { background-position: 100% 50%; } 100% { background-position: 0 50%; } }

/* ---------- Fade-in on load ---------- */
.fade-up { animation: fadeUp .6s ease both; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: translateY(0); } }

footer.tb-footer { background: var(--color-ink); color: #97A2C2; }
footer.tb-footer a { color: #C7D0E8; }
footer.tb-footer a:hover { color: #fff; }

@media (max-width: 768px) {
  .dash-sidebar { position: fixed; left: -260px; transition: left .25s ease; z-index: 1050; }
  .dash-sidebar.open { left: 0; }
}
