/* Chairside — Birch Street Dental
   One stylesheet, no framework. Warm paper surfaces, a deep pine
   sidebar, hairline borders instead of drop shadows, and Fraunces
   for display type so it doesn't read like every other dashboard. */

:root {
  --paper: #f6f3ee;
  --card: #fffdf9;
  --ink: #25292b;
  --ink-soft: #5d6360;
  --ink-faint: #8b908b;
  --line: #e2dcd0;
  --line-strong: #cfc7b6;
  --pine: #1d3a34;
  --pine-deep: #152b27;
  --cream: #ece6d6;
  --accent: #1f6f63;
  --accent-soft: #e3eeeb;
  --red: #b3402e;
  --red-soft: #f6e7e2;
  --amber: #9a6a1f;
  --amber-soft: #f4ecda;
  --green: #2f7a52;
  --serif: 'Fraunces', Georgia, serif;
  --sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; margin: 0; }

html, body { height: 100%; }

body {
  font-family: var(--sans);
  font-size: 14px;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
}

button { font: inherit; cursor: pointer; }
input, select, textarea { font: inherit; color: inherit; }

/* native checkboxes and radios at one consistent size, never stretched
   or scaled past the text they sit beside */
input[type=checkbox], input[type=radio] {
  width: 15px;
  height: 15px;
  flex: none;
  margin: 0;
  accent-color: var(--accent);
}

h1, h2, h3 { font-family: var(--serif); font-weight: 600; }

.num { font-variant-numeric: tabular-nums; }

/* ---------- layout shell ---------- */

.shell { display: flex; height: 100vh; }

.side {
  width: 218px;
  flex: none;
  background: var(--pine);
  color: var(--cream);
  display: flex;
  flex-direction: column;
  padding: 22px 0 14px;
}

.brand {
  padding: 0 20px 22px;
  font-family: var(--serif);
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.brand small {
  display: block;
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #9eb4ab;
  margin-top: 3px;
}

.side nav { flex: 1; }

.side nav a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 20px;
  color: #c7d4cb;
  text-decoration: none;
  font-size: 13.5px;
  border-left: 3px solid transparent;
}

.side nav a:hover { color: #fff; background: rgba(255,255,255,0.04); }

.side nav a.active {
  color: #fff;
  background: var(--pine-deep);
  border-left-color: #d8a23a;
}

.nav-badge {
  margin-left: auto;
  background: var(--red);
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  min-width: 19px;
  text-align: center;
  border-radius: 9px;
  padding: 1px 5px;
}

.side-foot {
  padding: 14px 20px 0;
  border-top: 1px solid rgba(255,255,255,0.08);
  font-size: 11.5px;
  color: #88a094;
  line-height: 1.7;
}

/* ---------- top bar ---------- */

.main-col { flex: 1; display: flex; flex-direction: column; min-width: 0; }

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px 10px;
  padding: 14px 28px;
  border-bottom: 1px solid var(--line);
  background: var(--card);
}

.crumb { font-size: 13px; color: var(--ink-soft); }
.crumb b { color: var(--ink); font-weight: 600; }

.top-actions { display: flex; align-items: center; gap: 10px; }

.btn {
  border: 1px solid var(--line-strong);
  background: var(--card);
  color: var(--ink);
  border-radius: 6px;
  padding: 6px 13px;
  font-size: 13px;
  line-height: 1.45;
  white-space: nowrap;
}
.btn:hover { border-color: var(--ink-faint); }

/* buttons that sit inside flex rows keep their size instead of being
   squashed by long titles next to them */
.staff-row .btn, .task .btn, .alert-row .btn,
.punch-card .btn, .person-head .btn, .top-actions .btn { flex: none; }

.btn-primary {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}
.btn-primary:hover { background: #195a50; border-color: #195a50; }

.btn-small { padding: 3px 9px; font-size: 12px; border-radius: 5px; }

/* square icon button (the alerts bell) with a corner count badge */
.icon-btn { position: relative; padding: 6px 8px; line-height: 0; color: var(--ink-soft); }
.icon-btn svg { display: block; }
.icon-btn:hover { color: var(--ink); }
.icon-btn.active { border-color: var(--accent); color: var(--accent); }
.bell-badge {
  position: absolute;
  top: -7px;
  right: -7px;
  background: var(--red);
  color: #fff;
  font-size: 10px;
  font-weight: 600;
  min-width: 16px;
  height: 16px;
  line-height: 16px;
  text-align: center;
  border-radius: 8px;
  padding: 0 4px;
}

.me-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--line);
  background: var(--card);
  border-radius: 20px;
  padding: 3px 12px 3px 3px;
  font-size: 13px;
}
.me-chip:hover { border-color: var(--line-strong); }

.avatar {
  width: 26px; height: 26px;
  border-radius: 50%;
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
}

/* ---------- main content ---------- */

main {
  flex: 1;
  overflow-y: auto;
  padding: 26px 28px 60px;
}

.page { max-width: 880px; }

.page-head { margin-bottom: 20px; }
.page-head h1 { font-size: 26px; letter-spacing: -0.01em; }
.page-head .sub { color: var(--ink-soft); margin-top: 4px; font-size: 13.5px; }

/* late banner shown to the doctor and manager */
.late-banner {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--red-soft);
  border: 1px solid #e4c3ba;
  border-radius: 6px;
  padding: 10px 14px;
  margin-bottom: 18px;
  font-size: 13.5px;
}
.late-banner a { color: var(--red); font-weight: 600; }

/* ---------- task lists ---------- */

.task-group { margin-bottom: 26px; }

.group-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--ink-faint);
  padding-bottom: 7px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 2px;
  display: flex;
  justify-content: space-between;
}
.group-label.overdue { color: var(--red); border-bottom-color: #e4c3ba; }

.task {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 9px 6px;
  border-bottom: 1px solid #eee8dc;
}
.task:hover { background: rgba(0,0,0,0.015); }

.task .title { flex: 1; min-width: 0; }
.task .title .note { display: block; font-size: 12px; color: var(--ink-soft); margin-top: 1px; }
.task.is-done .title { color: var(--ink-faint); text-decoration: line-through; text-decoration-color: var(--line-strong); }

.tickbox {
  width: 18px; height: 18px;
  flex: none;
  border: 1.5px solid var(--line-strong);
  border-radius: 4px;
  background: var(--card);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}
.tickbox:hover { border-color: var(--accent); }
.task.is-done .tickbox { background: var(--accent); border-color: var(--accent); }
.tickbox svg { display: none; }
.task.is-done .tickbox svg { display: block; }

.chip {
  font-size: 12px;
  color: var(--ink-soft);
  white-space: nowrap;
}

/* tally task: a count-toward-a-goal stepper on the task row */
.tally { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.tally-btn {
  width: 22px; height: 22px;
  border: 1px solid var(--line-strong);
  background: var(--card);
  border-radius: 5px;
  font-size: 14px;
  line-height: 1;
  color: var(--ink-soft);
  padding: 0;
}
.tally-btn:hover { border-color: var(--accent); color: var(--accent); }
.tally-n { font-size: 12.5px; color: var(--ink-soft); min-width: 44px; text-align: center; }
.tally-n.hit, .tally-chip.hit { color: var(--green); font-weight: 600; }

.chip.late { color: var(--red); font-weight: 600; }
.chip.done-at { color: var(--ink-faint); }

.flag {
  color: var(--amber);
  font-size: 11px;
  font-weight: 700;
  border: 1px solid var(--amber);
  border-radius: 4px;
  padding: 0 5px;
  line-height: 16px;
}

.task .del {
  border: none; background: none;
  color: var(--ink-faint);
  font-size: 15px;
  padding: 0 4px;
}
/* tuck the × away until hover — but only where hover exists, so the
   button stays reachable on touch screens */
@media (hover: hover) {
  .task .del { visibility: hidden; }
  .task:hover .del { visibility: visible; }
}
.task .del:hover { color: var(--red); }

.all-clear {
  padding: 28px 0;
  color: var(--ink-soft);
  font-size: 14px;
}
.all-clear b { font-family: var(--serif); font-size: 17px; display: block; color: var(--ink); margin-bottom: 3px; }

/* ---------- team view ---------- */

.team-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(330px, 1fr));
  gap: 14px;
}

.person-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px 16px 8px;
}

.person-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 4px;
}
.person-head .who { flex: 1; min-width: 0; }
.person-head .who b { display: block; font-size: 13.5px; }
.person-head .who span { font-size: 11.5px; color: var(--ink-soft); }
.person-head .score { font-size: 13px; color: var(--ink-soft); }
.person-head .score b { color: var(--ink); }

.meter {
  height: 4px;
  background: var(--line);
  border-radius: 2px;
  overflow: hidden;
  margin: 8px 0 10px;
}
.meter i { display: block; height: 100%; background: var(--accent); }

.person-card .task { padding: 6px 2px; font-size: 13px; }
.person-card .task:last-child { border-bottom: none; }

/* ---------- alerts ---------- */

.alert-row {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--card);
  border: 1px solid var(--line);
  border-left: 3px solid var(--red);
  border-radius: 6px;
  padding: 11px 14px;
  margin-bottom: 8px;
}
.alert-row .what { flex: 1; min-width: 0; }
.alert-row .what b { display: block; font-size: 13.5px; }
.alert-row .what span { font-size: 12px; color: var(--ink-soft); }
.alert-row .late-by { color: var(--red); font-weight: 600; font-size: 12.5px; white-space: nowrap; }
.alert-row .nudged { font-size: 12px; color: var(--ink-faint); }

.section-gap { margin-top: 30px; }

.log-line {
  font-size: 12.5px;
  color: var(--ink-soft);
  padding: 6px 2px;
  border-bottom: 1px solid #eee8dc;
}

/* ---------- reports ---------- */

.report-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.seg {
  display: inline-flex;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  overflow: hidden;
}
.seg button {
  border: none;
  background: var(--card);
  padding: 5px 16px;
  font-size: 13px;
  color: var(--ink-soft);
}
.seg button + button { border-left: 1px solid var(--line-strong); }
.seg button.on { background: var(--pine); color: #fff; }

.date-nav { display: flex; align-items: center; gap: 8px; }
.date-nav .when { font-family: var(--serif); font-size: 16px; font-weight: 600; min-width: 200px; text-align: center; }
/* the 28px square is for the ‹ › arrows only — labelled buttons like
   Print and Export CSV share the row and must keep their natural size,
   or their text spills past the hit area and clicks miss */
.date-nav button:not(.btn) {
  border: 1px solid var(--line-strong);
  background: var(--card);
  border-radius: 5px;
  width: 28px; height: 28px;
  font-size: 14px;
  line-height: 1;
}
.date-nav button:disabled { opacity: 0.35; cursor: default; }

.stat-row {
  display: flex;
  gap: 14px;
  margin-bottom: 22px;
}

.stat {
  flex: 1;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px 16px;
}
.stat .big { font-family: var(--serif); font-size: 26px; font-weight: 600; }
.stat .big small { font-size: 15px; color: var(--ink-faint); font-weight: 400; }
.stat .lbl { font-size: 12px; color: var(--ink-soft); margin-top: 2px; }
.stat.bad .big { color: var(--red); }
.stat.warn .big { color: var(--amber); }

table.roles {
  width: 100%;
  border-collapse: collapse;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  font-size: 13px;
}
table.roles th {
  text-align: left;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--ink-faint);
  padding: 9px 14px;
  border-bottom: 1px solid var(--line);
}
table.roles td { padding: 9px 14px; border-bottom: 1px solid #eee8dc; }
table.roles tr:last-child td { border-bottom: none; }
table.roles .who-cell { display: flex; align-items: center; gap: 9px; }
table.roles .who-cell span { color: var(--ink-soft); font-size: 12px; }
table.roles .bar-cell { width: 34%; }
table.roles td.miss { color: var(--red); font-weight: 600; }
table.roles td.zero { color: var(--ink-faint); }

.hbar {
  height: 6px;
  background: var(--line);
  border-radius: 3px;
  overflow: hidden;
}
.hbar i { display: block; height: 100%; background: var(--accent); }
.hbar.low i { background: var(--amber); }
.hbar.bad i { background: var(--red); }

.slip-list { margin-top: 26px; }
.slip-list h3 { font-size: 16px; margin-bottom: 8px; }

/* weekly chart */
.chart-box {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px 18px 10px;
  margin-bottom: 22px;
}
.chart-box h3 { font-size: 16px; margin-bottom: 12px; }
.legend { display: flex; gap: 16px; font-size: 12px; color: var(--ink-soft); margin-top: 6px; }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 5px; vertical-align: -1px; }

.week-grid-note { font-size: 12px; color: var(--ink-faint); margin-top: 8px; }

table.week td.pct-good { color: var(--green); }
table.week td.pct-mid { color: var(--amber); }
table.week td.pct-bad { color: var(--red); }
table.week td, table.week th { text-align: center; }
table.week td:first-child, table.week th:first-child { text-align: left; }

.callouts { display: flex; gap: 14px; margin-top: 22px; }
.callout {
  flex: 1;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--card);
  padding: 12px 15px;
  font-size: 13px;
}
.callout b { font-family: var(--serif); }
.callout .lbl { font-size: 11px; letter-spacing: 0.07em; text-transform: uppercase; color: var(--ink-faint); margin-bottom: 4px; }

/* ---------- full-screen overlay: setup wizard + lock screen ---------- */

.pick {
  position: fixed;
  inset: 0;
  background: var(--pine);
  z-index: 50;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--cream);
  overflow-y: auto;
}
.pick h1 { font-size: 34px; margin-bottom: 4px; }
.pick .sub { color: #9eb4ab; margin-bottom: 30px; font-size: 14px; line-height: 1.55; }

.wizard { width: 560px; max-width: calc(100vw - 40px); padding: 40px 0; }

.wizard-form .field label { color: #9eb4ab; }
.wizard-form input[type=text], .wizard-form input[type=password],
.wizard-form input[type=email], .wizard-form input[type=time],
.wizard-form select {
  width: 100%;
  border: 1px solid rgba(255,255,255,0.22);
  border-radius: 6px;
  padding: 8px 11px;
  background: rgba(255,255,255,0.07);
  color: var(--cream);
  font-size: 14px;
}
.wizard-form input:focus, .wizard-form select:focus {
  outline: none;
  border-color: #d8a23a;
}
.wizard-form select option { color: var(--ink); background: #fff; }
.wizard-form ::placeholder { color: #7e958b; }

.wizard-err { color: #f0b4a6; font-size: 13px; min-height: 18px; margin-top: 6px; }
.wizard-steps { margin-top: 26px; font-size: 12px; color: #7e958b; }

.wizard-list { margin-bottom: 18px; }
.wizard .staff-row { border-color: rgba(255,255,255,0.12); }
.wizard .staff-row .who b { color: var(--cream); }
.wizard .staff-row .who span { color: #9eb4ab; }
.wizard .btn { background: transparent; color: var(--cream); border-color: rgba(255,255,255,0.3); }
.wizard .btn:hover { border-color: rgba(255,255,255,0.6); }
.wizard .btn-primary { background: #d8a23a; border-color: #d8a23a; color: #1d2520; font-weight: 600; }
.wizard .btn-primary:hover { background: #c8932e; border-color: #c8932e; }

.radio-card {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  border: 1px solid rgba(255,255,255,0.18);
  border-radius: 8px;
  padding: 14px 16px;
  margin-bottom: 10px;
  cursor: pointer;
  font-size: 13.5px;
  line-height: 1.5;
  color: #c7d4cb;
}
.radio-card:hover { border-color: rgba(255,255,255,0.4); }
.radio-card input { margin-top: 3px; accent-color: #d8a23a; }
.radio-card b { color: var(--cream); }

/* subscription paywall plan cards (on the pine overlay) */
.plan-grid { display: flex; gap: 14px; margin: 6px 0 4px; flex-wrap: wrap; }
.plan-card {
  position: relative;
  flex: 1;
  min-width: 200px;
  text-align: left;
  border: 1px solid rgba(255,255,255,0.22);
  background: rgba(255,255,255,0.05);
  border-radius: 10px;
  padding: 18px 18px 16px;
  color: var(--cream);
  cursor: pointer;
  transition: border-color 0.15s ease, background-color 0.15s ease, transform 0.12s ease;
}
.plan-card:hover { border-color: #d8a23a; background: rgba(216,162,58,0.10); }
.plan-card:active { transform: scale(0.99); }
.plan-card.best { border-color: rgba(216,162,58,0.55); }
.plan-badge {
  position: absolute; top: 12px; right: 12px;
  background: #d8a23a; color: #1d2520;
  font-size: 11px; font-weight: 700;
  border-radius: 9px; padding: 2px 8px;
}
.plan-trial { font-size: 12px; font-weight: 700; color: #8fc7a3; margin-bottom: 2px; }
.plan-foot-note { font-size: 12px; color: #9eb4ab; margin: 12px 0 2px; }
.plan-name { font-size: 13px; letter-spacing: 0.06em; text-transform: uppercase; color: #9eb4ab; }
.plan-price { font-family: var(--serif); font-size: 30px; font-weight: 600; margin: 4px 0 2px; }
.plan-price span { font-family: var(--sans); font-size: 14px; font-weight: 400; color: #9eb4ab; }
.plan-sub { font-size: 12.5px; color: #9eb4ab; }
.plan-info {
  position: absolute; top: 12px; left: 12px;
  width: 18px; height: 18px; border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.4);
  color: #9eb4ab; font-size: 11px; font-style: italic; font-weight: 700;
  display: inline-flex; align-items: center; justify-content: center; line-height: 1;
}
.plan-info:hover { color: var(--cream); border-color: #d8a23a; }
.plan-math { margin-top: 8px; font-size: 11.5px; color: #d8a23a; line-height: 1.45; }

/* account sign-up / log-in screen (on the pine overlay) */
.auth-ok {
  background: rgba(143, 199, 163, 0.12);
  border: 1px solid rgba(143, 199, 163, 0.45);
  color: #bfe3cc;
  border-radius: 8px;
  padding: 12px 15px;
  font-size: 13.5px;
  line-height: 1.5;
  margin: -10px 0 22px;
}
.auth-switch { margin-top: 20px; font-size: 13px; color: #9eb4ab; }
.auth-switch a { color: #d8a23a; text-decoration: none; font-weight: 600; }
.auth-switch a:hover { text-decoration: underline; }

.acct-foot { margin-top: 24px; font-size: 12.5px; color: #9eb4ab; }
.acct-foot a { color: #d8a23a; text-decoration: none; }
.acct-foot a:hover { text-decoration: underline; }

/* the agreement line in the wizard and sign-up forms (dark overlay) */
.field.check.tos-line { margin-top: 4px; }
.field.check.tos-line label { color: #c7d4cb; font-size: 12.5px; line-height: 1.5; }
.field.check.tos-line a { color: #d8a23a; text-decoration: none; }
.field.check.tos-line a:hover { text-decoration: underline; }

.side-legal a { color: #88a094; text-decoration: none; }
.side-legal a:hover { color: var(--cream); text-decoration: underline; }
/* same footer reused inside the light me-menu modal */
.modal .acct-foot { color: var(--ink-soft); border-top: 1px solid var(--line); padding-top: 14px; }
.modal .acct-foot a { color: var(--accent); }

/* sidebar cloud-sync line */
.cloudsync { font-size: 11.5px; color: #88a094; min-height: 16px; }
.cloudsync::before { content: ''; display: inline-block; width: 6px; height: 6px; border-radius: 50%; margin-right: 6px; vertical-align: 1px; background: currentColor; }
.cloudsync:empty::before { display: none; }
.cloudsync.synced { color: #8fc7a3; }
.cloudsync.saving { color: #d8c07a; }
.cloudsync.offline { color: #e0a08f; }

.pin-panel { margin-top: 26px; }
.pin-panel label { display: block; font-size: 12px; color: #9eb4ab; margin-bottom: 6px; }
.pin-row { display: flex; gap: 10px; }
.pin-row input {
  flex: 1;
  border: 1px solid rgba(255,255,255,0.25);
  border-radius: 6px;
  padding: 9px 12px;
  background: rgba(255,255,255,0.07);
  color: var(--cream);
  font-size: 18px;
  letter-spacing: 0.35em;
}
.pin-row input:focus { outline: none; border-color: #d8a23a; }
.pin-row .btn-primary { background: #d8a23a; border-color: #d8a23a; color: #1d2520; font-weight: 600; }

.pick-grid {
  display: grid;
  grid-template-columns: repeat(4, 170px);
  gap: 12px;
}

.pick-card {
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 8px;
  padding: 18px 14px;
  text-align: center;
  color: var(--cream);
}
.pick-card:hover { background: rgba(255,255,255,0.1); border-color: rgba(255,255,255,0.3); }
.pick-card .avatar { width: 38px; height: 38px; font-size: 14px; margin: 0 auto 10px; }
.pick-card b { display: block; font-size: 13.5px; }
.pick-card span { font-size: 11.5px; color: #9eb4ab; }
.pick-card.sel { border-color: #d8a23a; background: rgba(216,162,58,0.12); }

/* ---------- settings ---------- */

.set-block {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px 20px;
  margin-bottom: 18px;
}
.set-block h3 { font-size: 17px; margin-bottom: 12px; }
.set-block .sub { font-size: 13px; color: var(--ink-soft); }

.inline-form { display: flex; flex-wrap: wrap; gap: 10px; }
.inline-form .btn { flex: none; }
.inline-form input {
  flex: 1;
  min-width: 160px;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  padding: 7px 10px;
  background: #fff;
  font-size: 13.5px;
}
.inline-form input:focus { outline: none; border-color: var(--accent); }

.staff-row {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 8px 2px;
  border-bottom: 1px solid #eee8dc;
}
.staff-row:last-of-type { border-bottom: none; }
.staff-row .who { flex: 1; min-width: 0; }
.staff-row .who b { display: block; font-size: 13.5px; }
.staff-row .who span { font-size: 12px; color: var(--ink-soft); }

/* office hours — one row per weekday: open?, doors-open, doors-close */
.hours-row { display: flex; align-items: center; gap: 10px; padding: 3px 0; }
.hours-row .day-box { width: 132px; }
.hours-row input[type=time] {
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  padding: 5px 8px;
  background: #fff;
  font-size: 13px;
}
.hours-row input[type=time]:focus { outline: none; border-color: var(--accent); }
.hours-row input[type=time]:disabled { opacity: 0.45; background: var(--paper); }
.hours-dash { color: var(--ink-faint); font-size: 12px; }

.day-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.day-box {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  padding: 5px 10px;
  font-size: 12.5px;
  cursor: pointer;
}
.day-box input { accent-color: var(--accent); }
.day-box.wide { margin-top: 2px; }

@media (max-width: 760px) { .pick-grid { grid-template-columns: repeat(2, 160px); } }

/* ---------- modal ---------- */

.modal-back {
  position: fixed;
  inset: 0;
  background: rgba(29,41,38,0.45);
  z-index: 40;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: 12vh;
}

.modal {
  background: var(--card);
  border-radius: 10px;
  width: 440px;
  max-width: calc(100vw - 32px);
  padding: 22px 24px;
  box-shadow: 0 18px 50px rgba(0,0,0,0.25);
}
.modal h2 { font-size: 20px; margin-bottom: 16px; }

.field { margin-bottom: 13px; }
.field label { display: block; font-size: 12px; font-weight: 600; color: var(--ink-soft); margin-bottom: 4px; }
.field input[type=text], .field input[type=date], .field input[type=time],
.field input[type=number], .field input[type=password],
.field select, .field textarea {
  width: 100%;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  padding: 7px 10px;
  background: #fff;
  font-size: 13.5px;
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none;
  border-color: var(--accent);
}
.field-row { display: flex; gap: 12px; }
.field-row .field { flex: 1; }
.field.check { display: flex; align-items: flex-start; gap: 8px; }
.field.check input { margin-top: 2px; }
.field.check label { margin: 0; font-weight: 400; color: var(--ink); font-size: 13px; line-height: 1.45; }

.modal-foot { display: flex; justify-content: flex-end; gap: 10px; margin-top: 18px; }

/* the disperse picker: a scrollable stack of tickable task rows */
.dt-list {
  max-height: 260px;
  overflow-y: auto;
  margin-top: 8px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.dt-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 6px 9px;
  cursor: pointer;
}
.dt-row:hover { border-color: var(--line-strong); }
.dt-title { flex: 1; min-width: 0; }
.dt-meta { color: var(--ink-faint); font-size: 12px; white-space: nowrap; }

/* ---------- toasts ---------- */

#toasts {
  position: fixed;
  left: 18px;
  bottom: 18px;
  z-index: 60;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none; /* never swallow clicks meant for the page */
}
.toast {
  background: var(--pine-deep);
  color: var(--cream);
  font-size: 13px;
  padding: 9px 15px;
  border-radius: 6px;
  max-width: 320px;
  animation: toast-in 0.18s ease-out;
}
@keyframes toast-in {
  from { transform: translateY(8px); opacity: 0; }
  to { transform: none; opacity: 1; }
}

/* ---------- time clock + timesheet ---------- */

#clockbtn.on-clock {
  border-color: var(--green);
  color: var(--green);
  font-weight: 600;
}

.punch-card {
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--card);
  border: 1px solid var(--line);
  border-left: 3px solid var(--line-strong);
  border-radius: 8px;
  padding: 14px 18px;
  margin-bottom: 20px;
}
.punch-card.on { border-left-color: var(--green); }
.punch-state { flex: 1; }
.punch-state b { display: block; font-family: var(--serif); font-size: 16px; }
.punch-state span { font-size: 12.5px; color: var(--ink-soft); }

.punch-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 2px;
  font-size: 13px;
  border-bottom: 1px solid #eee8dc;
}
.punch-row:last-child { border-bottom: none; }
.punch-row .on-shift { color: var(--green); font-weight: 600; }
.punch-row .del { border: none; background: none; color: var(--ink-faint); font-size: 15px; padding: 0 4px; }
.punch-row .del:hover { color: var(--red); }

/* ---------- time off ---------- */

.cover-banner {
  background: var(--amber-soft);
  border: 1px solid #e3d3ad;
  border-radius: 6px;
  padding: 9px 14px;
  margin-bottom: 14px;
  font-size: 13.5px;
}

.status-chip {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  border-radius: 9px;
  padding: 2px 9px;
  white-space: nowrap;
}
.status-chip.pending { background: var(--amber-soft); color: var(--amber); }
.status-chip.approved { background: var(--accent-soft); color: var(--accent); }
.status-chip.denied { background: var(--red-soft); color: var(--red); }

.cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
}
.cal-head {
  background: var(--card);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--ink-faint);
  text-align: center;
  padding: 6px 0;
}
.cal-cell {
  background: var(--card);
  min-height: 56px;
  padding: 4px 6px;
}
.cal-cell.blank { background: var(--paper); }
.cal-cell.closed { background: var(--paper); }
.cal-cell.closed .cal-day { color: var(--line-strong); }
.cal-cell.today { background: var(--accent-soft); }
.cal-day { font-size: 11px; color: var(--ink-faint); display: block; margin-bottom: 2px; }
.cal-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px; height: 20px;
  border-radius: 50%;
  color: #fff;
  font-size: 9px;
  font-weight: 600;
  margin: 0 2px 2px 0;
}
.cal-chip.pending {
  background: transparent;
  border: 1.5px dashed var(--amber);
  color: var(--amber);
}

/* ---------- custom roles ---------- */

.role-list { display: flex; flex-wrap: wrap; gap: 8px; }
.role-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 4px 11px;
  font-size: 12.5px;
  background: #fff;
}
.role-pill i { width: 10px; height: 10px; border-radius: 50%; }
.role-pill button {
  border: none; background: none;
  color: var(--ink-faint);
  font-size: 14px;
  padding: 0;
  line-height: 1;
}
.role-pill button:hover { color: var(--red); }
.inline-form input[type=color] {
  width: 42px;
  min-width: 42px;
  height: 33px;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  padding: 2px;
  background: #fff;
  flex: none;
}

.hidden { display: none !important; }

/* ---------- motion ----------
   Small, quick, and consistent: views slide up as they swap, modals
   rise out of the dim, and interactive surfaces ease between states.
   All of it switches off under prefers-reduced-motion. */

.btn, .side nav a, .me-chip, .seg button, .date-nav button,
.tickbox, .pick-card, .radio-card, .day-box, .role-pill button,
.task .del, .punch-row .del {
  transition: background-color 0.15s ease, border-color 0.15s ease,
    color 0.15s ease, transform 0.15s ease;
}

.btn:active, .tickbox:active, .pick-card:active { transform: scale(0.97); }

#main.view-anim > * { animation: page-in 0.26s ease-out; }
@keyframes page-in {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: none; }
}

.modal-back { animation: fade-in 0.16s ease-out; }
.modal { animation: modal-in 0.22s cubic-bezier(0.2, 0.8, 0.3, 1); }
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes modal-in {
  from { opacity: 0; transform: translateY(16px) scale(0.98); }
  to { opacity: 1; transform: none; }
}

.pick { animation: fade-in 0.25s ease-out; }
.pick .wizard { animation: page-in 0.3s ease-out; }

.task.is-done .tickbox { animation: tick-pop 0.2s ease; }
@keyframes tick-pop { 50% { transform: scale(1.2); } }

.meter i, .hbar i { transition: width 0.4s ease; }
.person-card, .stat, .callout { transition: box-shadow 0.18s ease, transform 0.18s ease; }
.person-card:hover { transform: translateY(-2px); box-shadow: 0 8px 22px rgba(0, 0, 0, 0.06); }
.nav-badge, .status-chip, .cal-chip { animation: chip-in 0.2s ease-out; }
@keyframes chip-in {
  from { opacity: 0; transform: scale(0.7); }
  to { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
  }
}

/* ---------- print (reports are made to be handed out) ---------- */

@media print {
  .side, .topbar, .report-controls .seg, .btn, #toasts { display: none !important; }
  body, main { background: #fff; }
  main { padding: 0; overflow: visible; }
  .page { max-width: none; }
}
