: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 {
  font-family: var(--font-body); font-size: .85rem; font-weight: 600;
  border: 1px solid var(--line); background: var(--surface); color: var(--ink-soft);
  padding: .5rem .8rem; border-radius: 8px; cursor: pointer; transition: .15s;
}
.btn:hover { border-color: #c9cfd8; background: #fbfcfd; }
.btn--primary { background: var(--primary); border-color: var(--primary); color: #fff; }
.btn--primary:hover { background: var(--primary-700); border-color: var(--primary-700); }
.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; 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; }
.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; justify-content: flex-end; gap: .5rem; margin-top: 1rem; }
.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: .4rem .55rem; }
.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: .55rem; background: #15233b; color: #fff; padding: .5rem .9rem; border-radius: 11px; text-decoration: none; transition: background .15s; }
.poweredby:hover { background: #1d2c47; }
.poweredby svg { color: #5b8def; flex-shrink: 0; }
.poweredby .pb-text { display: flex; flex-direction: column; line-height: 1.1; }
.poweredby .pb-label { font-size: .58rem; letter-spacing: .14em; opacity: .65; }
.poweredby .pb-name { font-family: var(--font-display); font-weight: 600; font-size: .92rem; }

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