/* Restaurant QR — staff screens (kitchen + admin), warm dark theme */
body.staff {
  --bg: #12100e;
  --surface: #1b1815;
  --surface2: #24201c;
  --surface3: #2d2823;
  --text: #f4ece1;
  --muted: #a5978a;
  --line: #332d27;
  --shadow: 0 10px 30px rgba(0,0,0,.35);
  background: var(--bg);
  color: var(--text);
  color-scheme: dark;
}
body.staff .dlg { background: var(--surface); border: 1px solid var(--line); }
body.staff .toast { background: #f4ece1; color: #1b1410; }
body.staff .toast-ok { background: var(--ok); color: #fff; }
body.staff .toast-error { background: var(--danger); color: #fff; }
body.staff .toast-warn { background: var(--warn); color: #1b1410; }
body.staff .input, body.staff .field input, body.staff .field select, body.staff .field textarea { background: var(--surface2); }
body.staff a { color: inherit; }
a.btn, a.icon-btn { text-decoration: none; }

/* ---------- Login ---------- */
.login { min-height: 100dvh; display: grid; place-items: center; padding: 20px;
  background: radial-gradient(70% 60% at 85% 0%, color-mix(in srgb, var(--accent) 30%, transparent), transparent 60%), var(--bg); }
.login-card { width: min(400px, 100%); padding: 28px; border-radius: 24px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); }
.login-card h1 { margin: 14px 0 4px; font-family: var(--f-display); font-size: 1.7rem; }
.login-card p { margin: 0 0 20px; color: var(--muted); }
.demo-hint { margin-top: 14px; padding: 10px 12px; border-radius: 12px; background: var(--accent-soft); color: var(--text); font-size: .85rem; }
.mark { width: 48px; height: 48px; border-radius: 15px; display: grid; place-items: center; overflow: hidden; background: var(--accent); color: var(--accent-ink); font-family: var(--f-display); font-weight: 800; font-size: 1.35rem; flex: none; }
.mark img { width: 100%; height: 100%; object-fit: cover; }
.demo-badge { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 99px; background: rgba(208,144,26,.16); color: #e8b04a; font-size: .72rem; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; }

/* ---------- Kitchen ---------- */
.k-top { position: sticky; top: 0; z-index: 10; display: flex; align-items: center; gap: 14px; padding: 12px 18px; background: rgba(18,16,14,.92); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.k-top h1 { margin: 0; font-family: var(--f-display); font-size: 1.25rem; line-height: 1.1; }
.k-top small { color: var(--muted); font-weight: 600; }
.k-top .spacer { flex: 1; }
.k-clock { font-variant-numeric: tabular-nums; font-weight: 800; font-size: 1.2rem; padding: 6px 12px; border-radius: 12px; background: var(--surface2); }
.k-calls { display: flex; gap: 10px; padding: 12px 18px 0; overflow-x: auto; }
.k-calls:empty { display: none; }
.call {
  flex: none; display: flex; align-items: center; gap: 10px; padding: 10px 10px 10px 14px; border-radius: 16px;
  background: rgba(208,144,26,.14); border: 1px solid rgba(208,144,26,.4); animation: callPulse 1.6s ease-in-out infinite;
}
.call.bill { background: rgba(123,92,201,.16); border-color: rgba(123,92,201,.45); }
.call b { font-size: 1rem; }
.call small { color: var(--muted); display: block; font-size: .75rem; }
@keyframes callPulse { 50% { box-shadow: 0 0 0 6px rgba(208,144,26,.12); } }
.board { display: grid; grid-template-columns: repeat(3, minmax(280px, 1fr)); gap: 16px; padding: 16px 18px 30px; align-items: start; }
@media (max-width: 900px) { .board { grid-template-columns: 1fr; } }
.col { background: var(--surface); border: 1px solid var(--line); border-radius: 22px; padding: 12px; min-height: 200px; }
.col-head { display: flex; align-items: center; justify-content: space-between; padding: 4px 6px 12px; }
.col-head h2 { margin: 0; font-size: 1rem; text-transform: uppercase; letter-spacing: .08em; display: flex; align-items: center; gap: 10px; }
.col-head h2::before { content: ''; width: 10px; height: 10px; border-radius: 50%; background: var(--c); box-shadow: 0 0 0 4px color-mix(in srgb, var(--c) 25%, transparent); }
.col-head .count { min-width: 30px; height: 30px; padding: 0 8px; border-radius: 10px; display: grid; place-items: center; background: var(--surface2); font-weight: 800; }
.col-new { --c: #3a78c9; } .col-preparing { --c: #d0901a; } .col-ready { --c: #2f8a57; }
.col-empty { text-align: center; color: var(--muted); padding: 36px 10px; font-size: .9rem; }
.ticket { background: var(--surface2); border: 1px solid var(--line); border-top: 4px solid var(--c); border-radius: 16px; padding: 14px; margin-bottom: 12px; animation: drop .35s ease; }
@keyframes drop { from { opacity: 0; transform: translateY(-8px); } }
.ticket.fresh { box-shadow: 0 0 0 2px var(--c); }
.t-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; margin-bottom: 10px; }
.t-table { font-family: var(--f-display); font-size: 1.45rem; font-weight: 800; line-height: 1; }
.t-code { color: var(--muted); font-size: .78rem; font-weight: 700; letter-spacing: .1em; margin-top: 4px; }
.t-time { display: inline-flex; align-items: center; gap: 5px; padding: 4px 9px; border-radius: 9px; font-weight: 800; font-size: .82rem; background: var(--surface3); font-variant-numeric: tabular-nums; }
.t-time.warn { background: rgba(208,144,26,.2); color: #f0b445; }
.t-time.late { background: rgba(201,58,50,.22); color: #ff7b72; }
.t-items { list-style: none; margin: 0; padding: 0; display: grid; gap: 7px; }
.t-items li { display: grid; grid-template-columns: 34px 1fr; gap: 8px; font-size: 1.02rem; font-weight: 600; }
.t-items .q { display: grid; place-items: center; height: 28px; border-radius: 8px; background: var(--surface3); font-weight: 800; }
.t-items .n small { display: block; color: #f0b445; font-weight: 700; font-size: .82rem; }
.t-note { margin-top: 10px; padding: 8px 10px; border-radius: 10px; background: rgba(208,144,26,.12); color: #f0c46a; font-size: .88rem; font-weight: 600; }
.t-actions { display: flex; gap: 8px; margin-top: 12px; }
.t-actions .btn { flex: 1; min-height: 46px; border-radius: 13px; }
.t-actions .icon-btn { width: 46px; height: 46px; border-radius: 13px; background: var(--surface3); border-color: transparent; }

/* ---------- Admin layout ---------- */
.adm { display: grid; grid-template-columns: 250px 1fr; min-height: 100dvh; }
.side { position: sticky; top: 0; height: 100dvh; display: flex; flex-direction: column; padding: 18px 14px; border-inline-end: 1px solid var(--line); background: #15120f; }
.side-brand { display: flex; align-items: center; gap: 12px; padding: 4px 8px 22px; }
.side-brand b { display: block; font-family: var(--f-display); font-size: 1.12rem; line-height: 1.15; }
.side-brand small { color: var(--muted); font-size: .78rem; }
.nav { display: grid; gap: 4px; }
.nav a { display: flex; align-items: center; gap: 12px; padding: 11px 12px; border-radius: 12px; color: var(--muted); text-decoration: none; font-weight: 700; border: 1px solid transparent; }
.nav a:hover { background: var(--surface); color: var(--text); }
.nav a.on { background: var(--accent-soft); color: var(--text); border-color: color-mix(in srgb, var(--accent) 45%, transparent); }
.nav a.on .ic { color: var(--accent); }
.nav .nb { margin-inline-start: auto; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 99px; background: var(--accent); color: var(--accent-ink); font-size: .74rem; display: grid; place-items: center; }
.nav .nb:empty { display: none; }
.side-foot { margin-top: auto; display: grid; gap: 8px; padding-top: 14px; border-top: 1px solid var(--line); }
.side-foot a.link { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 10px; color: var(--muted); text-decoration: none; font-weight: 600; font-size: .9rem; }
.side-foot a.link:hover { color: var(--text); background: var(--surface); }
.who { display: flex; align-items: center; gap: 10px; padding: 8px 12px; font-size: .85rem; color: var(--muted); overflow: hidden; }
.who span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ver { font-size: .72rem; color: var(--muted); padding: 0 12px; opacity: .7; }
.main { min-width: 0; }
.top { display: flex; align-items: center; gap: 12px; padding: 18px 26px; border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 5; background: rgba(18,16,14,.92); backdrop-filter: blur(8px); }
.top h2 { margin: 0; font-family: var(--f-display); font-size: 1.5rem; font-weight: 650; }
.top .spacer { flex: 1; }
.burger { display: none; }
.page { padding: 22px 26px 40px; }
@media (max-width: 900px) {
  .adm { grid-template-columns: 1fr; }
  .side { position: fixed; inset: 0 auto 0 0; width: 260px; z-index: 50; transform: translateX(-100%); transition: transform .25s; }
  .side.open { transform: none; box-shadow: 20px 0 60px rgba(0,0,0,.5); }
  .burger { display: inline-grid; }
  .top { padding: 14px 16px; }
  .page { padding: 16px; }
}
.scrim { position: fixed; inset: 0; background: rgba(0,0,0,.5); z-index: 40; }

/* cards & stats */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: 18px; }
.card h3 { margin: 0 0 14px; font-size: 1rem; display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 16px; }
@media (max-width: 1100px) { .stats { grid-template-columns: repeat(2, 1fr); } }
.stat { padding: 16px 18px; border-radius: 18px; background: var(--surface); border: 1px solid var(--line); }
.stat .lbl { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: .82rem; font-weight: 700; }
.stat .lbl .ic { color: var(--accent); }
.stat .val { font-size: 1.75rem; font-weight: 800; margin-top: 8px; font-variant-numeric: tabular-nums; letter-spacing: -.01em; }
.stat .sub { color: var(--muted); font-size: .8rem; margin-top: 2px; }
.dash { display: grid; grid-template-columns: 1.4fr 1fr; gap: 16px; }
@media (max-width: 1100px) { .dash { grid-template-columns: 1fr; } }
.bars { display: flex; align-items: flex-end; gap: 6px; height: 170px; padding-top: 10px; }
.bars .b { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; height: 100%; justify-content: flex-end; }
.bars .b i { width: 100%; max-width: 34px; border-radius: 7px 7px 3px 3px; background: linear-gradient(180deg, var(--accent), color-mix(in srgb, var(--accent) 55%, #000)); min-height: 3px; transition: height .3s; }
.bars .b.zero i { background: var(--surface3); }
.bars .b span { font-size: .68rem; color: var(--muted); }
.top-items { display: grid; gap: 10px; }
.ti { display: grid; grid-template-columns: 36px 1fr auto; gap: 10px; align-items: center; }
.ti .e { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; background: var(--surface2); font-size: 20px; overflow: hidden; }
.ti .e img { width: 100%; height: 100%; object-fit: cover; }
.ti .barw { height: 6px; border-radius: 9px; background: var(--surface3); margin-top: 5px; overflow: hidden; }
.ti .barw i { display: block; height: 100%; background: var(--accent); border-radius: 9px; }
.ti b { font-size: .9rem; }
.live-list { display: grid; gap: 8px; }
.live { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 14px; background: var(--surface2); }
.live .tb { font-weight: 800; min-width: 86px; }
.live .sp { flex: 1; color: var(--muted); font-size: .85rem; }

/* tables (data) */
.toolbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 16px; }
.toolbar .input { width: auto; min-width: 160px; }
.tbl-wrap { background: var(--surface); border: 1px solid var(--line); border-radius: 20px; overflow: auto; }
table.tbl { width: 100%; border-collapse: collapse; min-width: 720px; }
.tbl th { text-align: start; font-size: .74rem; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); padding: 14px 16px; border-bottom: 1px solid var(--line); font-weight: 800; }
.tbl td { padding: 14px 16px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl tr:hover td { background: rgba(255,255,255,.015); }
.tbl .num { text-align: end; font-variant-numeric: tabular-nums; font-weight: 700; }
.acts { display: flex; gap: 6px; justify-content: flex-end; }
.acts .icon-btn { width: 34px; height: 34px; background: transparent; }
.empty-state { text-align: center; color: var(--muted); padding: 40px 16px; }

/* menu editor */
.cat-strip { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 6px; margin-bottom: 16px; }
.cchip { flex: none; display: inline-flex; align-items: center; gap: 8px; padding: 8px 8px 8px 14px; border-radius: 14px; border: 1px solid var(--line); background: var(--surface); font-weight: 700; cursor: pointer; }
.cchip.on { border-color: var(--accent); background: var(--accent-soft); }
.cchip .n { color: var(--muted); font-size: .8rem; }
.cchip .icon-btn { width: 28px; height: 28px; background: transparent; border-color: transparent; }
.cchip.all { padding-inline-end: 14px; }
.items-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.icard { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: 18px; overflow: hidden; }
.icard.off { opacity: .6; }
.icard .im { height: 130px; display: grid; place-items: center; font-size: 56px; background: radial-gradient(circle at 30% 25%, #3a3029, var(--surface2) 75%); }
.icard .im img { width: 100%; height: 100%; object-fit: cover; }
.icard .bd { padding: 12px 14px; display: grid; gap: 4px; flex: 1; }
.icard .bd b { font-size: 1rem; }
.icard .bd small { color: var(--muted); }
.icard .pr { color: var(--accent); font-weight: 800; }
.icard .ft { display: flex; align-items: center; gap: 6px; padding: 10px 12px; border-top: 1px solid var(--line); }
.icard .ft .spacer { flex: 1; }
.icard .ft .icon-btn { width: 32px; height: 32px; background: transparent; }
.icard .ft small { font-size: .78rem; white-space: nowrap; }
.icard .ft { gap: 4px; }
.mini-tags { display: flex; gap: 4px; flex-wrap: wrap; }
.mini-tags span { font-size: .68rem; font-weight: 800; padding: 2px 7px; border-radius: 99px; background: var(--surface3); color: var(--muted); }
.img-pick { display: flex; gap: 14px; align-items: center; }
.img-prev { width: 96px; height: 96px; border-radius: 16px; display: grid; place-items: center; font-size: 46px; background: var(--surface2); overflow: hidden; flex: none; border: 1px dashed var(--line); }
.img-prev img { width: 100%; height: 100%; object-fit: cover; }
.checks { display: flex; flex-wrap: wrap; gap: 10px 18px; margin: 4px 0 14px; }
.checks label { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; cursor: pointer; }
.checks input { width: 18px; height: 18px; accent-color: var(--accent); }

/* tables / QR */
.qr-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; }
.qcard { background: var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: 16px; display: grid; gap: 10px; }
.qcard.off { opacity: .55; }
.qcard .qh { display: flex; justify-content: space-between; align-items: center; }
.qcard .qh b { font-family: var(--f-display); font-size: 1.2rem; }
.qcard .qh small { color: var(--muted); }
.qbox { background: #fff; border-radius: 14px; padding: 12px; display: grid; place-items: center; aspect-ratio: 1; }
.qbox svg { width: 100%; height: 100%; }
.qcard .acts { justify-content: flex-start; flex-wrap: wrap; }
.qcard .tstat { font-size: .8rem; color: var(--muted); }

/* settings */
.set-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; align-items: start; }
@media (max-width: 1000px) { .set-grid { grid-template-columns: 1fr; } }
.color-row { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.sw { width: 34px; height: 34px; border-radius: 10px; border: 2px solid transparent; cursor: pointer; }
.sw.on { border-color: #fff; box-shadow: 0 0 0 2px var(--accent); }
.set-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px dashed var(--line); }
.set-row:last-child { border-bottom: 0; }
.set-row small { display: block; color: var(--muted); font-size: .8rem; }
.email-list { display: grid; gap: 6px; margin-bottom: 10px; }
.email-list div { display: flex; justify-content: space-between; align-items: center; padding: 8px 12px; border-radius: 10px; background: var(--surface2); }
.save-bar { position: sticky; bottom: 16px; display: flex; justify-content: flex-end; margin-top: 16px; }

/* order detail */
.od-head { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 12px; }
.od-lines { display: grid; gap: 6px; }
.od-lines div { display: flex; justify-content: space-between; gap: 10px; }
.od-lines small { color: #f0b445; display: block; }
.od-sum { display: grid; gap: 4px; margin-top: 12px; padding-top: 10px; border-top: 1px dashed var(--line); }
.od-sum div { display: flex; justify-content: space-between; color: var(--muted); }
.od-sum .t { color: var(--text); font-weight: 800; font-size: 1.1rem; }
.st-btns { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }

/* language tabs (menu item, category, restaurant name) */
.lt { margin-bottom: 6px; }
.ltabs { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; padding: 3px; margin-bottom: 12px; border-radius: 12px; background: var(--surface2); }
.ltabs::-webkit-scrollbar { display: none; }
.ltab { flex: 1 0 auto; position: relative; padding: 8px 12px; border: 0; border-radius: 9px; background: transparent; color: var(--muted); font-weight: 700; font-size: .85rem; white-space: nowrap; }
.ltab:hover { color: var(--text); }
.ltab.on { background: var(--surface3); color: var(--text); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 55%, transparent); }
.ltab.has::after { content: ''; position: absolute; top: 6px; inset-inline-end: 6px; width: 6px; height: 6px; border-radius: 50%; background: var(--ok); }
.lt-hint { display: block; margin: -4px 0 12px; font-size: .78rem; }
.field span i { font-style: normal; font-weight: 600; }
.langs-count { display: inline-flex; align-items: center; gap: 4px; font-size: .75rem; }
.langs-count .ic { width: 12px; height: 12px; }
