/* ===== Sit 'n Dip KDS — écran cuisine, fond sombre, fort contraste ===== */
:root {
  --bg: #0b0e14;
  --card: #161c28;
  --card-border: #2a3448;
  --ink: #f2f5fa;
  --muted: #9aa5b8;
  --accent: #f4501e;
  --orange: #ff9f1c;
  --red: #ff453a;
  --green: #30d158;
  --blue: #0a84ff;
  --yellow: #ffd60a;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  overflow-x: hidden;
}
.hidden { display: none !important; }
button { font-family: inherit; cursor: pointer; }

/* ===== Login ===== */
#login-screen {
  min-height: 100vh;
  display: flex; align-items: center; justify-content: center;
  padding: 24px;
}
.login-box { text-align: center; width: 100%; max-width: 420px; }
.login-brand { font-size: 52px; font-weight: 900; letter-spacing: 2px; color: var(--ink); }
.login-brand img { width: 110px; height: 110px; }
.brand-logo { width: 36px; height: 36px; vertical-align: -9px; margin-right: 10px; }
.ts-widget { display: flex; justify-content: center; margin: 0 0 14px; }
.ts-widget:empty { display: none; }
.otp-hint { color: var(--muted); font-size: 18px; margin: 4px 0 8px; line-height: 1.5; }
.otp-hint b { color: var(--ink); }
.otp-input {
  font-size: 40px; letter-spacing: 12px; text-align: center; font-weight: 800;
  background: #1e2637; color: var(--yellow); border: 2px solid var(--card-border);
  border-radius: 14px; padding: 12px; width: 100%; margin: 8px 0 4px;
}
.otp-actions { display: flex; gap: 10px; margin-top: 14px; }
.otp-actions button {
  flex: 1; border: none; border-radius: 14px; padding: 16px 0;
  font-size: 20px; font-weight: 800; cursor: pointer;
}
.pad-ok-btn { background: var(--green); color: #04120a; }
.pad-btn { background: #1e2637; color: var(--ink); border: 2px solid var(--card-border); }
.pad-btn:disabled { opacity: .5; }
.otp-timer { color: var(--muted); margin-top: 10px; font-size: 16px; }
.login-sub { font-size: 24px; color: var(--accent); font-weight: 700; margin: 4px 0 28px; }
.quick-select { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-bottom: 24px; }
.quick-select button {
  background: #1e2637; color: var(--ink); border: 2px solid var(--card-border);
  border-radius: 14px; padding: 12px 20px; font-size: 20px; font-weight: 700;
}
.quick-select button:active { background: var(--accent); }
.pin-display {
  min-height: 64px; font-size: 44px; letter-spacing: 14px; margin-bottom: 16px;
  color: var(--yellow); font-weight: 800;
}
.pin-pad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.pin-pad button {
  font-size: 34px; font-weight: 800; padding: 20px 0;
  background: #1e2637; color: var(--ink); border: 2px solid var(--card-border); border-radius: 16px;
}
.pin-pad button:active { background: #2c3752; }
.pad-ok { background: var(--green) !important; color: #04120a !important; }
.pad-fn { color: var(--red) !important; }
.login-error { color: var(--red); font-size: 20px; font-weight: 700; margin-top: 16px; min-height: 30px; }

/* ===== Topbar ===== */
#topbar {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; gap: 18px;
  background: #10151f; border-bottom: 2px solid var(--card-border);
  padding: 10px 18px; flex-wrap: wrap;
}
.brand { font-size: 26px; font-weight: 900; letter-spacing: 1px; white-space: nowrap; }
.brand span { color: var(--accent); }
#station-filters { display: flex; gap: 10px; flex: 1; flex-wrap: wrap; }
#station-filters button {
  background: #1e2637; color: var(--ink); border: 2px solid var(--card-border);
  border-radius: 12px; padding: 12px 22px; font-size: 20px; font-weight: 800;
}
#station-filters button.active { background: var(--accent); border-color: var(--accent); }
.topbar-right { display: flex; align-items: center; gap: 14px; margin-left: auto; }
.tickets-count { font-size: 20px; font-weight: 800; color: var(--muted); white-space: nowrap; }
.tickets-count span { color: var(--ink); font-size: 26px; }
.clock { font-size: 30px; font-weight: 800; font-variant-numeric: tabular-nums; }
.icon-btn {
  background: #1e2637; color: var(--ink); border: 2px solid var(--card-border);
  border-radius: 12px; font-size: 24px; padding: 8px 14px;
}
.icon-btn.muted { opacity: .45; }

/* ===== Grille de tickets ===== */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 16px; padding: 16px;
}
.empty { text-align: center; font-size: 32px; color: var(--muted); margin-top: 15vh; font-weight: 700; }

.ticket {
  background: var(--card); border: 2px solid var(--card-border); border-radius: 16px;
  display: flex; flex-direction: column; overflow: hidden;
  transition: transform .45s ease, opacity .45s ease;
}
.ticket.flash { animation: flash 2.2s ease; }
@keyframes flash {
  0%, 60% { border-color: var(--yellow); box-shadow: 0 0 26px var(--yellow); }
  100% { border-color: var(--card-border); box-shadow: none; }
}
.ticket.leaving { transform: scale(.85); opacity: 0; }
.ticket.not-sent { opacity: .75; border-style: dashed; }

.ticket-head {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 14px; background: #1e2637; border-bottom: 2px solid var(--card-border);
  flex-wrap: wrap;
}
.ticket-num { font-size: 32px; font-weight: 900; }
.type-badge {
  font-size: 16px; font-weight: 800; padding: 6px 12px; border-radius: 999px;
  background: var(--accent); color: #fff; white-space: nowrap;
}
.type-badge.takeaway { background: #0a84ff; }
.type-badge.delivery { background: #b25e09; }
.unsent-badge {
  font-size: 15px; font-weight: 800; padding: 6px 12px; border-radius: 999px;
  background: transparent; border: 2px dashed var(--red); color: var(--red); white-space: nowrap;
}
.elapsed { margin-left: auto; font-size: 28px; font-weight: 900; font-variant-numeric: tabular-nums; }
.elapsed.warn { color: var(--orange); }
.elapsed.late { color: var(--red); animation: pulse 1s infinite; }
@keyframes pulse { 50% { opacity: .55; } }

.items { list-style: none; padding: 8px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.item {
  width: 100%; text-align: left; background: #10151f; color: var(--ink);
  border: 2px solid var(--card-border); border-radius: 12px; padding: 12px 14px;
  display: flex; flex-direction: column; gap: 4px;
}
.item:active { transform: scale(.98); }
.item-top { display: flex; align-items: center; gap: 10px; }
.item-qty { font-size: 30px; font-weight: 900; color: var(--yellow); min-width: 56px; }
.item-name { font-size: 22px; font-weight: 700; flex: 1; }
.status-pill {
  font-size: 14px; font-weight: 800; padding: 5px 12px; border-radius: 999px;
  text-transform: uppercase; white-space: nowrap;
}
.status-pill.pending { background: #3a4356; color: #cfd6e4; }
.status-pill.preparing { background: #0a84ff; color: #fff; }
.status-pill.ready { background: var(--green); color: #04120a; }
.status-pill.served { background: #223; color: var(--muted); }
.item.ready { border-color: var(--green); }
.item.served { opacity: .45; }
.item.served .item-name { text-decoration: line-through; }
.item-modifiers { font-size: 17px; color: var(--blue); font-weight: 600; }
.item-notes { font-size: 18px; color: var(--yellow); font-style: italic; font-weight: 600; }
.item-station { font-size: 13px; color: var(--muted); font-weight: 700; text-transform: uppercase; }

.ticket-foot { padding: 10px; border-top: 2px solid var(--card-border); }
.bump-all {
  width: 100%; font-size: 24px; font-weight: 900; padding: 16px;
  border: none; border-radius: 12px; background: var(--green); color: #04120a;
}
.bump-all:disabled { background: #3a4356; color: #7d879c; cursor: not-allowed; }
.bump-all:not(:disabled) { animation: pulse 1.6s infinite; }

/* ============ Typography pass: Helvetica display ============ */
body{font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;}
button{font-family:inherit;}
