:root { --bg:#fafafa; --card:#fff; --ink:#0a0a0a; --mute:#737373; --line:#e4e4e7; --soft:#f4f4f5; --dark:#171717; --ok:#15803d; --bad:#b91c1c; --warn:#a16207; --acc:#0a0a0a; --onacc:#fff; --side:#0a0a0a; --navon:#fff; --navontxt:#0a0a0a; --r:10px; --bw:1px; --sh:none; --blur:none; }
* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body { font: 14px/1.4 Inter, "Segoe UI", Arial, sans-serif; color: var(--ink); background: var(--bg); }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
.hidden { display: none !important; }

.auth { min-height: 100vh; min-height: 100dvh; box-sizing: border-box; display: grid; place-items: center; background: var(--side); padding: max(16px, env(safe-area-inset-top)) 16px max(16px, env(safe-area-inset-bottom)); }
.auth-card { width: 100%; max-width: 400px; background: var(--card); color: var(--ink); border-radius: 20px; padding: 28px 24px; box-shadow: 0 10px 40px #0006; }`n.auth-card a { color: var(--mute); text-decoration: none; border-bottom: 1px dotted var(--mute); }`n.auth-card a:hover { color: var(--ink); }`n.auth-card .btn { width: 100%; padding: 12px; font-size: 15px; }`n.auth-card input { font-size: 16px; padding: 11px 12px; }`n.auth-card label.f { display: block; margin-bottom: 12px; }`n.auth-card label.f > span { display: block; font-size: 13px; color: var(--mute); margin-bottom: 4px; }`n@media (max-width: 480px) { .auth-card { padding: 22px 18px; border-radius: 18px; } .auth-card img { width: 64px; height: 64px; } }
.auth-card img { width: 72px; height: 72px; border-radius: 16px; display: block; margin: 0 auto 8px; }
.auth-card h1 { text-align: center; margin: 4px 0 2px; font-size: 22px; }
.auth-card p.sub { text-align: center; color: var(--mute); margin: 0 0 16px; }
.tabs { display: flex; gap: 4px; background: var(--soft); border-radius: 10px; padding: 4px; margin-bottom: 14px; }
.tabs button { flex: 1; border: 0; background: transparent; padding: 8px; border-radius: 8px; font-weight: 600; color: var(--mute); }
.tabs button.on { background: var(--card); color: var(--ink); box-shadow: 0 1px 2px #0002; }

label.f { display: block; margin: 10px 0; font-weight: 600; font-size: 13px; }
label.f > span { display: block; margin-bottom: 4px; }
input, select, textarea { width: 100%; padding: 9px 11px; border: var(--bw) solid var(--line); border-radius: var(--r); background: var(--card); color: var(--ink); }
input:focus, select:focus { outline: 2px solid #52525b; outline-offset: 0; }
.btn { border: var(--bw) solid var(--acc); border-radius: var(--r); box-shadow: var(--sh); padding: 9px 14px; background: var(--acc); color: var(--onacc); font-weight: 600; }
.btn:hover { filter: brightness(1.2); }
.btn.ghost { background: var(--soft); color: var(--ink); }
.btn.ghost:hover { background: var(--line); }
.btn.danger { background: var(--bad); }
.btn.sm { padding: 5px 9px; font-size: 12px; border-radius: 8px; }
.btn.block { width: 100%; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.err { color: var(--bad); font-size: 13px; min-height: 18px; margin-top: 8px; }

.app { display: flex; height: 100%; }
.side { width: 220px; background: var(--side); color: #e4e4e7; display: flex; flex-direction: column; flex: none; }
.brand { display: flex; align-items: center; gap: 10px; padding: 16px; }
.brand img { width: 38px; height: 38px; border-radius: 10px; }
.brand b { display: block; color: #fff; }
.brand small { display: block; color: #d4d4d4; font-size: 13px; font-weight: 600; max-width: 150px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nav { flex: 1; padding: 4px 10px; overflow-y: auto; }
.nav button { display: block; width: 100%; text-align: left; border: 0; background: transparent; color: #d4d4d4; padding: 10px 12px; border-radius: 10px; margin-bottom: 2px; }
.nav button:hover { background: #262626; }
.nav button.on { background: var(--navon); color: var(--navontxt); font-weight: 600; }
.side .foot { padding: 12px 16px; border-top: 1px solid #262626; font-size: 12px; color: #a3a3a3; }
.side .foot button { margin-top: 8px; }

.main { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.top { display: flex; gap: 12px; align-items: center; padding: 10px 18px; background: var(--card); border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.top h2 { margin: 0; font-size: 17px; flex: 1; }
.top select { width: auto; }
.pill { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; background: var(--soft); }
.pill.ok { background: #dcfce7; color: var(--ok); }
.pill.bad { background: #fee2e2; color: var(--bad); }
.pill.warn { background: #fef9c3; color: var(--warn); }
.banner { background: #fef9c3; color: var(--warn); padding: 8px 18px; font-weight: 600; }
.banner.bad { background: #fee2e2; color: var(--bad); }
.content { flex: 1; overflow: auto; padding: 18px; }

.card { background: var(--card); border: var(--bw) solid var(--line); border-radius: var(--r); box-shadow: var(--sh); backdrop-filter: var(--blur); padding: 16px; margin-bottom: 16px; }
.card h3 { margin: 0 0 10px; font-size: 15px; }
.grid2 { display: grid; grid-template-columns: 1fr 360px; gap: 16px; height: 100%; }
.menu-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.menu-item { text-align: left; background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 12px; }
.menu-item:hover { border-color: var(--ink); }
.menu-item b { display: block; margin-bottom: 4px; }
.menu-item small { color: var(--mute); display: block; }
.menu-item:disabled { opacity: .45; cursor: not-allowed; }
.cats { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 12px; }
.cats button { border: 1px solid var(--line); background: var(--card); color: var(--ink); padding: 5px 12px; border-radius: 999px; }
.cats button.on { background: var(--acc); color: var(--onacc); border-color: var(--acc); }
.cart { display: flex; flex-direction: column; }
.cart .lines { flex: 1; overflow: auto; min-height: 80px; }
.line { display: flex; gap: 8px; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--soft); }
.line .nm { flex: 1; min-width: 0; }
.line .nm small { display: block; color: var(--mute); }
.qty { display: flex; align-items: center; gap: 4px; }
.qty button { width: 26px; height: 26px; border: 1px solid var(--line); background: var(--card); color: var(--ink); border-radius: 8px; }
.row { display: flex; justify-content: space-between; padding: 3px 0; }
.row.total { font-weight: 700; font-size: 17px; border-top: 1px solid var(--line); margin-top: 6px; padding-top: 8px; }
.pay { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin: 8px 0; }
.pay button { padding: 8px; border: 1px solid var(--line); background: var(--card); color: var(--ink); border-radius: 10px; font-weight: 600; }
.pay button.on { background: var(--acc); color: var(--onacc); border-color: var(--acc); }

table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--soft); vertical-align: middle; }
th { color: var(--mute); font-size: 12px; text-transform: uppercase; letter-spacing: .03em; }
td.n, th.n { text-align: right; }
.actions { display: flex; gap: 6px; flex-wrap: wrap; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 10px; margin-bottom: 14px; }
.stat { background: var(--soft); border-radius: var(--r); box-shadow: var(--sh); padding: 12px; }
.stat small { color: var(--mute); display: block; }
.stat b { font-size: 18px; }
.formrow { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; align-items: end; }

.modal-bg { position: fixed; inset: 0; background: #000a; display: grid; place-items: center; padding: 16px; z-index: 20; }
.modal { background: var(--card); color: var(--ink); border: var(--bw) solid var(--line); box-shadow: var(--sh); border-radius: var(--r); padding: 20px; width: 100%; max-width: 480px; max-height: 90vh; overflow: auto; }
.modal h3 { margin: 0 0 10px; }
.modal .btns { display: flex; gap: 8px; justify-content: flex-end; margin-top: 14px; }
.re-row { display: grid; grid-template-columns: 1fr 100px 32px; gap: 6px; margin-bottom: 6px; }
.re-row.c4 { grid-template-columns: 1.4fr 70px 1.2fr 36px; }
.re-row.c5 { grid-template-columns: 1.6fr 64px 1fr 1.2fr 36px; }
.toast { position: fixed; right: 16px; bottom: 16px; background: var(--acc); color: var(--onacc); padding: 10px 16px; border-radius: 12px; z-index: 30; max-width: 320px; }
.toast.bad { background: var(--bad); }
.receipt { font-family: ui-monospace, Consolas, monospace; font-size: 12px; }
.receipt hr { border: 0; border-top: 1px dashed #999; }
.muted { color: var(--mute); }

@media (max-width: 900px) {
  .app { flex-direction: column; }
  .side { width: 100%; flex-direction: row; align-items: center; overflow: hidden; }
  .side .foot { display: none; }
  .brand { flex-shrink: 0; padding: 8px 12px; }
  .brand small { display: none; }
  .nav { display: flex; gap: 4px; padding: 6px; flex: 1; min-width: 0; overflow-x: auto; overflow-y: hidden; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
  .nav::-webkit-scrollbar { display: none; }
  .nav button { white-space: nowrap; margin: 0; width: auto; flex: none; padding: 9px 12px; }
  .grid2 { grid-template-columns: 1fr; height: auto; }
  .mob-only { display: inline-flex; gap: 4px; }
  .top { padding: 8px 12px; gap: 8px; }
  .top select { max-width: 46vw; }
  .content { padding: 12px; -webkit-overflow-scrolling: touch; }
  .card { padding: 12px; border-radius: 12px; }
  .banner { padding: 8px 12px; font-size: 13px; }
  .content table { display: block; overflow-x: auto; white-space: nowrap; max-width: 100%; }
  .menu-grid { grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .formrow { grid-template-columns: 1fr 1fr; }
  .modal-bg { padding: 8px; align-items: end; }
  .modal { max-width: none; border-radius: 16px 16px 0 0; padding: 16px; max-height: 92vh; }
  .toast { left: 12px; right: 12px; bottom: 12px; max-width: none; }
  .btn, input, select, textarea { min-height: 40px; }
  .btn.sm { min-height: 32px; }
  .qty button { width: 34px; height: 34px; }
}
.mob-only { display: none; }
@media (max-width: 900px) { .mob-only { display: inline-flex; } }
@media print {
  body * { visibility: hidden; }
  #receipt, #receipt * { visibility: visible; }
  #receipt { position: absolute; left: 0; top: 0; width: 100%; color: #000; font-size: 11px; }
  .modal, .modal-bg { background: none !important; box-shadow: none !important; }
}
.receipt.w58 { width: 48mm; }
.receipt.w80 { width: 72mm; }
@media print {
  @page { margin: 2mm; }
  .receipt.w58, .receipt.w80 { width: auto; }
}
.tour ul{padding-left:20px;margin:8px 0 16px;line-height:1.6}.tour li{margin-bottom:6px}.tour .btns{display:flex;gap:8px;justify-content:flex-end}

.theme-pick { display: flex; flex-wrap: wrap; gap: 10px; margin: 8px 0; }
.theme-pick button { display: flex; align-items: center; gap: 8px; padding: 8px 12px; border: 2px solid var(--line); border-radius: 12px; background: var(--card); color: var(--ink); font-weight: 600; }
.theme-pick button.on { border-color: var(--acc); }
.theme-pick small { color: var(--mute); font-weight: 400; display: block; }
.theme-pick i { width: 22px; height: 22px; border-radius: 50%; display: inline-block; border: 1px solid #8884; }
html[data-theme] body { font-family: var(--font, Inter, "Segoe UI", Arial, sans-serif); }
html[data-theme=minimalism] { --bg:#fff; --card:#fff; --line:#e5e5e5; --soft:#f7f7f7; --r:4px; --acc:#111; }
html[data-theme=glass] { --bg:#1b1464; --card:rgba(255,255,255,.14); --ink:#fff; --mute:#cbd5ff; --line:rgba(255,255,255,.28); --soft:rgba(255,255,255,.12); --acc:rgba(255,255,255,.9); --onacc:#1b1464; --side:rgba(15,10,60,.55); --navon:rgba(255,255,255,.9); --navontxt:#1b1464; --r:18px; --sh:0 8px 32px #0005; --blur:blur(14px); --ok:#86efac; --bad:#fca5a5; --warn:#fde68a; }
html[data-theme=glass] body { background: linear-gradient(135deg,#312e81,#7e22ce 50%,#0ea5e9) fixed; }
html[data-theme=glass] .card, html[data-theme=glass] .modal, html[data-theme=glass] input, html[data-theme=glass] select, html[data-theme=glass] textarea { backdrop-filter: blur(14px); }
html[data-theme=glass] .modal { background: rgba(40,30,110,.85); }
html[data-theme=glass] option { color: #111; }
html[data-theme=neumorphism] { --bg:#e0e5ec; --card:#e0e5ec; --ink:#3d4852; --mute:#7a8794; --line:transparent; --soft:#e0e5ec; --acc:#6d5dfc; --onacc:#fff; --side:#e0e5ec; --navon:#e0e5ec; --navontxt:#6d5dfc; --r:16px; --bw:0px; --sh:6px 6px 14px #a3b1c6, -6px -6px 14px #fff; }
html[data-theme=neumorphism] .side { color: #3d4852; box-shadow: 10px 0 24px -10px #a3b1c688; z-index: 1; }
html[data-theme=neumorphism] .brand small { color: #7a8794; }
html[data-theme=neumorphism] .top { background: transparent; border-bottom: 0; box-shadow: 0 10px 24px -14px #a3b1c688; }
html[data-theme=neumorphism] .side .foot { border-top: 0; box-shadow: 0 -10px 20px -14px #a3b1c688; }
html[data-theme=neumorphism] .nav button, html[data-theme=neumorphism] .brand b, html[data-theme=neumorphism] .side .foot { color: #3d4852; }
html[data-theme=neumorphism] .nav button.on { box-shadow: inset 4px 4px 8px #a3b1c6, inset -4px -4px 8px #fff; }
html[data-theme=neumorphism] .nav button:hover { background: transparent; }
html[data-theme=neumorphism] input, html[data-theme=neumorphism] select, html[data-theme=neumorphism] textarea { box-shadow: inset 3px 3px 6px #a3b1c6, inset -3px -3px 6px #fff; }
html[data-theme=neumorphism] .cats button, html[data-theme=neumorphism] .pay button, html[data-theme=neumorphism] .qty button { border: 0; box-shadow: 3px 3px 7px #a3b1c6, -3px -3px 7px #fff; }
html[data-theme=neobrutalism] { --bg:#fff4c2; --card:#fff; --ink:#000; --mute:#444; --line:#000; --soft:#ffe9a8; --acc:#ff5c8a; --onacc:#000; --side:#000; --navon:#ffe14d; --navontxt:#000; --r:0px; --bw:2px; --sh:4px 4px 0 #000; --font:"Courier New", monospace; }
html[data-theme=neobrutalism] .btn { color: #000; font-weight: 800; }
html[data-theme=neobrutalism] .cats button, html[data-theme=neobrutalism] .pay button, html[data-theme=neobrutalism] .qty button { border: 2px solid #000; border-radius: 0; }
html[data-theme=neobrutalism] .toast { border: 2px solid #000; }
html[data-theme=claymorphism] { --bg:#f1e9ff; --card:#fff; --ink:#3b2a63; --mute:#8a7bb0; --line:#e6dcff; --soft:#ece3ff; --acc:#8b5cf6; --onacc:#fff; --side:#5b3fb5; --navon:#fff; --navontxt:#5b3fb5; --r:24px; --bw:0px; --sh:8px 8px 18px #cbb8f5, inset -5px -5px 10px #e9defd, inset 5px 5px 10px #fff; }
html[data-theme=claymorphism] .cats button, html[data-theme=claymorphism] .pay button { border-radius: 999px; }
html[data-theme=bento] { --bg:#eceef3; --card:#fff; --ink:#111; --mute:#6b7280; --line:#e4e6ec; --soft:#f4f5f8; --acc:#111; --r:22px; --sh:0 1px 2px #0001; }
html[data-theme=bento] .content { padding: 22px; }
html[data-theme=bento] .stats { gap: 14px; }
html[data-theme=bento] .stat:nth-child(4n+1) { background: #dbeafe; } html[data-theme=bento] .stat:nth-child(4n+2) { background: #fde68a; } html[data-theme=bento] .stat:nth-child(4n+3) { background: #d1fae5; } html[data-theme=bento] .stat:nth-child(4n) { background: #fbcfe8; }
html[data-theme=bento] .stat, html[data-theme=bento] .stat small { color: #111; }
html[data-theme=cyberpunk] { --bg:#0b0014; --card:#13001f; --ink:#e6fbff; --mute:#9b8bb4; --line:#ff2bd6; --soft:#1d0030; --acc:#00f0ff; --onacc:#000; --side:#07000d; --navon:#ff2bd6; --navontxt:#fff; --r:2px; --sh:0 0 10px #ff2bd655; --font:"Consolas", "Courier New", monospace; --ok:#39ff14; --bad:#ff3860; --warn:#fff200; }
html[data-theme=cyberpunk] .card, html[data-theme=cyberpunk] .modal { border-color: #ff2bd6aa; }
html[data-theme=cyberpunk] .btn { box-shadow: 0 0 12px #00f0ff88; text-transform: uppercase; letter-spacing: .04em; }
html[data-theme=cyberpunk] .nav button.on { box-shadow: 0 0 12px #ff2bd6; }
html[data-theme=cyberpunk] input, html[data-theme=cyberpunk] select, html[data-theme=cyberpunk] textarea { border-color: #00f0ff88; }
html[data-theme=retro] { --bg:#008080; --card:#c0c0c0; --ink:#000; --mute:#404040; --line:#808080; --soft:#d4d0c8; --acc:#c0c0c0; --onacc:#000; --side:#000080; --navon:#c0c0c0; --navontxt:#000; --r:0px; --bw:2px; --sh:inset -1px -1px #404040, inset 1px 1px #fff; --font:Tahoma, "MS Sans Serif", sans-serif; }
html[data-theme=retro] .card, html[data-theme=retro] .modal, html[data-theme=retro] .btn, html[data-theme=retro] .cats button, html[data-theme=retro] .pay button, html[data-theme=retro] .qty button { border: 2px outset #fff; border-radius: 0; }
html[data-theme=retro] .btn { background: #c0c0c0; color: #000; }
html[data-theme=retro] .cats button.on, html[data-theme=retro] .pay button.on { background: #000080; color: #fff; }
html[data-theme=retro] input, html[data-theme=retro] select, html[data-theme=retro] textarea { border: 2px inset #808080; background: #fff; color: #000; }
html[data-theme=retro] .content { background: #008080; }
html[data-theme=retro] .card h3 { background: #000080; color: #fff; margin: -16px -16px 10px; padding: 4px 8px; }
html[data-theme=swiss] { --bg:#fff; --card:#fff; --ink:#000; --mute:#555; --line:#000; --soft:#f2f2f2; --acc:#e10600; --onacc:#fff; --side:#fff; --navon:#e10600; --navontxt:#fff; --r:0px; --bw:1px; --font:"Helvetica Neue", Helvetica, Arial, sans-serif; }
html[data-theme=swiss] .side { color: #000; border-right: 2px solid #000; }
html[data-theme=swiss] .nav button, html[data-theme=swiss] .brand b, html[data-theme=swiss] .brand small, html[data-theme=swiss] .side .foot { color: #000; }
html[data-theme=swiss] .nav button:hover { background: #f2f2f2; }
html[data-theme=swiss] .card h3, html[data-theme=swiss] h2 { text-transform: uppercase; letter-spacing: .08em; border-bottom: 3px solid #000; padding-bottom: 6px; }
html[data-theme=skeuo] { --bg:#d8d2c4; --card:#f6f1e6; --ink:#2b2118; --mute:#6f6253; --line:#b9ae98; --soft:#e9e2d2; --acc:#5a3a22; --onacc:#fbe9cf; --side:#3b2a1d; --navon:#f6e3c0; --navontxt:#3b2a1d; --r:12px; --sh:0 2px 0 #fff8 inset, 0 3px 6px #0004; --font:Georgia, "Times New Roman", serif; }
html[data-theme=skeuo] .card, html[data-theme=skeuo] .modal { background: linear-gradient(#fffaf0, #eee5d2); }
html[data-theme=skeuo] .btn { background: linear-gradient(#7a5233, #4a2e19); text-shadow: 0 -1px #0008; }
html[data-theme=skeuo] .side { background: linear-gradient(#4a3524, #2c1e13); }
html[data-theme=skeuo] input, html[data-theme=skeuo] select, html[data-theme=skeuo] textarea { box-shadow: inset 0 2px 4px #0003; }