:root {
  --navy: #1C2D5E;
  --navy-600: #24386F;
  --navy-500: #2A4278;
  --navy-400: #3D5A9A;
  --navy-100: #E8ECF5;
  --navy-50: #F4F6FA;
  --ink: #12182B;
  --muted: #5B6478;
  --line: #D7DDE8;
  --white: #ffffff;
  --gold: #C9A227;
  --gold-dark: #A7861C;
  --teal: #2A9D8F;
  --danger: #B42318;
  --danger-bg: #FEF3F2;
  --ok: #067647;
  --ok-bg: #ECFDF3;
  --warn: #B54708;
  --warn-bg: #FFFAEB;
  --info-bg: #EEF4FF;
  --shadow: 0 12px 40px rgba(28, 45, 94, 0.12);
  --radius: 16px;
  --header-h: 72px;
  --sidebar: 260px;
  --font: Inter, system-ui, -apple-system, Segoe UI, sans-serif;
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--white);
  line-height: 1.55;
  min-height: 100vh;
}
img { max-width: 100%; display: block; }
a { color: var(--navy); text-decoration: none; }
a:hover { color: var(--gold-dark); }
h1, h2, h3 { font-weight: 700; letter-spacing: -0.02em; line-height: 1.2; color: var(--navy); }
.container { width: min(1120px, calc(100% - 32px)); margin-inline: auto; }
.sr-only, .hp { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.skip-link {
  position: absolute; left: 12px; top: -40px; background: var(--gold); color: var(--navy); padding: 8px 12px; z-index: 100;
}
.skip-link:focus { top: 12px; }
.site-header {
  position: sticky; top: 0; z-index: 40;
  background: rgba(28, 45, 94, 0.96);
  backdrop-filter: blur(10px);
  color: var(--white);
  height: var(--header-h);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; height: var(--header-h); }
.brand { display: flex; align-items: center; gap: 10px; color: #fff; font-weight: 700; }
.brand img { width: 40px; height: 40px; object-fit: contain; background: #fff; border-radius: 10px; padding: 4px; }
.brand:hover { color: var(--gold); }
.nav { display: flex; gap: 18px; align-items: center; }
.nav a { color: #E8ECF5; font-weight: 500; font-size: 0.95rem; }
.nav a.is-active, .nav a:hover { color: var(--gold); }
.nav-toggle {
  display: none; background: none; border: 0; width: 42px; height: 42px; cursor: pointer;
}
.nav-toggle span { display: block; height: 2px; background: #fff; margin: 7px 8px; transition: transform .25s; }
.mobile-nav {
  display: none; flex-direction: column; background: var(--navy-600); padding: 12px 16px 20px;
}
.mobile-nav a { color: #fff; padding: 10px 0; border-bottom: 1px solid rgba(255,255,255,.08); }
.hero {
  position: relative; overflow: hidden;
  background: linear-gradient(135deg, #121E40 0%, var(--navy) 55%, #2A4278 100%);
  color: #fff; padding: 72px 0 88px;
}
.hero-bg {
  position: absolute; inset: 0;
  background:
    radial-gradient(circle at 80% 10%, rgba(201,162,39,.25), transparent 40%),
    radial-gradient(circle at 10% 80%, rgba(42,157,143,.18), transparent 35%);
  pointer-events: none;
}
.hero-inner { position: relative; }
.hero-logo { width: 72px; height: 72px; object-fit: contain; background: #fff; border-radius: 16px; padding: 8px; margin-bottom: 18px; }
.eyebrow { text-transform: uppercase; letter-spacing: .14em; font-size: .75rem; font-weight: 700; color: var(--gold); margin: 0 0 8px; }
.hero h1 { color: #fff; font-size: clamp(1.8rem, 4vw, 3rem); max-width: 18ch; margin: 0 0 16px; }
.hero-lead { max-width: 58ch; color: #D7DDE8; margin: 0 0 28px; }
.search-bar {
  display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr auto; gap: 8px;
  background: rgba(255,255,255,.08); padding: 10px; border-radius: 14px; border: 1px solid rgba(255,255,255,.12);
}
.search-bar input, .search-bar select {
  border: 0; border-radius: 10px; padding: 12px 14px; font: inherit; background: #fff; color: var(--ink);
}
.section { padding: 72px 0; }
.section-muted { background: var(--navy-50); }
.section-head { margin-bottom: 32px; }
.section-head h2 { margin: 0 0 8px; font-size: 1.8rem; }
.process-grid { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; counter-reset: step; }
.process-card { padding: 22px; min-height: 180px; }
.step-num { display: inline-block; font-weight: 800; color: var(--gold); font-size: 1.1rem; margin-bottom: 8px; }
.jobs-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: 0 8px 24px rgba(28,45,94,.05);
  transition: transform .25s ease, box-shadow .25s ease;
}
.job-card, .process-card { padding: 22px; }
.job-card:hover, .process-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.job-card-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.job-card h3 { margin: 0 0 10px; font-size: 1.15rem; }
.chip {
  background: var(--navy-100); color: var(--navy); font-size: .75rem; font-weight: 600;
  padding: 4px 10px; border-radius: 999px;
}
.meta-list { display: flex; flex-wrap: wrap; gap: 8px 14px; padding: 0; margin: 0 0 16px; list-style: none; color: var(--muted); font-size: .92rem; }
.meta-list li::before { content: "• "; color: var(--gold); }
.muted { color: var(--muted); }
.hint { margin-top: 24px; color: var(--muted); }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 0; border-radius: 10px; padding: 11px 18px; font: inherit; font-weight: 600;
  cursor: pointer; position: relative; overflow: hidden;
  transition: transform .15s ease, background .2s, box-shadow .2s;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn-primary { background: var(--navy); color: #fff; }
.btn-primary:hover { background: var(--navy-500); color: #fff; }
.btn-accent { background: var(--gold); color: var(--navy); }
.btn-accent:hover { background: var(--gold-dark); color: #fff; }
.btn-ghost { background: transparent; color: inherit; border: 1px solid currentColor; }
.nav .btn-ghost { color: #fff; border-color: rgba(255,255,255,.35); }
.btn-danger { background: var(--danger); color: #fff; }
.btn-sm { padding: 7px 12px; font-size: .85rem; }
.btn-block { width: 100%; }
.btn-spinner {
  width: 16px; height: 16px; border: 2px solid rgba(255,255,255,.4); border-top-color: #fff;
  border-radius: 50%; animation: spin .7s linear infinite;
}
.btn[disabled] { opacity: .6; cursor: not-allowed; transform: none; }
.site-footer { background: var(--navy); color: #D7DDE8; padding: 36px 0; }
.footer-inner { display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.footer-brand { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.footer-brand img { width: 36px; height: 36px; background: #fff; border-radius: 8px; padding: 4px; }
.footer-brand strong { color: #fff; width: 100%; }
.footer-brand p { margin: 0; width: 100%; }
.footer-contact { display: flex; flex-direction: column; gap: 6px; }
.footer-contact a { color: var(--gold); }
.job-hero { background: var(--navy); color: #fff; padding: 40px 0 48px; }
.job-hero h1 { color: #fff; }
.back-link { color: var(--gold); display: inline-block; margin-bottom: 12px; }
.job-layout { display: grid; grid-template-columns: 1.3fr .9fr; gap: 24px; align-items: start; }
.prose, .apply-panel { padding: 28px; }
.prose h2 { font-size: 1.2rem; }
.apply-panel { position: sticky; top: 88px; }
label { display: block; font-weight: 600; font-size: .88rem; margin: 0 0 12px; }
input, select, textarea {
  width: 100%; margin-top: 6px; padding: 11px 12px; border: 1px solid var(--line); border-radius: 10px;
  font: inherit; background: #fff; color: var(--ink);
}
input:focus, select:focus, textarea:focus { outline: 2px solid var(--navy-400); border-color: var(--navy); }
input.is-autofill { background: #FFF9E8; box-shadow: inset 0 0 0 1px var(--gold); }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 4px 12px; }
.form-error { color: var(--danger); font-weight: 600; }
.banner { padding: 12px 14px; border-radius: 10px; margin: 0 0 16px; }
.banner-error { background: var(--danger-bg); color: var(--danger); }
.banner-ok { background: var(--ok-bg); color: var(--ok); }
.banner-warn { background: var(--warn-bg); color: var(--warn); }
.banner-info { background: var(--info-bg); color: var(--navy); }
.empty-state { text-align: center; padding: 48px 16px; color: var(--muted); }
.login-body { min-height: 100vh; display: grid; place-items: center; background: linear-gradient(160deg, #121E40, var(--navy) 50%, #24386F); }
.login-card { width: min(420px, calc(100% - 32px)); padding: 36px; text-align: center; }
.login-card img { margin: 0 auto 12px; background: var(--navy-50); border-radius: 12px; padding: 8px; }
.login-card form { text-align: left; margin-top: 16px; }
.success-page { min-height: 60vh; display: grid; place-items: center; }
.success-card { text-align: center; padding: 48px 32px; max-width: 480px; margin: 0 auto; }
.success-ring { fill: none; stroke: var(--teal); stroke-width: 3; stroke-dasharray: 200; stroke-dashoffset: 200; animation: draw .7s ease forwards; }
.success-tick { fill: none; stroke: var(--teal); stroke-width: 3.5; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 60; stroke-dashoffset: 60; animation: draw .5s .45s ease forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes spin { to { transform: rotate(360deg); } }
.reveal { opacity: 0; transform: translateY(16px); animation: fadeUp .7s ease forwards; }
.delay-1 { animation-delay: .1s; } .delay-2 { animation-delay: .2s; }
.delay-3 { animation-delay: .3s; } .delay-4 { animation-delay: .4s; }
@keyframes fadeUp { to { opacity: 1; transform: none; } }
.js-reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s ease; }
.js-reveal.is-in { opacity: 1; transform: none; }

.admin-body { display: flex; min-height: 100vh; background: var(--navy-50); }
.sidebar {
  width: var(--sidebar); background: var(--navy); color: #fff; padding: 20px 16px;
  display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh;
}
.sidebar-brand { display: flex; gap: 10px; align-items: center; margin-bottom: 24px; }
.sidebar-brand img { width: 40px; height: 40px; background: #fff; border-radius: 10px; padding: 4px; }
.sidebar-brand span { display: block; font-size: .8rem; color: #C9D0E3; }
.sidebar-nav { display: flex; flex-direction: column; gap: 4px; flex: 1; }
.sidebar-nav a { color: #D7DDE8; padding: 10px 12px; border-radius: 10px; font-weight: 500; }
.sidebar-nav a.is-active, .sidebar-nav a:hover { background: rgba(255,255,255,.1); color: var(--gold); }
.sidebar-user { border-top: 1px solid rgba(255,255,255,.1); padding-top: 14px; font-size: .9rem; }
.sidebar-user small { display: block; color: #C9D0E3; margin-bottom: 8px; }
.admin-wrap { flex: 1; min-width: 0; }
.admin-top {
  display: flex; align-items: center; gap: 12px; padding: 16px 24px; background: #fff;
  border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 20;
}
.admin-top h1 { margin: 0; font-size: 1.25rem; flex: 1; }
.admin-main { padding: 24px; }
.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 20px; }
.stat-card { padding: 20px; }
.stat-card p { margin: 0; color: var(--muted); font-weight: 600; }
.stat-card strong { font-size: 2rem; color: var(--navy); display: block; margin-top: 6px; }
.dash-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.dash-grid .card, .table-wrap.card, .card { padding: 18px; }
.bar-chart { display: flex; align-items: flex-end; gap: 10px; min-height: 180px; padding-top: 8px; }
.bar-col { flex: 1; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 6px; min-width: 0; }
.bar-col .bar {
  width: 100%; max-width: 42px; background: linear-gradient(180deg, var(--gold), var(--navy));
  border-radius: 8px 8px 2px 2px; transform-origin: bottom; animation: grow .7s ease;
}
.bar-col span { font-size: .7rem; color: var(--muted); text-align: center; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; width: 100%; }
@keyframes grow { from { transform: scaleY(0); } }
.table { width: 100%; border-collapse: collapse; font-size: .92rem; }
.table th, .table td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
.table th { color: var(--muted); font-size: .78rem; text-transform: uppercase; letter-spacing: .04em; }
.status-pill { display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: .75rem; font-weight: 700; background: var(--navy-100); color: var(--navy); }
.status-new { background: #EEF4FF; }
.status-shortlisted { background: #FEF7E6; color: #8A6D12; }
.status-interview { background: #E7F6F3; color: #0F6B61; }
.status-rejected { background: var(--danger-bg); color: var(--danger); }
.status-hired { background: var(--ok-bg); color: var(--ok); }
.status-active { background: var(--ok-bg); color: var(--ok); }
.status-draft { background: #F2F4F7; color: #475467; }
.status-closed { background: var(--danger-bg); color: var(--danger); }
.toolbar { display: flex; flex-wrap: wrap; gap: 10px; justify-content: space-between; margin-bottom: 16px; align-items: center; }
.toolbar-search { display: flex; flex-wrap: wrap; gap: 8px; }
.toolbar-search input, .toolbar-search select { width: auto; min-width: 160px; margin: 0; }
.pager { display: flex; gap: 8px; justify-content: flex-end; margin-top: 12px; }
.tabs { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 12px; margin-bottom: 8px; }
.tab {
  border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: 8px 14px;
  cursor: pointer; white-space: nowrap; font: inherit; font-weight: 600; color: var(--navy);
}
.tab.is-active { background: var(--navy); color: #fff; border-color: var(--navy); }
dialog.modal { border: 0; border-radius: 18px; padding: 0; width: min(720px, 94vw); box-shadow: var(--shadow); }
dialog.modal::backdrop { background: rgba(18, 24, 43, .55); }
.modal-inner { padding: 24px; }
.modal-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 16px; flex-wrap: wrap; }
.modal-actions-col { display: flex; flex-direction: column; gap: 12px; }
.modal-danger h2 { color: var(--danger); }
.job-block { border: 1px dashed var(--line); border-radius: 12px; padding: 14px; margin-bottom: 12px; background: var(--navy-50); }
.settings-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.span-2 { grid-column: 1 / -1; }
.form-narrow { max-width: 480px; }
.detail-list { display: grid; grid-template-columns: 140px 1fr; gap: 8px 12px; }
.detail-list dt { color: var(--muted); font-weight: 600; }
.logo-preview img { width: 64px; height: 64px; object-fit: contain; background: var(--navy-50); border-radius: 8px; }
.stage-row { display: grid; grid-template-columns: 1fr 2fr auto; gap: 8px; margin-bottom: 8px; align-items: start; }
.skeleton { background: linear-gradient(90deg, #eef1f6 25%, #f7f8fb 37%, #eef1f6 63%); background-size: 400% 100%; animation: shimmer 1.2s ease infinite; border-radius: 8px; height: 14px; }
@keyframes shimmer { 0% { background-position: 100% 0; } 100% { background-position: 0 0; } }

@media (max-width: 960px) {
  .search-bar, .process-grid, .jobs-grid, .job-layout, .stat-grid, .dash-grid, .settings-grid, .form-grid, .stage-row {
    grid-template-columns: 1fr 1fr;
  }
  .search-bar { grid-template-columns: 1fr 1fr; }
  .nav { display: none; }
  .nav-toggle { display: block; }
  .mobile-nav.is-open { display: flex; }
  .apply-panel { position: static; }
  .sidebar { position: fixed; left: 0; top: 0; transform: translateX(-105%); transition: transform .25s ease; z-index: 50; }
  .sidebar.is-open { transform: none; }
}
@media (max-width: 640px) {
  .process-grid, .jobs-grid, .stat-grid, .dash-grid, .settings-grid, .form-grid, .detail-list, .stage-row, .search-bar {
    grid-template-columns: 1fr;
  }
  .hero { padding: 48px 0 56px; }
}
