/* Wydaho FOH — Tablet-first dark theme */
:root {
  --bg: #111110;
  --surface: #1a1a19;
  --surface2: #242423;
  --border: #333332;
  --text: #f0efe9;
  --muted: #888883;
  --accent: #d1432a;
  --green: #3ecf8e;
  --accent2: #c8a86b;
  --yellow: #f7c948;
  --orange: #f6993f;
}

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

html, body {
  font-family: 'Open Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 18px;
  line-height: 1.5;
  height: 100%;
  overflow: hidden;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}

/* ── Login Screen ─────────────────────────────────────────────── */

.login-screen {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  padding: 24px;
}

.login-screen .brand {
  margin-bottom: 32px;
  text-align: center;
}

.login-screen .brand img {
  height: 48px;
  margin-bottom: 8px;
}

.login-screen .brand-sub {
  display: block;
  color: var(--accent);
  font-weight: 600;
  font-size: 14px;
  letter-spacing: 2px;
  text-transform: uppercase;
}

.team-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 12px;
  max-width: 800px;
  width: 100%;
  max-height: 60vh;
  overflow-y: auto;
  padding: 4px;
}

.team-btn {
  background: var(--surface2);
  border: 2px solid var(--border);
  color: var(--text);
  border-radius: 12px;
  padding: 20px 16px;
  font-size: 18px;
  font-weight: 600;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
  text-align: center;
}

.team-btn:active {
  background: var(--accent);
  border-color: var(--accent);
}

/* PIN Pad */
.pin-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.85);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 100;
}

.pin-pad {
  background: var(--surface);
  border-radius: 20px;
  padding: 32px;
  max-width: 340px;
  width: 90%;
}

.pin-pad h3 {
  text-align: center;
  margin-bottom: 16px;
  font-size: 20px;
}

.pin-dots {
  display: flex;
  justify-content: center;
  gap: 16px;
  margin-bottom: 24px;
}

.pin-dot {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 2px solid var(--border);
  transition: background 0.1s;
}

.pin-dot.filled {
  background: var(--accent);
  border-color: var(--accent);
}

.pin-keys {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.pin-key {
  background: var(--surface2);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 12px;
  padding: 18px;
  font-size: 24px;
  font-weight: 600;
  cursor: pointer;
  text-align: center;
  transition: background 0.1s;
}

.pin-key:active { background: var(--accent); }
.pin-key.fn { font-size: 16px; }

.pin-error {
  color: var(--accent);
  text-align: center;
  margin-top: 12px;
  font-size: 14px;
  min-height: 20px;
}

/* ── Lock Screen ──────────────────────────────────────────────── */
.lock-screen {
  position: fixed; inset: 0; z-index: 9000;
  background: rgba(0,0,0,0.92);
  display: flex; align-items: center; justify-content: center;
  backdrop-filter: blur(10px);
}
.lock-content {
  text-align: center;
  width: 320px;
}
.lock-pin-dots {
  display: flex; justify-content: center; gap: 16px;
  margin-bottom: 20px;
}

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

/* ── App Shell ────────────────────────────────────────────────── */

.app-shell {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.app-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 20px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.app-header .logo { height: 32px; }
.app-header .user-info {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 14px;
  color: var(--muted);
}

.app-header .logout-btn {
  background: none;
  border: 1px solid var(--border);
  color: var(--muted);
  border-radius: 6px;
  padding: 4px 12px;
  font-size: 12px;
  cursor: pointer;
}

.app-content {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
}

/* ── Bottom Nav ───────────────────────────────────────────────── */

.bottom-nav {
  display: flex;
  background: var(--surface);
  border-top: 1px solid var(--border);
  flex-shrink: 0;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.bottom-nav::-webkit-scrollbar { height: 0; }

.bottom-nav a {
  flex: 1 0 auto;
  min-width: 78px;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 10px 8px;
  color: var(--muted);
  text-decoration: none;
  font-size: 12px;
  font-weight: 600;
  transition: color 0.15s;
  gap: 2px;
}

.bottom-nav a.active { color: var(--accent); }
.bottom-nav a .nav-icon { font-size: 24px; }

/* ── Pages ────────────────────────────────────────────────────── */

.page { display: none; }
.page.active { display: block; }

/* ── Cards ────────────────────────────────────────────────────── */

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  margin-bottom: 16px;
  overflow: hidden;
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
}

.card-title { font-weight: 700; font-size: 18px; }

/* ── Checklist ────────────────────────────────────────────────── */

.checklist-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
}

.checklist-tab {
  flex: 1;
  padding: 14px;
  background: var(--surface2);
  border: 2px solid var(--border);
  border-radius: 10px;
  color: var(--muted);
  font-size: 16px;
  font-weight: 600;
  text-align: center;
  cursor: pointer;
}

.checklist-tab.active {
  color: var(--text);
  border-color: var(--accent);
  background: var(--surface);
}

.checklist-progress {
  height: 6px;
  background: var(--surface2);
  border-radius: 3px;
  margin-bottom: 16px;
  overflow: hidden;
}

.checklist-progress-bar {
  height: 100%;
  background: var(--green);
  border-radius: 3px;
  transition: width 0.3s;
}

.checklist-item-wrapper {
  border-bottom: 1px solid var(--border);
}
.checklist-item-wrapper:last-child { border-bottom: none; }

.checklist-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 20px;
  transition: background 0.1s;
  min-height: 56px;
}

.check-box {
  width: 32px;
  height: 32px;
  border: 2px solid var(--border);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 20px;
  transition: all 0.15s;
  cursor: pointer;
}

.check-box:active { transform: scale(0.9); }

.checklist-item.done .check-box {
  background: var(--green);
  border-color: var(--green);
  color: #fff;
}

.checklist-item.done .item-desc { color: var(--muted); text-decoration: line-through; }

.item-desc { flex: 1; font-size: 16px; }
.item-meta { font-size: 12px; color: var(--muted); text-align: right; }

.checklist-detail {
  display: none;
  padding: 0 20px 16px 68px;
}

.checklist-item-wrapper.open .checklist-detail {
  display: block;
}

/* ── Maintenance Overdue ─────────────────────────────────────── */
.checklist-item-wrapper.overdue {
  background: rgba(209, 67, 42, 0.15);
  border-left: 3px solid var(--accent);
}
.checklist-item-wrapper.overdue .check-box {
  border-color: var(--accent);
  color: var(--accent);
}
.overdue-text {
  color: var(--accent);
  font-weight: 600;
}

/* ── EOD Counts ───────────────────────────────────────────────── */

.eod-item {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  padding: 10px 8px;
  border-bottom: 1px solid var(--border);
  gap: 8px;
}

.eod-item:last-child { border-bottom: none; }

.eod-item-name {
  font-size: 15px;
  font-weight: 600;
  flex: 1;
  min-width: 120px;
}

.eod-item-info {
  width: 100%;
  margin-top: -4px;
  margin-bottom: 4px;
}

.eod-item-inputs {
  display: flex;
  gap: 12px;
  margin-left: auto;
}

.eod-input-group {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.eod-input-group label {
  font-size: 11px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.eod-input {
  width: 70px;
  padding: 10px 8px;
  text-align: center;
  font-size: 18px;
  font-weight: 600;
  background: var(--surface2);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 10px;
  -moz-appearance: textfield;
}

.eod-input::-webkit-inner-spin-button,
.eod-input::-webkit-outer-spin-button { -webkit-appearance: none; }

.eod-input:focus {
  outline: none;
  border-color: var(--accent);
}

.eod-input.has-value {
  border-color: var(--green);
  color: var(--green);
}

.eod-input-waste:focus,
.eod-input-waste.has-value {
  border-color: var(--yellow);
  color: var(--yellow);
}

.eod-input-start:focus,
.eod-input-start.has-value {
  border-color: var(--accent2);
  color: var(--accent2);
}

.eod-saved-tick {
  font-size: 16px;
  color: var(--green);
  opacity: 0;
  transition: opacity 0.25s;
  pointer-events: none;
  min-width: 18px;
  margin-left: 6px;
}
.eod-saved-tick.show { opacity: 1; }

/* ── 86 Board ─────────────────────────────────────────────────── */

.eighty-six-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 12px;
}

.eighty-six-card {
  background: var(--accent);
  border-radius: 12px;
  padding: 20px;
  text-align: center;
  cursor: pointer;
  transition: opacity 0.15s;
}

.eighty-six-card:active { opacity: 0.7; }
.eighty-six-card .item-name { font-size: 18px; font-weight: 700; }
.eighty-six-card .item-meta { font-size: 12px; color: rgba(255,255,255,0.7); margin-top: 4px; }

.btn-86 {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 10px;
  padding: 14px 24px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  margin-bottom: 16px;
}

.btn-86:active { opacity: 0.8; }

/* 86 Item Picker Modal */
.picker-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.85);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding-top: 60px;
  z-index: 100;
}

.picker-panel {
  background: var(--surface);
  border-radius: 16px;
  padding: 24px;
  max-width: 500px;
  width: 90%;
  max-height: 70vh;
  overflow-y: auto;
}

.picker-search {
  width: 100%;
  padding: 14px;
  background: var(--surface2);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 10px;
  font-size: 18px;
  margin-bottom: 16px;
}

.picker-item {
  padding: 14px;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  font-size: 16px;
}

.picker-item:active { background: var(--surface2); }

/* ── Fresh Board ──────────────────────────────────────────────── */

.fresh-group { margin-bottom: 20px; }
.fresh-group-title {
  font-weight: 700;
  font-size: 16px;
  color: var(--accent2);
  margin-bottom: 8px;
  padding: 0 4px;
}

.fresh-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 20px;
  border-bottom: 1px solid var(--border);
  font-size: 16px;
  cursor: pointer;
  transition: background 0.1s;
}

.fresh-item:active { background: var(--surface2); }

.fresh-qty { color: var(--green); font-weight: 600; }

/* ── Handbook ─────────────────────────────────────────────────── */

.handbook-section { margin-bottom: 20px; }
.handbook-section-title {
  font-weight: 700;
  font-size: 16px;
  color: var(--accent2);
  margin-bottom: 8px;
  padding: 0 4px;
}

.handbook-item {
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: background 0.1s;
}

.handbook-item:last-child { border-bottom: none; }
.handbook-item:active { background: var(--surface2); }

.handbook-q {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  font-size: 16px;
  font-weight: 600;
}

.handbook-chevron {
  color: var(--muted);
  font-size: 14px;
  transition: transform 0.2s;
  flex-shrink: 0;
  margin-left: 12px;
}

.handbook-item.open .handbook-chevron {
  transform: rotate(90deg);
}

.handbook-a {
  display: none;
  padding: 0 20px 16px;
  font-size: 15px;
  color: var(--muted);
  line-height: 1.6;
}

.handbook-item.open .handbook-a {
  display: block;
}

/* ── Training ────────────────────────────────────────────────── */

.training-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  gap: 12px;
}

.training-member-selector select {
  min-width: 180px;
}

.training-progress-summary {
  display: flex;
  gap: 10px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.training-summary-chip {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 8px 14px;
  font-size: 13px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 6px;
  flex: 1;
  min-width: 100px;
  justify-content: center;
}

.training-summary-chip .chip-pct {
  color: var(--green);
}

.training-position { margin-bottom: 20px; }

.training-position-title {
  font-weight: 700;
  font-size: 16px;
  color: var(--accent2);
  margin-bottom: 8px;
  padding: 0 4px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.training-position-progress {
  font-size: 13px;
  color: var(--muted);
  font-weight: 400;
}

.training-item-wrapper {
  border-bottom: 1px solid var(--border);
}

.training-item-wrapper:last-child { border-bottom: none; }

.training-item-wrapper.expandable { cursor: pointer; }
.training-item-wrapper.expandable:active { background: var(--surface2); }

.training-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  min-height: 56px;
}

.training-check {
  width: 32px;
  height: 32px;
  border: 2px solid var(--border);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 18px;
  cursor: pointer;
  transition: all 0.15s;
}

.training-check:active { opacity: 0.7; }

.training-check.self-checked {
  background: var(--yellow);
  border-color: var(--yellow);
  color: #000;
}

.training-check.verified {
  background: var(--green);
  border-color: var(--green);
  color: #fff;
}

.training-item-info {
  flex: 1;
  min-width: 0;
}

.training-item-desc {
  font-size: 16px;
}

.training-item-meta {
  font-size: 12px;
  color: var(--muted);
  margin-top: 2px;
}

.training-item-actions {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
  align-items: center;
}

.training-video-btn {
  background: none;
  border: 1px solid var(--border);
  color: var(--accent);
  border-radius: 8px;
  width: 36px;
  height: 36px;
  font-size: 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.1s;
}

.training-video-btn:active { background: var(--surface2); }

.training-verify-btn {
  background: none;
  border: 1px solid var(--green);
  color: var(--green);
  border-radius: 8px;
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.1s;
}

.training-verify-btn:active { background: rgba(62,207,142,0.15); }

.training-uncheck-btn {
  background: none;
  border: 1px solid var(--accent);
  color: var(--accent);
  border-radius: 8px;
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.1s;
}

.training-uncheck-btn:active { background: rgba(209,67,42,0.15); }

/* Training expandable detail */
.training-chevron {
  color: var(--muted);
  font-size: 13px;
  margin-left: 8px;
  transition: transform 0.2s;
  display: inline-block;
}

.training-item-wrapper.open .training-chevron {
  transform: rotate(90deg);
}

.training-detail {
  display: none;
  padding: 0 16px 16px 60px;
}

.training-item-wrapper.open .training-detail {
  display: block;
}

.training-detail-text {
  background: var(--surface2);
  border-radius: 10px;
  padding: 16px;
  font-size: 15px;
  line-height: 1.7;
  color: var(--text);
  margin-bottom: 12px;
}

.training-video-btn-large {
  background: none;
  border: 1px solid var(--accent);
  color: var(--accent);
  border-radius: 10px;
  padding: 12px 20px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  transition: background 0.1s;
}

.training-video-btn-large:active { background: rgba(209,67,42,0.15); }

.training-video-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 12px;
}

.training-detail-actions {
  display: flex;
  gap: 8px;
  margin-top: 4px;
}

/* ── Shift Notes ─────────────────────────────────────────────── */

.shift-note-form { margin-bottom: 20px; }

.shift-note-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px 12px;
  margin-bottom: 6px;
  font-size: 15px;
  line-height: 1.45;
}

.shift-note-card.mgmt {
  border-left: 3px solid var(--accent2);
  background: #1f1d18;
}

.shift-note-header {
  display: inline;
  margin-right: 6px;
  white-space: nowrap;
}

.shift-note-author {
  font-weight: 700;
  font-size: 14px;
}

.shift-note-author.mgmt {
  color: var(--accent2);
}

.shift-note-time {
  font-size: 12px;
  color: var(--muted);
  margin-left: 4px;
}

.shift-note-body {
  display: inline;
  white-space: pre-wrap;
}

.shift-note-card.own {
  cursor: pointer;
}

.shift-note-card.own:active {
  opacity: 0.85;
}

.note-actions {
  display: flex;
  gap: 8px;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--border);
}

.mention-tag {
  color: var(--accent2);
  font-weight: 700;
}

.mention-picker {
  position: absolute;
  bottom: 100%;
  left: 0;
  right: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  max-height: 200px;
  overflow-y: auto;
  z-index: 50;
  margin-bottom: 4px;
  box-shadow: 0 -4px 16px rgba(0,0,0,0.4);
}

.mention-opt {
  padding: 12px 16px;
  font-size: 15px;
  cursor: pointer;
  border-bottom: 1px solid var(--border);
}

.mention-opt:last-child { border-bottom: none; }
.mention-opt:active { background: var(--surface2); }

/* ── Toast ────────────────────────────────────────────────────── */

.toast {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%) translateY(-100px);
  background: var(--surface2);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 12px 24px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  z-index: 200;
  transition: transform 0.3s;
  pointer-events: none;
}

.toast.show { transform: translateX(-50%) translateY(0); }
.toast.success { border-color: var(--green); }
.toast.error { border-color: var(--accent); }

/* ── Utilities ────────────────────────────────────────────────── */

.empty-state {
  text-align: center;
  color: var(--muted);
  padding: 60px 20px;
  font-size: 16px;
}

/* ── Break Tracking ──────────────────────────────────────── */
.break-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 12px;
}
.break-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}
.break-card-header .name { font-weight: 700; font-size: 16px; }
.break-card-header .shift-info { font-size: 13px; color: var(--muted); }
.break-slot {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border-top: 1px solid var(--border);
}
.break-slot.active {
  border-left: 3px solid var(--green);
  background: rgba(62, 207, 142, 0.08);
}
.break-slot.completed {
  opacity: 0.6;
}
.break-label {
  display: inline-block;
  border-radius: 6px;
  padding: 3px 10px;
  font-size: 12px;
  font-weight: 600;
}
.break-label.paid { background: rgba(62, 207, 142, 0.15); color: var(--green); }
.break-label.unpaid { background: rgba(246, 153, 63, 0.15); color: var(--orange); }
.break-timer {
  font-variant-numeric: tabular-nums;
  font-size: 24px;
  font-weight: 700;
  color: var(--accent);
  flex: 1;
  text-align: center;
}
.break-btn {
  padding: 10px 20px;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}
.break-btn.start { background: var(--green); color: #0f1117; }
.break-btn.start:active { opacity: 0.8; }
.break-btn.end { background: var(--accent); color: #fff; }
.break-btn.end:active { opacity: 0.8; }
.break-choice {
  padding: 16px;
  text-align: center;
  border-top: 1px solid var(--border);
}
.break-timestamp {
  font-size: 11px;
  color: var(--muted);
}

/* Scrollbar styling */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }


/* ── Mobile Orders (Kanban) ───────────────────────────────────── */

#page-mobile-orders {
  display: none;
  flex-direction: column;
  height: 100%;
  padding: 12px;
  gap: 10px;
}
#page-mobile-orders.active { display: flex; }

.mo-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-shrink: 0;
}

.mo-summary {
  font-size: 14px;
  color: var(--muted);
  font-weight: 500;
  flex-shrink: 0;
}

.mo-sound-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  flex-shrink: 0;
}
.mo-sound-toggle.is-muted {
  color: var(--muted);
  opacity: 0.75;
}
.mo-sound-toggle:active { transform: scale(0.97); }

.mo-kanban {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  flex: 1;
  min-height: 0;          /* allow children to scroll */
}

.mo-column {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.mo-column-header {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
}
.mo-column-title {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.mo-column--received .mo-column-title { color: #f7c948; }
.mo-column--ready    .mo-column-title { color: #3ecf8e; }
.mo-column-count {
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 2px 12px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 700;
  min-width: 32px;
  text-align: center;
}

.mo-column-body {
  flex: 1;
  overflow-y: auto;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.mo-empty {
  text-align: center;
  color: var(--muted);
  font-style: italic;
  padding: 30px 16px;
  font-size: 14px;
}
.mo-error { color: #f08080; font-style: normal; }

/* Order card */
.mo-card {
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: 12px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: transform 0.1s, border-color 0.1s;
}
.mo-card:active { transform: scale(0.99); }
.mo-card--ready {
  opacity: 0.78;
  border-color: rgba(62, 207, 142, 0.35);
}

.mo-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.mo-customer {
  font-size: 18px;
  font-weight: 700;
  line-height: 1.15;
}
.mo-age {
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 10px;
  letter-spacing: 0.03em;
  white-space: nowrap;
}

.mo-card-meta {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-size: 12px;
  color: var(--muted);
}
.mo-order-num {
  font-family: 'IBM Plex Mono', ui-monospace, monospace;
  font-size: 12px;
  letter-spacing: 0.03em;
}
.mo-time { font-size: 12px; }

.mo-items {
  border-top: 1px dashed var(--border);
  border-bottom: 1px dashed var(--border);
  padding: 8px 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.mo-item-line {
  display: flex;
  gap: 8px;
  font-size: 15px;
  line-height: 1.25;
}
.mo-qty {
  font-weight: 700;
  min-width: 26px;
  color: var(--accent);
}
.mo-name { font-weight: 500; }
.mo-variation { color: var(--muted); font-weight: 400; }
.mo-mods {
  font-size: 13px;
  color: var(--muted);
  margin-left: 34px;
  line-height: 1.3;
}

.mo-card-actions { margin-top: 2px; }

.mo-ready-btn {
  width: 100%;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 10px;
  padding: 14px 16px;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: background 0.1s, transform 0.1s;
  min-height: 52px;       /* big tap target for wet hands */
}
.mo-ready-btn:active { transform: scale(0.98); background: #b3361f; }
.mo-ready-btn:disabled {
  background: #6a6a6a;
  cursor: not-allowed;
}

.mo-ready-stamp {
  text-align: center;
  font-size: 14px;
  font-weight: 600;
  color: #3ecf8e;
  padding: 10px;
  letter-spacing: 0.02em;
}

/* Bottom-nav badge for received-but-not-ready count */
.bottom-nav .nav-badge {
  position: absolute;
  top: 4px;
  right: calc(50% - 22px);
  background: var(--accent);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  min-width: 18px;
  height: 18px;
  border-radius: 9px;
  padding: 0 5px;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}
/* Pulse the nav badge while orders are unacknowledged so it keeps
   drawing the eye from across the cafe, even after the chime fades. */
.bottom-nav .nav-badge:not([hidden]) {
  animation: nav-badge-pulse 1.4s ease-in-out infinite;
}
@keyframes nav-badge-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(209, 67, 42, 0.55); }
  50%      { box-shadow: 0 0 0 7px rgba(209, 67, 42, 0); }
}
.bottom-nav a { position: relative; }
/* .nav-badge sets display:flex, which beats the browser's own [hidden]
   rule -- without this an empty badge still shows its last number. */
.bottom-nav .nav-badge[hidden] { display: none; }

/* ── Today's special orders: banner + sign-in prompt ─────────────── */
.so-today-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 11px 20px;
  background: var(--accent);
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  flex-shrink: 0;
}
.so-today-banner[hidden] { display: none; }
.so-today-banner .so-banner-text { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.so-today-banner .so-banner-names { font-weight: 500; opacity: 0.9; }
.so-today-banner .so-banner-go {
  flex-shrink: 0;
  border: 1px solid rgba(255,255,255,0.7);
  border-radius: 8px;
  padding: 4px 12px;
  font-size: 13px;
}

.so-prompt-panel {
  display: flex;
  flex-direction: column;
  max-width: 560px;
  width: 92%;
  max-height: 82vh;
  padding: 20px;
  border: 2px solid var(--accent);
  overflow: hidden;
}
.so-prompt-panel h3 { font-size: 21px; margin: 0 0 4px; }
.so-prompt-sub { color: var(--muted); font-size: 14px; margin-bottom: 14px; }
.so-prompt-list { overflow-y: auto; flex: 1 1 auto; min-height: 0; }
.so-prompt-card {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-left: 4px solid var(--accent);
  border-radius: 10px;
  padding: 12px 14px;
  margin-bottom: 10px;
}
.so-prompt-card.is-new { border-left-color: var(--yellow); }
.so-prompt-top { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; margin-bottom: 8px; }
.so-prompt-name { font-size: 18px; font-weight: 700; }
.so-prompt-time { font-size: 16px; font-weight: 700; color: var(--accent2); white-space: nowrap; }
.so-prompt-items { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 6px; }
.so-prompt-items span { background: var(--surface); border-radius: 5px; padding: 3px 9px; font-size: 14px; }
.so-prompt-notes { font-size: 13px; color: var(--muted); margin-top: 4px; }
.so-prompt-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.so-chip { border-radius: 5px; padding: 2px 8px; font-size: 12px; font-weight: 700; }
.so-chip.new      { background: var(--yellow); color: #111; }
.so-chip.paid     { background: var(--green); color: #0f1117; }
.so-chip.unpaid   { background: rgba(246,153,63,0.2); color: var(--orange); border: 1px solid var(--orange); }
.so-chip.kitchen  { background: var(--surface); color: var(--muted); font-weight: 600; }
.so-chip.out      { background: rgba(62,207,142,0.2); color: var(--green); }
.so-prompt-actions { display: flex; gap: 10px; margin-top: 14px; flex-shrink: 0; }
.so-prompt-actions button {
  border-radius: 10px;
  padding: 15px 18px;
  font-size: 17px;
  font-weight: 700;
  cursor: pointer;
}
.so-prompt-ok   { flex: 1; background: var(--accent); color: #fff; border: none; }
.so-prompt-view { background: none; color: var(--text); border: 1px solid var(--border); }
.so-prompt-actions button:disabled { opacity: 0.6; }

/* On narrower tablets / phones, stack the columns. The barista likely
   stays in landscape, but defensive coding for portrait mode. */
@media (max-width: 600px) {
  .mo-kanban { grid-template-columns: 1fr; }
}

/* ── Checklist item comments ─────────────────────────────────────── */
.checklist-comment-btn {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  margin-left: 10px;
  font-size: 18px;
  cursor: pointer;
  user-select: none;
  padding: 3px 8px;
  border-radius: 6px;
  background: var(--surface2);
  border: 1px solid var(--border);
  vertical-align: middle;
  text-decoration: none !important;   /* stay legible on strikethrough rows */
}
.checklist-comment-btn:hover {
  background: var(--surface);
  border-color: var(--accent2);
}
.checklist-comment-badge {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  border-radius: 10px;
  padding: 1px 6px;
  line-height: 1;
  margin-left: 2px;
}
.checklist-comments-panel {
  display: none;
  padding: 10px 14px 12px 44px;
  border-top: 1px solid var(--border);
  background: rgba(255,255,255,0.02);
}
.checklist-comments-panel.open { display: block; }
.checklist-comment {
  padding: 6px 0;
  border-bottom: 1px dashed var(--border);
}
.checklist-comment:last-child { border-bottom: none; }
.checklist-comment-meta {
  display: flex;
  align-items: baseline;
  gap: 8px;
  font-size: 12px;
  margin-bottom: 2px;
}
.checklist-comment-meta strong { font-size: 13px; }
.checklist-comment-time {
  color: var(--muted);
  font-size: 11px;
}
.checklist-comment-delete {
  margin-left: auto;
  background: none;
  border: none;
  color: var(--muted);
  font-size: 13px;
  cursor: pointer;
  padding: 0 4px;
}
.checklist-comment-delete:hover { color: var(--accent); }
.checklist-comment-body {
  font-size: 14px;
  line-height: 1.4;
  white-space: pre-wrap;
}
.checklist-comment-empty {
  color: var(--muted);
  font-size: 12px;
  padding: 4px 0 8px;
}
.checklist-comment-form textarea {
  width: 100%;
  padding: 8px;
  background: var(--surface2);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 6px;
  font-size: 14px;
  resize: vertical;
  margin-top: 8px;
}
.checklist-comment-post {
  padding: 6px 14px !important;
  font-size: 13px !important;
}

/* ── Phone Capture (text-when-ready) ─────────────────────────────── */
#capture-list { display: flex; flex-direction: column; gap: 10px; }
.cap-row {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 10px; padding: 14px 16px; cursor: pointer;
}
.cap-row:active { border-color: var(--accent); }
.cap-row-main { flex: 1 1 auto; min-width: 0; }
.cap-row-top { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.cap-ticket { font-size: 17px; font-weight: 800; }
.cap-cust { font-size: 15px; color: var(--text); }
.cap-items {
  color: var(--muted); font-size: 13px; margin-top: 3px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.cap-chip {
  font-size: 11px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.5px; border: 1px solid; border-radius: 999px; padding: 2px 8px;
}
.cap-phone { flex: 0 0 auto; font-size: 15px; font-weight: 700; white-space: nowrap; }
.cap-phone.has { color: var(--green); }
.cap-phone.add { color: var(--accent); }

/* Compact capture modal so the whole thing (name + keypad + buttons) fits a
   9" tablet without scrolling. Scoped to #capture-modal so the login/lock PIN
   pads keep their large keys. */
#capture-modal { justify-content: center; padding-top: 16px; padding-bottom: 16px; }
#capture-modal .picker-panel { padding: 16px; max-height: 96vh; }
#capture-modal .pin-keys { gap: 8px; }
#capture-modal .pin-key { padding: 10px; font-size: 20px; border-radius: 10px; }
#capture-modal .pin-key.fn { font-size: 14px; }

/* ── Drink Recipes ────────────────────────────────────────────── */

.recipe-search {
  width: 100%; padding: 14px; margin-bottom: 14px;
  background: var(--surface2); border: 1px solid var(--border);
  color: var(--text); border-radius: 10px; font-size: 18px;
}
.recipe-grid {
  display: grid; gap: 12px;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
}
.recipe-card {
  display: flex; flex-direction: column; gap: 6px; text-align: left;
  min-height: 112px; padding: 16px; cursor: pointer;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 12px; color: var(--text); font-family: inherit;
}
.recipe-card:active { background: var(--surface2); border-color: var(--accent2); }
.recipe-card-name { font-size: 19px; font-weight: 700; }
.recipe-card-desc { font-size: 14px; color: var(--muted); line-height: 1.35; flex: 1; }
.recipe-card-tags { display: flex; gap: 6px; }
.recipe-temp-tag {
  font-size: 12px; font-weight: 700; padding: 2px 10px; border-radius: 999px;
  border: 1px solid var(--orange); color: var(--orange);
}
.recipe-temp-tag.iced { border-color: #4a90d9; color: #4a90d9; }

.recipe-back {
  background: none; border: none; color: var(--accent2); font-size: 17px;
  font-weight: 600; padding: 10px 0; cursor: pointer; font-family: inherit;
}
.recipe-title { font-size: 28px; font-weight: 700; margin: 4px 0 2px; }
.recipe-meta { color: var(--muted); font-size: 15px; margin-bottom: 8px; }
.recipe-desc { font-size: 17px; margin-bottom: 12px; }
.recipe-note {
  background: rgba(247, 201, 72, 0.12); border-left: 4px solid var(--yellow);
  color: var(--yellow); font-weight: 600; padding: 10px 14px;
  border-radius: 8px; margin-bottom: 10px;
}
.recipe-toggle { display: flex; gap: 8px; margin: 6px 0 12px; }
.recipe-toggle button {
  flex: 1; padding: 14px; font-size: 18px; font-weight: 700; cursor: pointer;
  background: var(--surface); color: var(--muted); font-family: inherit;
  border: 1px solid var(--border); border-radius: 10px;
}
.recipe-toggle button.active.hot { background: var(--orange); border-color: var(--orange); color: #111; }
.recipe-toggle button.active.iced { background: #4a90d9; border-color: #4a90d9; color: #fff; }
.recipe-section { margin-bottom: 12px; }
.recipe-h {
  font-size: 13px; font-weight: 700; letter-spacing: 0.06em;
  text-transform: uppercase; color: var(--accent2); margin-bottom: 8px;
}
.recipe-steps { padding-left: 26px; font-size: 18px; }
.recipe-steps li { padding: 5px 0; }
.recipe-meas { width: 100%; border-collapse: collapse; font-size: 18px; }
.recipe-meas th, .recipe-meas td { padding: 9px 8px; border-top: 1px solid var(--border); text-align: left; }
.recipe-meas tr:first-child th, .recipe-meas tr:first-child td { border-top: none; }
.recipe-meas th { width: 90px; white-space: nowrap; color: var(--accent2); }
.recipe-meas tr.dim { opacity: 0.4; }
