:root {
  --bg: #050607;
  --card: rgba(14, 18, 24, .9);
  --card2: #11161c;
  --line: rgba(200, 255, 61, .16);
  --text: #f4f7f2;
  --muted: #8b9488;
  --lime: #c8ff3d;
  --accent: #c8ff3d;
  --accent2: #3dffd4;
  --danger: #ff3d7a;
  --warn: #ffe566;
  --ok: #3dffd4;
  --ink: #071008;
  --tap: 48px;
  --rad: 16px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --nav-h: calc(66px + var(--safe-b));
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; background: var(--bg); color: var(--text);
  font-family: "Bahnschrift", "Segoe UI Variable", "PingFang SC", "Microsoft YaHei", sans-serif; }
body {
  padding: env(safe-area-inset-top) 0 0;
  background:
    radial-gradient(900px 420px at 100% -10%, #163018 0%, transparent 55%),
    radial-gradient(600px 360px at -10% 100%, #0a2a28 0%, transparent 50%),
    var(--bg);
}
button, input, select, textarea { font: inherit; color: inherit; }
#app { min-height: 100%; }

.login {
  min-height: 100dvh; display: flex; flex-direction: column; justify-content: center;
  padding: 32px 22px calc(32px + var(--safe-b));
  max-width: 440px; margin: 0 auto;
}
.brand { font-size: 11px; letter-spacing: 0.28em; color: var(--lime); text-transform: uppercase; }
.login h1 { font-size: 30px; margin: 10px 0 8px; font-weight: 750; letter-spacing: .02em; }
.sub { color: var(--muted); line-height: 1.55; margin-bottom: 28px; }
.field { margin-bottom: 14px; }
.field label { display: block; font-size: 12px; color: var(--muted); margin-bottom: 6px; letter-spacing: .08em; }
.field input, .field select, .field textarea {
  width: 100%; background: var(--card); border: 1px solid var(--line); border-radius: 12px;
  padding: 14px 14px; min-height: var(--tap); outline: none;
}
.field textarea { min-height: 88px; resize: vertical; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: var(--tap); padding: 0 16px; border: 0; border-radius: 12px;
  background: var(--lime); color: var(--ink); font-weight: 800; width: 100%;
}
.btn.secondary { background: var(--card2); color: var(--text); border: 1px solid var(--line); }
.btn.ghost { background: transparent; color: var(--accent2); width: auto; }
.btn.danger { background: #2a1018; color: var(--danger); }
.btn.small { width: auto; min-height: 40px; padding: 0 12px; font-size: 14px; }
.hint { color: var(--muted); font-size: 12px; margin-top: 14px; line-height: 1.45; }
.err { color: var(--danger); font-size: 13px; min-height: 18px; margin: 8px 0; }

.shell { padding-bottom: calc(var(--nav-h) + 12px); }
.top {
  position: sticky; top: 0; z-index: 20; background: rgba(5,6,7,.88);
  backdrop-filter: blur(16px); padding: 12px 16px 10px;
  border-bottom: 1px solid var(--line);
}
.top h2 { margin: 0; font-size: 18px; font-weight: 750; letter-spacing: .04em; }
.top .meta { color: var(--muted); font-size: 12px; margin-top: 4px; }
.page { padding: 14px 16px 24px; }
.grid { display: grid; gap: 10px; }
.cards { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--rad); padding: 14px;
}
.card .k { color: var(--muted); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; }
.card .v { font-size: 22px; font-weight: 800; margin-top: 6px; color: var(--lime); }
.card .v.sm { font-size: 16px; color: var(--text); }
.note {
  background: rgba(61,255,212,.08); border: 1px solid rgba(61,255,212,.28); color: #d7fff4;
  border-radius: 12px; padding: 12px 14px; font-size: 13px; line-height: 1.45; margin-bottom: 12px;
}
.warnbox {
  background: #2a2212; border: 1px solid #5a4a1c; color: #f3d99a; border-radius: 12px;
  padding: 12px; font-size: 13px; margin-bottom: 12px;
}
.row { display: flex; gap: 8px; align-items: center; }
.grow { flex: 1; }
.list { display: flex; flex-direction: column; gap: 8px; }
.item {
  background: var(--card); border: 1px solid var(--line); border-radius: 14px;
  padding: 12px; display: flex; gap: 10px; align-items: center;
}
.item h3 { margin: 0; font-size: 15px; font-weight: 650; }
.item p { margin: 4px 0 0; color: var(--muted); font-size: 12px; }
.price { margin-left: auto; font-weight: 800; color: var(--warn); white-space: nowrap; }
.qty { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.qty button { width: 36px; height: 36px; border-radius: 10px; border: 1px solid var(--line); background: var(--card2); }
.chips { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 8px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip {
  flex: 0 0 auto; border: 1px solid var(--line); background: var(--card); color: var(--muted);
  border-radius: 999px; padding: 8px 14px; min-height: 36px;
}
.chip.on { background: var(--lime); color: var(--ink); border-color: var(--lime); font-weight: 750; }
.cartbar {
  position: sticky; bottom: calc(var(--nav-h) + 8px); z-index: 15;
  margin: 12px 0 0; background: rgba(12,16,12,.94); border: 1px solid #c8ff3d66;
  border-radius: 16px; padding: 10px 12px; display: flex; align-items: center; gap: 10px;
}
.nav {
  position: fixed; left: 0; right: 0; bottom: 0; height: var(--nav-h);
  background: rgba(6,8,8,.96); border-top: 1px solid var(--line);
  display: grid; grid-template-columns: repeat(5, 1fr); padding-bottom: var(--safe-b);
  z-index: 30;
}
.nav button {
  background: none; border: 0; color: var(--muted); font-size: 11px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
}
.nav button.on { color: var(--lime); }
.nav .ico { font-size: 16px; line-height: 1; letter-spacing: .12em; }
.hidden { display: none !important; }
.table { width: 100%; border-collapse: collapse; font-size: 13px; }
.table th, .table td { text-align: left; padding: 8px 6px; border-bottom: 1px solid var(--line); }
.badge { font-size: 11px; padding: 2px 8px; border-radius: 999px; background: var(--card2); color: var(--muted); }
.badge.open { background: #2a2212; color: var(--warn); }
.badge.done { background: #0c2430; color: var(--ok); }
.hscroll { overflow-x: auto; }
.hall { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-top: 12px; }
.tile {
  background: var(--card); border: 1px solid var(--line); border-radius: 16px;
  padding: 14px 12px; text-align: left; min-height: 82px; color: inherit;
}
.tile b { display: block; font-size: 14px; }
.tile span { display: block; color: var(--muted); font-size: 12px; margin-top: 4px; }
.tile.off { opacity: 0.4; }
.thumb {
  width: 48px; height: 48px; border-radius: 10px; object-fit: cover;
  background: var(--card2); flex: 0 0 auto;
}
.thumb.lg { width: 72px; height: 72px; }
.payimg { width: 100%; max-width: 320px; border-radius: 12px; display: block; margin: 8px auto; }
.anim { display: flex; gap: 8px; overflow-x: auto; }
.anim img { height: 88px; border-radius: 12px; }
@media (min-width: 860px) {
  .shell { max-width: 1120px; margin: 0 auto; }
  .cards { grid-template-columns: repeat(4, 1fr); }
  .hall { grid-template-columns: repeat(4, 1fr); }
}
