/* ============================================================
   Nexhire — Job Board Styles
   Clean corporate theme: navy + solid blue, flat cards, no gradients.
   ============================================================ */

:root {
  --navy:        #0f2440;
  --navy-700:    #1b3a5f;
  --brand:       #2563eb;
  --brand-dark:  #1d4ed8;
  --brand-050:   #eef4ff;
  --brand-100:   #dbe6ff;
  --ink:         #0f1b2d;
  --ink-soft:    #47556b;
  --muted:       #8592a6;
  --line:        #e3e8ef;
  --line-strong: #cfd6e0;
  --bg:          #f3f5f9;
  --card:        #ffffff;
  --success:     #067647;
  --success-bg:  #e7f6ec;
  --danger:      #b42318;
  --danger-bg:   #fef3f2;
  --radius:      10px;
  --radius-sm:   8px;
  --shadow-sm:   0 1px 2px rgba(16, 24, 40, .06);
  --shadow:      0 1px 3px rgba(16, 24, 40, .10), 0 1px 2px rgba(16, 24, 40, .06);
  --shadow-md:   0 8px 24px rgba(16, 24, 40, .10);
  --font:        ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3, h4 { color: var(--navy); }

.container { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 clamp(20px, 3vw, 40px); }

/* ---------- Header ---------- */
.site-header {
  background: #fff;
  border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 50;
}
.header-inner { display: flex; align-items: center; height: 64px; gap: 16px; }
.header-left { display: flex; align-items: center; gap: 12px; }

.brand {
  font-weight: 800; font-size: 1.2rem; color: var(--navy);
  display: inline-flex; align-items: center; gap: 10px; letter-spacing: -.02em;
}
.brand:hover { text-decoration: none; }
.brand-logo {
  width: 32px; height: 32px; border-radius: 8px; flex: 0 0 auto;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--navy);
}
.brand-name { color: var(--navy); }

/* Desktop top navigation */
.top-nav { display: none; align-items: center; gap: 4px; margin-left: auto; }
.top-nav .nav-link {
  color: var(--ink-soft); font-weight: 600; font-size: .94rem;
  padding: 8px 12px; border-radius: 8px; transition: background .15s, color .15s;
}
.top-nav .nav-link:hover { color: var(--navy); background: var(--bg); text-decoration: none; }
.top-nav .nav-link.is-active { color: var(--brand); }
.top-nav .btn { margin-left: 8px; }
.top-nav .nav-avatar { margin-left: 6px; }

.nav-avatar {
  width: 36px; height: 36px; border-radius: 50%; flex: 0 0 auto;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--navy); color: #fff; font-size: .82rem; font-weight: 700;
}

/* Hamburger toggle (mobile only) */
.side-toggle { display: flex; flex-direction: column; gap: 5px; width: 42px; height: 42px; border-radius: 8px; cursor: pointer; align-items: center; justify-content: center; transition: background .18s; }
.side-toggle:hover { background: var(--bg); }
.side-toggle span { display: block; width: 20px; height: 2px; background: var(--navy); border-radius: 2px; transition: transform .25s, opacity .2s; }
.side-toggle-cb:checked ~ .site-header .side-toggle span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.side-toggle-cb:checked ~ .site-header .side-toggle span:nth-child(2) { opacity: 0; }
.side-toggle-cb:checked ~ .site-header .side-toggle span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- Side navigation (mobile drawer) ---------- */
.side-nav {
  position: fixed; top: 0; left: 0; height: 100vh; width: 280px; z-index: 60;
  background: var(--card); border-right: 1px solid var(--line); box-shadow: var(--shadow-md);
  display: flex; flex-direction: column; gap: 4px; padding: 16px 14px; overflow-y: auto;
  transform: translateX(-100%); transition: transform .28s cubic-bezier(.4, 0, .2, 1);
}
.side-toggle-cb:checked ~ .side-nav { transform: none; }

.side-backdrop {
  position: fixed; inset: 0; z-index: 55; background: rgba(15, 27, 45, .5);
  opacity: 0; pointer-events: none; transition: opacity .28s;
}
.side-toggle-cb:checked ~ .side-backdrop { opacity: 1; pointer-events: auto; }

.side-nav-top { display: flex; align-items: center; justify-content: space-between; padding: 6px 6px 14px; margin-bottom: 8px; border-bottom: 1px solid var(--line); }
.side-close { cursor: pointer; font-size: 1.5rem; line-height: 1; color: var(--muted); width: 32px; height: 32px; display: inline-flex; align-items: center; justify-content: center; border-radius: 8px; transition: background .16s, color .16s; }
.side-close:hover { background: var(--bg); color: var(--ink); }

.side-user { display: flex; align-items: center; gap: 12px; padding: 12px 10px; margin-bottom: 8px; border-radius: 10px; background: var(--bg); color: var(--ink); }
.side-user:hover { text-decoration: none; box-shadow: inset 0 0 0 1px var(--line); }
.side-user-meta { display: flex; flex-direction: column; min-width: 0; }
.side-user-meta strong { font-size: .92rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.side-user-meta small { color: var(--muted); font-size: .78rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.side-links { display: flex; flex-direction: column; gap: 3px; }
.side-link {
  display: flex; align-items: center; gap: 12px; padding: 11px 12px; border-radius: 8px;
  color: var(--ink-soft); font-weight: 600; font-size: .95rem; transition: background .16s, color .16s;
}
.side-link svg { color: var(--muted); flex: 0 0 auto; transition: color .16s; }
.side-link:hover { background: var(--bg); color: var(--navy); text-decoration: none; }
.side-link:hover svg { color: var(--brand); }
.side-link-muted { color: var(--muted); }
.side-link-cta { justify-content: center; margin-top: 10px; color: #fff; background: var(--brand); }
.side-link-cta:hover { color: #fff; background: var(--brand-dark); }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--line); margin-top: 72px; background: #fff; }
.footer-grid { display: grid; grid-template-columns: 1fr; gap: 32px; padding: 40px 20px 24px; }
.footer-brand p { color: var(--ink-soft); font-size: .9rem; max-width: 360px; margin: 12px 0 0; }
.footer-col h4 { font-size: .78rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin: 4px 0 12px; }
.footer-col a { display: block; color: var(--ink-soft); font-size: .92rem; padding: 4px 0; }
.footer-col a:hover { color: var(--brand); text-decoration: none; }
.footer-base { border-top: 1px solid var(--line); padding: 18px 20px; color: var(--muted); font-size: .85rem; text-align: center; }

/* ---------- Hero + search ---------- */
.hero {
  position: relative; padding: 60px 0 44px; background: #fff;
  border-bottom: 1px solid var(--line);
}
.hero-grid { position: relative; z-index: 1; max-width: 780px; }
.hero-eyebrow {
  display: inline-flex; align-items: center; gap: 8px; background: var(--brand-050);
  color: var(--brand-dark); font-weight: 700; font-size: .78rem; padding: 6px 12px;
  border-radius: 6px; margin-bottom: 18px; letter-spacing: .01em;
  border: 1px solid var(--brand-100);
}
.hero-eyebrow::before {
  content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--success);
}
.hero h1 { font-size: clamp(2rem, 4vw, 2.85rem); line-height: 1.1; margin: 0 0 14px; letter-spacing: -.03em; font-weight: 800; color: var(--navy); }
.grad-text { color: var(--brand); }
.hero p { color: var(--ink-soft); margin: 0 0 26px; font-size: 1.1rem; max-width: 560px; }

.search-bar {
  display: flex; gap: 8px; flex-wrap: wrap; background: var(--card);
  padding: 10px; border-radius: 12px; box-shadow: var(--shadow); border: 1px solid var(--line-strong); max-width: 680px;
}
.search-field { position: relative; flex: 1 1 190px; display: flex; align-items: center; }
.search-field svg { position: absolute; left: 12px; color: var(--muted); pointer-events: none; }
.search-field input { width: 100%; padding: 12px 12px 12px 38px; border: 1px solid var(--line); border-radius: 8px; font-size: .98rem; background: #fff; color: var(--ink); }
.search-field input:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-050); }
.search-bar select { flex: 1 1 140px; padding: 12px; border: 1px solid var(--line); border-radius: 8px; font-size: .98rem; background: #fff; color: var(--ink); }
.search-bar select:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-050); }
.search-bar .btn { flex: 0 0 auto; }

.hero-stats { display: flex; gap: 0; margin-top: 28px; }
.hero-stats div { display: flex; flex-direction: column; padding: 0 24px; border-left: 1px solid var(--line); }
.hero-stats div:first-child { padding-left: 0; border-left: none; }
.hero-stats strong { font-size: 1.4rem; font-weight: 800; color: var(--navy); letter-spacing: -.02em; }
.hero-stats span { font-size: .82rem; color: var(--muted); margin-top: 2px; }

/* ---------- Job list ---------- */
.list-head { margin: 32px 0 16px; }
.list-head h2 { font-size: 1.25rem; margin: 0; color: var(--navy); }
.job-card {
  position: relative; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 18px 20px; margin-bottom: 12px; display: flex; align-items: flex-start; gap: 16px;
  box-shadow: var(--shadow-sm); transition: box-shadow .16s, border-color .16s;
}
.job-card:hover { box-shadow: var(--shadow-md); border-color: var(--brand); }
.job-card-main { flex: 1; min-width: 0; }
.job-card h3 { margin: 0 0 4px; font-size: 1.12rem; }
.job-card h3 a { color: var(--navy); }
.job-card h3 a:hover { color: var(--brand); text-decoration: none; }

/* Company avatar (initials) */
.job-avatar {
  flex: 0 0 auto; width: 50px; height: 50px; border-radius: 10px; display: flex; align-items: center; justify-content: center;
  color: #fff; font-weight: 700; font-size: 1.1rem; letter-spacing: .02em;
}
.job-avatar-lg { width: 62px; height: 62px; border-radius: 14px; font-size: 1.45rem; }
.job-detail-top { display: flex; align-items: center; gap: 16px; }
.job-company { color: var(--ink-soft); margin: 0 0 10px; font-size: .95rem; }
.job-snippet { color: var(--ink-soft); margin: 0 0 12px; font-size: .93rem; line-height: 1.6; }
.job-card-side { display: flex; flex-direction: column; align-items: flex-end; gap: 10px; white-space: nowrap; }
.posted { color: var(--muted); font-size: .85rem; }

.job-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.tag { background: var(--brand-050); color: var(--brand-dark); font-size: .78rem; font-weight: 600; padding: 4px 10px; border-radius: 6px; border: 1px solid var(--brand-100); }
.tag-muted { background: #f1f4f8; color: var(--ink-soft); border-color: var(--line); }
.tag-salary { background: var(--success-bg); color: var(--success); border-color: #c9ecd5; }
.tag-closed { background: var(--danger-bg); color: var(--danger); border-color: #fcd9d4; }

.empty { color: var(--muted); padding: 24px 0; }

/* ---------- Job detail ---------- */
.back-link { display: inline-block; margin: 24px 0 12px; color: var(--ink-soft); font-size: .9rem; font-weight: 600; }
.job-detail-head h1 { margin: 0 0 4px; font-size: 1.7rem; }
.job-body { margin: 28px 0; }
.job-body h2 {
  font-size: 1.1rem; margin: 28px 0 12px; padding-bottom: 8px;
  border-bottom: 2px solid var(--line); color: var(--navy);
}
.job-body p { color: var(--ink-soft); }

/* Readable, well-spaced job description text */
.job-body-text { max-width: 70ch; }
.job-body-text > *:first-child { margin-top: 0; }
.job-body-text p {
  color: var(--ink-soft); line-height: 1.75; font-size: 1rem;
  margin: 0 0 16px;
}
.job-body-sub {
  font-size: 1rem; font-weight: 700; color: var(--navy);
  margin: 22px 0 10px; letter-spacing: .01em;
}
.job-body-list {
  list-style: none; margin: 0 0 18px; padding: 0;
  display: grid; gap: 10px;
}
.job-body-list li {
  position: relative; padding-left: 26px;
  color: var(--ink-soft); line-height: 1.65;
}
.job-body-list li::before {
  content: ""; position: absolute; left: 4px; top: .58em;
  width: 8px; height: 8px; border-radius: 2px;
  background: var(--brand);
}
.apply-cta { margin: 32px 0; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-block; padding: 11px 20px; border-radius: 8px; font-weight: 600; font-size: .95rem;
  cursor: pointer; border: 1px solid transparent; text-align: center;
  transition: background .16s, color .16s, border-color .16s, box-shadow .16s;
}
.btn:hover { text-decoration: none; }
.btn-primary { background: var(--brand); color: #fff; box-shadow: var(--shadow-sm); }
.btn-primary:hover { background: var(--brand-dark); color: #fff; }
.btn-secondary { background: #fff; color: var(--navy); border-color: var(--line-strong); }
.btn-secondary:hover { background: var(--bg); border-color: var(--muted); }
.btn-ghost { background: transparent; color: var(--ink-soft); border-color: var(--line-strong); }
.btn-ghost:hover { background: var(--bg); color: var(--navy); }
.btn-lg { padding: 14px 28px; font-size: 1.02rem; border-radius: 10px; }
.btn-sm { padding: 8px 14px; font-size: .85rem; border-radius: 7px; }
.btn-block { width: 100%; }

/* ---------- Forms ---------- */
.apply-wrap { max-width: 1080px; margin: 0 auto; }
.apply-wrap h1 { margin: 8px 0 4px; }
.application-form, .admin-form { margin-top: 24px; }

.form-section {
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: 20px 22px; margin-bottom: 20px; background: var(--card);
}
.form-section legend { font-weight: 700; font-size: 1.05rem; padding: 0 8px; color: var(--navy); }
.form-section .hint { font-weight: 400; color: var(--muted); font-size: .85rem; }

label { display: block; margin-bottom: 14px; font-weight: 600; font-size: .9rem; color: var(--ink); }
label input, label select, label textarea, .admin-form input, .admin-form select, .admin-form textarea {
  display: block; width: 100%; margin-top: 6px; padding: 10px 12px;
  border: 1px solid var(--line); border-radius: var(--radius-sm); font-size: 1rem; font-family: inherit; font-weight: 400; color: var(--ink);
}
label input:focus, label select:focus, label textarea:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-050); }
textarea { resize: vertical; }

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
.grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 0 16px; }

.checkbox-row { display: flex; align-items: flex-start; gap: 10px; font-weight: 500; }
.checkbox-row input { width: auto; margin-top: 3px; }

/* Repeatable rows */
.repeatable-item { border: 1px dashed var(--line-strong); border-radius: var(--radius-sm); padding: 16px; margin-bottom: 12px; position: relative; background: var(--bg); }
.btn-remove { background: none; border: none; color: var(--danger); font-size: .85rem; cursor: pointer; padding: 4px 0; font-weight: 600; }
.btn-remove:hover { text-decoration: underline; }

.form-actions { display: flex; gap: 12px; margin-top: 8px; }

/* Alerts */
.alert { padding: 14px 16px; border-radius: var(--radius-sm); margin-bottom: 20px; font-size: .95rem; }
.alert-error { background: var(--danger-bg); color: #912018; border: 1px solid #fcd9d4; }
.alert-error ul { margin: 8px 0 0; padding-left: 20px; }
.alert-success { background: var(--success-bg); color: #085d3a; border: 1px solid #c9ecd5; }

/* Success page */
.success-box { max-width: 520px; margin: 60px auto; text-align: center; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 40px; box-shadow: var(--shadow); }
.success-icon { width: 64px; height: 64px; border-radius: 50%; background: var(--success-bg); color: var(--success); font-size: 2rem; display: flex; align-items: center; justify-content: center; margin: 0 auto 16px; }

/* ============================================================
   Admin
   ============================================================ */
.login-page { display: flex; align-items: center; justify-content: center; min-height: 100vh; background: var(--bg); }
.login-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 36px; width: 360px; box-shadow: var(--shadow-md); text-align: center; }
.login-card h1 { font-size: 1.3rem; margin: 16px 0 20px; }
.login-card form { text-align: left; }
.login-card label { margin-bottom: 16px; }
.login-hint { color: var(--muted); font-size: .85rem; margin-top: 16px; }
.login-hint code { background: var(--bg); padding: 2px 6px; border-radius: 4px; }

.admin-header { background: var(--navy); color: #fff; }
.admin-header-inner { max-width: none; margin: 0; padding: 0 clamp(20px, 3vw, 40px); height: 60px; display: flex; align-items: center; justify-content: space-between; }
.admin-header .brand, .admin-header .brand-name { color: #fff; }
.admin-badge { background: var(--brand); color: #fff; font-size: .65rem; padding: 2px 8px; border-radius: 6px; vertical-align: middle; margin-left: 4px; letter-spacing: .05em; text-transform: uppercase; }
.admin-nav { display: flex; align-items: center; gap: 18px; }
.admin-nav a { color: #c7d2e2; font-weight: 500; font-size: .95rem; }
.admin-nav a:hover { color: #fff; }
.admin-user { color: #9fb0c7; font-size: .85rem; }
.admin-main { max-width: 1200px; margin: 0 auto; padding: 28px clamp(20px, 3vw, 40px); }
.admin-page.narrow { max-width: 700px; }

.page-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; gap: 16px; }
.page-head h1 { margin: 0; font-size: 1.55rem; }

.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 16px; margin-bottom: 32px; }
.stat-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; text-align: center; box-shadow: var(--shadow-sm); color: inherit; transition: box-shadow .16s, border-color .16s; }
a.stat-card:hover { box-shadow: var(--shadow-md); border-color: var(--brand); text-decoration: none; }
.stat-card.highlight { background: var(--navy); color: #fff; border-color: var(--navy); }
.stat-num { display: block; font-size: 2rem; font-weight: 800; color: var(--navy); }
.stat-card.highlight .stat-num { color: #fff; }
.stat-label { color: var(--ink-soft); font-size: .85rem; }
.stat-card.highlight .stat-label { color: #b9c6da; }

.data-table { width: 100%; border-collapse: collapse; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; margin-bottom: 24px; }
.data-table th, .data-table td { text-align: left; padding: 12px 14px; border-bottom: 1px solid var(--line); font-size: .92rem; }
.data-table th { background: var(--bg); color: var(--ink-soft); font-weight: 600; font-size: .78rem; text-transform: uppercase; letter-spacing: .03em; }
.data-table tr:last-child td { border-bottom: none; }
.row-actions a, .row-actions button { margin-right: 12px; }
.link-danger { background: none; border: none; color: var(--danger); cursor: pointer; font-size: .92rem; padding: 0; }
.link-danger:hover { text-decoration: underline; }

.status { font-size: .78rem; font-weight: 600; padding: 3px 10px; border-radius: 6px; text-transform: capitalize; }
.status-new { background: var(--brand-050); color: var(--brand-dark); }
.status-reviewed { background: #fef7e6; color: #92600a; }
.status-shortlisted { background: var(--success-bg); color: var(--success); }
.status-rejected { background: var(--danger-bg); color: var(--danger); }
.status-hired { background: #ecebff; color: #4338ca; }

.filter-bar { display: flex; gap: 12px; margin-bottom: 20px; }
.filter-bar select { padding: 8px 12px; border: 1px solid var(--line); border-radius: var(--radius-sm); }

.detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin: 20px 0; }
.detail-block { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; box-shadow: var(--shadow-sm); }
.detail-block.full { grid-column: 1 / -1; margin-bottom: 16px; }
.detail-block h3 { margin: 0 0 12px; font-size: 1rem; }
.detail-block dl { display: grid; grid-template-columns: 140px 1fr; gap: 6px 12px; margin: 0; }
.detail-block dt { color: var(--ink-soft); font-size: .88rem; }
.detail-block dd { margin: 0; font-size: .92rem; }
.status-form select { padding: 8px 12px; border: 1px solid var(--line); border-radius: var(--radius-sm); }
.muted { color: var(--muted); }

.file-list { list-style: none; padding: 0; margin: 0; }
.file-list li { padding: 8px 0; border-bottom: 1px solid var(--line); display: flex; gap: 10px; align-items: center; }
.file-type { background: var(--bg); font-size: .78rem; padding: 2px 8px; border-radius: 4px; color: var(--ink-soft); min-width: 130px; }

/* ---------- Candidate accounts ---------- */
.alert-info { background: var(--brand-050); color: var(--brand-dark); border: 1px solid var(--brand-100); }
.alert-info a { color: var(--brand-dark); font-weight: 600; }
.flash { margin-top: 20px; }

.auth-wrap { max-width: 460px; margin: 40px auto; background: var(--card); padding: 32px; border-radius: var(--radius); box-shadow: var(--shadow); border: 1px solid var(--line); }
.auth-wrap h1 { margin-top: 0; }
.auth-sub { color: var(--ink-soft); margin-top: -4px; }
.auth-form label { display: block; margin-bottom: 14px; font-weight: 600; font-size: .9rem; }
.auth-form input { display: block; width: 100%; margin-top: 6px; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--radius-sm); font: inherit; }
.auth-form input:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-050); }
.auth-form .btn { margin-top: 6px; }
.auth-alt { text-align: center; margin-top: 18px; color: var(--ink-soft); font-size: .9rem; }
.btn-block { display: block; width: 100%; }

/* Saved-document rows (profile + apply) */
.doc-field { display: flex; flex-direction: column; gap: 6px; }
.doc-row { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 14px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.doc-label { flex: 1 1 320px; font-weight: 600; font-size: .9rem; }
.doc-current { display: flex; align-items: center; gap: 12px; }
.doc-saved { list-style: none; margin: 4px 0 0; padding: 0; display: flex; flex-direction: column; gap: 8px; flex: 1 1 280px; }
.doc-saved li { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.doc-chip { background: var(--success-bg); color: var(--success); font-size: .82rem; font-weight: 600; padding: 3px 10px; border-radius: 6px; }
.checkbox-inline { display: inline-flex; align-items: center; gap: 6px; font-weight: 400; font-size: .85rem; color: var(--ink-soft); }
.reuse-line { margin-top: 2px; }

/* Application history status pills */
.app-history { display: flex; flex-direction: column; gap: 14px; margin-bottom: 24px; }
.tag-status { text-transform: capitalize; }

/* ---------- Listing meta + pagination ---------- */
.list-head { display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: 8px; }
.list-head-meta { display: flex; align-items: center; gap: 14px; font-size: .85rem; color: var(--ink-soft); }
.list-range { color: var(--muted); }
.clear-filters { font-weight: 600; }
.clear-filters:hover { text-decoration: underline; }

.pager {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: center;
  gap: 6px; margin: 28px 0 8px;
}
.pager-btn, .pager-num {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 40px; height: 40px; padding: 0 12px;
  border: 1px solid var(--line-strong); border-radius: var(--radius-sm);
  background: var(--card); color: var(--navy); font-weight: 600; font-size: .9rem;
  transition: background .15s, border-color .15s, color .15s;
}
.pager-num:hover, .pager-btn:hover { border-color: var(--brand); color: var(--brand); background: var(--brand-050); }
.pager-num.is-current {
  background: var(--brand); border-color: var(--brand); color: #fff; cursor: default;
}
.pager-btn.is-disabled { opacity: .45; pointer-events: none; color: var(--muted); }
.pager-gap { min-width: 24px; text-align: center; color: var(--muted); }

/* ---------- Motion ---------- */
@keyframes fadeUp { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.reveal { animation: fadeUp .4s ease both; animation-delay: calc(var(--i, 0) * 45ms); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
}

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  .hero h1 { font-size: 2.1rem; }
}
@media (max-width: 720px) {
  .grid-2, .grid-3, .detail-grid { grid-template-columns: 1fr; }
  .stat-grid { grid-template-columns: 1fr 1fr; }
  .job-card { flex-wrap: wrap; }
  .job-card-side { align-items: flex-start; width: 100%; flex-direction: row; justify-content: space-between; }
  .footer-grid { grid-template-columns: 1fr; gap: 24px; }
  .header-inner { height: 60px; }
  .side-nav { width: 82vw; max-width: 300px; }
  .hero-stats { gap: 0; }
  .hero-stats div { padding: 0 16px; }
  .admin-header-inner { height: auto; flex-direction: column; padding: 12px 20px; gap: 8px; }
}
@media (max-width: 480px) {
  .pager-num { min-width: 36px; height: 36px; padding: 0 8px; }
  .hero-stats div { padding: 0 12px; }
  .hero-stats strong { font-size: 1.2rem; }
}

/* ==========================================================================
   Docked sidebar (desktop) — always on screen, collapses to an icon rail.
   Below the breakpoint it stays the original overlay drawer.
   State lives in html[data-sidebar] + localStorage (see includes/header.php).
   Everything is scoped to body.has-side-nav so admin pages (admin-header.php,
   no sidebar) are never shifted.
   ========================================================================== */
:root {
  --side-w: 264px;        /* expanded */
  --side-w-rail: 72px;    /* collapsed icon rail */
  --side-ease: .22s cubic-bezier(.4, 0, .2, 1);
}

/* Collapse button is desktop-only; the drawer uses the × close instead */
.side-collapse {
  display: none; border: 0; background: none; cursor: pointer; color: var(--muted);
  width: 32px; height: 32px; border-radius: 8px; padding: 0;
  align-items: center; justify-content: center; flex: 0 0 auto;
  transition: background .16s, color .16s;
}
.side-collapse:hover { background: var(--bg); color: var(--navy); }
.side-collapse:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }

@media (min-width: 1024px) {
  /* --- Docked, always visible --- */
  .side-nav {
    transform: none;
    box-shadow: none;
    width: var(--side-w);
    transition: width var(--side-ease);
  }
  body.has-side-nav { padding-left: var(--side-w); transition: padding-left var(--side-ease); }

  /* Drawer chrome is redundant once docked; the sidebar carries the brand */
  .side-backdrop,
  .side-close,
  body.has-side-nav > .site-header { display: none; }

  .side-collapse { display: inline-flex; }

  /* --- Collapsed: icon rail --- */
  html[data-sidebar="collapsed"] body.has-side-nav { padding-left: var(--side-w-rail); }
  html[data-sidebar="collapsed"] .side-nav { width: var(--side-w-rail); padding-left: 10px; padding-right: 10px; }

  html[data-sidebar="collapsed"] .side-label,
  html[data-sidebar="collapsed"] .brand-name,
  html[data-sidebar="collapsed"] .side-user-meta { display: none; }

  /* Logo above the toggle so both stay reachable in the rail */
  html[data-sidebar="collapsed"] .side-nav-top { flex-direction: column; gap: 10px; padding: 6px 0 14px; }
  html[data-sidebar="collapsed"] .brand,
  html[data-sidebar="collapsed"] .side-link,
  html[data-sidebar="collapsed"] .side-user { justify-content: center; }
  html[data-sidebar="collapsed"] .side-link { padding-left: 0; padding-right: 0; }
  html[data-sidebar="collapsed"] .side-user { padding-left: 0; padding-right: 0; gap: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .side-nav, body.has-side-nav { transition: none; }
}
