:root {
  color-scheme: light;
  --purple: #713bb0;
  --navy: #11134f;
  --green: #08752e;
  --text: #404b70;
  --tint: #f6f7fc;
  --line: #dedfea;
  font-family: Arial, Helvetica, sans-serif;
  color: var(--text);
  background: var(--tint);
  line-height: 1.5;
}

* { box-sizing: border-box; }
body { margin: 0; }
[hidden] { display: none !important; }
h1, h2, h3 { color: var(--navy); line-height: 1.2; margin: 0 0 .5rem; }
h1 { font-size: clamp(1.8rem, 5vw, 2.4rem); }
h2 { font-size: 1.25rem; }
h3 { font-size: 1.1rem; }
p { margin: .4rem 0; }
ul { padding-inline-start: 1.3rem; }
.brand {
  display: flex;
  align-items: center;
  gap: .8rem;
  padding: .75rem max(1rem, calc((100% - 68rem) / 2));
  background: white;
  border-bottom: 3px solid var(--green);
  color: var(--navy);
  font-size: 1.2rem;
  font-weight: 700;
}
.brand img { object-fit: contain; }
main { max-width: 46rem; margin: auto; padding: clamp(1rem, 4vw, 2rem) 1rem 3rem; }
main.staff { max-width: 70rem; }
button, input, select { font: inherit; min-height: 44px; border-radius: .4rem; }
input, select { color: var(--navy); background: white; border: 1px solid #797da0; padding: .35rem .55rem; }
input { width: 5.1rem; margin-top: .25rem; display: block; }
select { max-width: 100%; }
button { background: var(--purple); color: white; border: 1px solid var(--purple); padding: .45rem .8rem; cursor: pointer; font-weight: 700; }
button:hover { background: #5e2d98; }
button:disabled { opacity: .55; cursor: default; }
:focus-visible { outline: 3px solid var(--green); outline-offset: 3px; }
.category, .basket, .order {
  margin-top: 1rem;
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: .65rem;
  background: white;
}
.drink, .basket, .order-top { display: flex; justify-content: space-between; gap: .8rem; }
.drink { border-top: 1px solid var(--line); padding-block: .85rem; align-items: center; }
.drink:last-child { padding-bottom: 0; }
.drink strong, #total { color: var(--green); }
.basket { flex-wrap: wrap; align-items: center; }
.basket p:empty, #message:empty, #selection:empty { display: none; }
.basket p { flex-basis: 100%; }
.toolbar { display: flex; align-items: center; gap: .55rem; flex-wrap: wrap; }
.toolbar label { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; }
.staff section, details { margin-top: 1.2rem; }
.notice { background: #e2f2e4; color: #19582b; border-radius: .5rem; padding: .65rem .9rem; margin-block: .75rem; font-weight: 700; }
.order.new { border-left: 5px solid var(--purple); }
.order-top { flex-wrap: wrap; color: var(--navy); }
.order-top h3 { font-size: 1.3rem; }
.state, .order-total, summary { font-weight: 700; color: var(--navy); }
.order-total { margin-bottom: .7rem; }
summary { cursor: pointer; padding: .55rem 0; }
details > .toolbar { margin-top: .8rem; }

.staff-nav { display: flex; flex-wrap: wrap; gap: .25rem .8rem; margin: 1rem 0; border-bottom: 1px solid var(--line); }
.staff-nav a { display: inline-flex; min-height: 44px; align-items: center; padding: .35rem .55rem; color: var(--navy); font-weight: 700; text-decoration: none; border-bottom: 3px solid transparent; }
.staff-nav a[aria-current] { color: var(--purple); border-color: var(--purple); }
.staff-nav a:hover { text-decoration: underline; }
.event-bar, .section-heading { display: flex; flex-wrap: wrap; gap: .65rem; justify-content: space-between; align-items: center; }
.event-bar { background: white; border: 1px solid var(--line); padding: .8rem; border-radius: .65rem; justify-content: flex-start; }
.event-bar label { display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; min-width: 0; font-weight: 700; }
.event-bar select { max-width: 100%; }
#active-event { flex-basis: 100%; margin: 0; font-weight: 700; }
#active-event.is-open { color: var(--green); }
.secondary { background: white; color: #59288e; border-color: #d6c4e7; }
.secondary:hover { background: #f4eefb; }
.manage-card { background: white; border: 1px solid var(--line); border-radius: .65rem; padding: clamp(.8rem, 3vw, 1.35rem); }
.section-heading h2, .section-heading h3 { margin: 0; }
.manage-card h3, .manage-card h4 { overflow-wrap: anywhere; }
.manage-card h4 { color: var(--navy); margin: 0; font-size: 1.02rem; }
.manage-card > .toolbar { margin-top: .65rem; }
.manage-list { padding: 0; list-style: none; margin: .8rem 0 0; }
.manage-list li { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: .65rem; border-top: 1px solid var(--line); padding: .85rem 0; }
.manage-list li:last-child { padding-bottom: 0; }
.manage-list p { margin: .1rem 0; overflow-wrap: anywhere; }
.muted { color: var(--text); font-size: .92rem; }
.table-info { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem; }
.table-info label { display: flex; align-items: center; gap: .5rem; min-height: 44px; color: var(--navy); font-weight: 700; }
.table-info input { width: 18px; height: 18px; min-height: 0; margin: 0; accent-color: var(--purple); }
.tag { border-radius: 5px; padding: .18rem .45rem; background: #f1ebf9; color: #542986; font-size: .85rem; font-weight: 700; }
dialog { width: min(34rem, calc(100% - 2rem)); max-height: 90dvh; border: 1px solid var(--line); border-radius: .7rem; color: var(--text); padding: 1.2rem; }
dialog::backdrop { background: #11134f75; }
.editor-field { display: grid; gap: .2rem; margin-top: .6rem; font-weight: 700; }
.editor-field :is(input, select, textarea) { width: 100%; margin: 0; }
textarea { border: 1px solid #797da0; border-radius: .4rem; color: var(--navy); font: inherit; padding: .45rem; min-height: 5rem; resize: vertical; }
#editor-message { color: #8d2344; font-weight: 700; margin: .6rem 0; }
.qr-preview { width: min(100%, 18rem); display: block; margin: .5rem auto; image-rendering: pixelated; }
.handover { background: #fff5df; color: #624614; padding: .5rem .65rem; border-radius: .4rem; }
.pager { margin-top: .8rem; }

@media (max-width: 570px) {
  .staff-nav { gap: .2rem; }
  .staff-nav a { font-size: .9rem; padding-inline: .4rem; }
  .event-bar label { flex-basis: 100%; }
  .event-bar select { width: 100%; }
  .manage-list li > .toolbar { flex-basis: 100%; }
}

.warning { margin-block: .75rem; padding: .75rem .9rem; border: 2px solid #b16b05; border-radius: .5rem; background: #fff5df; color: #624614; font-weight: 700; }
.warning p { margin: 0 0 .55rem; }
