:root {
  --navy: #013668; --navy-2: #0b4a8a; --gold: #b8954a; --gold-soft: #f4ecdc;
  --ink: #1f2733; --muted: #5d6675; --line: #e3e7ee; --bg: #f3f5f8; --card: #fff;
  --ok: #1f7a4d; --ok-soft: #e6f4ec; --err: #b42318; --err-soft: #fdecea; --warn-soft: #fff6e0;
  --radius: 10px; --shadow: 0 1px 2px rgba(16,24,40,.05), 0 1px 3px rgba(16,24,40,.06);
  --font: "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { font: 15px/1.55 var(--font); color: var(--ink); background: var(--bg); -webkit-font-smoothing: antialiased; }
a { color: var(--navy-2); }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 20px; }
.mono { font-family: Consolas, "SFMono-Regular", Menlo, monospace; }
.muted { color: var(--muted); } .small { font-size: 13px; } .right { text-align: right; }
[hidden] { display: none !important; }

/* Top bar */
.topbar { background: #fff; border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 10; }
.topbar-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; height: 72px; }
.brand { display: flex; align-items: center; gap: 14px; text-decoration: none; color: var(--ink); min-width: 0; }
.brand-logo { height: 44px; width: auto; display: block; }
.brand-divider { width: 1px; height: 32px; background: var(--line); }
.brand-app { font-weight: 600; font-size: 17px; letter-spacing: .2px; white-space: nowrap; }
.user { display: flex; align-items: center; gap: 10px; }
.avatar { width: 34px; height: 34px; border-radius: 50%; background: var(--navy); color: #fff; display: grid; place-items: center; font-size: 13px; font-weight: 600; text-decoration: none; }
.user-meta { display: flex; flex-direction: column; line-height: 1.2; }
.user-name { font-weight: 600; font-size: 14px; } .user-email { font-size: 12px; color: var(--muted); }
.signout { font-size: 13px; color: var(--muted); margin-left: 8px; text-decoration: none; border: 1px solid var(--line); border-radius: 6px; padding: 5px 10px; }
.signout:hover { background: var(--bg); }
.tabs { background: var(--navy); border-bottom: 3px solid var(--gold); }
.tabs-inner { display: flex; gap: 2px; overflow-x: auto; scrollbar-width: none; }
.tab { color: #c9d2e3; text-decoration: none; padding: 12px 16px; font-size: 14px; font-weight: 500; white-space: nowrap; border-bottom: 3px solid transparent; margin-bottom: -3px; }
.tab:hover { color: #fff; background: rgba(255,255,255,.06); }
.tab.active { color: #fff; border-bottom-color: #fff; }

.main { padding-top: 28px; padding-bottom: 40px; }
.foot { color: var(--muted); font-size: 12.5px; padding-bottom: 32px; }

/* Page heading */
.page-head { margin-bottom: 22px; }
.eyebrow { color: var(--gold); font-weight: 700; font-size: 12px; letter-spacing: 1.4px; text-transform: uppercase; }
h1 { font-size: 28px; line-height: 1.2; margin: 4px 0 6px; color: var(--navy); font-weight: 650; }
h2 { font-size: 17px; margin: 0; color: var(--navy); }
.lead { margin: 0; color: var(--muted); max-width: 720px; }

/* Cards */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 24px; margin-bottom: 20px; }
.card-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 14px; gap: 12px; }
.empty { color: var(--muted); margin: 6px 0; }

/* Home */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-bottom: 20px; }
.step-card { position: relative; display: flex; flex-direction: column; gap: 6px; padding: 22px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); text-decoration: none; color: var(--ink); box-shadow: var(--shadow); transition: border-color .15s, transform .15s; }
.step-card:hover { border-color: var(--gold); transform: translateY(-1px); }
.step-card.disabled { opacity: .55; }
.step-n { width: 30px; height: 30px; border-radius: 50%; background: var(--gold-soft); color: var(--gold); font-weight: 700; display: grid; place-items: center; }
.step-title { font-weight: 650; font-size: 17px; color: var(--navy); margin-top: 6px; }
.step-desc { color: var(--muted); font-size: 14px; flex: 1; }
.step-go { font-size: 13px; font-weight: 600; color: var(--navy-2); margin-top: 8px; }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-bottom: 20px; }
.stat { background: var(--navy); color: #fff; border-radius: var(--radius); padding: 18px 20px; display: flex; flex-direction: column; }
.stat-n { font-size: 30px; font-weight: 650; line-height: 1.1; } .stat-l { color: #c9d2e3; font-size: 13px; }

/* Tables */
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th { text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: .6px; color: var(--muted); font-weight: 600; padding: 8px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.table td { padding: 11px 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.pill { display: inline-block; font-size: 12px; font-weight: 600; padding: 3px 9px; border-radius: 999px; background: var(--bg); color: var(--muted); white-space: nowrap; }
.pill-submitted { background: var(--warn-soft); color: #8a5a00; }
.pill-recruited { background: #e8eefb; color: var(--navy-2); }
.pill-welcomed, .pill-open { background: var(--ok-soft); color: var(--ok); }
.link { font-weight: 600; text-decoration: none; } .link:hover { text-decoration: underline; }

/* Forms */
.form { max-width: 860px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 18px; }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0 18px; }
.grid2.top { align-items: start; gap: 20px; } .grid2.top > .card { max-width: none; }
.span2 { grid-column: 1 / -1; }
.field { margin: 0 0 16px; border: 0; padding: 0; min-width: 0; }
.field > label, .field > legend { display: block; font-weight: 600; font-size: 14px; margin-bottom: 6px; padding: 0; }
.req { color: var(--err); } .opt { color: var(--muted); font-weight: 400; font-size: 12.5px; margin-left: 4px; }
.hint { color: var(--muted); font-size: 12.5px; margin: 6px 0 0; }
input[type=text], input:not([type]), input[type=email], input[type=date], input[type=datetime-local], input[type=number], input[type=password], select, textarea {
  width: 100%; font: inherit; color: var(--ink); background: #fff; border: 1px solid #cfd5df; border-radius: 8px; padding: 10px 12px; transition: border-color .15s, box-shadow .15s; }
textarea { resize: vertical; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--navy-2); box-shadow: 0 0 0 3px rgba(1,54,104,.18); }
h3.section { font-size: 13px; text-transform: uppercase; letter-spacing: 1.2px; color: var(--gold); margin: 26px 0 12px; padding-top: 18px; border-top: 1px solid var(--line); }
h3.section.first { margin-top: 0; padding-top: 0; border-top: 0; }
.input-row { display: flex; gap: 8px; } .input-row input { flex: 1; }

.seg { display: inline-flex; border: 1px solid #cfd5df; border-radius: 8px; overflow: hidden; }
.seg label { position: relative; cursor: pointer; }
.seg input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.seg span { display: block; padding: 9px 22px; font-weight: 500; }
.seg label + label span { border-left: 1px solid #cfd5df; }
.seg input:checked + span { background: var(--navy); color: #fff; }
.seg input:focus-visible + span { box-shadow: inset 0 0 0 2px var(--gold); }

.check { display: flex; align-items: center; gap: 10px; cursor: pointer; font-weight: 500; }
.check input { width: 18px; height: 18px; accent-color: var(--navy); margin: 0; }
.check.inline { margin-top: 10px; font-weight: 400; font-size: 14px; }
.sw-list { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.sw { border: 1px solid var(--line); border-radius: 8px; padding: 12px 14px; background: #fff; transition: border-color .15s, background .15s; }
.sw:has(> .check input:checked) { border-color: var(--navy-2); background: #f7f9fd; }
.sw.locked { background: #f7f9fd; }
.tag { margin-left: auto; font-style: normal; font-size: 11px; font-weight: 600; color: var(--muted); background: var(--bg); padding: 2px 8px; border-radius: 999px; }
.branch { margin: 12px 0 2px 28px; padding-left: 12px; border-left: 2px solid var(--gold); }
.branch-label { display: block; font-size: 12.5px; font-weight: 600; color: var(--muted); margin: 6px 0; }
.branch input:not([type=checkbox]):not([type=radio]) { padding: 8px 10px; font-size: 14px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { position: relative; cursor: pointer; }
.chip input { position: absolute; opacity: 0; }
.chip span { display: inline-block; padding: 5px 12px; border: 1px solid #cfd5df; border-radius: 999px; font-size: 13px; background: #fff; }
.chip input:checked + span { background: var(--navy); border-color: var(--navy); color: #fff; }
.chip input:focus-visible + span { box-shadow: 0 0 0 3px rgba(184,149,74,.4); }

.form-foot { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 24px; padding-top: 18px; border-top: 1px solid var(--line); }
.form-foot .btn + .btn { margin-left: 8px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; font: inherit; font-weight: 600; font-size: 14px; padding: 10px 18px; border-radius: 8px; border: 1px solid #cfd5df; background: #fff; color: var(--ink); cursor: pointer; text-decoration: none; white-space: nowrap; }
.btn:hover { background: var(--bg); }
.btn.primary { background: var(--navy); border-color: var(--navy); color: #fff; }
.btn.primary:hover { background: var(--navy-2); }
.btn.danger { color: var(--err); }
.btn.small { padding: 6px 12px; font-size: 13px; }
.btn[disabled] { opacity: .6; cursor: progress; }
.alert { margin-top: 16px; padding: 12px 14px; border-radius: 8px; background: var(--err-soft); color: var(--err); font-weight: 500; }
.alert.warn { background: var(--warn-soft); color: #8a5a00; }

.success { text-align: center; padding: 44px 24px; max-width: 640px; }
.tick { width: 56px; height: 56px; border-radius: 50%; background: var(--ok-soft); color: var(--ok); font-size: 28px; display: grid; place-items: center; margin: 0 auto 12px; }
.success h2 { font-size: 22px; } .success p { color: var(--muted); }
.actions { margin-top: 20px; }

/* Calendar */
.calendar { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); }
.cal-month { padding: 16px; border-right: 1px solid var(--line); }
.cal-nav { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.cal-nav strong { color: var(--navy); }
.cal-nav button { border: 1px solid var(--line); background: #fff; border-radius: 6px; width: 32px; height: 32px; cursor: pointer; font-size: 16px; }
.cal-nav button:disabled { opacity: .35; cursor: default; }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; text-align: center; }
.cal-dow { font-size: 11px; color: var(--muted); font-weight: 600; text-transform: uppercase; padding: 4px 0; }
.cal-day { aspect-ratio: 1; border: 0; background: transparent; border-radius: 8px; font: inherit; font-size: 14px; color: #a3aab6; position: relative; }
.cal-day.has { color: var(--ink); background: var(--gold-soft); cursor: pointer; font-weight: 600; }
.cal-day.has:hover { background: #ecdcbc; }
.cal-day.sel { background: var(--navy); color: #fff; }
.cal-day.start::after { content: ""; position: absolute; left: 50%; bottom: 5px; width: 5px; height: 5px; margin-left: -2.5px; border-radius: 50%; background: var(--err); }
.cal-day.sel.start::after { background: #fff; }
.cal-legend { margin-top: 10px; font-size: 12px; color: var(--muted); display: flex; gap: 14px; flex-wrap: wrap; }
.cal-legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; background: var(--gold-soft); margin-right: 5px; vertical-align: -1px; }
.cal-legend i.dot { border-radius: 50%; background: var(--err); width: 6px; height: 6px; vertical-align: 1px; }
.cal-times { padding: 16px; background: #fafbfc; }
.cal-times h4 { margin: 4px 0 12px; font-size: 14px; color: var(--navy); }
.time-list { display: flex; flex-direction: column; gap: 8px; }
.time { text-align: left; border: 1px solid #cfd5df; background: #fff; border-radius: 8px; padding: 10px 12px; cursor: pointer; font: inherit; }
.time:hover { border-color: var(--navy-2); }
.time.sel { background: var(--navy); color: #fff; border-color: var(--navy); }
.time small { display: block; color: var(--muted); font-size: 12px; } .time.sel small { color: #c9d2e3; }
.slot-chosen { margin-top: 10px; } .slot-chosen.ok { color: var(--ok); font-weight: 600; }

/* Welcome split view */
.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 20px; align-items: start; }
.split .form { max-width: none; }
.preview-card { position: sticky; top: 140px; }
.preview { width: 100%; height: 720px; border: 1px solid var(--line); border-radius: 8px; background: #eef0f4; }
.booked { padding: 12px 14px; background: var(--bg); border-radius: 8px; }

/* Error page */
.center-page { min-height: 100vh; display: grid; place-items: center; padding: 20px; }
.narrow { max-width: 460px; text-align: center; }
.err-logo { height: 52px; margin-bottom: 8px; }

@media (max-width: 900px) {
  .split, .grid2.top { grid-template-columns: 1fr; }
  .preview-card { position: static; }
}
@media (max-width: 720px) {
  .wrap { padding: 0 16px; }
  .steps, .stats, .grid2, .grid3, .sw-list { grid-template-columns: 1fr; }
  .calendar { grid-template-columns: 1fr; } .cal-month { border-right: 0; border-bottom: 1px solid var(--line); }
  .user-meta, .brand-divider, .brand-app { display: none; }
  h1 { font-size: 23px; }
  .card { padding: 18px; }
  .form-foot { flex-direction: column-reverse; align-items: stretch; }
  .form-foot .btn + .btn { margin-left: 0; margin-top: 8px; }
}

/* Software pricing + notes */
.price-tag { margin: 4px 0 0 28px; font-size: 12.5px; font-weight: 600; color: var(--navy-2); }
.sw.disabled { opacity: .55; background: var(--bg); }
.sw.disabled .check { cursor: not-allowed; }
.sw-note { margin: 2px 0 8px; padding: 8px 10px; background: var(--warn-soft); color: #7a4f00; border-radius: 6px; font-size: 13px; }

/* Live cost box */
.cost-box { margin-top: 18px; border: 1px solid var(--line); border-radius: var(--radius); background: #fafbfc; padding: 16px 18px; }
.cost-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; margin-bottom: 8px; }
.cost-head h3 { margin: 0; font-size: 15px; color: var(--navy); }
.cost-lines { list-style: none; margin: 0 0 12px; padding: 0; font-size: 14px; }
.cost-lines li { display: flex; justify-content: space-between; gap: 12px; padding: 6px 0; border-bottom: 1px dashed var(--line); }
.cost-lines li.muted { justify-content: flex-start; border-bottom: 0; }
.cost-amt { white-space: nowrap; color: var(--muted); }
.cost-totals { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.cost-total { background: var(--navy); color: #fff; border-radius: 8px; padding: 12px 14px; display: flex; flex-direction: column; }
.cost-total span { font-size: 12px; color: #c9d2e3; }
.cost-total strong { font-size: 20px; }

/* Admin */
.admin-row { display: grid; grid-template-columns: 2fr 1fr 1fr auto; gap: 0 14px; align-items: end; padding: 10px 0; border-bottom: 1px solid var(--line); }
.admin-row:last-of-type { border-bottom: 0; }
.admin-row .field { margin-bottom: 6px; }
.admin-row .span-all { grid-column: 1 / -1; }
.admin-list { display: flex; flex-direction: column; gap: 8px; }
.admin-item { border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.admin-item[open] { border-color: var(--navy-2); }
.admin-item > summary { list-style: none; cursor: pointer; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; padding: 12px 14px; }
.admin-item > summary::-webkit-details-marker { display: none; }
.admin-item > summary::before { content: "▸"; color: var(--muted); }
.admin-item[open] > summary::before { content: "▾"; }
.admin-name { font-weight: 600; color: var(--navy); }
.admin-meta { color: var(--muted); font-size: 13px; }
.admin-price { margin-left: auto; font-weight: 600; font-size: 13px; color: var(--navy-2); }
.admin-item.add > summary .admin-name { color: var(--navy-2); }
.admin-form { padding: 4px 16px 16px; max-width: none; border-top: 1px solid var(--line); }
.top-gap { margin-top: 12px; }
@media (max-width: 720px) {
  .admin-row { grid-template-columns: 1fr 1fr; }
  .admin-row .field:first-of-type, .admin-row-btn { grid-column: 1 / -1; }
  .cost-totals { grid-template-columns: 1fr; }
  .admin-price { margin-left: 0; }
}

/* ── Staff Offboarding ───────────────────────────────────── */
.steps.steps-2 { grid-template-columns: repeat(2, 1fr); }
.pill-urgent { background: var(--err-soft); color: var(--err); }
.pill-cancelled { background: var(--bg); color: var(--muted); text-decoration: line-through; }
tr.overdue td:first-child { box-shadow: inset 3px 0 0 var(--err); }
.progress { display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; }
.progress progress { width: 90px; height: 8px; appearance: none; border: 0; border-radius: 99px; background: var(--line); overflow: hidden; }
.progress progress::-webkit-progress-bar { background: var(--line); border-radius: 99px; }
.progress progress::-webkit-progress-value { background: var(--ok); border-radius: 99px; }
.progress progress::-moz-progress-bar { background: var(--ok); border-radius: 99px; }
.progress-n { font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; }
.asset-tools { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 10px; }
.asset-table select { max-width: 230px; }
.asset-add { display: grid; grid-template-columns: 2fr 1fr auto; gap: 8px; margin-top: 10px; }
.asset-add input { width: 100%; }
.check-preview { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 6px 20px; font-size: 14px; background: var(--bg); border-radius: 8px; padding: 12px 16px; }
.check-preview ul { margin: 4px 0 8px 18px; padding: 0; }
.detail-bar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: -8px 0 18px; }
.detail-bar .spacer { flex: 1; }
.task-team { margin-bottom: 14px; }
.task-team h3 { font-size: 13px; text-transform: uppercase; letter-spacing: .6px; color: var(--gold); margin: 6px 0 6px; }
.task { display: flex; gap: 10px; align-items: flex-start; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; margin-bottom: 6px; cursor: pointer; }
.task input { width: 18px; height: 18px; margin-top: 2px; accent-color: var(--ok); flex: none; }
.task-body { display: flex; flex-direction: column; }
.task.done { background: var(--ok-soft); border-color: #cde8d8; }
.task.done .task-label { text-decoration: line-through; color: var(--muted); }
.admin-row.task-row { grid-template-columns: 3fr 1.2fr 1.3fr .7fr .9fr auto; }
@media (max-width: 760px) {
  .steps.steps-2, .asset-add { grid-template-columns: 1fr; }
  .admin-row.task-row { grid-template-columns: 1fr 1fr; }
  .admin-row.task-row .field:first-of-type { grid-column: 1 / -1; }
}
