/* =====================================================================
   Grimy Grills — Field App
   Linear-inspired dark theme. Mobile-first, large tap targets (>=44px).
   ===================================================================== */

:root {
  /* Surfaces */
  --canvas: #010102;
  --surface-1: #0f1011;
  --surface-2: #141516;
  --surface-3: #18191a;

  /* Hairlines */
  --hairline: #23252a;
  --hairline-strong: #34343a;

  /* Ink */
  --ink: #f7f8f8;
  --ink-muted: #d0d6e0;
  --ink-subtle: #8a8f98;
  --ink-tertiary: #62666d;

  /* Accent (lavender) */
  --accent: #5e6ad2;
  --accent-hover: #828fff;
  --accent-focus: #5e69d1;

  /* Semantic */
  --success: #27a644;
  --danger: #e5484d;

  /* Radii */
  --r-chip: 4px;
  --r-input: 8px;
  --r-card: 12px;
  --r-pill: 9999px;

  /* Spacing */
  --s1: 4px;
  --s2: 8px;
  --s3: 12px;
  --s4: 16px;
  --s5: 24px;
  --s6: 32px;
  --s7: 48px;

  --font: -apple-system, "SF Pro Display", "SF Pro Text", system-ui, "Segoe UI", Roboto, Inter, sans-serif;

  --tap: 44px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--canvas);
  color: var(--ink);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -webkit-text-size-adjust: 100%;
}

body {
  min-height: 100dvh;
  /* Subtle depth: a faint lavender glow at the top, never a flat fill */
  background:
    radial-gradient(120% 60% at 50% -10%, rgba(94, 106, 210, 0.10), transparent 60%),
    var(--canvas);
}

.hidden { display: none !important; }

/* iOS Safari can leave composited video layers visible when a view is hidden. */
.hidden video,
details:not([open]) video {
  display: none !important;
}

h1, h2, h3 {
  font-weight: 600;
  letter-spacing: -0.4px;
  margin: 0;
}

button { font-family: inherit; }

/* ---------------------------------------------------------------- Layout */
.app {
  width: 100%;
  max-width: 560px;
  margin: 0 auto;
  padding: 0 var(--s4) calc(var(--s7) + env(safe-area-inset-bottom));
}

.view { animation: viewIn 0.28s ease both; }

@keyframes viewIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: none; }
}

/* ------------------------------------------------------------- Top bar */
.topbar {
  display: flex;
  align-items: center;
  gap: var(--s3);
  padding: max(var(--s4), env(safe-area-inset-top)) 0 var(--s4);
  position: sticky;
  top: 0;
  z-index: 5;
  background: linear-gradient(var(--canvas) 75%, transparent);
}

.topbar__title {
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.2px;
  color: var(--ink);
}

.topbar__spacer { flex: 1; }

.topbar__back {
  display: inline-flex;
  align-items: center;
  gap: var(--s1);
  min-height: var(--tap);
  padding: var(--s2) var(--s3) var(--s2) var(--s2);
  background: var(--surface-1);
  color: var(--ink-muted);
  border: 1px solid var(--hairline);
  border-radius: var(--r-input);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: border-color 0.15s ease, color 0.15s ease;
}

.topbar__back svg { width: 18px; height: 18px; }
.topbar__back:hover { border-color: var(--hairline-strong); color: var(--ink); }
.topbar__back:active { transform: scale(0.98); }

/* ------------------------------------------------------------ Chooser */
.chooser {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: var(--s7);
  padding: var(--s7) 0;
}

.chooser__brand {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--s2);
}

.chooser__logo {
  width: 72px;
  height: 72px;
  object-fit: contain;
  filter: drop-shadow(0 0 24px rgba(94, 106, 210, 0.25));
}

.chooser__title {
  font-size: 32px;
  letter-spacing: -1px;
  margin-top: var(--s2);
}

.chooser__subtitle {
  margin: 0;
  color: var(--ink-subtle);
  font-size: 14px;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  font-weight: 500;
}

.chooser__cards {
  display: flex;
  flex-direction: column;
  gap: var(--s3);
}

.role-card {
  display: flex;
  align-items: center;
  gap: var(--s4);
  width: 100%;
  text-align: left;
  padding: var(--s5) var(--s4);
  background: var(--surface-1);
  /* lighter top edge = subtle lift */
  border: 1px solid var(--hairline);
  border-top-color: var(--hairline-strong);
  border-radius: var(--r-card);
  color: var(--ink);
  cursor: pointer;
  transition: border-color 0.18s ease, background 0.18s ease, transform 0.12s ease;
}

.role-card:hover { background: var(--surface-2); border-color: var(--hairline-strong); }
.role-card:active { transform: scale(0.99); }

.role-card__icon {
  flex: none;
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  background: var(--surface-3);
  border: 1px solid var(--hairline);
  border-radius: var(--r-input);
  color: var(--accent-hover);
}
.role-card__icon svg { width: 24px; height: 24px; }

.role-card__body { flex: 1; display: flex; flex-direction: column; gap: 2px; }
.role-card__label { font-size: 18px; font-weight: 600; letter-spacing: -0.3px; }
.role-card__desc { font-size: 13px; color: var(--ink-subtle); }

.role-card__chev { flex: none; color: var(--ink-tertiary); }
.role-card__chev svg { width: 20px; height: 20px; display: block; }

/* ------------------------------------------------------- Employee hub */
.hub-intro { margin-top: var(--s5); }
.hub-intro__title { font-size: 24px; letter-spacing: -0.6px; }
.hub-intro__text { margin: var(--s2) 0 0; color: var(--ink-subtle); font-size: 15px; }

.hub-tiles {
  margin-top: var(--s5);
  display: flex;
  flex-direction: column;
  gap: var(--s3);
}

.hub-tile {
  display: flex;
  align-items: center;
  gap: var(--s4);
  width: 100%;
  text-align: left;
  padding: var(--s5) var(--s4);
  background: var(--surface-1);
  border: 1px solid var(--hairline);
  border-top-color: var(--hairline-strong);
  border-radius: var(--r-card);
  color: var(--ink);
  cursor: pointer;
  transition: border-color 0.18s ease, background 0.18s ease, transform 0.12s ease;
}
.hub-tile:hover { background: var(--surface-2); border-color: var(--hairline-strong); }
.hub-tile:active { transform: scale(0.99); }
.hub-tile--primary {
  border-color: rgba(94, 106, 210, 0.45);
  background: rgba(94, 106, 210, 0.08);
}
.hub-tile--primary:hover { border-color: var(--accent); background: rgba(94, 106, 210, 0.12); }

.hub-tile__icon {
  flex: none;
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  background: var(--surface-3);
  border: 1px solid var(--hairline);
  border-radius: var(--r-input);
  color: var(--accent-hover);
}
.hub-tile__icon svg { width: 24px; height: 24px; }

.hub-tile__body { flex: 1; display: flex; flex-direction: column; gap: 2px; }
.hub-tile__label { font-size: 17px; font-weight: 600; letter-spacing: -0.3px; }
.hub-tile__desc { font-size: 13px; color: var(--ink-subtle); }

.hub-tile__chev { flex: none; color: var(--ink-tertiary); }
.hub-tile__chev svg { width: 20px; height: 20px; display: block; }

/* -------------------------------------------------------- Payment links */
.paylink-list {
  display: flex;
  flex-direction: column;
  gap: var(--s3);
  margin-top: var(--s5);
}

.paylink {
  display: flex;
  align-items: center;
  gap: var(--s3);
  padding: var(--s4);
  background: var(--surface-1);
  border: 1px solid var(--hairline);
  border-radius: var(--r-card);
}

.paylink__main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.paylink__label {
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.3px;
}

.paylink__price {
  font-size: 14px;
  color: var(--accent-hover);
  font-weight: 600;
}

.paylink__url {
  font-size: 12px;
  color: var(--ink-subtle);
  word-break: break-all;
  line-height: 1.4;
  margin-top: var(--s1);
}

.paylink__copy {
  flex-shrink: 0;
  width: auto;
  min-height: 40px;
  padding: 0 16px;
}

/* --------------------------------------------------------------- SOP */
.sop__lead { margin-top: var(--s5); }
.sop__eyebrow {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.7px;
  text-transform: uppercase;
  color: #94f7d9;
}
.sop__title {
  font-size: 30px;
  line-height: 1.05;
  letter-spacing: -0.9px;
  margin-top: var(--s1);
  color: #f8fffc;
}
.sop__text { margin: var(--s2) 0 0; color: #b6c5d8; font-size: 14px; }

.sop__lead--fresh {
  padding: var(--s5);
  border-radius: 16px;
  border: 1px solid rgba(126, 245, 211, 0.32);
  background:
    radial-gradient(80% 130% at 0% 0%, rgba(61, 199, 164, 0.2), transparent 58%),
    linear-gradient(135deg, #0d1a2a 0%, #101f36 52%, #1a0f2f 100%);
}

.sop-shell {
  margin-top: var(--s4);
  display: flex;
  flex-direction: column;
  gap: var(--s4);
}

.sop-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--s3);
}

.sop-step {
  background: linear-gradient(180deg, rgba(20, 33, 54, 0.95), rgba(16, 24, 40, 0.95));
  border: 1px solid rgba(96, 146, 255, 0.28);
  border-radius: 14px;
  padding: var(--s4);
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.18);
  border-left-width: 4px;
}

.sop-step__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s2);
}

.sop-step__num {
  display: inline-flex;
  align-items: center;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  color: #9dd9ff;
}

.sop-step__title {
  margin-top: var(--s2);
  font-size: 17px;
  letter-spacing: -0.3px;
  color: #f4f9ff;
}

.sop-step--tone-1 { border-left-color: #66f0cd; }
.sop-step--tone-2 { border-left-color: #78b8ff; }
.sop-step--tone-3 { border-left-color: #a79bff; }
.sop-step--tone-4 { border-left-color: #ffb870; }

.sop-step__list {
  margin: var(--s3) 0 0;
  padding-left: 18px;
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.sop-step__list li {
  font-size: 13px;
  line-height: 1.5;
  color: #c0d2e8;
}

.sop-step__callout {
  margin-top: var(--s3);
  font-size: 12px;
  line-height: 1.45;
  color: #ffd89f;
  background: rgba(255, 177, 75, 0.14);
  border: 1px solid rgba(255, 177, 75, 0.35);
  border-radius: 10px;
  padding: var(--s2) var(--s3);
}

.sop-final {
  background: linear-gradient(135deg, rgba(21, 49, 50, 0.92), rgba(13, 35, 43, 0.96));
  border: 1px solid rgba(131, 250, 210, 0.28);
  border-radius: 14px;
  padding: var(--s4);
}

.sop-final__head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--s2);
}

.sop-final__tag {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  color: #8ff1ce;
  border: 1px solid rgba(143, 241, 206, 0.45);
  border-radius: 999px;
  padding: 3px 8px;
}

.sop-final__title {
  font-size: 20px;
  letter-spacing: -0.4px;
  color: #eefff8;
}

.sop-final__list {
  margin: var(--s3) 0;
  padding-left: 18px;
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.sop-final__list li {
  color: #c5e9de;
  font-size: 14px;
  line-height: 1.55;
}

.sop-final__list strong { color: #f3fffb; font-weight: 600; }

@media (max-width: 760px) {
  .sop-grid { grid-template-columns: 1fr; }
}

/* ----------------------------------------------------------- Checkbox */
.checkbox {
  margin-top: var(--s4);
  display: flex;
  align-items: flex-start;
  gap: var(--s3);
  padding: var(--s4);
  min-height: var(--tap);
  background: var(--surface-1);
  border: 1px solid var(--hairline);
  border-radius: var(--r-card);
  cursor: pointer;
}
.checkbox__input { position: absolute; opacity: 0; width: 0; height: 0; }
.checkbox__box {
  flex: none;
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  border-radius: var(--r-input);
  border: 2px solid var(--accent);
  background: transparent;
  color: transparent;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.checkbox__box svg { width: 14px; height: 14px; }
.checkbox__input:checked + .checkbox__box {
  background: var(--success);
  border-color: var(--success);
  color: #fff;
}
.checkbox__input:focus-visible + .checkbox__box {
  outline: 2px solid var(--accent-focus);
  outline-offset: 2px;
}
.checkbox__label { font-size: 14px; color: var(--ink-muted); line-height: 1.45; }

/* ----------------------------------------------------- Employee intro */
.intro-card {
  margin-top: var(--s5);
  padding: var(--s5);
  background: var(--surface-1);
  border: 1px solid var(--hairline);
  border-top-color: var(--hairline-strong);
  border-radius: var(--r-card);
  display: flex;
  flex-direction: column;
  gap: var(--s3);
}

.intro-card__eyebrow {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: var(--accent-hover);
}
.intro-card__title { font-size: 24px; letter-spacing: -0.6px; }
.intro-card__text { margin: 0 0 var(--s2); color: var(--ink-muted); font-size: 15px; }

/* ------------------------------------------------------------ Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--s2);
  min-height: var(--tap);
  padding: 0 var(--s4);
  border-radius: var(--r-input);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  border: 1px solid transparent;
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.1s ease, opacity 0.15s ease;
}
.btn:active { transform: scale(0.985); }
.btn--block { width: 100%; }

.btn--primary { background: var(--accent); color: #fff; border-color: var(--accent); }
.btn--primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
.btn--primary:disabled {
  background: var(--surface-3);
  border-color: var(--hairline);
  color: var(--ink-tertiary);
  cursor: not-allowed;
  transform: none;
}

.btn--secondary {
  background: var(--surface-1);
  color: var(--ink);
  border-color: var(--hairline);
}
.btn--secondary:hover { background: var(--surface-2); border-color: var(--hairline-strong); }
.btn--ghost {
  background: transparent;
  color: var(--ink-2);
  border-color: transparent;
  font-size: 12px;
}
.btn--ghost:hover { background: var(--surface-1); color: var(--ink); }

/* Focus rings — accent, 2px */
.btn:focus-visible,
.topbar__back:focus-visible,
.role-card:focus-visible,
.segmented__option:focus-visible,
.input:focus-visible {
  outline: 2px solid var(--accent-focus);
  outline-offset: 2px;
}

/* ------------------------------------------------------------- Fields */
.field { margin-top: var(--s5); display: flex; flex-direction: column; gap: var(--s2); }

.field__label {
  font-size: 13px;
  font-weight: 500;
  color: var(--ink-muted);
}

.input {
  width: 100%;
  min-height: var(--tap);
  padding: 11px var(--s3);
  background: var(--surface-1);
  border: 1px solid var(--hairline);
  border-radius: var(--r-input);
  color: var(--ink);
  font-size: 16px; /* >=16px avoids iOS zoom-on-focus */
  font-family: inherit;
}
.input::placeholder { color: var(--ink-tertiary); }
.input:focus { border-color: var(--accent-focus); outline: 2px solid var(--accent-focus); outline-offset: 0; }
/* Make the native date picker icon visible on dark */
.input[type="date"]::-webkit-calendar-picker-indicator { filter: invert(0.7); cursor: pointer; }

.divider { border: none; border-top: 1px solid var(--hairline); margin: var(--s5) 0 0; }

/* Checklist helper */
.checklist-help {
  margin-top: var(--s4);
  padding: var(--s3);
  border: 1px solid rgba(94, 106, 210, 0.35);
  border-radius: var(--r-input);
  background: rgba(94, 106, 210, 0.08);
}

.checklist-help__title {
  font-size: 14px;
  font-weight: 600;
  letter-spacing: -0.2px;
  margin-bottom: 6px;
}

.checklist-help__list {
  margin: 0;
  padding-left: 18px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.checklist-help__list li {
  font-size: 13px;
  color: var(--ink-muted);
  line-height: 1.45;
}

/* --------------------------------------------------------- Segmented */
.segmented {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--s1);
  padding: var(--s1);
  background: var(--surface-1);
  border: 1px solid var(--hairline);
  border-radius: var(--r-pill);
}

.segmented__option {
  min-height: var(--tap);
  border: none;
  background: transparent;
  color: var(--ink-muted);
  font-size: 14px;
  font-weight: 500;
  border-radius: var(--r-pill);
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}
.segmented__option[aria-checked="true"] {
  background: var(--accent);
  color: #fff;
}
.segmented__option:not([aria-checked="true"]):hover { color: var(--ink); }

/* -------------------------------------------------------- Media items */
.media-item {
  margin-top: var(--s4);
  padding: var(--s4);
  background: var(--surface-1);
  border: 1px solid var(--hairline);
  border-radius: var(--r-card);
}

.media-item__head { display: flex; align-items: flex-start; gap: var(--s3); }

.media-item__meta { display: flex; flex-direction: column; gap: 2px; flex: 1; }
.media-item__label { font-size: 15px; font-weight: 600; letter-spacing: -0.2px; }
.media-item__hint { font-size: 13px; color: var(--ink-subtle); }

.media-item__body { margin-top: var(--s3); }
.media-item__action, .slot__action { width: 100%; }

/* Check indicator — lavender ring → green when done */
.check {
  flex: none;
  width: 22px;
  height: 22px;
  border-radius: var(--r-pill);
  border: 2px solid var(--accent);
  position: relative;
  margin-top: 1px;
  transition: background 0.2s ease, border-color 0.2s ease;
}
.media-item.is-done .check,
.media-item--group.is-done .check {
  background: var(--success);
  border-color: var(--success);
}
.media-item.is-done .check::after,
.media-item--group.is-done .check::after {
  content: "";
  position: absolute;
  left: 6px;
  top: 2px;
  width: 5px;
  height: 10px;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

/* ------------------------------------------------------------- Slots */
.slots {
  margin-top: var(--s3);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--s3);
}

.slot {
  display: flex;
  flex-direction: column;
  gap: var(--s2);
  padding: var(--s3);
  background: var(--surface-2);
  border: 1px solid var(--hairline);
  border-radius: var(--r-input);
}
.slot__name { font-size: 13px; font-weight: 500; color: var(--ink-muted); }

/* ----------------------------------------------------------- Preview */
.media-preview {
  margin-top: var(--s3);
  display: flex;
  flex-direction: column;
  gap: var(--s2);
}

.media-preview__frame {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;
  border-radius: var(--r-input);
  overflow: hidden;
  border: 1px solid var(--hairline);
  background: var(--surface-3);
  cursor: pointer;
}
.media-preview__frame img,
.media-preview__frame video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.media-preview__play {
  position: absolute;
  inset: 0;
  margin: auto;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: var(--r-pill);
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
  pointer-events: none;
}
.media-preview__play svg { width: 20px; height: 20px; }

.media-preview__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s2);
}
.media-preview__status {
  font-size: 12px;
  color: var(--success);
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: var(--s1);
}
.media-preview__replace {
  background: none;
  border: none;
  color: var(--accent-hover);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  padding: var(--s2);
  min-height: var(--tap);
}

/* Uploading state */
.media-preview__uploading {
  font-size: 13px;
  color: var(--ink-subtle);
  display: inline-flex;
  align-items: center;
  gap: var(--s2);
}
.spinner {
  width: 14px;
  height: 14px;
  border: 2px solid var(--hairline-strong);
  border-top-color: var(--accent-hover);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ----------------------------------------------------------- Progress */
.checklist__progress {
  position: sticky;
  top: 64px;
  z-index: 4;
  padding: var(--s3) 0;
  background: linear-gradient(var(--canvas) 80%, transparent);
}
.progress { display: flex; align-items: center; gap: var(--s3); }
.progress__track {
  flex: 1;
  height: 6px;
  background: var(--surface-3);
  border-radius: var(--r-pill);
  overflow: hidden;
}
.progress__fill {
  height: 100%;
  width: 0%;
  background: var(--accent);
  border-radius: var(--r-pill);
  transition: width 0.3s ease, background 0.3s ease;
}
.progress__fill.is-complete { background: var(--success); }
.progress__label {
  font-size: 13px;
  font-weight: 500;
  color: var(--ink-muted);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.checklist__footer { margin-top: var(--s6); }

/* ----------------------------------------------------------- Success */
.success {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--s3);
  padding: var(--s7) var(--s4);
  margin-top: var(--s7);
}
.success__icon {
  width: 64px;
  height: 64px;
  display: grid;
  place-items: center;
  border-radius: var(--r-pill);
  background: rgba(39, 166, 68, 0.12);
  border: 1px solid rgba(39, 166, 68, 0.4);
  color: var(--success);
}
.success__icon svg { width: 30px; height: 30px; }
.success__title { font-size: 22px; letter-spacing: -0.4px; }
.success__text { margin: 0 0 var(--s4); color: var(--ink-muted); font-size: 15px; max-width: 320px; }
.success .btn { max-width: 320px; }

/* ------------------------------------------------------------- Toast */
.toast {
  position: fixed;
  left: 50%;
  bottom: calc(var(--s5) + env(safe-area-inset-bottom));
  transform: translate(-50%, 16px);
  max-width: calc(100% - 32px);
  padding: var(--s3) var(--s4);
  background: var(--surface-2);
  border: 1px solid var(--hairline-strong);
  border-radius: var(--r-pill);
  color: var(--ink);
  font-size: 14px;
  font-weight: 500;
  text-align: center;
  z-index: 50;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
}
.toast.is-visible { opacity: 1; transform: translate(-50%, 0); }
.toast.is-error { border-color: rgba(229, 72, 77, 0.6); }
.toast.is-error::before { content: ""; }
.toast.is-success { border-color: rgba(39, 166, 68, 0.6); }

/* ----------------------------------------------------------- Lightbox */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 60;
  background: rgba(0, 0, 0, 0.7);
  display: grid;
  place-items: center;
  padding: var(--s5);
  animation: fade 0.18s ease both;
}
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }

.lightbox__stage {
  max-width: 100%;
  max-height: 90dvh;
  display: grid;
  place-items: center;
}
.lightbox__stage img,
.lightbox__stage video {
  max-width: 100%;
  max-height: 90dvh;
  border-radius: var(--r-card);
  border: 1px solid var(--hairline-strong);
}

.lightbox__close {
  position: absolute;
  top: max(var(--s4), env(safe-area-inset-top));
  right: var(--s4);
  width: var(--tap);
  height: var(--tap);
  display: grid;
  place-items: center;
  background: var(--surface-2);
  border: 1px solid var(--hairline-strong);
  border-radius: var(--r-pill);
  color: var(--ink);
  cursor: pointer;
}
.lightbox.hidden {
  display: none !important;
  visibility: hidden;
  pointer-events: none;
}

/* -------------------------------------------------------- Config error */
.config-error {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  padding: var(--s5);
  background: var(--canvas);
  z-index: 100;
}
.config-error__card {
  max-width: 360px;
  text-align: center;
  padding: var(--s5);
  background: var(--surface-1);
  border: 1px solid var(--hairline);
  border-radius: var(--r-card);
}
.config-error__card h1 { font-size: 20px; margin-bottom: var(--s3); }
.config-error__card p { margin: 0; color: var(--ink-muted); font-size: 14px; }

/* ------------------------------------------------------- Wider screens */
@media (min-width: 600px) {
  .chooser__title { font-size: 40px; }
}

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

/* =====================================================================
   Admin panel — tabs, shared helpers
   ===================================================================== */
.fin { padding: var(--s4) var(--s4) var(--s7); max-width: 860px; margin: 0 auto; }

.fin-tabs { display: flex; flex-wrap: wrap; gap: var(--s2); margin-bottom: var(--s5); }
.fin-tab {
  appearance: none; border: 1px solid var(--hairline); background: var(--surface-1);
  color: var(--ink-subtle); border-radius: var(--r-pill); padding: 8px 18px;
  font: inherit; font-size: 14px; font-weight: 500; cursor: pointer; min-height: var(--tap);
  display: inline-flex; align-items: center; text-decoration: none;
  transition: color .15s, border-color .15s, background .15s;
}
.fin-tab:hover { color: var(--ink); }
.fin-tab.is-active { color: var(--ink); border-color: var(--accent); background: rgba(94,106,210,.12); }

.fin-actions { display: flex; flex-wrap: wrap; gap: var(--s2); align-items: center; }
.fin-actions .btn { width: auto; min-height: 40px; padding: 0 16px; }
.fin-hint { margin: var(--s3) 0 0; color: var(--ink-subtle); font-size: 13px; line-height: 1.45; }
.fin-empty { color: var(--ink-subtle); font-size: 14px; margin: var(--s2) 0; }

/* ---- Admin checklists ---------------------------------------------- */
.chk-list { display: flex; flex-direction: column; gap: var(--s2); margin-top: var(--s4); }

.chk-item {
  background: var(--surface-1);
  border: 1px solid var(--hairline);
  border-radius: var(--r-input);
  overflow: hidden;
}
.chk-item[open] { border-color: var(--hairline-strong); }

.chk-item__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s3);
  padding: var(--s3) var(--s4);
  cursor: pointer;
  list-style: none;
  min-height: var(--tap);
}
.chk-item__head::-webkit-details-marker { display: none; }
.chk-item__head::after {
  content: '';
  width: 8px; height: 8px;
  border-right: 2px solid var(--ink-tertiary);
  border-bottom: 2px solid var(--ink-tertiary);
  transform: rotate(45deg);
  flex-shrink: 0;
  margin-right: 4px;
  transition: transform .15s;
}
.chk-item[open] .chk-item__head::after { transform: rotate(-135deg); margin-top: 4px; }

.chk-item__main { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.chk-item__name { font-size: 15px; font-weight: 600; letter-spacing: -0.2px; }
.chk-item__meta { font-size: 12px; color: var(--ink-tertiary); margin-top: 2px; }
.chk-item__when { font-size: 11px; color: var(--ink-subtle); white-space: nowrap; flex-shrink: 0; }

.chk-item__body { padding: 0 var(--s4) var(--s4); border-top: 1px solid var(--hairline); }
.chk-item__signoff { margin: var(--s3) 0 var(--s4); font-size: 13px; color: var(--ink-muted); }

.chk-media-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--s3);
}
@media (min-width: 480px) {
  .chk-media-grid { grid-template-columns: repeat(3, 1fr); }
}

.chk-media {
  appearance: none;
  border: 1px solid var(--hairline);
  background: var(--surface-2);
  border-radius: var(--r-input);
  padding: var(--s2);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: var(--s2);
  text-align: left;
  color: inherit;
  font: inherit;
  transition: border-color .15s, background .15s;
}
.chk-media:hover { border-color: var(--accent); background: var(--surface-3); }
.chk-media:focus-visible { outline: 2px solid var(--accent-focus); outline-offset: 2px; }

.chk-media__thumb {
  aspect-ratio: 4 / 3;
  border-radius: var(--r-chip);
  overflow: hidden;
  background: var(--canvas);
  display: flex;
  align-items: center;
  justify-content: center;
}
.chk-media__thumb img,
.chk-media__thumb video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.chk-media__video-thumb {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  background: var(--surface-3);
  color: var(--ink-muted);
}
.chk-media__video-thumb svg {
  width: 32px;
  height: 32px;
  opacity: 0.85;
}
.chk-media__label { font-size: 11px; font-weight: 500; color: var(--ink-subtle); line-height: 1.3; }

/* Checklist files still uploading from the tech's phone (public /checklists page). */
.chk-badge {
  flex-shrink: 0;
  margin-right: var(--s2);
  padding: 3px 9px;
  border-radius: var(--r-pill);
  background: rgba(94, 106, 210, 0.18);
  color: #a9b2ff;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
}
.chk-media--pending { cursor: default; opacity: 0.85; }
.chk-media--pending:hover { border-color: var(--hairline); background: var(--surface-2); }
.chk-media__sub { font-weight: 400; color: var(--ink-tertiary); }
.chk-media__spinner {
  display: block;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 2px solid var(--hairline-strong);
  border-top-color: var(--accent);
  animation: chk-spin 0.9s linear infinite;
}
@keyframes chk-spin { to { transform: rotate(360deg); } }

.hire-flags { display: flex; flex-wrap: wrap; gap: var(--s2); margin: var(--s3) 0; }
.hire-flag {
  font-size: 12px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: var(--r-pill);
  background: rgba(39, 166, 68, 0.14);
  color: #8ee0a4;
}
.hire-flag.is-no { background: rgba(229, 72, 77, 0.16); color: #ffb4b4; }
.hire-contact { margin: 0 0 var(--s3); font-size: 14px; }
.hire-contact a { color: var(--accent); }
.hire-resume {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  margin-top: var(--s3);
  padding: 0 14px;
  border-radius: var(--r-pill);
  border: 1px solid var(--hairline-strong);
  color: var(--ink);
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
}
.hire-resume:hover { border-color: var(--accent); }

/* =====================================================================
   EMPLOYEE PORTAL — login, signup, onboarding, training, hub extras
   ===================================================================== */

/* ---------------------------------------------------------- Tech login */
.login {
  position: relative;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: var(--s6);
  padding: var(--s6) 0;
}

.login__brand {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--s2);
}

.login__logo {
  width: 64px;
  height: 64px;
  object-fit: contain;
  filter: drop-shadow(0 0 24px rgba(94, 106, 210, 0.25));
}

.login__title {
  font-size: 28px;
  letter-spacing: -0.8px;
  margin-top: var(--s2);
}

.login__subtitle {
  margin: 0;
  color: var(--ink-subtle);
  font-size: 15px;
}

.login__foot {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--s3);
}

.login__hint {
  margin: 0;
  color: var(--ink-tertiary);
  font-size: 13px;
  text-align: center;
}

/* Floating back-to-chooser button on the login / admin gate screens */
.login__back {
  position: absolute;
  top: calc(var(--s4) + env(safe-area-inset-top, 0px));
  left: 0;
  display: inline-flex;
  align-items: center;
  gap: var(--s1);
  background: var(--surface-1);
  border: 1px solid var(--hairline);
  border-radius: var(--r-pill);
  color: var(--ink-subtle);
  font-size: 14px;
  font-weight: 500;
  padding: var(--s2) var(--s4) var(--s2) var(--s3);
  cursor: pointer;
  min-height: var(--tap);
  transition: border-color 0.15s ease, color 0.15s ease;
}
.login__back svg { width: 18px; height: 18px; }
.login__back:hover { border-color: var(--hairline-strong); color: var(--ink); }

/* Icon badge used where there's no logo (admin gate) */
.login__badge {
  width: 64px;
  height: 64px;
  display: grid;
  place-items: center;
  background: var(--surface-1);
  border: 1px solid var(--hairline-strong);
  border-radius: 50%;
  color: var(--accent-hover);
}
.login__badge svg { width: 28px; height: 28px; }

/* ------------------------------------------------------------ PIN pad */
.pin {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--s4);
}

.pin__dots {
  display: flex;
  gap: var(--s4);
  padding: var(--s2) 0;
}

.pin__dot {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 1.5px solid var(--hairline-strong);
  background: transparent;
  transition: background 0.12s ease, border-color 0.12s ease, transform 0.12s ease;
}

.pin__dot.is-filled {
  background: var(--accent);
  border-color: var(--accent);
  transform: scale(1.1);
}

.pin__error {
  margin: 0;
  color: var(--danger);
  font-size: 14px;
  font-weight: 500;
  text-align: center;
  max-width: 320px;
}

.keypad {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--s3);
  width: min(300px, 84vw);
}

.keypad__btn {
  height: 64px;
  border-radius: var(--r-card);
  border: 1px solid var(--hairline);
  background: var(--surface-1);
  color: var(--ink);
  font-size: 24px;
  font-weight: 500;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.12s ease, border-color 0.12s ease, transform 0.06s ease;
  -webkit-tap-highlight-color: transparent;
}

.keypad__btn:active {
  background: var(--surface-3);
  transform: scale(0.96);
}

.keypad__btn--del { color: var(--ink-subtle); }
.keypad__btn--del svg { width: 26px; height: 26px; }

.keypad__gap { pointer-events: none; }

@keyframes pinShake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-8px); }
  40% { transform: translateX(8px); }
  60% { transform: translateX(-6px); }
  80% { transform: translateX(6px); }
}
.is-shake { animation: pinShake 0.4s ease; }

/* ------------------------------------------------------------- Signup */
.signup {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: var(--s6) 0;
}

.signup__card {
  display: flex;
  flex-direction: column;
  gap: var(--s4);
}

.signup__card--center {
  align-items: center;
  text-align: center;
}

.signup__title {
  font-size: 26px;
  letter-spacing: -0.7px;
  line-height: 1.25;
}

.signup__text {
  margin: 0;
  color: var(--ink-muted);
  font-size: 16px;
  line-height: 1.55;
}

.signup__label { font-size: 15px; }

.signup__card .pin { margin-top: var(--s2); }

.input--big {
  font-size: 18px;
  min-height: 56px;
}

.btn--big {
  min-height: 56px;
  font-size: 17px;
}

.success__icon--party {
  font-size: 52px;
  background: none;
  border: none;
}

/* --------------------------------------------------- Journey (steps) */
.journey {
  display: flex;
  flex-direction: column;
  gap: var(--s5);
  padding-bottom: var(--s6);
}

.journey__head { display: flex; flex-direction: column; gap: var(--s2); }

.journey__title {
  font-size: 24px;
  letter-spacing: -0.6px;
}

.journey__text {
  margin: 0;
  color: var(--ink-muted);
  font-size: 15px;
  line-height: 1.55;
}

/* Papers progress bar */
.docbar {
  display: flex;
  align-items: center;
  gap: var(--s3);
}

.docbar__track {
  flex: 1;
  height: 8px;
  border-radius: 4px;
  background: var(--surface-3);
  overflow: hidden;
}

.docbar__fill {
  height: 100%;
  border-radius: 4px;
  background: var(--accent);
  transition: width 0.3s ease;
}

.docbar__label {
  flex: none;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-subtle);
  white-space: nowrap;
}

.journey__hint {
  margin: 0;
  color: var(--ink-tertiary);
  font-size: 13px;
  text-align: center;
}

/* ------------------------------------------- Doc / module list items */
.doc-list {
  display: flex;
  flex-direction: column;
  gap: var(--s3);
}

.doc-item {
  display: flex;
  align-items: center;
  gap: var(--s3);
  width: 100%;
  text-align: left;
  padding: var(--s4);
  border-radius: var(--r-card);
  border: 1px solid var(--hairline);
  background: var(--surface-1);
  color: var(--ink);
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
  -webkit-tap-highlight-color: transparent;
}

.doc-item:disabled {
  opacity: 0.45;
  cursor: default;
}

.doc-item.is-next {
  border-color: var(--accent);
  background: rgba(94, 106, 210, 0.08);
}

.doc-item.is-signed .doc-item__check {
  background: rgba(39, 166, 68, 0.15);
  border-color: transparent;
  color: var(--success);
}

.doc-item__check {
  width: 34px;
  height: 34px;
  flex: none;
  border-radius: 50%;
  border: 1px solid var(--hairline-strong);
  background: var(--surface-3);
  display: flex;
  align-items: center;
  justify-content: center;
}

.doc-item__check svg { width: 18px; height: 18px; }

.doc-item__idx {
  font-size: 14px;
  font-weight: 600;
  color: var(--ink-subtle);
}

.mod-item__icon {
  font-size: 18px;
  border: none;
  background: var(--surface-3);
}

.doc-item__body {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  flex: 1;
}

.doc-item__title {
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.2px;
}

.doc-item__sub {
  font-size: 13px;
  color: var(--ink-subtle);
  line-height: 1.4;
}

.doc-item.is-signed .doc-item__sub { color: var(--success); }

.doc-item__cta {
  flex: none;
  font-size: 13px;
  font-weight: 600;
  color: #fff;
  background: var(--accent);
  border-radius: var(--r-pill);
  padding: 6px 12px;
  white-space: nowrap;
}

/* --------------------------------------------------------- Doc reader
   Each paper renders as an actual light "sheet" inside the dark app, with
   a letterhead and a live signature line at the bottom. */
.doc-read {
  display: flex;
  flex-direction: column;
  gap: var(--s4);
  padding: var(--s4) 0 var(--s7);
}

.doc-read__meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.doc-read__eyebrow {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  color: var(--accent-hover);
}

.doc-read__signedtag {
  font-size: 12px;
  font-weight: 600;
  color: var(--success);
  background: rgba(39, 166, 68, 0.12);
  border-radius: var(--r-pill);
  padding: 4px 10px;
}

.paper {
  background: #faf8f2;
  color: #26262e;
  border-radius: var(--r-card);
  padding: var(--s5) var(--s5) var(--s5);
  display: flex;
  flex-direction: column;
  gap: var(--s4);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.08),
    0 16px 40px rgba(0, 0, 0, 0.5);
}

.paper__letterhead {
  display: flex;
  align-items: center;
  gap: var(--s2);
  padding-bottom: var(--s3);
  border-bottom: 1px solid #e5e1d3;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  color: #8b8a80;
}
.paper__letterhead img { display: block; }

.paper__title {
  font-size: 20px;
  font-weight: 650;
  letter-spacing: -0.4px;
  color: #17171c;
  line-height: 1.3;
}

.paper__body { display: flex; flex-direction: column; gap: var(--s3); }
.paper__body p {
  margin: 0;
  font-size: 15px;
  line-height: 1.7;
  color: #3c3c45;
}

.paper__sig { margin-top: var(--s2); }

.paper__sigline {
  min-height: 48px;
  display: flex;
  align-items: flex-end;
  padding: 0 var(--s2) 4px;
  border-bottom: 1.5px solid #26262e;
}

.paper__signame {
  font-family: "Snell Roundhand", "Segoe Script", "Bradley Hand", cursive;
  font-size: 28px;
  line-height: 1.1;
  color: #1c1c66;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.paper__sigmeta {
  display: flex;
  justify-content: space-between;
  padding-top: 6px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: #9a988c;
}

.doc-sign {
  display: flex;
  flex-direction: column;
  gap: var(--s3);
}

/* ------------------------------------------------------------ Lessons */
.lesson {
  display: flex;
  flex-direction: column;
  gap: var(--s4);
  padding-bottom: var(--s6);
}

.lesson__meter {
  display: flex;
  gap: 4px;
}

.lesson__tick {
  flex: 1;
  height: 4px;
  border-radius: 2px;
  background: var(--surface-3);
  transition: background 0.2s ease;
}

.lesson__tick.is-on { background: var(--accent); }

.lesson__card {
  background: var(--surface-1);
  border: 1px solid var(--hairline);
  border-radius: var(--r-card);
  padding: var(--s5);
  display: flex;
  flex-direction: column;
  gap: var(--s3);
  min-height: 300px;
  animation: viewIn 0.24s ease both;
}

.lesson__icon { font-size: 36px; line-height: 1; }

.lesson__title {
  font-size: 21px;
  letter-spacing: -0.5px;
  line-height: 1.3;
}

.lesson__line {
  margin: 0;
  font-size: 16px;
  line-height: 1.6;
  color: var(--ink-muted);
}

.lesson__callout {
  border-radius: var(--r-input);
  border: 1px solid rgba(229, 72, 77, 0.35);
  background: rgba(229, 72, 77, 0.1);
  color: var(--ink);
  font-size: 15px;
  font-weight: 600;
  line-height: 1.5;
  padding: var(--s3) var(--s4);
}

.lesson__nav {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: var(--s3);
}

.lesson__nav .btn { min-height: 56px; font-size: 16px; }

.lesson__count {
  margin: 0;
  text-align: center;
  color: var(--ink-tertiary);
  font-size: 13px;
}

/* --------------------------------------------------------------- Quiz */
.quiz {
  display: flex;
  flex-direction: column;
  gap: var(--s4);
  padding-bottom: var(--s6);
}

.quiz__count {
  margin: 0;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  color: var(--accent-hover);
}

.quiz__q {
  font-size: 21px;
  letter-spacing: -0.5px;
  line-height: 1.35;
}

.quiz__options {
  display: flex;
  flex-direction: column;
  gap: var(--s3);
}

.quiz__opt {
  display: flex;
  align-items: center;
  gap: var(--s3);
  width: 100%;
  text-align: left;
  padding: var(--s4);
  border-radius: var(--r-card);
  border: 1px solid var(--hairline);
  background: var(--surface-1);
  color: var(--ink);
  font-size: 16px;
  line-height: 1.4;
  cursor: pointer;
  transition: border-color 0.12s ease, background 0.12s ease;
  -webkit-tap-highlight-color: transparent;
}

.quiz__opt:not(:disabled):active { border-color: var(--accent); }

.quiz__letter {
  width: 30px;
  height: 30px;
  flex: none;
  border-radius: 50%;
  background: var(--surface-3);
  border: 1px solid var(--hairline-strong);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  color: var(--ink-subtle);
}

.quiz__opt.is-correct {
  border-color: var(--success);
  background: rgba(39, 166, 68, 0.12);
}
.quiz__opt.is-correct .quiz__letter {
  background: var(--success);
  border-color: var(--success);
  color: #fff;
}

.quiz__opt.is-wrong {
  border-color: var(--danger);
  background: rgba(229, 72, 77, 0.1);
}
.quiz__opt.is-wrong .quiz__letter {
  background: var(--danger);
  border-color: var(--danger);
  color: #fff;
}

.quiz__opt.is-dim { opacity: 0.45; }

.quiz__feedback {
  border-radius: var(--r-input);
  padding: var(--s3) var(--s4);
  font-size: 15px;
  line-height: 1.5;
  color: var(--ink-muted);
}

.quiz__feedback.is-good {
  border: 1px solid rgba(39, 166, 68, 0.4);
  background: rgba(39, 166, 68, 0.1);
}

.quiz__feedback.is-bad {
  border: 1px solid rgba(229, 72, 77, 0.35);
  background: rgba(229, 72, 77, 0.08);
}

.quiz__bigscore {
  font-size: 44px;
  font-weight: 700;
  letter-spacing: -1px;
  color: var(--ink);
}

.quiz__bigscore--pass { color: var(--success); }

/* -------------------------------------------------------- Hub extras */
.topbar__logout {
  background: none;
  border: none;
  color: var(--ink-tertiary);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  min-height: var(--tap);
  padding: var(--s2);
}
.topbar__logout:hover { color: var(--ink); text-decoration: underline; }

.hub-help {
  margin: var(--s6) 0 0;
  text-align: center;
  color: var(--ink-tertiary);
  font-size: 13px;
}

.hub-help__link {
  color: var(--ink-subtle);
  font-weight: 600;
}

.acc__num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--surface-3);
  border: 1px solid var(--hairline-strong);
  font-size: 12px;
  font-weight: 700;
  color: var(--ink-subtle);
  margin-right: var(--s1);
}

.acc__emoji { font-size: 15px; }

.howto {
  display: flex;
  flex-direction: column;
  gap: var(--s2);
  margin-bottom: var(--s4);
}

.howto__step {
  display: flex;
  align-items: center;
  gap: var(--s3);
  font-size: 14px;
  color: var(--ink-muted);
  background: var(--surface-1);
  border: 1px solid var(--hairline);
  border-radius: var(--r-input);
  padding: var(--s3);
}

.howto__num {
  width: 24px;
  height: 24px;
  flex: none;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
}

.paylink--accent { border-color: rgba(94, 106, 210, 0.55); }

.paylink__note {
  font-size: 13px;
  color: var(--ink-subtle);
  line-height: 1.5;
}

.pay-list {
  display: flex;
  flex-direction: column;
  gap: var(--s4);
  margin-bottom: var(--s5);
}

.pay-glance {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--s2);
  margin-bottom: var(--s4);
}

.pay-glance__card {
  background: linear-gradient(180deg, rgba(94, 106, 210, 0.16), rgba(94, 106, 210, 0.05));
  border: 1px solid rgba(94, 106, 210, 0.35);
  border-radius: var(--r-card);
  padding: var(--s3);
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.pay-glance__label {
  font-size: 12px;
  color: var(--ink-subtle);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.pay-glance__value {
  font-size: 15px;
  line-height: 1.2;
  letter-spacing: -0.2px;
}

.pay-glance__sub {
  font-size: 12px;
  line-height: 1.4;
  color: var(--ink-muted);
}

.pay-group {
  display: flex;
  flex-direction: column;
  gap: var(--s2);
}

.pay-group__title {
  font-size: 17px;
  letter-spacing: -0.3px;
}

.pay-group__note {
  font-size: 13px;
  color: var(--ink-subtle);
}

.pay-group__cards {
  display: flex;
  flex-direction: column;
  gap: var(--s3);
}

.pay-card {
  background: var(--surface-1);
  border: 1px solid var(--hairline);
  border-radius: var(--r-card);
  padding: var(--s4);
}

.pay-card__head {
  display: flex;
  align-items: center;
  gap: var(--s3);
  margin-bottom: var(--s2);
}

.pay-card__icon { font-size: 22px; line-height: 1; }

.pay-card__title {
  font-size: 16px;
  letter-spacing: -0.3px;
}

.pay-card__lines {
  margin: 0;
  padding-left: 18px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.pay-card__lines li {
  font-size: 14px;
  line-height: 1.55;
  color: var(--ink-muted);
}

@media (max-width: 760px) {
  .pay-glance {
    grid-template-columns: 1fr;
  }
}

/* ---- Admin: Inventory tab --------------------------------------------- */
.inv-heading { margin: var(--s5) 0 var(--s3); font-size: 13px; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; color: var(--ink-subtle); }
.inv-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: var(--s3); }
.inv-card {
  display: flex; flex-direction: column; gap: var(--s2);
  padding: var(--s3) var(--s4);
  border-radius: var(--r-card);
  border: 1px solid var(--hairline);
  background: var(--surface-1);
}
.inv-card.is-low { border-color: rgba(229, 72, 77, 0.45); }
.inv-card__name { font-size: 14px; font-weight: 600; letter-spacing: -0.2px; }
.inv-card__qty { font-size: 28px; font-weight: 600; letter-spacing: -0.8px; line-height: 1; font-variant-numeric: tabular-nums; }
.inv-card.is-low .inv-card__qty { color: #ffb4b4; }
.inv-card__meta { font-size: 12px; color: var(--ink-subtle); }
.inv-card__form { display: flex; gap: var(--s2); margin-top: var(--s1); }
.inv-card__form input {
  flex: 1; min-width: 0; min-height: 40px; padding: 8px 10px;
  border-radius: var(--r-input); border: 1px solid var(--hairline);
  background: var(--surface-2); color: var(--ink); font: inherit; font-size: 15px;
}
.inv-card__form input:focus { outline: 2px solid var(--accent-focus); border-color: var(--accent-focus); }
.inv-card__form .btn { min-height: 40px; padding: 0 14px; font-size: 14px; }
.inv-taken { display: flex; flex-wrap: wrap; gap: var(--s2); margin: var(--s3) 0 0; }
.inv-taken__chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 10px; border-radius: var(--r-pill);
  background: rgba(94, 106, 210, 0.16); color: var(--accent-hover);
  font-size: 12px; font-weight: 600;
}
.inv-notes { margin: var(--s3) 0 0; font-size: 13px; color: var(--ink-muted); }
.inv-notes strong { color: var(--ink); }
.inv-ack { margin: var(--s3) 0 0; font-size: 12px; color: var(--ink-subtle); }
