:root {
  --primary: #1f3a93;
  --primary-dark: #16295e;
  --accent: #ff7f11;
  --bg: #f4f6fb;
  --card-bg: #ffffff;
  --text: #1c1f2b;
  --muted: #6b7280;
  --border: #e2e5ec;
  --candidate: #2e86de;
  --recruiter: #10ac84;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; min-height: 100%; }
body {
  font-family: "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg); color: var(--text);
  display: flex; flex-direction: column; min-height: 100vh;
}
#navbar { position: sticky; top: 0; z-index: 100; }
.navbar {
  background: var(--primary); color: #fff;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0.75rem 1.5rem; box-shadow: 0 2px 6px rgba(0,0,0,0.15);
}
.navbar .brand { font-size: 1.25rem; font-weight: 700; text-decoration: none; color: #fff; letter-spacing: 0.5px; background:none; border:none; cursor:pointer; padding:0; display:flex; align-items:center; gap:0.5rem; font-family: "Baskerville Old Face", Baskerville, "Libre Baskerville", Georgia, serif; }
.navbar .brand-mark { width: 30px; height: 30px; object-fit: contain; }
.navbar .brand-text { color: #FFAE51; }
.navbar .brand-accent { color: #93E294; }
.nav-right { display: flex; align-items: center; gap: 0.9rem; }
.nav-link {
  color: #fff; text-decoration: none; font-size: 0.95rem; padding: 0.5rem 0.9rem;
  border-radius: 6px; transition: background 0.15s ease; background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.25); cursor: pointer; font-family: inherit;
}
.nav-link:hover { background: rgba(255,255,255,0.18); }
.avatar-circle {
  width: 38px; height: 38px; border-radius: 50%; background: var(--accent); color: #fff;
  display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 0.9rem;
  text-decoration: none; border: 2px solid rgba(255,255,255,0.6); transition: transform 0.15s ease;
  cursor: pointer; position: relative;
}
.avatar-circle:hover { transform: scale(1.06); }
.avatar-wrap { position: relative; }
.dropdown-menu {
  position: absolute; top: 48px; right: 0; background: var(--card-bg); border: 1px solid var(--border);
  border-radius: 10px; box-shadow: 0 8px 24px rgba(0,0,0,0.15); min-width: 220px; overflow: hidden; z-index: 200;
}
.dropdown-menu button {
  display: block; width: 100%; text-align: left; padding: 0.75rem 1rem; background: none; border: none;
  cursor: pointer; font-size: 0.92rem; color: var(--text); font-family: inherit;
}
.dropdown-menu button:hover { background: var(--bg); }
.dropdown-menu .dd-role { padding: 0.6rem 1rem; font-size: 0.78rem; color: var(--muted); border-bottom: 1px solid var(--border); text-transform: uppercase; letter-spacing: 0.4px; }
main { flex: 1; width: 100%; max-width: 1100px; margin: 0 auto; padding: 1.5rem 1.5rem 2rem; }
.hero { text-align: center; margin-bottom: 3rem; }
.hero h1 { font-size: 2.2rem; margin-bottom: 0.5rem; color: var(--primary-dark); }
.hero p { color: var(--muted); font-size: 1.05rem; }
.role-buttons { display: flex; gap: 2rem; justify-content: center; flex-wrap: wrap; }
.role-btn {
  border: none; cursor: pointer; color: #fff; border-radius: 16px; padding: 3rem 3.5rem; font-size: 1.5rem;
  font-weight: 700; min-width: 260px; box-shadow: 0 8px 20px rgba(0,0,0,0.12);
  transition: transform 0.15s ease, box-shadow 0.15s ease; display: flex; flex-direction: column;
  align-items: center; gap: 0.6rem; font-family: inherit;
}
.role-btn:hover { transform: translateY(-4px); box-shadow: 0 12px 26px rgba(0,0,0,0.18); }
.role-btn.candidate { background: linear-gradient(135deg, var(--candidate), #1b5fad); }
.role-btn.recruiter { background: linear-gradient(135deg, var(--recruiter), #0b7d5c); }
.role-btn small { font-size: 0.9rem; font-weight: 400; opacity: 0.9; }
.role-icon { font-size: 2.5rem; }
.card { background: var(--card-bg); border: 1px solid var(--border); border-radius: 12px; padding: 2rem; max-width: 440px; margin: 0 auto; box-shadow: 0 4px 14px rgba(0,0,0,0.06); }
.card.wide { max-width: 760px; }
.card h2 { margin-top: 0; color: var(--primary-dark); }
.tabs { display: flex; margin-bottom: 1.5rem; border-bottom: 1px solid var(--border); }
.tab-btn { flex: 1; background: none; border: none; padding: 0.8rem; font-size: 1rem; cursor: pointer; color: var(--muted); border-bottom: 3px solid transparent; font-family: inherit; }
.tab-btn.active { color: var(--primary); border-bottom: 3px solid var(--primary); font-weight: 600; }
.tab-panel { display: none; }
.tab-panel.active { display: block; }
label { display: block; margin: 0.9rem 0 0.3rem; font-size: 0.9rem; font-weight: 600; color: var(--text); }
input[type="text"], input[type="email"], input[type="password"], input[type="tel"], select, textarea {
  width: 100%; padding: 0.6rem 0.7rem; border: 1px solid var(--border); border-radius: 8px; font-size: 1rem; background: #fbfbfd; font-family: inherit;
}
textarea { resize: vertical; min-height: 70px; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--primary); outline-offset: 1px; }
.btn-primary { margin-top: 1.5rem; width: 100%; background: var(--primary); color: #fff; border: none; padding: 0.75rem; border-radius: 8px; font-size: 1rem; font-weight: 600; cursor: pointer; transition: background 0.15s ease; font-family: inherit; }
.btn-primary:hover { background: var(--primary-dark); }
.btn-primary:disabled { opacity: 0.5; cursor: not-allowed; }
.btn-secondary { margin-top: 0.8rem; width: 100%; background: transparent; color: var(--primary); border: 1px solid var(--primary); padding: 0.7rem; border-radius: 8px; font-size: 0.95rem; font-weight: 600; cursor: pointer; font-family: inherit; }
.btn-inline { background: var(--primary); color:#fff; border:none; padding:0.5rem 1rem; border-radius:8px; cursor:pointer; font-size:0.88rem; font-weight:600; font-family:inherit; }
.btn-inline.ghost { background: transparent; color: var(--primary); border: 1px solid var(--primary); }
.btn-inline.danger { background: #d63031; color:#fff; }
.error-msg { color: #d63031; font-size: 0.88rem; margin-top: 0.8rem; min-height: 1.1rem; }
.hint-msg { color: var(--muted); font-size: 0.85rem; margin-top: 0.6rem; }
.role-pill { display: inline-block; padding: 0.2rem 0.7rem; border-radius: 999px; font-size: 0.8rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.4px; color: #fff; }
.role-pill.candidate { background: var(--candidate); }
.role-pill.recruiter { background: var(--recruiter); }
.role-pill.superuser { background: var(--accent); }
.profile-header { display: flex; align-items: center; gap: 1.3rem; margin-bottom: 1.5rem; }
.profile-avatar { width: 72px; height: 72px; border-radius: 50%; background: var(--accent); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 1.6rem; font-weight: 700; }
.profile-field { margin-bottom: 1rem; }
.profile-field .label { font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.5px; color: var(--muted); margin-bottom: 0.2rem; }
.profile-field .value { font-size: 1.05rem; }
.btn-danger { margin-top: 1.5rem; background: #d63031; color: #fff; border: none; padding: 0.7rem 1.2rem; border-radius: 8px; cursor: pointer; font-weight: 600; font-family: inherit; }
.dashboard-banner { border-radius: 14px; padding: 1rem 2rem; color: #fff; margin-bottom: 1rem; }
.dashboard-banner.candidate { background: linear-gradient(135deg, var(--candidate), #1b5fad); }
.dashboard-banner.recruiter { background: linear-gradient(135deg, var(--recruiter), #0b7d5c); }
.dashboard-banner h1 { margin: 0 0 0.4rem; }
.grid-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1.2rem; }
.mini-card { background: var(--card-bg); border: 1px solid var(--border); border-radius: 10px; padding: 1.4rem; cursor: pointer; transition: box-shadow .15s, transform .15s; position: relative; }
.mini-card:hover { box-shadow: 0 6px 18px rgba(0,0,0,0.1); transform: translateY(-2px); }
.mini-card.disabled { opacity: 0.5; cursor: not-allowed; }
.mini-card.disabled:hover { box-shadow:none; transform:none; }
.mini-card h3 { margin-top: 0; color: var(--primary-dark); }
.mini-card p { color: var(--muted); margin-bottom:0; font-size:0.9rem; }
.tile-complete-tick {
  position: absolute; top: 0.7rem; right: 0.7rem; width: 22px; height: 22px; border-radius: 50%;
  background: #10ac84; color: #fff; display: flex; align-items: center; justify-content: center;
  font-size: 0.8rem; font-weight: 700; line-height: 1;
}
#footer { margin-top: auto; }
.footer { background: var(--primary-dark); color: #cbd5f5; text-align: center; padding: 1.1rem 1rem; font-size: 0.92rem; }
.footer strong { color: #fff; }
@media (max-width: 480px) { .role-btn { padding: 2.2rem 1.8rem; min-width: 0; width: 100%; } }

/* --- additions --- */
.impersonate-banner { background: var(--accent); color:#fff; text-align:center; padding:0.6rem 1rem; font-size:0.9rem; font-weight:600; }
.impersonate-banner button { margin-left:1rem; background:rgba(255,255,255,0.25); border:1px solid rgba(255,255,255,0.6); color:#fff; padding:0.3rem 0.8rem; border-radius:6px; cursor:pointer; font-family:inherit; }
.back-link { background:none; border:none; color: var(--primary); cursor:pointer; font-size:0.9rem; font-weight:600; padding:0; margin-bottom:1.2rem; font-family:inherit; }
.page-title { color: var(--primary-dark); margin-bottom:1.5rem; }
.row { display:flex; gap:1rem; flex-wrap:wrap; }
.row > * { flex:1; min-width:160px; }
.checkbox-group, .radio-group { display:flex; flex-wrap:wrap; gap:0.6rem; margin-top:0.4rem; }
.chip { border:1px solid var(--border); border-radius:999px; padding:0.4rem 0.9rem; font-size:0.85rem; cursor:pointer; background:#fbfbfd; user-select:none; }
.chip.selected { background: var(--primary); color:#fff; border-color:var(--primary); }
.matrix-wrap { overflow-x:auto; margin-top:1rem; border:1px solid var(--border); border-radius:10px; }
table.matrix { border-collapse:collapse; width:100%; min-width:0; table-layout:fixed; }
table.matrix th, table.matrix td { border:1px solid var(--border); text-align:center; padding:0; }
table.matrix th { background:var(--bg); font-size:0.72rem; color:var(--muted); font-weight:600; padding:0.35rem 0.1rem; cursor:pointer; }
table.matrix th.grouphead { background:var(--primary); color:#fff; font-size:0.7rem; letter-spacing:0.5px; border-top:none; }
table.matrix th:first-child, table.matrix td.daylabel { width:46px; background:var(--bg); font-weight:700; font-size:0.72rem; padding:0.4rem 0.2rem; cursor:pointer; color:var(--primary-dark); white-space:nowrap; }
table.matrix td.cell { width:34px; height:32px; cursor:pointer; touch-action:none; user-select:none; -webkit-user-select:none; }
table.matrix td.cell.on { background: var(--candidate); }
table.matrix td.cell.on.recruiter-mode { background: var(--recruiter); }
.status-pill { display:inline-flex; align-items:center; gap:0.5rem; padding:0.4rem 0.9rem; border-radius:999px; font-weight:700; font-size:0.85rem; }
.status-pill.active { background:#e3fbf0; color:#0b7d5c; }
.status-pill.inactive { background:#f1f2f6; color:var(--muted); }
.status-pill.pending { background:#fff4e5; color:#b06a00; }
.job-item { border:1px solid var(--border); border-radius:10px; padding:1.1rem 1.4rem; margin-bottom:1rem; display:flex; justify-content:space-between; align-items:center; flex-wrap:wrap; gap:0.8rem; background:var(--card-bg); }
.job-item .job-title { font-weight:700; color:var(--primary-dark); }
.job-item .job-meta { color:var(--muted); font-size:0.85rem; }
.match-tile { border:1px solid var(--border); border-radius:10px; padding:1.1rem; background:var(--card-bg); display:flex; justify-content:space-between; align-items:center; margin-bottom:0.9rem; cursor:pointer; }
.match-tile:hover { box-shadow:0 4px 14px rgba(0,0,0,0.08); }
.match-pct { font-weight:800; font-size:1.3rem; color:var(--recruiter); }
.modal-backdrop { position:fixed; inset:0; background:rgba(20,25,40,0.5); display:flex; align-items:center; justify-content:center; z-index:500; padding:1rem; }
.modal { background:var(--card-bg); border-radius:12px; padding:1.8rem; max-width:420px; width:100%; box-shadow:0 12px 40px rgba(0,0,0,0.25); }
.modal h3 { margin-top:0; color:var(--primary-dark); }
.modal-actions { display:flex; gap:0.8rem; margin-top:1.4rem; }
.modal-actions button { flex:1; }
.token-options { display:flex; gap:1rem; flex-wrap:wrap; margin-top:1rem; }
.token-card { flex:1; min-width:160px; border:2px solid var(--border); border-radius:12px; padding:1.4rem; text-align:center; cursor:pointer; }
.token-card:hover { border-color:var(--primary); }
.token-card .price { font-size:1.6rem; font-weight:800; color:var(--primary-dark); margin:0.4rem 0; }
.notice { background:#eef2ff; border:1px solid #c7d2fe; color:var(--primary-dark); padding:0.9rem 1.1rem; border-radius:8px; font-size:0.9rem; margin-bottom:1.2rem; }
.field-note { font-size:0.8rem; color:var(--muted); margin-top:0.25rem; }
/* --- additions for backend-connected app --- */
.impersonate-banner { background: var(--accent); color:#fff; text-align:center; padding:0.6rem 1rem; font-size:0.9rem; font-weight:600; }
.impersonate-banner button { margin-left:1rem; background:rgba(255,255,255,0.25); border:1px solid rgba(255,255,255,0.6); color:#fff; padding:0.3rem 0.8rem; border-radius:6px; cursor:pointer; font-family:inherit; }
.back-link { background:none; border:none; color: var(--primary); cursor:pointer; font-size:0.9rem; font-weight:600; padding:0; margin-bottom:1.2rem; font-family:inherit; }
.page-title { color: var(--primary-dark); margin-bottom:1.5rem; }
.checkbox-group, .radio-group { display:flex; flex-wrap:wrap; gap:0.6rem; margin-top:0.4rem; }
.chip { border:1px solid var(--border); border-radius:999px; padding:0.4rem 0.9rem; font-size:0.85rem; cursor:pointer; background:#fbfbfd; user-select:none; }
.chip.selected { background: var(--primary); color:#fff; border-color:var(--primary); }
.matrix-wrap { overflow-x:auto; margin-top:1rem; border:1px solid var(--border); border-radius:10px; }
.status-pill { display:inline-flex; align-items:center; gap:0.5rem; padding:0.4rem 0.9rem; border-radius:999px; font-weight:700; font-size:0.85rem; }
.status-pill.active { background:#e3fbf0; color:#0b7d5c; }
.status-pill.inactive { background:#f1f2f6; color:var(--muted); }
.status-pill.pending { background:#fff4e5; color:#b06a00; }
.job-item { border:1px solid var(--border); border-radius:10px; padding:1.1rem 1.4rem; margin-bottom:1rem; display:flex; justify-content:space-between; align-items:center; flex-wrap:wrap; gap:0.8rem; background:var(--card-bg); }
.job-item .job-title { font-weight:700; color:var(--primary-dark); }
.job-item .job-meta { color:var(--muted); font-size:0.85rem; }
.match-tile { border:1px solid var(--border); border-radius:10px; padding:1.1rem; background:var(--card-bg); display:flex; justify-content:space-between; align-items:center; margin-bottom:0.9rem; cursor:pointer; }
.match-tile:hover { box-shadow:0 4px 14px rgba(0,0,0,0.08); }
.match-pct { font-weight:800; font-size:1.3rem; color:var(--recruiter); }
.modal-backdrop { position:fixed; inset:0; background:rgba(20,25,40,0.5); display:flex; align-items:center; justify-content:center; z-index:500; padding:1rem; }
.modal { background:var(--card-bg); border-radius:12px; padding:1.8rem; max-width:420px; width:100%; box-shadow:0 12px 40px rgba(0,0,0,0.25); }
.modal h3 { margin-top:0; color:var(--primary-dark); }
.modal-actions { display:flex; gap:0.8rem; margin-top:1.4rem; }
.modal-actions button { flex:1; }
.token-options { display:flex; gap:1rem; flex-wrap:wrap; margin-top:1rem; }
.token-card { flex:1; min-width:160px; border:2px solid var(--border); border-radius:12px; padding:1.4rem; text-align:center; cursor:pointer; }
.token-card:hover { border-color:var(--primary); }
.token-card .price { font-size:1.6rem; font-weight:800; color:var(--primary-dark); margin:0.4rem 0; }
.notice { background:#eef2ff; border:1px solid #c7d2fe; color:var(--primary-dark); padding:0.9rem 1.1rem; border-radius:8px; font-size:0.9rem; margin-bottom:1.2rem; }
.field-note { font-size:0.8rem; color:var(--muted); margin-top:0.25rem; }
.card.wide { max-width: 760px; }
.spinner-msg { text-align:center; color:var(--muted); padding:3rem 1rem; }
.code-input { letter-spacing: 8px; font-size: 1.4rem; text-align:center; font-weight:700; }
.avatar-wrap { position: relative; }
.dropdown-menu {
  position: absolute; top: 48px; right: 0; background: var(--card-bg); border: 1px solid var(--border);
  border-radius: 10px; box-shadow: 0 8px 24px rgba(0,0,0,0.15); min-width: 220px; overflow: hidden; z-index: 200;
}
.dropdown-menu button {
  display: block; width: 100%; text-align: left; padding: 0.75rem 1rem; background: none; border: none;
  cursor: pointer; font-size: 0.92rem; color: var(--text); font-family: inherit;
}
.dropdown-menu button:hover { background: var(--bg); }
.dropdown-menu .dd-role { padding: 0.6rem 1rem; font-size: 0.78rem; color: var(--muted); border-bottom: 1px solid var(--border); text-transform: uppercase; letter-spacing: 0.4px; }
.role-pill.superuser { background: var(--accent); }

.status-pill.notselected { background:#fdecea; color:#c0392b; }
.icon-btn { min-width:38px; padding:0.5rem 0.7rem; font-weight:800; }

.data-table { border-collapse: collapse; width: 100%; min-width: 560px; }
.data-table th { background: var(--bg); text-align: left; padding: 0.7rem 0.9rem; font-size: 0.78rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.4px; border-bottom: 1px solid var(--border); }
.data-table td { padding: 0.7rem 0.9rem; border-bottom: 1px solid var(--border); font-size: 0.92rem; }
.data-table tr:last-child td { border-bottom: none; }


.section-label { color: var(--muted); font-size: 0.8rem; letter-spacing: 1px; text-transform: uppercase; margin: 0 0 0.8rem; font-weight: 700; }
.stat-card { cursor: default; text-align: center; }
.stat-card h3 { font-size: 2rem; margin: 0 0 0.3rem; color: var(--primary-dark); }
.stat-card p { margin: 0; }

/* Match % breakdown (recruiter Matches page) */
.match-breakdown { margin-top: 0.8rem; padding-top: 0.8rem; border-top: 1px dashed var(--border); }
.breakdown-row { display: flex; align-items: center; gap: 0.6rem; margin-bottom: 0.4rem; flex-wrap: wrap; }
.breakdown-day { width: 38px; flex-shrink: 0; font-weight: 700; font-size: 0.78rem; color: var(--primary-dark); }
.breakdown-slots { display: flex; flex-wrap: wrap; gap: 0.35rem; }
.breakdown-chip { font-size: 0.72rem; padding: 0.15rem 0.5rem; border-radius: 999px; font-weight: 600; color: #fff; }
.breakdown-chip.match { background: #10ac84; }
.breakdown-chip.nomatch { background: #d63031; }
.breakdown-chip.neutral { background: var(--primary); }
.expand-btn { background: none; border: 1px solid var(--border); border-radius: 6px; width: 32px; height: 32px; cursor: pointer; font-size: 0.8rem; color: var(--muted); }
.expand-btn:hover { background: var(--bg); }

/* Toggle switch (e.g. "Include completed" on the recruiter Matches page) */
.toggle-switch { display: inline-flex; align-items: center; cursor: pointer; user-select: none; }
.toggle-switch input { display: none; }
.toggle-switch .toggle-slider { width: 38px; height: 20px; background: var(--border); border-radius: 999px; position: relative; transition: background 0.15s ease; flex-shrink: 0; }
.toggle-switch .toggle-slider::before { content: ''; position: absolute; width: 16px; height: 16px; border-radius: 50%; background: #fff; top: 2px; left: 2px; transition: transform 0.15s ease; box-shadow: 0 1px 2px rgba(0,0,0,0.25); }
.toggle-switch input:checked + .toggle-slider { background: var(--primary); }
.toggle-switch input:checked + .toggle-slider::before { transform: translateX(18px); }

/* Keeps the "Pending" pill and "Set inactive"/"Set active" button the same width on Job Listings */
.job-status-btn { min-width: 108px; text-align: center; box-sizing: border-box; display: inline-flex; align-items: center; justify-content: center; }

.card.extra-wide { max-width: 1100px; }

/* Availability matrix responsive layout: combined table (days down the side,
   hours across the top) on larger screens; on mobile, transposed so days run
   across the top and hours run down the side, with AM/PM grouped on the left. */
.matrix-desktop-only { display: block; }
.matrix-mobile-only { display: none; }
@media (max-width: 700px) {
  .matrix-desktop-only { display: none; }
  .matrix-mobile-only { display: block; }
  .matrix-mobile-only table.matrix { min-width: 0; width: 100%; table-layout: fixed; }
  .matrix-mobile-only table.matrix th { font-size: 0.68rem; padding: 0.3rem 0.1rem; }
  .matrix-mobile-only table.matrix td.period-label, .matrix-mobile-only table.matrix th.period-label { width: 24px; }
  .matrix-mobile-only table.matrix td.period-label {
    background: var(--primary); color: #fff; font-weight: 700;
    font-size: 0.58rem; letter-spacing: 0.2px; text-align: center; vertical-align: middle; padding: 0.2rem 0;
  }
  .matrix-mobile-only table.matrix td.hour-label, .matrix-mobile-only table.matrix th.hour-label { width: 44px; }
  .matrix-mobile-only table.matrix td.hour-label {
    background: var(--bg); font-weight: 700; font-size: 0.66rem;
    color: var(--primary-dark); text-align: center; padding: 0.3rem 0.1rem; cursor: pointer; white-space: nowrap;
  }
  .matrix-mobile-only table.matrix td.cell { width: auto; height: 30px; }
}

.two-col-list { display: grid; grid-template-columns: 1fr 1fr; column-gap: 2rem; }
@media (max-width: 560px) {
  .two-col-list { grid-template-columns: 1fr; }
}

/* Hide the footer bar on mobile - replaced by the fixed bottom tab bar for candidates. */
@media (max-width: 700px) {
  #footer { display: none; }
}

/* Mobile bottom tab bar (candidates only, mobile only) */
.mobile-tabbar { display: none; }
@media (max-width: 700px) {
  .mobile-tabbar {
    display: flex; position: fixed; bottom: 0; left: 0; right: 0; z-index: 150;
    background: var(--card-bg); border-top: 1px solid var(--border);
    box-shadow: 0 -2px 10px rgba(0,0,0,0.08);
    padding-bottom: env(safe-area-inset-bottom, 0);
  }
  .mobile-tabbar a {
    flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center;
    padding: 0.5rem 0.2rem 0.55rem; text-decoration: none; color: var(--muted);
    font-size: 0.65rem; font-weight: 600; gap: 0.2rem;
  }
  .mobile-tabbar a.active { color: var(--primary); }
  .mobile-tabbar .tab-icon { font-size: 1.3rem; line-height: 1; }
  .mobile-tabbar a.tab-home .tab-icon {
    background: var(--primary); color: #fff; width: 34px; height: 34px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center; font-size: 1.1rem;
    margin-top: -14px; box-shadow: 0 2px 6px rgba(0,0,0,0.25);
  }
  .mobile-tabbar a.tab-home.active .tab-icon { background: var(--primary-dark); }
  .mobile-tabbar a.tab-home.active { color: var(--primary); }
  body.has-mobile-tabbar main { padding-bottom: 5.5rem; }
}

.help-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 18px; height: 18px; flex-shrink: 0; aspect-ratio: 1 / 1; box-sizing: border-box;
  border-radius: 50%; border: 1px solid var(--muted); appearance: none; -webkit-appearance: none;
  background: none; color: var(--muted); font-size: 0.7rem; font-weight: 700;
  cursor: pointer; padding: 0; margin-left: 0.4rem; vertical-align: middle; line-height: 1;
}
.help-icon:hover { background: var(--bg); color: var(--primary); border-color: var(--primary); }

.fit-select { width: auto !important; min-width: 60px; padding-right: 1.8rem; -webkit-appearance: menulist;}

.status-pill-btn { border: none; font-family: inherit; cursor: pointer; }
.status-pill-btn:hover { filter: brightness(0.95); }
.status-pill:disabled { cursor: default; opacity: 0.85; }

.modal.modal-wide { max-width: 640px; }

.tile-delete-x {
  width: 32px; height: 32px; border-radius: 50%; flex-shrink: 0;
  background: #d63031; color: #fff; border: none; display: flex; align-items: center; justify-content: center;
  font-size: 1.2rem; font-weight: 700; line-height: 1; cursor: pointer; padding: 0;
}
.tile-delete-x:hover { background: #b52a29; }

.icon-btn-circle {
  width: 32px; height: 32px; border-radius: 50%; flex-shrink: 0; border: none; cursor: pointer;
  padding: 0; display: flex; align-items: center; justify-content: center; font-size: 1rem; line-height: 1;
}
.icon-btn-circle.edit { background: var(--primary); color: #fff; }
.icon-btn-circle.edit:hover { background: var(--primary-dark); }
.icon-btn-circle.deactivate { background: #d63031; }
.icon-btn-circle.deactivate:hover { background: #b52a29; }
.icon-btn-circle.activate { background: #10ac84; color: #fff; font-weight: 700; }
.icon-btn-circle.activate:hover { background: #0b7d5c; }
.icon-bar { display: block; width: 12px; height: 2px; background: #fff; border-radius: 1px; }

.icon-btn-sm { min-width: 24px; width: 24px; height: 24px; padding: 0; font-weight: 800; font-size: 0.7rem; border-radius: 6px; }

.job-status-header {
  width: 100%; text-align: center; padding: 0.3rem 0.5rem; font-size: 0.72rem; font-weight: 700;
  letter-spacing: 0.5px; text-transform: uppercase; color: #fff; cursor: pointer;
}
.job-status-header.is-active { background: #10ac84; }
.job-status-header.is-inactive { background: #d63031; }
.job-status-header.is-pending { background: #FFA51E; }

.icon-bar-badge {
  display: inline-flex; align-items: center; justify-content: center;
  width: 14px; height: 14px; border-radius: 50%; background: #d63031; vertical-align: middle; margin-left: 0.3rem;
}
.icon-bar-badge .icon-bar { width: 7px; height: 1.5px; }

.dashboard-subbanner {
  border-radius: 10px; padding: 0.7rem 2.5rem; margin: -1.2rem 0 2rem; background: var(--accent);
  color: #fff; font-weight: 700; font-size: 0.92rem; cursor: pointer; text-align: center;
}
.dashboard-subbanner:hover { filter: brightness(0.95); }

.padlock-btn {
  background: none; border: 1px solid var(--border); border-radius: 6px; width: 36px; height: 36px;
  display: flex; align-items: center; justify-content: center; cursor: pointer; font-size: 0.95rem; flex-shrink: 0;
}
.padlock-btn:hover { background: var(--bg); }

/* Business Details field hints: inline text on desktop, small info icon + popup on mobile */
.mobile-info-icon {
  display: none; width: 15px; height: 15px; border-radius: 50%; border: 1px solid var(--muted);
  background: none; color: var(--muted); font-size: 0.6rem; font-weight: 700; font-style: italic;
  cursor: pointer; padding: 0; margin-left: 0.3rem; vertical-align: middle; line-height: 1;
  align-items: center; justify-content: center;
}
.mobile-info-icon:hover { background: var(--bg); color: var(--primary); border-color: var(--primary); }
@media (max-width: 700px) {
  .desktop-hint-text { display: none; }
  .mobile-info-icon { display: inline-flex; }
}

/* Business name/post code lock after VAT verification - functionally read-only, but must look identical to a normal editable field (no browser default disabled greying). */
#bd-name:disabled, #bd-postcode:disabled {
  opacity: 1; background: #fbfbfd; color: var(--text); -webkit-text-fill-color: var(--text); border-color: var(--border); cursor: default;
}

/* On mobile, the bottom tab bar (+ Home) already provides navigation back
   to the dashboard for these candidate pages, so the back-link is redundant there. */
@media (max-width: 700px) {
  .back-link-hide-mobile { display: none; }
}

.nav-right-guest { display: flex; align-items: center; gap: 0.9rem; }
.nav-guest-links { display: flex; align-items: center; gap: 0.9rem; }
@media (max-width: 700px) {
  .nav-right-guest { flex-direction: column; align-items: flex-end; gap: 0.4rem; }
  .nav-right-guest button.nav-link { width: auto; align-self: flex-end; padding: 0.4rem 0.9rem; }
  .nav-guest-links { gap: 0.7rem; }
  .nav-right-guest a.nav-link-guest {
    background: none; border: none; color: #fff; text-decoration: underline;
    padding: 0; font-size: 0.82rem; text-align: right;
  }
}

/* Candidate onboarding progress steps - shown below the dashboard banner until profile completion + activation */
.candidate-progress-bar {
  margin: 1rem 0 1rem; padding: 0; display: flex; align-items: center; justify-content: center;
  gap: 0.8rem; flex-wrap: wrap;
}
.progress-label { font-weight: 700; color: var(--primary-dark); font-size: 0.95rem; }
.progress-label-mobile { display: none; }
@media (max-width: 700px) {
  .progress-label-desktop { display: none; }
  .progress-label-mobile { display: inline; }
}
.progress-steps { display: flex; align-items: center; gap: 0; flex-wrap: wrap; }
.progress-step {
  width: 40px; height: 40px; border-radius: 20%; border: 2px solid var(--primary); background: var(--primary);
  color: #fff; font-weight: 700; font-size: 0.9rem; cursor: pointer;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0; padding: 0;
}
.progress-step.done { background: #10ac84; border-color: #10ac84; color: #fff; }
.progress-step:hover { filter: brightness(0.92); }
.progress-step-final { background: var(--primary); border-color: var(--primary); color: #fff; }
.progress-connector { width: 20px; height: 2px; background: var(--border); flex-shrink: 0; }
@media (max-width: 700px) {
  .progress-step { width: 34px; height: 34px; font-size: 0.8rem; }
}
