/* Register panel: built for a counter tablet or laptop */
body { font-size: 16px; }
.small { font-size: 13px; }
.block { display: block; }
.grow { flex: 1; }
.strong { font-weight: 700; }
.num { text-align: right; }
.linkish { background: none; border: 0; padding: 0; color: var(--cyan); font: inherit; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.danger { color: var(--danger) !important; }
.r-logo { font: 800 17px/1 var(--display); margin: 0; white-space: nowrap; }
.r-logo span { color: var(--pink); }

/* ---------- auth ---------- */
.auth { min-height: 100vh; display: grid; place-items: center; padding: 24px 16px; background: radial-gradient(70vmax 50vmax at 100% 0%, rgba(255, 95, 180, .15), transparent 60%), var(--bg); }
.auth-card { width: min(400px, 100%); background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 32px; box-shadow: var(--shadow); }
.auth-card h1 { font-size: 26px; margin: 22px 0 18px; }
.auth-card .linkish { display: block; margin: 16px auto 0; font-size: 14px; }

/* ---------- top bar ---------- */
.topbar { position: sticky; top: 0; z-index: 10; display: flex; align-items: center; gap: 20px; padding: 0 20px; height: 64px; background: rgba(15, 11, 19, .92); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.r-tabs { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; }
.r-tabs button { position: relative; height: 40px; padding: 0 14px; border-radius: 10px; border: 0; background: transparent; color: var(--muted); font: 600 15px var(--body); cursor: pointer; white-space: nowrap; }
.r-tabs button:hover { color: var(--text); background: var(--surface); }
.r-tabs button[aria-selected=true] { color: var(--text); background: var(--surface-2); }
.badge { display: inline-grid; place-items: center; min-width: 22px; height: 22px; padding: 0 6px; margin-left: 4px; border-radius: 999px; background: var(--pink); color: var(--on-accent); font-size: 12px; font-weight: 700; }
.topbar-right { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.who { font-size: 14px; max-width: 160px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.live { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); }
.live::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--danger); }
.live.on::before { background: var(--green); box-shadow: 0 0 0 3px rgba(110, 231, 168, .2); }

.banners { padding: 0 20px; }
.banner { margin: 14px 0 0; padding: 12px 16px; border-radius: var(--radius-sm); background: rgba(255, 216, 77, .1); border: 1px solid rgba(255, 216, 77, .35); color: #ffe89a; font-size: 15px; }

.view { padding: 20px; }
.view.narrow { max-width: 860px; }
.view h2 { font-size: 22px; }

/* ---------- orders board ---------- */
.board { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; align-items: start; }
.col { background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; min-height: 60vh; }
.col h2 { font: 700 15px var(--display); display: flex; justify-content: space-between; margin: 4px 6px 14px; }
.col[data-col=new] h2 { color: var(--pink); }
.col[data-col=preparing] h2 { color: var(--yellow); }
.col[data-col=ready] h2 { color: var(--cyan); }
.col-list { display: grid; gap: 12px; }
.empty { padding: 24px 8px; text-align: center; font-size: 14px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; animation: pop .35s var(--ease); }
@keyframes pop { from { transform: scale(.96); opacity: 0; } }
.card.soon { border-color: rgba(255, 216, 77, .5); }
.card.late { border-color: var(--danger); }
.card-main { display: block; width: 100%; text-align: left; padding: 14px 16px 10px; background: none; border: 0; color: inherit; font: inherit; cursor: pointer; }
.card-main:hover { background: var(--surface-2); }
.card-top { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.card .num { font: 800 19px var(--display); text-align: left; }
.due { font-size: 13px; color: var(--muted); text-align: right; }
.due.soon { color: var(--yellow); font-weight: 700; }
.due.late { color: var(--danger); font-weight: 700; }
.cust { margin: 6px 0 8px; font-size: 14px; color: var(--muted); }
.cust strong { color: var(--text); }
.card-items { list-style: none; margin: 0; padding: 0; font-size: 15px; display: grid; gap: 2px; }
.card-items b { color: var(--pink); }
.card-note { margin: 10px 0 0; padding: 8px 12px; border-radius: 10px; background: rgba(255, 216, 77, .1); color: #ffe89a; font-size: 14px; }
.card-actions { display: flex; gap: 8px; padding: 0 12px 12px; }

/* ---------- tables ---------- */
.toolbar { display: flex; gap: 12px; align-items: end; flex-wrap: wrap; margin-bottom: 16px; }
.toolbar p { margin: 0 0 12px; }
.field.inline { margin: 0; }
.field.inline.grow { min-width: 220px; }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 16px; }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 14px 18px; display: grid; gap: 4px; font-size: 14px; }
.stat strong { font: 700 24px var(--display); }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 14px; }
.list { width: 100%; border-collapse: collapse; font-size: 15px; }
.list th { text-align: left; font-weight: 500; color: var(--muted); font-size: 13px; padding: 12px 14px; background: var(--bg-2); white-space: nowrap; }
.list td { padding: 12px 14px; border-top: 1px solid var(--line); vertical-align: middle; }
.list tbody tr { cursor: pointer; }
.list tbody tr:hover { background: var(--surface); }
.list th.num, .list td.num { text-align: right; }
.menu-table tr.off td:not(:nth-last-child(-n+2)) { opacity: .5; }
.menu-table td .tag { margin-right: 4px; }
.tag.tax { background: rgba(185, 147, 255, .15); color: var(--lilac); }
.pill { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: 12px; font-weight: 700; background: var(--surface-2); color: var(--muted); white-space: nowrap; }
.pill.new { background: rgba(255, 95, 180, .15); color: var(--pink); }
.pill.preparing { background: rgba(255, 216, 77, .14); color: var(--yellow); }
.pill.ready { background: rgba(79, 224, 232, .14); color: var(--cyan); }
.pill.completed { background: rgba(110, 231, 168, .14); color: var(--green); }
.pill.cancelled { background: rgba(255, 107, 107, .14); color: var(--danger); }
.toggle { height: 32px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--line); background: transparent; color: var(--danger); font: 600 13px var(--body); cursor: pointer; white-space: nowrap; }
.toggle.on { color: var(--green); border-color: rgba(110, 231, 168, .4); }

/* ---------- staff + settings ---------- */
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; margin-bottom: 20px; }
.panel h3 { font-size: 17px; }
.grid3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; }
.check.big { font-size: 16px; color: var(--text); margin-bottom: 16px; }
.staff-list { list-style: none; padding: 0; margin: 0 0 20px; display: grid; gap: 10px; }
.staff { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 14px 18px; }
.staff-actions { display: flex; gap: 8px; }

/* ---------- modals ---------- */
.modal { width: min(480px, calc(100vw - 32px)); padding: 28px; border-radius: var(--radius); border: 1px solid var(--line); background: var(--surface); color: var(--text); box-shadow: var(--shadow); }
.modal.wide { width: min(640px, calc(100vw - 32px)); }
.modal::backdrop { background: rgba(5, 3, 7, .65); backdrop-filter: blur(3px); }
.modal[open] { animation: pop .25s var(--ease); }
.modal h2 { font-size: 22px; margin-bottom: 6px; }
.modal-actions { display: flex; gap: 10px; align-items: center; margin-top: 22px; flex-wrap: wrap; }
.od-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; }
.od-head p { margin: 0; }
.od-meta { display: grid; grid-template-columns: auto 1fr; gap: 6px 20px; margin: 18px 0; padding: 14px 0; border-block: 1px solid var(--line); }
.od-meta dt { color: var(--muted); }
.od-meta dd { margin: 0; }
.od-items { width: 100%; border-collapse: collapse; margin-top: 12px; }
.od-items td { padding: 8px 0; border-bottom: 1px solid var(--line); }
.od-items td + td { padding-left: 12px; }
.od-items tfoot td { border: 0; color: var(--muted); padding: 4px 0; }
.od-items tfoot td.num { color: var(--text); }
.od-items .grand td { color: var(--text); font-weight: 700; font-size: 18px; padding-top: 10px; }

.toast:empty { display: none; }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, calc(100% + 40px)); padding: 12px 20px; border-radius: 999px; background: var(--text); color: var(--on-accent); font-weight: 600; box-shadow: var(--shadow); transition: transform .3s var(--ease); z-index: 100; max-width: calc(100vw - 32px); }
.toast.show { transform: translate(-50%, 0); }
.toast.bad { background: var(--danger); }

@media (max-width: 980px) {
  .topbar { flex-wrap: wrap; height: auto; padding: 10px 16px; gap: 8px 14px; }
  .r-tabs { order: 3; width: 100%; }
  .who { display: none; }
  .board { grid-template-columns: 1fr; }
  .col { min-height: 0; }
  .view, .banners { padding-inline: 16px; }
  .stats { grid-template-columns: 1fr 1fr; }
}
.panel h3.sub { margin-top: 26px; }
