/* ============================================================================
   Island Time — Ledger design system
   Ported from the approved Ledger UI concept. Single source of truth for the
   admin shell + kiosk surfaces. Loaded via url_for('static', filename='css/ledger.css').
   ============================================================================ */

:root {
  /* palette */
  --paper: #f7f8f6;
  --card: #ffffff;
  --ink: #14201c;
  --ink-soft: #2c3a35;
  --teal: #0f766e;
  --teal-d: #0b5a53;
  --teal-tint: #e2f1ef;
  --amber: #b45309;
  --amber-tint: #fbf0e1;
  --red: #b91c1c;
  --red-tint: #fbe7e7;
  --slate: #475569;
  --slate-tint: #eef1f5;
  --indigo: #4338ca;
  --indigo-tint: #eae9fb;
  --line: #e2e5e1;
  --line-strong: #cfd4ce;
  --zebra: #f4f6f3; /* alternating table row tint */
  --row-hover: #e9ede9;
  --panel: #0e2a28; /* dark teal sidebar */
  --panel-2: #0b201e;
  --panel-ink: #cde3df;
  --panel-muted: #7fa39d;

  /* kiosk */
  --kiosk-bg: #0b1220;
  --kiosk-card: #111b2e;
  --kiosk-line: #22324c;
  --kiosk-ink: #e8eef7;
  --kiosk-muted: #8da0bc;
  --kiosk-teal: #16b8a6;
  --kiosk-amber: #e08a2b;

  /* spacing */
  --s1: 4px;
  --s2: 8px;
  --s3: 12px;
  --s4: 16px;
  --s5: 24px;
  --s6: 32px;
  --s7: 48px;
  --r: 8px;
  --r-sm: 5px;
  --r-lg: 12px;
  --sh-sm: 0 1px 2px rgba(20, 32, 28, 0.06);
  --sh: 0 1px 3px rgba(20, 32, 28, 0.08), 0 1px 2px rgba(20, 32, 28, 0.04);
  --sh-lg: 0 8px 24px rgba(20, 32, 28, 0.1);

  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;

  --nav-w: 228px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}
html {
  font-size: 15px;
}
body {
  font-family: var(--sans);
  background: var(--paper);
  color: var(--ink);
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
}
.num {
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum";
}

/* ---------- App shell ---------- */
.app {
  display: flex;
  min-height: 100vh;
}
.sidebar {
  width: var(--nav-w);
  flex: 0 0 var(--nav-w);
  background: linear-gradient(180deg, var(--panel), var(--panel-2));
  color: var(--panel-ink);
  position: fixed;
  inset: 0 auto 0 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  border-right: 1px solid #07100f;
  z-index: 40;
}
.brand {
  padding: var(--s5) var(--s4) var(--s4);
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}
.brand-lock {
  background: #f4eee2;
  border-radius: var(--r);
  padding: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: inset 0 0 0 1px rgba(15, 118, 110, 0.18);
}
.brand-lock img {
  max-width: 100%;
  height: auto;
  display: block;
  max-height: 62px;
}
.brand-sub {
  margin-top: 10px;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--panel-muted);
  font-weight: 600;
}
.nav {
  flex: 1;
  overflow-y: auto;
  padding: var(--s4) var(--s2);
}
.nav-group {
  margin-bottom: var(--s4);
}
.nav-group h4 {
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--panel-muted);
  padding: 0 var(--s3) var(--s2);
  font-weight: 700;
}
.nav-link {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  text-align: left;
  background: transparent;
  border: 0;
  color: var(--panel-ink);
  font-family: var(--sans);
  font-size: 13.5px;
  font-weight: 500;
  padding: 8px var(--s3);
  border-radius: var(--r-sm);
  cursor: pointer;
  line-height: 1.25;
}
.nav-link:hover {
  background: rgba(255, 255, 255, 0.06);
}
.nav-link.active {
  background: var(--teal);
  color: #fff;
  font-weight: 600;
  box-shadow: inset 3px 0 0 #6fe3d6;
}
.nav-link .dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
  opacity: 0.55;
  flex: 0 0 auto;
}
.nav-foot {
  padding: var(--s3) var(--s4);
  border-top: 1px solid rgba(255, 255, 255, 0.07);
  font-size: 11px;
  color: var(--panel-muted);
}
.nav-foot a {
  color: var(--panel-ink);
  text-decoration: none;
  border-bottom: 1px dotted var(--panel-muted);
}
.nav-foot-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 6px;
}

.main {
  margin-left: var(--nav-w);
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

/* ---------- Topbar ---------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  background: rgba(247, 248, 246, 0.92);
  backdrop-filter: saturate(1.2) blur(6px);
  border-bottom: 1px solid var(--line);
  padding: var(--s4) var(--s6);
  display: flex;
  align-items: center;
  gap: var(--s4);
  flex-wrap: wrap;
}
.eyebrow {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--teal);
}
.topbar h1 {
  font-size: 21px;
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.1;
  color: var(--ink);
}
.topbar .sub {
  font-size: 12.5px;
  color: var(--slate);
}
.topbar-right {
  margin-left: auto;
  display: flex;
  gap: var(--s2);
  align-items: center;
  flex-wrap: wrap;
}

/* deadline ribbon */
.ribbon {
  background: var(--teal-d);
  color: #eafbf8;
  padding: 8px var(--s6);
  font-size: 12.5px;
  display: flex;
  gap: var(--s5);
  flex-wrap: wrap;
  align-items: center;
  position: sticky;
  top: 0;
  z-index: 29;
  border-bottom: 1px solid #07211f;
}
.ribbon .r-item {
  display: flex;
  gap: 6px;
  align-items: baseline;
}
.ribbon .r-item .k {
  color: #8fd3cb;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 600;
}
.ribbon .r-item .v {
  font-weight: 600;
}
.ribbon .r-status {
  margin-left: auto;
}

.content {
  padding: var(--s6);
  max-width: 1380px;
  width: 100%;
}
@keyframes fade {
  from {
    opacity: 0;
    transform: translateY(3px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

/* ---------- Components ---------- */
.btn {
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 600;
  padding: 8px 14px;
  border-radius: var(--r-sm);
  border: 1px solid var(--line-strong);
  background: var(--card);
  color: var(--ink-soft);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  line-height: 1.2;
  white-space: nowrap;
  transition:
    background 0.12s,
    border-color 0.12s;
}
.btn:hover {
  background: var(--slate-tint);
  border-color: var(--slate);
}
.btn-primary {
  background: var(--teal);
  border-color: var(--teal);
  color: #fff;
}
.btn-primary:hover {
  background: var(--teal-d);
  border-color: var(--teal-d);
}
.btn-danger {
  background: var(--red);
  border-color: var(--red);
  color: #fff;
}
.btn-danger:hover {
  filter: brightness(0.94);
}
.btn-ghost {
  background: transparent;
  border-color: transparent;
  color: var(--teal);
  padding: 6px 8px;
}
.btn-ghost:hover {
  background: var(--teal-tint);
}
.btn-sm {
  padding: 5px 9px;
  font-size: 12px;
}
.btn[disabled] {
  opacity: 0.5;
  cursor: not-allowed;
}
.btn:focus-visible {
  outline: 2px solid var(--teal);
  outline-offset: 2px;
}

.clock-actor {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  margin: 5px 0 3px;
  color: var(--slate);
  font-size: 12px;
  font-weight: 650;
  line-height: 1.25;
}
.clock-actor i {
  color: var(--teal);
}
.clock-actor strong {
  color: var(--ink-soft);
  font-weight: 750;
}

.recent-job-chips {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s2);
}
.recent-job-chip {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 3px;
  min-width: 168px;
  max-width: 240px;
  min-height: 54px;
  padding: 7px 10px;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-sm);
  background: var(--card);
  color: var(--ink-soft);
  text-decoration: none;
  transition:
    background 0.12s,
    border-color 0.12s,
    transform 0.12s;
}
.recent-job-chip:hover {
  background: var(--slate-tint);
  border-color: var(--slate);
  transform: translateY(-1px);
}
.recent-job-chip__main {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 13px;
  font-weight: 750;
  line-height: 1.1;
}
.recent-job-chip__meta {
  display: flex;
  align-items: center;
  gap: 6px;
  max-width: 100%;
  color: var(--slate);
  font-size: 11px;
  font-weight: 650;
  line-height: 1.2;
}
.recent-job-chip__meta > span:first-child {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.recent-job-chip__id {
  flex: 0 0 auto;
  color: var(--teal-d);
  font-family: var(--mono);
  font-size: 10.5px;
}
.recent-job-chip:focus-visible {
  outline: 2px solid var(--teal);
  outline-offset: 2px;
}

/* Dim a balances row for a worker marked vacation-ineligible. */
tr.row-muted td {
  opacity: 0.55;
}
tr.row-muted .pill {
  opacity: 1;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.02em;
  padding: 3px 9px 3px 8px;
  border-radius: var(--r-sm);
  border: 1px solid var(--line-strong);
  border-left-width: 3px;
  background: var(--slate-tint);
  color: var(--slate);
  text-transform: capitalize;
  white-space: nowrap;
}
.pill.teal {
  background: var(--teal-tint);
  color: var(--teal-d);
  border-left-color: var(--teal);
}
.pill.amber {
  background: var(--amber-tint);
  color: var(--amber);
  border-left-color: var(--amber);
}
.pill.red {
  background: var(--red-tint);
  color: var(--red);
  border-left-color: var(--red);
}
.pill.indigo {
  background: var(--indigo-tint);
  color: var(--indigo);
  border-left-color: var(--indigo);
}
.pill.slate {
  background: var(--slate-tint);
  color: var(--slate);
  border-left-color: var(--slate);
}

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r);
  box-shadow: var(--sh-sm);
}
.card-pad {
  padding: var(--s5);
}
.card-h {
  padding: var(--s4) var(--s5);
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  gap: var(--s3);
  flex-wrap: wrap;
}
.card-h h3 {
  font-size: 14px;
  font-weight: 700;
  letter-spacing: -0.01em;
}
.card-h .spacer {
  margin-left: auto;
}
.card-h .meta {
  font-size: 12px;
  color: var(--slate);
}

.grid {
  display: grid;
  gap: var(--s4);
}
.section-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--slate);
  margin-bottom: var(--s3);
}

/* stat tiles */
.tiles {
  display: grid;
  gap: var(--s3);
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
}
.tile {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: var(--s4);
  box-shadow: var(--sh-sm);
}
.tile .t-k {
  font-size: 11.5px;
  color: var(--slate);
  font-weight: 600;
  letter-spacing: 0.01em;
}
.tile .t-v {
  font-size: 26px;
  font-weight: 700;
  margin-top: 4px;
  line-height: 1;
}
.tile.warn {
  border-left: 3px solid var(--amber);
}
.tile.bad {
  border-left: 3px solid var(--red);
}
.tile.ok {
  border-left: 3px solid var(--teal);
}
.tile .t-v.amber {
  color: var(--amber);
}
.tile .t-v.red {
  color: var(--red);
}
.tile .t-v.teal {
  color: var(--teal-d);
}

/* Today's Activity: "Yet to Clock In" keeps its alert-style motion inside Ledger. */
.awaiting-card {
  position: relative;
  overflow: hidden;
  border-color: rgba(185, 28, 28, 0.18);
  background:
    radial-gradient(
      900px 220px at 15% -40%,
      rgba(239, 68, 68, 0.16),
      transparent 55%
    ),
    linear-gradient(135deg, #fffafa 0%, #fff6f3 100%);
  box-shadow:
    0 12px 32px rgba(185, 28, 28, 0.1),
    var(--sh-sm);
}
.awaiting-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 3px;
  background: linear-gradient(90deg, var(--red), var(--amber), var(--red));
  background-size: 200% 100%;
  animation: awaiting-scan 3.2s linear infinite;
}
.awaiting-card__head {
  position: relative;
  border-bottom: none;
  background: linear-gradient(135deg, #dc2626 0%, #b91c1c 52%, #f97316 100%);
  color: #fff;
}
.awaiting-card__head h3 {
  color: #fff;
  display: flex;
  align-items: center;
  gap: 10px;
}
.awaiting-card__emoji {
  display: inline-flex;
  font-size: 18px;
  line-height: 1;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.18));
  animation: awaiting-peek 2.4s ease-in-out infinite;
}
.awaiting-card__emoji--delay {
  animation-delay: 0.45s;
}
.awaiting-card__count {
  min-width: 40px;
  text-align: center;
  color: #fff;
  background: rgba(255, 255, 255, 0.22);
  border: 1px solid rgba(255, 255, 255, 0.42);
  border-radius: 999px;
  padding: 5px 12px;
  font-size: 13px;
  font-weight: 800;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.22);
  animation: awaiting-pulse 2.2s ease-in-out infinite;
}
.awaiting-card__body {
  background:
    radial-gradient(
      700px 180px at 50% -35%,
      rgba(249, 115, 22, 0.16),
      transparent 65%
    ),
    rgba(255, 255, 255, 0.72);
}
.emoji-frame {
  color: rgba(185, 28, 28, 0.72);
  font-size: 18px;
  letter-spacing: 7px;
  line-height: 1;
  margin: 4px 0 var(--s4);
  overflow: hidden;
  text-align: center;
  user-select: none;
  white-space: nowrap;
}
.emoji-frame-top {
  animation: awaiting-drift 3.6s ease-in-out infinite;
}
.emoji-frame-bottom {
  margin: var(--s4) 0 0;
  animation: awaiting-drift 3.6s ease-in-out infinite reverse;
}
.awaiting-workers-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
}
.worker-chip {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 64px;
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid rgba(220, 38, 38, 0.18);
  border-radius: 10px;
  padding: 11px 14px 11px 16px;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.06);
  animation: awaiting-pop 0.32s ease both;
  animation-delay: calc(var(--worker-index, 0) * 32ms);
  transition:
    transform 0.16s ease,
    box-shadow 0.16s ease,
    border-color 0.16s ease,
    background 0.16s ease;
}
.worker-chip::before {
  content: "";
  width: 6px;
  border-radius: 999px;
  background: linear-gradient(180deg, var(--red), var(--amber));
  position: absolute;
  left: 0;
  top: 11px;
  bottom: 11px;
  opacity: 0.8;
}
.worker-chip:hover {
  transform: translateY(-2px) scale(1.01);
  border-color: rgba(220, 38, 38, 0.36);
  box-shadow: 0 10px 22px rgba(185, 28, 28, 0.13);
}
.worker-info {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}
.worker-name {
  color: var(--ink);
  font-size: 13.5px;
  font-weight: 750;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.worker-dept {
  color: var(--slate);
  font-size: 11px;
  font-weight: 650;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.dismiss-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 28px;
  height: 28px;
  border: 1px solid rgba(220, 38, 38, 0.14);
  border-radius: 999px;
  background: #fff;
  color: var(--slate);
  cursor: pointer;
  transition:
    transform 0.16s ease,
    background 0.16s ease,
    border-color 0.16s ease,
    color 0.16s ease;
}
.dismiss-btn:hover {
  transform: scale(1.08);
  border-color: var(--red);
  background: var(--red);
  color: #fff;
}
.awaiting-card__helper {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: var(--s4) 0 0;
  padding-top: var(--s3);
  border-top: 1px solid rgba(220, 38, 38, 0.14);
  color: var(--slate);
  font-size: 12px;
}
.awaiting-card__helper i {
  color: var(--red);
}
.worker-chip.dismissing {
  animation: dismissFade 0.3s ease forwards;
}
@keyframes awaiting-scan {
  0% {
    background-position: 0 0;
  }
  100% {
    background-position: 200% 0;
  }
}
@keyframes awaiting-peek {
  0%,
  100% {
    transform: translateY(0) rotate(0deg);
  }
  50% {
    transform: translateY(-2px) rotate(-5deg);
  }
}
@keyframes awaiting-pulse {
  0%,
  100% {
    transform: scale(1);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.22);
  }
  50% {
    transform: scale(1.04);
    box-shadow: 0 0 0 5px rgba(255, 255, 255, 0.12);
  }
}
@keyframes awaiting-drift {
  0%,
  100% {
    transform: translateX(-6px);
  }
  50% {
    transform: translateX(10px);
  }
}
@keyframes awaiting-pop {
  0% {
    opacity: 0;
    transform: translateY(8px) scale(0.98);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}
@keyframes dismissFade {
  0% {
    opacity: 1;
    transform: scale(1);
  }
  100% {
    opacity: 0;
    transform: scale(0.88);
  }
}
@media (prefers-reduced-motion: reduce) {
  .awaiting-card::before,
  .awaiting-card__emoji,
  .awaiting-card__count,
  .emoji-frame,
  .worker-chip,
  .worker-chip.dismissing {
    animation: none;
  }
  .worker-chip:hover {
    transform: none;
  }
}

/* tables */
.tbl-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--r);
  /* Scroll-shadow affordance: edge shadows cue that the table scrolls
     sideways and fade out at each end. Applies to every table app-wide. */
  background-color: var(--card);
  background-image:
    linear-gradient(to right, var(--card) 30%, rgba(255, 255, 255, 0)),
    linear-gradient(to left, var(--card) 30%, rgba(255, 255, 255, 0)),
    radial-gradient(
      farthest-side at 0 50%,
      rgba(20, 32, 28, 0.14),
      rgba(20, 32, 28, 0)
    ),
    radial-gradient(
      farthest-side at 100% 50%,
      rgba(20, 32, 28, 0.14),
      rgba(20, 32, 28, 0)
    );
  background-position:
    left center,
    right center,
    left center,
    right center;
  background-repeat: no-repeat;
  background-size:
    40px 100%,
    40px 100%,
    14px 100%,
    14px 100%;
  background-attachment: local, local, scroll, scroll;
}
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12.5px;
  min-width: 560px;
}
thead th {
  position: sticky;
  top: 0;
  background: #f1f3f0;
  color: var(--slate);
  font-size: 10.5px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-weight: 700;
  text-align: left;
  padding: 9px var(--s3);
  border-bottom: 1px solid var(--line-strong);
  white-space: nowrap;
}
tbody td {
  padding: 8px var(--s3);
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
  color: var(--ink-soft);
}
tbody tr:last-child td {
  border-bottom: 0;
}
td.num,
th.num {
  text-align: right;
}
tbody tr:hover {
  background: #fafbfa;
}
tr.row-bad td {
  background: var(--red-tint);
}
tr.row-bad:hover td {
  background: #f6dcdc;
}
tr.review-row {
  cursor: pointer;
}
tr.review-row:focus-visible td {
  outline: 2px solid var(--teal);
  outline-offset: -2px;
}
tr.row-warn td {
  background: var(--amber-tint);
}
tr.row-warn:hover td {
  background: #f6e6cf;
}
.colrule td {
  border-right: 1px solid var(--line);
}

/* forms */
.field {
  display: flex;
  flex-direction: column;
  gap: 5px;
  margin-bottom: var(--s3);
}
.field label {
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-soft);
}
.input,
select.input,
textarea.input {
  font-family: var(--sans);
  font-size: 13px;
  color: var(--ink);
  padding: 8px 10px;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-sm);
  background: var(--card);
  width: 100%;
}
.input:focus,
select.input:focus,
textarea.input:focus {
  outline: 2px solid var(--teal);
  outline-offset: -1px;
  border-color: var(--teal);
}
/* Consistent keyboard focus ring across interactive elements (app-wide).
   :focus-visible shows for keyboard nav only, not mouse clicks. */
a:focus-visible,
button:focus-visible,
.btn:focus-visible,
summary:focus-visible,
[tabindex]:focus-visible {
  outline: 2px solid var(--teal);
  outline-offset: 2px;
}
.input.mono {
  font-family: var(--mono);
}
.form-grid {
  display: grid;
  gap: var(--s3);
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}
.hint {
  font-size: 11.5px;
  color: var(--slate);
}
.shift-note-form .section-label {
  margin-bottom: var(--s1);
}
.shift-note-form__hint {
  margin: 0 0 var(--s2);
}

/* collapsible */
details.collapse {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r);
  box-shadow: var(--sh-sm);
  margin-top: var(--s4);
}
details.collapse > summary {
  list-style: none;
  cursor: pointer;
  padding: var(--s4) var(--s5);
  font-size: 14px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 10px;
}
details.collapse > summary::-webkit-details-marker {
  display: none;
}
details.collapse > summary::before {
  content: "+";
  font-family: var(--mono);
  color: var(--teal);
  font-weight: 700;
  font-size: 16px;
  width: 14px;
}
details.collapse[open] > summary::before {
  content: "–";
}
details.collapse > summary .meta {
  margin-left: auto;
  font-size: 12px;
  font-weight: 500;
  color: var(--slate);
}
.collapse-body {
  padding: 0 var(--s5) var(--s5);
  border-top: 1px solid var(--line);
}

/* cadence chips */
.cadence {
  display: flex;
  gap: var(--s3);
  flex-wrap: wrap;
}
.chip {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 10px var(--s4);
  min-width: 130px;
  box-shadow: var(--sh-sm);
}
.chip .c-v {
  font-weight: 700;
  font-size: 14px;
}
.chip .c-k {
  font-size: 11px;
  color: var(--slate);
  margin-top: 2px;
}
.chip.accent {
  border-left: 3px solid var(--teal);
}

/* worker roster chips */
.roster {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s3);
}
.wchip {
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 10px var(--s3);
  background: var(--card);
  min-width: 210px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  box-shadow: var(--sh-sm);
}
.wchip .wn {
  font-weight: 600;
  font-size: 13px;
}
.wchip .wa {
  display: flex;
  gap: 6px;
  align-items: center;
  flex-wrap: wrap;
}
.gear {
  width: 26px;
  height: 26px;
  border-radius: var(--r-sm);
  border: 1px solid var(--line-strong);
  background: var(--card);
  cursor: pointer;
  font-size: 13px;
}
.gear:hover {
  background: var(--slate-tint);
}

.toggle {
  position: relative;
  width: 34px;
  height: 19px;
  background: var(--line-strong);
  border-radius: 999px;
  cursor: pointer;
  flex: 0 0 auto;
  transition: background 0.15s;
}
.toggle::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  background: #fff;
  transition: left 0.15s;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}
.toggle.on {
  background: var(--teal);
}
.toggle.on::after {
  left: 17px;
}

/* two & three col */
.cols-2 {
  display: grid;
  gap: var(--s4);
  grid-template-columns: 1fr 1fr;
}
.cols-3 {
  display: grid;
  gap: var(--s4);
  grid-template-columns: minmax(220px, 1.05fr) minmax(0, 1.7fr) minmax(
      240px,
      1fr
    );
}
/* let tracks shrink so the wide timecard table scrolls inside .tbl-wrap
   instead of blowing the grid out (and clipping the drawer) */
.cols-3 > * {
  min-width: 0;
}
/* mid-range: drop the drawer full-width below the two main columns before it gets cramped */
@media (max-width: 1280px) {
  .cols-3 {
    grid-template-columns: minmax(220px, 300px) minmax(0, 1fr);
  }
  .cols-3 > .drawer {
    grid-column: 1 / -1;
    position: static;
    top: auto;
  }
}
@media (max-width: 1100px) {
  .cols-2 {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 900px) {
  .cols-3 {
    grid-template-columns: 1fr;
  }
}

.stack {
  display: flex;
  flex-direction: column;
  gap: var(--s4);
}
.row-between {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s3);
  flex-wrap: wrap;
}

/* week band */
.weekband {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 6px;
}
.daycell {
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  padding: 8px 6px;
  text-align: center;
  background: #fcfdfc;
}
.daycell .dn {
  font-size: 10px;
  color: var(--slate);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 600;
}
.daycell .dh {
  font-family: var(--mono);
  font-weight: 600;
  font-size: 14px;
  margin-top: 3px;
}
.daycell.issue {
  background: var(--red-tint);
  border-color: #e9b9b9;
}
.daycell.issue .dh {
  color: var(--red);
}

/* paycards list */
.filters {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: var(--s3);
}
.fchip {
  font-size: 12px;
  font-weight: 600;
  padding: 5px 10px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: var(--card);
  cursor: pointer;
  color: var(--slate);
}
.fchip.active {
  background: var(--ink);
  color: #fff;
  border-color: var(--ink);
}
.paycard {
  border: 1px solid var(--line);
  border-left-width: 4px;
  border-radius: var(--r-sm);
  padding: 10px var(--s3);
  background: var(--card);
  cursor: pointer;
  margin-bottom: 8px;
  box-shadow: var(--sh-sm);
}
.paycard:hover {
  border-color: var(--slate);
}
.paycard.sel {
  box-shadow: 0 0 0 2px var(--teal);
  border-left-color: var(--teal);
}
.paycard.lv-bad {
  border-left-color: var(--red);
  background: var(--red-tint);
}
.paycard.lv-setup {
  border-left-color: var(--amber);
  background: var(--amber-tint);
}
.paycard.lv-clean {
  border-left-color: var(--teal);
}
.paycard.lv-appr {
  border-left-color: var(--slate);
  opacity: 0.85;
}
.paycard .pc-top {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  align-items: baseline;
}
.paycard .pc-n {
  font-weight: 600;
  font-size: 13px;
}
.paycard .pc-meta {
  font-size: 11.5px;
  color: var(--slate);
  margin-top: 2px;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.drawer {
  position: sticky;
  top: 120px;
  align-self: start;
}
.tabs {
  display: flex;
  gap: 2px;
  border-bottom: 1px solid var(--line);
  margin-bottom: var(--s4);
}
.tab {
  font-size: 13px;
  font-weight: 600;
  padding: 8px 12px;
  border: 0;
  background: transparent;
  cursor: pointer;
  color: var(--slate);
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
}
.tab.active {
  color: var(--teal-d);
  border-bottom-color: var(--teal);
}
.tabpane {
  display: none;
}
.tabpane.active {
  display: block;
}

.blockers {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.blockers li {
  font-size: 12.5px;
  padding: 7px 10px;
  border-radius: var(--r-sm);
  border: 1px solid var(--line);
  border-left-width: 3px;
  display: flex;
  gap: 8px;
}
.blockers li.warn {
  border-left-color: var(--amber);
  background: var(--amber-tint);
  color: var(--amber);
}
.blockers li.bad {
  border-left-color: var(--red);
  background: var(--red-tint);
  color: var(--red);
}
.blockers li.ok {
  border-left-color: var(--teal);
  background: var(--teal-tint);
  color: var(--teal-d);
}

.check {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  color: var(--ink-soft);
}
.check input {
  width: 16px;
  height: 16px;
  accent-color: var(--teal);
}

/* job board */
.jobgrid {
  display: grid;
  gap: var(--s4);
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
}
.jobcard {
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: var(--card);
  padding: var(--s4);
  box-shadow: var(--sh-sm);
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.jobcard .jc-im {
  font-family: var(--mono);
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.01em;
}
.jobcard .jc-gc {
  font-weight: 600;
  font-size: 13px;
}
.jobcard .jc-scope {
  font-size: 12.5px;
  color: var(--slate);
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}
.jobcard .jc-meta {
  font-size: 11.5px;
  color: var(--slate);
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.jobcard .jc-actions {
  display: flex;
  gap: 6px;
  margin-top: auto;
  padding-top: 6px;
  flex-wrap: wrap;
}
.src {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 2px 7px;
  border-radius: var(--r-sm);
  border: 1px solid var(--line-strong);
}
.src.dv {
  background: var(--teal-tint);
  color: var(--teal-d);
  border-color: #a9d8d2;
}
.src.fb {
  background: var(--amber-tint);
  color: var(--amber);
  border-color: #e7c99b;
}
.src.mn {
  background: var(--slate-tint);
  color: var(--slate);
  border-color: var(--line-strong);
}
.src.pf {
  background: var(--indigo-tint);
  color: var(--indigo);
  border-color: #c3bef2;
}

.board-section {
  margin-bottom: var(--s6);
}
.board-section .bs-head {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-bottom: var(--s3);
}
.board-section .bs-head h3 {
  font-size: 15px;
  font-weight: 700;
}
.board-section .bs-head .bs-sub {
  font-size: 12px;
  color: var(--slate);
}
.count {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 600;
  background: var(--slate-tint);
  color: var(--slate);
  padding: 1px 8px;
  border-radius: 999px;
}

/* admin tools row */
.toolrow {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.toolrow a {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--teal-d);
  background: var(--teal-tint);
  border: 1px solid #b7dcd6;
  padding: 5px 10px;
  border-radius: 999px;
  text-decoration: none;
}
.toolrow a:hover {
  background: #cfe9e5;
}
.toplinks {
  display: flex;
  gap: var(--s4);
  flex-wrap: wrap;
  align-items: center;
}
.toplinks a {
  font-size: 13px;
  color: var(--ink-soft);
  text-decoration: none;
  font-weight: 500;
}
.toplinks a:hover {
  color: var(--teal-d);
}
.badge-count {
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 700;
  background: var(--red);
  color: #fff;
  border-radius: 999px;
  padding: 1px 6px;
  margin-left: 4px;
}

/* action grid (manage shifts) */
.action-grid {
  display: grid;
  gap: var(--s3);
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
}
.action-tile {
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: var(--card);
  padding: var(--s4);
  box-shadow: var(--sh-sm);
  text-decoration: none;
  color: var(--ink);
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.action-tile:hover {
  border-color: var(--teal);
  box-shadow: var(--sh);
}
.action-tile .at-t {
  font-weight: 700;
  font-size: 13.5px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.action-tile .at-d {
  font-size: 11.5px;
  color: var(--slate);
}

/* QA checklist cards */
.qa-grid {
  display: grid;
  gap: var(--s3);
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
}
.qa-card {
  border: 1px solid var(--line);
  border-left: 3px solid var(--teal);
  border-radius: var(--r);
  background: var(--card);
  padding: var(--s3) var(--s4);
  box-shadow: var(--sh-sm);
}
.qa-card .qa-t {
  font-weight: 600;
  font-size: 12.5px;
  display: flex;
  gap: 8px;
  align-items: center;
}
.qa-card .qa-s {
  font-size: 11.5px;
  color: var(--slate);
  margin-top: 3px;
}

/* ===================== KIOSK ===================== */
.kiosk {
  position: relative;
  background: var(--kiosk-bg);
  color: var(--kiosk-ink);
  min-height: 100vh;
  font-family: var(--sans);
  /* Kill the browser's double-tap-to-zoom on rapid PIN/button taps (keeps
     pinch-zoom available). Targets the whole kiosk surface. */
  touch-action: manipulation;
}
/* Foreground content sits above the animated backdrop. */
.kiosk > *:not(.kiosk-bg) {
  position: relative;
  z-index: 1;
}

/* ---- Island/ocean animated backdrop (Lagoon aurora + Twinkle Tide glints) ----
   GPU-cheap (transform/opacity only), calm, and fixed behind a scrim so the
   clock card and buttons stay fully legible. Honors prefers-reduced-motion. */
.kiosk-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
  background: linear-gradient(160deg, #04141f, #062436 60%, #073246);
}
.kbg-glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(70px);
  opacity: 0.5;
  mix-blend-mode: screen;
}
.kbg-glow-1 {
  width: 46vw;
  height: 46vw;
  left: -8%;
  top: -18%;
  background: #15c2b0;
  animation: kbg-drift1 20s ease-in-out infinite;
}
.kbg-glow-2 {
  width: 40vw;
  height: 40vw;
  right: -6%;
  top: 8%;
  background: #0e7d8f;
  animation: kbg-drift2 26s ease-in-out infinite;
}
.kbg-glow-3 {
  width: 52vw;
  height: 34vw;
  left: 24%;
  bottom: -24%;
  background: #1e9e7e;
  animation: kbg-drift3 30s ease-in-out infinite;
}
@keyframes kbg-drift1 {
  0%,
  100% {
    transform: translate(0, 0) scale(1);
  }
  50% {
    transform: translate(6vw, 4vh) scale(1.12);
  }
}
@keyframes kbg-drift2 {
  0%,
  100% {
    transform: translate(0, 0) scale(1);
  }
  50% {
    transform: translate(-5vw, 5vh) scale(1.08);
  }
}
@keyframes kbg-drift3 {
  0%,
  100% {
    transform: translate(0, 0) scale(1);
  }
  50% {
    transform: translate(4vw, -4vh) scale(1.15);
  }
}
.kbg-glints {
  position: absolute;
  top: 0;
  left: 0;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: #cffcf4;
  box-shadow:
    80px 120px #cffcf4,
    240px 300px #9fe9ff,
    430px 90px #cffcf4,
    600px 360px #bdfff5,
    760px 180px #9fe9ff,
    940px 420px #cffcf4,
    1120px 140px #bdfff5,
    180px 480px #9fe9ff,
    520px 520px #cffcf4,
    880px 560px #bdfff5,
    1240px 360px #9fe9ff,
    320px 660px #cffcf4,
    680px 700px #bdfff5,
    1040px 640px #9fe9ff,
    1300px 600px #cffcf4,
    140px 760px #bdfff5;
  animation: kbg-twinkle 3.4s ease-in-out infinite;
}
.kbg-glints-2 {
  box-shadow:
    160px 200px #bdfff5,
    360px 440px #cffcf4,
    560px 110px #9fe9ff,
    720px 540px #cffcf4,
    900px 260px #bdfff5,
    1080px 480px #9fe9ff,
    1280px 200px #cffcf4,
    260px 560px #bdfff5,
    460px 700px #9fe9ff,
    820px 680px #cffcf4,
    1180px 720px #bdfff5,
    1340px 460px #9fe9ff;
  animation: kbg-twinkle 5s ease-in-out infinite 0.9s;
}
@keyframes kbg-twinkle {
  0%,
  100% {
    opacity: 0.22;
  }
  50% {
    opacity: 1;
  }
}
.kbg-sheen {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    110deg,
    transparent 32%,
    rgba(120, 230, 220, 0.08) 50%,
    transparent 68%
  );
  animation: kbg-sheen 11s linear infinite;
}
@keyframes kbg-sheen {
  0% {
    transform: translateX(-32%);
  }
  100% {
    transform: translateX(32%);
  }
}
@media (prefers-reduced-motion: reduce) {
  .kbg-glow,
  .kbg-glints,
  .kbg-sheen {
    animation: none !important;
  }
}

/* ---- Sunrise theme (Island Dusk): warm horizon + glowing sun + rising spray.
   Toggled per-tablet via html[data-kiosk-theme="sunrise"]. The sunrise layer
   (.kbg-sun/.kbg-spray) is hidden by default; the ocean layer is hidden when
   the sunrise theme is active. GPU-cheap (transform/opacity/filter only). */
.kbg-sun,
.kbg-spray {
  display: none;
}
html[data-kiosk-theme="sunrise"] .kiosk-bg {
  background: linear-gradient(
    180deg,
    #10243a 0%,
    #1c3b54 38%,
    #7a5b6e 66%,
    #e08a4e 84%,
    #f2b06a 100%
  );
  animation: kbg-dusk 24s ease-in-out infinite;
}
html[data-kiosk-theme="sunrise"] .kbg-glow,
html[data-kiosk-theme="sunrise"] .kbg-glints,
html[data-kiosk-theme="sunrise"] .kbg-sheen {
  display: none;
}
html[data-kiosk-theme="sunrise"] .kbg-sun,
html[data-kiosk-theme="sunrise"] .kbg-spray {
  display: block;
}
@keyframes kbg-dusk {
  0%,
  100% {
    filter: hue-rotate(0deg) saturate(1);
  }
  50% {
    filter: hue-rotate(-12deg) saturate(1.12);
  }
}
.kbg-sun {
  position: absolute;
  left: 50%;
  bottom: -10%;
  width: min(46vw, 420px);
  height: min(46vw, 420px);
  transform: translateX(-50%);
  border-radius: 50%;
  background: radial-gradient(circle, #ffd9a3, #f2a65a 55%, transparent 70%);
  filter: blur(8px);
  opacity: 0.85;
}
.kbg-spray {
  position: absolute;
  left: 0;
  bottom: 0;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #ffe9cf;
  opacity: 0.7;
  box-shadow:
    6vw 0 #ffe9cf,
    18vw 0 #ffd9a3,
    31vw 0 #ffe9cf,
    44vw 0 #ffd9a3,
    57vw 0 #ffe9cf,
    69vw 0 #ffd9a3,
    82vw 0 #ffe9cf,
    94vw 0 #ffd9a3;
  animation: kbg-rise 7s linear infinite;
}
@keyframes kbg-rise {
  0% {
    transform: translateY(0);
    opacity: 0;
  }
  12% {
    opacity: 0.7;
  }
  100% {
    transform: translateY(-46vh);
    opacity: 0;
  }
}
@media (prefers-reduced-motion: reduce) {
  html[data-kiosk-theme="sunrise"] .kiosk-bg,
  .kbg-spray {
    animation: none !important;
  }
}

/* Discreet backdrop theme toggle, present on every kiosk screen.
   Selector is scoped as a direct child of .kiosk so it outranks the
   `.kiosk > *:not(.kiosk-bg)` foreground rule (which would otherwise force
   position:relative/z-index:1 and drop the button into normal flow). */
.kiosk > .kiosk-theme-toggle {
  position: fixed;
  left: 14px;
  bottom: 14px;
  z-index: 3;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(5, 12, 20, 0.5);
  color: #cfe9ff;
  font-size: 15px;
  cursor: pointer;
  backdrop-filter: blur(6px);
  opacity: 0.55;
  transition:
    opacity 0.18s ease,
    transform 0.18s ease;
}
.kiosk-theme-toggle:hover,
.kiosk-theme-toggle:focus-visible {
  opacity: 1;
  transform: translateY(-1px);
}
.kiosk-theme-toggle [data-theme-icon] {
  display: none;
}
html[data-kiosk-theme="ocean"] .kiosk-theme-toggle [data-theme-icon="ocean"],
html[data-kiosk-theme="sunrise"]
  .kiosk-theme-toggle
  [data-theme-icon="sunrise"] {
  display: inline;
}
.kiosk-topbar {
  display: flex;
  align-items: center;
  gap: var(--s4);
  padding: var(--s4) var(--s6);
  border-bottom: 1px solid rgba(46, 230, 207, 0.18);
  background: rgba(6, 20, 30, 0.5);
  -webkit-backdrop-filter: blur(16px) saturate(1.2);
  backdrop-filter: blur(16px) saturate(1.2);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.04) inset;
}
.kiosk-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}
.kiosk-brand .kb-lock {
  background: #f4eee2;
  border-radius: 8px;
  padding: 6px 10px;
}
.kiosk-brand .kb-lock img {
  height: 34px;
  display: block;
}
.kiosk-brand .kb-title {
  font-weight: 700;
  font-size: 16px;
  letter-spacing: 0.02em;
  white-space: nowrap;
}
.kiosk-admin {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 600;
  color: #cfe3f0;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.06);
  border-radius: var(--r-sm);
  padding: 8px 14px;
  cursor: pointer;
  transition:
    color 0.15s ease,
    background 0.15s ease,
    border-color 0.15s ease;
}
.kiosk-admin:hover {
  color: #2ee6cf;
  background: rgba(46, 230, 207, 0.12);
  border-color: rgba(46, 230, 207, 0.5);
}
.kiosk-admin .lockicon {
  opacity: 0.7;
  margin-right: 5px;
}
.kiosk-actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: var(--s2);
  flex-wrap: wrap;
  justify-content: flex-end;
}
.kiosk-actions .kiosk-admin {
  margin-left: 0;
}
.kiosk-wrap {
  max-width: 520px;
  margin: 0 auto;
  padding: var(--s7) var(--s5);
  text-align: center;
}
.kiosk-wrap.wide {
  max-width: 1100px;
  text-align: left;
}
.kiosk-kicker {
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--kiosk-teal);
  font-weight: 700;
}
.kiosk h1 {
  font-size: 34px;
  font-weight: 700;
  margin: 8px 0 6px;
  letter-spacing: -0.01em;
}
.kiosk .ksub {
  color: var(--kiosk-muted);
  font-size: 15px;
  margin-bottom: var(--s6);
}
.kshift-hero {
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) minmax(142px, 164px);
  align-items: center;
  gap: var(--s4);
  overflow: hidden;
  background:
    radial-gradient(
      circle at 14% 50%,
      rgba(31, 209, 190, 0.24),
      transparent 30%
    ),
    linear-gradient(135deg, rgba(17, 27, 46, 0.98), rgba(10, 79, 73, 0.72));
  border: 1px solid rgba(31, 209, 190, 0.42);
  border-radius: var(--r-lg);
  padding: var(--s5);
  margin: var(--s5) 0 var(--s4);
  box-shadow:
    0 0 0 1px rgba(31, 209, 190, 0.08) inset,
    0 18px 44px rgba(0, 0, 0, 0.32);
}
.kshift-hero.just-started::after {
  content: "";
  position: absolute;
  inset: -2px;
  border-radius: inherit;
  border: 2px solid rgba(31, 209, 190, 0.34);
  animation: kshift-confirm-ring 1.4s ease-out 0s 2;
  pointer-events: none;
}
.kshift-pulse {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: linear-gradient(180deg, #31d1be 0%, #0f766e 100%);
  color: #032b27;
  font-size: 24px;
  box-shadow:
    0 0 0 7px rgba(31, 209, 190, 0.14),
    0 8px 18px rgba(0, 0, 0, 0.3);
}
.kshift-kicker {
  color: #8ff2e7;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.kshift-title {
  font-family: var(--mono);
  font-size: clamp(32px, 5vw, 48px);
  line-height: 0.98;
  font-weight: 800;
  margin-top: 4px;
}
.kshift-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  margin-top: 6px;
  color: #d4e3ee;
  font-size: 16px;
  font-weight: 650;
}
.kshift-meta span:not(:last-child)::after {
  content: "";
}
.kshift-return {
  max-width: 560px;
  margin-top: 10px;
  color: #e8fffb;
  font-size: 15.5px;
  font-weight: 780;
}
.kshift-return-note {
  display: block;
  color: #a8d8d1;
  font-size: 14px;
  font-weight: 650;
  margin-top: 2px;
}
.kshift-return-track {
  height: 5px;
  width: min(100%, 420px);
  margin-top: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(232, 238, 247, 0.16);
}
.kshift-return-track span {
  display: block;
  height: 100%;
  width: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #8ff2e7, #31d1be);
  transition: width 0.26s linear;
}
.kshift-hero.staying .kshift-return-track {
  display: none;
}
.kshift-actions {
  align-self: center;
  display: grid;
  gap: var(--s2);
  min-width: 148px;
}
.kshift-countdown {
  display: grid;
  place-items: center;
  gap: 3px;
  min-height: 64px;
  padding: 8px 10px;
  border-radius: var(--r);
  background: #f6fffd;
  color: #063d37;
  border: 2px solid #8ff2e7;
  box-shadow:
    0 0 0 7px rgba(143, 242, 231, 0.18),
    0 12px 22px rgba(0, 0, 0, 0.24);
}
.kshift-countdown-label {
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #0f766e;
}
.kshift-countdown strong {
  font-family: var(--mono);
  font-size: 34px;
  line-height: 0.94;
  font-weight: 900;
}
.kshift-hero.just-started .kshift-countdown {
  animation: kshift-countdown-pop 1.2s ease-in-out infinite alternate;
}
.kshift-done {
  align-self: stretch;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  min-width: 0;
  border: 1px solid rgba(232, 238, 247, 0.22);
  border-radius: var(--r);
  background: rgba(232, 238, 247, 0.08);
  color: var(--kiosk-ink);
  font-weight: 800;
  padding: var(--s3) var(--s4);
  text-align: center;
}
.kshift-done:hover {
  border-color: rgba(232, 238, 247, 0.45);
  background: rgba(232, 238, 247, 0.14);
}
.kshift-stay {
  min-height: 40px;
  border: 1px solid rgba(31, 209, 190, 0.5);
  border-radius: var(--r);
  background: rgba(31, 209, 190, 0.16);
  color: #dffdfa;
  font-family: var(--sans);
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
}
.kshift-stay:hover:not(:disabled) {
  background: rgba(31, 209, 190, 0.24);
}
.kshift-stay:disabled {
  cursor: default;
  opacity: 0.72;
}
@keyframes kshift-confirm-ring {
  0% {
    opacity: 0.9;
    transform: scale(0.985);
  }
  100% {
    opacity: 0;
    transform: scale(1.035);
  }
}
@keyframes kshift-countdown-pop {
  0% {
    transform: translateY(0) scale(1);
    box-shadow:
      0 0 0 7px rgba(143, 242, 231, 0.18),
      0 12px 22px rgba(0, 0, 0, 0.24);
  }
  100% {
    transform: translateY(-1px) scale(1.01);
    box-shadow:
      0 0 0 9px rgba(143, 242, 231, 0.2),
      0 14px 26px rgba(0, 0, 0, 0.28);
  }
}
.pin-display {
  background: var(--kiosk-card);
  border: 1px solid var(--kiosk-line);
  border-radius: var(--r-lg);
  height: 74px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin-bottom: 8px;
  font-family: var(--mono);
  font-size: 34px;
  color: var(--kiosk-muted);
  letter-spacing: 0.1em;
}
.pin-dot {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #e3b23c;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.35);
}
.pin-err {
  color: var(--kiosk-amber);
  font-size: 14px;
  font-weight: 600;
  min-height: 20px;
  margin-bottom: var(--s4);
}
.keypad {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}
/* tactile "physical" keys (ported from Workshop): warm sand caps with a raised bottom lip that depresses on press */
.key {
  background: linear-gradient(180deg, #fbf3e0 0%, #ead9b6 100%);
  color: #22303a;
  border: 1px solid #c9b488;
  border-radius: var(--r-lg);
  font-family: var(--mono);
  font-size: 30px;
  font-weight: 700;
  height: 86px;
  cursor: pointer;
  touch-action: manipulation;
  -webkit-user-select: none;
  user-select: none;
  box-shadow:
    0 5px 0 #b89b63,
    0 8px 14px rgba(0, 0, 0, 0.35);
  transition:
    transform 0.05s ease,
    box-shadow 0.05s ease,
    filter 0.1s ease;
}
.key:hover {
  filter: brightness(1.02);
}
.key:active {
  transform: translateY(4px);
  box-shadow:
    0 1px 0 #b89b63,
    0 3px 6px rgba(0, 0, 0, 0.3);
}
.key.alt {
  background: linear-gradient(180deg, #28384f 0%, #1b2740 100%);
  color: #d6e2f2;
  border-color: #33425c;
  font-family: var(--sans);
  font-size: 20px;
  box-shadow:
    0 5px 0 #101a2c,
    0 8px 14px rgba(0, 0, 0, 0.35);
}
.key.alt:active {
  transform: translateY(4px);
  box-shadow:
    0 1px 0 #101a2c,
    0 3px 6px rgba(0, 0, 0, 0.3);
}
.key.go {
  background: linear-gradient(180deg, #17a99a 0%, #0f766e 100%);
  color: #04201c;
  border-color: #0b5a53;
  font-size: 28px;
  box-shadow:
    0 5px 0 #0a4f49,
    0 8px 14px rgba(0, 0, 0, 0.35);
}
.key.go:active {
  transform: translateY(4px);
  box-shadow:
    0 1px 0 #0a4f49,
    0 3px 6px rgba(0, 0, 0, 0.3);
}

.kiosk-grid2 {
  display: grid;
  grid-template-columns: 1.7fr 1fr;
  gap: var(--s5);
}
@media (max-width: 900px) {
  .kiosk-grid2 {
    grid-template-columns: 1fr;
  }
}
.ksection {
  background: var(--kiosk-card);
  border: 1px solid var(--kiosk-line);
  border-radius: var(--r-lg);
  padding: var(--s5);
  margin-bottom: var(--s4);
}
.ksection h3 {
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--kiosk-muted);
  margin-bottom: var(--s4);
  font-weight: 700;
}
.jobbtns {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: var(--s3);
}
.jobbtn {
  background: linear-gradient(180deg, #fbf3e0 0%, #ecdcbc 100%);
  border: 1px solid #c9b488;
  border-radius: var(--r);
  padding: var(--s4);
  text-align: center;
  cursor: pointer;
  box-shadow:
    0 4px 0 #c2a972,
    0 6px 12px rgba(0, 0, 0, 0.28);
  transition:
    transform 0.05s ease,
    box-shadow 0.05s ease,
    filter 0.1s ease;
}
.jobbtn:hover {
  filter: brightness(1.02);
}
.jobbtn:active {
  transform: translateY(3px);
  box-shadow:
    0 1px 0 #c2a972,
    0 2px 6px rgba(0, 0, 0, 0.25);
}
.jobbtn .jb-im {
  font-family: var(--mono);
  font-size: 24px;
  font-weight: 700;
  color: #0b5a53;
}
.jobbtn .jb-gc {
  font-size: 12.5px;
  color: #6b5a3e;
  margin-top: 4px;
}
.lunch-resume {
  border-color: rgba(22, 184, 166, 0.4);
  background: var(--kiosk-card);
}
/* The resume button is the primary action on return from lunch: a filled,
   brand-teal CTA with a play affordance so it reads as "tap to clock back in"
   and clearly outranks the warm "Recently worked" buttons below it. */
.lunch-resume .jobbtn {
  width: 100%;
  display: flex;
  align-items: center;
  gap: var(--s4);
  text-align: left;
  background: linear-gradient(180deg, #1ecbb6 0%, #119a89 100%);
  border-color: #0c8576;
  box-shadow:
    0 4px 0 #0a6a5f,
    0 10px 18px rgba(0, 0, 0, 0.35);
}
.lunch-resume .jobbtn:active {
  transform: translateY(3px);
  box-shadow:
    0 1px 0 #0a6a5f,
    0 2px 6px rgba(0, 0, 0, 0.3);
}
.lunch-resume .jb-play {
  flex: none;
  width: 52px;
  height: 52px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
  font-size: 18px;
}
.lunch-resume .jb-body {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}
.lunch-resume .jb-eyebrow {
  align-self: flex-start;
  border-radius: 999px;
  padding: 3px 9px;
  background: rgba(255, 255, 255, 0.22);
  color: #eafffb;
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}
.lunch-resume .jb-im {
  color: #fff;
  font-size: 22px;
}
.lunch-resume .jb-gc {
  color: rgba(255, 255, 255, 0.85);
  margin-top: 0;
}
.lunch-resume .jb-note {
  color: rgba(255, 255, 255, 0.92);
  font-size: 12px;
  font-weight: 700;
}
.kfield {
  margin-bottom: var(--s3);
}
.kfield label {
  display: block;
  font-size: 13px;
  color: var(--kiosk-muted);
  font-weight: 600;
  margin-bottom: 6px;
}
.kinput {
  width: 100%;
  background: var(--kiosk-bg);
  border: 1px solid var(--kiosk-line);
  border-radius: var(--r);
  color: var(--kiosk-ink);
  font-size: 18px;
  padding: 14px;
  font-family: var(--mono);
}
.kbtn {
  font-size: 18px;
  font-weight: 700;
  padding: 16px 22px;
  border-radius: var(--r);
  border: 1px solid transparent;
  cursor: pointer;
  width: 100%;
  transition:
    transform 0.05s ease,
    box-shadow 0.05s ease,
    filter 0.1s ease;
}
.kbtn:hover {
  filter: brightness(1.03);
}
.kbtn:active {
  transform: translateY(4px);
}
.kbtn-teal {
  background: linear-gradient(180deg, #17a99a 0%, #0f766e 100%);
  color: #04201c;
  border-color: #0b5a53;
  box-shadow:
    0 5px 0 #0a4f49,
    0 8px 16px rgba(0, 0, 0, 0.3);
}
.kbtn-teal:active {
  box-shadow:
    0 1px 0 #0a4f49,
    0 3px 8px rgba(0, 0, 0, 0.28);
}
.kbtn-amber {
  background: linear-gradient(180deg, #efa23e 0%, #d97d14 100%);
  color: #2a1602;
  border-color: #b4670f;
  box-shadow:
    0 5px 0 #95560c,
    0 8px 16px rgba(0, 0, 0, 0.3);
}
.kbtn-amber:active {
  box-shadow:
    0 1px 0 #95560c,
    0 3px 8px rgba(0, 0, 0, 0.28);
}
.kbtn-red {
  background: linear-gradient(180deg, #d83a3a 0%, #b91c1c 100%);
  color: #fff;
  border-color: #8e1414;
  box-shadow:
    0 5px 0 #7c1212,
    0 8px 16px rgba(0, 0, 0, 0.3);
}
.kbtn-red:active {
  box-shadow:
    0 1px 0 #7c1212,
    0 3px 8px rgba(0, 0, 0, 0.28);
}
.kbtn-ghost {
  background: linear-gradient(180deg, #28384f 0%, #1b2740 100%);
  color: #d6e2f2;
  border-color: #33425c;
  box-shadow:
    0 5px 0 #101a2c,
    0 8px 16px rgba(0, 0, 0, 0.3);
}
.kbtn-ghost:active {
  box-shadow:
    0 1px 0 #101a2c,
    0 3px 8px rgba(0, 0, 0, 0.28);
}
.kbtn-row {
  display: flex;
  gap: var(--s3);
  flex-wrap: wrap;
}
.kbtn-row .kbtn {
  flex: 1;
  min-width: 160px;
}

/* ---- Tablet clock-in: state-first status banner + primary actions ---- */
.clock-state {
  display: flex;
  align-items: center;
  gap: var(--s4);
  margin: var(--s5) 0 var(--s4);
  padding: var(--s5);
  border: 1px solid var(--kiosk-line);
  border-radius: var(--r-lg);
  background: var(--kiosk-card);
}
.clock-state.on {
  border-color: rgba(31, 209, 190, 0.5);
  background:
    radial-gradient(
      circle at 12% 50%,
      rgba(31, 209, 190, 0.18),
      transparent 34%
    ),
    linear-gradient(135deg, rgba(17, 27, 46, 0.98), rgba(10, 79, 73, 0.5));
}
.clock-state.off {
  background: linear-gradient(
    135deg,
    rgba(40, 56, 79, 0.55),
    var(--kiosk-card)
  );
}
.cs-dot {
  flex: 0 0 18px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--kiosk-muted);
}
.clock-state.on .cs-dot {
  background: #2ee6cf;
  animation: cs-pulse 2s ease-in-out infinite;
}
@keyframes cs-pulse {
  0%,
  100% {
    box-shadow: 0 0 0 5px rgba(46, 230, 207, 0.16);
  }
  50% {
    box-shadow: 0 0 0 12px rgba(46, 230, 207, 0.04);
  }
}
.cs-kicker {
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--kiosk-muted);
}
.clock-state.on .cs-kicker {
  color: #8ff2e7;
}
.cs-title {
  font-family: var(--mono);
  font-size: clamp(26px, 4.6vw, 42px);
  font-weight: 800;
  line-height: 1.02;
  margin-top: 4px;
  color: var(--kiosk-ink);
}
.cs-gc {
  font-family: var(--sans);
  font-size: 0.5em;
  font-weight: 700;
  color: #c6d6e6;
}
.cs-meta {
  margin-top: 7px;
  font-size: 16px;
  font-weight: 600;
  color: #c6d6e6;
}
.cs-meta a {
  color: var(--kiosk-teal);
}

.clock-primary {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--s3);
  margin-bottom: var(--s5);
}
.clock-primary .kbtn {
  min-height: 96px;
  font-size: 22px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.clock-primary .kbtn i {
  font-size: 28px;
  margin: 0;
}

.clock-picker {
  margin-bottom: var(--s4);
}
.clock-picker[hidden] {
  display: none;
}

.clock-snap {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--s3);
  margin: var(--s4) 0;
}

.clock-reference {
  overflow: hidden;
  border: 1px solid var(--kiosk-line);
  border-radius: var(--r-lg);
  background: var(--kiosk-card);
}
.clock-reference > summary {
  display: flex;
  align-items: center;
  gap: var(--s3);
  padding: var(--s4) var(--s5);
  list-style: none;
  cursor: pointer;
  font-size: 17px;
  font-weight: 700;
  color: var(--kiosk-ink);
}
.clock-reference > summary::-webkit-details-marker {
  display: none;
}
.clock-reference > summary > i {
  color: var(--kiosk-muted);
  font-size: 14px;
  transition: transform 0.15s ease;
}
.clock-reference[open] > summary > i {
  transform: rotate(-180deg);
}
.clock-reference .cr-total {
  margin-left: auto;
  font-family: var(--mono);
  font-weight: 800;
}
.clock-reference__body {
  display: grid;
  gap: var(--s4);
  padding: 0 var(--s5) var(--s5);
}
@media (max-width: 760px) {
  .clock-primary {
    grid-template-columns: 1fr;
  }
  .clock-primary .kbtn {
    min-height: 72px;
    flex-direction: row;
  }
  .clock-snap {
    grid-template-columns: 1fr 1fr;
  }
}
@media (prefers-reduced-motion: reduce) {
  .clock-state.on .cs-dot {
    animation: none;
  }
}

.kpanel-confirm {
  border-left: 4px solid var(--kiosk-teal);
  background:
    linear-gradient(135deg, rgba(22, 184, 166, 0.12), transparent 46%),
    var(--kiosk-card);
  box-shadow: 0 0 0 1px rgba(22, 184, 166, 0.12) inset;
}
.kpanel-confirm.switch {
  border-left-color: var(--kiosk-amber);
  background:
    linear-gradient(135deg, rgba(224, 138, 43, 0.16), transparent 46%),
    var(--kiosk-card);
  box-shadow: 0 0 0 1px rgba(224, 138, 43, 0.12) inset;
}
.kconfirm-head {
  display: flex;
  justify-content: space-between;
  gap: var(--s4);
  align-items: flex-start;
  margin-bottom: var(--s4);
}
.kconfirm-head h3 {
  margin-bottom: 8px;
}
.kconfirm-im {
  font-family: var(--mono);
  font-size: clamp(38px, 5vw, 58px);
  font-weight: 900;
  line-height: 0.95;
  color: var(--kiosk-ink);
}
.kconfirm-gc {
  color: #d4e3ee;
  font-size: 18px;
  font-weight: 800;
  margin-top: 8px;
}
.kconfirm-badge {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  background: rgba(22, 184, 166, 0.18);
  color: var(--kiosk-teal);
}
.kconfirm-badge.switch {
  background: rgba(224, 138, 43, 0.18);
  color: #f6b057;
}
.kpanel-fallback {
  border-left: 4px solid var(--kiosk-amber);
}
.kresolved-row {
  display: flex;
  justify-content: space-between;
  gap: var(--s4);
  padding: 8px 0;
  border-bottom: 1px solid var(--kiosk-line);
  font-size: 14px;
}
.kresolved-row .kk {
  color: var(--kiosk-muted);
}
.kresolved-row .kv {
  font-weight: 600;
  text-align: right;
}
.ksnap-tile {
  background: var(--kiosk-bg);
  border: 1px solid var(--kiosk-line);
  border-radius: var(--r);
  padding: var(--s4);
  margin-bottom: var(--s3);
}
.ksnap-tile .st-k {
  font-size: 12px;
  color: var(--kiosk-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 600;
}
.ksnap-tile .st-v {
  font-family: var(--mono);
  font-size: 26px;
  font-weight: 700;
  margin-top: 4px;
}
.ktimecard {
  padding: var(--s4);
}
.ktimecard-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--s4);
  margin-bottom: var(--s3);
}
.ktimecard-head h3 {
  margin-bottom: 4px;
}
.ktimecard-range {
  color: var(--kiosk-muted);
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 700;
}
.ktimecard-total {
  flex: 0 0 auto;
  min-width: 86px;
  text-align: right;
  color: var(--kiosk-ink);
  font-family: var(--mono);
  font-size: 24px;
  font-weight: 800;
  line-height: 1;
}
.ktimecard-days {
  display: grid;
  gap: 6px;
}
.ktimecard-day {
  min-height: 44px;
  padding: 8px 10px;
  border: 1px solid var(--kiosk-line);
  border-radius: var(--r);
  background: rgba(11, 18, 32, 0.54);
}
.ktimecard-row {
  display: grid;
  grid-template-columns: 62px minmax(0, 1fr) 70px;
  align-items: center;
  gap: 10px;
}
.ktimecard-day.today {
  border-color: rgba(22, 184, 166, 0.55);
}
.ktimecard-day.active {
  background: rgba(22, 184, 166, 0.1);
}
.ktimecard-date {
  display: grid;
  gap: 1px;
}
.ktimecard-date span {
  color: var(--kiosk-muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}
.ktimecard-date strong {
  color: var(--kiosk-ink);
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 800;
}
.ktimecard-simple {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}
.ktimecard-pair {
  min-width: 0;
}
.ktimecard-pair span {
  display: block;
  color: var(--kiosk-muted);
  font-size: 10px;
  font-weight: 850;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.ktimecard-pair strong {
  display: block;
  overflow: hidden;
  color: var(--kiosk-ink);
  font-family: var(--mono);
  font-size: 14px;
  font-weight: 850;
  text-overflow: ellipsis;
  white-space: nowrap;
  margin-top: 2px;
}
.ktimecard-pair strong.active {
  color: #8ff2e7;
}
.ktimecard-hours {
  color: var(--kiosk-ink);
  font-family: var(--mono);
  font-size: 16px;
  font-weight: 850;
  text-align: right;
}
.ktimecard-details {
  margin-top: 8px;
  padding-left: 70px;
}
.ktimecard-details summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 30px;
  padding: 5px 6px;
  border-radius: 6px;
  color: var(--kiosk-muted);
  cursor: pointer;
  font-size: 11px;
  font-weight: 800;
  list-style: none;
}
.ktimecard-details summary::-webkit-details-marker {
  display: none;
}
.ktimecard-details summary::before {
  content: "+";
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  display: inline-grid;
  place-items: center;
  border: 1px solid var(--kiosk-line);
  border-radius: 50%;
  color: var(--kiosk-teal);
  font-family: var(--mono);
  font-weight: 900;
}
.ktimecard-details[open] summary::before {
  content: "-";
}
.ktimecard-details summary:hover {
  background: rgba(232, 238, 247, 0.06);
}
.ktimecard-details summary span {
  flex: 0 0 auto;
  color: #d4e3ee;
}
.ktimecard-details summary strong {
  min-width: 0;
  overflow: hidden;
  color: var(--kiosk-muted);
  font-weight: 750;
  text-align: right;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ktimecard-punches {
  display: grid;
  gap: 4px;
  margin-top: 4px;
}
.ktimecard-punch {
  display: grid;
  grid-template-columns: minmax(58px, 0.75fr) 1fr 1fr 58px;
  align-items: center;
  gap: 6px;
  min-height: 28px;
  padding: 5px 6px;
  border-radius: 6px;
  background: rgba(232, 238, 247, 0.06);
  color: #d4e3ee;
  font-size: 11px;
  font-weight: 700;
}
.ktimecard-punch.active {
  background: rgba(22, 184, 166, 0.14);
}
.ktimecard-job {
  overflow: hidden;
  color: var(--kiosk-teal);
  font-family: var(--mono);
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ktimecard-clock {
  overflow: hidden;
  font-family: var(--mono);
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ktimecard-duration {
  color: var(--kiosk-ink);
  font-family: var(--mono);
  text-align: right;
  white-space: nowrap;
}
.kopen-shift {
  border-color: rgba(22, 184, 166, 0.42);
  box-shadow: 0 0 0 1px rgba(22, 184, 166, 0.08) inset;
}
.kopen-im {
  font-family: var(--mono);
  font-size: 36px;
  line-height: 1;
  font-weight: 800;
  color: var(--kiosk-ink);
}
.kopen-gc {
  color: #d4e3ee;
  font-size: 16px;
  font-weight: 700;
  margin-top: 8px;
}
.kopen-start {
  color: var(--kiosk-muted);
  font-size: 14px;
  margin-top: 6px;
}
.kbadge {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 999px;
}
.kbadge.on {
  background: rgba(22, 184, 166, 0.18);
  color: var(--kiosk-teal);
}
.kbadge.ready {
  background: rgba(141, 160, 188, 0.18);
  color: var(--kiosk-muted);
}
.krecent {
  font-size: 13px;
}
.krecent .kr-row {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 7px 0;
  border-bottom: 1px solid var(--kiosk-line);
}
.krecent .kr-row:last-child {
  border-bottom: 0;
}
.krecent .kr-im {
  font-family: var(--mono);
  font-weight: 600;
  color: var(--kiosk-teal);
}

/* dark page canvas while a kiosk screen is active (kills light overscroll sliver) */
html.kiosk-mode,
html.kiosk-mode body {
  background: var(--kiosk-bg);
}
/* full-bleed worker kiosk: drop the admin sidebar entirely so /tablet routes preview as a true
     standalone shop/phone view (mirrors the real minimal kiosk base template). Escape is via the
     kiosk topbar: "Switch worker" -> PIN pad, "Admin" -> back into the admin app. */
html.kiosk-mode .sidebar {
  display: none;
}
html.kiosk-mode .main {
  margin-left: 0;
}

/* Compact kiosk header: brand on top, actions as even thumb targets below. */
@media (max-width: 720px) {
  .kiosk-topbar {
    align-items: center;
    gap: var(--s3);
    padding: var(--s3) var(--s4);
  }
  .kiosk-brand {
    flex: 0 0 auto;
    gap: var(--s3);
  }
  .kiosk-brand .kb-lock {
    padding: 5px 9px;
  }
  .kiosk-brand .kb-lock img {
    height: 30px;
  }
  .kiosk-brand .kb-title {
    font-size: clamp(20px, 5vw, 27px);
    letter-spacing: 0.01em;
  }
  .kiosk-actions {
    flex: 1 1 280px;
    margin-left: 0;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--s2);
  }
  .kiosk-actions .kiosk-admin {
    min-height: 42px;
    padding: 9px 10px;
    font-size: 13px;
    line-height: 1;
    white-space: nowrap;
  }
  .kiosk-actions .kiosk-admin i {
    margin-right: 6px !important;
  }
}

/* ---- Kiosk on phones: big tappable targets, no awkward label wrapping; desktop layout untouched ---- */
@media (max-width: 560px) {
  .kiosk-topbar {
    flex-direction: column;
    align-items: stretch;
    padding: var(--s3);
  }
  .kiosk-brand {
    justify-content: center;
  }
  .kiosk-actions {
    width: 100%;
    flex-basis: auto;
  }
  .kiosk-wrap {
    padding: var(--s5) var(--s4);
  }
  .kiosk h1 {
    font-size: 27px;
  }
  .pin-display {
    height: 64px;
    font-size: 26px;
    letter-spacing: 0.04em;
    padding: 0 var(--s4);
  }
  .pin-display span:not(.pin-dot) {
    font-size: 15px;
  }
  .keypad {
    gap: 10px;
  }
  .key {
    height: 72px;
    font-size: 26px;
  }
  .kiosk-grid2 {
    gap: var(--s4);
  }
  .kshift-hero {
    grid-template-columns: 1fr;
    text-align: center;
    justify-items: center;
    padding: var(--s4);
  }
  .kshift-pulse {
    width: 58px;
    height: 58px;
    font-size: 24px;
  }
  .kshift-meta {
    justify-content: center;
    font-size: 15px;
  }
  .kshift-return {
    font-size: 16px;
  }
  .kshift-return-track {
    margin-inline: auto;
  }
  .kshift-actions {
    width: 100%;
  }
  .kshift-done {
    width: 100%;
    min-height: 52px;
  }
  .kconfirm-head {
    flex-direction: column;
  }
  .kconfirm-badge {
    align-self: flex-start;
  }
  .jobbtns {
    grid-template-columns: repeat(2, 1fr);
  }
  .lunch-resume .jb-play {
    width: 46px;
    height: 46px;
    font-size: 16px;
  }
  /* stack paired actions so the primary punch button is full-width and labels stay on one line */
  .kbtn-row {
    flex-direction: column;
  }
  .kbtn-row .kbtn {
    width: 100%;
    min-width: 0;
  }
  /* stack label/value detail rows so long scope text doesn't crowd the edge */
  .kresolved-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
  }
  .kresolved-row .kv {
    text-align: left;
  }
  .ktimecard-row {
    grid-template-columns: 54px minmax(0, 1fr) 62px;
  }
  .ktimecard-simple,
  .ktimecard-punch {
    grid-template-columns: 1fr;
  }
  .ktimecard-details {
    padding-left: 0;
  }
  .ktimecard-details summary {
    align-items: flex-start;
    flex-wrap: wrap;
  }
  .ktimecard-details summary strong {
    flex-basis: 100%;
    text-align: left;
  }
  .ktimecard-duration {
    text-align: left;
  }
}
@media (max-width: 380px) {
  .kiosk-brand .kb-lock img {
    height: 26px;
  }
  .kiosk-brand .kb-title {
    font-size: 20px;
  }
  .kiosk-actions .kiosk-admin {
    min-height: 40px;
    padding: 8px 7px;
    font-size: 12px;
  }
  .jobbtns {
    grid-template-columns: 1fr;
  }
  .pin-display {
    font-size: 22px;
  }
  .key {
    height: 66px;
    font-size: 24px;
  }
}
/* ---- Short / landscape tablets (iPad landscape ~768px tall, Fire 7 landscape ~600px tall):
          the full-size pad needs ~907px, so compress it below 900px height to fit a wall/counter
          kiosk without scrolling. Height-axis only — admin screens use width breakpoints and are
          unaffected; tall screens (iPad portrait, large monitors) keep the big premium keys. ---- */
@media (max-height: 900px) {
  .kiosk-wrap {
    padding: var(--s4) var(--s5);
  }
  .kiosk h1 {
    font-size: 24px;
    margin: 4px 0 2px;
  }
  .kiosk .ksub {
    font-size: 14px;
    margin-bottom: var(--s4);
  }
  .pin-display {
    height: 58px;
    margin: var(--s4) auto var(--s2);
  }
  .pin-err {
    min-height: 16px;
    margin-bottom: var(--s3);
  }
  .keypad {
    gap: 10px;
  }
  .key {
    height: 58px;
    font-size: 24px;
  }
  .kiosk-wrap > p.ksub {
    display: none;
  } /* drop the long PIN helper line when vertical space is tight */
}
@media (max-height: 620px) {
  .kiosk-topbar {
    padding: var(--s2) var(--s5);
  }
  .kiosk h1 {
    font-size: 21px;
  }
  .kiosk .ksub {
    margin-bottom: var(--s3);
  }
  .pin-display {
    height: 50px;
    margin: var(--s3) auto var(--s2);
  }
  .keypad {
    gap: 8px;
  }
  .key {
    height: 50px;
    font-size: 22px;
  }
}

/* metric cards (timecard) */
.metrics {
  display: grid;
  gap: var(--s3);
  grid-template-columns: repeat(4, 1fr);
}
@media (max-width: 700px) {
  .metrics {
    grid-template-columns: repeat(2, 1fr);
  }
}
.metric {
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: var(--card);
  padding: var(--s4);
  box-shadow: var(--sh-sm);
}
.metric .m-k {
  font-size: 11.5px;
  color: var(--slate);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.metric .m-v {
  font-family: var(--mono);
  font-size: 30px;
  font-weight: 700;
  margin-top: 6px;
}

.timecard-week-card {
  overflow: hidden;
}
/* Zone divider: splits "Right now" (live clock) from "Pay period review". */
.zone-head {
  display: flex;
  align-items: center;
  gap: var(--s3);
  margin: var(--s2) 0 var(--s4);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--slate);
}
.zone-head::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--line);
}
.entry-log-tag {
  margin-left: 6px;
  padding: 2px 7px;
  border-radius: 999px;
  background: var(--slate-tint);
  color: var(--slate);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.timecard-dash {
  color: var(--slate);
  margin: 0 6px;
}

/* Pay-period totals: Regular is the hero figure (the paycheck number);
   OT / PTO / Holiday / Total are supporting stats. */
.paytotals {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--s4) var(--s6);
  padding: var(--s5);
  margin-bottom: var(--s5);
}
.paytotals__hero {
  padding-right: var(--s6);
  border-right: 1px solid var(--line);
}
.paytotals__big {
  font-size: 48px;
  font-weight: 700;
  line-height: 1;
  color: var(--teal-d);
  margin-top: var(--s2);
}
.paytotals__rest {
  display: grid;
  grid-template-columns: repeat(4, auto);
  gap: var(--s4) var(--s6);
}
.paytotals__stat {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.paytotals__stat .num {
  font-size: 22px;
  font-weight: 700;
}
.paytotals__stat--ot .num {
  color: var(--amber);
}
.paytotals__total {
  padding-left: var(--s5);
  border-left: 1px solid var(--line);
}
@media (max-width: 700px) {
  .paytotals__hero {
    width: 100%;
    padding-right: 0;
    padding-bottom: var(--s4);
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
  .paytotals__rest {
    grid-template-columns: repeat(2, 1fr);
    width: 100%;
  }
  .paytotals__total {
    padding-left: 0;
    border-left: 0;
  }
}

/* Needs-review banner: surfaces exceptions at the top of the review zone
   with jump links to the offending day. Only rendered when a day is flagged. */
.review-banner {
  display: flex;
  align-items: flex-start;
  gap: var(--s3);
  margin-bottom: var(--s5);
  padding: var(--s3) var(--s4);
  border: 1px solid #e9c79a;
  border-left: 4px solid var(--amber);
  border-radius: var(--r-sm);
  background: var(--amber-tint);
  color: var(--amber);
}
.review-banner i {
  margin-top: 3px;
  font-size: 15px;
}
.review-banner strong {
  color: var(--amber);
}
.review-banner__links a {
  color: var(--amber);
  font-weight: 600;
  text-decoration: underline;
}
.review-banner__sep {
  margin: 0 6px;
  opacity: 0.5;
}

/* ---- Day accordion (week detail) ----
   Collapsed: day + in/out span + total hours + status. Expanded: per-shift
   detail. Native <details> so it works at every width with no JS. */
.day-stack {
  display: flex;
  flex-direction: column;
  gap: var(--s2);
  padding: var(--s3);
}
.day-acc {
  border: 1px solid var(--line);
  border-left: 4px solid var(--line-strong);
  border-radius: var(--r-sm);
  background: var(--card);
  overflow: hidden;
  scroll-margin-top: var(--s6);
}
.day-acc.ok {
  border-left-color: var(--teal);
}
.day-acc.review {
  border-left-color: var(--amber);
  background: var(--amber-tint);
}
.day-acc.empty {
  background: #fafbf9;
}
.day-acc__sum {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--s2) var(--s4);
  padding: var(--s3) var(--s4);
  cursor: pointer;
}
.day-acc__sum::-webkit-details-marker {
  display: none;
}
.day-acc__sum:hover {
  background: rgba(15, 118, 110, 0.04);
}
.day-acc__name {
  display: flex;
  align-items: baseline;
  gap: var(--s2);
  min-width: 124px;
  font-weight: 700;
}
.day-acc__name small {
  color: var(--slate);
  font-weight: 600;
}
.day-acc__chev {
  font-size: 12px;
  color: var(--slate);
  transition: transform 0.15s ease;
}
.day-acc[open] .day-acc__chev {
  transform: rotate(90deg);
}
.day-acc__span {
  color: var(--ink-soft);
  white-space: nowrap;
}
.day-acc__meta {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: var(--s3);
}
.day-acc__count {
  font-size: 12px;
  color: var(--slate);
}
.day-acc__hours {
  font-size: 16px;
  font-weight: 700;
}
.day-acc.ok .day-acc__hours {
  color: var(--teal-d);
}
.day-acc.review .day-acc__hours {
  color: var(--amber);
}
.day-acc__body {
  border-top: 1px solid var(--line);
  padding: var(--s2) var(--s4) var(--s3);
}
.day-acc[open] .day-acc__body {
  animation: day-acc-reveal 0.18s ease;
}
@keyframes day-acc-reveal {
  from {
    opacity: 0;
    transform: translateY(-4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
@media (prefers-reduced-motion: reduce) {
  .day-acc__chev {
    transition: none;
  }
  .day-acc[open] .day-acc__body {
    animation: none;
  }
}
.day-acc.review .day-acc__body {
  border-top-color: #e9c79a;
}
.shift-line {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: var(--s2) var(--s3);
  padding: var(--s2) 0;
  border-bottom: 1px dashed var(--line);
}
.shift-line:last-child {
  border-bottom: 0;
}
.shift-line__time {
  min-width: 150px;
  font-weight: 600;
}
.shift-line__im {
  min-width: 72px;
  color: var(--slate);
}
.shift-line__work {
  flex: 1 1 160px;
  color: var(--ink-soft);
}
.shift-line__type {
  color: var(--slate);
}
.shift-line__hours {
  font-weight: 700;
}
.shift-line__status {
  margin-left: auto;
}
.timecard-entry-log {
  overflow: hidden;
}
.timecard-entry-summary {
  list-style: none;
  display: flex;
  align-items: center;
  gap: var(--s3);
  padding: var(--s4) var(--s5);
  cursor: pointer;
  border-bottom: 1px solid var(--line);
}
.timecard-entry-summary::-webkit-details-marker {
  display: none;
}
.timecard-entry-summary span:first-child {
  display: inline-flex;
  align-items: center;
  gap: var(--s2);
  font-size: 18px;
  font-weight: 700;
}
.timecard-entry-summary .hint {
  margin-left: auto;
}
.timecard-entry-log:not([open]) .timecard-entry-summary {
  border-bottom: 0;
}
/* Phones: the day name takes the full row so the in/out span + meta wrap below. */
@media (max-width: 700px) {
  .day-acc__name {
    min-width: 100%;
  }
  .day-acc__meta {
    margin-left: 0;
  }
}

.notes-list {
  list-style: none;
  font-size: 12.5px;
  color: var(--ink-soft);
}
.notes-list li {
  padding: 7px 0;
  border-bottom: 1px solid var(--line);
  display: flex;
  gap: 10px;
}
.notes-list li:last-child {
  border-bottom: 0;
}

/* Sticky acknowledge bar: only rendered when a period is pending the
   employee's acknowledgment. Confined to .review-zone so it appears only while
   the pay-period section is on screen — never during the "Right now" zone. */
.review-zone {
  position: relative;
}
#flag-issue {
  scroll-margin-top: var(--s6);
}
.ack-bar {
  position: sticky;
  bottom: var(--s4);
  z-index: 30;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--s3) var(--s4);
  margin-top: var(--s5);
  padding: var(--s3) var(--s4);
  border: 1px solid var(--line-strong);
  border-radius: var(--r);
  background: var(--card);
  box-shadow: var(--sh-lg);
}
.ack-bar--review {
  border-color: #e9c79a;
  border-left: 4px solid var(--amber);
}
.ack-bar__msg {
  display: flex;
  align-items: center;
  gap: var(--s2);
  color: var(--ink-soft);
}
.ack-bar__msg i {
  color: var(--teal);
}
.ack-bar--review .ack-bar__msg i {
  color: var(--amber);
}
.ack-bar__actions {
  display: flex;
  align-items: center;
  gap: var(--s2);
}
@media (max-width: 700px) {
  .ack-bar {
    bottom: 0;
    margin-left: calc(var(--s4) * -1);
    margin-right: calc(var(--s4) * -1);
    border-right: 0;
    border-radius: var(--r) var(--r) 0 0;
  }
  .ack-bar__actions {
    margin-left: auto;
  }
}

/* ── Global mobile + touch refinements (apply to every page) ── */
@media (max-width: 700px) {
  /* 16px inputs stop iOS Safari from auto-zooming the page on focus. */
  .input,
  select.input,
  textarea.input {
    font-size: 16px;
  }
  /* Comfortable finger targets for the primary interactive controls. */
  .btn,
  .input,
  select.input {
    min-height: 44px;
  }
  /* Readable table text on small screens (base is 12.5px). */
  table {
    font-size: 13.5px;
  }
}

/* responsive shell */
.menu-btn {
  display: none;
  background: var(--card);
  border: 1px solid var(--line-strong);
  border-radius: var(--r-sm);
  padding: 7px 10px;
  font-size: 18px;
  cursor: pointer;
}
@media (max-width: 980px) {
  .sidebar {
    transform: translateX(-100%);
    transition: transform 0.2s;
    box-shadow: var(--sh-lg);
  }
  .sidebar.open {
    transform: none;
  }
  .main {
    margin-left: 0;
  }
  .menu-btn {
    display: inline-block;
  }
  .content {
    padding: var(--s4);
  }
  .topbar,
  .ribbon {
    padding-left: var(--s4);
    padding-right: var(--s4);
  }
}
.scrim {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(11, 18, 16, 0.4);
  z-index: 35;
}
.scrim.show {
  display: block;
}
@media (min-width: 981px) {
  .scrim {
    display: none !important;
  }
}

/* ---------- Flash messages (Flask get_flashed_messages categories) ---------- */
.alert {
  border: 1px solid var(--line);
  border-left: 4px solid var(--slate);
  background: var(--card);
  color: var(--ink);
  border-radius: var(--r);
  padding: 10px 14px;
  margin-bottom: var(--s3);
  font-size: 13.5px;
}
.alert-success {
  border-left-color: var(--teal);
  background: var(--teal-tint);
  color: var(--teal-d);
}
.alert-danger,
.alert-error {
  border-left-color: var(--red);
  background: var(--red-tint);
  color: var(--red);
}
.alert-warning {
  border-left-color: var(--amber);
  background: var(--amber-tint);
  color: var(--amber);
}
.alert-info,
.alert-message {
  border-left-color: var(--indigo);
  background: var(--indigo-tint);
  color: var(--indigo);
}
.flash-wrap {
  padding: var(--s4) var(--s6) 0;
  max-width: 1380px;
  width: 100%;
}
@media (max-width: 980px) {
  .flash-wrap {
    padding-left: var(--s4);
    padding-right: var(--s4);
  }
}

/* kiosk flash (dark surface) */
.kiosk .alert {
  background: var(--kiosk-card);
  border-color: var(--kiosk-line);
  color: var(--kiosk-ink);
  border-left-width: 4px;
}
.kiosk .alert-success {
  border-left-color: var(--kiosk-teal);
}
.kiosk .alert-danger,
.kiosk .alert-error {
  border-left-color: #f2727a;
}
.kiosk .alert-warning {
  border-left-color: var(--kiosk-amber);
}
.kiosk-flash {
  max-width: 760px;
  margin: 0 auto var(--s5);
  padding: 0 var(--s5);
}
.kiosk-flash .alert {
  font-size: 18px;
  font-weight: 750;
  padding: 16px 18px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.22);
}
.pin-flash-zone {
  margin: var(--s5) auto 0;
  max-width: 100%;
}
.pin-flash-card {
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: var(--s3);
  overflow: hidden;
  min-height: 84px;
  padding: 18px 18px 18px 22px;
  border: 1px solid rgba(232, 238, 247, 0.16);
  border-radius: var(--r-lg);
  background:
    linear-gradient(135deg, rgba(22, 184, 166, 0.2), transparent 42%), #142238;
  color: var(--kiosk-ink);
  text-align: left;
  box-shadow:
    0 0 0 1px rgba(22, 184, 166, 0.1) inset,
    0 15px 34px rgba(0, 0, 0, 0.34);
  transform: translateX(0);
  transition:
    opacity 0.16s ease,
    transform 0.16s ease;
}
.pin-flash-card + .pin-flash-card {
  margin-top: var(--s3);
}
.pin-flash-card.alert-danger,
.pin-flash-card.alert-error {
  background:
    linear-gradient(135deg, rgba(242, 114, 122, 0.2), transparent 42%), #142238;
}
.pin-flash-card.alert-warning {
  background:
    linear-gradient(135deg, rgba(224, 138, 43, 0.22), transparent 42%), #142238;
}
.pin-flash-accent {
  position: absolute;
  inset: 0 auto 0 0;
  width: 7px;
  background: var(--kiosk-teal);
}
.pin-flash-card.alert-danger .pin-flash-accent,
.pin-flash-card.alert-error .pin-flash-accent {
  background: #f2727a;
}
.pin-flash-card.alert-warning .pin-flash-accent {
  background: var(--kiosk-amber);
}
.pin-flash-icon {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(22, 184, 166, 0.2);
  color: #8ff2e7;
  font-size: 20px;
}
.pin-flash-card.alert-danger .pin-flash-icon,
.pin-flash-card.alert-error .pin-flash-icon {
  background: rgba(242, 114, 122, 0.17);
  color: #ff9ca3;
}
.pin-flash-card.alert-warning .pin-flash-icon {
  background: rgba(224, 138, 43, 0.17);
  color: #f6b057;
}
.pin-flash-message {
  font-size: clamp(22px, 3.2vw, 30px);
  font-weight: 900;
  line-height: 1.16;
  letter-spacing: 0;
}
.pin-flash-close {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border: 1px solid rgba(232, 238, 247, 0.18);
  border-radius: 50%;
  background: rgba(232, 238, 247, 0.08);
  color: var(--kiosk-ink);
  cursor: pointer;
  font-size: 20px;
}
.pin-flash-close:hover {
  background: rgba(232, 238, 247, 0.14);
}
.pin-flash-card.dismissed {
  opacity: 0;
  transform: translateX(28px) scale(0.98);
}
.pin-flash-card.swipe-left.dismissed {
  transform: translateX(-80px) scale(0.98);
}
.pin-flash-card.swipe-right.dismissed {
  transform: translateX(80px) scale(0.98);
}

/* PIN display empty/placeholder state (toggled by the kiosk JS via .empty) */
.pin-display.empty {
  font-size: 16px;
  letter-spacing: normal;
  color: var(--kiosk-muted);
  font-family: var(--sans);
}

/* visually-hidden hardware PIN input (still receives physical/keyboard numeric input) */
.sr-pin {
  position: absolute;
  opacity: 0;
  height: 0;
  width: 0;
  pointer-events: none;
}

/* ---------- Modal (vanilla, framework-free; reusable) ---------- */
.lmodal {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: none;
  align-items: flex-start;
  justify-content: center;
  padding: 6vh var(--s4) var(--s4);
}
.lmodal.open {
  display: flex;
}
.lmodal__backdrop {
  position: fixed;
  inset: 0;
  background: rgba(11, 18, 16, 0.45);
  backdrop-filter: blur(1px);
}
.lmodal__dialog {
  position: relative;
  z-index: 1;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--sh-lg);
  width: 100%;
  max-width: 480px;
  max-height: 88vh;
  overflow: auto;
  animation: lmodal-in 0.16s ease;
}
@keyframes lmodal-in {
  from {
    opacity: 0;
    transform: translateY(8px) scale(0.985);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
.lmodal__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s3);
  padding: var(--s4) var(--s5);
  border-bottom: 1px solid var(--line);
}
.lmodal__head h3 {
  font-size: 16px;
  font-weight: 700;
  color: var(--ink);
}
.lmodal__close {
  background: transparent;
  border: 0;
  font-size: 22px;
  line-height: 1;
  color: var(--slate);
  cursor: pointer;
  padding: 2px 8px;
  border-radius: var(--r-sm);
}
.lmodal__close:hover {
  background: var(--slate-tint);
  color: var(--ink);
}
.lmodal__body {
  padding: var(--s5);
}
.lmodal__foot {
  display: flex;
  justify-content: flex-end;
  gap: var(--s2);
  padding: var(--s4) var(--s5);
  border-top: 1px solid var(--line);
}
.seed-modal__dialog {
  max-width: 520px;
}
.seed-modal__head {
  align-items: flex-start;
}
.seed-modal__title {
  display: flex;
  align-items: flex-start;
  gap: var(--s3);
}
.seed-modal__icon {
  flex: 0 0 auto;
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: var(--r);
  background: linear-gradient(
    135deg,
    rgba(22, 184, 166, 0.18),
    rgba(14, 119, 109, 0.08)
  );
  color: var(--teal);
  border: 1px solid rgba(22, 184, 166, 0.24);
  font-size: 18px;
}
.seed-modal__eyebrow {
  color: var(--slate);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-top: 3px;
}
.seed-modal__body p {
  color: var(--ink);
  font-size: 15px;
  line-height: 1.5;
  margin-bottom: var(--s4);
}
.seed-modal__checks {
  display: grid;
  gap: var(--s2);
}
.seed-modal__checks div {
  display: flex;
  align-items: center;
  gap: var(--s3);
  min-height: 38px;
  padding: var(--s3);
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: var(--bg);
  color: var(--ink);
  font-size: 13px;
  font-weight: 650;
}
.seed-modal__checks i {
  width: 18px;
  color: var(--teal);
  text-align: center;
}
.seed-modal__foot {
  align-items: center;
}
@media (prefers-reduced-motion: reduce) {
  .lmodal__dialog {
    animation: none;
  }
}

/* ============================================================================
   View Transitions — Phase 0: app-wide route cross-fade + persistent shell hold
   Progressive enhancement: cross-document VT animates same-origin route swaps
   with zero JS. Firefox / reduced-motion fall back to instant navigation.
   ============================================================================ */
@view-transition {
  navigation: auto;
}

/* quick root cross-fade on every route swap (kept short so dense pages stay snappy) */
::view-transition-old(root),
::view-transition-new(root) {
  animation-duration: 180ms;
  animation-timing-function: cubic-bezier(0.2, 0, 0.2, 1);
}

/* hold the persistent admin shell: name it so it is excluded from the root
   snapshot and stays put while only .content animates (the Context transition) */
.sidebar {
  view-transition-name: it-sidebar;
}
.topbar {
  view-transition-name: it-topbar;
}
::view-transition-group(it-sidebar),
::view-transition-group(it-topbar) {
  animation: none;
}

/* accessibility guard — collapse all view-transition animation to instant */
@media (prefers-reduced-motion: reduce) {
  ::view-transition-group(*),
  ::view-transition-old(*),
  ::view-transition-new(*) {
    animation: none !important;
  }
}

/* ---- Pay-period workbench: contain the roster so a long employee list scrolls
   in place instead of stretching the whole page (which pushed the drawer + its
   "Edit shift" action far down, especially when zoomed in). Filters/search above
   it stay pinned; the list scrolls. Drawer stays sticky and in view. ---- */
#employeeList {
  max-height: 62vh;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding-right: 4px;
}
@media (max-width: 900px) {
  /* stacked single-column: let it flow naturally, no nested scroll */
  #employeeList {
    max-height: none;
    overflow: visible;
  }
}

/* ---- Inline timecard editing (pay-period workbench) ---- */
.ie-cell {
  cursor: pointer;
  position: relative;
}
.ie-cell::after {
  content: "";
  position: absolute;
  left: 6px;
  right: 6px;
  bottom: 3px;
  border-bottom: 1px dashed var(--line-strong);
}
.ie-cell:hover {
  background: var(--teal-tint);
}
.ie-cell:hover::after {
  border-bottom-color: var(--teal);
}
.ie-cell input,
.ie-cell select {
  font-size: 12.5px;
  padding: 4px 6px;
  min-width: 150px;
}
#inlineEditMsg {
  display: none;
}

/* ============================================================================
   Payroll workbench redesign — 2-column layout + on-demand review slide-over.
   The right "Selected review item" column was retired so the timecard table
   gets the freed horizontal space; review detail now opens in an overlay.
   ============================================================================ */
.wb-cols {
  display: grid;
  gap: var(--s4);
  grid-template-columns: minmax(240px, 320px) minmax(0, 1fr);
}
.wb-cols > * {
  min-width: 0;
}
@media (max-width: 900px) {
  .wb-cols {
    grid-template-columns: 1fr;
  }
}
.wb-head-actions {
  display: flex;
  align-items: center;
  gap: var(--s2);
  flex-wrap: wrap;
  justify-content: flex-end;
}

/* center-column status strip: keeps review state visible without a pinned panel */
.rev-callout {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s3);
  flex-wrap: wrap;
  padding: 8px var(--s3);
  border: 1px solid #e9b9b9;
  border-left: 4px solid var(--red);
  background: var(--red-tint);
  color: var(--red);
  border-radius: var(--r-sm);
  font-size: 12.5px;
  font-weight: 600;
  margin-bottom: var(--s3);
}
.rev-callout.setup {
  border-color: #e8cd9b;
  border-left-color: var(--amber);
  background: var(--amber-tint);
  color: var(--amber);
}
.rev-callout .btn {
  flex: 0 0 auto;
}

/* one review item (issue note or punch problem) inside the slide-over */
.rev-item {
  border: 1px solid var(--line);
  border-left: 3px solid var(--red);
  border-radius: var(--r-sm);
  padding: var(--s3);
  background: var(--card);
  margin-bottom: var(--s3);
}
.rev-item__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s2);
  margin-bottom: 6px;
  flex-wrap: wrap;
}
.rev-item__title {
  font-weight: 700;
  font-size: 13.5px;
  color: var(--ink);
}
.rev-note {
  font-size: 12.5px;
  color: var(--ink-soft);
  margin-top: 4px;
  white-space: pre-wrap;
  word-break: break-word;
}
.rev-resolve {
  margin-top: var(--s3);
}
.rev-resolve textarea.input {
  resize: vertical;
}

/* right-anchored review slide-over (overlay; never consumes layout width) */
.slideover {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: none;
}
.slideover.open {
  display: block;
}
.slideover__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(11, 18, 16, 0.45);
  backdrop-filter: blur(1px);
}
.slideover__panel {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(420px, 92vw);
  background: var(--card);
  border-left: 1px solid var(--line);
  box-shadow: var(--sh-lg);
  display: flex;
  flex-direction: column;
  animation: slideover-in 0.18s ease;
}
@keyframes slideover-in {
  from {
    transform: translateX(16px);
    opacity: 0;
  }
  to {
    transform: none;
    opacity: 1;
  }
}
.slideover__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s3);
  padding: var(--s4) var(--s5);
  border-bottom: 1px solid var(--line);
}
.slideover__close {
  background: transparent;
  border: 0;
  font-size: 22px;
  line-height: 1;
  color: var(--slate);
  cursor: pointer;
  padding: 2px 8px;
  border-radius: var(--r-sm);
}
.slideover__close:hover {
  background: var(--slate-tint);
  color: var(--ink);
}
.slideover__body {
  padding: var(--s5);
  overflow: auto;
  flex: 1;
}
@media (prefers-reduced-motion: reduce) {
  .slideover__panel {
    animation: none;
  }
}

/* sidebar theme toggle */
.theme-toggle {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--panel-ink);
  font-size: 11px;
  font-weight: 600;
  padding: 4px 9px;
  border-radius: 999px;
  cursor: pointer;
}
.theme-toggle:hover {
  background: rgba(255, 255, 255, 0.12);
}

/* ============================================================================
   Dark theme — operational variant. Token overrides flip most surfaces; a few
   hardcoded light values and tinted pills/alerts get targeted fixes so review,
   danger, setup, and focus states stay legible. Accent tokens (--teal/--red/
   --amber/--indigo) keep their saturation so solid buttons stay white-legible;
   tinted text is lightened per-component instead.
   ============================================================================ */
[data-theme="dark"] {
  --paper: #0f1714;
  --card: #16211d;
  --ink: #e7efeb;
  --ink-soft: #c3d2cb;
  --slate: #92a59e;
  --slate-tint: #1e2a26;
  --line: #27332e;
  --line-strong: #36453f;
  --teal-tint: #123430;
  --amber-tint: #2f2515;
  --red-tint: #321b1b;
  --indigo-tint: #20203a;
  --sh-sm: 0 1px 2px rgba(0, 0, 0, 0.45);
  --sh: 0 1px 3px rgba(0, 0, 0, 0.5), 0 1px 2px rgba(0, 0, 0, 0.4);
  --sh-lg: 0 10px 30px rgba(0, 0, 0, 0.6);
}
[data-theme="dark"] .pill {
  color: #a9bcb4;
  background: var(--slate-tint);
}
[data-theme="dark"] .pill.teal,
[data-theme="dark"] .alert-success {
  color: #5eead4;
}
[data-theme="dark"] .pill.amber,
[data-theme="dark"] .alert-warning {
  color: #f0b36b;
}
[data-theme="dark"] .pill.red,
[data-theme="dark"] .alert-danger,
[data-theme="dark"] .alert-error,
[data-theme="dark"] .rev-callout,
[data-theme="dark"] .daycell.issue .dh {
  color: #f3a5a5;
}
[data-theme="dark"] .pill.indigo,
[data-theme="dark"] .alert-info,
[data-theme="dark"] .alert-message {
  color: #bcb7f2;
}
[data-theme="dark"] .rev-callout.setup {
  color: #f0b36b;
  border-color: #5a4824;
}
[data-theme="dark"] .rev-callout {
  border-color: #5a2d2d;
}
[data-theme="dark"] .alert {
  color: var(--ink);
}
[data-theme="dark"] thead th {
  background: #1b2723;
}
[data-theme="dark"] tbody tr:hover {
  background: #1b2723;
}
[data-theme="dark"] tr.row-bad:hover td {
  background: #3a1f1f;
}
[data-theme="dark"] tr.row-warn:hover td {
  background: #372b16;
}
[data-theme="dark"] .daycell {
  background: var(--card);
}
[data-theme="dark"] .daycell.issue {
  border-color: #5a2d2d;
}
[data-theme="dark"] .topbar {
  background: rgba(15, 23, 20, 0.9);
}
[data-theme="dark"] .fchip.active {
  background: var(--teal);
  color: #06140f;
  border-color: var(--teal);
}

/* ----------------------------------------------------------------------------
   Zebra striping — alternating row tint so dense tables are easy to scan.
   Appended last and scoped to td so it composes predictably with the existing
   status (.row-bad/.row-warn) and :hover rules, which are re-asserted here at
   equal/higher specificity and later source order so they always win.
   ---------------------------------------------------------------------------- */
tbody tr:nth-child(even) td {
  background: var(--zebra);
}
tbody tr.row-bad td {
  background: var(--red-tint);
}
tbody tr.row-warn td {
  background: var(--amber-tint);
}
tbody tr:hover td {
  background: var(--row-hover);
}
tbody tr.row-bad:hover td {
  background: #f6dcdc;
}
tbody tr.row-warn:hover td {
  background: #f6e6cf;
}

/* ----------------------------------------------------------------------------
   Dark-theme leak fixes — components that hardcoded light backgrounds and so
   stayed bright when the rest of the page went dark.
   ---------------------------------------------------------------------------- */
[data-theme="dark"] {
  --zebra: #1b2723;
  --row-hover: #243029;
}
/* timecard "Week at a glance" empty/no-shift day rows */
[data-theme="dark"] .day-acc.empty {
  background: var(--card);
}
[data-theme="dark"] .day-acc.review .day-acc__body {
  border-top-color: #5a4824;
}
[data-theme="dark"] .day-acc__sum:hover {
  background: rgba(22, 184, 166, 0.08);
}
/* dashboard "Yet to Clock In" panel + worker chips */
[data-theme="dark"] .awaiting-card__body {
  background:
    radial-gradient(
      700px 180px at 50% -35%,
      rgba(249, 115, 22, 0.16),
      transparent 65%
    ),
    var(--card);
}
[data-theme="dark"] .worker-chip {
  background: #1b2723;
  border-color: rgba(224, 122, 122, 0.28);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.45);
}
[data-theme="dark"] .worker-chip:hover {
  border-color: rgba(224, 122, 122, 0.5);
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.55);
}
[data-theme="dark"] .dismiss-btn {
  background: #16211d;
}
[data-theme="dark"] .dismiss-btn:hover {
  background: var(--red);
  color: #fff;
}
/* row-status hover tints, dark variants */
[data-theme="dark"] tbody tr.row-bad:hover td {
  background: #3a1f1f;
}
[data-theme="dark"] tbody tr.row-warn:hover td {
  background: #372b16;
}
