:root {
  --blue: #0b4f8a;
  --blue-d: #083a66;
  --blue-s: #e8f1f8;
  --strom: #e8b923;
  --gas: #e87722;
  --wasser: #1a8cff;
  --ok: #1f7a4d;
  --err: #b42318;
  --bg: #f4f7fb;
  --card: #fff;
  --text: #1a2433;
  --muted: #5b6b7c;
  --line: #d5e0ea;
  --radius: 16px;
  --tap: 48px;
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; background: var(--bg); color: var(--text);
  font-family: system-ui, "Segoe UI", sans-serif; }
button, input { font: inherit; }
button { cursor: pointer; }

.app-shell { min-height: 100dvh; display: flex; flex-direction: column; }
.topbar {
  background: linear-gradient(160deg, var(--blue-d), var(--blue));
  color: #fff; padding: 12px 16px 14px; display: flex; align-items: center; gap: 12px;
  position: sticky; top: 0; z-index: 20;
}
.topbar img { width: 36px; height: 50px; object-fit: contain; }
.topbar h1 { font-size: 1.05rem; margin: 0; font-weight: 700; }
.topbar p { margin: 0; opacity: .85; font-size: .82rem; }
.topbar .grow { flex: 1; }
.ghost {
  background: transparent; border: 1px solid rgba(255,255,255,.35); color: #fff;
  border-radius: 999px; padding: 6px 12px;
}

.wrap { padding: 16px; max-width: 920px; margin: 0 auto; width: 100%; flex: 1; }
.card { background: var(--card); border-radius: var(--radius); box-shadow: 0 8px 24px rgba(11,79,138,.08);
  padding: 16px; margin-bottom: 12px; }
h2 { margin: 0 0 12px; font-size: 1.15rem; }
.muted { color: var(--muted); }

.emp-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.emp-btn {
  min-height: 72px; border: 2px solid var(--line); background: #fff; border-radius: 14px;
  padding: 12px; text-align: left; font-weight: 600;
}
.emp-btn.active { border-color: var(--blue); background: var(--blue-s); color: var(--blue-d); }

.pin { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; max-width: 280px; margin: 12px auto 0; }
.pin button {
  height: var(--tap); border: 0; border-radius: 12px; background: var(--blue-s); font-size: 1.25rem; font-weight: 700;
}
.pin button.wide { grid-column: span 2; }
.dots { display: flex; justify-content: center; gap: 8px; margin: 8px 0 4px; }
.dots span { width: 12px; height: 12px; border-radius: 50%; border: 2px solid var(--blue); }
.dots span.on { background: var(--blue); }
.linkish {
  display: block; width: 100%; margin-top: 16px; border: 0; background: transparent;
  color: var(--blue); font-weight: 600; text-align: center; padding: 8px;
}

.chips { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; margin: 8px 0; }
.chip {
  border: 0; border-radius: 999px; padding: 8px 14px; background: #fff; white-space: nowrap;
  border: 1px solid var(--line); font-weight: 600;
}
.chip.on { color: #fff; }
.chip.wg-all.on { background: var(--blue); }
.chip.wg-100.on { background: var(--strom); color: #1a2433; }
.chip.wg-200.on { background: var(--gas); }
.chip.wg-300.on { background: var(--wasser); }

.search {
  width: 100%; height: 48px; border-radius: 12px; border: 1px solid var(--line);
  padding: 0 14px; background: #fff;
}
.list { display: flex; flex-direction: column; gap: 8px; margin-top: 10px; }
.item {
  display: grid; grid-template-columns: 1fr auto; gap: 8px; align-items: center;
  background: #fff; border-radius: 14px; padding: 12px; border: 1px solid var(--line);
}
.item h3 { margin: 0; font-size: .98rem; }
.item .meta { font-size: .8rem; color: var(--muted); }
.badge { display: inline-block; font-size: .72rem; font-weight: 700; padding: 2px 8px; border-radius: 999px; }
.b-100 { background: #fff4cc; color: #7a5b00; }
.b-200 { background: #ffe4d1; color: #9a3f00; }
.b-300 { background: #d7ecff; color: #0b4f8a; }

.primary, .secondary, .danger {
  border: 0; border-radius: 12px; min-height: 48px; padding: 0 16px; font-weight: 700; width: 100%;
}
.primary { background: var(--blue); color: #fff; }
.secondary { background: var(--blue-s); color: var(--blue); }
.danger { background: #fde8e6; color: var(--err); }
.row { display: flex; gap: 8px; }
.row > * { flex: 1; }

.qty { display: flex; align-items: center; gap: 6px; }
.qty button { width: 40px; height: 40px; border: 0; border-radius: 10px; background: var(--blue-s); font-size: 1.2rem; }
.qty input { width: 64px; height: 40px; text-align: center; border: 1px solid var(--line); border-radius: 10px; }

.sticky-order {
  background: #fff; border: 2px dashed var(--blue); border-radius: 14px; padding: 12px; margin-bottom: 12px;
}
.cart {
  position: sticky; bottom: 0; background: #fff; border-top: 1px solid var(--line);
  padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); box-shadow: 0 -8px 24px rgba(11,79,138,.1);
}
.toast { position: fixed; left: 50%; bottom: 88px; transform: translateX(-50%); background: #1a2433; color: #fff;
  padding: 10px 16px; border-radius: 999px; font-size: .9rem; z-index: 50; }
.err { color: var(--err); font-weight: 600; text-align: center; }
.ok { color: var(--ok); }
table { width: 100%; border-collapse: collapse; font-size: .9rem; }
th, td { text-align: left; padding: 8px 6px; border-bottom: 1px solid var(--line); }
.empty { text-align: center; padding: 28px 8px; color: var(--muted); }

.tabs {
  display: flex; gap: 4px; padding: 8px 12px 0; background: var(--bg);
  position: sticky; top: 70px; z-index: 15;
}
.tabs button {
  flex: 1; border: 0; background: transparent; padding: 10px 8px; font-weight: 700;
  color: var(--muted); border-bottom: 3px solid transparent;
}
.tabs button.on { color: var(--blue); border-bottom-color: var(--blue); }

.modal {
  position: fixed; inset: 0; background: rgba(10,30,50,.45); z-index: 40;
  display: flex; align-items: flex-end; justify-content: center; padding: 12px;
}
.modal-card {
  background: #fff; width: min(640px, 100%); max-height: 88dvh; overflow: auto;
  border-radius: 20px 20px 12px 12px; padding: 16px;
}

@media (min-width: 800px) {
  .item { grid-template-columns: 1fr auto auto; }
  .modal { align-items: center; }
  .modal-card { border-radius: 20px; }
}

.tiny {
  border: 1px solid var(--line); background: #fff; border-radius: 8px;
  padding: 6px 8px; font-size: .8rem; font-weight: 600; width: auto; min-height: 0; margin: 2px;
}
.danger-tiny { color: var(--err); border-color: #f0c2bc; background: #fde8e6; }
.row-off td { opacity: .55; }
.actions { white-space: nowrap; }
