:root {
  --page: #f6f8fb;
  --surface: #ffffff;
  --surface-soft: #f1f5f9;
  --ink: #172033;
  --muted: #596579;
  --faint: #7d8798;
  --line: #dce2ea;
  --line-strong: #c8d1dd;
  --blue: #2563eb;
  --blue-dark: #1d4ed8;
  --blue-soft: #eff6ff;
  --green: #16803c;
  --green-soft: #edf9f0;
  --red: #c62828;
  --red-soft: #fff1f1;
  --amber: #946200;
  --amber-soft: #fff8e6;
  --shadow: 0 12px 34px rgba(31, 42, 61, .08);
  --font: Aptos, "Segoe UI Variable", "Segoe UI", system-ui, -apple-system, sans-serif;
  --mono: Consolas, "SFMono-Regular", ui-monospace, monospace;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; min-width: 320px; color: var(--ink); background: var(--page); font-family: var(--font); font-size: 16px; line-height: 1.55; -webkit-font-smoothing: antialiased; }
button, input, select, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: var(--blue); text-underline-offset: 3px; }
img, svg { max-width: 100%; }
h1, h2, h3, p { margin-top: 0; }
h1, h2, h3 { color: var(--ink); line-height: 1.12; letter-spacing: -.025em; }
h1 { font-size: clamp(2.1rem, 5vw, 4.5rem); }
h2 { font-size: clamp(1.55rem, 3vw, 2.45rem); }
h3 { font-size: 1.05rem; }
small { line-height: 1.35; }
[hidden] { display: none !important; }

:focus-visible { outline: 3px solid rgba(37, 99, 235, .28); outline-offset: 3px; }
.skip-link { position: fixed; z-index: 1000; left: 16px; top: -80px; padding: 10px 14px; border-radius: 8px; background: var(--ink); color: white; }
.skip-link:focus { top: 16px; }
.section-shell { width: min(1120px, calc(100% - 40px)); margin-inline: auto; }
.text-link { font-weight: 700; text-decoration: none; }
.small-note { color: var(--muted); font-size: .86rem; }

.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); font-weight: 750; font-size: 1.05rem; letter-spacing: -.015em; text-decoration: none; }
.brand-mark { position: relative; display: inline-flex; flex: 0 0 34px; width: 34px; height: 34px; overflow: hidden; border: 1px solid rgba(31, 57, 120, .1); border-radius: 10px; background: white; }
.brand-mark img { position: absolute; inset: 0; width: 100%; height: 100%; max-width: none; object-fit: cover; transform: scale(1.55); transform-origin: 50% 39%; }

.site-header { position: sticky; z-index: 50; top: 0; display: flex; align-items: center; justify-content: space-between; width: 100%; min-height: 68px; padding: 10px max(20px, calc((100% - 1120px) / 2)); border-bottom: 1px solid rgba(220, 226, 234, .9); background: rgba(255, 255, 255, .94); backdrop-filter: blur(14px); }
.site-nav { display: flex; align-items: center; gap: 26px; }
.site-nav > a:not(.button) { color: var(--muted); font-size: .9rem; font-weight: 650; text-decoration: none; }
.site-nav > a:hover { color: var(--ink); }
.menu-button { display: none; min-height: 42px; padding: 8px 12px; border: 1px solid var(--line); border-radius: 9px; color: var(--ink); background: var(--surface); font-weight: 700; }

.button { display: inline-flex; min-height: 46px; align-items: center; justify-content: center; gap: 8px; padding: 11px 18px; border: 1px solid var(--blue); border-radius: 10px; color: white; background: var(--blue); font-weight: 750; line-height: 1.1; text-align: center; text-decoration: none; cursor: pointer; transition: background-color .15s ease, border-color .15s ease, color .15s ease; }
.button:hover { border-color: var(--blue-dark); background: var(--blue-dark); }
.button-small { min-height: 40px; padding: 9px 14px; font-size: .88rem; }
.button-wide { width: 100%; }
.button-secondary { border-color: var(--line-strong); color: var(--ink); background: white; }
.button-secondary:hover { border-color: #aeb8c6; color: var(--ink); background: var(--surface-soft); }
.button-light { border-color: white; color: var(--ink); background: white; }
.button-danger { border-color: var(--red); background: var(--red); }
.text-button, .danger-link { padding: 0; border: 0; color: var(--blue); background: transparent; font-weight: 700; cursor: pointer; }
.danger-link { color: var(--red); }

/* Public home */
.home-hero { display: grid; grid-template-columns: minmax(0, .92fr) minmax(440px, 1.08fr); align-items: center; gap: clamp(44px, 7vw, 96px); min-height: 620px; padding-block: clamp(70px, 9vw, 118px); }
.home-copy { max-width: 590px; }
.home-kicker { margin-bottom: 16px; color: var(--blue); font-size: .92rem; font-weight: 750; }
.home-copy h1 { margin-bottom: 24px; font-size: clamp(3rem, 5.8vw, 5.15rem); letter-spacing: -.06em; }
.home-lede { max-width: 600px; margin-bottom: 28px; color: var(--muted); font-size: clamp(1.05rem, 1.8vw, 1.25rem); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 20px; }
.home-note { max-width: 520px; margin-bottom: 0; color: var(--faint); font-size: .84rem; }

.today-preview { padding: 26px; border: 1px solid var(--line); border-radius: 18px; background: var(--surface); box-shadow: var(--shadow); }
.preview-topline { display: flex; align-items: center; justify-content: space-between; padding-bottom: 16px; border-bottom: 1px solid var(--line); color: var(--faint); font-size: .78rem; }
.preview-topline strong { color: var(--ink); font-size: .95rem; }
.preview-date { margin: 22px 0 12px; color: var(--muted); font-weight: 650; }
.today-value-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; padding-bottom: 24px; }
.today-value-row div > span { display: block; margin-bottom: 2px; color: var(--muted); font-size: .82rem; }
.today-value-row div > strong { display: block; font-family: var(--mono); font-size: clamp(2.8rem, 6vw, 4.25rem); font-weight: 700; letter-spacing: -.08em; line-height: .95; }
.today-value-row div > strong span { color: var(--faint); font-size: .55em; }
.preview-period { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; padding: 16px; border-radius: 12px; background: var(--blue-soft); }
.preview-period div { min-width: 0; }
.preview-period div + div { padding-left: 16px; border-left: 1px solid #cfe0ff; }
.preview-period span, .preview-period strong { display: block; }
.preview-period span { margin-bottom: 3px; color: var(--muted); font-size: .76rem; }
.preview-period strong { font-family: var(--mono); font-size: 1rem; }
.preview-progress { height: 6px; margin: 14px 0 18px; overflow: hidden; border-radius: 99px; background: var(--surface-soft); }
.preview-progress span { display: block; width: 73%; height: 100%; border-radius: inherit; background: var(--blue); }
.preview-shift { display: grid; grid-template-columns: 44px 1fr auto; align-items: center; gap: 12px; padding-top: 16px; border-top: 1px solid var(--line); }
.preview-shift > span:nth-child(2) { min-width: 0; }
.preview-shift b, .preview-shift small { display: block; }
.preview-shift small { color: var(--muted); }
.preview-shift > strong { font-family: var(--mono); font-size: .9rem; }
.preview-date-box { display: grid; place-items: center; min-height: 44px; border-radius: 9px; background: var(--surface-soft); line-height: 1; }
.preview-date-box b { font-family: var(--mono); }
.preview-date-box small { margin-top: -6px; font-size: .64rem; }
.preview-disclaimer { margin: 16px 0 0; color: var(--faint); font-size: .76rem; }

.simple-section { padding-block: 88px; border-top: 1px solid var(--line); }
.simple-heading { display: grid; grid-template-columns: .55fr 1fr; align-items: end; margin-bottom: 42px; }
.simple-heading h2 { margin-bottom: 0; }
.simple-steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.simple-steps article { display: flex; gap: 16px; padding: 24px 0; border-top: 2px solid var(--line); }
.simple-steps article > span { display: grid; flex: 0 0 34px; width: 34px; height: 34px; place-items: center; border-radius: 50%; color: var(--blue); background: var(--blue-soft); font-family: var(--mono); font-weight: 750; }
.simple-steps h3 { margin: 4px 0 8px; }
.simple-steps p { margin-bottom: 0; color: var(--muted); font-size: .93rem; }
.scope-section { padding-block: 76px; border-block: 1px solid var(--line); background: white; }
.scope-grid { display: grid; grid-template-columns: .8fr 1.2fr; gap: clamp(32px, 7vw, 100px); }
.scope-grid h2 { margin-bottom: 0; }
.scope-grid > div:last-child p { max-width: 650px; color: var(--muted); }
.home-cta { display: flex; align-items: center; justify-content: space-between; gap: 32px; padding-block: 72px; }
.home-cta h2 { margin-bottom: 8px; }
.home-cta p { margin-bottom: 0; color: var(--muted); }

.site-footer { display: grid; grid-template-columns: 1fr auto; gap: 32px; padding: 40px max(20px, calc((100% - 1120px) / 2)); border-top: 1px solid var(--line); background: white; color: var(--muted); font-size: .86rem; }
.site-footer > div p { margin: 12px 0 0; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 20px; }
.site-footer nav a { color: var(--muted); }
.footer-credit { grid-column: 1 / -1; margin: 0; padding-top: 18px; border-top: 1px solid var(--line); }

/* Shared forms */
label { display: grid; gap: 7px; color: var(--ink); font-size: .9rem; font-weight: 700; }
label small { color: var(--muted); font-weight: 450; }
input, select, textarea { width: 100%; min-height: 46px; padding: 10px 12px; border: 1px solid var(--line-strong); border-radius: 9px; color: var(--ink); background: white; outline: none; }
textarea { min-height: 110px; resize: vertical; }
input:focus, select:focus, textarea:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(37, 99, 235, .12); }
fieldset { min-width: 0; margin: 0; padding: 20px; border: 1px solid var(--line); border-radius: 12px; }
legend { padding: 0 8px; font-weight: 750; }
.stack-form { display: grid; gap: 18px; }
.compact-form { gap: 14px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.form-grid-three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.form-card { display: grid; gap: 22px; padding: clamp(22px, 4vw, 34px); border: 1px solid var(--line); border-radius: 16px; background: white; box-shadow: 0 7px 26px rgba(31, 42, 61, .05); }
.form-actions { display: flex; justify-content: flex-end; gap: 12px; padding-top: 4px; }
.check-field { display: flex; align-items: flex-start; gap: 10px; }
.check-field input { width: 18px; min-height: 18px; margin-top: 2px; }
.optional { color: var(--faint); font-weight: 450; }
.label, .eyebrow { margin-bottom: 8px; color: var(--blue); font-size: .78rem; font-weight: 750; letter-spacing: 0; text-transform: none; }
.error-list { padding: 14px 16px; border: 1px solid #f0b4b4; border-radius: 10px; color: #8e1d1d; background: var(--red-soft); }
.error-list ul { margin: 8px 0 0; padding-left: 20px; }
.success-panel { padding: 18px; border: 1px solid #b5dfbf; border-radius: 10px; color: #135d2b; background: var(--green-soft); }

/* Authentication */
.auth-body { background: white; }
.auth-body > .site-header, .auth-body > .site-footer { display: none; }
.auth-shell { display: grid; grid-template-columns: minmax(300px, .82fr) minmax(480px, 1.18fr); min-height: 100vh; }
.auth-aside { display: flex; flex-direction: column; justify-content: space-between; padding: clamp(32px, 6vw, 76px); color: white; background: #1d4ed8; }
.auth-aside .brand { color: white; }
.auth-aside .brand-mark { border-color: rgba(255, 255, 255, .5); background: white; }
.auth-aside blockquote { max-width: 480px; margin: 0 0 18px; font-size: clamp(1.55rem, 3vw, 2.5rem); font-weight: 700; line-height: 1.2; letter-spacing: -.03em; }
.auth-aside .eyebrow { color: #dbeafe; }
.auth-note { max-width: 440px; margin-bottom: 0; color: #dbeafe; }
.auth-main { display: grid; place-items: center; padding: 40px 24px; background: var(--page); }
.auth-card { width: min(100%, 470px); }
.auth-card h1 { margin-bottom: 10px; font-size: clamp(2rem, 5vw, 3rem); }
.form-subtitle, .form-switch { color: var(--muted); }
.form-switch { margin-top: 20px; text-align: center; }
.label-link { display: flex; justify-content: space-between; gap: 12px; }
.admin-login { display: grid; min-height: 100vh; place-items: center; padding: 24px; }
.admin-login .form-card { width: min(100%, 460px); }

/* Application shell */
.app-body { padding-bottom: 0; background: var(--page); }
.app-body > #main-content { min-height: calc(100vh - 65px); }
.app-topbar { position: sticky; z-index: 60; top: 0; min-height: 65px; border-bottom: 1px solid var(--line); background: rgba(255, 255, 255, .96); backdrop-filter: blur(14px); }
.app-topbar-inner { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 28px; width: min(1180px, calc(100% - 40px)); min-height: 65px; margin-inline: auto; }
.app-nav { display: flex; justify-content: center; gap: 4px; }
.app-nav a { padding: 8px 11px; border-radius: 8px; color: var(--muted); font-size: .86rem; font-weight: 650; text-decoration: none; }
.app-nav a:hover { color: var(--ink); background: var(--surface-soft); }
.app-nav a.active { color: var(--blue); background: var(--blue-soft); }
.app-user { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: .82rem; }
.app-user form { display: inline-flex; }
.bottom-nav { display: none; }

.app-page { width: min(960px, calc(100% - 40px)); margin-inline: auto; padding: 46px 0 80px; }
.narrow-page { width: min(760px, calc(100% - 40px)); }
.app-page-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; margin-bottom: 28px; }
.app-page-head h1 { margin-bottom: 8px; font-size: clamp(2rem, 4vw, 3.2rem); }
.app-page-head p:last-child { margin-bottom: 0; color: var(--muted); }

.today-strip { display: grid; grid-template-columns: 1fr auto; gap: 30px; padding: 26px 28px; border: 1px solid #cfe0ff; border-radius: 16px; background: var(--blue-soft); }
.today-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; }
.today-heading h1 { margin: 2px 0 4px; font-size: clamp(2rem, 5vw, 3.45rem); }
.today-heading p { margin-bottom: 0; color: var(--muted); }
.today-date { color: var(--blue) !important; font-size: .86rem; font-weight: 750; }
.today-heading .button { margin-top: 8px; }
.today-hours { min-width: 180px; padding-left: 28px; border-left: 1px solid #cfe0ff; }
.today-hours > span, .today-hours > small { display: block; color: var(--muted); }
.today-hours > span { font-size: .82rem; font-weight: 700; }
.today-hours > strong { display: block; margin: 4px 0 5px; font-family: var(--mono); font-size: clamp(2.6rem, 6vw, 4rem); letter-spacing: -.07em; line-height: 1; }
.today-hours > small { font-size: .76rem; }

.period-summary { margin: 16px 0 24px; padding: 22px 24px; border: 1px solid var(--line); border-radius: 14px; background: white; }
.period-summary-head { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.period-summary-head div + div { padding-left: 20px; border-left: 1px solid var(--line); }
.period-summary-head span, .period-summary-head small { display: block; color: var(--muted); }
.period-summary-head span { font-size: .8rem; font-weight: 700; }
.period-summary-head strong { display: block; margin-top: 4px; font-family: var(--mono); font-size: clamp(1.35rem, 3vw, 2rem); }
.period-summary-head small { margin-top: 3px; font-size: .72rem; }
.period-progress { display: flex; align-items: center; gap: 14px; margin: 20px 0 12px; }
.period-progress progress { flex: 1; height: 7px; border: 0; border-radius: 99px; overflow: hidden; background: var(--surface-soft); }
progress::-webkit-progress-bar { background: var(--surface-soft); }
progress::-webkit-progress-value { border-radius: 99px; background: var(--blue); }
progress::-moz-progress-bar { border-radius: 99px; background: var(--blue); }
.overtime-progress::-webkit-progress-value { background: var(--green); }
.period-progress span { color: var(--muted); font-size: .76rem; white-space: nowrap; }
.period-summary-foot { display: flex; justify-content: space-between; gap: 16px; color: var(--faint); font-size: .76rem; }

.dashboard-controls, .toolbar { margin-bottom: 20px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 12px; background: white; }
.inline-form { display: flex; align-items: end; flex-wrap: wrap; gap: 12px; }
.inline-form label { min-width: 190px; flex: 1; }
.inline-form label > span { color: var(--muted); font-size: .74rem; }
.period-label { margin: 10px 0 0; color: var(--faint); font-size: .8rem; }

.dashboard-grid { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(250px, .75fr); gap: 18px; align-items: start; }
.panel, .settings-card, .plan-card, .workplace-card { border: 1px solid var(--line); border-radius: 14px; background: white; }
.panel { overflow: hidden; }
.panel-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; padding: 20px 22px; border-bottom: 1px solid var(--line); }
.panel-head h2 { margin: 0 0 3px; font-size: 1.18rem; }
.panel-head p { margin: 0; color: var(--muted); font-size: .8rem; }
.panel-head > a { font-size: .86rem; font-weight: 700; text-decoration: none; }
.shift-list { display: grid; }
.shift-row { display: grid; grid-template-columns: 42px minmax(0, 1fr) auto; align-items: center; gap: 12px; min-height: 70px; padding: 12px 20px; border-bottom: 1px solid var(--line); color: var(--ink); text-decoration: none; }
.shift-row:last-child { border-bottom: 0; }
.shift-row:hover { background: #fafbfc; }
.shift-row > strong { font-family: var(--mono); font-size: .82rem; }
.date-block { display: grid; place-items: center; width: 38px; height: 42px; border-radius: 8px; background: var(--surface-soft); line-height: 1; }
.date-block b { font-family: var(--mono); font-size: .92rem; }
.date-block small { color: var(--faint); font-size: .57rem; }
.shift-main { min-width: 0; }
.shift-main b, .shift-main small { display: block; }
.shift-main b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .9rem; }
.shift-main small { margin-top: 3px; color: var(--muted); font-size: .76rem; }
.reconciliation-card { padding: 22px; }
.reconciliation-card h2 { margin-bottom: 10px; font-size: 1.2rem; }
.reconciliation-card > p { color: var(--muted); font-size: .88rem; }
.difference { margin: 18px 0 10px; font-family: var(--mono); font-size: 2rem; font-weight: 750; }
.difference.positive, .comparison-result.positive { color: var(--green); }
.difference.negative, .comparison-result.negative { color: var(--red); }
.export-links { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 18px; font-size: .8rem; }
.empty-state { display: grid; justify-items: start; gap: 6px; padding: 32px 22px; color: var(--muted); }
.empty-state > span { color: var(--blue); font-size: 1.5rem; }
.empty-state h2, .empty-state h3, .empty-state p { margin-bottom: 0; }

.form-layout { display: grid; grid-template-columns: minmax(230px, .7fr) minmax(0, 1.3fr); gap: clamp(30px, 6vw, 72px); align-items: start; }
.form-intro { position: sticky; top: 105px; }
.form-intro h1 { margin-bottom: 16px; font-size: clamp(2rem, 4vw, 3.3rem); }
.form-intro > p:not(.label) { color: var(--muted); }
.calculation-note { margin-top: 24px; padding: 16px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface-soft); }
.calculation-note p { margin: 4px 0 0; color: var(--muted); font-size: .86rem; }
.mode-fieldset { padding: 0; border: 0; }
.mode-fieldset legend { margin-bottom: 9px; padding: 0; font-size: .9rem; }
.segmented { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; padding: 5px; border-radius: 10px; background: var(--surface-soft); }
.segmented label { display: block; cursor: pointer; }
.segmented input { position: absolute; width: 1px; height: 1px; min-height: 1px; opacity: 0; }
.segmented span { display: block; padding: 10px 12px; border-radius: 7px; color: var(--muted); text-align: center; }
.segmented input:checked + span { color: var(--ink); background: white; box-shadow: 0 1px 4px rgba(31, 42, 61, .1); }
.segmented input:focus-visible + span { outline: 3px solid rgba(37, 99, 235, .28); }
.live-total { display: flex; align-items: center; justify-content: space-between; margin-top: 14px; padding: 13px 15px; border-radius: 10px; color: var(--muted); background: var(--blue-soft); }
.live-total strong { color: var(--blue); font-family: var(--mono); font-size: 1.2rem; }
.advanced-fields { padding: 16px; border: 1px solid var(--line); border-radius: 10px; }
.advanced-fields summary { color: var(--blue); font-weight: 700; cursor: pointer; }
.advanced-fields summary span { float: right; color: var(--faint); font-size: .75rem; font-weight: 600; }
.advanced-fields[open] summary { margin-bottom: 18px; }
.advanced-fields > label { margin-top: 16px; }
.quick-times { display: grid; gap: 10px; padding: 15px; border: 1px solid var(--line); border-radius: 11px; background: var(--surface-soft); }
.quick-times > div:first-child { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.quick-times small { color: var(--muted); }
.quick-time-options { display: flex; flex-wrap: wrap; gap: 8px; }
.quick-time-options button { min-height: 39px; padding: 8px 12px; border: 1px solid #bfd3f8; border-radius: 999px; color: #244579; background: white; font: inherit; font-size: .78rem; font-weight: 700; cursor: pointer; }
.quick-time-options button:hover, .quick-time-options button:focus-visible { border-color: var(--blue); color: var(--blue); outline: none; }
.privacy-reminder { margin: -4px 0 0; color: var(--muted); font-size: .76rem; }

.balance-card { padding: 26px; border-radius: 14px; color: var(--ink); background: var(--blue-soft); }
.balance-card.compact { align-self: start; }
.balance-main span, .balance-main small { display: block; color: var(--muted); }
.balance-main strong { display: block; margin: 5px 0; font-family: var(--mono); font-size: clamp(2rem, 5vw, 3.1rem); }
.balance-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 20px; }
.balance-stats span, .balance-stats strong { display: block; }
.balance-stats span { color: var(--muted); font-size: .75rem; }
.balance-bars { display: grid; gap: 12px; margin-top: 20px; }
.balance-bars label { display: grid; grid-template-columns: 120px 1fr; align-items: center; }
.calculation-lines { display: grid; gap: 10px; margin-top: 24px; padding-top: 20px; border-top: 1px solid #cfe0ff; }
.calculation-lines > div { display: flex; justify-content: space-between; gap: 20px; font-size: .86rem; }
.reconcile-grid { display: grid; grid-template-columns: minmax(250px, .75fr) minmax(0, 1.25fr); gap: 20px; align-items: start; }
.comparison-result { display: grid; gap: 5px; margin-top: 6px; padding: 16px; border-radius: 10px; background: var(--surface-soft); }
.comparison-result strong { font-family: var(--mono); font-size: 1.6rem; }
.comparison-result small { color: var(--muted); }
.disclaimer { margin-top: 18px; color: var(--faint); font-size: .8rem; }

.shift-table-head, .shift-table-row { display: grid; grid-template-columns: 1.05fr 1fr .75fr 1.4fr auto; align-items: center; gap: 14px; padding: 12px 20px; }
.shift-table-head { color: var(--faint); background: var(--surface-soft); font-size: .72rem; font-weight: 700; }
.shift-table-row { min-height: 62px; border-top: 1px solid var(--line); font-size: .86rem; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row-actions { display: flex; align-items: center; gap: 12px; }
.row-actions form { display: inline-flex; }
.deleted-panel, .danger-zone { margin-top: 18px; padding: 16px 18px; border: 1px solid var(--line); border-radius: 12px; background: white; }
.deleted-panel summary, .danger-zone summary { font-weight: 700; cursor: pointer; }
.deleted-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-top: 12px; }

.card-list { display: grid; gap: 14px; }
.workplace-card, .plan-card, .settings-card { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; padding: 22px; }
.workplace-card h2, .plan-card h2, .settings-card h2 { margin: 9px 0 6px; font-size: 1.18rem; }
.workplace-card p, .workplace-card small, .plan-card p, .settings-card p { color: var(--muted); }
.workplace-card p, .plan-card p, .settings-card p { margin-bottom: 4px; }
.workplace-actions { display: flex; gap: 8px; }
.status-pill { display: inline-flex; align-items: center; min-height: 25px; padding: 3px 8px; border-radius: 99px; color: var(--green); background: var(--green-soft); font-size: .7rem; font-weight: 750; }
.settings-card + .settings-card { margin-top: 14px; }
.settings-card > div:first-child { flex: 1; }
.settings-card > form, .settings-card > div:last-child:not(:first-child) { width: min(100%, 330px); }
.plan-note { color: var(--muted); }

/* Public secondary pages */
.page-hero { padding-block: 86px 56px; }
.page-hero h1 { max-width: 820px; margin-bottom: 20px; font-size: clamp(2.5rem, 6vw, 4.7rem); }
.page-hero em { font-style: normal; color: var(--blue); }
.page-hero > p:last-child { max-width: 680px; color: var(--muted); font-size: 1.08rem; }
.pricing-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; padding-bottom: 70px; }
.price-card { padding: 30px; border: 1px solid var(--line); border-radius: 16px; background: white; }
.price-card-dark { color: var(--ink); background: var(--blue-soft); }
.price { margin: 16px 0 22px; color: var(--muted); }
.price strong { color: var(--ink); font-family: var(--mono); font-size: 2.6rem; }
.check-list { display: grid; gap: 10px; margin: 0 0 28px; padding: 0; list-style: none; }
.check-list li::before { content: "✓"; margin-right: 10px; color: var(--green); font-weight: 800; }
.legal-note { margin-bottom: 70px; padding: 28px; border: 1px solid var(--line); border-radius: 14px; background: white; }
.legal-note p { margin-bottom: 0; color: var(--muted); }
.legal-page { max-width: 780px; padding-block: 72px 100px; }
.legal-page h1 { margin-bottom: 10px; }
.legal-page h2 { margin: 42px 0 12px; font-size: 1.35rem; }
.legal-page p { color: var(--muted); }
.legal-updated { padding-bottom: 22px; border-bottom: 1px solid var(--line); font-size: .86rem; }
.form-page { display: grid; grid-template-columns: .75fr 1.25fr; gap: clamp(36px, 8vw, 100px); padding-block: 76px 100px; }

/* Admin, messages, errors */
.admin-topbar { display: flex; align-items: center; justify-content: space-between; padding: 0 max(20px, calc((100% - 1100px) / 2)); }
.admin-page { width: min(1100px, calc(100% - 40px)); margin-inline: auto; padding: 46px 0 80px; }
.metric-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 20px; }
.metric-grid article { padding: 20px; border: 1px solid var(--line); border-radius: 12px; background: white; }
.metric-grid span, .metric-grid strong { display: block; }
.metric-grid span { color: var(--muted); font-size: .8rem; }
.metric-grid strong { margin-top: 6px; font-family: var(--mono); font-size: 1.8rem; }
.support-message { display: flex; justify-content: space-between; gap: 24px; padding: 20px 22px; border-top: 1px solid var(--line); }
.support-message h3 { margin: 8px 0; }
.support-message p { color: var(--muted); }
.support-message.is-read { opacity: .72; }
.support-from { font-size: .8rem; }
.flash-stack { position: fixed; z-index: 100; top: 78px; right: 20px; width: min(390px, calc(100% - 40px)); }
.flash { margin-bottom: 8px; padding: 13px 15px; border: 1px solid var(--line); border-radius: 10px; background: white; box-shadow: var(--shadow); }
.flash-success { border-color: #b5dfbf; background: var(--green-soft); }
.flash-error { border-color: #f0b4b4; background: var(--red-soft); }
.error-page { display: grid; min-height: 70vh; place-items: center; padding: 30px; text-align: center; }
.error-page > div { max-width: 580px; }

/* Print record */
.print-body { background: white; }
.print-sheet { width: min(900px, calc(100% - 40px)); margin: 32px auto; }
.print-brand { margin-bottom: 28px; font-size: 1.2rem; font-weight: 800; }
.print-summary { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; padding: 20px 0; border-block: 1px solid #bbb; }
.print-summary span, .print-summary strong { display: block; }
.print-total { font-family: var(--mono); font-size: 2rem; }

/* Original CareClock workflow: Today + calendar dashboard */
.app-nav-add { margin-left: 8px; color: white !important; background: var(--blue) !important; }
.app-nav-add:hover { background: var(--blue-dark) !important; }
.tracker-page { width: min(520px, 100%); min-height: calc(100vh - 65px); margin-inline: auto; border-inline: 1px solid var(--line); background: var(--page); }
.tracker-today { position: sticky; z-index: 20; top: 65px; padding: 22px 20px 20px; border-bottom: 1px solid var(--line); background: rgba(255, 255, 255, .96); backdrop-filter: blur(14px); }
.tracker-date { margin-bottom: 14px; font-family: var(--mono); font-size: clamp(1.18rem, 4vw, 1.7rem); font-weight: 750; letter-spacing: -.04em; }
.tracker-today-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 18px; }
.tracker-hours > span { display: block; margin-bottom: 3px; color: var(--faint); font-size: .72rem; font-weight: 700; }
.tracker-hours > strong { display: block; font-family: var(--mono); font-size: 3.15rem; font-weight: 700; letter-spacing: -.07em; line-height: .92; }
.tracker-main { display: grid; gap: 18px; padding: 20px 20px 64px; }
.tracker-card { padding: 18px; border: 1px solid var(--line); border-radius: 15px; background: rgba(255, 255, 255, .82); }
.tracker-card-head, .tracker-section-head, .tracker-day-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; }
.tracker-card-head > span, .tracker-section-head h2 { color: var(--faint); font-size: .72rem; font-weight: 750; }
.tracker-card-head > small { color: var(--muted); font-family: var(--mono); font-size: .7rem; }
.period-total { display: flex; align-items: baseline; gap: 6px; margin: 13px 0 12px; }
.period-total strong { font-family: var(--mono); font-size: 2rem; line-height: 1; }
.period-total span { color: var(--faint); font-size: .82rem; }
.period-card progress { display: block; width: 100%; height: 7px; border: 0; border-radius: 99px; overflow: hidden; }
.period-note { display: flex; justify-content: space-between; gap: 14px; margin-top: 10px; color: var(--muted); font-size: .72rem; }
.period-note a { max-width: 45%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.reimbursement-note { margin: 10px 0 0; color: var(--green); font-size: .72rem; }
.period-compare-link { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 15px -18px -18px; padding: 13px 18px; border-top: 1px solid var(--line); color: var(--blue); font-size: .76rem; font-weight: 700; text-decoration: none; }
.period-compare-link span { font-size: 1.15rem; }
.repeat-shift { display: inline-block; margin: 7px 4px 0; color: var(--blue); font-size: .7rem; font-weight: 700; text-decoration: none; }
.reimbursement-line { flex-wrap: wrap; color: var(--green); }
.reimbursement-line small { width: 100%; color: var(--muted); text-align: right; }
.calendar-add-day { margin-top: 4px; padding-top: 11px; border-top: 1px solid var(--line); color: var(--blue) !important; font-weight: 700; }
.overtime-text { color: var(--green) !important; }
.tracker-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 9px; }
.tracker-stat { min-width: 0; padding: 13px 12px; border: 1px solid var(--line); border-radius: 11px; background: rgba(255, 255, 255, .82); }
.tracker-stat > span { display: block; overflow: hidden; color: var(--faint); font-size: .64rem; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.tracker-stat > strong { display: block; margin-top: 5px; overflow: hidden; font-family: var(--mono); font-size: 1.15rem; text-overflow: ellipsis; white-space: nowrap; }
.tracker-stat small { color: var(--faint); font-family: var(--font); font-size: .62rem; font-weight: 500; }
.week-range { margin: -10px 4px 0; color: var(--muted); font-size: .7rem; }
.tracker-section { min-width: 0; }
.tracker-section-head { margin-bottom: 10px; padding-inline: 4px; }
.tracker-section-head h2 { margin: 0; letter-spacing: .02em; }
.tracker-section-head span { color: var(--faint); font-family: var(--mono); font-size: .68rem; }
.tracker-blocks, .tracker-days { display: grid; gap: 9px; }
.tracker-block { display: grid; grid-template-columns: 12px minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 13px; border: 1px solid var(--line); border-radius: 11px; color: var(--ink); background: rgba(255, 255, 255, .82); text-decoration: none; }
.block-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--blue); box-shadow: 0 0 0 4px var(--blue-soft); }
.block-main { min-width: 0; }
.block-main b, .block-main small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.block-main b { font-family: var(--mono); font-size: .78rem; }
.block-main small { margin-top: 3px; color: var(--muted); font-size: .72rem; }
.tracker-block > strong { font-family: var(--mono); font-size: .74rem; }
.tracker-empty { padding: 18px; border: 1px solid var(--line); border-radius: 11px; color: var(--muted); background: rgba(255, 255, 255, .82); font-size: .84rem; }
.tracker-empty p { margin-bottom: 4px; }
.tracker-day { overflow: hidden; border: 1px solid var(--line); border-radius: 11px; background: rgba(255, 255, 255, .82); }
.tracker-day-head { padding: 11px 13px; }
.tracker-day-head strong { font-size: .78rem; }
.tracker-day-head span { color: var(--muted); font-family: var(--mono); font-size: .7rem; }
.tracker-day > a, .history-block > a { display: grid; grid-template-columns: minmax(0, auto) minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 10px 13px; border-top: 1px solid var(--line); color: var(--ink); font-size: .73rem; text-decoration: none; }
.tracker-day > a span, .history-block > a span { font-family: var(--mono); font-weight: 700; }
.tracker-day > a small, .history-block > a small { overflow: hidden; color: var(--muted); text-overflow: ellipsis; white-space: nowrap; }
.tracker-day > a strong, .history-block > a strong { font-family: var(--mono); }

.calendar-page { background: var(--page); }
.calendar-header { position: sticky; z-index: 20; top: 65px; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 17px 20px; border-bottom: 1px solid var(--line); background: rgba(255, 255, 255, .96); backdrop-filter: blur(14px); }
.calendar-header > div:first-child > span { display: block; color: var(--faint); font-family: var(--mono); font-size: .66rem; }
.calendar-header h1 { margin: 1px 0 0; font-size: 1.2rem; letter-spacing: -.02em; }
.calendar-header small { display: block; max-width: 190px; overflow: hidden; color: var(--muted); font-size: .68rem; text-overflow: ellipsis; white-space: nowrap; }
.calendar-header > div:last-child { display: flex; gap: 7px; }
.calendar-month-head { display: grid; grid-template-columns: 36px 1fr 36px; align-items: center; gap: 12px; }
.calendar-month-head > a { display: grid; width: 34px; height: 34px; place-items: center; border: 1px solid var(--line); border-radius: 8px; color: var(--muted); font-size: 1.15rem; text-decoration: none; }
.calendar-month-head > div { text-align: center; }
.calendar-month-head strong, .calendar-month-head span { display: block; }
.calendar-month-head strong { font-size: .9rem; }
.calendar-month-head span { color: var(--faint); font-family: var(--mono); font-size: .64rem; }
.calendar-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.calendar-weekdays { margin: 16px 0 7px; }
.calendar-weekdays span { color: var(--faint); font-family: var(--mono); font-size: .62rem; text-align: center; }
.calendar-day, .calendar-blank { aspect-ratio: 1; }
.calendar-day { position: relative; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 8px; color: var(--muted); font-family: var(--mono); font-size: .72rem; text-decoration: none; }
.calendar-day small { position: absolute; right: 1px; bottom: 1px; left: 1px; overflow: hidden; font-size: .48rem; text-align: center; text-overflow: clip; white-space: nowrap; }
.calendar-day.heat-1 { color: var(--ink); background: #edf4ff; }
.calendar-day.heat-2 { color: var(--ink); background: #dbeafe; }
.calendar-day.heat-3 { color: #13254c; background: #a9c9ff; }
.calendar-day.heat-4 { color: white; background: var(--blue); }
.calendar-day.is-today { border-color: var(--blue); box-shadow: inset 0 0 0 1px var(--blue); }
.calendar-day.is-selected { outline: 2px solid var(--ink); outline-offset: 2px; }
.calendar-selected { display: grid; gap: 7px; margin-top: 16px; padding: 13px; border-radius: 10px; background: var(--surface-soft); }
.calendar-selected > div { display: flex; justify-content: space-between; gap: 14px; font-size: .75rem; }
.calendar-selected > div span { color: var(--muted); font-family: var(--mono); }
.calendar-selected > a { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 9px; color: var(--ink); font-size: .7rem; text-decoration: none; }
.calendar-selected > a span, .calendar-selected > a strong { font-family: var(--mono); }
.calendar-selected > a small { overflow: hidden; color: var(--muted); text-overflow: ellipsis; white-space: nowrap; }
.calendar-selected p { margin: 0; color: var(--muted); font-size: .75rem; }
.calendar-search form { display: grid; grid-template-columns: 1fr auto; align-items: end; gap: 8px; }
.calendar-search form label { font-size: .7rem; }
.calendar-search input { min-height: 40px; font-size: .8rem; }
.calendar-search > div { display: flex; justify-content: space-between; gap: 12px; margin-top: 9px; color: var(--muted); font-size: .68rem; }
.calendar-search > div strong { font-family: var(--mono); }
.history-block { display: grid; grid-template-columns: minmax(0, 1fr) 28px; align-items: center; border-top: 1px solid var(--line); }
.history-block > a { border-top: 0; }
.history-block form { display: grid; place-items: center; }
.history-block .danger-link { width: 28px; height: 28px; font-size: 1rem; }

@media (max-width: 900px) {
  .site-nav { gap: 16px; }
  .home-hero { grid-template-columns: 1fr; min-height: auto; padding-block: 70px; }
  .home-copy { max-width: 720px; }
  .today-preview { width: min(100%, 620px); }
  .simple-heading { grid-template-columns: 1fr; }
  .simple-steps { grid-template-columns: 1fr; gap: 0; }
  .simple-steps article { max-width: 680px; }
  .app-user > span { display: none; }
  .app-topbar-inner { gap: 16px; }
  .app-nav a { padding-inline: 8px; }
  .form-layout { grid-template-columns: 1fr; }
  .form-intro { position: static; max-width: 680px; }
  .dashboard-grid, .reconcile-grid { grid-template-columns: 1fr; }
  .reconciliation-card { order: 2; }
}

@media (max-width: 720px) {
  html { scroll-behavior: auto; }
  body { font-size: 15px; }
  .section-shell, .app-page, .narrow-page, .admin-page { width: min(100% - 36px, 1120px); }
  .site-header { min-height: 62px; padding-inline: 18px; }
  .menu-button { display: inline-flex; align-items: center; }
  .site-nav { position: absolute; top: 62px; right: 14px; left: 14px; display: none; align-items: stretch; gap: 4px; padding: 10px; border: 1px solid var(--line); border-radius: 12px; background: white; box-shadow: var(--shadow); }
  .site-nav.is-open { display: grid; }
  .site-nav > a { min-height: 44px; padding: 11px 12px; border-radius: 8px; }
  .site-nav > .button { color: white; }
  .home-hero { gap: 40px; padding-block: 52px 62px; }
  .home-copy h1 { margin-bottom: 18px; font-size: clamp(2.65rem, 13vw, 4rem); }
  .home-lede { margin-bottom: 22px; }
  .today-preview { padding: 20px; border-radius: 14px; }
  .today-value-row { align-items: center; }
  .today-value-row .button { min-height: 43px; padding-inline: 13px; }
  .preview-period { grid-template-columns: 1fr; }
  .preview-period div + div { padding: 12px 0 0; border-top: 1px solid #cfe0ff; border-left: 0; }
  .simple-section { padding-block: 58px; }
  .simple-heading { margin-bottom: 20px; }
  .scope-section { padding-block: 54px; }
  .scope-grid { grid-template-columns: 1fr; gap: 24px; }
  .home-cta { align-items: flex-start; flex-direction: column; padding-block: 56px; }
  .site-footer { grid-template-columns: 1fr; padding: 34px 18px; }
  .footer-credit { grid-column: 1; }
  .flash-stack { position: static; width: calc(100% - 36px); margin: 12px auto -4px; }
  .flash { box-shadow: none; }

  .auth-shell { grid-template-columns: 1fr; min-height: auto; }
  .auth-aside { min-height: 180px; padding: 26px 20px; }
  .auth-aside > div:last-child { display: none; }
  .auth-main { min-height: calc(100vh - 180px); padding: 32px 18px 50px; }
  .auth-card h1 { font-size: 2.2rem; }

  .app-body { padding-bottom: 76px; }
  .app-body > #main-content { min-height: calc(100vh - 122px); }
  .app-topbar { min-height: 56px; }
  .app-topbar-inner { display: flex; justify-content: space-between; width: calc(100% - 36px); min-height: 56px; }
  .app-topbar .brand-mark { flex-basis: 30px; width: 30px; height: 30px; border-radius: 9px; }
  .app-nav { display: none; }
  .app-user { margin-left: auto; }
  .bottom-nav { position: fixed; z-index: 70; right: 0; bottom: 0; left: 0; display: grid; grid-template-columns: repeat(5, 1fr); min-height: 68px; padding: 6px max(8px, env(safe-area-inset-right)) calc(6px + env(safe-area-inset-bottom)) max(8px, env(safe-area-inset-left)); border-top: 1px solid var(--line); background: rgba(255, 255, 255, .98); }
  .bottom-nav a { display: grid; place-items: center; gap: 1px; min-width: 0; border-radius: 8px; color: var(--muted); font-size: .65rem; font-weight: 700; text-decoration: none; }
  .bottom-nav a span { font-size: 1rem; line-height: 1; }
  .bottom-nav a.active { color: var(--blue); background: var(--blue-soft); }
  .bottom-nav .bottom-add { color: var(--blue); }
  .bottom-nav .bottom-add span { display: grid; width: 30px; height: 30px; place-items: center; border-radius: 50%; color: white; background: var(--blue); font-size: 1.25rem; }
  .app-page { padding: 26px 0 38px; }
  .tracker-page { min-height: calc(100vh - 124px); border-inline: 0; }
  .tracker-today, .calendar-header { top: 56px; }
  .tracker-main { padding: 18px 16px 36px; }
  .tracker-today { padding: 18px 16px; }
  .tracker-date { font-size: 1.28rem; }
  .tracker-hours > strong { font-size: 2.8rem; }
  .tracker-today-row .button { min-height: 42px; padding-inline: 13px; font-size: .8rem; }
  .calendar-header { padding: 13px 16px; }
  .calendar-header .button { min-height: 36px; padding: 8px 10px; font-size: .72rem; }
  .app-page-head { align-items: center; margin-bottom: 22px; }
  .app-page-head h1 { font-size: 2rem; }
  .app-page-head .button { min-height: 42px; padding-inline: 13px; }

  .today-strip { grid-template-columns: 1fr; gap: 20px; padding: 20px; }
  .today-heading { align-items: center; }
  .today-heading h1 { font-size: 2.25rem; }
  .today-heading .button { margin-top: 0; white-space: nowrap; }
  .today-hours { min-width: 0; padding: 18px 0 0; border-top: 1px solid #cfe0ff; border-left: 0; }
  .today-hours > strong { font-size: 3rem; }
  .period-summary { padding: 18px; }
  .period-summary-head { grid-template-columns: 1fr; gap: 15px; }
  .period-summary-head div + div { padding: 15px 0 0; border-top: 1px solid var(--line); border-left: 0; }
  .period-progress { align-items: flex-start; flex-direction: column; gap: 8px; }
  .period-progress progress { width: 100%; flex: auto; }
  .dashboard-controls, .toolbar { padding: 12px; }
  .inline-form { display: grid; grid-template-columns: 1fr; }
  .inline-form label { min-width: 0; }
  .panel-head { padding: 17px 16px; }
  .shift-row { padding: 11px 14px; }
  .reconciliation-card { padding: 18px; }

  .form-grid, .form-grid-three { grid-template-columns: 1fr; }
  .form-card { gap: 18px; padding: 20px 18px; }
  .form-actions { display: grid; grid-template-columns: 1fr 1fr; }
  .shift-table-head { display: none; }
  .shift-table-row { grid-template-columns: 1fr auto; gap: 4px 12px; padding: 14px 16px; }
  .shift-table-row > span:nth-child(2), .shift-table-row > span:nth-child(3), .shift-table-row > span:nth-child(4) { grid-column: 1; }
  .shift-table-row > .row-actions { grid-column: 2; grid-row: 1 / span 3; align-self: start; flex-direction: column; align-items: flex-end; }
  .truncate { white-space: normal; }
  .workplace-card, .plan-card, .settings-card { align-items: stretch; flex-direction: column; }
  .settings-card > form, .settings-card > div:last-child:not(:first-child) { width: 100%; }
  .balance-stats { grid-template-columns: 1fr 1fr 1fr; }
  .balance-bars label { grid-template-columns: 1fr; }
  .page-hero { padding-block: 56px 36px; }
  .pricing-grid, .form-page { grid-template-columns: 1fr; }
  .pricing-grid { padding-bottom: 50px; }
  .form-page { padding-block: 52px 70px; }
  .metric-grid { grid-template-columns: 1fr 1fr; }
  .support-message { flex-direction: column; }
}

@media (max-width: 390px) {
  .section-shell, .app-page, .narrow-page, .admin-page { width: calc(100% - 30px); }
  .hero-actions { display: grid; grid-template-columns: 1fr 1fr; }
  .today-value-row { align-items: stretch; flex-direction: column; }
  .today-value-row .button { width: 100%; }
  .preview-shift { grid-template-columns: 40px 1fr; }
  .preview-shift > strong { grid-column: 2; }
  .today-heading { align-items: flex-start; }
  .today-heading .button { padding-inline: 11px; font-size: .82rem; }
  .period-summary-foot { flex-direction: column; gap: 2px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; }
}

@media print {
  .site-header, .site-footer, .app-topbar, .bottom-nav, .button, .flash-stack { display: none !important; }
  body { color: black; background: white; }
  .print-sheet { width: 100%; margin: 0; }
}
