/* Mobile-first. One stylesheet, no framework. */

:root {
  color-scheme: light dark;
  --bg: #f4f5f7;
  --surface: #ffffff;
  --surface-2: #f7f8fa;
  --text: #15181c;
  --muted: #5d6673;
  --border: #e3e6eb;
  --border-strong: #cdd2da;
  --accent: #2350d6;
  --accent-hover: #1b41b3;
  --accent-soft: #e9eefc;
  --accent-text: #ffffff;
  --error: #b42318;
  --pending: #8a5a00;
  --pending-soft: #fdf3dc;
  --approved: #17683a;
  --approved-soft: #e4f4ea;
  --denied: #b42318;
  --denied-soft: #fdebe9;
  --sick: #7a3fb8;
  --sick-soft: #f3ebfb;
  --callout: #6b4d00;
  --callout-soft: #fff8e6;
  --open: #b42318;
  --open-soft: #fdebe9;
  --closed: #344054;
  --closed-soft: #eaecf0;
  --shadow: 0 1px 2px rgb(16 24 40 / 0.05), 0 1px 3px rgb(16 24 40 / 0.04);
  --radius: 12px;
  --radius-sm: 8px;
  --gutter: 16px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #111418;
    --surface: #1a1e24;
    --surface-2: #20252c;
    --text: #e9ecf1;
    --muted: #9aa4b2;
    --border: #2c323a;
    --border-strong: #3b424c;
    --accent: #7b9dff;
    --accent-hover: #9bb5ff;
    --accent-soft: #1f2a44;
    --accent-text: #0d1014;
    --error: #ff8a80;
    --pending: #f0c060;
    --pending-soft: #3a2f14;
    --approved: #7ddba3;
    --approved-soft: #16301f;
    --denied: #ff8a80;
    --denied-soft: #3a1c1a;
    --sick: #c9a5f5;
    --sick-soft: #2e2240;
    --callout: #f0c060;
    --callout-soft: #2c2616;
    --open: #ff8a80;
    --open-soft: #3a1c1a;
    --closed: #d0d5dd;
    --closed-soft: #2c323a;
    --shadow: none;
  }
}

* { box-sizing: border-box; }

/* Our .button and button rules set display, so [hidden] needs to win outright. */
[hidden] { display: none !important; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
  accent-color: var(--accent);
}

a { color: var(--accent); }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ---------- Top bar ---------- */

.bar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0 1rem;
  /* Lines the bar's contents up with the page column on wide screens. */
  padding: 0 max(var(--gutter), (100% - 64rem) / 2 + var(--gutter));
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  min-height: 3.5rem;
  margin-right: auto;
  font-weight: 650;
  letter-spacing: -0.01em;
  color: inherit;
  text-decoration: none;
}
.brand img { display: block; }

/* Only administrators have anywhere else to go. The role is set on <html> before
   the first paint (see index.html), so the bar does not change shape on load. */
html:not([data-role="admin"]) #nav { display: none; }

/* On a phone the nav drops to its own row under the brand. */
.nav {
  order: 3;
  display: flex;
  gap: 0.25rem;
  width: calc(100% + 2 * var(--gutter));
  margin: 0 calc(-1 * var(--gutter));
  padding: 0 var(--gutter);
  overflow-x: auto;
  border-top: 1px solid var(--border);
}

.nav a {
  padding: 0.7rem 0.75rem;
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--muted);
  text-decoration: none;
  white-space: nowrap;
  border-bottom: 2px solid transparent;
}
.nav a:hover { color: var(--text); }
.nav a[aria-current="page"] { color: var(--text); border-bottom-color: var(--accent); }

@media (min-width: 640px) {
  .brand { margin-right: 1rem; }
  .nav { order: 0; width: auto; margin: 0 auto 0 0; padding: 0; border-top: 0; align-self: stretch; }
  .nav a { display: flex; align-items: center; padding: 0 0.75rem; }
}

/* ---------- Page layout ---------- */

.page {
  width: 100%;
  max-width: 64rem;
  margin: 0 auto;
  padding: 1.5rem var(--gutter) 3rem;
}

.page-head { margin-bottom: 1.25rem; }
.page-head h1 { margin: 0; }
.page-head p { margin: 0.25rem 0 0; }

.card {
  padding: 1.25rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.card + .card, .stack > * + * { margin-top: 1rem; }

.card-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.25rem;
}
.card-head h2 { margin: 0; }

.count {
  display: inline-block;
  min-width: 1.5rem;
  padding: 0 0.45rem;
  font-size: 0.8rem;
  font-weight: 600;
  line-height: 1.5rem;
  text-align: center;
  color: var(--muted);
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 999px;
  vertical-align: 0.15em;
}

/* Home: the form and your history side by side once there is room. */
.home-grid { display: grid; gap: 1rem; }
.home-grid > .card + .card { margin-top: 0; }
.home-grid ~ .card { margin-top: 1rem; }
@media (min-width: 860px) {
  .home-grid { grid-template-columns: 22rem 1fr; align-items: start; }
}

.centered {
  display: flex;
  flex-direction: column;
  min-height: 100dvh;
  align-items: center;
  justify-content: center;
  padding: var(--gutter);
}
.centered .card { width: 100%; max-width: 24rem; }

.login-brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 1.5rem;
  font-weight: 650;
  color: var(--muted);
}

/* The demo's one-tap sign-ins, above the normal form. */
.demo-card { margin-bottom: 1rem; }
.demo-card + .card { margin-top: 0; }
.demo-account { text-align: left; }
.demo-account .muted { display: block; margin-top: 0.15rem; font-weight: 400; }

/* ---------- Type ---------- */

h1 { margin: 0 0 0.25rem; font-size: 1.5rem; line-height: 1.25; letter-spacing: -0.02em; }
h2 { margin: 0 0 0.25rem; font-size: 1.05rem; letter-spacing: -0.01em; }
.muted { color: var(--muted); font-size: 0.9rem; }
.lede { margin: 0 0 0.5rem; }

/* ---------- Forms ---------- */

label {
  display: block;
  margin-top: 1rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text);
}
label .muted { font-weight: 400; }

input,
select {
  display: block;
  width: 100%;
  min-height: 2.75rem;
  padding: 0.6rem 0.75rem;
  margin-top: 0.35rem;
  font: inherit;
  font-size: 16px; /* stops iOS from zooming on focus */
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
}
input:focus, select:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
input::placeholder { color: var(--muted); opacity: 0.7; }
/* iOS centres date and time values and lets the control shrink; keep them in line. */
input::-webkit-date-and-time-value { text-align: left; }
input[type="date"], input[type="time"] { -webkit-appearance: none; appearance: none; }

.row { display: flex; flex-wrap: wrap; gap: 0 0.75rem; }
.row > label { flex: 1 1 10rem; min-width: 0; }

/* Checkboxes and radios sit beside their words, not above them. */
label.check {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 400;
  cursor: pointer;
}
label.check input { width: 1.1rem; min-height: 0; height: 1.1rem; margin: 0; box-shadow: none; }

/* Paid / Unpaid as a two-way switch. The radios stay real inputs for keyboards. */
.field { margin: 1rem 0 0; padding: 0; border: 0; min-width: 0; }
.field legend { padding: 0; margin-bottom: 0.35rem; font-size: 0.875rem; font-weight: 500; }
.segmented {
  display: flex;
  padding: 0.2rem;
  background: var(--surface-2);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
}
.segmented label { position: relative; flex: 1; margin: 0; }
.segmented input { position: absolute; inset: 0; opacity: 0; margin: 0; min-height: 0; cursor: pointer; }
.segmented span {
  display: block;
  padding: 0.5rem;
  font-size: 0.95rem;
  font-weight: 500;
  text-align: center;
  color: var(--muted);
  border-radius: 6px;
}
.segmented input:checked + span { color: var(--text); background: var(--surface); box-shadow: 0 1px 2px rgb(16 24 40 / 0.12), 0 0 0 1px var(--border); }
.segmented input:focus-visible + span { outline: 2px solid var(--accent); }

/* ---------- Buttons ---------- */

button,
.button {
  display: block;
  width: 100%;
  min-height: 2.75rem;
  margin-top: 1rem;
  padding: 0.6rem 1rem;
  font: inherit;
  font-weight: 550;
  text-align: center;
  text-decoration: none;
  color: var(--text);
  background: transparent;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background-color 0.12s, border-color 0.12s;
}

.primary { background: var(--accent); color: var(--accent-text); }
.primary:hover:not(:disabled) { background: var(--accent-hover); }
.secondary { background: var(--surface); color: var(--text); border-color: var(--border-strong); }
.secondary:hover:not(:disabled) { background: var(--surface-2); }
.danger { background: var(--surface); color: var(--denied); border-color: var(--border-strong); }
.danger:hover:not(:disabled) { background: var(--denied-soft); border-color: var(--denied); }
.ghost { color: var(--muted); }
.ghost:hover:not(:disabled) { color: var(--text); background: var(--surface-2); }

.small { width: auto; min-height: 2.25rem; margin: 0; padding: 0.35rem 0.8rem; font-size: 0.9rem; }

.link {
  width: auto;
  min-height: 0;
  margin: 0;
  padding: 0.25rem 0;
  background: none;
  border: none;
  color: var(--accent);
  text-decoration: underline;
}

button:disabled { opacity: 0.55; cursor: not-allowed; }

/* ---------- Status lines ---------- */

.status { min-height: 1.25rem; margin: 0.75rem 0 0; font-size: 0.9rem; color: var(--muted); }
.status:empty { min-height: 0; margin: 0; }
.status.error { color: var(--error); }

.empty {
  margin: 0.75rem 0 0;
  padding: 1.5rem 1rem;
  font-size: 0.95rem;
  text-align: center;
  color: var(--muted);
  background: var(--surface-2);
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius-sm);
}

/* ---------- Requests ---------- */

.requests { list-style: none; margin: 0; padding: 0; }

.request {
  display: grid;
  gap: 0.75rem;
  padding: 1rem 0;
  border-top: 1px solid var(--border);
}
.requests > .request:first-child { border-top: 0; padding-top: 0.75rem; }
.requests > .request:last-child { padding-bottom: 0; }

.request-body { display: flex; flex-direction: column; gap: 0.3rem; min-width: 0; }

.request-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 0.75rem; }
.request-title { font-weight: 600; }
.request-when { font-size: 0.95rem; color: var(--text); }
.request-head + .request-when { margin-top: -0.2rem; }

.chips { display: flex; flex-wrap: wrap; gap: 0.35rem; }
.chip {
  padding: 0.05rem 0.5rem;
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--muted);
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 999px;
}
.chip-sick { color: var(--sick); background: var(--sick-soft); border-color: transparent; }

.request-message {
  margin: 0.15rem 0 0;
  padding-left: 0.7rem;
  font-size: 0.925rem;
  border-left: 3px solid var(--border-strong);
  overflow-wrap: anywhere;
}
.request-decision { margin: 0; font-size: 0.85rem; }
.request-also-off {
  margin: 0.2rem 0 0;
  padding: 0.45rem 0.65rem;
  font-size: 0.85rem;
  color: var(--callout);
  background: var(--callout-soft);
  border-radius: var(--radius-sm);
}

/* Approve and Deny share the row on a phone; the quieter actions follow. */
.request-actions { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.request-actions button { width: auto; min-height: 2.5rem; margin: 0; padding: 0.4rem 0.9rem; font-size: 0.9rem; }
.request-actions [data-action="approve"],
.request-actions [data-action="deny"] { flex: 1 1 40%; }
.request-actions .ghost { padding-inline: 0.6rem; }

.request-edit {
  padding: 0.25rem 1rem 1rem;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}
.request-edit .request-actions { margin-top: 1rem; }
.request-edit .request-actions button { flex: 0 0 auto; }

@media (min-width: 720px) {
  /* Details on the left, actions pinned to the right. */
  .request:has(> .request-actions:not([hidden])) { grid-template-columns: 1fr auto; align-items: start; }
  .request-actions { flex-wrap: nowrap; justify-content: flex-end; }
  .request-actions [data-action="approve"],
  .request-actions [data-action="deny"] { flex: none; min-width: 5.5rem; }
  .request-actions [data-action="paid"] { min-width: 7.5rem; }
  .request-edit { grid-column: 1 / -1; }
  .request-head { justify-content: flex-start; align-items: center; }
}

.badge {
  flex: none;
  padding: 0.1rem 0.6rem;
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: capitalize;
  border-radius: 999px;
}
.badge-pending { color: var(--pending); background: var(--pending-soft); }
.badge-approved { color: var(--approved); background: var(--approved-soft); }
.badge-denied { color: var(--denied); background: var(--denied-soft); }
.badge-open { color: var(--open); background: var(--open-soft); text-transform: none; }
.badge-closed { color: var(--closed); background: var(--closed-soft); }

/* ---------- Passkey ---------- */

/* Shown only where the browser can make a passkey; index.html sets the attribute. */
html:not([data-passkeys]) #passkey-card { display: none; }

.inline-card { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.75rem 1.5rem; }
.inline-card p { margin: 0; }
.inline-card button { width: auto; margin: 0; }
.inline-card .status { flex-basis: 100%; }

/* ---------- Users table ---------- */

table { width: 100%; border-collapse: collapse; font-size: 0.95rem; }
th, td { padding: 0.75rem; text-align: left; border-bottom: 1px solid var(--border); }
th { font-size: 0.8rem; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: 0.04em; }
tbody tr:last-child td { border-bottom: 0; }
.cell-strong { font-weight: 600; }
td .chip { text-transform: capitalize; }

/* On a phone each user becomes a small block instead of a sideways-scrolling row. */
@media (max-width: 639px) {
  .table-card { padding: 0.25rem 1.25rem; }
  thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  table, tbody, tr, td { display: block; }
  tr { padding: 0.9rem 0; border-bottom: 1px solid var(--border); }
  tbody tr:last-child { border-bottom: 0; }
  td { display: flex; justify-content: space-between; gap: 1rem; padding: 0.15rem 0; border: 0; overflow-wrap: anywhere; }
  td::before { content: attr(data-label); color: var(--muted); font-size: 0.85rem; flex: none; }
  td.cell-strong { font-size: 1.05rem; }
  td.cell-strong::before { content: none; }
}
@media (min-width: 640px) {
  .table-card { padding: 0.25rem 0.5rem; }
  th, td { white-space: nowrap; }
}

.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* ---------- Users ---------- */

.cell-code { font-variant-numeric: tabular-nums; letter-spacing: 0.08em; }
.cell-actions { text-align: right; }
tr.is-deactivated td:not(.cell-actions) { color: var(--muted); }
.account-panel { display: grid; gap: 0.75rem; white-space: normal; }
.account-panel .request-edit .request-actions { margin-top: 0.75rem; }
.edit-row td { padding: 0.5rem 0 1rem; }
.edit-row td::before { content: none; }
.edit-row p.cell-strong { margin: 0.75rem 0 0; }

/* ---------- Timesheets ---------- */

.week-bar { display: grid; gap: 0.75rem; }
.week-nav { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; }
.week-title { flex: 1 1 12rem; margin: 0; text-align: center; font-size: 1.15rem; }
.week-state { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; }
.week-actions { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.week-actions .small { flex: 0 0 auto; }
.week-history summary { cursor: pointer; font-size: 0.9rem; color: var(--muted); }
.week-history ul { margin: 0.5rem 0 0; padding-left: 1.25rem; font-size: 0.9rem; }
.week-bar .status:empty { display: none; }

.callout-card { border-color: var(--open); background: var(--open-soft); }
.callout-card h2 { color: var(--open); }
.open-list { list-style: none; margin: 0.5rem 0 0; padding: 0; }
.open-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.6rem 0;
  border-top: 1px solid var(--border);
}
.open-list li:first-child { border-top: 0; }

.num { text-align: right; font-variant-numeric: tabular-nums; }
.week-table th[scope="row"] { font-weight: 500; text-align: left; }
.week-table tfoot th, .week-table tfoot td { font-weight: 650; border-top: 2px solid var(--border-strong); border-bottom: 0; }
.week-table tr.selected { background: var(--accent-soft); }
.week-table .overtime { color: var(--pending); font-weight: 650; }
.person-link { font-weight: 600; text-align: left; text-decoration: none; }
.person-link:hover { text-decoration: underline; }
.week-table .badge { margin-left: 0.4rem; }
@media (max-width: 639px) {
  .week-table th[scope="row"] { display: flex; align-items: center; padding: 0.15rem 0; border: 0; }
  .week-table td:empty { display: none; }
  .week-table tfoot tr { border-top: 2px solid var(--border-strong); }
  .week-table tfoot th, .week-table tfoot td { border-top: 0; }
}

.days { list-style: none; margin: 0.75rem 0 0; padding: 0; }
.day { padding: 0.9rem 0; border-top: 1px solid var(--border); }
.day-head { display: flex; align-items: baseline; gap: 0.75rem; }
.day-head h3 { margin: 0; font-size: 1rem; }
.day-head .small { margin-left: auto; }
.day-empty { margin: 0.25rem 0 0; }

.entries { list-style: none; margin: 0; padding: 0; }
.entry { display: grid; gap: 0.35rem; margin-top: 0.6rem; padding: 0.7rem 0.85rem; background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius-sm); }
.entry-open { border-color: var(--open); background: var(--open-soft); }
.entry-time-off { border-style: dashed; }
.entry-main { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; }
.entry-times { font-weight: 600; font-variant-numeric: tabular-nums; }
.entry-hours { margin-left: auto; font-weight: 600; font-variant-numeric: tabular-nums; }
.entry-actions { display: flex; gap: 0.25rem; }
.entry .request-message { margin: 0; }
.entry-form { margin-top: 0.75rem; background: var(--surface); }
.danger-text { color: var(--denied); }

/* ---------- Kiosk: the store iPad ---------- */

body.kiosk {
  display: flex;
  flex-direction: column;
  min-height: 100dvh;
  user-select: none;
  -webkit-user-select: none;
  touch-action: manipulation;
}

.kiosk-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.5rem;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}
.kiosk-brand { display: flex; align-items: center; gap: 0.6rem; font-weight: 650; }
.kiosk-clock { font-size: 1.25rem; font-weight: 600; font-variant-numeric: tabular-nums; }

.kiosk-main { flex: 1; display: flex; align-items: center; justify-content: center; padding: 1.5rem; }
.kiosk-screen { width: 100%; max-width: 34rem; display: flex; flex-direction: column; align-items: center; text-align: center; }

.kiosk-prompt { margin: 0 0 1.25rem; font-size: 2rem; }
.kiosk-dots { display: flex; gap: 1.25rem; margin-bottom: 0.5rem; }
.kiosk-dots span { width: 1.4rem; height: 1.4rem; border: 3px solid var(--border-strong); border-radius: 50%; }
.kiosk-dots span.filled { background: var(--text); border-color: var(--text); }
.kiosk-message { min-height: 1.75rem; margin: 0.5rem 0; font-size: 1.15rem; font-weight: 600; color: var(--error); }

.keypad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.85rem; width: 100%; max-width: 24rem; }
.keypad button {
  margin: 0;
  min-height: 5.25rem;
  font-size: 2.25rem;
  font-weight: 600;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: 1rem;
  box-shadow: var(--shadow);
}
.keypad button:active { background: var(--accent-soft); }
.keypad .keypad-quiet { font-size: 1.25rem; color: var(--muted); }

.shake { animation: shake 0.35s; }
@keyframes shake {
  20%, 60% { transform: translateX(-10px); }
  40%, 80% { transform: translateX(10px); }
}

.kiosk-name { margin: 0 0 1rem; font-size: 2.5rem; }

/* The state banner: one word-and-colour pair per state, shown big. */
.kiosk-state {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  width: 100%;
  padding: 1.5rem 1rem;
  border-radius: 1.25rem;
  color: #fff;
}
.kiosk-state[data-state="in"] { background: #17683a; }
.kiosk-state[data-state="lunch"] { background: #b54708; }
.kiosk-state[data-state="out"] { background: #475467; }
.kiosk-state-label { font-size: 2.75rem; font-weight: 800; letter-spacing: 0.02em; text-transform: uppercase; line-height: 1.1; }
.kiosk-state-since { font-size: 1.35rem; font-weight: 500; opacity: 0.95; }

.kiosk-forgotten {
  width: 100%;
  margin: 1rem 0 0;
  padding: 0.85rem 1rem;
  font-size: 1.05rem;
  color: var(--callout);
  background: var(--callout-soft);
  border-radius: var(--radius);
}

.kiosk-actions { display: grid; gap: 1rem; width: 100%; margin-top: 1.5rem; }
.kiosk-action {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.15rem;
  margin: 0;
  padding: 1.25rem 1rem;
  border-radius: 1rem;
  color: #fff;
}
.kiosk-action[data-tone="go"] { background: #17683a; }
.kiosk-action[data-tone="stop"] { background: #b42318; }
.kiosk-action[data-tone="pause"] { background: #b54708; }
.kiosk-action-verb { font-size: 2rem; font-weight: 750; }
.kiosk-action-hint { font-size: 1.1rem; font-weight: 500; opacity: 0.95; }

.kiosk-cancel { width: auto; margin-top: 1.5rem; padding: 0.75rem 1.5rem; font-size: 1.1rem; color: var(--muted); }
.kiosk-done { padding: 2.5rem 1rem; }
.kiosk-done-name { font-size: 1.75rem; font-weight: 600; }
.kiosk-hint { margin-top: 1.25rem; font-size: 1.1rem; color: var(--muted); }

.kiosk-sign-out {
  position: fixed;
  right: 0.75rem;
  bottom: 0.75rem;
  width: auto;
  min-height: 0;
  margin: 0;
  padding: 0.35rem 0.6rem;
  font-size: 0.8rem;
  font-weight: 400;
  color: var(--muted);
  opacity: 0.6;
}

/* ---------- Printable weekly summary ---------- */

body.print-page { background: var(--bg); }
.print-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 60rem;
  margin: 0 auto;
  padding: 1rem var(--gutter);
}
.print-toolbar .small { flex: none; }

.sheet {
  max-width: 60rem;
  margin: 0 auto 3rem;
  padding: 2rem;
  color: #111;
  background: #fff;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}
.sheet-head { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 1rem; margin-bottom: 1.25rem; }
.sheet-company { margin: 0; font-size: 0.85rem; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; color: #555; }
.sheet-head h1 { margin: 0.2rem 0 0; font-size: 1.4rem; }
.sheet-closed { margin: 0; font-size: 0.9rem; text-align: right; white-space: pre-line; color: #333; }
.sheet-table { font-size: 0.92rem; }
.sheet-table th, .sheet-table td { padding: 0.45rem 0.5rem; color: #111; border-bottom: 1px solid #ddd; }
.sheet-table thead th { font-size: 0.72rem; color: #555; white-space: normal; vertical-align: bottom; border-bottom: 2px solid #111; }
.sheet-table th[scope="row"] { font-weight: 500; }
.sheet-table tfoot th, .sheet-table tfoot td { font-weight: 700; border-top: 2px solid #111; border-bottom: 0; }
.sheet-table tbody tr:nth-child(even) { background: #f6f6f6; }
.sheet-note { margin: 1rem 0 0; font-size: 0.9rem; color: #8a1c12; }
.sheet-foot { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.5rem; margin-top: 1.5rem; font-size: 0.78rem; color: #555; }

/* The phone layout's stacked table rows are wrong for paper and the sheet. */
@media (max-width: 639px) {
  .sheet { padding: 1rem; overflow-x: auto; }
  .sheet-table thead { position: static; width: auto; height: auto; overflow: visible; clip-path: none; }
  .sheet-table { display: table; }
  .sheet-table thead { display: table-header-group; }
  .sheet-table tbody { display: table-row-group; }
  .sheet-table tfoot { display: table-footer-group; }
  .sheet-table tr { display: table-row; padding: 0; }
  .sheet-table th, .sheet-table td { display: table-cell; }
  .sheet-table td::before { content: none; }
}

@media print {
  @page { size: letter landscape; margin: 0.5in; }
  body.print-page { background: #fff; }
  .print-toolbar { display: none; }
  .sheet { max-width: none; margin: 0; padding: 0; border: 0; box-shadow: none; }
  .sheet-table tbody tr { break-inside: avoid; }
  .sheet-table tbody tr:nth-child(even) { background: #f2f2f2; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}

/* Row headers are names, not column labels. */
.week-table th[scope="row"],
.sheet-table th[scope="row"] { font-size: inherit; color: inherit; text-transform: none; letter-spacing: 0; }
@media (max-width: 639px) {
  .week-table tfoot { display: block; }
  .week-table td.cell-strong::before { content: attr(data-label); }
  .week-table td.cell-strong { font-size: 1rem; }
}
