:root {
  --ink: #15233b;
  --ink-soft: #3a4a63;
  --muted: #6b7686;
  --line: #e4e7ec;
  --bg: #f6f7f9;
  --surface: #ffffff;
  --primary: #1f3a8a;
  --primary-700: #16306f;
  --accent: #0f766e;
  --danger: #b42318;
  --radius: 10px;
  --shadow: 0 1px 2px rgba(16,24,40,.05), 0 1px 3px rgba(16,24,40,.04);
  --font-display: "Sora", system-ui, sans-serif;
  --font-body: "Public Sans", system-ui, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--bg);
  font-size: 14px;
  line-height: 1.5;
}
h1, h2, h3, strong, .strong { font-family: var(--font-display); }
h1 { font-size: 1.4rem; margin: 0; font-weight: 700; }
h3 { font-size: .98rem; margin: 0 0 .6rem; font-weight: 600; }
.muted { color: var(--muted); }
.small { font-size: .8rem; }
.center { text-align: center; }
.num { font-variant-numeric: tabular-nums; text-align: right; }
.danger { color: var(--danger); }
.link { color: var(--primary); text-decoration: none; font-weight: 600; }
.link:hover { text-decoration: underline; }
.spacer { flex: 1; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: .4rem;
  font-family: var(--font-body); font-size: .82rem; font-weight: 600;
  border: 1px solid var(--line); background: var(--surface); color: var(--ink-soft);
  padding: .45rem .85rem; border-radius: 8px; cursor: pointer;
  transition: background .15s, border-color .15s, color .15s, box-shadow .15s;
  white-space: nowrap; line-height: 1.4;
}
.btn:hover { border-color: #c9cfd8; background: #f0f3f8; color: var(--ink); }
.btn:active { transform: translateY(1px); }
.btn--primary {
  background: var(--primary); border-color: var(--primary); color: #fff;
  box-shadow: 0 1px 4px rgba(31,58,138,.25);
}
.btn--primary:hover { background: var(--primary-700); border-color: var(--primary-700); box-shadow: 0 2px 8px rgba(31,58,138,.35); color: #fff; }
.btn--ghost { background: transparent; border-color: transparent; }
.btn--block { width: 100%; padding: .65rem; font-size: .95rem; }
.icon-btn {
  border: none; background: transparent; cursor: pointer; font-size: 1rem;
  padding: .25rem .4rem; border-radius: 6px; color: var(--ink-soft);
}
.icon-btn:hover { background: #eef1f5; }
.icon-btn.danger { color: var(--danger); }
.badge {
  background: #eef2ff; color: var(--primary); font-size: .72rem; font-weight: 600;
  padding: .15rem .5rem; border-radius: 999px;
}

/* ---------- Login ---------- */
.login-page {
  min-height: 100vh; display: grid; place-items: center;
  background: radial-gradient(1200px 500px at 50% -10%, #eaf0ff 0%, var(--bg) 60%);
  padding: 1rem;
}
.login-card {
  width: 100%; max-width: 400px; background: var(--surface);
  border: 1px solid var(--line); border-radius: 16px; padding: 2rem;
  box-shadow: 0 10px 40px rgba(21,35,59,.08);
}
.brand { display: flex; align-items: center; gap: .8rem; margin-bottom: 1.5rem; }
.brand-mark {
  width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center;
  background: #fff; overflow: hidden; flex-shrink: 0; border: 1px solid var(--line);
}
.brand-mark img { width: 100%; height: 100%; object-fit: contain; padding: 3px; box-sizing: border-box; }
.brand-mark.sm { width: 34px; height: 34px; border-radius: 8px; }

.student-box { background: #f8fafc; border: 1px solid var(--line); border-radius: 12px; padding: 1rem; }
.btn--google { background: #fff; border: 1px solid var(--line); color: var(--ink); display: inline-flex; align-items: center; justify-content: center; gap: .5rem; font-weight: 600; }
.btn--google:hover { background: #f8fafc; border-color: #c9cfd8; }
.btn--google img { display: inline-block; }
.divider { display: flex; align-items: center; text-align: center; color: var(--muted); margin: 1.1rem 0; font-size: .72rem; text-transform: uppercase; letter-spacing: .05em; }
.divider::before, .divider::after { content: ""; flex: 1; border-bottom: 1px solid var(--line); }
.divider span { padding: 0 .7rem; }

.form-sec { margin: 1.1rem 0 .5rem; font-size: .82rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.doc-row { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 1.2rem; }
.doc-row > div { display: flex; flex-direction: column; gap: .4rem; align-items: flex-start; }
.doc-row strong { display: block; }
.doc-row .link { margin-left: .4rem; }
.save-bar { position: sticky; bottom: 0; display: flex; justify-content: flex-end; padding: .8rem 0; background: linear-gradient(to top, var(--bg) 60%, transparent); }
@media (max-width: 640px) { .doc-row { grid-template-columns: 1fr; } }

.lock-tag { font-size: .68rem; color: var(--muted); border: 1px solid var(--line); border-radius: 6px; padding: 0 .35rem; margin-left: .3rem; text-transform: uppercase; letter-spacing: .03em; }
.req-list { margin-top: .7rem; display: flex; flex-direction: column; gap: .4rem; }
.req-item { background: #f8fafc; border: 1px solid var(--line); border-radius: 8px; padding: .5rem .7rem; font-size: .9rem; }
.req-row { display: flex; justify-content: space-between; align-items: center; gap: 1rem; }
.req-actions { display: flex; gap: .5rem; flex-shrink: 0; }
@media (max-width: 640px) { .req-row { flex-direction: column; align-items: flex-start; } }

/* Placement drives */
.drives-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: .6rem; }
.drive-card { border: 1px solid var(--line); border-radius: 12px; padding: 1rem; margin-bottom: .9rem; background: #fff; }
.drive-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; margin-bottom: .8rem; }
.badge { font-size: .72rem; font-weight: 600; padding: .2rem .55rem; border-radius: 999px; white-space: nowrap; }
.badge--green { background: #e7f6ec; color: #1a7f43; }
.badge--red   { background: #fdeaea; color: #c0392b; }
.badge--blue  { background: #e8f0fe; color: #1d4ed8; }
.badge--grey  { background: #eef1f5; color: #5b6573; }

.timeline { position: relative; margin-left: .4rem; }
.tl-step { position: relative; padding: 0 0 .9rem 1.6rem; }
.tl-step:not(:last-child)::before { content: ""; position: absolute; left: .42rem; top: 1.1rem; bottom: -.1rem; width: 2px; background: var(--line); }
.tl-dot { position: absolute; left: 0; top: 0; width: 1rem; height: 1rem; border-radius: 50%; display: grid; place-items: center; font-size: .7rem; line-height: 1; background: #eef1f5; color: #5b6573; border: 1px solid var(--line); }
.tl-step--cleared .tl-dot     { background: #e7f6ec; color: #1a7f43; border-color: #bfe6cd; }
.tl-step--rejected .tl-dot    { background: #fdeaea; color: #c0392b; border-color: #f3c0bc; }
.tl-step--in_progress .tl-dot { background: #fff5e6; color: #b9770e; border-color: #f0d9ab; }
.tl-name { font-weight: 600; font-size: .92rem; }
.tl-body { display: flex; flex-direction: column; gap: .25rem; }
.round-status { max-width: 220px; }
.round-stat { font-size: .8rem; }
.round-stat--cleared { color: #1a7f43; }
.round-stat--rejected { color: #c0392b; }
.round-stat--in_progress { color: #b9770e; }
.round-stat--pending { color: var(--muted); }
.drive-actions { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: .6rem; }
.btn--ghost { background: transparent; border: 1px solid var(--line); color: var(--muted); }
.btn--ghost:hover { background: #f8fafc; }
.btn--ghost.danger,
.btn--outline-danger {
  background: transparent;
  border-color: #fca5a5;
  color: var(--danger);
}
.btn--ghost.danger:hover,
.btn--outline-danger:hover {
  background: #fef2f2;
  border-color: var(--danger);
  color: #991b1b;
}
.modal-sep { border: none; border-top: 1px solid var(--line); margin: 1.2rem 0; }

/* ============ Student app shell ============ */
body.app { display: flex; min-height: 100vh; background: var(--bg); }
.sidebar { width: 244px; flex-shrink: 0; background: var(--surface); border-right: 1px solid var(--line); display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; }
.side-brand { display: flex; align-items: center; gap: .65rem; padding: 1.15rem 1.2rem; border-bottom: 1px solid var(--line); }
.side-brand strong { font-family: var(--font-display); }
.block { display: block; }
.side-nav { display: flex; flex-direction: column; gap: .15rem; padding: .8rem; flex: 1; overflow-y: auto; }
.side-nav button { display: flex; align-items: center; gap: .7rem; width: 100%; padding: .62rem .8rem; border: none; background: transparent; border-radius: 9px; color: var(--ink-soft); font: inherit; font-weight: 500; cursor: pointer; text-align: left; transition: background .15s, color .15s; }
.side-nav button svg { width: 18px; height: 18px; flex-shrink: 0; opacity: .75; }
.side-nav button:hover { background: #f1f3f7; }
.side-nav button.active { background: #eef2fb; color: var(--primary); font-weight: 600; }
.side-nav button.active svg { opacity: 1; }
.side-foot { padding: 1rem 1.2rem; border-top: 1px solid var(--line); }

.app-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.app-topbar { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: .9rem 1.6rem; background: var(--surface); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 5; }
.app-topbar #page-title { font-family: var(--font-display); font-weight: 600; font-size: 1.15rem; }
.app-topbar .topbar-right { display: flex; align-items: center; gap: .7rem; }
.app-main #content { flex: 1; width: 100%; max-width: 940px; margin: 0 auto; padding: 1.6rem; }

.page { display: none; }
.page.active { display: block; animation: pagein .26s ease both; }
@keyframes pagein { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* Overview dashboard */
.hero { margin-bottom: 1.3rem; }
.hero h1 { font-family: var(--font-display); font-size: 1.55rem; margin: 0 0 .25rem; }
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(176px, 1fr)); gap: 1rem; margin-bottom: 1.3rem; }
.stat { position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 1.05rem 1.1rem 1.05rem 1.25rem; box-shadow: var(--shadow); overflow: hidden; }
.stat::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; }
.stat--blue::before { background: var(--primary); }
.stat--teal::before { background: var(--accent); }
.stat--amber::before { background: #c8860d; }
.stat--green::before { background: #1a7f43; }
.stat--purple::before { background: #6741d9; }
.stat--coral::before { background: #d8602f; }
.stat--red::before { background: var(--danger); }
.stat--grey::before { background: #6b7686; }
.stat--indigo::before { background: #4f5bb5; }

.pct-hero { display: flex; align-items: center; justify-content: space-between; gap: 1.6rem; flex-wrap: wrap; margin-bottom: 1.3rem; }
.pct-num { font-family: var(--font-display); font-size: 3rem; font-weight: 700; color: var(--primary); line-height: 1; }
.pct-num span { font-size: 1.4rem; margin-left: .1rem; }
.pct-bar-wrap { flex: 1; min-width: 220px; }
.pct-bar-wrap .bar { margin: 0 0 .5rem; }

.app--wide #content { max-width: 1240px; }
.data-table .num { white-space: nowrap; }
.data-table td.nowrap { white-space: nowrap; }
.trunc { display: inline-block; max-width: 180px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; vertical-align: bottom; }

.data-table.ov th, .data-table.ov td { padding: .5rem .6rem; }
.ov-dept { white-space: nowrap; }
.ov-rank { display: inline-block; min-width: 1.5em; color: var(--muted); font-size: .8rem; }
.ov-pct { white-space: nowrap; }
.ov-pctbar { display: inline-block; width: 64px; height: 7px; background: #eef1f5; border-radius: 999px; overflow: hidden; vertical-align: middle; margin-right: .45rem; }
.ov-pctbar i { display: block; height: 100%; background: linear-gradient(90deg, var(--primary), var(--accent)); }
.ov-pctval { font-variant-numeric: tabular-nums; }

/* Phase 1: verification & audit */
.vbadge { display: inline-block; font-size: .68rem; font-weight: 600; padding: .08rem .4rem; border-radius: 6px; margin-top: .2rem; }
.vbadge--ok { background: #e7f6ec; color: #1a7f43; }
.vbadge--pending { background: #fff5e6; color: #b9770e; }
.row-pending { background: #fffdf7; }
.icon-btn.ok { color: #1a7f43; }
.verify-banner { display: flex; align-items: center; gap: .7rem; flex-wrap: wrap; padding: .6rem .8rem; border-radius: 9px; font-size: .85rem; margin-bottom: 1rem; }
.verify-banner.ok { background: #e7f6ec; color: #156c39; }
.verify-banner.pending { background: #fff5e6; color: #97600a; }
.btn--sm { padding: .25rem .6rem; font-size: .78rem; }
.pending-note { background: #fff5e6; color: #97600a; border: 1px solid #f0d9ab; border-radius: 10px; padding: .7rem 1rem; margin-bottom: 1.1rem; cursor: pointer; font-size: .9rem; }
.pending-note:hover { background: #fdeece; }
.as-link { background: none; border: none; padding: 0; font: inherit; cursor: pointer; }
.audit { display: flex; flex-direction: column; gap: .35rem; max-height: 220px; overflow-y: auto; }
.audit-row { font-size: .85rem; padding: .35rem .1rem; border-bottom: 1px solid #f0f2f5; }

/* Phase 2: campus drives */
.cd-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 1rem; margin-top: 1rem; }
.cd-card { border: 1px solid var(--line); border-radius: 12px; padding: 1rem; background: var(--surface); cursor: pointer; transition: border-color .15s, box-shadow .15s; }
.cd-card[data-open]:hover { border-color: var(--primary); box-shadow: var(--shadow); }
.cd-meta { display: flex; flex-wrap: wrap; gap: .8rem; margin: .5rem 0; font-size: .82rem; color: var(--ink-soft); }
.cd-meta span { background: #f1f3f7; border-radius: 6px; padding: .1rem .5rem; }
.cd-elig { margin-top: .3rem; }
.cd-tabs { display: flex; gap: .3rem; border-bottom: 1px solid var(--line); margin-bottom: 1rem; }
.cd-tab { border: none; background: none; padding: .55rem .9rem; font: inherit; font-weight: 600; color: var(--muted); cursor: pointer; border-bottom: 2px solid transparent; }
.cd-tab.active { color: var(--primary); border-bottom-color: var(--primary); }
.chk-row { display: flex; flex-wrap: wrap; gap: .5rem .9rem; }
.chk { display: inline-flex; align-items: center; gap: .35rem; font-size: .85rem; font-weight: 500; }
.chk input { width: auto; }

/* Phase 3: notification bell + announcements */
.bell-wrap { position: relative; display: inline-block; }
.bell-btn { position: relative; background: none; border: none; font-size: 1.15rem; cursor: pointer; line-height: 1; padding: .25rem; border-radius: 8px; }
.bell-btn:hover { background: #f1f3f7; }
.bell-dot { position: absolute; top: -2px; right: -2px; min-width: 16px; height: 16px; padding: 0 3px; background: var(--danger); color: #fff; font-size: .62rem; font-weight: 700; border-radius: 999px; display: grid; place-items: center; }
.bell-pop { position: absolute; right: 0; top: 130%; width: 340px; max-width: 86vw; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 12px 32px rgba(0,0,0,.14); z-index: 50; overflow: hidden; }
.bell-head { display: flex; justify-content: space-between; align-items: center; padding: .7rem .9rem; border-bottom: 1px solid var(--line); }
#bell-list { max-height: 60vh; overflow-y: auto; }
.notif { display: flex; gap: .6rem; width: 100%; text-align: left; background: none; border: none; border-bottom: 1px solid #f0f2f5; padding: .7rem .9rem; cursor: pointer; font: inherit; }
.notif:hover { background: #fafbfc; }
.notif.unread { background: #eff4ff; }
.notif.unread:hover { background: #e7eeff; }
.notif-ico { flex-shrink: 0; }
.notif-body { display: flex; flex-direction: column; gap: .1rem; min-width: 0; }
.notif-title { font-weight: 600; font-size: .86rem; }
.notif-sub { font-size: .8rem; color: var(--muted); }
.notif-time { font-size: .72rem; color: var(--muted); margin-top: .15rem; }
.bell-push { display: flex; justify-content: space-between; align-items: center; gap: .6rem; padding: .55rem .9rem; background: #f4f7fd; border-bottom: 1px solid var(--line); }

/* Phase 7A: eligibility explainer */
.elig-head { padding: .7rem .9rem; border-radius: 9px; font-weight: 600; margin-bottom: .8rem; }
.elig-head.ok { background: #e7f6ec; color: #1a7f43; }
.elig-head.no { background: #fdeeee; color: #b4322f; }
.elig-list { display: flex; flex-direction: column; gap: .5rem; }
.elig-row { display: flex; gap: .6rem; padding: .6rem .7rem; border: 1px solid var(--line); border-radius: 9px; }
.elig-row.no { border-color: #f3c9c7; background: #fdf6f6; }
.elig-mark { font-weight: 700; flex-shrink: 0; }
.elig-row.ok .elig-mark { color: #1a7f43; }
.elig-row.no .elig-mark { color: #c8403c; }
.elig-detail { min-width: 0; }
.elig-fix { color: #9a5a05; font-size: .85rem; margin-top: .25rem; }
.badge--amber { background: #fbecd0; color: #9a5a05; }
.nearmiss-card { border-style: dashed; }
.nearmiss-card .elig-fix { margin-top: .4rem; }

/* Phase 8: bulk, funnel, search, bookmarks */
.bulk-bar { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; background: #eef4ff; border: 1px solid #cfe0fb; border-radius: 9px; padding: .55rem .8rem; margin-bottom: .7rem; }
.bulk-actions { display: flex; align-items: center; gap: .4rem; flex-wrap: wrap; }
.chk-col { width: 36px; text-align: center; }
.funnel { display: flex; flex-direction: column; gap: .55rem; margin: 1rem 0; }
.funnel-row { display: flex; align-items: center; gap: .7rem; }
.funnel-label { width: 96px; font-size: .85rem; color: var(--ink-soft); flex-shrink: 0; }
.funnel-track { flex: 1; background: #f1f3f7; border-radius: 6px; overflow: hidden; }
.funnel-bar { color: #fff; font-size: .8rem; font-weight: 600; padding: .35rem .6rem; border-radius: 6px; min-width: 1.5rem; text-align: right; transition: width .4s; }
.funnel-conv { display: flex; flex-wrap: wrap; gap: 1.2rem; font-size: .85rem; color: var(--ink-soft); margin-top: .6rem; }
.gsearch { position: relative; }
.gsearch input { width: 200px; padding: .4rem .7rem; border: 1px solid var(--line); border-radius: 8px; font: inherit; font-size: .85rem; }
.gsearch input:focus { outline: none; border-color: var(--primary); width: 240px; }
.gsearch-pop { position: absolute; top: 115%; right: 0; width: 320px; max-width: 90vw; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 12px 32px rgba(0,0,0,.14); z-index: 60; max-height: 70vh; overflow-y: auto; }
.gs-group { font-size: .7rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); padding: .5rem .8rem .25rem; }
.gs-item { display: flex; flex-direction: column; gap: .1rem; width: 100%; text-align: left; background: none; border: none; padding: .5rem .8rem; cursor: pointer; font: inherit; }
.gs-item:hover { background: #f3f6fb; }
.gs-empty { padding: .8rem; color: var(--muted); font-size: .85rem; }
.card-head-right { display: inline-flex; align-items: center; gap: .4rem; }
.bm-btn { background: none; border: none; font-size: 1.15rem; line-height: 1; cursor: pointer; color: #c8b020; padding: 0; }
.bm-btn.on { color: #e6a700; }

/* Phase 9: placement policy */
.pol-list { display: flex; flex-direction: column; gap: .8rem; margin-top: 1rem; }
.pol-card.current { border-left: 3px solid var(--primary); }
.policy-body { max-height: 50vh; overflow-y: auto; border: 1px solid var(--line); border-radius: 8px; padding: 1rem 1.2rem; background: #fbfcfe; font-size: .9rem; line-height: 1.6; }
.policy-body h1 { font-size: 1.05rem; color: var(--primary); margin: 1rem 0 .4rem; }
.policy-body table { border-collapse: collapse; width: 100%; margin: .6rem 0; }
.policy-body th, .policy-body td { border: 1px solid var(--line); padding: .35rem .6rem; text-align: left; font-size: .85rem; }
#offer-status:not(:empty) { margin-top: .5rem; padding: .5rem .7rem; background: #eef4ff; border-radius: 7px; }
.ic { width: 1.05em; height: 1.05em; vertical-align: -0.16em; display: inline-block; flex-shrink: 0; }
.proof-list, .proof-list-sm { display: flex; flex-direction: column; gap: .4rem; margin: .5rem 0; }
.proof-row { display: flex; justify-content: space-between; align-items: center; gap: .8rem; padding: .5rem .7rem; border: 1px solid var(--line); border-radius: 8px; }
.proof-row-actions { display: flex; gap: .7rem; flex-shrink: 0; }
.as-link.danger { color: var(--danger, #b4322f); }

/* Phase 10: ID-card scanner */
.scan-area { width: 100%; max-width: 360px; margin: .4rem auto; border-radius: 10px; overflow: hidden; background: #000; min-height: 120px; }
.scan-area video { width: 100% !important; height: auto !important; display: block; }
.scan-manual { display: flex; gap: .5rem; margin: .7rem 0; }
.scan-manual input { flex: 1; padding: .5rem .7rem; border: 1px solid var(--line); border-radius: 8px; font: inherit; }
.scan-log { display: flex; flex-direction: column; gap: .35rem; max-height: 200px; overflow-y: auto; margin-top: .5rem; }
.scan-row { display: flex; align-items: center; gap: .55rem; padding: .45rem .65rem; border-radius: 8px; font-size: .88rem; }
.scan-row.ok { background: #e7f6ec; color: #1a7f43; }
.scan-row.warn { background: #fbf0d8; color: #8a5a00; }
.scan-row.no { background: #fdeeee; color: #b4322f; }
.scan-ico { display: inline-flex; flex-shrink: 0; }
.scan-time { margin-left: auto; opacity: .6; font-size: .78rem; }

/* Prep links */
.prep-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: .9rem; margin: 1rem 0; }
.prep-card { border: 1px solid var(--line); border-radius: 12px; padding: 1rem; background: var(--surface); display: flex; flex-direction: column; gap: .5rem; }
.prep-card .btn { margin-top: auto; align-self: flex-start; }
.btn .ic, .link .ic { margin-right: .35em; }

.ann-item { padding: .7rem 0; border-bottom: 1px solid #f0f2f5; }
.ann-item:last-child { border-bottom: none; }
.ann-title { font-weight: 600; }
.ann-meta { margin-top: .25rem; }

/* Phase 4: reports */
.rep-doc { color: #1a2230; }
.rep-header { display: flex; justify-content: space-between; align-items: flex-start; border-bottom: 2px solid var(--primary); padding-bottom: .8rem; margin-bottom: 1.2rem; }
.rep-header h2 { font-family: var(--font-display); margin: 0; font-size: 1.3rem; }
.rep-sub { color: var(--muted); margin-top: .2rem; }
.rep-date { color: var(--muted); font-size: .82rem; white-space: nowrap; }
.rep-h { font-family: var(--font-display); font-size: 1.02rem; margin: 1.4rem 0 .6rem; }
.rep-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: .7rem; }
.rep-stat { border: 1px solid var(--line); border-radius: 9px; padding: .6rem .8rem; }
.rep-stat-l { color: var(--muted); font-size: .72rem; text-transform: uppercase; letter-spacing: .03em; }
.rep-stat-v { font-family: var(--font-display); font-size: 1.2rem; font-weight: 600; margin-top: .2rem; }
.rep-table { width: 100%; border-collapse: collapse; font-size: .85rem; margin-top: .4rem; }
.rep-table th, .rep-table td { border: 1px solid var(--line); padding: .4rem .6rem; text-align: left; }
.rep-table th { background: #f4f6fa; font-weight: 600; }
.rep-foot { display: flex; justify-content: space-around; margin-top: 3rem; }
.rep-sign { text-align: center; font-size: .85rem; color: var(--muted); }
.rep-sign-line { width: 160px; border-top: 1px solid #444; margin: 0 auto .35rem; }
.rep-powered { text-align: center; color: var(--muted); font-size: .72rem; margin-top: 1.6rem; }
.rep-scope { max-width: 340px; margin: .6rem 0 1rem; }

/* Phase 5: readiness + prep */
.readiness { display: flex; align-items: center; gap: 1.3rem; flex-wrap: wrap; }
.ring { --p: 0; width: 86px; height: 86px; border-radius: 50%; flex-shrink: 0; display: grid; place-items: center;
  background: conic-gradient(var(--ring-c, var(--primary)) calc(var(--p) * 1%), #eef1f5 0); }
.ring span { width: 64px; height: 64px; border-radius: 50%; background: var(--surface); display: grid; place-items: center;
  font-family: var(--font-display); font-weight: 700; font-size: 1.2rem; }
.ring span small { font-size: .7rem; font-weight: 600; }
.ring--low { --ring-c: #c8860d; } .ring--mid { --ring-c: var(--primary); } .ring--ready { --ring-c: #1a7f43; }
.readiness-body { flex: 1; min-width: 200px; }
.checklist { display: flex; flex-direction: column; gap: .4rem; margin-top: .5rem; }
.check-item { display: flex; align-items: center; gap: .5rem; background: #f8fafc; border: 1px solid var(--line); border-radius: 8px;
  padding: .5rem .7rem; font: inherit; font-size: .88rem; text-align: left; cursor: pointer; color: var(--ink); }
.check-item:hover { border-color: var(--primary); }
.check-box { color: #c8860d; font-size: 1rem; }

.exp-card { padding: 1rem; }
.exp-sec { font-size: .88rem; margin-top: .45rem; }
.exp-h { display: inline-block; font-size: .72rem; text-transform: uppercase; letter-spacing: .03em; color: var(--muted); margin-right: .35rem; }

/* Phase 6: QR, landing stats */
.qr-box { display: flex; justify-content: center; padding: 1rem; }
.qr-box img, .qr-box canvas { display: block; }
.qr-url { word-break: break-all; font-size: .76rem; color: var(--muted); text-align: center; }
.li-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: .8rem; margin: 1.4rem 0 1rem; }
.li-stat { background: rgba(255,255,255,.1); border-radius: 10px; padding: .7rem .5rem; text-align: center; }
.li-stat-v { font-family: var(--font-display); font-size: 1.35rem; font-weight: 700; }
.li-stat-l { font-size: .68rem; opacity: .85; margin-top: .2rem; }
.li-recruiters { display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; margin-top: .4rem; }
.li-rec-label { font-size: .76rem; opacity: .8; width: 100%; margin-bottom: .2rem; }
.li-rec-chip { background: rgba(255,255,255,.14); border-radius: 999px; padding: .2rem .6rem; font-size: .76rem; }
@media (max-width: 600px) { .li-stats { grid-template-columns: repeat(2, 1fr); } }

@media print {
  body.app { display: block; }
  .sidebar, .app-topbar, .side-foot, #rep-print, .charts, #trend-table, .rep-scope,
  .page:not([data-page="reports"]), .drives-head, .row-between > .btn { display: none !important; }
  .app-main, #content, .app--wide #content { max-width: none; margin: 0; padding: 0; }
  .panel { border: none; box-shadow: none; padding: 0; margin: 0; }
  .page[data-page="reports"] .panel:first-child { display: none; } /* hide trends panel when printing */
  .report-print { display: block !important; }
  .rep-table th { background: #f4f6fa !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}
.stat-label { color: var(--muted); font-size: .78rem; text-transform: uppercase; letter-spacing: .03em; }
.stat-val { font-family: var(--font-display); font-size: 1.5rem; font-weight: 600; margin-top: .3rem; line-height: 1.1; }
.stat-sub { font-family: var(--font-body); font-size: .82rem; font-weight: 500; color: var(--muted); }

.row-between { display: flex; justify-content: space-between; align-items: center; }
.bar { height: 8px; background: #eef1f5; border-radius: 999px; overflow: hidden; margin: .55rem 0 1rem; }
.bar > i { display: block; height: 100%; background: linear-gradient(90deg, var(--primary), var(--accent)); border-radius: 999px; transition: width .5s ease; }
.quick { display: flex; flex-wrap: wrap; gap: .55rem; }
.mini-drive { display: flex; justify-content: space-between; align-items: center; padding: .55rem .2rem; border-top: 1px solid var(--line); }
.mini-drive:first-of-type { border-top: none; }
.panel-head { display: flex; justify-content: space-between; align-items: center; gap: 1rem; margin-bottom: .6rem; }
.panel-head h3 { margin: 0; }
.panel-head .save-btn { flex-shrink: 0; }
@media (max-width: 520px) { .panel-head { flex-direction: column; align-items: stretch; } }

@media (max-width: 860px) {
  body.app { flex-direction: column; }
  .sidebar { width: auto; height: auto; position: sticky; top: 0; flex-direction: row; align-items: center; z-index: 6; }
  .side-brand { border-bottom: none; border-right: 1px solid var(--line); white-space: nowrap; }
  .side-brand div span { display: none; }
  .side-nav { flex-direction: row; overflow-x: auto; padding: .5rem; gap: .25rem; }
  .side-nav button { white-space: nowrap; padding: .5rem .7rem; }
  .side-nav button span, .side-foot { display: none; }
  .app-topbar { top: 0; }
}

/* ---------- Forms ---------- */
.field { display: block; margin-bottom: .9rem; }
.field > span { display: block; font-size: .8rem; font-weight: 600; color: var(--ink-soft); margin-bottom: .3rem; }
input, select, textarea {
  width: 100%; font-family: var(--font-body); font-size: .9rem; color: var(--ink);
  padding: .55rem .65rem; border: 1px solid var(--line); border-radius: 8px; background: #fff;
}
input:focus, select:focus, textarea:focus { outline: 2px solid #c7d2fe; border-color: var(--primary); }

/* ---------- Topbar / tabs ---------- */
.topbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: .7rem 1.2rem; background: var(--surface); border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 20;
}
.topbar-left { display: flex; align-items: center; gap: .6rem; }
.topbar-right { display: flex; align-items: center; gap: 1rem; }
.who { display: flex; align-items: center; gap: .5rem; }
.tabs { display: flex; gap: .25rem; padding: 0 1.2rem; background: var(--surface); border-bottom: 1px solid var(--line); }
.tab {
  border: none; background: none; font-family: var(--font-display); font-weight: 600;
  font-size: .9rem; color: var(--muted); padding: .8rem 1rem; cursor: pointer;
  border-bottom: 2px solid transparent;
}
.tab:hover { color: var(--ink); }
.tab.active { color: var(--primary); border-bottom-color: var(--primary); }
.container { max-width: 1200px; margin: 0 auto; padding: 1.2rem; }
.tab-panel { display: none; }
.tab-panel.active { display: block; }

/* ---------- Toolbar ---------- */
.toolbar { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; margin-bottom: 1rem; }
.toolbar select, .toolbar input { width: auto; min-width: 140px; }
.toolbar #f-search { min-width: 220px; flex: 1 1 220px; }

/* ---------- Table ---------- */
.table-wrap { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: auto; box-shadow: var(--shadow); }
.data-table { width: 100%; border-collapse: collapse; font-size: .85rem; }
.data-table thead th {
  position: sticky; top: 0; background: #f8fafc; text-align: left; font-weight: 600;
  color: var(--ink-soft); padding: .6rem .7rem; border-bottom: 1px solid var(--line); white-space: nowrap;
}
.data-table td { padding: .55rem .7rem; border-bottom: 1px solid #f0f2f5; vertical-align: top; }
.data-table tbody tr:hover { background: #fafbfc; }
.actions { white-space: nowrap; text-align: right; }
.cell-select { width: auto; min-width: 120px; padding: .3rem .4rem; font-size: .8rem; font-weight: 600; border-radius: 6px; }
.status-placed { color: #15803d; } .status-unplaced { color: #b91c1c; }
.status-internship { color: #b45309; } .status-higher_studies { color: #1d4ed8; }
.status-entrepreneur { color: #7c3aed; } .status-backlog { color: #c2410c; }
.status-not_reachable { color: #475569; }

/* ---------- Cards / charts ---------- */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: .8rem; margin-bottom: 1.2rem; }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: .9rem; box-shadow: var(--shadow); }
.stat-k { font-size: .75rem; color: var(--muted); font-weight: 600; }
.stat-v { font-family: var(--font-display); font-size: 1.3rem; font-weight: 700; margin-top: .2rem; }
.charts { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.chart-box { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem; box-shadow: var(--shadow); min-height: 260px; }
.chart-box--wide { grid-column: 1 / -1; }
.chart-box canvas { max-height: 280px; }

/* ---------- Admin ---------- */
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.1rem; margin-bottom: 1rem; box-shadow: var(--shadow); }
.inline-form { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; margin-bottom: .8rem; }
.inline-form input, .inline-form select { width: auto; min-width: 130px; }
.chips { display: flex; flex-wrap: wrap; gap: .5rem; }
.chip { display: inline-flex; align-items: center; gap: .4rem; background: #f1f4f9; border: 1px solid var(--line); border-radius: 999px; padding: .25rem .7rem; font-size: .82rem; font-weight: 600; }
.chip-x { border: none; background: none; cursor: pointer; color: var(--muted); font-size: 1rem; line-height: 1; }
.chip-x:hover { color: var(--danger); }
.user-list { display: flex; flex-direction: column; gap: .5rem; }
.user-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; padding: .7rem .8rem; border: 1px solid var(--line); border-radius: 8px; }
.user-id { min-width: 0; }
.chip--dept { background: #eef2ff; }
.chip--sec { background: #e1f5ee; }
.user-actions { display: flex; gap: .4rem; flex-wrap: wrap; }
.user-actions select { width: auto; min-width: 120px; }

/* ---------- Modal ---------- */
.modal-overlay { position: fixed; inset: 0; background: rgba(16,24,40,.45); display: grid; place-items: center; z-index: 50; padding: 1rem; }
.modal { background: var(--surface); border-radius: 14px; width: 100%; max-width: 460px; max-height: 90vh; overflow: auto; box-shadow: 0 20px 60px rgba(0,0,0,.25); }
.modal--wide { max-width: 720px; }
.modal-head { display: flex; align-items: center; justify-content: space-between; padding: 1rem 1.2rem; border-bottom: 1px solid var(--line); }
.modal-head h3 { margin: 0; }
.modal-body { padding: 1.2rem; }
.modal-foot {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: .5rem;
  margin-top: 1.1rem;
  padding: .85rem 1.2rem .85rem;
  border-top: 1px solid var(--line);
  background: #f8fafc;
  border-radius: 0 0 14px 14px;
  margin-left: -1.2rem;
  margin-right: -1.2rem;
  margin-bottom: -1.2rem;
}

/* ── Action group (primary actions on the left) ── */
.modal-foot-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: .45rem;
  flex: 1;
}

/* ── Utility group (meta controls on the right) ── */
.modal-foot-meta {
  display: flex;
  align-items: center;
  gap: .45rem;
  margin-left: auto;
}

.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: .7rem; }

/* ---------- Toasts ---------- */
.toast-host { position: fixed; bottom: 1.2rem; right: 1.2rem; display: flex; flex-direction: column; gap: .5rem; z-index: 100; }
.toast { background: var(--ink); color: #fff; padding: .6rem .9rem; border-radius: 8px; font-size: .85rem; box-shadow: var(--shadow); opacity: 0; transform: translateY(8px); transition: .25s; }
.toast--show { opacity: 1; transform: none; }
.toast--success { background: #15803d; } .toast--error { background: var(--danger); } .toast--info { background: var(--ink-soft); }

/* ---------- Footer ---------- */
.footer { text-align: center; padding: 1.5rem; }

[hidden] { display: none !important; }

/* Simplified home layout */
.home-head { display: flex; flex-wrap: wrap; gap: .75rem; align-items: center; justify-content: space-between; margin-bottom: .5rem; }
.scope { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; }
.scope-label { font-family: var(--font-display); font-weight: 600; color: var(--ink); }
.sc-select {
  width: auto; min-width: 120px; padding: .42rem .7rem;
  border: 1px solid var(--line); border-radius: 8px;
  font-family: var(--font-body); font-size: .82rem; font-weight: 600;
  color: var(--ink-soft); background: var(--surface);
  cursor: pointer; transition: border-color .15s;
}
.sc-select:hover, .sc-select:focus { border-color: var(--primary); outline: none; }
.home-actions { display: flex; align-items: center; gap: .5rem; }
.home-actions #f-search { width: auto; min-width: 200px; }
.count-line { margin: .25rem 0 .75rem; }
.back { display: inline-block; background: none; border: none; cursor: pointer; padding: 0; margin-bottom: .75rem; font-size: .9rem; }

/* "More" dropdown */
.menu { position: relative; }
.menu-pop { position: absolute; right: 0; top: calc(100% + 4px); background: var(--surface); border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 8px 24px rgba(16,24,40,.12); padding: .35rem; min-width: 180px; z-index: 30; display: flex; flex-direction: column; }
.menu-pop button { text-align: left; background: none; border: none; padding: .55rem .7rem; border-radius: 7px; cursor: pointer; font: inherit; color: var(--ink-soft); }
.menu-pop button:hover { background: #f1f4f9; color: var(--ink); }

.success { color: #15803d; }
.bulk-errs { margin: .5rem 0 0; padding-left: 1.1rem; color: var(--danger); }
.bulk-errs li { margin: .1rem 0; }
#bk-report { margin-top: .5rem; }

@media (max-width: 720px) {
  .home-head { flex-direction: column; align-items: stretch; }
  .home-actions { flex-wrap: wrap; }
  .home-actions #f-search { flex: 1 1 100%; }
}

@media (max-width: 720px) {
  .charts { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .topbar-right .who { display: none; }
}

/* ============ Landing page ============ */
.landing { min-height: 100vh; display: grid; grid-template-columns: 1.05fr .95fr; }
.landing-info {
  background: linear-gradient(160deg, #20409a 0%, #16306f 60%, #122656 100%);
  color: #fff; padding: clamp(2rem, 5vw, 4rem);
  display: flex; flex-direction: column; justify-content: center; gap: 1.2rem;
}
.landing-info .li-top { display: flex; align-items: center; gap: .7rem; }
.landing-info .li-top .brand-mark { background: #fff; color: var(--primary); }
.landing-info .li-top strong { font-family: var(--font-display); font-size: 1.05rem; display: block; }
.landing-info .li-top span { font-size: .8rem; opacity: .82; }
.landing-info h1 { font-family: var(--font-display); font-size: clamp(1.7rem, 3vw, 2.5rem); line-height: 1.12; margin: .3rem 0 0; color: #fff; }
.landing-info p { color: #d7e0f5; line-height: 1.65; max-width: 48ch; margin: 0; }
.li-points { display: flex; flex-wrap: wrap; gap: .5rem; list-style: none; padding: 0; margin: .2rem 0; }
.li-points li { background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.2); padding: .3rem .75rem; border-radius: 999px; font-size: .78rem; }
.li-features { display: flex; flex-direction: column; gap: .55rem; margin-top: .3rem; }
.li-features div { display: flex; gap: .6rem; align-items: flex-start; font-size: .92rem; color: #eaeffb; }
.li-features svg { flex-shrink: 0; margin-top: .12rem; color: #8fb4ff; }

.landing-login { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1.3rem; padding: 2rem 1.5rem; background: var(--bg); }
.landing-login .login-card { width: 100%; max-width: 384px; margin: 0; }

.poweredby { display: inline-flex; align-items: center; gap: .6rem; background: #fff; border: 1px solid var(--line); color: var(--muted); padding: .5rem .9rem; border-radius: 11px; text-decoration: none; }
.poweredby .pb-label { font-size: .58rem; letter-spacing: .14em; opacity: .7; font-weight: 600; }
.poweredby .pb-logo { height: 26px; width: auto; display: block; }
.app-footer .af-pb { display: inline-flex; align-items: center; gap: .35rem; }
.app-footer .af-powered { height: 18px; width: auto; vertical-align: middle; }

@media (max-width: 820px) {
  .landing { grid-template-columns: 1fr; }
  .landing-info { padding: 2.2rem 1.5rem; gap: 1rem; }
  .landing-info p { max-width: none; }
}

/* ================================================================
   Phase 6 — New feature CSS
   All rules below support classes introduced in Phases 3–5.
   Nothing above this line was modified except doc-row (3 columns).
   ================================================================ */

/* ── btn--secondary ──── */
.btn--secondary {
  background: #eef2ff;
  border-color: #c7d2fe;
  color: var(--primary);
  font-weight: 600;
}
.btn--secondary:hover { background: #e0e7ff; border-color: #a5b4fc; color: var(--primary-700); }

/* ── Campus drives: page-level tabs (Drives / Visit schedule) ─── */
.cd-page-tabs {
  display: flex;
  gap: 0;
  border-bottom: 2px solid var(--line);
  margin-bottom: 1.1rem;
}
.cd-page-tab {
  border: none;
  background: none;
  padding: .6rem 1.1rem;
  font: inherit;
  font-size: .88rem;
  font-weight: 600;
  color: var(--muted);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;   /* overlap the container border */
  transition: color .15s;
}
.cd-page-tab:hover { color: var(--ink); }
.cd-page-tab.active { color: var(--primary); border-bottom-color: var(--primary); }

/* ── Drive card: header row (logo + name + badge) ─────────────── */
.cd-card-header { align-items: flex-start; gap: .5rem; }
.cd-card-title  {
  display: flex;
  align-items: center;
  gap: .45rem;
  min-width: 0;
}
.cd-card-title strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ── Company logo: card thumbnail + form preview ─────────────── */
.cd-logo {
  width: 32px;
  height: 32px;
  object-fit: contain;
  border-radius: 6px;
  border: 1px solid var(--line);
  background: #fff;
  flex-shrink: 0;
}
.cd-logo-preview {
  width: 56px;
  height: 56px;
  object-fit: contain;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: #fff;
  flex-shrink: 0;
}
.cd-logo-row {
  display: flex;
  align-items: center;
  gap: .7rem;
  flex-wrap: wrap;
  margin-bottom: .3rem;
}
.cd-logo-row input[type="file"] { width: auto; }

/* ── Job type label in drive cards ───────────────────────────── */
.cd-jobtype {
  font-size: .75rem;
  color: var(--muted);
  font-weight: 500;
}

/* ── Count bar above eligible / applicants tables ────────────── */
.cd-count-bar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: .5rem;
  margin-bottom: .8rem;
}

/* ── Pills (stat tags in count bars) ─────────────────────────── */
.pill {
  display: inline-flex;
  align-items: center;
  font-size: .78rem;
  font-weight: 600;
  padding: .2rem .65rem;
  border-radius: 999px;
  background: #f1f3f7;
  color: var(--ink-soft);
  border: 1px solid var(--line);
  white-space: nowrap;
}
.pill--green { background: #e7f6ec; color: #1a7f43; border-color: #bfe6cd; }
.pill--grey  { background: #eef1f5; color: #5b6573; border-color: #dde1e8; }

/* ── Category ineligibility note on opportunity cards ────────── */
.cd-cat-block {
  margin-top: .35rem;
  padding: .3rem .5rem;
  background: #fdf6f0;
  border: 1px solid #f4d6b8;
  border-radius: 7px;
  font-size: .78rem;
  color: #944a10;
}

/* ── Preferred location chips (student profile) ──────────────── */
.loc-chips {
  display: flex;
  flex-wrap: wrap;
  gap: .45rem;
  margin: .6rem 0 .35rem;
}
/* loc-chip extends .chk — just adds visual state */
.loc-chip {
  padding: .3rem .75rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #f5f7fb;
  cursor: pointer;
  transition: background .12s, border-color .12s, color .12s;
  user-select: none;
}
.loc-chip:hover { border-color: var(--primary); background: #eef2fb; }
.loc-chip--on   { background: #eef2fb; border-color: var(--primary); color: var(--primary); font-weight: 600; }
/* hide the raw checkbox — the chip itself is the visual */
.loc-chk { display: none; }

/* ── Placement status track table (wider) ────────────────────── */
/* track-table overrides the default table-wrap max-width so the
   wide table can scroll horizontally inside its container */
.track-table { overflow-x: auto; }
.track-table .data-table { min-width: 1100px; }

/* ── Department HOD fields in admin panel ────────────────────── */
.dept-row {
  display: flex;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: .6rem;
  padding: .4rem 0;
  border-bottom: 1px solid #f0f2f5;
}
.dept-row:last-child { border-bottom: none; }
.dept-hod {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: .4rem;
  flex: 1;
  min-width: 0;
}
.dept-hod-name,
.dept-hod-email {
  width: auto;
  min-width: 140px;
  flex: 1 1 140px;
  max-width: 220px;
  font-size: .82rem;
  padding: .35rem .55rem;
}
/* dept-hod-save inherits btn + btn--sm, no extra rules needed */

/* ── Responsive tweaks for new components ────────────────────── */
@media (max-width: 640px) {
  /* doc-row: 3-col → 1-col on mobile */
  .doc-row { grid-template-columns: 1fr; }
  /* page tabs wrap cleanly */
  .cd-page-tabs { gap: 0; overflow-x: auto; }
  .cd-page-tab  { white-space: nowrap; padding: .55rem .8rem; }
  /* count bar stacks */
  .cd-count-bar { gap: .4rem; }
  /* HOD inputs stack */
  .dept-hod     { flex-direction: column; align-items: stretch; }
  .dept-hod-name,
  .dept-hod-email { max-width: none; }
}

/* ── Print: include status track table ───────────────────────── */
@media print {
  /* Show track-table when printing from the reports page */
  .track-table { overflow: visible; }
  .track-table .data-table { min-width: 0; font-size: .7rem; }
}

/* ── Bulk shortlist result mini-table ─────────────────────────── */
.mini-table {
  width: 100%;
  border-collapse: collapse;
  font-size: .82rem;
}
.mini-table th,
.mini-table td {
  padding: .25rem .5rem;
  border-bottom: 1px solid var(--border, #e0e6ef);
  text-align: left;
  white-space: nowrap;
}
.mini-table th { background: #f4f7fb; font-weight: 600; }
.mini-table .bulk-row-warn td { background: #fff8e6; color: #7a5500; }

/* ================================================================
   Resume skill extraction — review modal UI
   Classes used by resume_skills.js
   ================================================================ */

/* Loading state inside the scan modal */
.skill-scan-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 1.4rem 0 .6rem;
}
.skill-scan-spinner {
  width: 36px;
  height: 36px;
  border: 3px solid var(--line);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Grouping sections inside the review modal */
.skill-review-group {
  margin-bottom: 1rem;
}
.skill-review-label {
  font-size: .8rem;
  font-weight: 600;
  color: var(--ink-soft);
  margin: 0 0 .4rem;
  text-transform: uppercase;
  letter-spacing: .03em;
}

/* Row of skill chips */
.skill-chips-row {
  display: flex;
  flex-wrap: wrap;
  gap: .4rem;
}

/* Individual skill chip — acts as a checkbox label */
.skill-chip {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  padding: .28rem .75rem;
  border-radius: 999px;
  border: 1.5px solid var(--line);
  font-size: .82rem;
  font-weight: 500;
  cursor: pointer;
  user-select: none;
  transition: background .12s, border-color .12s, color .12s, opacity .12s;
}
/* Hide the raw checkbox — chip itself is the visual control */
.skill-chip-chk {
  display: none;
}
.skill-chip-icon {
  font-size: .72rem;
  font-weight: 700;
  flex-shrink: 0;
}

/* Already-in-profile chips: teal/green — always checked, not toggleable */
.skill-chip--existing {
  background: #e7f6ec;
  border-color: #bfe6cd;
  color: #1a6e3a;
}
.skill-chip--existing .skill-chip-icon { color: #1a7f43; }

/* New skills from resume: blue — pre-checked, can be unchecked */
.skill-chip--new.skill-chip--on {
  background: #eef2fb;
  border-color: var(--primary);
  color: var(--primary);
}
.skill-chip--new.skill-chip--off {
  background: #f8fafc;
  border-color: var(--line);
  color: var(--muted);
  opacity: .65;
}
.skill-chip--new:hover { border-color: var(--primary); opacity: 1; }

/* Manually added chips: amber */
.skill-chip--manual.skill-chip--on {
  background: #fef5e4;
  border-color: #e6b84a;
  color: #7a5500;
}
.skill-chip--manual.skill-chip--off {
  background: #f8fafc;
  border-color: var(--line);
  color: var(--muted);
  opacity: .65;
}

/* ================================================================
   Skills eligibility — drive card display (student portal)
   ================================================================ */

/* Block shown on a drive card when student is missing required skills */
.cd-skills-block {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .35rem;
  margin: .4rem 0 .2rem;
  padding: .45rem .65rem;
  background: #fdf6f0;
  border: 1px solid #f4d6b8;
  border-radius: 8px;
  font-size: .8rem;
}
.cd-skills-block-label {
  font-weight: 600;
  color: #7a4a10;
  white-space: nowrap;
}
/* Skill pill used in the missing-skills block on drive cards */
.cd-skill-pill {
  display: inline-flex;
  align-items: center;
  padding: .18rem .55rem;
  border-radius: 999px;
  font-size: .77rem;
  font-weight: 500;
  white-space: nowrap;
}
.cd-skill-pill--missing {
  background: #fde8d8;
  border: 1px solid #f4b07a;
  color: #7a3e0e;
}

/* Skills-match cell in the staff eligible-students table */
.skill-match-cell {
  display: inline-flex;
  align-items: center;
  gap: .3rem;
  font-size: .78rem;
  color: #1a7f43;
}

/* Hint text under required skills input in drive form */
.cd-skills-hint {
  margin: -.1rem 0 .6rem;
  font-size: .78rem !important;
}

/* ================================================================
   Manage tab — redesigned admin panel  (admin.js rewrite)
   ================================================================ */

/* ── Hero header ─────────────────────────────────────────────── */
.adm-hero {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 1.2rem;
}
.adm-hero-title {
  font-size: 1.45rem;
  font-weight: 700;
  margin: 0 0 .15rem;
  color: var(--ink);
}
.adm-hero-sub {
  font-size: .85rem;
  color: var(--muted);
  margin: 0;
}

/* ── Stat bar ────────────────────────────────────────────────── */
.adm-stat-bar {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: .75rem;
  margin-bottom: 1.4rem;
}
.adm-stat {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: .9rem 1.1rem;
  display: flex;
  flex-direction: column;
  gap: .15rem;
  box-shadow: var(--shadow);
}
.adm-stat-v {
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--ink);
  line-height: 1;
}
.adm-stat-l {
  font-size: .75rem;
  color: var(--muted);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: .04em;
}

/* ── Card grid ───────────────────────────────────────────────── */
.adm-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}
.adm-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.2rem 1.3rem 1.3rem;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  gap: .9rem;
}
.adm-card--wide {
  grid-column: 1 / -1;   /* full row */
}

/* ── Card header (icon + title + desc) ───────────────────────── */
.adm-card-hdr {
  display: flex;
  align-items: flex-start;
  gap: .85rem;
}
.adm-card-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.adm-icon--blue   { background: #dbeafe; color: #1d4ed8; }
.adm-icon--teal   { background: #ccfbf1; color: #0f766e; }
.adm-icon--purple { background: #ede9fe; color: #6d28d9; }
.adm-icon--amber  { background: #fef3c7; color: #b45309; }
.adm-icon--coral  { background: #ffe4e6; color: #be123c; }
.adm-card-title {
  font-weight: 700;
  font-size: .95rem;
  color: var(--ink);
  margin-bottom: .15rem;
}
.adm-card-desc {
  font-size: .8rem;
  color: var(--muted);
  line-height: 1.45;
}

/* ── Form rows ───────────────────────────────────────────────── */
.adm-form-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .5rem;
  padding: .7rem .9rem;
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 8px;
}
.adm-form-row--create { gap: .5rem; }
.adm-input {
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: .38rem .65rem;
  font: inherit;
  font-size: .84rem;
  background: var(--surface);
  color: var(--ink);
  outline: none;
  transition: border-color .15s;
  min-width: 100px;
}
.adm-input:focus { border-color: var(--primary); }
.adm-input--grow { flex: 1; min-width: 140px; }
.adm-input--sm   { font-size: .8rem; padding: .3rem .55rem; }
.adm-select {
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: .38rem .6rem;
  font: inherit;
  font-size: .84rem;
  background: var(--surface);
  color: var(--ink);
  cursor: pointer;
}
.adm-select--grow { flex: 1; }
.adm-add-btn { white-space: nowrap; flex-shrink: 0; }

/* ── Chips ───────────────────────────────────────────────────── */
.adm-chips-row {
  display: flex;
  flex-wrap: wrap;
  gap: .45rem;
  min-height: 28px;
}
.adm-chip {
  display: inline-flex;
  align-items: center;
  gap: .3rem;
  padding: .28rem .75rem;
  border-radius: 999px;
  font-size: .8rem;
  font-weight: 600;
  background: #f1f4f9;
  border: 1px solid var(--line);
  color: var(--ink);
}
.adm-chip--dept { background: #eef2ff; border-color: #c7d2fe; color: #3730a3; }
.adm-chip--sec  { background: #dcfce7; border-color: #bbf7d0; color: #166534; }
.adm-chip-code  { font-size: .72rem; opacity: .7; font-weight: 700; }
.adm-chip-sub   { font-size: .72rem; opacity: .65; }
.adm-chip-x {
  border: none;
  background: none;
  cursor: pointer;
  color: inherit;
  opacity: .55;
  font-size: .9rem;
  line-height: 1;
  padding: 0 0 0 2px;
  transition: opacity .12s;
}
.adm-chip-x:hover { opacity: 1; color: #dc2626; }

/* ── Department grid ─────────────────────────────────────────── */
.adm-dept-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: .65rem;
}
.adm-dept-card {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: .75rem .9rem;
  background: #fafbfd;
  display: flex;
  flex-direction: column;
  gap: .45rem;
  transition: box-shadow .15s;
}
.adm-dept-card:hover { box-shadow: 0 2px 8px rgba(0,0,0,.06); }
.adm-dept-top {
  display: flex;
  align-items: center;
  gap: .5rem;
}
.adm-dept-badge {
  font-size: .82rem;
  font-weight: 700;
  padding: .22rem .7rem;
  border-radius: 6px;
  background: #1f3a8a;
  color: #fff;
  flex-shrink: 0;
}
.adm-dept-badge--pg { background: #6d28d9; }
.adm-dept-level {
  font-size: .72rem;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .05em;
}
.adm-dept-fullname {
  font-size: .78rem;
  line-height: 1.35;
  flex: 1;
}
.adm-dept-hod {
  display: flex;
  flex-wrap: wrap;
  gap: .35rem;
  align-items: center;
  padding-top: .4rem;
  border-top: 1px solid var(--line);
}
.adm-icon-btn {
  border: none;
  background: none;
  cursor: pointer;
  padding: 3px;
  border-radius: 5px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-left: auto;
  opacity: .45;
  transition: opacity .12s, background .12s;
}
.adm-icon-btn:hover { opacity: 1; }
.adm-icon-btn--danger:hover { background: #fee2e2; color: #dc2626; }

/* ── User list ───────────────────────────────────────────────── */
.adm-user-list {
  display: flex;
  flex-direction: column;
  gap: .5rem;
}
.adm-user-row {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: .85rem 1rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fafbfd;
  transition: box-shadow .15s;
}
.adm-user-row:hover { box-shadow: 0 2px 8px rgba(0,0,0,.05); }
.adm-user-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: linear-gradient(135deg, #1f3a8a, #2563c9);
  color: #fff;
  font-size: .82rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.adm-user-info {
  flex: 1;
  min-width: 0;
}
.adm-user-name  { font-weight: 600; font-size: .9rem; }
.adm-user-email { font-size: .78rem; color: var(--muted); margin-bottom: .4rem; }
.adm-user-chips { display: flex; flex-wrap: wrap; gap: .35rem; }
.adm-user-controls {
  display: flex;
  flex-wrap: wrap;
  gap: .4rem;
  align-items: center;
  flex-shrink: 0;
}
.adm-role-sel, .adm-assign-sel {
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: .32rem .55rem;
  font: inherit;
  font-size: .8rem;
  background: var(--surface);
  color: var(--ink);
  cursor: pointer;
}
.adm-role-badge {
  display: inline-block;
  padding: .22rem .7rem;
  border-radius: 999px;
  font-size: .75rem;
  font-weight: 600;
}
.adm-role--super   { background: #fef3c7; color: #92400e; }
.adm-role--officer { background: #dbeafe; color: #1e40af; }
.adm-role--coord   { background: #dcfce7; color: #166534; }

/* ── Responsive ──────────────────────────────────────────────── */
@media (max-width: 900px) {
  .adm-stat-bar { grid-template-columns: repeat(2, 1fr); }
  .adm-grid     { grid-template-columns: 1fr; }
  .adm-card--wide { grid-column: auto; }
}
@media (max-width: 580px) {
  .adm-stat-bar { grid-template-columns: 1fr 1fr; }
  .adm-user-row { flex-direction: column; }
  .adm-user-controls { width: 100%; }
  .adm-dept-grid { grid-template-columns: 1fr; }
}

/* QR scanner: camera unavailable state */
.scan-no-cam {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 1.5rem 1rem;
  min-height: 140px;
  text-align: center;
  background: #f8fafc;
  border-radius: 8px;
  border: 1px dashed var(--line);
}
.scan-no-cam p { margin: 0; }

/* ── Email queue monitor (Phase: email automation) ───────────────────────── */
.btn--danger { background: var(--danger); border-color: var(--danger); color: #fff; }
.btn--danger:hover { filter: brightness(.93); }

.eq-stats {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: .6rem;
  margin: .2rem 0 1rem;
}
.eq-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .15rem;
  padding: .6rem .4rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg);
}
.eq-stat-v { font-size: 1.25rem; font-weight: 700; color: var(--ink); line-height: 1; }
.eq-stat-l { font-size: .72rem; color: var(--muted); text-transform: uppercase; letter-spacing: .03em; }
.eq-stat--pending    { background: #fff7ed; border-color: #fed7aa; }
.eq-stat--pending    .eq-stat-v { color: #c2410c; }
.eq-stat--processing { background: #eff6ff; border-color: #bfdbfe; }
.eq-stat--processing .eq-stat-v { color: #1d4ed8; }
.eq-stat--sent       { background: #f0fdf4; border-color: #bbf7d0; }
.eq-stat--sent       .eq-stat-v { color: #15803d; }
.eq-stat--failed     { background: #fef2f2; border-color: #fecaca; }
.eq-stat--failed     .eq-stat-v { color: var(--danger); }

.eq-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: .6rem;
  margin-bottom: .7rem;
}
.eq-tabs { display: flex; flex-wrap: wrap; gap: .35rem; }
.eq-tab {
  padding: .25rem .7rem;
  font-size: .78rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--ink-soft);
  cursor: pointer;
}
.eq-tab:hover { border-color: var(--primary); }
.eq-tab.is-active { background: var(--primary); border-color: var(--primary); color: #fff; }
.eq-tool-actions { display: flex; gap: .4rem; }

.eq-list { display: flex; flex-direction: column; gap: .5rem; max-height: 420px; overflow-y: auto; }
.eq-row {
  display: flex;
  align-items: flex-start;
  gap: .6rem;
  padding: .6rem .7rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}
.eq-row-main { flex: 1; min-width: 0; }
.eq-row-subj {
  font-weight: 600;
  color: var(--ink);
  font-size: .88rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.eq-row-meta { margin-top: .15rem; word-break: break-word; }
.eq-row-err {
  margin-top: .3rem;
  color: var(--danger);
  background: #fef2f2;
  border-radius: 6px;
  padding: .2rem .4rem;
  word-break: break-word;
}
.eq-badge {
  flex-shrink: 0;
  font-size: .68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .03em;
  padding: .15rem .45rem;
  border-radius: 999px;
  border: 1px solid transparent;
}
.eq-badge--pending    { background: #fff7ed; color: #c2410c; border-color: #fed7aa; }
.eq-badge--processing { background: #eff6ff; color: #1d4ed8; border-color: #bfdbfe; }
.eq-badge--sent       { background: #f0fdf4; color: #15803d; border-color: #bbf7d0; }
.eq-badge--failed     { background: #fef2f2; color: var(--danger); border-color: #fecaca; }

@media (max-width: 640px) {
  .eq-stats { grid-template-columns: repeat(3, 1fr); }
}

/* ── Account / Profile Settings ────────────────────────────── */
.acct-avatar-row {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  flex-wrap: wrap;
  margin-top: .6rem;
}
.acct-avatar-wrap {
  flex-shrink: 0;
  width: 88px;
  height: 88px;
  border-radius: 50%;
  overflow: hidden;
  background: var(--surface, #f1f5f9);
  border: 2px solid var(--border, #e2e8f0);
  display: flex;
  align-items: center;
  justify-content: center;
}
.acct-avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.acct-avatar-initials {
  font-size: 1.7rem;
  font-weight: 700;
  color: var(--primary, #1f3a8a);
  line-height: 1;
  user-select: none;
}
.acct-avatar-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: .45rem;
}

/* ── Placement journey (Phase 2) ─────────────────────────────────────────── */
.jr-section { margin: 1.4rem 0 .6rem; font-size: .95rem; color: var(--ink); }
.jr-section:first-of-type { margin-top: .4rem; }

.jr-empty { text-align: center; padding: 2rem 1rem; }
.jr-empty .btn { margin-top: .6rem; }

.jr-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.1rem 1.2rem;
  margin-bottom: 1rem;
  box-shadow: var(--shadow);
}
.jr-card--win { border-color: #bbf7d0; background: linear-gradient(180deg, #f0fdf4 0%, #fff 60px); }

.jr-card-hdr { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; }
.jr-company { font-weight: 700; font-size: 1.05rem; color: var(--ink); }

.jr-win {
  margin: .7rem 0 .2rem; padding: .5rem .8rem;
  background: #dcfce7; border: 1px solid #86efac; border-radius: 8px;
  color: #15803d; font-weight: 600; font-size: .9rem;
}

.jr-badge {
  flex-shrink: 0; font-size: .72rem; font-weight: 700; letter-spacing: .02em;
  padding: .25rem .6rem; border-radius: 999px; border: 1px solid transparent; white-space: nowrap;
}
.jr-badge--applied     { background: #eef2ff; color: #3730a3; border-color: #c7d2fe; }
.jr-badge--shortlisted { background: #eff6ff; color: #1d4ed8; border-color: #bfdbfe; }
.jr-badge--inprocess   { background: #fff7ed; color: #c2410c; border-color: #fed7aa; }
.jr-badge--selected    { background: #f0fdf4; color: #15803d; border-color: #bbf7d0; }
.jr-badge--rejected    { background: #fef2f2; color: var(--danger); border-color: #fecaca; }
.jr-badge--withdrawn   { background: #f3f4f6; color: #6b7280; border-color: #e5e7eb; }

/* timeline */
.jr-timeline { list-style: none; margin: 1rem 0 .2rem; padding: 0 0 0 .4rem; position: relative; }
.jr-step {
  position: relative; padding: 0 0 1.1rem 1.6rem;
}
.jr-step:last-child { padding-bottom: 0; }
/* the vertical connector line */
.jr-step::before {
  content: ""; position: absolute; left: 5px; top: 1.1rem; bottom: -0.1rem;
  width: 2px; background: var(--line);
}
.jr-step:last-child::before { display: none; }

.jr-dot {
  position: absolute; left: 0; top: .15rem;
  width: 12px; height: 12px; border-radius: 50%;
  background: #fff; border: 2px solid var(--muted); box-sizing: border-box;
}
.jr-step--done .jr-dot   { background: var(--muted); border-color: var(--muted); }
.jr-step--applied    .jr-dot { background: #6366f1; border-color: #6366f1; }
.jr-step--shortlisted .jr-dot { background: #3b82f6; border-color: #3b82f6; }
.jr-step--inprocess  .jr-dot { background: #f59e0b; border-color: #f59e0b; }
.jr-step--selected   .jr-dot { background: #16a34a; border-color: #16a34a; }
.jr-step--rejected   .jr-dot { background: var(--danger); border-color: var(--danger); }
.jr-step--withdrawn  .jr-dot { background: #9ca3af; border-color: #9ca3af; }

/* current (latest, still active) step pulses */
.jr-step--current .jr-dot {
  box-shadow: 0 0 0 0 rgba(245, 158, 11, .5);
  animation: jr-pulse 1.8s infinite;
}
@keyframes jr-pulse {
  0%   { box-shadow: 0 0 0 0 rgba(245,158,11,.5); }
  70%  { box-shadow: 0 0 0 7px rgba(245,158,11,0); }
  100% { box-shadow: 0 0 0 0 rgba(245,158,11,0); }
}

.jr-step-title { font-weight: 600; font-size: .92rem; color: var(--ink); }
.jr-step--done:not(.jr-step--selected) .jr-step-title { color: var(--ink-soft); }
.jr-step-date { margin-top: .1rem; }
.jr-step-note { margin-top: .25rem; color: var(--ink-soft); font-style: italic; }

/* ── Manage page tabs (Phase: Manage cleanup) ────────────────────────────── */
.adm-tabbar {
  display: flex; flex-wrap: wrap; gap: .3rem;
  margin: 0 0 1.3rem; border-bottom: 1px solid var(--line);
}
.adm-tabbtn {
  padding: .55rem 1.05rem; border: none; background: none;
  border-bottom: 2px solid transparent; margin-bottom: -1px;
  color: var(--muted); font: inherit; font-weight: 600; font-size: .9rem;
  cursor: pointer; white-space: nowrap;
}
.adm-tabbtn:hover { color: var(--ink); }
.adm-tabbtn.is-active { color: var(--primary); border-bottom-color: var(--primary); }
.adm-tab-panel { display: none; }
.adm-tab-panel.is-active { display: block; }

/* ── Modal footer responsive layout ─────────────────────────────────────── */
@media (max-width: 640px) {
  .modal-foot {
    flex-direction: column;
    align-items: stretch;
    gap: .6rem;
  }
  .modal-foot-actions {
    flex-wrap: wrap;
    gap: .4rem;
  }
  .modal-foot-meta {
    margin-left: 0;
    justify-content: flex-end;
  }
}

/* ── Round details editor (Rounds tab + shortlist modal) ─────────────────── */
.rd-list { display: flex; flex-direction: column; gap: .9rem; }
.rd-card { border: 1px solid var(--line); border-radius: 10px; padding: .9rem 1rem; background: #fff; }
.rd-card-head { display: flex; align-items: center; gap: .5rem; margin-bottom: .7rem; font-size: .95rem; }
.rd-badge {
  display: inline-block; background: #1e3a5f; color: #fff; font-size: .68rem; font-weight: 700;
  padding: .15rem .5rem; border-radius: 999px; letter-spacing: .02em;
}
.rd-grid, .bsr-rd-grid {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: .6rem; margin-bottom: .5rem;
}
.rd-foot { display: flex; align-items: center; gap: .6rem; margin-top: .3rem; }
.rd-status { transition: opacity .2s; }
.bsr-rd { border: 1px solid var(--line); border-radius: 10px; padding: .6rem .8rem; margin: 0 0 .8rem; }
.bsr-rd > summary { cursor: pointer; font-weight: 600; font-size: .9rem; }
.bsr-rd[open] > summary { margin-bottom: .6rem; }
@media (max-width: 560px) { .rd-grid, .bsr-rd-grid { grid-template-columns: 1fr; } }

/* ── Round notification monitor (Rounds tab) ─────────────────────────────── */
.rd-mon { margin-top: .85rem; border-top: 1px dashed var(--line); padding-top: .7rem; }
.rd-mon-head { display: flex; align-items: center; gap: .7rem; flex-wrap: wrap; font-size: .85rem; }
.rd-mon-sum { color: var(--muted); }
.rd-mon-list { margin-top: .6rem; }
.rd-mon-list table { font-size: .85rem; }
.rd-cell-status .muted { margin-top: .15rem; max-width: 240px; }
.vbadge--bad { background: #fee2e2; color: #b91c1c; }

/* ── Student upcoming visits (migration 46) ──────────────────────────────── */
.vis-list { display: flex; flex-direction: column; gap: .7rem; margin-top: .6rem; }
.vis-card { display: flex; gap: .9rem; align-items: flex-start; border: 1px solid var(--line); border-radius: 10px; padding: .8rem .9rem; }
.vis-date {
  flex: 0 0 auto; width: 54px; text-align: center; background: #0f766e; color: #fff;
  border-radius: 8px; padding: .4rem 0; line-height: 1.1;
}
.vis-d { display: block; font-size: 1.25rem; font-weight: 700; }
.vis-m { display: block; font-size: .72rem; text-transform: uppercase; letter-spacing: .03em; }
.vis-co { font-weight: 600; font-size: 1rem; }
.vis-meta { color: var(--muted); font-size: .88rem; margin-top: .1rem; }
.vis-notes { font-size: .88rem; margin-top: .35rem; }

/* ============================================================
   Native-style mobile shell (bottom nav + sheet + onboarding)
   ============================================================ */
.mnav { display: none; }

@media (max-width: 860px) {
  /* Stack the shell; the sidebar is replaced by the bottom bar */
  body.app { display: block; min-height: 100vh; min-height: 100dvh; }
  .sidebar { display: none !important; }
  .app-main { width: 100%; min-height: 100dvh; }

  /* Compact sticky header that respects the notch */
  .app-topbar, .topbar {
    position: sticky; top: 0; z-index: 40;
    padding-top: max(.7rem, env(safe-area-inset-top));
    background: var(--surface); border-bottom: 1px solid var(--line);
  }
  .app-topbar #page-title, .topbar-left { font-weight: 700; }

  /* Content clears the fixed bottom bar */
  .app-main #content, #content { padding: 1rem; padding-bottom: calc(76px + env(safe-area-inset-bottom)); }

  /* Bigger touch targets + no iOS zoom-on-focus */
  .btn { min-height: 42px; }
  input, select, textarea { font-size: 16px; }

  /* Fixed bottom tab bar */
  .mnav {
    display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 60;
    background: var(--surface); border-top: 1px solid var(--line);
    padding-bottom: env(safe-area-inset-bottom);
    box-shadow: 0 -2px 14px rgba(0,0,0,.07);
  }
  .mnav-btn {
    flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px;
    border: none; background: none; padding: .5rem 0 .42rem; cursor: pointer;
    color: var(--muted); font: inherit; font-size: .64rem; font-weight: 600;
    -webkit-tap-highlight-color: transparent;
  }
  .mnav-btn svg { width: 23px; height: 23px; opacity: .75; }
  .mnav-btn span { line-height: 1; }
  .mnav-btn.active { color: var(--primary); }
  .mnav-btn.active svg { opacity: 1; }
  .mnav-btn:active { background: #f1f3f7; }
}

/* "More" bottom sheet (also works if shown on larger screens) */
.mnav-backdrop { position: fixed; inset: 0; background: rgba(15,23,42,.4); z-index: 70; opacity: 0; transition: opacity .2s; }
.mnav-backdrop.show { opacity: 1; }
.mnav-sheet {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 71; background: var(--surface);
  border-radius: 18px 18px 0 0; padding: .4rem 1rem calc(1.1rem + env(safe-area-inset-bottom));
  transform: translateY(100%); transition: transform .25s ease; max-height: 72vh; overflow-y: auto;
  box-shadow: 0 -8px 40px rgba(0,0,0,.18);
}
.mnav-sheet.show { transform: translateY(0); }
.mnav-grab { width: 42px; height: 4px; border-radius: 999px; background: var(--line); margin: .45rem auto .7rem; }
.mnav-sheet-title { font-weight: 700; font-size: .72rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); margin: 0 .2rem .7rem; }
.mnav-sheet-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: .55rem; }
.mnav-sheet-item {
  display: flex; flex-direction: column; align-items: center; gap: .4rem; text-align: center;
  padding: .95rem .4rem; border: 1px solid var(--line); border-radius: 13px;
  background: var(--surface); color: var(--ink); font: inherit; font-size: .7rem; font-weight: 600;
  cursor: pointer; -webkit-tap-highlight-color: transparent;
}
.mnav-sheet-item svg { width: 22px; height: 22px; opacity: .8; }
.mnav-sheet-item:active { background: #f1f3f7; }

/* First-run onboarding */
.onb { position: fixed; inset: 0; z-index: 90; background: var(--bg); display: flex; overflow-y: auto; }
.onb-inner { margin: auto; width: 100%; max-width: 420px; padding: 2rem 1.4rem calc(2rem + env(safe-area-inset-bottom)); text-align: center; }
.onb-logo img { width: 72px; height: 72px; border-radius: 18px; }
.onb-title { margin: 1rem 0 .3rem; font-size: 1.4rem; }
.onb-sub { color: var(--muted); margin: 0 0 1.6rem; }
.onb-row { display: flex; align-items: center; gap: .8rem; text-align: left; border: 1px solid var(--line); border-radius: 13px; padding: .85rem .9rem; margin-bottom: .7rem; }
.onb-ic { flex: 0 0 auto; width: 40px; height: 40px; border-radius: 10px; background: #eef2fb; color: var(--primary); display: grid; place-items: center; }
.onb-ic svg { width: 22px; height: 22px; }
.onb-tx { flex: 1; display: flex; flex-direction: column; }
.onb-tx strong { font-size: .95rem; }
.onb-tx span { color: var(--muted); font-size: .8rem; }
.onb-act { flex: 0 0 auto; }
.onb-note { font-size: .8rem; color: var(--muted); background: #fff7ed; border: 1px solid #fed7aa; border-radius: 10px; padding: .6rem .7rem; margin: .3rem 0 1rem; }
.onb-done { width: 100%; margin-top: .8rem; }
.onb-fine { font-size: .72rem; color: var(--muted); margin: .8rem 0 0; }

/* ============================================================
   Desktop polish + readability + FortifyHub footer
   ============================================================ */
/* Readability: darker secondary text (was #6b7686 — too light) */
:root { --muted: #51607a; --ink-soft: #34425c; }

/* Slightly richer page + surfaces */
body.app { background: linear-gradient(180deg, #f7f9fc 0%, #f4f6f9 100%); }
.sidebar { background: linear-gradient(180deg, #fbfcfe, #f7f9fc); }
.app-topbar { box-shadow: 0 1px 0 rgba(16,24,40,.05); }
#page-title { font-family: var(--font-display); font-weight: 700; color: var(--ink); font-size: 1.18rem; }

/* Sidebar active accent bar + crisper hover */
.side-nav button.active { box-shadow: inset 3px 0 0 var(--primary); }
.side-nav button:hover { background: #eef2f8; }

/* Panels & cards: softer depth, clearer edges, gentle hover for cards */
.panel { border-color: #e7ebf1; box-shadow: 0 1px 2px rgba(16,24,40,.04), 0 6px 18px rgba(16,24,40,.05); }
.panel h3, .panel-head h3 { color: var(--ink); }
.cards .card, .card { transition: box-shadow .15s, transform .15s, border-color .15s; }
.cards .card:hover { box-shadow: 0 6px 20px rgba(16,24,40,.10); border-color: #d7deea; transform: translateY(-1px); }

/* Primary button: subtle gradient for depth */
.btn--primary { background: linear-gradient(180deg, #2a4cab, var(--primary)); border-color: var(--primary); }

/* Stronger body contrast for long text */
.app-main #content { color: var(--ink); }

/* ── App footer (FortifyHub) ─────────────────────────────────────────────── */
.app-footer {
  display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center;
  gap: .5rem 1.2rem; padding: 1rem 1.6rem; margin-top: auto;
  border-top: 1px solid var(--line); background: var(--surface);
  color: var(--muted); font-size: .82rem;
}
.app-footer .af-brand { font-family: var(--font-display); font-weight: 800; color: var(--primary); letter-spacing: .01em; }
.app-footer .af-dot { color: #c3cad6; margin: 0 .15rem; }
.app-footer a { color: var(--ink-soft); text-decoration: none; font-weight: 600; }
.app-footer a:hover { color: var(--primary); text-decoration: underline; }
.app-footer .af-mid { text-align: center; }
@media (max-width: 860px) { .app-footer { display: none; } }

/* Login page footer */
.login-footer { margin-top: 1.4rem; text-align: center; font-size: .8rem; color: var(--muted); }
.login-footer .af-brand { font-family: var(--font-display); font-weight: 800; color: var(--primary); }
.login-footer a { color: var(--ink-soft); font-weight: 600; text-decoration: none; }
.login-footer a:hover { color: var(--primary); text-decoration: underline; }
.app-footer .af-logo { height: 20px; width: auto; vertical-align: middle; }
.login-footer .af-logo { height: 22px; width: auto; vertical-align: middle; }

/* ============================================================
   Modern UI refresh — refined institutional theme
   (token + component layer; appended last so it wins)
   ============================================================ */
:root {
  --radius: 12px;
  --accent: #0f766e;
  --indigo-50: #eef2fb;
  --ring: rgba(31,58,138,.18);
  --elev-1: 0 1px 2px rgba(16,24,40,.05);
  --elev-2: 0 2px 4px rgba(16,24,40,.05), 0 10px 26px rgba(16,24,40,.06);
  --elev-3: 0 14px 28px rgba(16,24,40,.10), 0 28px 56px rgba(16,24,40,.12);
}

/* Atmospheric, layered backgrounds for depth */
body.app {
  background:
    radial-gradient(820px 460px at 100% -8%, rgba(31,58,138,.07), transparent 60%),
    radial-gradient(680px 460px at -6% 108%, rgba(15,118,110,.06), transparent 55%),
    linear-gradient(180deg, #f7f9fc, #f3f6f9);
  background-attachment: fixed;
}
body.landing-page {
  background:
    radial-gradient(900px 520px at 112% -12%, rgba(31,58,138,.10), transparent 60%),
    radial-gradient(720px 520px at -12% 112%, rgba(15,118,110,.07), transparent 55%),
    var(--bg);
  background-attachment: fixed;
}

/* Sharper type hierarchy */
h1 { letter-spacing: -.01em; }
#page-title { font-size: 1.22rem; letter-spacing: -.01em; }
.panel h3, .panel-head h3 { font-size: 1.05rem; letter-spacing: -.005em; }

/* Sidebar: rounded items + accent bar on active */
.side-nav button { border-radius: 10px; }
.side-nav button.active { background: var(--indigo-50); box-shadow: inset 3px 0 0 var(--primary); }

/* Frosted, elevated top bar */
.app-topbar {
  background: rgba(255,255,255,.86);
  -webkit-backdrop-filter: saturate(1.4) blur(9px);
  backdrop-filter: saturate(1.4) blur(9px);
  box-shadow: 0 1px 0 rgba(16,24,40,.06);
}

/* Surfaces: rounder, layered elevation */
.panel { border-radius: 14px; border-color: #e8ecf3; box-shadow: var(--elev-1), var(--elev-2); }
.cards .card { border-radius: 14px; }
.modal { border-radius: 16px; box-shadow: var(--elev-3); }

/* Buttons: depth + crisp focus */
.btn { border-radius: 10px; transition: background .15s, border-color .15s, box-shadow .15s, transform .05s; }
.btn--primary { background: linear-gradient(180deg, #2c4eb0, var(--primary)); border-color: var(--primary); box-shadow: 0 1px 2px rgba(31,58,138,.28); }
.btn--primary:hover { background: linear-gradient(180deg, #27469e, var(--primary-700)); box-shadow: 0 4px 14px rgba(31,58,138,.32); }
:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }

/* Inputs: soft focus ring */
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px var(--ring); }

/* Tables: refined header + clearer row hover */
.data-table thead th { background: #f4f6fb; text-transform: uppercase; font-size: .7rem; letter-spacing: .04em; color: var(--muted); }
.data-table tbody tr:hover { background: #f2f6fd; }

/* Badges a touch stronger */
.badge { font-weight: 700; }

/* Gentle per-page entrance (re-plays on each navigation) */
@keyframes pp-rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: no-preference) {
  .app-main #content > * { animation: pp-rise .30s cubic-bezier(.22,.61,.36,1) both; }
  .app-main #content > *:nth-child(2) { animation-delay: .04s; }
  .app-main #content > *:nth-child(3) { animation-delay: .08s; }
  .app-main #content > *:nth-child(4) { animation-delay: .12s; }
  .app-main #content > *:nth-child(n+5) { animation-delay: .15s; }
}

/* ============================================================
   Staff mobile polish + app-update UI
   ============================================================ */
@media (max-width: 860px) {
  /* Top bar: wrap neatly, full-width search, drop the email text */
  .app-topbar { flex-wrap: wrap; row-gap: .55rem; padding: .65rem 1rem; padding-top: max(.65rem, env(safe-area-inset-top)); }
  .topbar-right { flex-wrap: wrap; width: 100%; justify-content: flex-end; align-items: center; gap: .5rem; }
  .gsearch { flex: 1 1 100%; order: -1; }
  .gsearch input { width: 100%; }
  #user-name { display: none; }

  /* Wide data tables scroll horizontally instead of crushing */
  .data-table { display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; white-space: nowrap; }
  .data-table thead th { position: static; }

  /* Tab strips scroll rather than wrap/cramp */
  .cd-tabs, .adm-tabbar { overflow-x: auto; flex-wrap: nowrap; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
  .cd-tabs::-webkit-scrollbar, .adm-tabbar::-webkit-scrollbar { display: none; }
  .cd-tab, .adm-tabbtn { white-space: nowrap; flex: 0 0 auto; }

  /* Modals become bottom sheets and sit above the tab bar */
  .modal-overlay { place-items: end center; padding: 0; }
  .modal { max-width: none; width: 100%; max-height: 92dvh; border-radius: 16px 16px 0 0; }
}

/* Modal overlay must sit above the fixed bottom nav (z 60) on every size */
.modal-overlay { z-index: 80; }

/* Update-available bar */
.upd-bar {
  position: fixed; left: 50%; transform: translateX(-50%); bottom: 20px; z-index: 66;
  display: flex; align-items: center; gap: .7rem; max-width: calc(100% - 24px);
  background: var(--ink); color: #fff; padding: .6rem .7rem .6rem 1.05rem;
  border-radius: 13px; box-shadow: 0 12px 34px rgba(0,0,0,.28);
}
.upd-bar span { font-size: .88rem; font-weight: 600; white-space: nowrap; }
.upd-bar button { border: none; border-radius: 9px; padding: .5rem .95rem; font: inherit; font-weight: 700; cursor: pointer; }
.upd-bar .u-go { background: linear-gradient(180deg, #2c4eb0, var(--primary)); color: #fff; }
.upd-bar .u-later { background: transparent; color: #c7d0dd; }
@media (max-width: 860px) { .upd-bar { bottom: calc(74px + env(safe-area-inset-bottom)); width: calc(100% - 20px); justify-content: space-between; } }

/* "What's new" sheet */
.wn-overlay { position: fixed; inset: 0; background: rgba(16,24,40,.45); z-index: 85; display: grid; place-items: end center; }
.wn { background: var(--surface); width: 100%; max-width: 460px; border-radius: 16px 16px 0 0; padding: 1.3rem 1.4rem calc(1.4rem + env(safe-area-inset-bottom)); box-shadow: var(--elev-3); }
.wn-tag { font-size: .7rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--primary); }
.wn h3 { margin: .35rem 0 .6rem; font-size: 1.2rem; }
.wn ul { margin: 0 0 1.2rem; padding-left: 1.15rem; color: var(--ink-soft); }
.wn li { margin: .35rem 0; }
.wn .btn { width: 100%; }
@media (min-width: 861px) { .wn-overlay { place-items: center; } .wn { border-radius: 16px; } }

/* ── Phase 1: Career profile sections ─────────────────────────────────────── */
.cf-consent { display:flex; align-items:center; justify-content:space-between; gap:1rem; margin-bottom:14px; }
.cf-pill { font-size:.75rem; font-weight:600; padding:4px 10px; border-radius:999px; background:#eef1f6; color:#51607a; white-space:nowrap; }
.cf-pill--on { background:#e6f4ec; color:#1a7f37; }
.cf-switch { position:relative; display:inline-block; width:44px; height:24px; flex:none; }
.cf-switch input { opacity:0; width:0; height:0; }
.cf-switch span { position:absolute; inset:0; background:#c3cad6; border-radius:999px; transition:.2s; }
.cf-switch span::before { content:""; position:absolute; height:18px; width:18px; left:3px; top:3px; background:#fff; border-radius:50%; transition:.2s; }
.cf-switch input:checked + span { background:var(--primary); }
.cf-switch input:checked + span::before { transform:translateX(20px); }
.cf-section { margin-bottom:14px; }
.cf-section-head { display:flex; align-items:center; justify-content:space-between; margin-bottom:.5rem; }
.cf-item { display:flex; align-items:flex-start; justify-content:space-between; gap:1rem; padding:10px 0; border-top:1px solid var(--line); }
.cf-item:first-child { border-top:0; }
.cf-item-title { font-weight:600; }
.cf-item-line { margin-top:2px; }
.cf-item-actions { display:flex; gap:.75rem; flex:none; }
.as-link { background:none; border:0; padding:0; cursor:pointer; color:var(--primary); font:inherit; }
.cf-del { color:#c0392b; }
.cf-empty { padding:6px 0; }
.btn--sm { padding:.3rem .7rem; font-size:.82rem; }
.cf-form { display:flex; flex-wrap:wrap; gap:.75rem; }
.cf-form .cf-field { display:flex; flex-direction:column; gap:.25rem; width:100%; }
.cf-form .cf-field--half { width:calc(50% - .375rem); }
.cf-form .cf-field label { font-size:.82rem; font-weight:600; color:var(--ink-soft); }
.cf-form input, .cf-form textarea { width:100%; padding:.5rem .6rem; border:1px solid var(--line); border-radius:8px; font:inherit; }
.cf-check { display:flex; align-items:center; gap:.5rem; width:100%; font-size:.9rem; }
.cf-form-actions { display:flex; justify-content:flex-end; gap:.6rem; width:100%; margin-top:.25rem; }
@media (max-width:600px){ .cf-form .cf-field--half { width:100%; } }

/* ── iOS install hint ─────────────────────────────────────────────────────── */
.ios-tip { position:fixed; left:50%; transform:translateX(-50%);
  bottom:calc(env(safe-area-inset-bottom, 0px) + 70px); z-index:90;
  width:min(420px, calc(100vw - 24px)); background:#1f2733; color:#fff;
  border-radius:12px; padding:12px 14px; display:flex; align-items:flex-start; gap:10px;
  box-shadow:0 10px 30px rgba(0,0,0,.25); font-size:.9rem; line-height:1.35; }
.ios-tip-body { display:flex; flex-direction:column; gap:2px; }
.ios-tip-x { margin-left:auto; background:none; border:0; color:#cbd3e1; font-size:1.3rem; line-height:1; cursor:pointer; padding:0 2px; }

/* ── Phase 2: registration-deadline chip ──────────────────────────────────── */
.dl-chip { display:inline-block; font-size:.72rem; font-weight:600; padding:2px 8px; border-radius:999px; background:#eef1f6; color:#51607a; }
.dl-chip--soon { background:#fdeccd; color:#9a6b00; }
.dl-chip--closed { background:#f1d6d6; color:#a23b3b; }

/* ── Phase 3: calendar sync ───────────────────────────────────────────────── */
.oc-actions { display:flex; gap:1rem; align-items:center; flex-wrap:wrap; }
.calsync { margin:.6rem 0 .2rem; padding:.8rem .9rem; background:#f6f8fc; border:1px solid #e7ebf2; border-radius:12px; }
.calsync-inner p { margin:.2rem 0; }
.calsync-url { display:flex; gap:.5rem; margin:.5rem 0; }
.calsync-url input { flex:1; font-size:.82rem; padding:.45rem .6rem; border:1px solid #d8deea; border-radius:8px; background:#fff; color:#51607a; }
.calsync-actions { display:flex; gap:.6rem; align-items:center; flex-wrap:wrap; margin:.3rem 0; }

/* ── Phase 4: interview prep search + summary ─────────────────────────────── */
.exp-search { width:100%; padding:.55rem .75rem; border:1px solid #d8deea; border-radius:10px; font:inherit; margin-bottom:.8rem; background:#fff; }
.exp-search:focus { outline:none; border-color:#2f6df6; box-shadow:0 0 0 3px rgba(47,109,246,.12); }
.exp-summary { background:#f6f8fc; border:1px solid #e7ebf2; border-radius:12px; padding:.7rem .9rem; margin-bottom:.9rem; }
.exp-sum-head { display:flex; gap:.6rem; align-items:baseline; margin-bottom:.45rem; }
.exp-pills { display:flex; gap:.4rem; flex-wrap:wrap; margin-bottom:.35rem; }
.exp-pill { font-size:.74rem; font-weight:600; padding:2px 9px; border-radius:999px; background:#eef1f6; color:#51607a; }
.exp-pill.ok { background:#e6f4ec; color:#1a7f37; }
.exp-pill.mid { background:#e7eefc; color:#2f5fd0; }
.exp-pill.hard { background:#f1d6d6; color:#a23b3b; }
.as-link.danger { color:#c0392b; }

/* ── Phase 4 (completion): "Up next" round schedule on journey cards ───────── */
.jr-next { margin:.2rem 0 .6rem; padding:.6rem .8rem; border-radius:10px;
  background:#eaf2ff; border:1px solid #cfe0ff; }
.jr-next-h { font-weight:700; color:#1f4fb0; font-size:.9rem; }
.jr-next-when { font-weight:600; margin-top:.15rem; }
.jr-next-note { color:#51607a; margin-top:.2rem; }

/* ── Phase 6: NBA accreditation table ─────────────────────────────────────── */
.nba-table th { vertical-align:top; text-align:center; }
.nba-table td { text-align:center; }
.nba-table td:first-child, .nba-table td:nth-child(2) { text-align:left; }
.nba-table tfoot td { background:#f6f8fc; }
.nba-table input { text-align:center; }


