/*
  Queue-Kiosk UI refresh
  - Gray-first palette
  - Light/Dark theme support (OLED friendly)
  - Touch-friendly controls
*/

:root{
  --bg: #f2f2f2;
  --bg2: #e7e7e7;
  --panel: #ffffff;
  --panel2: #f8f8f8;
  --border: #d6d6d6;
  --text: #161616;
  --muted: #616161;
  --accent: #3b82f6;
  --accent2: #1d4ed8;

  --radius: 18px;
  --radius-sm: 12px;
  --shadow: 0 10px 30px rgba(0,0,0,.10);
  --shadow-sm: 0 6px 14px rgba(0,0,0,.10);
  --focus: 0 0 0 4px rgba(59,130,246,.25);
}

html, body { height: 100%; }

body{
  margin: 0;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
  color: var(--text);
  background:
    radial-gradient(1200px 900px at 20% 0%, var(--panel) 0%, transparent 60%),
    radial-gradient(1000px 700px at 100% 20%, var(--panel2) 0%, transparent 55%),
    linear-gradient(180deg, var(--bg) 0%, var(--bg2) 100%);
}

/* Dark mode */
[data-theme="dark"]{
  --bg: #121212;
  --bg2: #0e0e0e;
  --panel: #1e1e1e;
  --panel2: #1a1a1a;
  --border: #2c2c2c;
  --text: #eaeaea;
  --muted: #a0a0a0;
  --accent: #60a5fa;
  --accent2: #3b82f6;

  --shadow: 0 10px 35px rgba(0,0,0,.45);
  --shadow-sm: 0 6px 18px rgba(0,0,0,.45);
  --focus: 0 0 0 4px rgba(96,165,250,.25);
}

/* Layout */
.container{
  min-height: 100%;
  padding: 28px;
  box-sizing: border-box;
}

.shell{
  max-width: 920px;
  margin: 0 auto;
}

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

.brand{
  display:flex;
  flex-direction: column;
  gap: 2px;
}

.brand .title{
  font-size: 18px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--muted);
}

.brand .subtitle{
  font-size: 34px;
  font-weight: 850;
  margin: 0;
  line-height: 1.1;
}

.card{
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 26px;
  box-shadow: var(--shadow);
}

.card.compact{ padding: 22px; }

hr.sep{
  border: none;
  border-top: 1px solid var(--border);
  margin: 18px 0;
  opacity: .8;
}

.muted{ color: var(--muted); }

/* Controls */
label{ display:block; font-size: 18px; color: var(--muted); margin: 0 0 10px; }

input{
  width: 100%;
  font-size: 34px;
  padding: 18px 18px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--panel2);
  color: var(--text);
  box-sizing: border-box;
  outline: none;
}

input:focus{ box-shadow: var(--focus); border-color: var(--accent); }

.btn{
  width: 100%;
  font-size: 34px;
  padding: 18px 20px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--panel2);
  color: var(--text);
  cursor: pointer;
  box-sizing: border-box;
  transition: transform .08s ease, box-shadow .08s ease, background-color .15s ease, border-color .15s ease;
  user-select: none;
}

.btn:hover{ box-shadow: var(--shadow-sm); }
.btn:active{ transform: scale(0.98); }
.btn:focus{ outline: none; box-shadow: var(--focus); border-color: var(--accent); }

.btn.primary{
  background: linear-gradient(180deg, var(--accent) 0%, var(--accent2) 100%);
  border-color: rgba(0,0,0,.0);
  color: white;
  font-weight: 800;
}

.btn.ghost{
  width: auto;
  padding: 10px 14px;
  font-size: 16px;
  border-radius: 12px;
}

.btn.ghost:hover{ background: rgba(0,0,0,.04); }
[data-theme="dark"] .btn.ghost:hover{ background: rgba(255,255,255,.06); }

.btn-row{ display:flex; gap: 10px; flex-wrap: wrap; }

/* Ticket styles */
.big-alias{
  font-size: 86px;
  font-weight: 900;
  margin: 10px 0 2pxpx;
  letter-spacing: .02em;
}

.big-alias, .big {
  font-variant-numeric: tabular-nums;
}

/* Fix small typo above (some renderers are strict) */
.big-alias{ margin: 10px 0 2px; }

.kiosk-h1{
  font-size: 46px;
  margin: 0 0 16px;
  line-height: 1.1;
}

/* Display page */
.display-grid{
  display:grid;
  grid-template-columns: 1fr 1fr;
  gap: 26px;
}

/* TV-friendly "rounded rectangle" panels */
.display-box{
  border-radius: 32px;
  padding: 34px;
}

.display-box h2{
  margin: 0 0 14px;
  font-size: 44px;
  letter-spacing: -0.02em;
}

.display-now{
  font-size: 110px;
  font-weight: 950;
  letter-spacing: 0.02em;
}

.display-next{
  font-size: 58px;
  line-height: 1.25;
}

.stamp{
  margin-top: 14px;
  font-size: 20px;
  color: var(--muted);
}

/* Staff page */
.staff-grid{
  display:grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

.ticket{
  display:flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
}

.ticket:last-child{ border-bottom: none; }

.ticket .alias{
  font-weight: 900;
  font-size: 24px;
  letter-spacing: 0.02em;
}

.ticket .name{ font-size: 16px; color: var(--muted); }
.ticket .meta{ font-size: 12px; color: var(--muted); }

.staff-actions{
  display:flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.staff-actions .btn{
  width: auto;
  padding: 10px 12px;
  font-size: 14px;
  border-radius: 12px;
}

.staff-actions .btn.primary{ font-weight: 800; }

/* Responsive */
@media (max-width: 860px){
  .display-grid, .staff-grid{ grid-template-columns: 1fr; }
  .brand .subtitle{ font-size: 30px; }
  input, .btn{ font-size: 28px; }
  .display-now{ font-size: 96px; }
}

/* Reduce motion if requested */
@media (prefers-reduced-motion: reduce){
  * { transition: none !important; }
}
