/* WorkSync — single stylesheet. No build step required. */

:root {
  --bg: #f5f3ee;
  --surface: #ffffff;
  --surface-2: #faf8f4;
  --ink: #15212c;
  --muted: #5b6772;
  --line: #e2ddd2;
  --brand: #0e1f2e;
  --accent: #0f766e;
  --accent-hover: #0b5f58;
  --accent-ink: #ffffff;
  --accent-soft: #e2f3f0;
  --warn: #9a5b00;
  --warn-soft: #fdf1dc;
  --danger: #b42318;
  --danger-soft: #fdeceb;
  --ok: #17663a;
  --ok-soft: #e5f4ea;
  --info-soft: #e8eef6;
  --focus: #f0b429;
  --radius: 10px;
  --shadow: 0 1px 2px rgba(20, 30, 40, .05), 0 4px 16px rgba(20, 30, 40, .05);
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0c141c; --surface: #131f2b; --surface-2: #17242f; --ink: #e6ebef; --muted: #96a3ae;
    --line: #243443; --brand: #08111a; --accent: #3cc6b2; --accent-hover: #5fd6c4; --accent-ink: #06231f;
    --accent-soft: #10352f; --warn: #f2b45c; --warn-soft: #3a2a10; --danger: #f7867c; --danger-soft: #3d1a17;
    --ok: #6fd69a; --ok-soft: #12321f; --info-soft: #182a3b;
    --shadow: 0 1px 2px rgba(0,0,0,.3), 0 6px 18px rgba(0,0,0,.25);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0c141c; --surface: #131f2b; --surface-2: #17242f; --ink: #e6ebef; --muted: #96a3ae;
  --line: #243443; --brand: #08111a; --accent: #3cc6b2; --accent-hover: #5fd6c4; --accent-ink: #06231f;
  --accent-soft: #10352f; --warn: #f2b45c; --warn-soft: #3a2a10; --danger: #f7867c; --danger-soft: #3d1a17;
  --ok: #6fd69a; --ok-soft: #12321f; --info-soft: #182a3b;
  --shadow: 0 1px 2px rgba(0,0,0,.3), 0 6px 18px rgba(0,0,0,.25);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.55 var(--font); }
img, svg { max-width: 100%; }
a { color: var(--accent); text-underline-offset: 2px; }
a:hover { color: var(--accent-hover); }
h1, h2, h3 { line-height: 1.2; letter-spacing: -.015em; margin: 0 0 .6em; }
h1 { font-size: clamp(1.7rem, 3vw, 2.2rem); }
h2 { font-size: 1.35rem; }
h3 { font-size: 1.05rem; }
p { margin: 0 0 1em; }
code { font-family: var(--mono); font-size: .9em; background: var(--surface-2); padding: .1em .35em; border-radius: 4px; border: 1px solid var(--line); }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 4px; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--surface); padding: 8px 12px; z-index: 100; border-radius: 6px; }
.skip:focus { left: 8px; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
.eyebrow { text-transform: uppercase; letter-spacing: .08em; font-size: .75rem; font-weight: 700; color: var(--accent); margin: 0 0 .4rem; }
.wrap { width: 100%; max-width: 1120px; margin: 0 auto; padding: 0 16px; }
.narrow { max-width: 780px; }

/* Brand */
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 800; font-size: 1.1rem; color: var(--ink); text-decoration: none; letter-spacing: -.01em; }
.brand:hover { color: var(--ink); }
.brand-mark { width: 26px; height: 26px; border-radius: 7px; background: var(--accent); position: relative; flex: none; }
.brand-mark::before { content: ""; position: absolute; left: 12px; top: 6px; width: 2px; height: 8px; background: var(--accent-ink); border-radius: 2px; }
.brand-mark::after { content: ""; position: absolute; left: 12px; top: 12px; width: 7px; height: 2px; background: var(--accent-ink); border-radius: 2px; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 42px; padding: 0 18px; border-radius: 8px; border: 1px solid var(--accent); background: var(--accent); color: var(--accent-ink); font: 600 .95rem/1 var(--font); text-decoration: none; cursor: pointer; transition: background .15s, border-color .15s; }
.btn:hover { background: var(--accent-hover); border-color: var(--accent-hover); color: var(--accent-ink); }
.btn-sm { min-height: 34px; padding: 0 12px; font-size: .875rem; }
.btn-lg { min-height: 48px; padding: 0 22px; font-size: 1rem; }
.btn-block { width: 100%; }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { background: var(--surface-2); color: var(--ink); border-color: var(--muted); }
.link-btn { background: none; border: 0; padding: 0; color: var(--muted); font: inherit; cursor: pointer; text-decoration: underline; text-underline-offset: 2px; }
.link-btn:hover { color: var(--ink); }

.theme-toggle { display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 10px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); border-radius: 8px; cursor: pointer; font: 500 .8rem var(--font); }
.theme-toggle svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
.theme-toggle .i-moon { display: none; }
:root[data-theme="dark"] .theme-toggle .i-sun { display: none; }
:root[data-theme="dark"] .theme-toggle .i-moon { display: inline; }

/* Alerts & badges */
.flashes { margin: 16px 0; display: grid; gap: 8px; }
.alert { padding: 12px 14px; border-radius: 8px; border: 1px solid transparent; background: var(--info-soft); margin: 0 0 12px; }
.alert-success { background: var(--ok-soft); border-color: color-mix(in srgb, var(--ok) 30%, transparent); }
.alert-error { background: var(--danger-soft); border-color: color-mix(in srgb, var(--danger) 30%, transparent); }
.alert-warning { background: var(--warn-soft); border-color: color-mix(in srgb, var(--warn) 30%, transparent); }
.badge { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: .78rem; font-weight: 600; background: var(--surface-2); border: 1px solid var(--line); white-space: nowrap; }
.badge-approved { background: var(--ok-soft); color: var(--ok); border-color: transparent; }
.badge-pending { background: var(--warn-soft); color: var(--warn); border-color: transparent; }
.badge-rejected { background: var(--danger-soft); color: var(--danger); border-color: transparent; }

/* Forms */
.field { margin: 0 0 16px; }
label, legend { display: block; font-weight: 600; font-size: .92rem; margin: 0 0 6px; }
.label-row { display: flex; justify-content: space-between; align-items: baseline; }
.label-row a { font-size: .875rem; }
.opt { font-weight: 400; color: var(--muted); }
input[type=text], input[type=search], input[type=email], input[type=password], input[type=tel], input[type=number], input[type=date], input[type=time], input[type=datetime-local], input:not([type]), select, textarea {
  width: 100%; min-height: 44px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); color: var(--ink); font: inherit;
}
textarea { min-height: 64px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: 3px solid color-mix(in srgb, var(--accent) 35%, transparent); border-color: var(--accent); }
[aria-invalid="true"] { border-color: var(--danger) !important; }
.field-error { color: var(--danger); font-size: .875rem; margin: 6px 0 0; }
.hint { color: var(--muted); font-size: .84rem; margin: 6px 0 0; }
fieldset { border: 0; padding: 0; margin: 0 0 18px; }
.choice { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.choice legend { grid-column: 1 / -1; }
.choice-card { display: flex; gap: 10px; align-items: flex-start; padding: 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface-2); cursor: pointer; font-weight: 400; margin: 0; }
.choice-card:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
.choice-card input { margin-top: 4px; accent-color: var(--accent); }
.choice-card strong { display: block; }
.choice-card small { display: block; color: var(--muted); font-size: .84rem; line-height: 1.4; margin-top: 2px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.employer-fields[hidden] { display: none; }

/* Public header/footer */
.site-header { background: var(--surface); border-bottom: 1px solid var(--line); }
.header-inner { display: flex; align-items: center; justify-content: space-between; min-height: 64px; gap: 12px; }
.site-nav { display: flex; align-items: center; gap: 16px; }
.site-nav > a:not(.btn) { color: var(--ink); text-decoration: none; font-weight: 500; }
.site-nav > a:not(.btn):hover { color: var(--accent); }
.site-footer { border-top: 1px solid var(--line); background: var(--surface); margin-top: 48px; }
.footer-inner { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px; padding-top: 22px; padding-bottom: 22px; font-size: .9rem; color: var(--muted); }
.footer-inner p { margin: 0; }
.footer-inner nav { display: flex; gap: 18px; }
main:focus { outline: none; }

/* Hero */
.hero { padding: 48px 0 40px; }
.hero-inner { display: grid; grid-template-columns: 1.1fr .9fr; gap: 48px; align-items: center; }
.hero h1 { font-size: clamp(2rem, 4.2vw, 3rem); letter-spacing: -.025em; }
.lead { font-size: 1.12rem; color: var(--muted); max-width: 38em; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; margin: 24px 0 12px; }
.hero-demo { margin: 0; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow); overflow: hidden; }
.demo-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 16px 18px; border-bottom: 1px solid var(--line); }
.demo-k { display: block; font-size: .72rem; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); }
.demo-table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; font-size: .92rem; }
.demo-table th, .demo-table td { padding: 10px 18px; text-align: left; border-bottom: 1px solid var(--line); }
.demo-table th { font-size: .74rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 600; }
.demo-table tfoot td { font-weight: 700; border-bottom: 0; background: var(--surface-2); }
.demo-foot { font-size: .75rem; color: var(--muted); padding: 8px 18px; border-top: 1px solid var(--line); }
.num { text-align: right !important; font-variant-numeric: tabular-nums; }

.section { padding: 48px 0; }
.section-alt { background: var(--surface); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section-title { margin-bottom: 24px; }
.steps { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.steps li { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
.steps p { color: var(--muted); font-size: .95rem; margin: 0; }
.step-n { display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); font-weight: 800; margin-bottom: 12px; }
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; }
.ticks { list-style: none; padding: 0; margin: 0; }
.ticks li { position: relative; padding-left: 28px; margin-bottom: 12px; }
.ticks li::before { content: ""; position: absolute; left: 4px; top: .45em; width: 10px; height: 6px; border-left: 2px solid var(--accent); border-bottom: 2px solid var(--accent); transform: rotate(-45deg); }
.cta-band { margin-top: 36px; display: flex; justify-content: space-between; align-items: center; gap: 20px; flex-wrap: wrap; background: var(--brand); color: #fff; padding: 28px; border-radius: 14px; }
.cta-band h2 { color: #fff; margin-bottom: .3em; }
.cta-band p { margin: 0; color: #c5d0d9; }
.cta-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.cta-band .btn-ghost { color: #fff; border-color: rgba(255,255,255,.35); }
.cta-band .btn-ghost:hover { background: rgba(255,255,255,.08); }

/* Docs (guide, privacy, terms) */
.doc { padding-top: 40px; }
.doc-head { margin-bottom: 24px; }
.doc section { margin-bottom: 36px; scroll-margin-top: 16px; }
.doc h2 { margin-top: 1.4em; }
.doc h3 { margin-top: 1.4em; }
.doc li { margin-bottom: 6px; }
.toc { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 22px; margin-bottom: 32px; max-width: 420px; }
.toc h2 { font-size: 1rem; margin: 0 0 8px; }
.toc ol { margin: 0; padding-left: 20px; }

/* Auth pages */
.auth { display: flex; justify-content: center; padding: 40px 16px; }
.auth-card { width: 100%; max-width: 440px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 28px; box-shadow: var(--shadow); }
.auth-card-wide { max-width: 640px; }
.auth-alt { text-align: center; margin: 18px 0 0; font-size: .92rem; }

/* App shell */
body.app { min-height: 100vh; }
.shell { display: grid; grid-template-columns: 252px 1fr; min-height: 100vh; }
.topbar { display: none; }
.sidebar { background: var(--brand); color: #dfe7ee; padding: 20px 14px; display: flex; flex-direction: column; gap: 18px; position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.sidebar .brand { color: #fff; padding: 0 8px; }
.who { padding: 12px; border-radius: 10px; background: rgba(255,255,255,.06); }
.who-name { display: block; font-weight: 600; color: #fff; overflow-wrap: anywhere; }
.who-role { font-size: .8rem; color: #9fb0bf; }
.sidebar nav { display: grid; gap: 2px; }
.sidebar nav a { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 8px; color: #cfd9e2; text-decoration: none; font-weight: 500; }
.sidebar nav a svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linejoin: round; }
.sidebar nav a:hover { background: rgba(255,255,255,.07); color: #fff; }
.sidebar nav a[aria-current="page"] { background: rgba(60,198,178,.18); color: #fff; }
.sidebar-foot { margin-top: auto; display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 0 4px; }
.sidebar-foot .theme-toggle { background: transparent; color: #dfe7ee; border-color: rgba(255,255,255,.18); }
.sidebar-foot .link-btn { color: #b8c6d2; }
.sidebar-foot .link-btn:hover { color: #fff; }
.content { padding: 28px 32px 24px; min-width: 0; }
.app-credit { margin-top: 40px; font-size: .8rem; color: var(--muted); }
.scrim { display: none; }

.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; margin-bottom: 20px; flex-wrap: wrap; }
.page-head h1 { margin: 0; }
.cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 20px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; }
.stat-label { display: block; font-size: .82rem; color: var(--muted); }
.stat-value { display: block; font-size: 1.7rem; font-weight: 750; letter-spacing: -.02em; font-variant-numeric: tabular-nums; margin-top: 4px; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; margin-bottom: 20px; }
.panel h2 { font-size: 1.1rem; }
.empty { padding: 8px 0; }
.table { width: 100%; border-collapse: collapse; font-size: .94rem; }
.table th, .table td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
.table th { font-size: .76rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); font-weight: 600; }
.details { margin: 0; display: grid; gap: 0; }
.details > div { display: flex; justify-content: space-between; gap: 16px; padding: 9px 0; border-bottom: 1px solid var(--line); }
.details > div:last-child { border-bottom: 0; }
.details dt { color: var(--muted); }
.details dd { margin: 0; text-align: right; font-weight: 500; }

/* Responsive */
@media (max-width: 960px) {
  .hero-inner, .split { grid-template-columns: 1fr; }
  .steps, .cards { grid-template-columns: 1fr 1fr; }
  .grid-3 { grid-template-columns: 1fr; }
  .shell { grid-template-columns: 1fr; }
  .topbar { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 16px; background: var(--surface); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 20; }
  .menu-btn { display: inline-grid; place-items: center; width: 42px; height: 42px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); border-radius: 8px; cursor: pointer; }
  .menu-btn svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
  .sidebar { position: fixed; z-index: 40; left: 0; top: 0; width: min(290px, 85vw); transform: translateX(-100%); transition: transform .2s ease; }
  .sidebar.open { transform: none; }
  .scrim { display: block; position: fixed; inset: 0; background: rgba(0,0,0,.45); z-index: 30; }
  .scrim[hidden] { display: none; }
  .content { padding: 20px 16px; }
}
@media (max-width: 600px) {
  .steps, .cards, .grid-2, .choice { grid-template-columns: 1fr; }
  .site-nav { gap: 10px; }
  .site-nav > a[href="/guide"] { display: none; }
  .theme-label { display: none; }
  .auth-card { padding: 22px 18px; }
  .demo-table th, .demo-table td { padding: 8px 10px; }
  .hero { padding-top: 28px; }
  .table { display: block; overflow-x: auto; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
.details + p { margin: 14px 0 0; }

/* ---- Stage 2: lists, inline forms, settings ---- */
.nav-badge { margin-left: auto; min-width: 22px; height: 22px; padding: 0 7px; border-radius: 999px; background: var(--focus); color: #1b1300; font-size: .75rem; font-weight: 700; display: inline-grid; place-items: center; }
.panel-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 8px; }
.panel-head h2 { margin: 0; }
.sub { font-size: 1rem; margin: 20px 0 8px; }
.count { display: inline-grid; place-items: center; min-width: 24px; height: 24px; padding: 0 7px; margin-left: 6px; border-radius: 999px; background: var(--warn-soft); color: var(--warn); font-size: .8rem; vertical-align: 2px; }
.rows { list-style: none; margin: 0; padding: 0; }
.row { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.row:last-child { border-bottom: 0; }
.row-main { display: flex; flex-direction: column; gap: 2px; min-width: 0; overflow-wrap: anywhere; }
.row-main .badge { align-self: flex-start; margin-top: 2px; }
.row-actions { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; justify-content: flex-end; }
.row-stack { align-items: flex-start; }
.decision { align-items: flex-end; }
.inline-form { display: flex; align-items: flex-end; gap: 8px; }
.inline-form .field { margin: 0; }
.inline-form label { font-size: .78rem; color: var(--muted); font-weight: 600; margin-bottom: 4px; }
.input-rate { width: 110px !important; min-height: 34px !important; padding: 6px 10px !important; }
.inline-form .field-error { max-width: 220px; }
.quote { margin: 6px 0 0; padding: 6px 10px; border-left: 3px solid var(--line); color: var(--muted); font-size: .92rem; white-space: pre-line; }
.link-danger { color: var(--danger); }
.link-danger:hover { color: var(--danger); }
.search label { margin-bottom: 6px; }
.search-row { display: flex; gap: 8px; }
.search-row input { flex: 1; }
.search-compact input { min-height: 34px; padding: 6px 10px; width: 220px; }
details.request { position: relative; }
details.request > summary { list-style: none; }
details.request > summary::-webkit-details-marker { display: none; }
details.request[open] > summary { background: var(--surface-2); color: var(--ink); border-color: var(--line); }
.request-form { position: absolute; right: 0; top: calc(100% + 6px); z-index: 5; width: min(320px, 80vw); background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 14px; box-shadow: var(--shadow); display: grid; gap: 8px; }
.request-form label { margin: 0; font-size: .85rem; }
.inline-h { display: inline; font-size: 1.1rem; }
details > summary { cursor: pointer; }
.card-link { text-decoration: none; color: inherit; transition: border-color .15s; }
.card-link:hover { border-color: var(--accent); color: inherit; }
.note { background: var(--surface-2); border: 1px solid var(--line); border-radius: 8px; padding: 12px 14px; margin: 0 0 18px; font-size: .93rem; }
.note p { margin: 0 0 4px; }
.note p:last-child { margin: 0; }
.field-narrow { max-width: 260px; }
.settings .choice { max-width: 560px; }
.form-actions { display: flex; justify-content: flex-end; margin-bottom: 20px; }
@media (max-width: 700px) {
  .row, .row-stack { flex-direction: column; align-items: stretch; }
  .row-actions { justify-content: flex-start; }
  .decision { align-items: flex-end; }
  .request-form { position: static; width: 100%; margin-top: 8px; box-shadow: none; }
  details.request { width: 100%; }
  .search-compact, .search-compact input { width: 100%; }
  .form-actions .btn { width: 100%; }
}

/* ---- Stage 3: clock, timesheets ---- */
.clock { border-width: 2px; }
.clock.is-on { border-color: color-mix(in srgb, var(--ok) 55%, var(--line)); }
.clock.is-break { border-color: color-mix(in srgb, var(--warn) 55%, var(--line)); }
.clock-state { display: flex; align-items: center; gap: 10px; }
.clock-state h2 { margin: 0; }
.clock-dot { width: 12px; height: 12px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 4px var(--ok-soft); flex: none; }
.is-break .clock-dot { background: var(--warn); box-shadow: 0 0 0 4px var(--warn-soft); }
.clock-figures { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 16px; margin: 18px 0 12px; }
.clock-big { display: block; font-size: 2.4rem; font-weight: 800; letter-spacing: -.03em; font-variant-numeric: tabular-nums; line-height: 1.1; }
.clock-mid { display: block; font-size: 1.3rem; font-weight: 650; font-variant-numeric: tabular-nums; margin-top: 4px; }
.clock-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 8px; }
.clock-in-form { max-width: 420px; }
.btn-go { min-width: 200px; }
.btn-stop { background: var(--danger); border-color: var(--danger); color: #fff; }
.btn-stop:hover { background: color-mix(in srgb, var(--danger) 85%, #000); border-color: transparent; color: #fff; }
.tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 16px; }
.tabs a { padding: 8px 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); text-decoration: none; font-weight: 500; font-size: .92rem; }
.tabs a[aria-current="page"] { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.period .panel-head h2 { margin-bottom: 2px; }
.shifts td, .shifts th { white-space: nowrap; }
.shifts td.small { white-space: normal; }
.table tfoot td { font-weight: 700; border-bottom: 0; }
.actions { display: flex; gap: 12px; justify-content: flex-end; align-items: center; }
.nowrap { white-space: nowrap; }
.tag { display: inline-block; font-size: .7rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; padding: 1px 6px; border-radius: 4px; background: var(--warn-soft); color: var(--warn); vertical-align: 1px; }
.submit-row { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--line); }
.submit-row p { margin: 0; flex: 1; min-width: 200px; }
.submit-row .btn { margin-left: auto; }
.badge-lg { font-size: .9rem; padding: 5px 12px; }
a.badge { text-decoration: none; }
.cards-3 { grid-template-columns: repeat(3, 1fr); }
.decide { display: grid; grid-template-columns: auto 1fr; gap: 28px; align-items: start; }
.decide .hint { max-width: 220px; }
.reject-form { border-left: 1px solid var(--line); padding-left: 28px; }
.reject-form .field { margin-bottom: 10px; }
.filters { display: flex; gap: 12px; flex-wrap: wrap; align-items: flex-end; }
.filters .field { margin: 0; min-width: 160px; }
.filter-actions { display: flex; gap: 12px; align-items: center; padding-bottom: 6px; }
.break-row { display: grid; grid-template-columns: 1fr 1fr auto; gap: 12px; align-items: end; padding-bottom: 6px; }
.break-row .field { margin-bottom: 10px; }
.break-row > .link-btn { margin-bottom: 22px; }
.break-row .field-error { grid-column: 1 / -1; margin-top: -6px; margin-bottom: 10px; }
.break-row.is-cleared input { opacity: .5; }
@media (max-width: 960px) { .cards-3 { grid-template-columns: 1fr 1fr 1fr; } }
@media (max-width: 700px) {
  .clock-figures { grid-template-columns: 1fr 1fr; }
  .clock-figures > div:first-child { grid-column: 1 / -1; }
  .clock-actions form, .clock-actions .btn { width: 100%; }
  .clock-actions { display: grid; grid-template-columns: 1fr; }
  .btn-go { width: 100%; }
  .cards-3 { grid-template-columns: 1fr; }
  .decide { grid-template-columns: 1fr; }
  .reject-form { border-left: 0; padding-left: 0; border-top: 1px solid var(--line); padding-top: 18px; }
  .break-row { grid-template-columns: 1fr; gap: 0; border-bottom: 1px solid var(--line); margin-bottom: 12px; }
  .break-row > .link-btn { margin: 0 0 12px; justify-self: start; }
  .submit-row .btn { width: 100%; }
}
.btn-stop, :root[data-theme="dark"] .btn-stop { background: #b42318; border-color: #b42318; color: #fff; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .btn-stop { background: #b42318; border-color: #b42318; color: #fff; } }
@media (max-width: 600px) {
  .hide-sm { display: none; }
  .cards { grid-template-columns: 1fr 1fr; gap: 10px; }
  .cards .card { padding: 12px 14px; }
  .stat-value { font-size: 1.35rem; }
  .cards-3 { grid-template-columns: 1fr 1fr; }
  .col-breaks { display: none; }
}
@media (max-width: 600px) {
  .table { display: table; font-size: .86rem; }
  .table th, .table td { padding: 8px 4px; }
  .table th { font-size: .68rem; letter-spacing: .02em; }
  .shifts td, .shifts th { white-space: normal; }
  .shifts td.num { white-space: nowrap; }
  .shifts .tag { display: block; width: max-content; margin-top: 2px; }
  .actions { flex-direction: column; align-items: flex-end; gap: 4px; }
}

/* ---- Stage 4: jobs, messages, help ---- */
.jobs { list-style: none; margin: 0; padding: 0; }
.job { padding: 16px 0; border-bottom: 1px solid var(--line); }
.job:last-child { border-bottom: 0; }
.job-urgent { border-left: 3px solid var(--danger); padding-left: 14px; }
.job-head { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; }
.job-head h3 { margin: 0 0 4px; }
.job-head .eyebrow { margin-bottom: 2px; }
.job-head p { margin: 0; }
.job-badges { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.job-desc { margin: 10px 0; white-space: normal; }
.applicants summary { font-weight: 600; font-size: .92rem; color: var(--accent); }
.applicants[aria-disabled="true"] summary { color: var(--muted); pointer-events: none; list-style: none; }
.applicants ul { margin: 8px 0 0; padding-left: 18px; }
.applicants li { margin-bottom: 4px; }
.grid-4 { display: grid; grid-template-columns: 1.2fr 1fr 1fr 1fr; gap: 0 14px; }
.check { display: flex; gap: 10px; align-items: center; font-weight: 500; margin: 4px 0 0; }
.check input { width: 18px; height: 18px; accent-color: var(--accent); }
.inbox { display: grid; grid-template-columns: 300px 1fr; gap: 16px; align-items: start; }
.contacts { padding: 8px; }
.contacts ul { list-style: none; margin: 0; padding: 0; }
.contacts a { display: grid; grid-template-columns: 1fr auto; gap: 2px 8px; padding: 10px 12px; border-radius: 8px; color: var(--ink); text-decoration: none; }
.contacts a:hover { background: var(--surface-2); }
.contacts a[aria-current="page"] { background: var(--accent-soft); }
.contacts .c-name { font-weight: 600; overflow-wrap: anywhere; }
.contacts .nav-badge { margin: 0; grid-row: 1; grid-column: 2; }
.contacts .c-last { grid-column: 1 / -1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.contacts > p { padding: 10px; margin: 0; }
.conversation { display: flex; flex-direction: column; min-height: 420px; }
.conv-head { display: flex; align-items: center; gap: 12px; border-bottom: 1px solid var(--line); padding-bottom: 10px; margin-bottom: 10px; }
.conv-head h2 { margin: 0; }
.back-link { display: none; }
.thread { flex: 1; overflow-y: auto; max-height: 60vh; display: flex; flex-direction: column; gap: 10px; padding: 6px 2px 12px; }
.msg { max-width: 78%; }
.msg-mine { align-self: flex-end; text-align: right; }
.msg-body { display: inline-block; text-align: left; padding: 9px 13px; border-radius: 14px; background: var(--surface-2); border: 1px solid var(--line); overflow-wrap: anywhere; }
.msg-mine .msg-body { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.msg-meta { font-size: .75rem; color: var(--muted); margin-top: 3px; }
.composer { display: grid; grid-template-columns: 1fr auto; gap: 8px; align-items: end; border-top: 1px solid var(--line); padding-top: 12px; }
.composer textarea { min-height: 46px; }
.composer .field-error { grid-column: 1 / -1; margin: 0; }
.help { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
.help .panel ol, .help .panel ul { padding-left: 20px; margin: 0 0 8px; }
.help .panel li { margin-bottom: 6px; }
@media (max-width: 960px) {
  .grid-4 { grid-template-columns: 1fr 1fr; }
  .inbox { grid-template-columns: 1fr; }
  .inbox.has-current .contacts { display: none; }
  .back-link { display: inline; }
  .help { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .grid-4 { grid-template-columns: 1fr; }
  .msg { max-width: 90%; }
  .thread { max-height: none; }
}
