/* MyBenefitsWatch Time Tracking — v3 "runway"
   Cool graphite on Stripe-gray ground; brand teal accent, indigo data color.
   One family (Inter) — hierarchy comes from weight, size and tracking. */

:root {
  --bg: #f6f8fb;
  --surface: #ffffff;
  --ink: #16181d;
  --ink-2: #5b6472;
  --ink-3: #8a93a2;
  --line: #e6eaf0;
  --line-soft: #eef1f6;
  --teal: #0e9384;
  --teal-deep: #0b7a6e;
  --teal-wash: #e5f5f2;
  --indigo: #5469d4;
  --indigo-deep: #3a4cb1;
  --indigo-wash: #ebeefb;
  --amber: #c07711;
  --amber-deep: #955a0a;
  --amber-wash: #fbf1e0;
  --danger: #d64545;
  --danger-wash: #fcecec;
  --line-strong: #d3d9e3;
  --thumb: #ffffff;
  --topbar-bg: rgba(255, 255, 255, .82);
  --toast-accent: #34d3bf;
  --tick: rgba(22, 24, 29, .14);
  --btn-a: #0e9384;
  --btn-b: #0b7a6e;
  --btn-a-h: #12a190;
  --btn-b-h: #0e9384;
  --bar-muted: #c3ccdc;
  --heat-0: #edf1f5;
  --heat-1: #c9ebe4;
  --heat-2: #82ccc0;
  --heat-3: #2fa593;
  --heat-4: #0b7a6e;
  color-scheme: light;
  --font: "Inter", -apple-system, "SF Pro Text", "Segoe UI", system-ui, sans-serif;
  --shadow-1: 0 1px 2px rgba(22, 24, 29, .04), 0 1px 3px rgba(22, 24, 29, .05);
  --shadow-2: 0 2px 4px rgba(22, 24, 29, .04), 0 8px 24px rgba(22, 24, 29, .07);
  --shadow-3: 0 4px 8px rgba(22, 24, 29, .05), 0 20px 48px rgba(22, 24, 29, .12);
  --ease-out: cubic-bezier(.16, 1, .3, 1);
  --r-sm: 8px;
  --r-md: 12px;
  --r-lg: 16px;
}

/* Dark theme. The signed-out screens follow the browser (media query);
   once signed in, the header toggle stamps data-theme and wins. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #101216;
    --surface: #181b21;
    --ink: #e8eaee;
    --ink-2: #a4adba;
    --ink-3: #727c8c;
    --line: #262b34;
    --line-soft: #1f242c;
    --teal: #0f9e8e;
    --teal-deep: #26bfae;
    --teal-wash: #152e2b;
    --indigo: #7b8ff0;
    --indigo-deep: #a5b4fc;
    --indigo-wash: #252b47;
    --amber: #d99a3d;
    --amber-deep: #ecb56b;
    --amber-wash: #33270f;
    --danger: #ef6a6a;
    --danger-wash: #372125;
    --line-strong: #39414e;
    --thumb: #2c3440;
    --topbar-bg: rgba(16, 18, 22, .8);
    --toast-accent: #0b7a6e;
    --tick: rgba(232, 234, 238, .22);
    --btn-a: #14a897;
    --btn-b: #0f8a7c;
    --btn-a-h: #19b7a5;
    --btn-b-h: #12988a;
    --bar-muted: #39424f;
    --heat-0: #20252e;
    --heat-1: #1c3f3a;
    --heat-2: #166055;
    --heat-3: #12867a;
    --heat-4: #25b3a2;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #101216;
  --surface: #181b21;
  --ink: #e8eaee;
  --ink-2: #a4adba;
  --ink-3: #727c8c;
  --line: #262b34;
  --line-soft: #1f242c;
  --teal: #0f9e8e;
  --teal-deep: #26bfae;
  --teal-wash: #152e2b;
  --indigo: #7b8ff0;
  --indigo-deep: #a5b4fc;
  --indigo-wash: #252b47;
  --amber: #d99a3d;
  --amber-deep: #ecb56b;
  --amber-wash: #33270f;
  --danger: #ef6a6a;
  --danger-wash: #372125;
  --line-strong: #39414e;
  --thumb: #2c3440;
  --topbar-bg: rgba(16, 18, 22, .8);
  --toast-accent: #0b7a6e;
  --tick: rgba(232, 234, 238, .22);
  --btn-a: #14a897;
  --btn-b: #0f8a7c;
  --btn-a-h: #19b7a5;
  --btn-b-h: #12988a;
  --bar-muted: #39424f;
  --heat-0: #20252e;
  --heat-1: #1c3f3a;
  --heat-2: #166055;
  --heat-3: #12867a;
  --heat-4: #25b3a2;
  color-scheme: dark;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
button, input, a { touch-action: manipulation; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; left: 12px; top: -48px; z-index: 60;
  background: var(--ink); color: var(--bg); font-weight: 600;
  padding: 10px 16px; border-radius: 0 0 var(--r-sm) var(--r-sm);
  text-decoration: none; transition: top .15s ease;
}
.skip-link:focus { top: 0; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
h1, h2 { font-weight: 650; letter-spacing: -0.022em; }
button { font-family: inherit; font-size: inherit; cursor: pointer; }
input, textarea {
  font-family: inherit; font-size: 15px; color: var(--ink);
  border: 1px solid var(--line); border-radius: var(--r-sm);
  padding: 9px 12px; background: var(--surface); width: 100%;
  transition: border-color .15s ease, box-shadow .15s ease;
}
input:hover:not(:disabled), textarea:hover { border-color: var(--line-strong); }
input:focus, textarea:focus {
  outline: none; border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(14, 147, 132, .16);
}
button:focus-visible { outline: 2px solid var(--teal); outline-offset: 2px; }
label { display: block; font-weight: 550; font-size: 13.5px; margin-bottom: 14px; }
label input, label textarea { margin-top: 6px; font-weight: 400; }

/* per-weekday scheduled-hours grid (Sun..Sat) */
.sched-block { margin: 0 0 14px; }
.sched-title { display: block; font-weight: 550; font-size: 13.5px; margin-bottom: 6px; }
.sched-row { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.sched-row label {
  margin-bottom: 0; font-size: 11px; font-weight: 550; color: var(--ink-2);
  text-align: center; text-transform: uppercase; letter-spacing: .04em;
}
.sched-row input { margin-top: 4px; text-align: center; padding: 8px 2px; }
.hint { font-weight: 400; color: var(--ink-2); font-size: 12.5px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }

.btn {
  border: 1px solid var(--line); border-radius: var(--r-sm);
  padding: 9px 18px; background: var(--surface); color: var(--ink); font-weight: 550;
  box-shadow: var(--shadow-1);
  transition: transform .15s var(--ease-out), box-shadow .15s ease,
              background .15s ease, border-color .15s ease;
}
.btn:hover { border-color: var(--line-strong); box-shadow: var(--shadow-2); transform: translateY(-1px); }
.btn:active { transform: translateY(0) scale(.98); box-shadow: var(--shadow-1); }
.btn.primary {
  background: linear-gradient(180deg, var(--btn-a), var(--btn-b));
  border-color: var(--btn-b); color: #fff;
  box-shadow: 0 1px 2px rgba(11, 122, 110, .3), 0 4px 12px rgba(11, 122, 110, .18);
}
.btn.primary:hover {
  background: linear-gradient(180deg, var(--btn-a-h), var(--btn-b-h));
  box-shadow: 0 2px 4px rgba(11, 122, 110, .3), 0 8px 20px rgba(11, 122, 110, .24);
}
.btn.small { padding: 6px 13px; font-size: 13px; }
.btn.full { display: block; width: 100%; }
.linklike.center { display: block; width: 100%; text-align: center; margin-top: 10px; }
.linklike {
  background: none; border: none; color: var(--teal-deep); font-weight: 550;
  padding: 6px 0; display: inline-block; text-align: left;
}
.linklike:hover { color: var(--ink); text-decoration: underline; }

/* ---------------- motion ---------------- */
@keyframes rise { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
@keyframes ripple-grow { from { transform: scaleY(0); } to { transform: scaleY(1); } }
@keyframes pop { 0% { transform: scale(.6); opacity: 0; } 60% { transform: scale(1.15); } 100% { transform: scale(1); opacity: 1; } }
@keyframes toast-in { from { opacity: 0; transform: translate(-50%, 16px) scale(.97); } to { opacity: 1; transform: translate(-50%, 0) scale(1); } }
@keyframes pane-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@keyframes sweep { from { transform: translateX(-100%); } to { transform: translateX(340%); } }
@keyframes drift-a {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(60px, 40px) scale(1.15); }
}
@keyframes drift-b {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(-70px, -30px) scale(1.1); }
}
.rise { animation: rise .6s var(--ease-out) both; }
.rise-1 { animation-delay: .06s; } .rise-2 { animation-delay: .14s; }
.rise-3 { animation-delay: .22s; } .rise-4 { animation-delay: .3s; }
.pane-anim { animation: pane-in .35s var(--ease-out) both; }

/* ---------------- auth ---------------- */
.auth-wrap {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  padding: 28px 16px; position: relative; overflow: hidden;
  background: var(--bg);
}
/* slow aurora behind the card — the one indulgence on the sign-in screen */
.auth-wrap::before, .auth-wrap::after {
  content: ""; position: absolute; border-radius: 50%; filter: blur(80px);
  pointer-events: none;
}
.auth-wrap::before {
  width: 560px; height: 560px; top: -220px; right: -120px;
  background: radial-gradient(circle, rgba(14, 147, 132, .18), transparent 65%);
  animation: drift-a 26s ease-in-out infinite;
}
.auth-wrap::after {
  width: 640px; height: 640px; bottom: -280px; left: -160px;
  background: radial-gradient(circle, rgba(84, 105, 212, .14), transparent 65%);
  animation: drift-b 32s ease-in-out infinite;
}
.auth-card {
  width: 100%; max-width: 440px; background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--r-lg);
  padding: 36px 36px 28px; position: relative; z-index: 1;
  box-shadow: var(--shadow-3);
  animation: rise .6s var(--ease-out) both;
}
/* mybenefitswatch.com brand: gauge-ring mark + wordmark */
.brand-logo {
  display: flex; align-items: center; justify-content: center; gap: 11px;
  margin: 4px auto 18px;
}
.bw-mark { flex: none; display: block; }
.bw-word {
  font-size: 21px; font-weight: 650; letter-spacing: -0.03em; color: var(--ink);
  line-height: 1;
}
.bw-word b { color: var(--teal-deep); font-weight: 700; }
.bw-word small { font-size: 62%; font-weight: 550; color: var(--ink-3); margin-left: 1px; }
.auth-title { text-align: center; font-size: 27px; margin: 0 0 4px; }
.auth-sub { text-align: center; color: var(--ink-2); margin: 0 0 24px; font-size: 14px; }
.auth-tabs {
  position: relative; display: flex; background: var(--line-soft);
  border-radius: 999px; padding: 3px; margin-bottom: 22px;
}
.auth-thumb {
  position: absolute; top: 3px; left: 3px; height: calc(100% - 6px);
  width: calc(50% - 3px); border-radius: 999px; background: var(--thumb);
  box-shadow: var(--shadow-1); opacity: 0;
  transition: transform .35s var(--ease-out), opacity .2s ease;
}
.auth-tab {
  flex: 1; border: none; background: none; padding: 8px; border-radius: 999px;
  font-weight: 550; color: var(--ink-2); position: relative; z-index: 1;
  transition: color .2s ease;
}
.auth-tab.active { color: var(--ink); }
.reset-question {
  background: var(--indigo-wash); border-radius: var(--r-sm); padding: 10px 12px;
  font-weight: 550; margin: 0 0 14px; color: var(--indigo-deep);
}
.auth-disclaimer {
  margin: 18px 0 0; padding-top: 14px; border-top: 1px solid var(--line-soft);
  color: var(--ink-3); font-size: 12px; line-height: 1.5; text-align: center;
}
.auth-error {
  margin: 14px 0 0; padding: 10px 12px; border-radius: var(--r-sm);
  background: var(--danger-wash); color: var(--danger); font-weight: 550; font-size: 13.5px;
}

/* ---------------- topbar ---------------- */
.topbar {
  position: sticky; top: 0; z-index: 20;
  background: var(--topbar-bg);
  -webkit-backdrop-filter: saturate(1.6) blur(14px);
  backdrop-filter: saturate(1.6) blur(14px);
  border-bottom: 1px solid var(--line);
}
.topbar-inner {
  max-width: 1080px; margin: 0 auto; padding: 10px 20px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  flex-wrap: wrap;
}
.brand { display: flex; align-items: center; gap: 11px; }
.brand .bw-mark { flex: none; }
.brand-mark {
  width: 32px; height: 32px; border-radius: 50%; flex: none;
  background: conic-gradient(from 210deg, var(--indigo), var(--teal) 55%, var(--teal-deep) 85%, var(--indigo));
  mask: radial-gradient(circle at 62% 40%, transparent 26%, #000 30%);
  -webkit-mask: radial-gradient(circle at 62% 40%, transparent 26%, #000 30%);
}
.brand-text { display: flex; flex-direction: column; line-height: 1.2; }
.brand-eyebrow {
  font-size: 10px; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--ink-3); font-weight: 600;
}
.brand-name { font-weight: 650; font-size: 16.5px; letter-spacing: -0.02em; color: var(--ink); }
.topnav { display: flex; align-items: center; gap: 10px; }
/* Apple-style segmented control: gray track, white thumb slides between tabs */
.seg {
  position: relative; display: flex; background: var(--line-soft);
  border-radius: 999px; padding: 3px;
}
.nav-pill {
  position: absolute; top: 3px; left: 0; height: calc(100% - 6px);
  border-radius: 999px; background: var(--thumb); box-shadow: var(--shadow-1);
  opacity: 0;
  transition: transform .35s var(--ease-out), width .35s var(--ease-out), opacity .2s ease;
}
.nav-btn {
  border: none; background: none; padding: 7px 15px; border-radius: 999px;
  font-weight: 550; font-size: 13.5px; color: var(--ink-2);
  position: relative; z-index: 1;
  transition: color .2s ease;
}
.nav-btn:hover { color: var(--ink); }
.nav-btn.active { color: var(--ink); }
.nav-btn.ghost { color: var(--ink-3); }
.nav-btn.ghost:hover { color: var(--danger); }
.signout-mobile {
  display: none; background: none; border: none; color: var(--ink-2);
  padding: 8px; border-radius: var(--r-sm); min-width: 44px; min-height: 44px;
  align-items: center; justify-content: center;
}
.signout-mobile:hover { color: var(--ink); }
.theme-toggle {
  margin-left: auto; background: none; border: none; color: var(--ink-2);
  min-width: 40px; min-height: 40px; border-radius: 999px;
  display: inline-flex; align-items: center; justify-content: center;
  transition: color .2s ease, background .2s ease, transform .35s var(--ease-out);
}
.theme-toggle:hover { color: var(--ink); background: var(--line-soft); }
.theme-toggle:active { transform: rotate(45deg) scale(.92); }
/* show the icon of the mode the button switches TO */
.theme-toggle .icon-sun { display: none; }
.theme-toggle.is-dark .icon-sun { display: inline; }
.theme-toggle.is-dark .icon-moon { display: none; }

/* ---------------- bottom nav (phones only) ---------------- */
.bottom-nav { display: none; }

/* ---------------- page ---------------- */
.page { max-width: 1080px; margin: 0 auto; padding: 28px 20px 80px; }
.who-row {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 8px 16px; flex-wrap: wrap; margin-bottom: 20px;
}
.who-row .who { margin-bottom: 0; }
.who { color: var(--ink-2); margin-bottom: 20px; font-size: 13.5px; }
.who strong { color: var(--ink); font-size: 17px; font-weight: 650; letter-spacing: -0.015em; }

/* ---------------- hero: the runway to 1,560 ---------------- */
.hero-card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md);
  box-shadow: var(--shadow-1); padding: 22px 24px 18px; margin-bottom: 16px;
}
.t-label {
  font-size: 11px; letter-spacing: 0.09em; text-transform: uppercase;
  color: var(--ink-3); font-weight: 600; margin-bottom: 2px;
}
.hero-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 18px; flex-wrap: wrap; }
.hero-num {
  font-size: 52px; font-weight: 700; line-height: 1.05; letter-spacing: -0.035em;
  font-variant-numeric: tabular-nums;
}
.hero-num small { font-size: 18px; font-weight: 500; color: var(--ink-2); letter-spacing: -0.01em; }
.hero-meta { font-size: 13.5px; color: var(--ink-2); text-align: right; padding-bottom: 6px; }
.hero-meta b { color: var(--teal-deep); font-variant-numeric: tabular-nums; }

/* progress track with milestone ticks at 25/50/75% */
.runway { position: relative; height: 10px; border-radius: 999px; background: var(--line-soft);
  margin: 16px 0 4px; overflow: hidden; }
.runway-fill {
  position: absolute; inset: 0 auto 0 0; width: 0; border-radius: 999px;
  background: linear-gradient(90deg, var(--teal-deep), var(--teal));
  transition: width 1.1s var(--ease-out); overflow: hidden;
}
.runway-fill::after {
  content: ""; position: absolute; inset: 0; width: 30%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .45), transparent);
  animation: sweep 1.6s .5s var(--ease-out) 1 both;
}
.runway-tick {
  position: absolute; top: 2px; bottom: 2px; width: 2px; border-radius: 1px;
  background: var(--tick);
}
.runway-axis {
  display: flex; justify-content: space-between; font-size: 11px;
  color: var(--ink-3); margin-bottom: 12px; font-variant-numeric: tabular-nums;
}

/* week-by-week ripples under the runway */
.river { width: 100%; height: 56px; display: block; margin-top: 4px; }
.river .ripple { transform-origin: bottom; transform-box: fill-box; }
.river .ripple.grow { animation: ripple-grow .5s var(--ease-out) both; }
.river-axis { display: flex; justify-content: space-between; font-size: 11px; color: var(--ink-3); margin-top: 4px; }

.stat-row {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md);
  box-shadow: var(--shadow-1); overflow: hidden;
  margin: 0 0 8px;
}
.stat { padding: 16px 20px 14px; border-left: 1px solid var(--line-soft); }
.stat:first-child { border-left: none; }
.stat .t-label { margin-bottom: 4px; }
.stat .t-value { font-size: 28px; font-weight: 650; line-height: 1.15; letter-spacing: -0.025em; font-variant-numeric: tabular-nums; }
.stat .t-value small { font-size: 14px; color: var(--ink-2); font-weight: 500; letter-spacing: 0; }
.stat .t-sub { font-size: 12.5px; color: var(--ink-2); margin-top: 2px; }
.stat.warn .t-value { color: var(--danger); }
.stat.ok .t-value { color: var(--teal-deep); }

/* ---------------- panes ---------------- */
.pane-head {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 12px; margin: 30px 0 14px; flex-wrap: wrap;
}
.pane-head h2 { margin: 0; font-size: 20px; }
.pane-note { color: var(--ink-2); font-size: 13px; font-variant-numeric: tabular-nums; }
.pane-tools { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.range-tools { display: flex; align-items: center; gap: 6px; }
.range-tools input[type="date"] {
  padding: 6px 8px; font-size: 12.5px; width: 138px;
  font-variant-numeric: tabular-nums;
}
.range-sep { color: var(--ink-3); }

/* ---------------- timesheet ---------------- */
.sheet-scroll {
  overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r-md);
  background: var(--surface); box-shadow: var(--shadow-1);
}
.sheet { border-collapse: collapse; width: 100%; min-width: 760px; }
.sheet th {
  font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-3);
  font-weight: 600; text-align: center; padding: 10px 6px;
  border-bottom: 1px solid var(--line);
  background: var(--surface); position: sticky; top: 0;
}
.sheet td { border-bottom: 1px solid var(--line-soft); padding: 5px; text-align: center; }
.sheet tr:last-child td { border-bottom: none; }
.sheet .wk-col { width: 70px; }
.sheet .tot-col { width: 86px; }
.wk-cell { font-weight: 650; color: var(--ink); font-variant-numeric: tabular-nums; }
.wk-cell .wk-dates { display: block; font-weight: 400; font-size: 10.5px; color: var(--ink-3); }
.day-cell { position: relative; }
.day-num {
  display: block; font-size: 10px; color: var(--ink-3); margin-bottom: 2px;
  font-variant-numeric: tabular-nums;
}
.day-cell input {
  display: block; margin: 0 auto;
  width: 62px; text-align: center; padding: 6px 4px; font-variant-numeric: tabular-nums;
  background: var(--bg); border-color: transparent;
}
.day-cell input:hover:not(:disabled) { border-color: var(--line); background: var(--surface); }
.day-cell input:focus { background: var(--surface); border-color: var(--teal); }
.day-cell input:disabled { background: transparent; border-color: transparent; }
.day-cell input.bad { border-color: var(--danger); box-shadow: 0 0 0 3px var(--danger-wash); }
.day-check {
  position: absolute; top: 1px; right: 4px; color: var(--teal-deep); font-size: 12px;
  animation: pop .35s ease both; pointer-events: none;
}
.tot-cell { font-weight: 650; font-variant-numeric: tabular-nums; }
.pto-btn, .eo-btn, .fo-btn {
  display: inline-block; margin: 3px 1px 0; padding: 1px 6px;
  border: 1px solid var(--line); border-radius: 999px; background: var(--surface);
  font-size: 9.5px; font-weight: 650; letter-spacing: .06em; color: var(--ink-3);
  cursor: pointer; line-height: 1.5;
  transition: border-color .15s ease, color .15s ease, background .15s ease;
}
.pto-btn:hover { border-color: var(--teal); color: var(--teal-deep); }
.pto-btn.on { background: var(--teal-deep); border-color: var(--teal-deep); color: var(--surface); }
.eo-btn:hover { border-color: var(--indigo); color: var(--indigo-deep); }
.eo-btn.on { background: var(--indigo-deep); border-color: var(--indigo-deep); color: var(--surface); }
.fo-btn:hover { border-color: var(--amber); color: var(--amber-deep); }
.fo-btn.on { background: var(--amber-deep); border-color: var(--amber-deep); color: var(--surface); }
.pto-btn.static, .eo-btn.static, .fo-btn.static { cursor: default; }
.day-cell.pto input:not(:disabled), .dl-day.pto input:not(:disabled) {
  background: var(--teal-wash); border-color: var(--teal);
}
.day-cell.eo input:not(:disabled), .dl-day.eo input:not(:disabled) {
  background: var(--indigo-wash); border-color: var(--indigo);
}
.day-cell.fo input:not(:disabled), .dl-day.fo input:not(:disabled) {
  background: var(--amber-wash); border-color: var(--amber);
}
.dl-day .dl-label { margin-right: auto; }
.dl-day .pto-btn, .dl-day .eo-btn, .dl-day .fo-btn { margin: 0; font-size: 11px;
  padding: 5px 10px; min-height: 30px; }
tr.current-week { background: var(--teal-wash); }
tr.current-week .wk-cell { color: var(--teal-deep); }
tr.current-week .day-cell input { background: var(--surface); }
td.today input:not(:disabled) { border-color: var(--teal); }

/* ---------------- mobile day cards (replaces the grid below 640px) ---------------- */
.day-list { display: none; }
.dl-week {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md);
  box-shadow: var(--shadow-1); margin-bottom: 14px; overflow: hidden;
}
.dl-head {
  display: flex; justify-content: space-between; align-items: baseline;
  padding: 10px 14px; background: var(--bg); border-bottom: 1px solid var(--line);
  font-weight: 650; color: var(--ink);
}
.dl-week.current .dl-head { background: var(--teal-wash); color: var(--teal-deep); }
.dl-head .dl-total { font-variant-numeric: tabular-nums; color: var(--ink); }
.dl-day {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 8px 14px; border-bottom: 1px solid var(--line-soft); position: relative;
}
.dl-day:last-child { border-bottom: none; }
.dl-day.today { background: var(--teal-wash); }
.dl-day .dl-label { font-weight: 550; }
.dl-day .dl-date { display: block; font-weight: 400; font-size: 12px; color: var(--ink-2); }
.dl-day input {
  width: 96px; min-height: 48px; text-align: center; font-size: 17px;
  font-variant-numeric: tabular-nums;
}
.dl-day input:disabled { background: var(--bg); border-color: transparent; }
.dl-day .day-check { position: static; margin-left: 4px; font-size: 16px; }
@media (max-width: 640px) {
  .day-list { display: block; }
  .sheet-wrap { display: none; }
}

/* ---------------- analytics ---------------- */
/* the shared This week / This month / Needed-per-week strip duplicates the
   analytics rows, so it only shows on the Hours tab */
body.tab-analytics #tiles .stat-row { display: none; }
.pace-row {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(165px, 1fr));
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md);
  box-shadow: var(--shadow-1); overflow: hidden;
  margin-bottom: 16px;
}
.pace-row.hl-row { grid-template-columns: repeat(auto-fit, minmax(138px, 1fr)); }
.pace-row.hl-row .t-value { font-size: 22px; }
.pace-row.hl-row .stat { padding: 13px 16px 11px; }

/* ---- pace summary card ---- */
.pace-card, .timeoff-card, .hl-card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md);
  box-shadow: var(--shadow-1); padding: 18px 20px 16px; margin-bottom: 16px;
}
.timeoff-card h3, .hl-card h3 {
  margin: 0 0 12px; font-size: 15.5px; font-weight: 650; letter-spacing: -0.015em;
}
.pace-top { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.status-chip {
  font-size: 10.5px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase;
  padding: 3px 10px; border-radius: 999px; white-space: nowrap;
}
.status-chip.ok { background: var(--teal-wash); color: var(--teal-deep); }
.status-chip.warn { background: var(--danger-wash); color: var(--danger); }
.status-chip.watch { background: var(--amber-wash); color: var(--amber-deep); }
.pace-headline { font-size: 17px; font-weight: 650; letter-spacing: -0.015em; }
.pace-sub { color: var(--ink-2); font-size: 13px; margin: 4px 0 16px; max-width: 640px; }
.pace-grid { display: grid; grid-template-columns: 1fr auto; gap: 18px 40px; align-items: center; }
.pace-bars { display: grid; gap: 10px; min-width: 0; }
.pace-bar-row { display: grid; grid-template-columns: 88px 1fr 96px; align-items: center; gap: 10px; }
.pb-label { font-size: 12px; color: var(--ink-2); font-weight: 550; }
.pb-track { height: 10px; background: var(--line-soft); border-radius: 999px; overflow: hidden; }
.pb-fill { height: 100%; border-radius: 999px; transition: width .5s var(--ease-out); }
.pb-fill.teal { background: var(--teal-deep); }
.pb-fill.indigo { background: var(--indigo); }
.pb-val { font-size: 12.5px; font-weight: 650; font-variant-numeric: tabular-nums; white-space: nowrap; }
.pace-facts { display: flex; gap: 32px; }
.pace-fact .pf-val {
  display: block; font-size: 26px; font-weight: 650; letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums; line-height: 1.15;
}
.pace-fact .pf-val.good { color: var(--teal-deep); }
.pace-fact .pf-val.bad { color: var(--danger); }
.pace-fact .pf-lab { font-size: 12px; color: var(--ink-2); }
.pace-foot {
  margin-top: 14px; padding-top: 11px; border-top: 1px solid var(--line-soft);
  display: flex; gap: 8px 24px; flex-wrap: wrap; font-size: 12.5px; color: var(--ink-2);
}
.pace-foot b { color: var(--ink); font-variant-numeric: tabular-nums; }
@media (max-width: 720px) {
  .pace-grid { grid-template-columns: 1fr; }
  .pace-facts { flex-wrap: wrap; gap: 20px 32px; }
}

/* ---- time off card ---- */
.timeoff-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 10px; }
.to-item {
  display: flex; align-items: center; gap: 12px; padding: 12px 14px;
  background: var(--bg); border: 1px solid var(--line-soft); border-radius: var(--r-sm);
}
.to-dot { width: 10px; height: 10px; border-radius: 50%; flex: none; }
.to-item.pto .to-dot { background: var(--teal-deep); }
.to-item.eo .to-dot { background: var(--indigo); }
.to-item.fo .to-dot { background: var(--amber); }
.to-item.sb .to-dot { background: var(--indigo); }
.to-item b {
  display: block; font-size: 19px; font-weight: 650; letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums; line-height: 1.2;
}
.to-sub { font-size: 12px; color: var(--ink-2); }

/* ---- highlights card ---- */
.hl-flow { display: flex; flex-wrap: wrap; gap: 10px 28px; }
.hl-item { font-size: 13px; color: var(--ink-2); }
.hl-item b { color: var(--ink); font-size: 15px; font-variant-numeric: tabular-nums; }
.chart-panel {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md);
  box-shadow: var(--shadow-1);
  padding: 18px 18px 10px; margin-bottom: 16px; position: relative;
}
.chart-panel h3 { margin: 0 0 2px; font-size: 15.5px; font-weight: 650; letter-spacing: -0.015em; }
.chart-panel .chart-sub { margin: 0 0 12px; color: var(--ink-2); font-size: 13px; }
.chart-svg { width: 100%; height: auto; display: block; }
.legend { display: flex; gap: 18px; flex-wrap: wrap; font-size: 12.5px; color: var(--ink-2); margin: 8px 0 6px; }
.legend .key { display: inline-flex; align-items: center; gap: 6px; }
.legend .swatch { width: 14px; height: 3px; border-radius: 2px; display: inline-block; }
.legend .swatch.dashed {
  background: repeating-linear-gradient(90deg, currentColor 0 4px, transparent 4px 7px);
  height: 2px;
}
.chart-table { margin: 4px 0 8px; }
.chart-table summary { cursor: pointer; font-size: 12.5px; color: var(--ink-2); font-weight: 550; }
.chart-table table { border-collapse: collapse; margin-top: 8px; font-size: 13px; }
.chart-table th, .chart-table td {
  padding: 4px 14px 4px 0; text-align: right; font-variant-numeric: tabular-nums;
  border-bottom: 1px solid var(--line-soft);
}
.chart-table th { color: var(--ink-3); font-size: 11px; text-transform: uppercase; letter-spacing: .08em; }
.chart-table td:first-child, .chart-table th:first-child { text-align: left; }

.chart-tip {
  position: absolute; pointer-events: none; z-index: 10;
  background: var(--ink); color: var(--bg); border-radius: var(--r-sm);
  padding: 7px 11px; font-size: 12.5px; line-height: 1.45;
  box-shadow: var(--shadow-3); white-space: nowrap;
  transform: translate(-50%, calc(-100% - 10px));
}
.chart-tip b { color: var(--bg); }
.chart-tip .tipdim { color: var(--ink-3); }

.callout {
  background: var(--surface); border: 1px solid var(--line); border-left: 3px solid var(--teal);
  border-radius: var(--r-md); box-shadow: var(--shadow-1);
  padding: 15px 18px; margin-bottom: 16px;
}
.callout.warn { border-left-color: var(--danger); }
.callout h3 { margin: 0 0 4px; font-size: 14.5px; }
.callout p { margin: 0; color: var(--ink-2); font-size: 14px; }
.callout .big { font-size: 21px; font-weight: 650; color: var(--ink); font-variant-numeric: tabular-nums; }

.empty-note { color: var(--ink-2); padding: 18px 4px; }

/* ---------------- heatmap / weekday / what-if ---------------- */
.chart-row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 16px; }
/* let panels shrink below their content's natural width — wide charts then
   scroll inside their own slot instead of stretching the page sideways */
.chart-row2 > .chart-panel { min-width: 0; }
.heat-scroll { overflow-x: auto; }
.heat-svg { display: block; }
.heat-legend {
  display: flex; align-items: center; gap: 4px; justify-content: flex-end;
  font-size: 11.5px; color: var(--ink-2); margin: 8px 0 6px;
}
.heat-legend i { width: 11px; height: 11px; border-radius: 2.5px; display: inline-block; }
.wi-label { font-weight: 550; font-size: 14px; }
.wi-label output { color: var(--teal-deep); font-weight: 650; font-variant-numeric: tabular-nums; }
#wi-range {
  width: 100%; margin: 14px 0 18px; accent-color: var(--teal-deep);
  padding: 0; border: none; background: transparent; min-height: 28px; box-shadow: none;
}
.wi-out { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.wi-cell {
  background: var(--bg); border: 1px solid var(--line-soft); border-radius: var(--r-sm);
  padding: 10px 14px 12px;
}
.wi-cell span { display: block; font-weight: 650; font-size: 16px; font-variant-numeric: tabular-nums; }
.wi-cell small { color: var(--ink-2); font-size: 12px; }
/* the monthly chart sets its own min-width by month count — always scrollable */
#chart-monthly .chart-slot { overflow-x: auto; -webkit-overflow-scrolling: touch; }
@media (max-width: 700px) {
  .chart-row2 { grid-template-columns: 1fr; }
  .wi-out { grid-template-columns: 1fr; }
}
/* phones: wide charts keep a readable size and scroll sideways in their panel
   instead of scaling their text down to nothing */
@media (max-width: 640px) {
  #chart-cumulative .chart-slot, #chart-weekly .chart-slot {
    overflow-x: auto; -webkit-overflow-scrolling: touch;
  }
  #chart-cumulative .chart-svg, #chart-weekly .chart-svg { min-width: 640px; }
  .pace-bar-row { grid-template-columns: 72px 1fr 78px; gap: 8px; }
  .pb-val { font-size: 11.5px; }
  .chart-table table { width: 100%; }
}

/* ---------------- PTO sell back ---------------- */
.sb-tag {
  display: block; width: fit-content; margin: 3px auto 0; padding: 1px 8px;
  border-radius: 999px; background: var(--indigo-wash); color: var(--indigo-deep);
  font-size: 9.5px; font-weight: 650; letter-spacing: .04em; line-height: 1.5;
  white-space: nowrap;
}
.dl-day .sb-tag { margin: 0; font-size: 11px; padding: 4px 10px; }
.sb-card { text-align: left; }
.sb-card h3, .sb-card > p { text-align: center; }
.sb-card form { margin-bottom: 6px; }
.sb-list-head {
  font-size: 11px; letter-spacing: .08em; text-transform: uppercase;
  color: var(--ink-3); font-weight: 600; margin: 14px 0 6px;
}
.sb-row {
  display: flex; align-items: center; gap: 10px; padding: 7px 0;
  border-top: 1px solid var(--line-soft); font-size: 13.5px;
}
.sb-row b { margin-left: auto; font-variant-numeric: tabular-nums; }
.sb-row .linklike { margin: 0; }

/* ---------------- tip jar ---------------- */
.tip-open {
  display: flex; width: fit-content; margin: 16px auto 4px;
  align-items: center; gap: 7px; padding: 9px 20px;
  border: 1px solid var(--teal); border-radius: 999px;
  background: var(--teal-wash); color: var(--teal-deep);
  font-family: var(--font); font-size: 13.5px; font-weight: 650;
  cursor: pointer; line-height: 1.2;
  transition: transform .15s var(--ease-out), box-shadow .15s ease, filter .15s ease;
}
.tip-open:hover { transform: translateY(-1px); box-shadow: var(--shadow-2); filter: brightness(1.03); }
.tip-open:active { transform: translateY(0); box-shadow: none; }
.chip-ico { flex: none; }
.tip-title { display: flex; align-items: center; justify-content: center; gap: 8px; }
.tip-title .chip-ico { width: 19px; height: 19px; }
/* compact variant for the topbar */
.tip-top { margin: 0; padding: 6px 14px; font-size: 12.5px; }
.tip-modal {
  position: fixed; inset: 0; z-index: 60; background: rgba(10, 12, 16, .5);
  display: flex; align-items: center; justify-content: center; padding: 20px;
}
.tip-card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg);
  box-shadow: var(--shadow-3); padding: 26px 24px 18px;
  max-width: 380px; width: 100%; text-align: center;
}
.tip-card h3 { margin: 0 0 8px; font-size: 17px; }
.tip-card p { margin: 0 0 16px; color: var(--ink-2); font-size: 13.5px; }
.tip-options { display: grid; gap: 9px; margin-bottom: 12px; }
.tip-link { display: block; text-decoration: none; text-align: center; }
.tip-row { margin: 14px 0 0; max-width: 560px; display: flex; justify-content: center; }
.privacy-note {
  max-width: 560px; margin: 16px 0 0; padding-top: 12px;
  border-top: 1px solid var(--line-soft);
  color: var(--ink-3); font-size: 12.5px; line-height: 1.55; text-align: center;
}
.privacy-note strong { color: var(--ink-2); }

/* ---------------- profile ---------------- */
.profile-form {
  max-width: 560px; background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-md); box-shadow: var(--shadow-1); padding: 24px;
}
.save-note { color: var(--teal-deep); font-weight: 650; margin-left: 12px; animation: pop .35s ease both; }

/* ---------------- admin ---------------- */
.team-table { width: 100%; border-collapse: collapse; background: var(--surface); }
.team-table th, .team-table td { padding: 11px 14px; text-align: left; border-bottom: 1px solid var(--line-soft); }
.team-table th { font-size: 11px; letter-spacing: .08em; text-transform: uppercase;
  font-weight: 600; color: var(--ink-3); background: var(--surface); }
.team-table tr:last-child td { border-bottom: none; }
.team-table tbody tr { cursor: pointer; transition: background .15s ease; }
.team-table tbody tr:hover { background: var(--bg); }
.mini-gauge { height: 6px; width: 130px; border-radius: 999px; background: var(--line-soft);
  overflow: hidden; display: inline-block; vertical-align: middle; }
.mini-gauge i { display: block; height: 100%; border-radius: 999px;
  background: linear-gradient(90deg, var(--teal-deep), var(--teal)); }
.num { font-variant-numeric: tabular-nums; }
.badge {
  display: inline-block; padding: 2px 9px; border-radius: 999px;
  font-size: 11px; font-weight: 650; letter-spacing: .05em; text-transform: uppercase;
}
.badge.inactive { background: var(--danger-wash); color: var(--danger); }
.badge.admin { background: var(--indigo-wash); color: var(--indigo-deep); }
.admin-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 18px; }
.btn.danger { color: var(--danger); border-color: #f0c9c9; background: var(--surface); }
.btn.danger:hover { background: var(--danger-wash); border-color: var(--danger); }
.admin-edit-form {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md);
  box-shadow: var(--shadow-1);
  padding: 20px; margin-bottom: 18px; max-width: 560px;
  animation: pane-in .3s var(--ease-out) both;
}
tr.row-inactive td { opacity: .55; }

/* ---------------- toast ---------------- */
.toast {
  position: fixed; bottom: 24px; left: 50%;
  background: var(--ink); color: var(--bg); padding: 11px 20px; border-radius: 999px;
  font-weight: 550; font-size: 14px; z-index: 50; box-shadow: var(--shadow-3);
  animation: toast-in .4s var(--ease-out) both;
  display: flex; align-items: center; gap: 9px;
}
.toast .tick { color: var(--toast-accent); font-size: 16px; }
.toast-action {
  background: none; border: 1px solid var(--toast-accent); color: var(--toast-accent);
  border-radius: 999px; padding: 3px 14px; font-weight: 650; font-size: 13px;
  min-height: 28px;
}
.toast-action:hover { background: color-mix(in srgb, var(--toast-accent) 15%, transparent); }

@media (max-width: 640px) {
  .field-row { grid-template-columns: 1fr; gap: 0; }
  .auth-card { padding: 26px 20px; }

  /* one-line header: brand + sign-out icon; tabs move to the bottom bar */
  .topnav { display: none; }
  .signout-mobile { display: inline-flex; }
  .topbar-inner { flex-wrap: nowrap; padding: 8px 14px; }
  .brand-eyebrow { display: none; }
  .brand .bw-mark { width: 28px; height: 28px; }
  .brand-name { font-size: 16px; }
  .tip-top { padding: 5px 9px; }
  .tip-top span { display: none; }  /* emoji-only pill on phones */

  .bottom-nav {
    display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
    background: var(--topbar-bg);
    -webkit-backdrop-filter: saturate(1.6) blur(14px);
    backdrop-filter: saturate(1.6) blur(14px);
    border-top: 1px solid var(--line);
    padding-bottom: env(safe-area-inset-bottom);
  }
  .bnav-btn {
    flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px;
    background: none; border: none; padding: 8px 4px 7px;
    color: var(--ink-3); font-size: 11px; font-weight: 550; min-height: 54px;
    transition: color .2s ease;
  }
  .bnav-btn.active { color: var(--ink); }
  .bnav-btn.active svg { color: var(--teal-deep); }

  .page { padding: 16px 14px calc(84px + env(safe-area-inset-bottom)); }
  .toast {
    bottom: calc(72px + env(safe-area-inset-bottom));
    max-width: calc(100vw - 28px); white-space: normal;
  }

  /* compact hero: summary in two short lines, slim river, no stat tiles */
  .who { font-size: 13px; margin-bottom: 12px; }
  .hero-card { padding: 16px 16px 12px; margin-bottom: 12px; }
  .hero-row { align-items: baseline; gap: 10px; }
  .hero-num { font-size: 30px; }
  .hero-num small { font-size: 14px; }
  .hero-meta { font-size: 12px; padding-bottom: 2px; text-align: right; }
  .runway { margin: 12px 0 3px; }
  .runway-axis { margin-bottom: 6px; }
  .river { height: 24px; margin-top: 2px; }
  .river-axis { display: none; }
  #tiles .stat-row { display: none; }
  .pane-head { margin: 18px 0 10px; }
  .pane-head h2 { font-size: 18px; }

  .stat .t-value { font-size: 22px; }

  /* wide charts scroll sideways instead of shrinking their text to nothing */
  #chart-cumulative .chart-slot, #chart-weekly .chart-slot,
  #chart-monthly .chart-slot { overflow-x: auto; }
  #chart-cumulative .chart-svg, #chart-weekly .chart-svg,
  #chart-monthly .chart-svg { min-width: 780px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
  .runway-fill { transition: none; }
  .runway-fill::after { display: none; }
}

/* -------------------------------------------------------------- bulk import */
.import-panel {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md);
  box-shadow: var(--shadow-1); padding: 18px 20px 16px; margin-bottom: 16px;
}
.import-panel h3 { margin: 0 0 6px; font-size: 15px; }
.import-panel .hint { display: block; margin: 0 0 14px; line-height: 1.5; max-width: 68ch; }
.import-controls { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.import-controls input[type="file"] { width: auto; padding: 6px 8px; font-size: 13px; }
.import-check {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: 13px; color: var(--ink-2); cursor: pointer;
}
.import-check input { width: auto; margin: 0; }
.import-result {
  margin-top: 14px; padding: 10px 14px; border-radius: var(--r-sm);
  font-size: 13.5px; line-height: 1.5;
}
.import-result.ok { background: var(--teal-wash); color: var(--teal-deep); }
.import-result.bad { background: var(--danger-wash); color: var(--danger); }
.import-result ul { margin: 6px 0 0; padding-left: 20px; }
.import-result li { margin: 2px 0; }
