:root {
  --green-900: #0f3d2e;
  --green-700: #17694a;
  --green-600: #1f8a5f;
  --green-100: #e3f3ea;
  --green-50: #f3faf6;
  --ink: #16211c;
  --muted: #5d6b64;
  --line: #dbe5df;
  --bg: #f6f8f7;
  --card: #ffffff;
  --warn: #b25e00;
  --warn-bg: #fff4e5;
  --danger: #b3261e;
  --danger-bg: #fdecea;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(16, 40, 30, .06), 0 4px 16px rgba(16, 40, 30, .06);
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--green-700); }
.wrap { max-width: 560px; margin: 0 auto; padding: 16px; }
.wide { max-width: 1100px; }

header.top {
  background: var(--green-900); color: #fff;
}
header.top .wrap { display: flex; align-items: center; justify-content: space-between; padding-top: 14px; padding-bottom: 14px; }
.brand { font-weight: 700; letter-spacing: .2px; display: flex; align-items: center; gap: 10px; color: #fff; text-decoration: none; }
.brand .dot { width: 28px; height: 28px; border-radius: 8px; background: var(--green-600); display: grid; place-items: center; font-size: 15px; }
.brand small { font-weight: 500; opacity: .75; }

h1 { font-size: 1.5rem; line-height: 1.25; margin: 8px 0 4px; }
h2 { font-size: 1.15rem; margin: 0 0 8px; }
p { margin: 6px 0; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }

.card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 18px; margin: 14px 0; box-shadow: var(--shadow);
}

.pill { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; font-size: .8rem; font-weight: 600; }
.pill.open { background: var(--green-100); color: var(--green-700); }
.pill.closed { background: var(--danger-bg); color: var(--danger); }
.pill::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: currentColor; }

.btn {
  appearance: none; border: 0; border-radius: 12px; padding: 14px 18px; font-size: 1rem; font-weight: 600;
  background: var(--green-700); color: #fff; cursor: pointer; width: 100%; display: inline-flex;
  align-items: center; justify-content: center; gap: 8px; text-decoration: none;
}
.btn:hover { background: var(--green-600); }
.btn:disabled { background: #a9b8b0; cursor: not-allowed; }
.btn.secondary { background: #fff; color: var(--green-700); border: 1.5px solid var(--green-700); }
.btn.ghost { background: transparent; color: var(--muted); border: 1px solid var(--line); }
.btn.small { padding: 8px 12px; font-size: .875rem; width: auto; border-radius: 10px; }
.btn.danger { background: var(--danger); }
.row { display: flex; gap: 10px; }
.row > * { flex: 1; }

label { font-weight: 600; font-size: .9rem; display: block; margin: 12px 0 6px; }
input[type=text], input[type=number], input[type=email], input[type=password], select {
  width: 100%; padding: 12px 14px; font-size: 1rem; border: 1.5px solid var(--line); border-radius: 10px; background: #fff;
}
input:focus, select:focus { outline: 2px solid var(--green-600); outline-offset: 1px; border-color: transparent; }
.hint { font-size: .8rem; color: var(--muted); margin-top: 4px; }

.drop {
  border: 2px dashed #a9c9b8; border-radius: var(--radius); background: var(--green-50);
  padding: 28px 16px; text-align: center; cursor: pointer; display: block;
}
.drop:hover { border-color: var(--green-600); }
.drop .big { font-size: 2.2rem; }
.drop input { display: none; }

.toggle { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 14px; border: 1.5px solid var(--line); border-radius: 10px; margin-top: 12px; cursor: pointer; }
.toggle input { width: 22px; height: 22px; accent-color: var(--green-700); }
.toggle span { font-weight: 600; }
.toggle small { display: block; color: var(--muted); font-weight: 400; }

.stepper { display: flex; align-items: center; gap: 8px; }
.stepper button { width: 46px; height: 46px; border-radius: 10px; border: 1.5px solid var(--line); background: #fff; font-size: 1.3rem; cursor: pointer; }
.stepper input { text-align: center; width: 80px; flex: none; }

table.sum { width: 100%; border-collapse: collapse; font-size: .95rem; }
table.sum td { padding: 6px 0; }
table.sum td:last-child { text-align: right; }
table.sum tr.total td { border-top: 1px solid var(--line); padding-top: 10px; font-weight: 700; font-size: 1.15rem; }

.notice { padding: 12px 14px; border-radius: 10px; font-size: .9rem; margin: 10px 0; }
.notice.warn { background: var(--warn-bg); color: var(--warn); }
.notice.err { background: var(--danger-bg); color: var(--danger); }
.notice.ok { background: var(--green-100); color: var(--green-700); }

.center { text-align: center; }
.qr { width: 100%; max-width: 280px; margin: 8px auto; background: #fff; padding: 8px; border-radius: 12px; border: 1px solid var(--line); }
.qr svg { width: 100%; height: auto; display: block; }
.timer { font-variant-numeric: tabular-nums; font-weight: 700; font-size: 1.3rem; }
.orderno { font-size: 2.4rem; font-weight: 800; color: var(--green-700); letter-spacing: 1px; }
.big-emoji { font-size: 3rem; }

.spinner { width: 42px; height: 42px; border: 4px solid var(--green-100); border-top-color: var(--green-700); border-radius: 50%; animation: spin 1s linear infinite; margin: 10px auto; }
@keyframes spin { to { transform: rotate(360deg); } }

.units { display: grid; gap: 12px; }
.unit { display: flex; align-items: center; gap: 14px; text-decoration: none; color: inherit; }
.unit .ico { width: 54px; height: 54px; border-radius: 14px; background: var(--green-100); display: grid; place-items: center; font-size: 1.6rem; flex: none; }
.unit .grow { flex: 1; }

footer { text-align: center; color: var(--muted); font-size: .8rem; padding: 24px 16px 40px; }
.hidden { display: none !important; }
