/* ============================================================
   LUMEN ADMIN — Clean, minimal, focused
   ============================================================ */
:root {
  --abg: #F7F6F2;
  --apanel: #FFFFFF;
  --aink: #0A0A0A;
  --asub: #6B6B66;
  --arule: #E8E6E1;
  --arule-soft: #F0EEE8;
  --aaccent: #FF4D2E;
  --asuccess: #16794D;
  --asans: 'DM Sans', system-ui, sans-serif;
  --adisplay: 'Instrument Serif', Georgia, serif;
  --amono: 'JetBrains Mono', ui-monospace, monospace;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: var(--asans); background: var(--abg); color: var(--aink); -webkit-font-smoothing: antialiased; }

a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; border: none; background: none; color: inherit; }
img { max-width: 100%; display: block; }

/* ─── Login ─── */
.login-shell {
  min-height: 100vh;
  display: grid; place-items: center;
  padding: 2rem; background:
    radial-gradient(circle at 20% 10%, rgba(255,77,46,.07) 0, transparent 50%),
    radial-gradient(circle at 80% 90%, rgba(255,77,46,.05) 0, transparent 50%),
    var(--abg);
}
.login-card {
  width: 100%; max-width: 420px;
  background: var(--apanel); border: 1px solid var(--arule);
  border-radius: 18px; padding: 2.5rem;
}
.login-card .brand { font-family: var(--adisplay); font-size: 2rem; line-height: 1; margin-bottom: .25rem; }
.login-card .brand .dot { color: var(--aaccent); }
.login-card .lead { color: var(--asub); font-size: .9rem; margin-bottom: 2rem; }

/* ─── Layout ─── */
.admin-layout { display: grid; grid-template-columns: 240px 1fr; min-height: 100vh; }
@media (max-width: 880px) { .admin-layout { grid-template-columns: 1fr; } }

.sidebar {
  background: var(--apanel); border-right: 1px solid var(--arule);
  padding: 1.5rem 1rem; display: flex; flex-direction: column;
  position: sticky; top: 0; height: 100vh; overflow-y: auto;
}
@media (max-width: 880px) {
  .sidebar { position: static; height: auto; border-right: 0; border-bottom: 1px solid var(--arule); }
}
.sidebar .brand { font-family: var(--adisplay); font-size: 1.5rem; padding: .5rem 1rem 1.5rem; }
.sidebar .brand .dot { color: var(--aaccent); }
.sidebar nav { display: flex; flex-direction: column; gap: .15rem; flex: 1; }
.sidebar nav a {
  padding: .65rem 1rem; border-radius: 8px; font-size: .9rem;
  color: var(--asub); display: flex; align-items: center; gap: .65rem;
  transition: background .15s, color .15s;
}
.sidebar nav a:hover { background: var(--arule-soft); color: var(--aink); }
.sidebar nav a.active { background: var(--aink); color: #fff; }
.sidebar .user {
  margin-top: 1.5rem; padding: 1rem; border-top: 1px solid var(--arule);
  font-size: .85rem; display: flex; align-items: center; justify-content: space-between;
}
.sidebar .user .who { line-height: 1.3; }
.sidebar .user .who small { color: var(--asub); }
.sidebar .user a { color: var(--aaccent); font-size: .8rem; }

/* ─── Topbar + content ─── */
.main { padding: 2rem; max-width: 1280px; }
@media (max-width: 720px) { .main { padding: 1.25rem; } }
.topbar { display: flex; align-items: center; justify-content: space-between; margin-bottom: 2rem; gap: 1rem; flex-wrap: wrap; }
.topbar h1 { font-family: var(--adisplay); font-size: 2.25rem; line-height: 1; font-weight: 400; }
.topbar .subtitle { color: var(--asub); font-size: .9rem; margin-top: .25rem; }

/* ─── KPI cards ─── */
.kpi-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 1rem; margin-bottom: 2rem; }
.kpi {
  background: var(--apanel); border: 1px solid var(--arule); border-radius: 14px;
  padding: 1.25rem 1.5rem;
}
.kpi .label { font-family: var(--amono); font-size: .7rem; letter-spacing: .12em; text-transform: uppercase; color: var(--asub); }
.kpi .value { font-family: var(--adisplay); font-size: 2.5rem; line-height: 1.1; margin-top: .5rem; }
.kpi .delta { font-family: var(--amono); font-size: .75rem; color: var(--asub); margin-top: .25rem; }

/* ─── Tables ─── */
.panel { background: var(--apanel); border: 1px solid var(--arule); border-radius: 14px; overflow: hidden; margin-bottom: 1.5rem; }
.panel-head { padding: 1.25rem 1.5rem; border-bottom: 1px solid var(--arule); display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.panel-head h2 { font-family: var(--adisplay); font-size: 1.4rem; font-weight: 400; }

.table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.table th, .table td { padding: .85rem 1.25rem; text-align: left; border-bottom: 1px solid var(--arule-soft); }
.table th { font-family: var(--amono); font-size: .7rem; letter-spacing: .12em; text-transform: uppercase; color: var(--asub); font-weight: 500; background: #FBFAF7; }
.table tr:last-child td { border-bottom: 0; }
.table tr:hover td { background: #FBFAF7; }
.table .actions { display: flex; gap: .35rem; justify-content: flex-end; }

.empty-row td { padding: 3rem 1.5rem; text-align: center; color: var(--asub); }

/* ─── Buttons ─── */
.btn {
  display: inline-flex; align-items: center; gap: .4rem;
  padding: .55rem 1rem; border-radius: 8px; font-size: .85rem; font-weight: 500;
  border: 1px solid transparent; transition: all .2s; white-space: nowrap;
}
.btn-primary { background: var(--aink); color: #fff; }
.btn-primary:hover { background: var(--aaccent); }
.btn-outline { border-color: var(--arule); color: var(--aink); }
.btn-outline:hover { background: var(--arule-soft); }
.btn-danger { background: var(--aaccent); color: #fff; }
.btn-danger:hover { opacity: .9; }
.btn-icon { width: 32px; height: 32px; padding: 0; justify-content: center; border-radius: 8px; border: 1px solid var(--arule); }
.btn-icon:hover { background: var(--arule-soft); }
.btn-icon.danger:hover { background: #FBE9E7; color: var(--aaccent); border-color: var(--aaccent); }
.btn-sm { padding: .4rem .75rem; font-size: .8rem; }

/* ─── Forms ─── */
.aform { display: flex; flex-direction: column; gap: 1rem; }
.aform-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
@media (max-width: 720px) { .aform-grid { grid-template-columns: 1fr; } }
.field { display: flex; flex-direction: column; gap: .35rem; }
.field label { font-family: var(--amono); font-size: .7rem; letter-spacing: .1em; text-transform: uppercase; color: var(--asub); }
.field input, .field textarea, .field select {
  padding: .65rem .85rem; border: 1px solid var(--arule); border-radius: 8px;
  background: var(--abg); font: inherit; font-size: .9rem; color: var(--aink);
}
.field textarea { min-height: 110px; resize: vertical; font-family: inherit; line-height: 1.55; }
.field input:focus, .field textarea:focus, .field select:focus { outline: 2px solid var(--aink); outline-offset: -1px; }
.field .help { font-size: .75rem; color: var(--asub); }

.checkbox-row { display: flex; align-items: center; gap: .5rem; }
.checkbox-row input[type=checkbox] { width: 18px; height: 18px; cursor: pointer; }
.checkbox-row label { font-family: var(--asans); font-size: .9rem; text-transform: none; letter-spacing: 0; color: var(--aink); cursor: pointer; }

/* ─── Status pills ─── */
.pill { display: inline-flex; align-items: center; padding: .15rem .55rem; border-radius: 999px; font-family: var(--amono); font-size: .68rem; letter-spacing: .08em; text-transform: uppercase; border: 1px solid var(--arule); }
.pill.active   { background: #DCEAE3; color: var(--asuccess); border-color: var(--asuccess); }
.pill.inactive { background: var(--arule-soft); color: var(--asub); }
.pill.featured { background: var(--aaccent); color: #fff; border-color: var(--aaccent); }
.pill.new        { background: #E5EDFF; color: #2563EB; border-color: #2563EB; }
.pill.reviewed   { background: #FFE9E2; color: #B8500A; border-color: #B8500A; }
.pill.shortlisted{ background: #FFE9E2; color: var(--aaccent); border-color: var(--aaccent); }
.pill.rejected   { background: var(--arule-soft); color: var(--asub); }
.pill.hired      { background: #DCEAE3; color: var(--asuccess); border-color: var(--asuccess); }
.pill.pending    { background: #FFF6DC; color: #9A6B00; border-color: #9A6B00; }
.pill.approved   { background: #DCEAE3; color: var(--asuccess); border-color: var(--asuccess); }
.pill.suspended  { background: var(--arule-soft); color: var(--asub); }
.pill.expired    { background: var(--arule-soft); color: var(--asub); }
.pill.scheduled  { background: #E5EDFF; color: #2563EB; border-color: #2563EB; }
.pill.completed  { background: #DCEAE3; color: var(--asuccess); border-color: var(--asuccess); }
.pill.cancelled  { background: var(--arule-soft); color: var(--asub); }
.pill.rescheduled{ background: #FFE9E2; color: #B8500A; border-color: #B8500A; }

/* ─── Errors / flash ─── */
.alert { padding: .85rem 1.25rem; border-radius: 10px; margin-bottom: 1rem; font-size: .9rem; }
.alert.error   { background: #FBE9E7; color: var(--aaccent); border: 1px solid var(--aaccent); }
.alert.success { background: #DCEAE3; color: var(--asuccess); border: 1px solid var(--asuccess); }

.flash-stack-admin { position: fixed; top: 1.5rem; right: 1.5rem; z-index: 80; display: flex; flex-direction: column; gap: .5rem; max-width: 360px; }
.flash-admin {
  padding: .75rem 1rem; border-radius: 8px; background: var(--aink); color: #fff;
  font-size: .85rem; box-shadow: 0 8px 24px rgba(0,0,0,.12);
  animation: slideIn .4s ease, fadeOut .4s ease 4.5s forwards;
}
.flash-admin.success { background: var(--asuccess); }
.flash-admin.error { background: var(--aaccent); }
@keyframes slideIn { from { transform: translateX(120%); } to { transform: translateX(0); } }
@keyframes fadeOut { to { opacity: 0; transform: translateX(20px); } }

/* ─── Filter bar ─── */
.filter-bar { display: flex; gap: .5rem; padding: 1rem 1.5rem; border-bottom: 1px solid var(--arule); flex-wrap: wrap; align-items: center; background: #FBFAF7; }
.filter-bar select, .filter-bar input { padding: .45rem .65rem; border: 1px solid var(--arule); border-radius: 8px; background: var(--apanel); font-size: .85rem; }

/* ─── Misc ─── */
.muted { color: var(--asub); }
.text-right { text-align: right; }
.flex-between { display: flex; justify-content: space-between; align-items: center; gap: 1rem; }

/* ─── ATS scores ─── */
.ats-rank { font-family: var(--amono); font-size: .85rem; color: var(--asub); text-align: center; }
.ats-rank-top { color: var(--aaccent); font-weight: 600; font-size: 1rem; }

.ats-score-cell { font-family: var(--adisplay); font-size: 1.6rem; line-height: 1; }
.ats-bar { width: 90px; height: 5px; background: var(--arule-soft); border-radius: 999px; overflow: hidden; margin-top: .3rem; display: block; }
.ats-bar span { display: block; height: 100%; border-radius: 999px; transition: width .3s ease; }

.ats-score-big {
  border-radius: 14px; padding: 1.25rem; text-align: center; line-height: 1;
}
.ats-score-big span { font-family: var(--adisplay); font-size: 3.4rem; display: block; }
.ats-score-big small {
  font-family: var(--amono); font-size: .68rem; letter-spacing: .14em;
  text-transform: uppercase; display: block; margin-top: .5rem;
}

.ats-meta { margin-top: 1.25rem; font-size: .82rem; }
.ats-meta dt { font-family: var(--amono); font-size: .65rem; letter-spacing: .1em; text-transform: uppercase; color: var(--asub); margin-top: .8rem; }
.ats-meta dd { margin-top: .15rem; }

.ats-h3 { font-family: var(--amono); font-size: .7rem; letter-spacing: .12em; text-transform: uppercase; color: var(--asub); font-weight: 500; }
.ats-ul { margin: .6rem 0 0 1.1rem; line-height: 1.65; font-size: .88rem; }
.ats-ul li { margin-bottom: .35rem; }
.ats-ul-gap li::marker { color: var(--aaccent); }

.ats-chip {
  display: inline-flex; align-items: center; padding: .2rem .6rem; border-radius: 999px;
  font-size: .75rem; border: 1px solid var(--arule);
}
.ats-chip-yes { background: #DCEAE3; color: var(--asuccess); border-color: #B6D6C6; }
.ats-chip-no  { background: var(--arule-soft); color: var(--asub); text-decoration: line-through; }

@media (max-width: 900px) {
  .ats-score-big span { font-size: 2.6rem; }
}
