/* Kiosk – WND. Colours from the Will & The Dreadz logo. Built for a tablet or laptop at the counter. */
:root {
  --green: #1d5c2e; --green-d: #154522; --red: #c4161c; --gold: #f2c200; --ink: #161616; --muted: #66706a;
  --bg: #f5f4ef; --card: #fff; --line: #e2e0d8; --ok: #1d7a3a; --warn: #a15c00; --radius: 12px;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; color: var(--ink); background: var(--bg);
}
* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; border: 1px solid var(--line); background: var(--card); border-radius: 10px; padding: .55rem .9rem; }
button:disabled { opacity: .5; cursor: default; }
button.primary { background: var(--green); border-color: var(--green); color: #fff; font-weight: 600; }
button.primary:hover:not(:disabled) { background: var(--green-d); }
button.big { padding: .9rem 1.2rem; font-size: 1.1rem; width: 100%; }
button.ghost, a.btn { background: transparent; }
a.btn { border: 1px solid var(--line); border-radius: 10px; padding: .55rem .9rem; text-decoration: none; color: inherit; }
button.danger, .danger { color: var(--red); }
input, select, textarea { width: 100%; padding: .6rem .7rem; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
input:focus, select:focus, textarea:focus, button:focus-visible { outline: 3px solid color-mix(in srgb, var(--gold) 70%, transparent); outline-offset: 1px; }
label { display: block; margin: .7rem 0; font-size: .92rem; color: var(--muted); }
label input, label select, label textarea { margin-top: .3rem; color: var(--ink); }
label.check, label.inline { display: flex; gap: .5rem; align-items: center; }
label.check input { width: auto; margin: 0; }
label.inline input { width: 5rem; margin: 0 0 0 auto; }
h1 { font-size: 1.4rem; margin: 0 0 .6rem; } h1 small, h2 small { color: var(--muted); font-weight: 400; font-size: .9rem; }
h2 { font-size: 1.15rem; margin: 0 0 .6rem; }
.hint, .muted { color: var(--muted); font-size: .88rem; }
.note { padding: .7rem .9rem; border-radius: 10px; background: #fff8dc; border: 1px solid #efdc9a; }
.note.ok { background: #eaf6ee; border-color: #b9dfc5; } .note.warn { background: #fff1e0; border-color: #f1c99a; }
.loading, .empty { color: var(--muted); padding: 1rem; }

/* header: a thin red-gold-green band, as on the logo */
header.top { display: flex; align-items: center; gap: 1rem; padding: .5rem 1rem; background: var(--ink); color: #fff; border-bottom: 4px solid; border-image: linear-gradient(90deg, var(--red) 0 33%, var(--gold) 33% 66%, var(--green) 66%) 1; position: sticky; top: 0; z-index: 5; }
.brand { display: flex; align-items: center; gap: .6rem; color: #fff; text-decoration: none; font-weight: 700; letter-spacing: .02em; }
.brand img { height: 36px; width: 48px; object-fit: cover; object-position: 30% 40%; border-radius: 6px; background: #fff; }
header nav { display: flex; gap: .3rem; }
header nav a { color: #ddd; text-decoration: none; padding: .45rem .8rem; border-radius: 8px; }
header nav a.on { background: var(--green); color: #fff; }
.who { margin-left: auto; display: flex; gap: .6rem; align-items: center; font-size: .85rem; color: #ccc; }
.who button { color: #fff; border-color: #555; padding: .35rem .7rem; }

/* sign in */
.signin { max-width: 380px; margin: 6vh auto; background: var(--card); padding: 1.6rem; border-radius: var(--radius); box-shadow: 0 6px 30px #0001; }
.signin .logo { width: 100%; max-height: 180px; object-fit: contain; }
.signin h1 { text-align: center; } .switch { text-align: center; font-size: .9rem; } .switch a { color: var(--green); }

/* till */
.till { display: grid; grid-template-columns: 1fr 360px; height: calc(100vh - 62px); }
.menu { overflow: auto; padding: 1rem; }
.filters { display: grid; gap: .6rem; margin-bottom: .8rem; position: sticky; top: -1rem; background: var(--bg); padding: .5rem 0; z-index: 2; }
.chips { display: flex; gap: .4rem; flex-wrap: wrap; }
.chips button { border-radius: 999px; padding: .35rem .85rem; font-size: .9rem; }
.chips button.on { background: var(--ink); color: #fff; border-color: var(--ink); }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: .7rem; }
.tile { display: flex; flex-direction: column; text-align: left; padding: 0; overflow: hidden; border-radius: var(--radius); background: var(--card); transition: transform .06s; }
.tile:active { transform: scale(.97); }
.tile .pic { aspect-ratio: 4/3; background: #eee; display: grid; place-items: center; overflow: hidden; }
.tile .pic img { width: 100%; height: 100%; object-fit: cover; }
.noimg { font-size: 2rem; color: #bbb; font-weight: 700; }
.tile .name { padding: .45rem .6rem 0; font-weight: 600; font-size: .95rem; line-height: 1.2; }
.tile .meta { display: flex; justify-content: space-between; align-items: baseline; padding: .2rem .6rem .55rem; }
.tile .meta small { color: var(--muted); }
.tile.out { opacity: .55; } .tile.out .meta small { color: var(--red); }
.cart { background: var(--card); border-left: 1px solid var(--line); padding: 1rem; display: flex; flex-direction: column; gap: .6rem; }
.lines { list-style: none; margin: 0; padding: 0; overflow: auto; flex: 1; }
.lines li { display: grid; grid-template-columns: 1fr auto auto; gap: .5rem; align-items: center; padding: .5rem 0; border-bottom: 1px solid var(--line); }
.lines .n small { display: block; color: var(--muted); font-size: .8rem; }
.lines .q { display: flex; align-items: center; gap: .35rem; } .lines .q button { width: 2.1rem; height: 2.1rem; padding: 0; font-size: 1.1rem; }
.lines .t { min-width: 5.5rem; text-align: right; font-variant-numeric: tabular-nums; }
.total { display: flex; justify-content: space-between; font-size: 1.3rem; padding: .4rem 0; }

/* modal */
.modal-wrap { position: fixed; inset: 0; background: #0007; display: grid; place-items: center; z-index: 20; padding: 1rem; }
.modal { background: var(--card); border-radius: var(--radius); padding: 1.3rem; width: min(480px, 100%); max-height: 92vh; overflow: auto; }
.modal table { width: 100%; border-collapse: collapse; margin: .5rem 0; } .modal td { padding: .3rem 0; border-bottom: 1px solid var(--line); } .modal td:last-child, .r { text-align: right; font-variant-numeric: tabular-nums; }
.modal tr.sum td { font-weight: 700; }
.row { display: flex; gap: .6rem; justify-content: flex-end; margin-top: 1rem; } .row button.big { width: auto; flex: 1; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: .8rem; }
.due { font-size: 1.2rem; } .change { font-size: 1.3rem; } .change b { color: var(--green); }
.quick { display: flex; gap: .4rem; flex-wrap: wrap; }
.receipt { text-align: center; } .receipt .rlogo { height: 70px; } .receipt table td:first-child { text-align: left; } .receipt .foot { font-size: .8rem; color: var(--muted); }
fieldset { border: 1px solid var(--line); border-radius: 10px; } legend { color: var(--muted); font-size: .9rem; }

/* pages */
.page { padding: 1rem 1.2rem; max-width: 1100px; margin: 0 auto; }
.admin { display: grid; grid-template-columns: 190px 1fr; min-height: calc(100vh - 62px); }
.tabs { background: var(--card); border-right: 1px solid var(--line); padding: .8rem; display: flex; flex-direction: column; gap: .2rem; }
.tabs a { padding: .55rem .8rem; border-radius: 8px; text-decoration: none; color: inherit; } .tabs a.on { background: var(--green); color: #fff; }
.bar { display: flex; gap: .7rem; align-items: center; flex-wrap: wrap; margin: .4rem 0 .8rem; } .bar h1 { margin: 0; margin-right: auto; }
.bar input[type=search], .bar select { width: auto; min-width: 220px; }
table.list { width: 100%; border-collapse: collapse; background: var(--card); border-radius: var(--radius); overflow: hidden; }
table.list th, table.list td { padding: .55rem .7rem; border-bottom: 1px solid var(--line); text-align: left; vertical-align: middle; }
table.list th { background: #faf9f5; font-size: .85rem; color: var(--muted); font-weight: 600; } table.list th.r, table.list td.r { text-align: right; }
tr.click { cursor: pointer; } tr.click:hover { background: #fbfaf4; }
tr.low td:nth-child(2) { color: var(--red); }
td.thumb { width: 56px; } td.thumb img, td.thumb .noimg { width: 44px; height: 44px; object-fit: cover; border-radius: 6px; display: grid; place-items: center; font-size: 1rem; background: #eee; }
td.acts { white-space: nowrap; text-align: right; } td.acts button { padding: .35rem .6rem; font-size: .85rem; }
td input.price { width: 7rem; }
.st { font-size: .8rem; padding: .15rem .5rem; border-radius: 999px; background: #eee; }
.st.paid, .st.published { background: #e3f3e8; color: var(--ok); } .st.cancelled, .st.archived { background: #eee; color: #777; } .st.refunded, .st.partly_refunded { background: #fde8e8; color: var(--red); } .st.open, .st.draft { background: #fff5d6; color: var(--warn); }
.stats { display: flex; gap: 1rem; color: var(--muted); }
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: .7rem; margin-bottom: 1.2rem; }
.card { background: var(--card); border-radius: var(--radius); padding: .9rem; border: 1px solid var(--line); } .card span { display: block; color: var(--muted); font-size: .85rem; } .card b { font-size: 1.3rem; }
.card.hl { border-color: var(--green); box-shadow: inset 0 0 0 1px var(--green); }
.inline-form { display: flex; gap: .8rem; align-items: flex-end; flex-wrap: wrap; } .inline-form label { margin: 0; flex: 1; min-width: 180px; }
.narrow { max-width: 460px; }

#toasts { position: fixed; bottom: 1rem; left: 50%; transform: translateX(-50%); display: grid; gap: .5rem; z-index: 30; }
.toast { background: var(--ink); color: #fff; padding: .7rem 1rem; border-radius: 10px; box-shadow: 0 6px 20px #0003; max-width: 90vw; }
.toast.ok { background: var(--ok); } .toast.error { background: var(--red); }

@media (max-width: 820px) {
  .till { grid-template-columns: 1fr; height: auto; } .cart { border-left: 0; border-top: 1px solid var(--line); }
  .admin { grid-template-columns: 1fr; } .tabs { flex-direction: row; overflow: auto; }
  .who span { display: none; }
}
@media print { header.top, .row, #toasts { display: none; } .modal-wrap { position: static; background: none; } }
