/* Top Health Talent — mobile-first. Clinicians live on phones; facility/ops scale up to desktop. */
:root {
  --brand: #0f766e; --brand-dk: #115e59; --brand-lt: #ccfbf1;
  --ink: #0f172a; --ink-2: #475569; --line: #e2e8f0; --bg: #f8fafc; --card: #fff;
  --ok: #15803d; --ok-lt: #dcfce7; --warn: #b45309; --warn-lt: #fef3c7;
  --bad: #b91c1c; --bad-lt: #fee2e2; --info: #1d4ed8; --info-lt: #dbeafe;
  --r: 12px;
}
* { box-sizing: border-box; }
body { margin: 0; font: 16px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; color: var(--ink); background: var(--bg); }
a { color: var(--brand-dk); }
h1 { font-size: 1.45rem; margin: 0 0 12px; }
h2 { font-size: 1.1rem; margin: 0 0 10px; }
h3 { font-size: 1rem; margin: 0 0 6px; }
.dim { color: var(--ink-2); font-size: .9rem; }
.small { font-size: .85rem; }

.preview-bar { background: #fef3c7; color: #92400e; text-align: center; font-size: .82rem; font-weight: 600; padding: 6px 12px; border-bottom: 1px solid #fcd34d; }
.topbar { display: flex; justify-content: space-between; align-items: center; gap: 12px;
  padding: 10px 16px; background: var(--brand); color: #fff; position: sticky; top: 0; z-index: 20; }
.topbar .brand { color: #fff; font-weight: 700; text-decoration: none; font-size: 1.1rem; display: inline-flex; align-items: center; gap: 8px; }
.topbar .brand img { border-radius: 7px; box-shadow: 0 0 0 1.5px rgba(255,255,255,.55); }
/* Installed app (home-screen): respect the notch / status bar */
@media (display-mode: standalone) { .topbar { padding-top: max(10px, env(safe-area-inset-top)); } .foot { padding-bottom: max(16px, env(safe-area-inset-bottom)); } }
.install-card[hidden] { display: none !important; }
.install-card { display: flex; gap: 12px; align-items: center; }
.install-card img { width: 48px; height: 48px; border-radius: 12px; flex: none; }
.install-card .grow { flex: 1; min-width: 0; }
.topbar__right { display: flex; align-items: center; gap: 10px; }
.whoami { font-size: .85rem; opacity: .9; }
.topbar .btn--ghost { color: #fff; border-color: rgba(255,255,255,.5); }
@media (max-width: 520px) { .whoami { display: none; } }

.tabs { display: flex; gap: 4px; overflow-x: auto; padding: 8px 12px; background: #fff; border-bottom: 1px solid var(--line); }
.tabs__link { white-space: nowrap; padding: 7px 12px; border-radius: 999px; text-decoration: none; color: var(--ink-2); font-size: .92rem; }
.tabs__link.is-active { background: var(--brand-lt); color: var(--brand-dk); font-weight: 600; }

main { max-width: 980px; margin: 0 auto; padding: 16px; }
.foot { max-width: 980px; margin: 24px auto; padding: 16px; border-top: 1px solid var(--line); font-size: .85rem; }

.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 16px; margin-bottom: 14px; }
.card--accent { border-left: 4px solid var(--brand); }
.card--warn { border-left: 4px solid var(--warn); }
.grid { display: grid; gap: 12px; }
@media (min-width: 720px) { .grid--2 { grid-template-columns: 1fr 1fr; } .grid--3 { grid-template-columns: repeat(3, 1fr); } .grid--4 { grid-template-columns: repeat(4, 1fr); } }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.row--between { justify-content: space-between; }
.stack > * + * { margin-top: 8px; }

.stat { background: #fff; border: 1px solid var(--line); border-radius: var(--r); padding: 12px 14px; }
.stat b { display: block; font-size: 1.5rem; }
.stat span { color: var(--ink-2); font-size: .85rem; }

.btn { display: inline-block; border: 1px solid var(--brand); background: var(--brand); color: #fff; border-radius: 10px;
  padding: 10px 16px; font: inherit; font-weight: 600; cursor: pointer; text-decoration: none; text-align: center; }
.btn:hover { background: var(--brand-dk); }
.btn:disabled { opacity: .6; cursor: wait; }
.btn--ghost { background: transparent; color: var(--brand-dk); }
.btn--ghost:hover { background: var(--brand-lt); }
.btn--danger { background: var(--bad); border-color: var(--bad); }
.btn--sm { padding: 5px 10px; font-size: .85rem; border-radius: 8px; }
.btn--block { display: block; width: 100%; }
.btn--big { padding: 14px 18px; font-size: 1.1rem; }

label { display: block; font-weight: 600; font-size: .9rem; margin-bottom: 4px; }
input, select, textarea { width: 100%; font: inherit; padding: 10px 12px; border: 1px solid #cbd5e1; border-radius: 10px; background: #fff; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--brand); border-color: transparent; }
.field { margin-bottom: 12px; }
.hint { font-size: .8rem; color: var(--ink-2); margin-top: 3px; }
fieldset { border: 0; padding: 0; margin: 0; }
.choice { display: flex; gap: 8px; flex-wrap: wrap; }
.choice label { font-weight: 500; border: 1px solid #cbd5e1; border-radius: 10px; padding: 8px 12px; cursor: pointer; display: flex; gap: 6px; align-items: center; }
.choice input { width: auto; }

.flash { padding: 10px 14px; border-radius: 10px; margin-bottom: 14px; font-weight: 500; }
.flash--ok  { background: var(--ok-lt); color: var(--ok); }
.flash--err { background: var(--bad-lt); color: var(--bad); }
.flash--info { background: var(--info-lt); color: var(--info); }

.badge { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: .78rem; font-weight: 600; background: #e2e8f0; color: var(--ink-2); white-space: nowrap; }
.badge--open, .badge--in_review, .badge--submitted, .badge--pending { background: var(--info-lt); color: var(--info); }
.badge--filled, .badge--verified, .badge--approved, .badge--completed { background: var(--ok-lt); color: var(--ok); }
.badge--in_progress { background: var(--brand-lt); color: var(--brand-dk); }
.badge--rejected, .badge--expired, .badge--missing, .badge--cancelled, .badge--disputed, .badge--suspended { background: var(--bad-lt); color: var(--bad); }
.badge--incomplete { background: var(--warn-lt); color: var(--warn); }
.badge--issued, .badge--requested { background: var(--info-lt); color: var(--info); }
.badge--paid { background: var(--ok-lt); color: var(--ok); }
.badge--overdue, .badge--failed { background: var(--bad-lt); color: var(--bad); }

/* Legal pages */
.legal { max-width: 760px; margin: 0 auto; padding: 22px 26px; line-height: 1.65; }
.legal h1 { margin-bottom: 4px; }
.legal h2 { font-size: 1.05rem; margin: 22px 0 6px; }
.legal ul { padding-left: 20px; margin: 6px 0; }
.legal li { margin: 4px 0; }
.legal p { margin: 6px 0; }

/* Adaptive filter bar */
.filters { padding: 12px 14px; }
.filters__row { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; }
.filters__f { flex: 1 1 150px; min-width: 0; }
.filters__f label { font-size: .78rem; color: var(--ink-2); margin-bottom: 3px; }
.filters__f select, .filters__f input { padding: 8px 10px; }
.filters__f--date { flex: 0 1 165px; }
.filters__f--search { flex: 2 1 200px; }
.filters__go { flex: 0 0 auto; }
.filters__meta { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 10px; font-size: .88rem; color: var(--ink-2); }
.filters__meta:only-child { margin-top: 0; }
.chip { display: inline-block; padding: 3px 10px; border-radius: 999px; background: var(--brand-lt); color: var(--brand-dk); text-decoration: none; font-size: .8rem; font-weight: 600; }
.chip:hover { background: #99f6e4; }
.chip--clear { background: transparent; border: 1px solid var(--line); color: var(--ink-2); }

/* Money */
.money-big { font-size: 2rem; font-weight: 800; color: var(--ok); line-height: 1.1; }
.num { font-variant-numeric: tabular-nums; text-align: right; white-space: nowrap; }
.totals td { font-weight: 700; border-top: 2px solid var(--ink); }
.invoice-doc { background: #fff; }
.invoice-head { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 16px; }
.invoice-head h1 { margin: 0; }
@media print {
  .topbar, .tabs, .foot, .no-print { display: none !important; }
  body { background: #fff; }
  .card { border: 0; padding: 0; }
}

.shift { display: grid; gap: 6px; }
.shift__top { display: flex; justify-content: space-between; gap: 10px; align-items: flex-start; }
.shift__pay { font-size: 1.35rem; font-weight: 800; color: var(--ok); white-space: nowrap; }
.shift__pay small { font-size: .8rem; color: var(--ink-2); font-weight: 500; }
.meta { display: flex; gap: 12px; flex-wrap: wrap; color: var(--ink-2); font-size: .9rem; }

.checklist { list-style: none; padding: 0; margin: 0; }
.checklist li { display: flex; justify-content: space-between; gap: 10px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line); }
.checklist li:last-child { border-bottom: 0; }

table { width: 100%; border-collapse: collapse; font-size: .92rem; }
th, td { text-align: left; padding: 8px 6px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { color: var(--ink-2); font-weight: 600; font-size: .8rem; text-transform: uppercase; letter-spacing: .03em; }
.table-wrap { overflow-x: auto; }

.pager { display: flex; justify-content: space-between; align-items: center; margin-top: 10px; }
.empty { text-align: center; padding: 28px 12px; color: var(--ink-2); }
.hero { padding: 28px 0 8px; }
.hero h1 { font-size: 1.9rem; line-height: 1.2; }
.steps { counter-reset: s; list-style: none; padding: 0; }
.steps li { counter-increment: s; padding: 6px 0 6px 36px; position: relative; }
.steps li::before { content: counter(s); position: absolute; left: 0; top: 5px; width: 26px; height: 26px; border-radius: 50%; background: var(--brand); color: #fff; font-weight: 700; display: grid; place-items: center; font-size: .85rem; }
[hidden] { display: none !important; }
