:root {
  --surface: #fff; --page: #f7f8fa; --ink: #16181c; --ink2: #5c6470; --muted: #98a1ad; --border: #e2e5ea;
  --navy: #0a1230; --blue: #1477e6; --blue-soft: #e8f2fe;
  --ok: #0f8a5f; --ok-bg: #e2f6ec; --warn: #b4720a; --warn-bg: #fbf0dc; --bad: #c22a3e; --bad-bg: #fbe7ea; --neutral: #4a5468; --neutral-bg: #eef1f7;
  --radius: 14px; --shadow: 0 1px 2px rgba(20,22,26,.05), 0 10px 28px -10px rgba(16,40,90,.16);
  --font: "Poppins", system-ui, -apple-system, "Segoe UI", sans-serif;
  --banner-h: 48px;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { font: 14px/1.5 var(--font); background: var(--page); color: var(--ink); }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
[hidden] { display: none !important; }
h1, h2, h3 { margin: 0; line-height: 1.25; }
h1 { font-size: 22px; font-weight: 600; } h2 { font-size: 16px; font-weight: 600; } h3 { font-size: 14px; font-weight: 600; }
.muted { color: var(--ink2); } .small { font-size: 12px; }

/* Banner */
.demo-banner { position: sticky; top: 0; z-index: 50; min-height: var(--banner-h); display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center; justify-content: space-between; background: #fff7e0; color: #5a4300; padding: 6px 16px; border-bottom: 1px solid #ecd9a0; font-size: 12px; }
.modes { display: flex; gap: 4px; background: #fff; border: 1px solid #ecd9a0; border-radius: 999px; padding: 3px; }
.modes button { border: 0; background: none; padding: 5px 14px; border-radius: 999px; font-weight: 500; font-size: 12px; }
.modes button[aria-pressed="true"] { background: var(--navy); color: #fff; }
.ghost { background: none; border: 1px solid #ecd9a0; border-radius: 999px; padding: 4px 12px; font-size: 12px; }

/* Knapper og badges */
.btn { border: 1px solid var(--border); background: #fff; color: var(--ink); border-radius: 10px; padding: 7px 14px; font-weight: 500; }
.btn:hover { background: var(--neutral-bg); }
.btn.primary { background: var(--blue); border-color: var(--blue); color: #fff; }
.btn.primary:hover { background: #0f63c2; }
.btn.small { padding: 4px 10px; font-size: 12px; }
.btn.danger { color: var(--bad); }
.badge { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: 12px; font-weight: 500; background: var(--neutral-bg); color: var(--neutral); }
.badge.ny { background: var(--blue-soft); color: var(--blue); } .badge.bekraeftet, .badge.tilberedes { background: var(--warn-bg); color: var(--warn); }
.badge.klar, .badge.ok { background: var(--ok-bg); color: var(--ok); } .badge.bad { background: var(--bad-bg); color: var(--bad); }

/* Admin-skal */
.shell { display: grid; grid-template-columns: 232px minmax(0, 1fr); min-height: calc(100dvh - var(--banner-h)); }
.side { background: var(--navy); color: #dfe6f5; padding: 18px 12px; display: flex; flex-direction: column; gap: 4px; position: sticky; top: var(--banner-h); height: calc(100dvh - var(--banner-h)); }
.brand { font-weight: 700; font-size: 18px; color: #fff; padding: 4px 10px 2px; }
.rest { font-size: 12px; color: #9fb0d6; padding: 0 10px 16px; }
.side button.nav { display: flex; justify-content: space-between; align-items: center; width: 100%; text-align: left; background: none; border: 0; color: inherit; padding: 9px 12px; border-radius: 10px; font-weight: 500; }
.side button.nav:hover { background: rgba(255,255,255,.08); }
.side button.nav[aria-current="page"] { background: rgba(255,255,255,.16); color: #fff; }
.pill { background: var(--blue); color: #fff; border-radius: 999px; font-size: 11px; padding: 0 8px; font-weight: 600; }
.side .foot { margin-top: auto; font-size: 11px; color: #9fb0d6; padding: 10px; }
.content { padding: 28px 32px 56px; max-width: 1180px; width: 100%; }
.head { display: flex; flex-wrap: wrap; gap: 12px; justify-content: space-between; align-items: center; margin-bottom: 20px; }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px; }
.grid { display: grid; gap: 16px; }
.kpis { grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); margin-bottom: 16px; }
.kpi strong { display: block; font-size: 26px; font-weight: 600; font-variant-numeric: tabular-nums; }
.kpi span { color: var(--ink2); font-size: 12px; } .kpi em { font-style: normal; color: var(--ok); font-size: 12px; font-weight: 500; }
.two { grid-template-columns: 3fr 2fr; }
.bars { display: flex; align-items: flex-end; gap: 6px; height: 150px; margin-top: 14px; }
.bar { flex: 1; background: var(--blue-soft); border-radius: 6px 6px 0 0; position: relative; min-height: 4px; }
.bar.now { background: var(--blue); }
.bar span { position: absolute; bottom: -20px; left: 50%; transform: translateX(-50%); font-size: 10px; color: var(--muted); }
.bars-wrap { padding-bottom: 22px; }
table { width: 100%; border-collapse: collapse; }
th { text-align: left; font-size: 12px; font-weight: 500; color: var(--ink2); padding: 8px 10px; border-bottom: 1px solid var(--border); }
td { padding: 11px 10px; white-space: nowrap; border-bottom: 1px solid var(--border); vertical-align: middle; }
tr:last-child td { border-bottom: 0; }
.tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 14px; }
.tab { border: 1px solid var(--border); background: #fff; border-radius: 999px; padding: 5px 14px; font-size: 13px; }
.tab[aria-pressed="true"] { background: var(--navy); border-color: var(--navy); color: #fff; }
.row { display: flex; gap: 10px; align-items: center; } .row.wrap { flex-wrap: wrap; } .grow { flex: 1; min-width: 0; }
.items-list { white-space: normal; color: var(--ink2); font-size: 12px; }
.menu-grid { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.dish { padding: 0; overflow: hidden; display: flex; flex-direction: column; }
.dish img { width: 100%; height: 150px; object-fit: cover; display: block; }
.dish .body { padding: 14px; display: grid; gap: 6px; flex: 1; }
.dish.off img { filter: grayscale(1); opacity: .55; }
.switch { width: 40px; height: 22px; border-radius: 999px; border: 0; background: var(--border); position: relative; flex: none; }
.switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: transform .15s; }
.switch[aria-checked="true"] { background: var(--ok); } .switch[aria-checked="true"]::after { transform: translateX(18px); }
.tables { grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); margin-top: 10px; }
.tbl { border: 1px solid var(--border); border-radius: 12px; padding: 10px; text-align: center; background: #fff; }
.tbl.busy { background: var(--bad-bg); border-color: #f3c3ca; } .tbl.res { background: var(--warn-bg); border-color: #efd8a8; } .tbl.free { background: var(--ok-bg); border-color: #bfe6d3; }
.tbl strong { display: block; }

/* Kundens bestilling */
.phone-wrap { display: grid; place-items: start center; padding: 24px 12px 90px; }
.phone { width: 100%; max-width: 440px; background: #fff; border: 1px solid var(--border); border-radius: 22px; box-shadow: var(--shadow); overflow: hidden; position: relative; }
.hero { position: relative; height: 170px; }
.hero img { width: 100%; height: 100%; object-fit: cover; display: block; }
.hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(transparent 30%, rgba(10,18,48,.78)); }
.hero div { position: absolute; left: 16px; bottom: 12px; z-index: 1; color: #fff; }
.hero h1 { font-size: 20px; } .hero p { margin: 0; font-size: 12px; opacity: .9; }
.cats { display: flex; gap: 6px; overflow-x: auto; padding: 12px 14px; border-bottom: 1px solid var(--border); position: sticky; top: var(--banner-h); background: #fff; z-index: 5; }
.cats .tab { white-space: nowrap; }
.cats { scrollbar-width: none; } .cats::-webkit-scrollbar { display: none; }
.shop-item { display: flex; gap: 12px; padding: 14px; border-bottom: 1px solid var(--border); align-items: center; }
.shop-item img { width: 84px; height: 84px; object-fit: cover; border-radius: 12px; flex: none; }
.shop-item.off { opacity: .5; }
.add { width: 32px; height: 32px; border-radius: 50%; border: 0; background: var(--blue); color: #fff; font-size: 20px; line-height: 1; flex: none; }
.cartbar { position: fixed; left: 50%; transform: translateX(-50%); bottom: 14px; width: calc(100% - 24px); max-width: 416px; background: var(--navy); color: #fff; border: 0; border-radius: 14px; padding: 14px 18px; display: flex; justify-content: space-between; font-weight: 600; box-shadow: 0 10px 28px -8px rgba(0,0,0,.4); z-index: 20; }
.sheet { padding: 16px; display: grid; gap: 12px; }
.sheet label { font-size: 12px; font-weight: 500; color: var(--ink2); display: grid; gap: 4px; }
.sheet input { border: 1px solid var(--border); border-radius: 10px; padding: 9px 12px; }
.qty { display: inline-flex; align-items: center; gap: 8px; }
.qty button { width: 26px; height: 26px; border-radius: 50%; border: 1px solid var(--border); background: #fff; }
.done { text-align: center; padding: 36px 20px; display: grid; gap: 12px; justify-items: center; }
.tick { width: 56px; height: 56px; border-radius: 50%; background: var(--ok-bg); color: var(--ok); display: grid; place-items: center; font-size: 28px; }

/* Køkken */
.kitchen { background: #11151f; min-height: calc(100dvh - var(--banner-h)); padding: 20px; color: #e8ecf5; }
.kitchen h1 { color: #fff; margin-bottom: 4px; }
.cols { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-top: 16px; }
.col { background: #1a2030; border-radius: 16px; padding: 14px; display: grid; gap: 12px; align-content: start; min-height: 320px; }
.col > h2 { color: #fff; display: flex; justify-content: space-between; }
.ticket { background: #fff; color: var(--ink); border-radius: 12px; padding: 14px; display: grid; gap: 8px; }
.ticket ul { margin: 0; padding-left: 18px; }
.ticket .big { font-weight: 700; font-size: 17px; display: flex; justify-content: space-between; }
.ticket .btn { width: 100%; padding: 12px; font-size: 15px; }
.empty { color: #7d88a3; font-size: 13px; text-align: center; padding: 24px 0; }

#toast { position: fixed; right: 16px; bottom: 16px; z-index: 100; background: var(--navy); color: #fff; padding: 10px 16px; border-radius: 12px; box-shadow: var(--shadow); max-width: 320px; }

@media (max-width: 860px) {
  .shell { grid-template-columns: minmax(0, 1fr); align-content: start; }
  .side { position: static; height: auto; flex-direction: row; flex-wrap: nowrap; overflow-x: auto; align-items: center; padding: 10px; }
  .side .brand { flex: none; }
  .brand, .rest { padding: 0 8px; } .rest, .side .foot { display: none; }
  .side button.nav { width: auto; padding: 7px 12px; white-space: nowrap; flex: none; gap: 6px; }
  .content { padding: 20px 16px 48px; }
  .two { grid-template-columns: 1fr; }
  .cols { grid-template-columns: 1fr; }
  .card.table-card { overflow-x: auto; }
  .cats { top: 0; position: static; }
}
