/* ============================================================
   Hike Careers — Design System
   Tokens lifted from careers-playful.jsx
   ============================================================ */
:root {
  /* Brand palette */
  --bg:         #FFFFFF;
  --surface:    #F7F4EE;
  --ink:        #0A1929;
  --ink2:       #3D4A5C;
  --muted:      #6F7B8B;
  --rule:       #E8E2D6;
  --blue:       #0BC4F6;
  --blue-dk:    #0096C7;
  --blue-sft:   #E6F8FE;
  --pink:       #FF1F6C;
  --pink-sft:   #FFE3EC;
  --yellow:     #FFD23F;
  --yellow-sft: #FFF4C2;
  --lilac:      #C7A6FF;
  --green:      #7BE495;

  /* Semantic aliases */
  --primary:        var(--blue);
  --primary-hover:  var(--blue-dk);
  --border:         var(--rule);
  --text:           var(--ink);
  --danger:         #dc2626;
  --success:        #16a34a;
  --warning:        #d97706;

  /* Status */
  --draft:     #6b7280;
  --published: #16a34a;
  --closed:    #dc2626;
  --archived:  #9333ea;
}

/* ── Reset ────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: 'Sora', -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 14px;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.5;
}
a { color: var(--blue-dk); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ── Layout ───────────────────────────────────────────────── */
.container { max-width: 1200px; margin: 0 auto; padding: 32px 24px; }
h1 { font-size: 28px; font-weight: 800; margin: 0 0 20px; letter-spacing: -0.02em; }
h2 { font-size: 20px; font-weight: 700; margin: 28px 0 14px; letter-spacing: -0.01em; }
h3 { font-size: 16px; font-weight: 600; margin: 18px 0 10px; }
p  { margin: 0 0 12px; }

/* ── Public Nav ───────────────────────────────────────────── */
.topnav {
  background: var(--bg);
  border-bottom: 1px solid var(--rule);
  padding: 0 max(24px, calc((100% - 1200px) / 2 + 24px));
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
  position: sticky;
  top: 0;
  z-index: 100;
}
.topnav .brand a { display: flex; align-items: center; }
.nav-logo { height: 30px; width: auto; display: block; }
.topnav .links { display: flex; gap: 4px; align-items: center; }
.topnav .links a {
  color: var(--ink2);
  font-size: 14px;
  font-weight: 500;
  padding: 8px 14px;
  border-radius: 8px;
  transition: background 0.15s, color 0.15s;
}
.topnav .links a:hover { background: var(--surface); color: var(--ink); text-decoration: none; }
.topnav .links a.active { color: var(--ink); font-weight: 700; }
.topnav form { display: inline; }

/* ── Hero ─────────────────────────────────────────────────── */
.hero {
  background: var(--blue);
  color: var(--ink);
  padding: 72px max(24px, calc((100% - 1200px) / 2 + 24px)) 64px;
  position: relative;
  overflow: hidden;
}
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px;
  border-radius: 999px;
  background: var(--ink);
  color: white;
  font-size: 12px;
  font-weight: 500;
  margin-bottom: 28px;
}
.hero-badge-dot {
  width: 7px; height: 7px;
  border-radius: 999px;
  background: var(--green);
  flex-shrink: 0;
}
.hero h1 {
  font-size: clamp(40px, 6vw, 80px);
  font-weight: 800;
  line-height: 0.95;
  letter-spacing: -0.04em;
  margin: 0 0 24px;
  color: var(--ink);
}
.hero p {
  font-size: 17px;
  line-height: 1.55;
  max-width: 580px;
  margin: 0 0 36px;
  font-weight: 400;
  color: var(--ink2);
}
.hero-actions { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.hero-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  border-top: 1.5px solid rgba(10,25,41,0.2);
  margin-top: 56px;
  padding-top: 28px;
}
.hero-stat { padding-left: 24px; border-left: 1px solid rgba(10,25,41,0.15); }
.hero-stat:first-child { padding-left: 0; border-left: none; }
.hero-stat-num {
  font-size: 36px;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1;
  color: var(--ink);
}
.hero-stat-label {
  font-size: 12px;
  color: var(--ink2);
  margin-top: 6px;
}

/* ── Filters ──────────────────────────────────────────────── */
.filters-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 28px;
  align-items: center;
}
.filters-bar > input[type="text"] { flex: 2 1 200px; min-width: 0; }
.filters-bar > select              { flex: 1 1 140px; min-width: 0; }
.filters-bar > button[type="submit"] { flex: 0 0 auto; }
/* legacy alias */
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 28px; align-items: center; }
.filters > input[type=text]    { flex: 2 1 200px; min-width: 0; }
.filters > select              { flex: 1 1 140px; min-width: 0; }
.filters > button[type=submit] { flex: 0 0 auto; }

/* ── Forms ────────────────────────────────────────────────── */
.form-row { display: flex; flex-direction: column; gap: 5px; margin-bottom: 16px; }
label { font-weight: 500; font-size: 13px; color: var(--ink2); }
input[type=text], input[type=email], input[type=password],
input[type=tel], input[type=url], input[type=number],
select, textarea {
  border: 1.5px solid var(--rule);
  border-radius: 8px;
  padding: 9px 12px;
  font: inherit;
  font-size: 14px;
  background: white;
  width: 100%;
  color: var(--ink);
  transition: border-color 0.15s, box-shadow 0.15s;
}
textarea { resize: vertical; min-height: 100px; }
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(11,196,246,0.18);
}
.row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.row-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 16px; }

/* ── Buttons ──────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 9px 16px;
  border-radius: 8px;
  border: 1.5px solid var(--rule);
  background: white;
  cursor: pointer;
  font: inherit;
  font-size: 13px;
  font-weight: 500;
  color: var(--ink);
  transition: background 0.15s, border-color 0.15s, box-shadow 0.15s;
  text-decoration: none;
}
.btn:hover { background: var(--surface); text-decoration: none; }
.btn-primary {
  background: var(--ink);
  color: white;
  border-color: var(--ink);
  font-weight: 600;
}
.btn-primary:hover { background: var(--ink2); border-color: var(--ink2); }
.btn-blue {
  background: var(--blue);
  color: var(--ink);
  border-color: var(--blue);
  font-weight: 600;
}
.btn-blue:hover { background: var(--blue-dk); border-color: var(--blue-dk); color: white; }
.btn-danger { background: var(--danger); color: white; border-color: var(--danger); }
.btn-danger:hover { background: #b91c1c; border-color: #b91c1c; }
.btn-ghost { background: transparent; border-color: transparent; }
.btn-ghost:hover { background: var(--surface); }
.btn-sm { padding: 5px 10px; font-size: 12px; border-radius: 6px; }

/* ── Cards ────────────────────────────────────────────────── */
.card {
  background: white;
  border: 1.5px solid var(--rule);
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 12px;
}

/* ── Public job cards ─────────────────────────────────────── */
.public-job-card {
  background: white;
  border: 1.5px solid var(--rule);
  border-radius: 14px;
  padding: 22px 24px;
  margin-bottom: 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  transition: box-shadow 0.18s, border-color 0.18s, transform 0.18s;
}
.public-job-card:hover {
  box-shadow: 0 6px 24px rgba(10,25,41,0.08);
  border-color: var(--blue);
  transform: translateY(-1px);
}
.public-job-card .title {
  font-size: 17px;
  font-weight: 700;
  margin-bottom: 5px;
  color: var(--ink);
  letter-spacing: -0.01em;
}
.public-job-card .title a { color: inherit; }
.public-job-card .title a:hover { text-decoration: none; color: var(--blue-dk); }
.public-job-card .meta { color: var(--muted); font-size: 13px; display: flex; gap: 6px; align-items: center; }
.meta-dot { width: 3px; height: 3px; border-radius: 50%; background: var(--muted); }
.public-job-card .actions { display: flex; gap: 8px; align-items: center; flex-shrink: 0; }

/* ── Section header ───────────────────────────────────────── */
.section-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 20px;
  gap: 16px;
}
.section-title {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--ink);
  margin: 0;
}
.section-count {
  font-size: 13px;
  color: var(--muted);
  font-weight: 400;
}

/* ── Admin job cards ──────────────────────────────────────── */
.job-card { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; }
.job-card .meta { color: var(--muted); font-size: 13px; margin-top: 4px; }
.job-card h3 { margin: 0; font-size: 15px; font-weight: 700; }
.job-card .actions { display: flex; gap: 6px; flex-wrap: wrap; flex-shrink: 0; }

/* ── Status pills ─────────────────────────────────────────── */
.pill {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 9999px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  background: var(--surface);
  color: var(--muted);
}
.pill-draft    { background: #f3f4f6; color: var(--draft); }
.pill-published { background: #dcfce7; color: var(--published); }
.pill-closed   { background: #fee2e2; color: var(--closed); }
.pill-archived { background: #ede9fe; color: var(--archived); }

/* ── Share menu ───────────────────────────────────────────── */
.share-menu { position: relative; display: inline-block; }
.share-menu .share-list {
  display: none;
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  background: white;
  border: 1.5px solid var(--rule);
  border-radius: 10px;
  box-shadow: 0 8px 24px rgba(10,25,41,0.1);
  min-width: 180px;
  z-index: 50;
  padding: 5px;
}
.share-menu.open .share-list { display: block; }
.share-list a, .share-list button {
  display: block;
  width: 100%;
  text-align: left;
  padding: 8px 12px;
  background: none;
  border: 0;
  color: var(--ink);
  cursor: pointer;
  font: inherit;
  font-size: 13px;
  border-radius: 6px;
}
.share-list a:hover, .share-list button:hover { background: var(--surface); text-decoration: none; }

/* ── Sticky apply ─────────────────────────────────────────── */
.sticky-apply {
  position: fixed;
  bottom: 28px;
  right: 28px;
  z-index: 50;
}
.sticky-apply .btn-primary {
  padding: 13px 22px;
  font-size: 14px;
  border-radius: 12px;
  box-shadow: 0 6px 20px rgba(10,25,41,0.2);
}

/* ── Flash messages ───────────────────────────────────────── */
.flashes { margin-bottom: 20px; }
.flash {
  padding: 11px 16px;
  border-radius: 10px;
  margin-bottom: 8px;
  font-size: 13px;
  font-weight: 500;
}
.flash-error { background: #fee2e2; color: #991b1b; }
.flash-info  { background: var(--blue-sft); color: var(--blue-dk); }

/* ── Auth ─────────────────────────────────────────────────── */
.auth-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  background: var(--surface);
}
.auth-card {
  width: 400px;
  max-width: 92vw;
  background: white;
  border: 1.5px solid var(--rule);
  border-radius: 16px;
  padding: 36px;
  box-shadow: 0 8px 32px rgba(10,25,41,0.06);
}
.auth-card h1 { font-size: 22px; margin-bottom: 6px; }
.auth-logo { height: 28px; margin-bottom: 24px; display: block; }

/* ── Pipeline / Kanban ────────────────────────────────────── */
.pipeline { display: flex; gap: 12px; overflow-x: auto; padding-bottom: 8px; }
.stage-col {
  background: var(--surface);
  border: 1.5px solid var(--rule);
  border-radius: 12px;
  min-width: 260px;
  flex: 0 0 260px;
  padding: 14px;
}
.stage-col h4 {
  margin: 0 0 10px;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--muted);
  display: flex;
  justify-content: space-between;
  font-weight: 700;
}
.app-card {
  background: white;
  border: 1.5px solid var(--rule);
  border-radius: 8px;
  padding: 12px;
  margin-bottom: 8px;
  font-size: 13px;
  transition: box-shadow 0.15s;
}
.app-card:hover { box-shadow: 0 2px 8px rgba(10,25,41,0.06); }
.app-card .name { font-weight: 700; }
.app-card .meta { color: var(--muted); font-size: 12px; }
.app-card form { margin-top: 8px; display: flex; gap: 4px; }
.app-card select { padding: 4px; font-size: 12px; }

/* ── Tables ───────────────────────────────────────────────── */
table { width: 100%; border-collapse: collapse; background: white; border-radius: 12px; overflow: hidden; border: 1.5px solid var(--rule); }
th, td { padding: 11px 14px; text-align: left; border-bottom: 1px solid var(--rule); font-size: 13px; }
th { background: var(--surface); font-weight: 700; font-size: 12px; text-transform: uppercase; letter-spacing: 0.3px; color: var(--muted); }
tr:last-child td { border-bottom: none; }

/* ── Empty state ──────────────────────────────────────────── */
.empty {
  text-align: center;
  padding: 72px 24px;
  color: var(--muted);
  background: var(--surface);
  border-radius: 14px;
  border: 1.5px dashed var(--rule);
}
.empty h3 { color: var(--ink); font-size: 18px; margin: 0 0 8px; }

/* ── Job detail ───────────────────────────────────────────── */
.jd { white-space: pre-wrap; line-height: 1.7; font-size: 15px; color: var(--ink2); }

/* ── Back link ────────────────────────────────────────────── */
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 500;
  color: var(--muted);
  margin-bottom: 20px;
  padding: 6px 10px 6px 8px;
  border-radius: 7px;
  transition: background 0.15s, color 0.15s;
}
.back-link:hover { background: var(--surface); color: var(--ink); text-decoration: none; }

/* ── Screening question editor ────────────────────────────── */
.sq-row {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr auto;
  gap: 8px;
  margin-bottom: 8px;
  align-items: center;
}
.sq-row input, .sq-row select { font-size: 13px; padding: 6px 8px; }

/* ── Stage chips ──────────────────────────────────────────── */
.stage-chips {
  display: flex; flex-wrap: wrap; gap: 6px;
  padding: 10px;
  border: 1.5px dashed var(--rule);
  border-radius: 8px;
  background: var(--surface);
  margin-bottom: 14px;
}
.stage-chip {
  background: white;
  border: 1.5px solid var(--rule);
  border-radius: 6px;
  padding: 5px 10px;
  font-size: 12px;
  cursor: grab;
  user-select: none;
  font-weight: 500;
  color: var(--ink2);
}
.stage-chip.dragging { opacity: 0.4; }

/* ── Utilities ────────────────────────────────────────────── */
.muted     { color: var(--muted); }
.right     { text-align: right; }
.flex-row  { display: flex; gap: 8px; align-items: center; }
.between   { justify-content: space-between; }
.gap-12    { gap: 12px; }
hr         { border: 0; border-top: 1px solid var(--rule); margin: 20px 0; }
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.text-sm   { font-size: 12px; }

/* ── Apply success ────────────────────────────────────────── */
.success-shell {
  min-height: 60vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px 24px;
}
.success-card {
  background: white;
  border: 1.5px solid var(--rule);
  border-radius: 20px;
  padding: 56px 48px;
  max-width: 500px;
  width: 100%;
  text-align: center;
  box-shadow: 0 8px 40px rgba(10,25,41,0.06);
}
.success-icon {
  width: 56px; height: 56px;
  border-radius: 50%;
  background: #dcfce7;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  margin-bottom: 20px;
}
.success-card h1 { font-size: 26px; margin-bottom: 10px; }

/* ── Responsive ───────────────────────────────────────────── */
@media (max-width: 768px) {
  .container { padding: 20px 16px; }
  .topnav { padding: 0 16px; height: 56px; }
  .topnav .muted { display: none; }
  .hero { padding: 48px 20px 40px; }
  .hero h1 { font-size: 36px; }
  .hero p { font-size: 15px; }
  .hero-stats { grid-template-columns: 1fr 1fr; gap: 20px; }
  .hero-stat { padding-left: 0; border-left: none; }
  .hero-stat-num { font-size: 28px; }
  h1 { font-size: 22px; }
  .row-2, .row-3 { grid-template-columns: 1fr; }
  .filters > select { flex-basis: calc(50% - 4px); }
  .job-card { flex-direction: column; }
  .job-card .actions { flex-wrap: wrap; width: 100%; }
  .public-job-card { flex-direction: column; align-items: flex-start; gap: 14px; }
  .public-job-card .actions { width: 100%; }
  .share-menu .share-list { right: auto; left: 0; }
  .sq-row { grid-template-columns: 1fr 1fr; gap: 6px; }
  .sq-row > input[type=text]:first-child { grid-column: 1 / -1; }
  .sticky-apply { bottom: 16px; right: 16px; }
  .auth-card { padding: 28px 20px; }
  .success-card { padding: 40px 24px; }
}

@media (max-width: 480px) {
  .hero-stats { grid-template-columns: 1fr 1fr; }
  .filters > select,
  .filters > input[type=text],
  .filters > button[type=submit] { flex-basis: 100%; }
  .topnav .links a { padding: 6px 10px; font-size: 13px; }
  .job-card .actions .btn { flex: 1 1 auto; text-align: center; }
}
