/* ── Auth form (email + password) ── */
.auth-form {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-bottom: 18px;
}

.auth-field { display: flex; flex-direction: column; gap: 6px; }

.auth-label {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}

.auth-input {
  width: 100%;
  padding: 13px 14px;
  border-radius: 12px;
  border: 1.5px solid var(--border);
  background: var(--surface);
  font-size: 15px;
  color: var(--text);
  box-shadow: var(--shadow);
  transition: border-color 0.15s;
}
.auth-input:focus {
  outline: none;
  border-color: var(--gold);
}

.auth-error {
  min-height: 18px;
  font-size: 12px;
  font-weight: 500;
  color: var(--red);
}

.auth-submit { width: 100%; margin-top: 4px; }
.auth-signout { margin-top: 8px; align-self: center; }

.auth-divider {
  display: flex; align-items: center; gap: 12px;
  margin: 8px 0 -2px;
  color: var(--muted);
  font-size: 10px; font-weight: 700;
  letter-spacing: 0.1em; text-transform: uppercase;
}
.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}
.auth-help {
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 6px;
}

/* ── Mode tabs (PIN / Email) ── */
.mode-tabs {
  display: flex;
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 3px;
  gap: 3px;
  box-shadow: var(--shadow);
  margin-bottom: 18px;
}
.mode-tab {
  flex: 1;
  background: none;
  border: none;
  padding: 8px 12px;
  border-radius: 9px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: var(--muted);
}
.mode-tab.active {
  background: var(--oak);
  color: var(--gold);
}

.mode-body { width: 100%; display: flex; flex-direction: column; gap: 10px; }

/* ── Staff picker (PIN-mode roster) ── */
.staff-picker {
  display: flex; flex-direction: column;
  gap: 7px;
}
.staff-card {
  display: flex; align-items: center; gap: 12px;
  width: 100%;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1.5px solid var(--border);
  background: var(--surface);
  box-shadow: var(--shadow);
  text-align: left;
}
.staff-card.disabled {
  opacity: 0.55;
  pointer-events: none;
}
.staff-avatar {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--oak);
  color: var(--gold);
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 13px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.staff-meta {
  display: flex; flex-direction: column; gap: 1px;
  min-width: 0;
}
.staff-name {
  font-size: 14px; font-weight: 600;
  color: var(--text);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.staff-role {
  font-size: 11px;
  color: var(--muted);
}

.picked-staff {
  display: flex; align-items: center; gap: 12px;
  background: var(--gold-pale);
  border: 1px solid rgba(201,168,76,0.3);
  border-radius: 12px;
  padding: 10px 14px;
  margin-bottom: 4px;
}
.back-link {
  background: none;
  border: none;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  align-self: flex-start;
  padding: 4px 0;
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: rgba(142,155,170,0.4);
}

.login-cta {
  display: flex; flex-direction: column; gap: 10px;
  margin-top: 14px;
  align-items: stretch;
}
.login-cta .back-link { align-self: center; }

/* ── PIN dots + keypad (used by login + setup-account) ── */
.pin-row {
  display: flex; gap: 10px;
  margin-bottom: 14px;
  justify-content: center;
}
.pin-row.shake { animation: shake 0.4s; }
.pin-dot {
  width: 13px; height: 13px;
  border-radius: 50%;
  border: 2px solid var(--border);
  background: transparent;
  transition: background 0.1s, border-color 0.1s;
}
.pin-dot.filled { background: var(--gold); border-color: var(--gold); }
.pin-row.error .pin-dot { border-color: var(--red); }
.pin-row.error .pin-dot.filled { background: var(--red); }
@keyframes shake {
  0%, 100% { transform: translateX(0); }
  20%      { transform: translateX(-8px); }
  40%      { transform: translateX(7px); }
  60%      { transform: translateX(-5px); }
  80%      { transform: translateX(3px); }
}

.keypad {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 7px;
  width: 100%;
}
.key {
  aspect-ratio: 1.6;
  border-radius: 10px;
  background: var(--surface);
  border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
  box-shadow: var(--shadow);
  transition: transform 0.08s, background 0.1s;
  user-select: none;
}
.key:active { transform: scale(0.96); background: var(--surface-warm); }
.key.del { background: var(--surface-warm); font-size: 14px; color: var(--muted); }
.key.go {
  background: var(--gold);
  border-color: var(--gold);
  color: #fff;
  font-size: 16px;
}
.key[aria-disabled="true"] { opacity: 0.45; pointer-events: none; }

/* ── Buttons (general) ── */
.btn {
  display: inline-flex;
  align-items: center; justify-content: center;
  gap: 7px;
  padding: 12px 18px;
  border: none;
  border-radius: 13px;
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.04em;
  background: var(--surface);
  color: var(--text);
  box-shadow: var(--shadow);
}
.btn-primary {
  background: var(--gold);
  color: #fff;
  box-shadow: 0 4px 16px rgba(201,168,76,0.35);
}
.btn-ghost {
  background: transparent;
  box-shadow: none;
  color: var(--muted);
  font-weight: 600;
  font-family: var(--font-body);
}

/* ── Bottom navigation ── */
.bottom-nav {
  margin-top: auto;
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding: 8px 4px calc(12px + var(--safe-bottom));
  display: flex;
  justify-content: space-around;
  position: sticky;
  bottom: 0;
  z-index: 10;
}
.nav-item {
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  padding: 4px 6px;
  background: none;
  border: none;
  flex: 1;
  position: relative;
}
.nav-icon { font-size: 17px; }
.nav-lbl {
  font-size: 9px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.06em;
  color: var(--muted);
}
.nav-item.active .nav-lbl { color: var(--gold); }
.nav-badge {
  position: absolute;
  top: 0; right: 18%;
  background: var(--red);
  color: #fff;
  font-size: 9px;
  font-weight: 700;
  min-width: 14px;
  height: 14px;
  padding: 0 4px;
  border-radius: 7px;
  display: flex; align-items: center; justify-content: center;
}

/* ── App bar (inner screens) ── */
.app-bar {
  background: var(--oak);
  padding: calc(14px + var(--safe-top)) 18px 16px;
}
.app-bar-row {
  display: flex; align-items: center; justify-content: space-between;
}
.app-bar-title {
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 800;
  color: var(--gold);
  display: flex; align-items: center; gap: 7px;
}
.app-bar-title .icon { font-size: 16px; }
.app-bar-sub {
  font-size: 12px;
  color: rgba(255,255,255,0.55);
  margin-top: 5px;
}
.app-bar-sub strong { color: rgba(255,255,255,0.9); font-weight: 500; }
.app-bar-action {
  background: none; border: none;
  color: var(--gold);
  font-size: 22px;
}

/* ── Section title ── */
.sec-title {
  font-size: 10px; font-weight: 700;
  letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--muted);
  padding: 12px var(--gutter) 4px;
}

/* ── Cards (dashboard widgets, stock items, etc.) ── */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 12px 14px;
  margin: 0 var(--gutter) 8px;
  box-shadow: var(--shadow);
  text-align: left;
  width: calc(100% - 2 * var(--gutter));
  display: block;
}
button.card { font: inherit; color: inherit; cursor: pointer; }
.card-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 8px;
}
.card-title {
  font-size: 11px; font-weight: 700;
  letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--muted);
  display: flex; align-items: center; gap: 5px;
}
.card-arrow { color: var(--muted); font-size: 18px; line-height: 1; }
.card-sub  { font-size: 12px; color: var(--muted); margin-top: 7px; }

/* ── Pills ── */
.pills { display: flex; gap: 6px; flex-wrap: wrap; }
.pill {
  display: flex; align-items: center; gap: 5px;
  background: var(--green-pale);
  border-radius: 20px;
  padding: 4px 10px;
  font-size: 12px; font-weight: 500;
  color: var(--green);
}
.pill-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--green); }

/* ── Mini status cards (low / critical) ── */
.mini-row { display: flex; gap: 8px; }
.mini {
  flex: 1; border-radius: var(--radius); padding: 9px 10px; text-align: center;
}
.mini.amber { background: var(--amber-pale); }
.mini.red   { background: var(--red-pale); }
.mini-num {
  font-family: var(--font-display);
  font-size: 24px; font-weight: 800;
  display: block;
}
.mini.amber .mini-num { color: var(--amber); }
.mini.red   .mini-num { color: var(--red); }
.mini-lbl {
  font-size: 10px; color: var(--muted); font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.06em;
}

/* ── Big number (dashboard tasks card) ── */
.big-num {
  font-family: var(--font-display);
  font-size: 26px; font-weight: 800; color: var(--text);
}
.big-num-sub {
  font-size: 13px;
  color: var(--muted);
  font-family: var(--font-body);
  font-weight: 400;
  margin-left: 4px;
}

/* ── Till row ── */
.till-row { display: flex; gap: 7px; }
.till-venue {
  flex: 1;
  background: var(--surface-warm);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 9px 11px;
}
.till-vname {
  font-size: 9px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.08em;
  color: var(--muted);
}
.till-status { font-size: 13px; font-weight: 600; margin-top: 3px; }
.till-status.ok   { color: var(--green); }
.till-status.pend { color: var(--amber); }

/* ── Avatar ── */
.avatar {
  width: 28px; height: 28px;
  border-radius: 50%;
  background: var(--oak);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display);
  font-size: 11px; font-weight: 800;
  color: var(--gold);
  flex-shrink: 0;
}
.avatar.small { width: 24px; height: 24px; font-size: 10px; }

/* ── On-shift-now card ── */
.on-now {
  margin: 12px var(--gutter) 0;
  background: var(--gold-pale);
  border: 1px solid rgba(201,168,76,0.3);
  border-radius: var(--radius-lg);
  padding: 13px 14px;
  box-shadow: var(--shadow);
}
.on-now.empty { background: var(--surface); border-color: var(--border); }
.on-now-title {
  font-size: 10px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.1em;
  color: var(--oak-mid);
  margin-bottom: 9px;
}
.on-now.empty .on-now-title { color: var(--muted); }
.on-now-empty { font-size: 13px; color: var(--muted); }

.shift-row {
  display: flex; align-items: center;
  padding: 7px 0;
  border-bottom: 1px solid rgba(201,168,76,0.2);
}
.shift-row:last-child { border-bottom: none; padding-bottom: 0; }
.shift-name {
  font-size: 13px; font-weight: 500;
  color: var(--text);
  margin-left: 9px; flex: 1;
}
.shift-since { font-size: 11px; color: var(--muted); }
.shift-dur {
  font-family: var(--font-display);
  font-size: 13px; font-weight: 800;
  color: var(--oak);
}

/* ── Clock button ── */
.clock-btn {
  margin: 12px var(--gutter) 0;
  width: calc(100% - 2 * var(--gutter));
  padding: 13px;
  border-radius: 13px;
  background: var(--gold);
  border: none;
  font-family: var(--font-display);
  font-size: 14px; font-weight: 800;
  color: #fff;
  letter-spacing: 0.04em;
  display: flex; align-items: center; justify-content: center; gap: 7px;
  box-shadow: 0 4px 16px rgba(201,168,76,0.35);
}
.clock-btn.clock-out {
  background: var(--oak);
  box-shadow: 0 4px 16px rgba(44,24,16,0.35);
}

/* ── Owner clock-other ── */
.owner-clock {
  margin: 14px var(--gutter) 0;
  padding: 12px 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}
.owner-clock-row { display: flex; gap: 8px; }
.owner-clock-select { flex: 1; padding: 10px 12px; }
.owner-clock-btn { flex-shrink: 0; }

/* ── Weekly hours ── */
.weekly-list {
  margin: 0 var(--gutter) 8px;
  display: flex; flex-direction: column; gap: 4px;
}
.weekly-row {
  display: flex; align-items: center; gap: 9px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 7px 12px;
  box-shadow: var(--shadow);
}
.weekly-name { flex: 1; font-size: 13px; font-weight: 500; color: var(--text); }
.weekly-hours {
  font-family: var(--font-display);
  font-size: 13px; font-weight: 800;
  color: var(--oak);
}

/* ── Shift history ── */
.hist-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 13px var(--gutter) 5px;
}
.hist-title {
  font-size: 10px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.1em;
  color: var(--muted);
}
.hist-empty {
  margin: 0 var(--gutter) 8px;
  padding: 16px 14px;
  background: var(--surface);
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  text-align: center;
  font-size: 13px;
  color: var(--muted);
}
.hist-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 11px;
  padding: 9px 13px;
  margin: 0 var(--gutter) 6px;
  display: flex; align-items: center; justify-content: space-between;
  box-shadow: var(--shadow);
  gap: 10px;
}
.hist-main { min-width: 0; flex: 1; }
.hist-name { font-size: 13px; font-weight: 500; color: var(--text); }
.hist-date { font-size: 11px; color: var(--muted); margin-top: 1px; }
.hist-right { display: flex; align-items: center; gap: 10px; }
.hist-dur {
  font-family: var(--font-display);
  font-size: 14px; font-weight: 800;
  color: var(--text);
}
.hist-actions { display: flex; gap: 4px; }
.hist-action {
  background: var(--surface-warm);
  border: 1px solid var(--border);
  width: 26px; height: 26px;
  border-radius: 7px;
  font-size: 13px;
  display: flex; align-items: center; justify-content: center;
  color: var(--muted);
}
.hist-action.danger { color: var(--red); }

/* ── Dashboard meta strip ── */
.dash-meta {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px var(--gutter) 4px;
  font-size: 11px;
  color: var(--muted);
}
.dash-meta-time { font-weight: 500; }

/* ── Category chips (horizontal scroll) ── */
.cat-scroll {
  display: flex; gap: 6px;
  padding: 10px var(--gutter);
  overflow-x: auto;
}
.cat-chip {
  white-space: nowrap;
  padding: 5px 11px;
  border-radius: 20px;
  font-size: 11px; font-weight: 600;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--muted);
  box-shadow: var(--shadow);
}
.cat-chip.active {
  background: var(--oak);
  color: var(--gold);
  border-color: var(--oak);
}

/* ── Stock alert bar ── */
.alert-bar {
  margin: 0 var(--gutter) 8px;
  background: var(--amber-pale);
  border: 1px solid rgba(230,126,34,0.2);
  border-radius: var(--radius);
  padding: 9px 13px;
  font-size: 12px; font-weight: 600;
  color: var(--amber);
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  cursor: pointer;
}
.alert-chevron { font-size: 13px; }
.alert-list {
  margin: -4px var(--gutter) 8px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-top: none;
  border-radius: 0 0 var(--radius) var(--radius);
  padding: 8px 12px 10px;
  display: flex; flex-direction: column; gap: 4px;
}
.alert-item {
  display: flex; align-items: center; gap: 8px;
  font-size: 13px;
  padding: 4px 0;
  border-bottom: 1px solid var(--border);
}
.alert-item:last-of-type { border-bottom: none; }
.alert-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}
.alert-dot.low      { background: var(--amber); }
.alert-dot.critical { background: var(--red); }
.alert-name { flex: 1; color: var(--text); font-weight: 500; }
.alert-meta { color: var(--muted); font-size: 12px; }
.alert-print { margin-top: 8px; align-self: flex-start; }

/* ── Stock items ── */
.stock-list {
  display: flex; flex-direction: column;
  gap: 7px;
  padding: 0 var(--gutter);
}
.stock-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 13px;
  padding: 11px 12px;
  display: flex; align-items: stretch; gap: 10px;
  box-shadow: var(--shadow);
}
.s-bar {
  width: 4px; border-radius: 2px;
  align-self: stretch; flex-shrink: 0;
}
.s-bar.g { background: var(--green); }
.s-bar.a { background: var(--amber); }
.s-bar.r { background: var(--red); }
.s-info { flex: 1; min-width: 0; cursor: pointer; }
.s-name {
  font-size: 13px; font-weight: 600;
  color: var(--text);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.s-meta { font-size: 11px; color: var(--muted); margin-top: 2px; }
.s-foot { font-size: 10px; color: var(--muted); margin-top: 3px; opacity: 0.8; }
.s-right {
  display: flex; flex-direction: column; align-items: flex-end; gap: 6px;
  flex-shrink: 0;
}
.s-badge {
  font-size: 10px; font-weight: 700;
  padding: 2px 7px; border-radius: 20px;
  text-transform: uppercase; letter-spacing: 0.05em;
}
.s-badge.g { background: var(--green-pale); color: var(--green); }
.s-badge.a { background: var(--amber-pale); color: var(--amber); }
.s-badge.r { background: var(--red-pale);   color: var(--red); }

.qty-ctrl { display: flex; align-items: center; gap: 5px; }
.qty-btn {
  width: 28px; height: 28px;
  border-radius: 7px;
  border: 1px solid var(--border);
  background: var(--surface-warm);
  display: flex; align-items: center; justify-content: center;
  font-size: 16px; font-weight: 600;
  color: var(--text);
  user-select: none;
  touch-action: none;
}
.qty-btn:disabled { opacity: 0.35; pointer-events: none; }
.qty-btn:active   { transform: scale(0.92); background: var(--surface); }
.qty-num {
  font-family: var(--font-display);
  font-size: 15px; font-weight: 800;
  color: var(--text);
  min-width: 26px;
  text-align: center;
}

/* ── Modal ── */
.modal-wrap {
  position: fixed; inset: 0; z-index: 1100;
  display: flex; align-items: flex-end; justify-content: center;
  animation: fadeIn 0.15s ease-out;
}
.modal-backdrop {
  position: absolute; inset: 0;
  background: rgba(20,12,8,0.45);
  backdrop-filter: blur(2px);
}
.modal {
  position: relative;
  width: 100%;
  max-width: 480px;
  background: var(--surface);
  border-radius: 18px 18px 0 0;
  padding: 18px var(--gutter) calc(18px + var(--safe-bottom));
  box-shadow: 0 -10px 30px rgba(0,0,0,0.2);
  animation: slideUp 0.2s ease-out;
  max-height: 92dvh;
  overflow-y: auto;
}
@media (min-width: 600px) {
  .modal-wrap { align-items: center; padding: 20px; }
  .modal { border-radius: 18px; }
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes slideUp {
  from { transform: translateY(20px); opacity: 0; }
  to   { transform: translateY(0);    opacity: 1; }
}

.modal-head {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 14px;
}
.modal-title {
  font-family: var(--font-display);
  font-size: 17px; font-weight: 800;
  color: var(--oak);
}
.modal-close {
  background: none; border: none;
  font-size: 22px; line-height: 1;
  color: var(--muted);
  width: 30px; height: 30px;
  display: flex; align-items: center; justify-content: center;
}
.modal-body { display: flex; flex-direction: column; gap: 8px; }
.modal-text { font-size: 14px; color: var(--text); line-height: 1.5; }
.modal-error {
  min-height: 18px;
  font-size: 12px;
  color: var(--red);
  font-weight: 500;
  margin: 4px 0;
}
.modal-actions {
  display: flex; gap: 8px; justify-content: flex-end;
  margin-top: 6px;
}

.btn-danger {
  background: var(--red);
  color: #fff;
  box-shadow: 0 4px 14px rgba(192,57,43,0.3);
}
.btn-ghost.danger { color: var(--red); }

/* ── Form grid (used in stock add/edit modal) ── */
.form-grid { display: flex; flex-direction: column; gap: 10px; }
.form-row  { display: flex; gap: 8px; }
.form-row .auth-field { flex: 1; }

/* ── Print-only block ── */
.print-only { display: none; }
@media print {
  .print-only { display: block; }
  body > #app, body > .toast, body > .offline-banner { display: none !important; }
}

/* ── Venue / sub-tab toggle (used by Tasks screen) ── */
.venue-toggle {
  display: flex;
  margin: 12px var(--gutter) 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 3px;
  gap: 3px;
  box-shadow: var(--shadow);
}
.venue-tab {
  flex: 1; text-align: center;
  padding: 8px;
  border-radius: 7px;
  font-size: 12px; font-weight: 600;
  color: var(--muted);
  background: none;
  border: none;
}
.venue-tab.active {
  background: var(--oak);
  color: var(--gold);
}

/* ── Housekeeping ── */
.hk-progress {
  margin: 12px var(--gutter) 4px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 10px 12px;
  box-shadow: var(--shadow);
}
.hk-progress-bar {
  height: 6px;
  background: var(--surface-warm);
  border-radius: 999px;
  overflow: hidden;
  margin-bottom: 6px;
}
.hk-progress-fill {
  height: 100%;
  background: var(--gold);
  transition: width 0.25s ease-out;
}
.hk-progress-text { font-size: 12px; color: var(--muted); font-weight: 500; }

.hk-section { margin-top: 12px; }
.hk-section-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 4px var(--gutter);
}
.hk-section-actions { display: flex; gap: 14px; }

.hk-list {
  display: flex; flex-direction: column;
  gap: 5px;
  padding: 0 var(--gutter);
}
.hk-item {
  display: flex; align-items: center; gap: 10px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 11px;
  padding: 10px 12px;
  box-shadow: var(--shadow);
  transition: opacity 0.15s, background 0.15s;
}
.hk-item.done { background: var(--green-pale); border-color: rgba(39,174,96,0.25); }
.hk-check {
  width: 26px; height: 26px;
  border-radius: 7px;
  border: 1.5px solid var(--border);
  background: var(--surface);
  color: var(--green);
  font-weight: 800;
  font-size: 14px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.hk-item.done .hk-check {
  border-color: var(--green);
  background: var(--green);
  color: #fff;
}
.hk-meta { flex: 1; min-width: 0; }
.hk-name {
  font-size: 13px; font-weight: 500;
  color: var(--text);
}
.hk-item.done .hk-name { text-decoration: line-through; color: var(--muted); }
.hk-foot { font-size: 11px; color: var(--muted); margin-top: 2px; }
.hk-actions { display: flex; gap: 4px; }

/* ── Maintenance ── */
.maint-cta {
  display: flex; align-items: center; justify-content: space-between;
  gap: 10px;
  padding: 12px var(--gutter) 4px;
}
.maint-cta .btn { flex: 1; }

.maint-list {
  display: flex; flex-direction: column;
  gap: 7px;
  padding: 4px var(--gutter) 0;
}
.maint-card {
  display: flex; gap: 10px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 13px;
  padding: 10px;
  box-shadow: var(--shadow);
  cursor: pointer;
}
.maint-photo {
  width: 72px; height: 72px;
  border-radius: 9px;
  object-fit: cover;
  flex-shrink: 0;
  background: var(--surface-warm);
}
.maint-photo.placeholder-photo {
  display: flex; align-items: center; justify-content: center;
  color: var(--muted);
  font-size: 28px;
  border: 1px dashed var(--border);
}
.maint-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.maint-row1 {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 8px;
}
.maint-title {
  font-size: 14px; font-weight: 600;
  color: var(--text);
  flex: 1; min-width: 0;
}
.maint-row2 { display: flex; align-items: center; gap: 8px; }
.maint-area {
  font-size: 11px;
  color: var(--muted);
  font-weight: 500;
}
.maint-foot { font-size: 11px; color: var(--muted); margin-top: 2px; }

.maint-prio {
  font-size: 9px; font-weight: 800;
  letter-spacing: 0.06em; text-transform: uppercase;
  padding: 3px 7px;
  border-radius: 999px;
  flex-shrink: 0;
}
.prio-urgent { background: var(--red-pale);   color: var(--red); }
.prio-normal { background: var(--surface-warm); color: var(--oak-mid); }
.prio-low    { background: var(--surface-warm); color: var(--muted); }

.maint-status {
  font-size: 10px; font-weight: 700;
  letter-spacing: 0.05em; text-transform: uppercase;
  padding: 2px 7px;
  border-radius: 999px;
}
.status-open        { background: var(--amber-pale); color: var(--amber); }
.status-in-progress { background: var(--gold-pale);  color: var(--oak-mid); }
.status-resolved    { background: var(--green-pale); color: var(--green); }

/* Maintenance detail modal */
.maint-detail { display: flex; flex-direction: column; gap: 10px; }
.maint-detail-photo {
  width: 100%;
  max-height: 260px;
  border-radius: 12px;
  object-fit: cover;
  background: var(--surface-warm);
}
.maint-detail-row { display: flex; gap: 8px; align-items: center; }
.maint-detail-meta { font-size: 12px; color: var(--muted); }
.maint-detail-desc { font-size: 14px; color: var(--text); white-space: pre-wrap; }
.maint-detail-desc.muted { color: var(--muted); font-style: italic; }

/* Photo input preview (modal) */
.photo-preview {
  margin-top: 8px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
}
.photo-preview img {
  max-width: 100%;
  max-height: 180px;
  border-radius: 9px;
  object-fit: cover;
}

/* ── Lightbox ── */
.lightbox {
  position: fixed; inset: 0; z-index: 1200;
  background: rgba(0,0,0,0.85);
  display: flex; align-items: center; justify-content: center;
  padding: 24px;
  animation: fadeIn 0.15s ease-out;
}
.lightbox img {
  max-width: 100%; max-height: 100%;
  border-radius: 8px;
}
.lightbox-close {
  position: absolute;
  top: calc(12px + var(--safe-top)); right: 12px;
  width: 40px; height: 40px;
  background: rgba(255,255,255,0.15);
  border: none;
  color: #fff;
  font-size: 24px;
  border-radius: 999px;
  display: flex; align-items: center; justify-content: center;
}

/* ── Till ── */
.till-form {
  margin: 12px var(--gutter) 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 14px;
  box-shadow: var(--shadow);
}
.till-form-head {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 12px;
}
.till-form-date { font-size: 13px; font-weight: 600; color: var(--oak); }
.till-meta      { font-size: 11px; color: var(--muted); margin-top: 2px; }

.till-variance {
  min-height: 10px;
}
.till-variance-row {
  display: flex; align-items: center; gap: 10px;
  border-radius: var(--radius);
  padding: 8px 12px;
  margin: 4px 0 2px;
}
.till-variance-row.ok   { background: var(--green-pale); color: var(--green); }
.till-variance-row.warn { background: var(--amber-pale); color: var(--amber); }
.till-variance-row.bad  { background: var(--red-pale);   color: var(--red);   }
.till-variance-num {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 17px;
}
.till-variance-lbl { font-size: 12px; font-weight: 600; }

.till-table {
  margin: 0 var(--gutter);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.till-row-head, .till-row {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr 1fr;
  align-items: center;
  padding: 9px 12px;
  font-size: 12px;
}
.till-row-head {
  background: var(--surface-warm);
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: 10px;
}
.till-row {
  background: none;
  border: none;
  border-top: 1px solid var(--border);
  text-align: left;
  cursor: pointer;
  color: var(--text);
  font-size: 13px;
}
.till-row:active { background: var(--surface-warm); }
.till-var.ok   { color: var(--green);  font-weight: 700; }
.till-var.warn { color: var(--amber);  font-weight: 700; }
.till-var.bad  { color: var(--red);    font-weight: 800; }

/* ── Settings ── */
.settings-card {
  margin: 0 var(--gutter) 8px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.settings-row,
.settings-action-row {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
  background: none;
  border-left: none;
  border-right: none;
  border-top: none;
  width: 100%;
  text-align: left;
  cursor: pointer;
}
.settings-row:last-child,
.settings-action-row:last-child { border-bottom: none; }
.settings-row-text  { flex: 1; min-width: 0; }
.settings-row-label { font-size: 13px; font-weight: 600; color: var(--text); }
.settings-row-desc  { font-size: 11px; color: var(--muted); margin-top: 2px; }

.settings-toggle {
  appearance: none;
  -webkit-appearance: none;
  width: 40px; height: 22px;
  background: var(--border);
  border-radius: 999px;
  position: relative;
  transition: background 0.15s;
  flex-shrink: 0;
  cursor: pointer;
}
.settings-toggle::before {
  content: '';
  position: absolute;
  top: 2px; left: 2px;
  width: 18px; height: 18px;
  border-radius: 50%;
  background: #fff;
  transition: transform 0.15s;
  box-shadow: 0 1px 3px rgba(0,0,0,0.15);
}
.settings-toggle:checked { background: var(--gold); }
.settings-toggle:checked::before { transform: translateX(18px); }
.settings-toggle:disabled { opacity: 0.5; cursor: not-allowed; }

.settings-staff-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 11px 14px;
  border-bottom: 1px solid var(--border);
  gap: 10px;
}
.settings-staff-row:last-child { border-bottom: none; }
.settings-staff-row.inactive { opacity: 0.55; }
.settings-staff-meta  { flex: 1; min-width: 0; }
.settings-staff-name {
  font-size: 13px; font-weight: 600;
  color: var(--text);
  display: flex; flex-wrap: wrap; gap: 5px; align-items: center;
}
.settings-staff-email { font-size: 11px; color: var(--muted); margin-top: 2px; word-break: break-all; }
.settings-staff-actions { display: flex; gap: 4px; flex-shrink: 0; }

.settings-tag {
  font-size: 9px; font-weight: 800;
  letter-spacing: 0.05em; text-transform: uppercase;
  padding: 2px 6px;
  border-radius: 999px;
  background: var(--surface-warm);
  color: var(--muted);
}
.settings-tag.tag-owner { background: var(--gold-pale); color: var(--oak-mid); }
.settings-tag.tag-warn  { background: var(--amber-pale); color: var(--amber); }
.settings-tag.tag-muted { background: var(--surface-warm); color: var(--muted); }

.settings-about {
  padding: 14px;
  font-size: 13px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

/* ── Loading shim ── */
.loading {
  display: flex;
  align-items: center; justify-content: center;
  flex: 1;
  color: var(--muted);
  font-size: 13px;
}
.spinner {
  width: 22px; height: 22px;
  border: 2.5px solid var(--border);
  border-top-color: var(--gold);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin-right: 10px;
}
@keyframes spin { to { transform: rotate(360deg); } }
