:root {
  --bg: #f5f7fa;
  --card: #ffffff;
  --text: #16304d;
  --muted: #51617a;
  --border: #dbe2ea;
  --primary: #2c6099;
  --primary-dark: #16304d;
  --success: #16a34a;
  --warn: #d97706;
  --danger: #b3452f;
  --radius: 8px;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
}
.login-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
}
.login-card {
  background: var(--card);
  padding: 2.5rem;
  border-radius: var(--radius);
  box-shadow: 0 4px 20px rgba(0,0,0,0.06);
  width: 100%;
  max-width: 420px;
  margin: 0 1.25rem;
}
.login-card h1 {
  font-size: 1.3rem;
  margin: 0 0 0.25rem;
}
.login-card p.sub {
  color: var(--muted);
  font-size: 0.85rem;
  margin: 0 0 1.5rem;
}
label { font-size: 0.8rem; color: var(--muted); display: block; margin: 0.75rem 0 0.25rem; }
input, select, textarea {
  width: 100%;
  padding: 0.6rem 0.7rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 0.9rem;
  background: #fff;
  color: var(--text);
}
button {
  cursor: pointer;
  border: none;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 600;
}
.btn-primary {
  background: var(--primary);
  color: #fff;
  padding: 0.65rem 1rem;
  width: 100%;
  margin-top: 1.25rem;
}
.btn-primary:hover { background: var(--primary-dark); }
.error-msg { color: var(--danger); font-size: 0.82rem; margin-top: 0.75rem; min-height: 1em; }
.demo-accounts {
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 1px dashed var(--border);
  font-size: 0.75rem;
  color: var(--muted);
  line-height: 1.6;
}
.demo-accounts b { color: var(--text); }

/* App shell */
.app { display: flex; min-height: 100vh; }
.sidebar {
  width: 220px;
  background: #16304d;
  color: #fff;
  padding: 1.5rem 1rem;
  flex-shrink: 0;
}
.sidebar h2 { font-size: 1rem; margin: 0 0 0.2rem; }
.sidebar .role-tag {
  font-size: 0.7rem;
  color: #9dc3e6;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 1.5rem;
}
.sidebar nav a {
  display: block;
  color: #cbd5e1;
  text-decoration: none;
  padding: 0.55rem 0.7rem;
  border-radius: 8px;
  font-size: 0.88rem;
  margin-bottom: 0.2rem;
  cursor: pointer;
}
.sidebar nav a.active, .sidebar nav a:hover { background: rgba(255,255,255,0.08); color: #fff; }
.sidebar .logout {
  margin-top: 2rem;
  color: #f87171;
  font-size: 0.8rem;
  cursor: pointer;
}
.main { flex: 1; padding: 2rem 2.5rem;  }

/* Dashboard top bar + "My Account" menu (shared across agency/client/candidate) */
.topbar {
  display: flex; justify-content: flex-end; align-items: center;
  background: var(--primary); color: #fff;
  margin: -2rem -2.5rem 2rem; padding: 0.85rem 2.5rem;
}
.account-menu { position: relative; }
.account-btn {
  display: flex; align-items: center; gap: 0.55rem;
  background: transparent; border: none; color: #fff;
  cursor: pointer; font-size: 0.87rem; font-weight: 600;
  padding: 0.35rem 0.6rem; border-radius: 8px;
}
.account-btn:hover { background: rgba(255,255,255,0.14); }
.account-avatar {
  width: 28px; height: 28px; border-radius: 50%;
  background: rgba(255,255,255,0.25);
  display: flex; align-items: center; justify-content: center;
  font-size: 0.75rem; font-weight: 700; flex-shrink: 0;
}
.account-dropdown {
  display: none; position: absolute; right: 0; top: calc(100% + 0.5rem);
  background: #fff; border: 1px solid var(--border); border-radius: 10px;
  box-shadow: 0 10px 28px rgba(15,23,42,0.16); min-width: 190px; overflow: hidden; z-index: 60;
}
.account-dropdown.show { display: block; }
.account-dropdown a {
  display: block; padding: 0.7rem 1rem; font-size: 0.85rem;
  color: var(--text); text-decoration: none; cursor: pointer;
}
.account-dropdown a:hover { background: #f3f5f8; }
.account-dropdown a.danger { color: #b3452f; }
@media (max-width: 640px) {
  .topbar { margin: -1.25rem -1.25rem 1.5rem; padding: 0.75rem 1.25rem; }
}
.main h1 { font-size: 1.4rem; margin: 0 0 0.3rem; }
.main .sub { color: var(--muted); font-size: 0.88rem; margin-bottom: 1.75rem; }

.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 1rem; margin-bottom: 2rem; }
.stat-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem 1.1rem;
}
.stat-card .label { font-size: 0.75rem; color: var(--muted); }
.stat-card .value { font-size: 1.5rem; font-weight: 700; margin-top: 0.2rem; }

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
  margin-bottom: 1.5rem;
}
.card h3 { margin: 0 0 1rem; font-size: 1rem; }

table { width: 100%; border-collapse: collapse; font-size: 0.87rem; }
th, td { text-align: left; padding: 0.6rem 0.5rem; border-bottom: 1px solid var(--border); }
th { color: var(--muted); font-weight: 600; font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.03em; }
.badge {
  display: inline-block;
  padding: 0.15rem 0.55rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 600;
}
.badge.available, .badge.open, .badge.paid { background: #dcfce7; color: var(--success); }
.badge.placed, .badge.fulfilled, .badge.active { background: #dbe7f2; color: var(--primary); }
.badge.unpaid { background: #fef3c7; color: var(--warn); }

.form-row { display: flex; gap: 1rem; }
.form-row > div { flex: 1; }
.btn-sm {
  background: var(--primary);
  color: #fff;
  padding: 0.4rem 0.8rem;
  font-size: 0.8rem;
}
.btn-sm.secondary { background: #e5e7eb; color: var(--text); }
.toolbar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1rem; }
.empty { color: var(--muted); font-size: 0.85rem; padding: 1rem 0; text-align: center; }
.modal-backdrop {
  display: none;
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.4);
  align-items: center; justify-content: center;
  z-index: 50;
}
.modal-backdrop.show { display: flex; }
.modal {
  background: #fff;
  border-radius: var(--radius);
  padding: 1.5rem;
  width: 400px;
  max-height: 85vh;
  overflow-y: auto;
}
.modal h3 { margin-top: 0; }
.modal-actions { display: flex; gap: 0.6rem; margin-top: 1.25rem; justify-content: flex-end; }

/* ===================== Public marketing site ===================== */
.site-header {
  position: sticky; top: 0; z-index: 40;
  background: #fff;
  border-bottom: 1px solid var(--border);
}
.site-header .wrap {
  max-width: 1160px; margin: 0 auto; padding: 0 2rem;
  display: flex; align-items: center; justify-content: space-between; height: 68px;
}
.brand { display: flex; align-items: center; gap: 0.55rem; text-decoration: none; color: var(--text); font-weight: 700; font-size: 1.05rem; }
.brand .mark {
  width: 32px; height: 32px; border-radius: 8px;
  background: var(--primary);
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-weight: 800; font-size: 0.95rem;
}
.brand-logo { height: 65px; width: auto; max-width: 260px; object-fit: contain; display: block; }
.site-footer .brand-logo { filter: brightness(0) invert(1); }
.login-card .brand-logo { margin-bottom: 0.25rem; }
.sidebar .brand-logo { filter: brightness(0) invert(1); }
.site-nav { display: flex; align-items: center; gap: 1.9rem; }
.site-nav a { color: var(--text); text-decoration: none; font-size: 0.9rem; font-weight: 500; }
.site-nav a:hover { color: var(--primary); }
.site-nav a.active { color: var(--primary); font-weight: 700; }
.header-actions { display: flex; align-items: center; gap: 0.7rem; }
.btn { display: inline-block; text-decoration: none; border-radius: 8px; font-weight: 600; font-size: 0.87rem; padding: 0.55rem 1.05rem; border: 1px solid transparent; cursor: pointer; }
.btn-ghost { color: var(--text); border-color: var(--border); background: #fff; }
.btn-ghost:hover { border-color: var(--primary); color: var(--primary); }
.btn-fill { background: var(--primary); color: #fff; }
.btn-fill:hover { background: var(--primary-dark); }
.btn-lg { padding: 0.75rem 1.4rem; font-size: 0.95rem; }

.mobile-toggle { display: none; }

.site-footer { background: #101c2b; color: #cbd5e1; padding: 3rem 2rem 1.5rem; margin-top: 4rem; }
.site-footer .wrap { max-width: 1160px; margin: 0 auto; display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 2rem; }
.site-footer h4 { color: #fff; font-size: 0.85rem; margin: 0 0 0.9rem; }
.site-footer p, .site-footer a { color: #97a0b3; font-size: 0.85rem; line-height: 1.8; text-decoration: none; }
.site-footer a:hover { color: #fff; }
.site-footer .bottom { max-width: 1160px; margin: 2.5rem auto 0; padding-top: 1.5rem; border-top: 1px solid #262a3a; font-size: 0.78rem; color: #6b7280; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 0.5rem; }

.section { max-width: 1160px; margin: 0 auto; padding: 5rem 2rem; }
.section.tight { padding: 3.5rem 2rem; }
.section-head { max-width: 620px; margin-bottom: 2.75rem; }
.eyebrow { color: var(--primary); font-size: 0.78rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; margin-bottom: 0.6rem; }
.section-head h2 { font-size: 2rem; margin: 0 0 0.75rem; letter-spacing: -0.01em; }
.section-head p { color: var(--muted); font-size: 1rem; line-height: 1.6; margin: 0; }

.hero { background: linear-gradient(180deg, #f5f7fa 0%, #eaf0f6 100%); border-bottom: 1px solid var(--border); }
.hero .wrap { max-width: 1160px; margin: 0 auto; padding: 5.5rem 2rem; display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 3rem; align-items: center; }
.hero h1 { font-size: 2.9rem; line-height: 1.12; margin: 0 0 1.15rem; letter-spacing: -0.02em; }
.hero h1 span { color: var(--primary); }
.hero p.lead { font-size: 1.08rem; color: var(--muted); line-height: 1.65; margin: 0 0 2rem; max-width: 480px; }
.hero .cta-row { display: flex; gap: 0.85rem; flex-wrap: wrap; }
.hero-stats { display: flex; gap: 2rem; margin-top: 2.75rem; }
.hero-stats div b { display: block; font-size: 1.5rem; }
.hero-stats div span { font-size: 0.78rem; color: var(--muted); }
.hero-visual {
  background: #fff; border: 1px solid var(--border); border-radius: 16px;
  padding: 1.75rem; box-shadow: 0 20px 45px rgba(30,27,75,0.09);
}
.hero-visual .hv-row { display: flex; justify-content: space-between; align-items: center; padding: 0.8rem 0; border-bottom: 1px solid var(--border); font-size: 0.85rem; }
.hero-visual .hv-row:last-child { border-bottom: none; }
.hero-visual .hv-title { font-size: 0.78rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 0.4rem; }

.page-header { background: #f6f7fb; border-bottom: 1px solid var(--border); padding: 3.5rem 2rem; text-align: center; }
.page-header h1 { font-size: 2.1rem; margin: 0 0 0.6rem; }
.page-header p { color: var(--muted); max-width: 560px; margin: 0 auto; }

.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.5rem; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.75rem; }

.pub-card { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 1.6rem; }
.pub-card .icon { width: 42px; height: 42px; border-radius: 10px; background: #e7eef5; color: var(--primary); display: flex; align-items: center; justify-content: center; font-size: 1.2rem; margin-bottom: 1rem; }
.pub-card h3 { font-size: 1.02rem; margin: 0 0 0.5rem; }
.pub-card p { color: var(--muted); font-size: 0.88rem; line-height: 1.6; margin: 0; }

.stat-strip { background: #fff; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.stat-strip .wrap { max-width: 1160px; margin: 0 auto; padding: 2.5rem 2rem; display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; text-align: center; }
.stat-strip b { display: block; font-size: 1.8rem; color: var(--text); }
.stat-strip span { font-size: 0.78rem; color: var(--muted); }

.steps { counter-reset: step; }
.step { display: flex; gap: 1.1rem; margin-bottom: 1.75rem; }
.step .num { counter-increment: step; flex-shrink: 0; width: 34px; height: 34px; border-radius: 50%; background: var(--primary); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 0.9rem; }
.step .num::before { content: counter(step); }
.step h4 { margin: 0.1rem 0 0.35rem; font-size: 0.98rem; }
.step p { margin: 0; color: var(--muted); font-size: 0.87rem; line-height: 1.55; }

.cta-band { background: linear-gradient(135deg, #16304d, #2c6099); color: #fff; border-radius: 12px; padding: 3.5rem; text-align: center; margin: 0 2rem; }
.cta-band h2 { font-size: 1.8rem; margin: 0 0 0.6rem; }
.cta-band p { color: #c7cbe0; margin: 0 0 1.75rem; }

.job-card { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 1.4rem 1.6rem; margin-bottom: 1rem; }
.job-card .job-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; margin-bottom: 0.6rem; }
.job-card h3 { margin: 0 0 0.25rem; font-size: 1.05rem; }
.job-card .meta { color: var(--muted); font-size: 0.82rem; }
.job-card .pay { font-weight: 700; font-size: 1rem; color: var(--text); white-space: nowrap; }
.job-card p.desc { color: var(--muted); font-size: 0.88rem; line-height: 1.6; margin: 0.6rem 0 0.9rem; }
.chip { display: inline-block; background: #e7eef5; color: var(--primary); font-size: 0.75rem; font-weight: 600; padding: 0.22rem 0.6rem; border-radius: 999px; margin: 0 0.35rem 0.35rem 0; }
.job-card .job-bottom { display: flex; justify-content: space-between; align-items: center; margin-top: 0.9rem; }

.public-form { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 2rem; max-width: 620px; }
.public-form .form-row { gap: 1.1rem; margin-bottom: 0.2rem; }

.testimonial { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 1.75rem; }
.testimonial p.quote { font-size: 0.95rem; line-height: 1.65; margin: 0 0 1.1rem; color: var(--text); }
.testimonial .who { display: flex; align-items: center; gap: 0.7rem; }
.testimonial .avatar { width: 38px; height: 38px; border-radius: 50%; background: #e7eef5; color: var(--primary); display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 0.85rem; }
.testimonial .who b { display: block; font-size: 0.85rem; }
.testimonial .who span { font-size: 0.78rem; color: var(--muted); }

.status-note { border-radius: 10px; padding: 0.9rem 1.1rem; font-size: 0.85rem; margin-bottom: 1.25rem; }
.status-note.info { background: #e7eef5; color: #1f3a57; }
.status-note.success { background: #dcfce7; color: #166534; }

@media (max-width: 900px) {
  .hero .wrap { grid-template-columns: 1fr; }
  .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .site-footer .wrap { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  .site-nav { display: none; }
  .grid-3, .grid-4, .grid-2 { grid-template-columns: 1fr; }
  .site-footer .wrap { grid-template-columns: 1fr; }
  .hero h1 { font-size: 2.1rem; }
}
