:root {
  --accent: #6d28d9;
  --accent-2: #7c3aed;
  --accent-soft: #ede9fe;
  --accent-softer: #f5f3ff;
  --topbar: #17141f;
  --sidebar: #1f1b2b;
  --bg: #f6f6fb;
  --card: #ffffff;
  --ink: #1a1523;
  --muted: #6b6577;
  --line: #ece9f2;
  --green: #16a34a;
  --green-bg: #e7f7ec;
  --amber: #d97706;
  --amber-bg: #fdf1e0;
  --red: #dc2626;
  --red-bg: #fdecec;
  --blue: #2563eb;
  --shadow: 0 1px 2px rgba(20, 16, 32, .04), 0 8px 24px rgba(20, 16, 32, .05);
  --radius: 16px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent); text-decoration: none; }
button { font-family: inherit; cursor: pointer; }

/* ---------- top bar ---------- */
.topbar {
  height: 46px;
  background: var(--topbar);
  display: flex;
  align-items: center;
  padding: 0 18px;
  gap: 14px;
  color: #cfc9db;
  font-size: 13px;
}
.topbar .brand-dot {
  width: 10px; height: 10px; border-radius: 50%;
  background: var(--accent-2);
  box-shadow: 0 0 0 4px rgba(124,58,237,.25);
}
.topbar .url {
  background: #2a2536;
  border-radius: 8px;
  padding: 5px 12px;
  color: #b9b2c9;
  font-size: 12px;
  flex: 0 1 460px;
  text-align: center;
}
.topbar .spacer { flex: 1; }
.topbar .top-right { display: flex; align-items: center; gap: 14px; }
.topbar .avatar {
  width: 24px; height: 24px; border-radius: 50%;
  background: linear-gradient(135deg, var(--accent-2), #a78bfa);
  display: grid; place-items: center; color: #fff; font-size: 11px; font-weight: 700;
}

/* ---------- layout ---------- */
.shell { display: flex; min-height: calc(100vh - 46px); }

.sidebar {
  width: 64px;
  background: var(--sidebar);
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 16px 0;
  gap: 6px;
  flex-shrink: 0;
}
.sidebar .logo {
  width: 38px; height: 38px; border-radius: 11px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  display: grid; place-items: center;
  color: #fff; font-weight: 800; font-size: 15px;
  margin-bottom: 14px;
}
.sidebar .ico {
  width: 40px; height: 40px; border-radius: 11px;
  display: grid; place-items: center;
  color: #8b849c; font-size: 17px;
  position: relative;
}
.sidebar .ico:hover { background: #2a2536; color: #cbb8f5; }
.sidebar .ico.active { background: rgba(124,58,237,.18); color: #c4b5fd; }
.sidebar .ico .badge {
  position: absolute; top: 3px; right: 3px;
  background: var(--red); color: #fff;
  font-size: 9px; font-weight: 700;
  border-radius: 8px; padding: 1px 4px;
}
.sidebar .grow { flex: 1; }

.main { flex: 1; min-width: 0; padding: 26px 30px 60px; }

/* ---------- header ---------- */
.page-head {
  display: flex; align-items: center; gap: 14px; margin-bottom: 22px;
}
.page-head h1 { font-size: 24px; margin: 0; letter-spacing: -.3px; }
.status-badge {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--accent-soft); color: var(--accent);
  font-size: 12px; font-weight: 600;
  padding: 5px 11px; border-radius: 999px;
}
.status-badge .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); }
.status-badge.live { background: var(--green-bg); color: var(--green); }
.status-badge.live .dot { background: var(--green); }
.page-head .spacer { flex: 1; }
.pill-btn {
  border: 1px solid var(--line); background: #fff; color: var(--ink);
  border-radius: 999px; padding: 8px 16px; font-size: 13px; font-weight: 600;
}
.pill-btn.primary { background: var(--accent); color: #fff; border-color: var(--accent); }
.pill-btn.primary:hover { background: var(--accent-2); }

.sub { color: var(--muted); font-size: 13px; margin: -12px 0 22px; }

/* ---------- tabs ---------- */
.tabs { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.tab {
  border: none; background: transparent; color: var(--muted);
  font-size: 13.5px; font-weight: 600; padding: 8px 12px; border-radius: 9px;
  display: inline-flex; align-items: center; gap: 7px;
}
.tab:hover { background: #efecf6; color: var(--ink); }
.tab.active { color: var(--accent); background: var(--accent-softer); }
.tab .count {
  background: #ece9f2; color: var(--muted); border-radius: 7px;
  padding: 1px 7px; font-size: 11px; font-weight: 700;
}
.tab.active .count { background: var(--accent-soft); color: var(--accent); }

/* ---------- stat cards ---------- */
.stats { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 18px; margin-bottom: 26px; }
.stat-card {
  background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 20px 22px; border: 1px solid var(--line);
}
.stat-card .label { color: var(--muted); font-size: 13px; font-weight: 600; display: flex; align-items: center; gap: 7px; }
.stat-card .label .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); }
.stat-card .value { font-size: 34px; font-weight: 750; margin-top: 12px; letter-spacing: -1px; }
.stat-card .hint { color: var(--muted); font-size: 12.5px; margin-top: 4px; }
.stat-card.feature { background: linear-gradient(135deg, #fbfaff, #f4f1fe); }

/* ---------- table ---------- */
.panel { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); border: 1px solid var(--line); overflow: hidden; }
.panel-tools { display: flex; align-items: center; justify-content: space-between; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.search {
  border: 1px solid var(--line); border-radius: 10px; padding: 8px 12px;
  font-size: 13px; width: 260px; background: #fbfafd;
}
.jt { width: 100%; border-collapse: collapse; }
.jt th {
  text-align: left; font-size: 11.5px; text-transform: uppercase; letter-spacing: .4px;
  color: var(--muted); font-weight: 700; padding: 12px 18px; border-bottom: 1px solid var(--line);
  background: #fbfafd;
}
.jt td { padding: 15px 18px; border-bottom: 1px solid var(--line); font-size: 14px; vertical-align: middle; }
.jt tr:last-child td { border-bottom: none; }
.jt tbody tr:hover { background: #faf9fd; cursor: pointer; }
.jt th.right, .jt td.right { text-align: right; }

.company { display: flex; align-items: center; gap: 11px; }
.logo-initial {
  width: 34px; height: 34px; border-radius: 9px; flex-shrink: 0;
  display: grid; place-items: center; color: #fff; font-weight: 700; font-size: 14px;
}
.company .cname { font-weight: 600; }
.company .cmeta { color: var(--muted); font-size: 12px; }

.job-cell { display: flex; align-items: center; gap: 10px; }
.job-title { font-weight: 500; }
.match {
  display: inline-flex; align-items: center; gap: 3px;
  font-size: 12px; font-weight: 700; padding: 2px 8px; border-radius: 999px;
}
.match.green { color: var(--green); background: var(--green-bg); }
.match.amber { color: var(--amber); background: var(--amber-bg); }
.match.red { color: var(--red); background: var(--red-bg); }

.status-pill {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 12px; font-weight: 600; padding: 4px 10px; border-radius: 999px;
  background: #eef0f4; color: var(--muted);
}
.status-pill.submitted { background: var(--green-bg); color: var(--green); }
.status-pill.preparing { background: var(--amber-bg); color: var(--amber); }
.status-pill .dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }

.updated { color: var(--muted); font-size: 13px; }

.row-actions { display: flex; align-items: center; gap: 8px; justify-content: flex-end; }
.icon-btn {
  width: 30px; height: 30px; border-radius: 8px; border: 1px solid var(--line);
  background: #fff; display: grid; place-items: center; color: var(--muted); font-size: 13px;
}
.icon-btn:hover { border-color: var(--accent); color: var(--accent); }
.open-btn {
  border: 1px solid var(--line); background: #fff; color: var(--ink);
  border-radius: 8px; padding: 6px 14px; font-size: 13px; font-weight: 600;
}
.open-btn:hover { border-color: var(--accent); color: var(--accent); }

.verify-tag { display: inline-flex; align-items: center; gap: 5px; color: var(--green); font-size: 12px; font-weight: 600; }

/* ---------- modal ---------- */
.overlay {
  position: fixed; inset: 0; background: rgba(24,18,38,.5);
  display: none; align-items: flex-start; justify-content: center;
  padding: 40px 20px; z-index: 50; overflow-y: auto;
}
.overlay.open { display: flex; }
.modal {
  background: #fff; border-radius: 18px; width: min(920px, 100%);
  box-shadow: 0 24px 70px rgba(20,16,32,.35); overflow: hidden;
}
.modal-head {
  padding: 22px 26px; border-bottom: 1px solid var(--line);
  display: flex; align-items: flex-start; gap: 14px;
}
.modal-head .close {
  margin-left: auto; border: none; background: #f1eff6; color: var(--muted);
  width: 32px; height: 32px; border-radius: 9px; font-size: 16px;
}
.modal-head .close:hover { background: #e7e3f0; color: var(--ink); }
.modal-title { font-size: 19px; font-weight: 700; }
.modal-subtitle { color: var(--muted); font-size: 13px; margin-top: 3px; }
.modal-meta { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.chip { font-size: 12px; font-weight: 600; background: var(--accent-softer); color: var(--accent); padding: 4px 10px; border-radius: 999px; }
.chip.gray { background: #f1eff6; color: var(--muted); }

.modal-tabs { display: flex; gap: 4px; padding: 12px 26px 0; border-bottom: 1px solid var(--line); }
.mtab { border: none; background: transparent; color: var(--muted); font-weight: 600; font-size: 13.5px; padding: 10px 14px; border-bottom: 2px solid transparent; }
.mtab.active { color: var(--accent); border-bottom-color: var(--accent); }
.modal-body { padding: 24px 30px 32px; max-height: 62vh; overflow-y: auto; }
.mpane { display: none; }
.mpane.active { display: block; }

/* rendered markdown / resume */
.doc { font-size: 14px; line-height: 1.6; color: #2b2438; }
.doc h1 { font-size: 22px; margin: 0 0 4px; }
.doc h2 { font-size: 15px; text-transform: uppercase; letter-spacing: .5px; color: var(--accent); margin: 20px 0 8px; padding-bottom: 5px; border-bottom: 1px solid var(--line); }
.doc h3 { font-size: 15px; margin: 14px 0 3px; }
.doc p { margin: 6px 0; }
.doc ul { margin: 6px 0; padding-left: 20px; }
.doc li { margin: 3px 0; }
.doc strong { color: var(--ink); }
.doc hr { border: none; border-top: 1px solid var(--line); margin: 16px 0; }
.doc em { color: var(--muted); }

.qa { border: 1px solid var(--line); border-radius: 12px; padding: 16px 18px; margin-bottom: 14px; background: #fbfafd; }
.qa .q { font-weight: 600; margin-bottom: 8px; }
.qa .a { color: #33294a; font-size: 13.5px; line-height: 1.55; }
.qa .facts { margin-top: 10px; display: flex; gap: 6px; flex-wrap: wrap; }
.qa .facts .f { font-size: 11px; font-weight: 700; background: var(--accent-soft); color: var(--accent); border-radius: 6px; padding: 2px 7px; }

/* ---------- login ---------- */
.login-wrap { min-height: 100vh; display: grid; place-items: center; background: radial-gradient(1200px 600px at 50% -10%, #2a1e46, #14101f 60%); padding: 24px; }
.login-card {
  background: #fff; width: min(400px, 100%); border-radius: 20px; padding: 34px 32px;
  box-shadow: 0 30px 80px rgba(0,0,0,.4);
}
.login-brand { display: flex; align-items: center; gap: 12px; margin-bottom: 6px; }
.login-brand .logo { width: 42px; height: 42px; border-radius: 12px; background: linear-gradient(135deg, var(--accent), var(--accent-2)); display: grid; place-items: center; color: #fff; font-weight: 800; font-size: 17px; }
.login-brand .n { font-size: 20px; font-weight: 800; letter-spacing: -.3px; }
.login-sub { color: var(--muted); font-size: 13.5px; margin: 8px 0 22px; }
.login-card label { font-size: 12.5px; font-weight: 600; color: var(--muted); }
.login-card input {
  width: 100%; margin-top: 7px; padding: 12px 14px; border: 1px solid var(--line);
  border-radius: 11px; font-size: 14px; background: #fbfafd;
}
.login-card input:focus { outline: none; border-color: var(--accent); background: #fff; }
.login-btn {
  width: 100%; margin-top: 18px; padding: 12px; border: none; border-radius: 11px;
  background: var(--accent); color: #fff; font-weight: 700; font-size: 14px;
}
.login-btn:hover { background: var(--accent-2); }
.login-btn:disabled { opacity: .6; }
.login-err { color: var(--red); font-size: 13px; margin-top: 12px; min-height: 18px; text-align: center; }
.login-foot { text-align: center; color: var(--muted); font-size: 12px; margin-top: 18px; }

/* primary recruiter CTA (password-free guest access) */
.guest-cta {
  display: block; width: 100%; margin-top: 8px; padding: 15px 18px; box-sizing: border-box;
  border: none; border-radius: 13px; text-align: center; cursor: pointer;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #fff; font-weight: 800; font-size: 15px; letter-spacing: -.2px;
  text-decoration: none; box-shadow: 0 10px 24px rgba(109,40,217,.35);
  transition: transform .08s ease, box-shadow .12s ease;
}
.guest-cta:hover { transform: translateY(-1px); box-shadow: 0 14px 30px rgba(109,40,217,.42); }
.guest-cta.loading { opacity: .75; pointer-events: none; }
.guest-cta-note { text-align: center; color: var(--muted); font-size: 12px; margin-top: 8px; }

/* divider separating the public CTA from the private owner login */
.login-divider {
  display: flex; align-items: center; gap: 12px; margin: 22px 0 6px;
  color: var(--muted); font-size: 11.5px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .6px;
}
.login-divider::before, .login-divider::after {
  content: ""; flex: 1; height: 1px; background: var(--line);
}
.owner-login { margin-top: 8px; }

/* ---------- guest showcase ---------- */
.showcase { max-width: 1000px; margin: 0 auto; }
.hero {
  background: linear-gradient(135deg, #241a41, #16101f);
  color: #fff; border-radius: 22px; padding: 44px 44px 40px; position: relative; overflow: hidden;
}
.hero::after { content: ""; position: absolute; right: -80px; top: -80px; width: 300px; height: 300px; border-radius: 50%; background: radial-gradient(circle, rgba(124,58,237,.5), transparent 70%); }
.hero .kicker { display: inline-flex; align-items: center; gap: 7px; background: rgba(124,58,237,.25); color: #d6c8ff; font-size: 12px; font-weight: 600; padding: 6px 12px; border-radius: 999px; }
.hero h1 { font-size: 36px; margin: 16px 0 8px; letter-spacing: -.6px; }
.hero p { color: #c9c2da; font-size: 15px; line-height: 1.6; max-width: 620px; }
.hero .hero-meta { display: flex; gap: 22px; margin-top: 22px; flex-wrap: wrap; }
.hero .hm .n { font-size: 26px; font-weight: 750; }
.hero .hm .l { font-size: 12px; color: #a99fc4; }

.g-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin: 24px 0; }
.g-stat { background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 20px; box-shadow: var(--shadow); }
.g-stat .v { font-size: 30px; font-weight: 750; letter-spacing: -1px; }
.g-stat .l { color: var(--muted); font-size: 13px; margin-top: 4px; }
.g-stat .v.accent { color: var(--accent); }

.section { margin: 34px 0; }
.section h2 { font-size: 20px; letter-spacing: -.3px; }
.section .lead { color: var(--muted); font-size: 14px; margin-top: 4px; }

.pipeline { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-top: 18px; }
.step { background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 20px; box-shadow: var(--shadow); position: relative; }
.step .num { width: 30px; height: 30px; border-radius: 9px; background: var(--accent-soft); color: var(--accent); font-weight: 800; display: grid; place-items: center; font-size: 14px; }
.step .agent { font-size: 12px; font-weight: 700; color: var(--accent); margin-top: 12px; text-transform: uppercase; letter-spacing: .4px; }
.step h3 { font-size: 16px; margin: 4px 0 8px; }
.step p { color: var(--muted); font-size: 13px; line-height: 1.55; margin: 0; }

.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.card { background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 24px; box-shadow: var(--shadow); }
.card h3 { margin: 0 0 14px; font-size: 17px; }
.taglist { display: flex; flex-wrap: wrap; gap: 8px; }
.taglist .t { background: var(--accent-softer); color: var(--accent); font-size: 13px; font-weight: 600; padding: 6px 12px; border-radius: 999px; }
.rolelist { list-style: none; padding: 0; margin: 0; }
.rolelist li { padding: 9px 0; border-bottom: 1px solid var(--line); font-size: 14px; display: flex; align-items: center; gap: 10px; }
.rolelist li:last-child { border-bottom: none; }
.rolelist li .b { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); }
.projlist { list-style: none; padding: 0; margin: 0; }
.projlist li { padding: 11px 14px; border: 1px solid var(--line); border-radius: 11px; margin-bottom: 10px; font-size: 13.5px; font-weight: 600; background: #fbfafd; }

.guest-foot { text-align: center; color: var(--muted); font-size: 13px; margin: 40px 0 10px; }

@media (max-width: 860px) {
  .stats, .g-stats, .pipeline, .two-col { grid-template-columns: 1fr; }
  .sidebar { display: none; }
}
