:root {
  --bg: #f5f1ea;
  --card: #ffffff;
  --text: #161616;
  --muted: #74706a;
  --line: #e5ded4;
  --accent: #111111;
  --yellow: #ffe7a3;
  --yellow-strong: #f5b736;
  --green: #dff6df;
  --green-strong: #1d8a35;
  --red: #ffe0dc;
  --shadow: 0 18px 60px rgba(0,0,0,.10);
  --radius: 28px;
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text);
  background: var(--bg);
}

.guest-page {
  display: grid;
  place-items: center;
  min-height: 100svh;
  padding: 20px;
  transition: background .25s ease;
}

.guest-card {
  width: min(100%, 480px);
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 30px 24px 24px;
  text-align: center;
}

.brand {
  font-weight: 950;
  letter-spacing: .08em;
  font-size: 24px;
}

.kicker {
  margin-top: 6px;
  font-size: 12px;
  letter-spacing: .18em;
  color: var(--muted);
  font-weight: 850;
}

h1 {
  margin: 26px 0 10px;
  font-size: clamp(32px, 9vw, 44px);
  line-height: 1.02;
}

h2 {
  margin: 0 0 14px;
  font-size: 18px;
}

.lead {
  color: var(--muted);
  font-size: 18px;
  line-height: 1.45;
  margin: 0 auto 24px;
}

.party-box {
  margin: 26px 0 20px;
  padding: 18px;
  background: #faf8f4;
  border: 1px solid var(--line);
  border-radius: 22px;
}

.party-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 9px;
}

.party-grid button,
.primary-btn,
.action-btn,
.sound-btn {
  border: 0;
  border-radius: 18px;
  font-weight: 850;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.party-grid button {
  height: 56px;
  background: white;
  border: 1px solid var(--line);
  font-size: 21px;
}

.party-grid button.active {
  background: var(--accent);
  color: white;
  border-color: var(--accent);
}

.primary-btn {
  width: 100%;
  height: 62px;
  background: var(--accent);
  color: white;
  font-size: 18px;
}

.primary-btn:disabled,
.sound-btn:disabled { opacity: .55; }

.sound-btn {
  margin-top: 16px;
  min-height: 44px;
  padding: 0 16px;
  background: #f2eee8;
  color: var(--text);
  border: 1px solid var(--line);
}

.small-note {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
  margin: 16px 0 0;
}

.ticket-code {
  margin: 24px auto 14px;
  width: min(78vw, 250px);
  height: 138px;
  display: grid;
  place-items: center;
  border-radius: 32px;
  background: var(--accent);
  color: white;
  font-size: clamp(58px, 17vw, 78px);
  font-weight: 950;
  letter-spacing: .05em;
}

.status-badge {
  width: fit-content;
  margin: 0 auto;
  padding: 8px 14px;
  border-radius: 999px;
  background: #f2eee8;
  color: var(--muted);
  font-size: 12px;
  letter-spacing: .12em;
  font-weight: 950;
}

.ticket-meta {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 22px;
}

.ticket-meta div {
  background: #faf8f4;
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 14px;
}

.ticket-meta span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .08em;
  font-weight: 800;
}

.ticket-meta strong {
  display: block;
  margin-top: 4px;
  font-size: 24px;
}

.return-panel {
  display: none;
  align-items: center;
  gap: 14px;
  margin-top: 20px;
  padding: 18px;
  border-radius: 24px;
  background: #111;
  color: #fff;
  text-align: left;
  box-shadow: 0 12px 28px rgba(0,0,0,.18);
}

.return-icon {
  width: 54px;
  height: 54px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: rgba(255,255,255,.14);
  font-size: 34px;
  font-weight: 950;
}

.return-panel strong {
  display: block;
  font-size: 22px;
  line-height: 1.05;
}

.return-panel span {
  display: block;
  margin-top: 6px;
  color: rgba(255,255,255,.78);
  font-size: 15px;
}

body.status-called_15 { background: var(--yellow); }
body.status-called_now { background: var(--green); }
body.status-no_show,
body.status-cancelled,
body.status-expired,
body.status-seated { background: #e6e2db; }
body.status-called_now .ticket-code { background: var(--green-strong); }
body.status-called_15 .ticket-code { background: #a96e00; }
body.status-called_now .status-badge { background: var(--green-strong); color: white; }
body.status-called_15 .status-badge { background: var(--yellow-strong); color: #111; }
body.status-called_now h1,
body.status-called_15 h1 { font-size: clamp(34px, 10vw, 50px); }
body.status-called_now .guest-card,
body.status-called_15 .guest-card { outline: 8px solid rgba(255,255,255,.55); }

.admin-page {
  min-height: 100svh;
  padding: 18px;
}

.admin-header {
  max-width: 1180px;
  margin: 0 auto 14px;
  background: white;
  border-radius: 24px;
  box-shadow: var(--shadow);
  padding: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.admin-brand { font-size: 22px; }
.admin-stats { display: flex; gap: 12px; }
.admin-stats div {
  min-width: 98px;
  padding: 12px 14px;
  background: #faf8f4;
  border: 1px solid var(--line);
  border-radius: 18px;
  text-align: center;
}
.admin-stats span { display: block; color: var(--muted); font-size: 12px; font-weight: 800; }
.admin-stats strong { font-size: 22px; }

.admin-main { max-width: 1180px; margin: 0 auto; }
.admin-note {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  margin: 0 0 12px;
  padding: 0 6px;
}
.tickets-list { display: grid; gap: 12px; }

.ticket-row {
  background: white;
  border-radius: 24px;
  box-shadow: 0 8px 28px rgba(0,0,0,.08);
  padding: 14px;
  display: grid;
  grid-template-columns: 110px 1fr auto;
  gap: 16px;
  align-items: center;
  border-left: 10px solid transparent;
}

.ticket-row.called_15 { border-left-color: #d99100; background: #fff8e1; }
.ticket-row.called_now { border-left-color: #168030; background: #f1fff1; }

.row-code { font-size: 34px; font-weight: 950; letter-spacing: .04em; }
.row-info { display: flex; gap: 14px; flex-wrap: wrap; color: var(--muted); font-weight: 750; }
.row-info strong { color: var(--text); }
.row-actions { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }

.action-btn {
  min-height: 44px;
  padding: 0 14px;
  background: #f2eee8;
  color: var(--text);
  font-size: 14px;
}
.action-btn.primary { background: #111; color: #fff; }
.action-btn.good { background: #dff6df; }
.action-btn.warn { background: #ffe7a3; }
.action-btn.bad { background: #ffe0dc; }

.empty-state {
  display: none;
  background: white;
  border-radius: 24px;
  padding: 50px 20px;
  text-align: center;
  color: var(--muted);
  font-size: 22px;
  font-weight: 800;
  box-shadow: var(--shadow);
}

@media (max-width: 760px) {
  .admin-header { align-items: stretch; flex-direction: column; }
  .admin-stats { width: 100%; }
  .admin-stats div { flex: 1; }
  .ticket-row { grid-template-columns: 1fr; }
  .row-actions { justify-content: stretch; }
  .action-btn { flex: 1 1 46%; }
}

/* v4 Web Push */
.notify-box {
  margin-top: 18px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: #faf8f4;
  text-align: left;
}

.notify-title {
  font-size: 18px;
  font-weight: 950;
  letter-spacing: -.02em;
}

.notify-box p {
  margin: 7px 0 14px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.35;
}

.notify-btn {
  height: 52px;
  font-size: 16px;
}

.notify-state {
  display: none;
  margin-top: 12px;
  padding: 11px 12px;
  border-radius: 16px;
  font-size: 14px;
  font-weight: 800;
  line-height: 1.3;
}

.notify-state.ok {
  display: block;
  background: var(--green);
  color: var(--green-strong);
}

.notify-state.warn {
  display: block;
  background: var(--yellow);
  color: #6d4a00;
}

.notify-state.bad {
  display: block;
  background: var(--red);
  color: #8b1b10;
}

/* v6 multi-restaurant, admin auth, guest cancellation */
.brand-logo {
  display: block;
  max-width: 170px;
  max-height: 78px;
  object-fit: contain;
  margin: 0 auto 12px;
}
.admin-logo { margin: 0 0 10px; }

.pin-form { display: grid; gap: 12px; margin-top: 18px; }
.pin-form input {
  height: 58px;
  border-radius: 18px;
  border: 1px solid var(--line);
  padding: 0 18px;
  text-align: center;
  font-size: 24px;
  font-weight: 850;
  letter-spacing: .16em;
  background: #faf8f4;
}
.logout-link {
  display: grid;
  place-items: center;
  min-height: 48px;
  padding: 0 14px;
  border-radius: 16px;
  background: #f2eee8;
  color: var(--text);
  text-decoration: none;
  font-weight: 850;
}
.tables-panel {
  background: white;
  border-radius: 24px;
  box-shadow: 0 8px 28px rgba(0,0,0,.08);
  padding: 16px;
  margin-bottom: 14px;
}
.panel-title {
  font-weight: 950;
  font-size: 18px;
  margin-bottom: 8px;
}
.tables-list { display: flex; flex-wrap: wrap; gap: 8px; }
.table-chip {
  min-width: 90px;
  padding: 10px 12px;
  border-radius: 16px;
  background: #faf8f4;
  border: 1px solid var(--line);
}
.table-chip strong { display:block; font-size: 18px; }
.table-chip span { display:block; margin-top: 2px; color: var(--muted); font-size: 12px; font-weight: 800; }
.cancel-box {
  margin-top: 14px;
  border-top: 1px solid var(--line);
  padding-top: 14px;
}
.link-btn {
  border: 0;
  background: transparent;
  color: var(--muted);
  text-decoration: underline;
  font-weight: 850;
  cursor: pointer;
  min-height: 42px;
}
.cancel-panel {
  display: none;
  margin-top: 10px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: #faf8f4;
  text-align: left;
}
.cancel-panel p {
  color: var(--muted);
  margin: 6px 0 12px;
  font-size: 14px;
  line-height: 1.35;
}
.cancel-panel select,
.cancel-panel textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 12px;
  background: #fff;
  font: inherit;
  margin-bottom: 10px;
}
.cancel-panel textarea { min-height: 86px; resize: vertical; }
.cancel-actions { display: flex; gap: 8px; }
.cancel-actions .action-btn { flex: 1; }

/* v11 visit duration + admin timeline */
.duration-box { margin-top: 14px; }
.duration-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 9px;
}
.duration-grid button {
  min-height: 52px;
  background: white;
  border: 1px solid var(--line);
  border-radius: 18px;
  font-size: 17px;
  font-weight: 850;
  cursor: pointer;
}
.duration-grid button.active {
  background: var(--accent);
  color: white;
  border-color: var(--accent);
}
.timeline-panel {
  margin-top: 18px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 16px;
  box-shadow: 0 10px 30px rgba(0,0,0,.06);
}
.timeline-list {
  display: grid;
  gap: 8px;
}
.timeline-item {
  display: grid;
  grid-template-columns: 132px 1fr;
  gap: 12px;
  align-items: start;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #faf8f4;
}
.timeline-time {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}
.timeline-body {
  font-size: 14px;
  font-weight: 800;
}
.timeline-meta {
  margin-top: 4px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}
.timeline-item.status_called_now { background: #f1fff1; }
.timeline-item.status_called_15 { background: #fff8e1; }
.timeline-item.cancelled, .timeline-item.status_cancelled { background: #fff0ee; }
@media (max-width: 700px) {
  .timeline-item { grid-template-columns: 1fr; }
}

/* v13 admin daily 0-24 timeline */
.admin-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 18px;
  align-items: start;
}
.admin-content { min-width: 0; }
.waiting-timeline-panel,
.ticket-detail-panel,
.tickets-panel,
.tables-panel {
  background: #fff;
  border: 1px solid rgba(20, 20, 20, 0.08);
  border-radius: 22px;
  box-shadow: 0 18px 50px rgba(0,0,0,.06);
  padding: 16px;
  margin-bottom: 16px;
}
.panel-title {
  font-size: 18px;
  font-weight: 950;
  margin-bottom: 10px;
  letter-spacing: -.02em;
}
.timeline-scale {
  --day-label-width: 92px;
  --day-state-width: 58px;
  display: grid;
  grid-template-columns: var(--day-label-width) minmax(0, 1fr) var(--day-state-width);
  gap: 8px;
  align-items: end;
  height: 38px;
  margin: 4px 0 8px;
}
.timeline-scale::before {
  content: "";
  grid-column: 1;
}
.day-ticks {
  grid-column: 2;
  position: relative;
  height: 34px;
  border-bottom: 1px solid rgba(0,0,0,.16);
  background: linear-gradient(to right, rgba(0,0,0,.04) 0 1px, transparent 1px);
  border-radius: 10px 10px 0 0;
}
.day-slot-line {
  position: absolute;
  top: 16px;
  bottom: 0;
  border-left: 1px solid rgba(0,0,0,.055);
}
.day-slot-line.hour {
  top: 0;
  border-left-color: rgba(0,0,0,.18);
}
.day-hour-tick {
  position: absolute;
  top: 0;
  height: 100%;
}
.day-hour-tick span {
  position: absolute;
  top: 0;
  transform: translateX(-50%);
  white-space: nowrap;
  font-size: 10px;
  color: #777;
  font-weight: 800;
}
.waiting-timeline-rows {
  display: grid;
  gap: 8px;
}
.dayline-row {
  --day-label-width: 92px;
  --day-state-width: 58px;
  display: grid;
  grid-template-columns: var(--day-label-width) minmax(0, 1fr) var(--day-state-width);
  gap: 8px;
  align-items: center;
  min-height: 38px;
}
.dayline-label {
  display: flex;
  align-items: baseline;
  gap: 6px;
  min-width: 0;
  color: #555;
  font-size: 11px;
  font-weight: 800;
}
.dayline-label strong {
  font-size: 20px;
  color: #111;
  letter-spacing: .04em;
}
.dayline-track {
  position: relative;
  height: 34px;
  border-radius: 12px;
  background:
    repeating-linear-gradient(to right, rgba(0,0,0,.06) 0 1px, transparent 1px calc(100% / 96)),
    #f6f6f5;
  overflow: hidden;
  box-shadow: inset 0 0 0 1px rgba(0,0,0,.06);
}
.dayline-now {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 2px;
  background: rgba(15, 15, 15, .55);
  z-index: 4;
  pointer-events: none;
}
.dayline-wait,
.dayline-visit {
  position: absolute;
  top: 5px;
  height: 24px;
  border: 0;
  cursor: pointer;
}
.dayline-wait {
  min-width: 3px;
  border-radius: 999px 0 0 999px;
  background: rgba(47,104,216,.22);
  border: 1px dashed rgba(47,104,216,.55);
  z-index: 1;
}
.dayline-visit {
  min-width: 54px;
  border-radius: 999px;
  padding: 0 9px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #fff;
  background: #2f68d8;
  box-shadow: 0 8px 18px rgba(47,104,216,.22);
  font-weight: 850;
  white-space: nowrap;
  overflow: hidden;
  z-index: 2;
}
.dayline-visit span { flex: 0 0 auto; }
.dayline-visit .bar-code { letter-spacing: .06em; }
.bar-duration { opacity: .92; }
.bar-table {
  background: rgba(255,255,255,.24);
  border-radius: 999px;
  padding: 3px 7px;
}
.dayline-row.called_15 .dayline-visit { background: #d58a00; box-shadow: 0 8px 18px rgba(213,138,0,.22); }
.dayline-row.called_now .dayline-visit { background: #16803a; box-shadow: 0 8px 18px rgba(22,128,58,.22); }
.dayline-row.wait-warn .dayline-track { background-color: #fff9e8; }
.dayline-row.wait-long .dayline-track { background-color: #fff0ee; }
.dayline-row.selected .dayline-track { outline: 3px solid rgba(20,20,20,.15); }
.dayline-state {
  color: #555;
  font-size: 11px;
  font-weight: 850;
  text-align: right;
  white-space: nowrap;
}
.timeline-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 12px 0 0 100px;
  font-size: 12px;
  color: #666;
}
.legend {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  margin-right: 5px;
  vertical-align: -1px;
  background: #2f68d8;
}
.legend.called_15 { background: #d58a00; }
.legend.called_now { background: #16803a; }
.legend.expected { background: transparent; border: 1px dashed rgba(47,104,216,.55); }
.timeline-empty { margin: 8px 0 0 100px; }
@media (max-width: 900px) {
  .admin-layout { grid-template-columns: 1fr; }
  .ticket-detail-panel { position: static; }
  .timeline-scale, .dayline-row {
    --day-label-width: 72px;
    --day-state-width: 48px;
    gap: 6px;
  }
  .dayline-label { flex-direction: column; align-items: flex-start; gap: 0; }
  .dayline-label strong { font-size: 17px; }
  .dayline-visit { min-width: 48px; gap: 4px; padding: 0 7px; font-size: 11px; }
  .timeline-legend, .timeline-empty { margin-left: 78px; }
}

.ticket-detail-panel {
  position: sticky;
  top: 14px;
}
.detail-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}
.detail-code {
  font-size: 42px;
  font-weight: 950;
  letter-spacing: .06em;
  line-height: 1;
}
.detail-close {
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 50%;
  background: #f0f0f0;
  cursor: pointer;
  font-size: 22px;
}
.detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 14px;
}
.detail-grid div {
  background: #f8f8f8;
  border-radius: 14px;
  padding: 10px;
}
.detail-grid span,
.detail-label {
  display: block;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: #777;
  margin-bottom: 4px;
}
.detail-grid strong {
  font-size: 16px;
  color: #111;
}
.detail-table-row {
  display: flex;
  gap: 8px;
  margin-bottom: 14px;
}
.detail-table-row input {
  flex: 1;
  min-width: 0;
  border: 1px solid rgba(0,0,0,.12);
  border-radius: 12px;
  padding: 10px 12px;
  font-size: 14px;
}
.detail-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.detail-actions .action-btn { width: 100%; }
.table-chip {
  border: 1px solid rgba(0,0,0,.08);
  background: #fff;
  border-radius: 999px;
  padding: 8px 10px;
  cursor: pointer;
}
@media (max-width: 900px) {
  .admin-layout { grid-template-columns: 1fr; }
  .ticket-detail-panel { position: static; }
  .timeline-scale { margin-left: 76px; margin-right: 62px; }
  .waitline-row { grid-template-columns: 62px minmax(0,1fr) 56px; gap: 8px; }
  .waitline-label strong { font-size: 18px; }
  .waitline-bar { min-width: 70px; gap: 5px; padding: 0 8px; font-size: 12px; }
  .timeline-legend, .timeline-empty { margin-left: 76px; }
}


/* v14 full-width admin dashboard */
body.admin-page {
  min-height: 100svh;
  padding: 10px;
  overflow-x: hidden;
}

.admin-page .admin-header {
  max-width: none;
  width: 100%;
  margin: 0 0 10px;
  border-radius: 18px;
  padding: 14px 18px;
}

.admin-page .admin-main {
  max-width: none;
  width: 100%;
  margin: 0;
}

.admin-page .admin-layout {
  grid-template-columns: minmax(0, 1fr) 380px;
  gap: 10px;
  align-items: start;
}

.admin-page .admin-content {
  width: 100%;
}

.admin-page .waiting-timeline-panel,
.admin-page .ticket-detail-panel,
.admin-page .tickets-panel,
.admin-page .tables-panel {
  border-radius: 18px;
  padding: 12px;
  margin-bottom: 10px;
}

.admin-page .waiting-timeline-panel {
  min-height: calc(100svh - 210px);
}

.admin-page .timeline-scale,
.admin-page .dayline-row {
  --day-label-width: 118px;
  --day-state-width: 66px;
  gap: 6px;
}

.admin-page .timeline-scale {
  height: 34px;
  margin-bottom: 6px;
}

.admin-page .waiting-timeline-rows {
  gap: 6px;
}

.admin-page .dayline-row {
  min-height: 34px;
}

.admin-page .dayline-track {
  height: 30px;
  border-radius: 10px;
}

.admin-page .dayline-wait,
.admin-page .dayline-visit {
  top: 4px;
  height: 22px;
}

.admin-page .dayline-label strong {
  font-size: 19px;
}

.admin-page .dayline-state {
  font-size: 12px;
}

.admin-page .day-hour-tick span {
  font-size: 10px;
}

.admin-page .admin-note {
  margin-bottom: 8px;
}

.admin-page .ticket-detail-panel {
  position: sticky;
  top: 10px;
  max-height: calc(100svh - 20px);
  overflow: auto;
}

.admin-page .tables-panel,
.admin-page .tickets-panel {
  max-height: 26svh;
  overflow: auto;
}

.admin-page .tickets-list {
  gap: 8px;
}

.admin-page .ticket-row {
  border-radius: 18px;
  padding: 10px 12px;
  grid-template-columns: 90px 1fr auto;
  gap: 10px;
}

.admin-page .row-code {
  font-size: 28px;
}

.admin-page .row-info {
  gap: 8px 12px;
  font-size: 13px;
}

.admin-page .action-btn {
  min-height: 38px;
  border-radius: 14px;
}

@media (min-width: 1500px) {
  .admin-page .admin-layout {
    grid-template-columns: minmax(0, 1fr) 420px;
  }
  .admin-page .timeline-scale,
  .admin-page .dayline-row {
    --day-label-width: 132px;
    --day-state-width: 72px;
  }
}

@media (max-width: 1100px) {
  .admin-page .admin-layout {
    grid-template-columns: 1fr;
  }
  .admin-page .ticket-detail-panel {
    position: static;
    max-height: none;
  }
  .admin-page .waiting-timeline-panel {
    min-height: auto;
  }
}

/* v15 operational day timeline + fullscreen detail */
.admin-page .admin-layout {
  display: block;
}

.admin-page .admin-content {
  width: 100%;
}

.admin-page .waiting-timeline-panel {
  min-height: auto;
  padding-bottom: 10px;
}

.admin-page .timeline-scale,
.admin-page .dayline-row {
  --day-label-width: 104px;
  --day-state-width: 58px;
}

.admin-page .timeline-scale {
  height: 30px;
}

.admin-page .day-ticks {
  height: 28px;
}

.admin-page .day-slot-line {
  top: 14px;
}

.admin-page .dayline-row {
  min-height: 30px;
}

.admin-page .dayline-track {
  height: 28px;
}

.admin-page .dayline-wait,
.admin-page .dayline-visit {
  top: 4px;
  height: 20px;
}

.admin-page .dayline-label strong {
  font-size: 18px;
}

.admin-page .dayline-label span,
.admin-page .dayline-state {
  font-size: 11px;
}

.admin-page .timeline-legend {
  margin-top: 8px;
}

.admin-page .ticket-detail-panel {
  position: fixed;
  inset: 0;
  z-index: 1000;
  max-height: none;
  overflow: auto;
  margin: 0;
  border-radius: 0;
  padding: clamp(16px, 3vw, 34px);
  background: rgba(245, 241, 234, .98);
  box-shadow: none;
}

body.detail-open {
  overflow: hidden;
}

.admin-page .ticket-detail-panel .detail-head,
.admin-page .ticket-detail-panel .detail-grid,
.admin-page .ticket-detail-panel .detail-table-row,
.admin-page .ticket-detail-panel .detail-actions,
.admin-page .ticket-detail-panel .detail-label {
  max-width: 980px;
  margin-left: auto;
  margin-right: auto;
}

.admin-page .ticket-detail-panel .detail-grid {
  grid-template-columns: repeat(5, 1fr);
}

.admin-page .ticket-detail-panel .detail-code {
  font-size: clamp(56px, 9vw, 110px);
}

.admin-page .ticket-detail-panel .detail-actions {
  grid-template-columns: repeat(5, 1fr);
}

.admin-page .tables-panel,
.admin-page .tickets-panel {
  max-height: none;
}

@media (max-width: 900px) {
  .admin-page .ticket-detail-panel .detail-grid,
  .admin-page .ticket-detail-panel .detail-actions {
    grid-template-columns: 1fr 1fr;
  }
  .admin-page .timeline-scale,
  .admin-page .dayline-row {
    --day-label-width: 78px;
    --day-state-width: 48px;
  }
}
