:root {
  color-scheme: light;
  --green-900: #10281f;
  --green-700: #1f5a43;
  --green-100: #e9f3ed;
  --coffee: #8a5a35;
  --cream: #fbfaf6;
  --ink: #14231c;
  --muted: #66746c;
  --line: #d9e4dc;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--cream);
  color: var(--ink);
}
a { color: inherit; text-decoration: none; }
button, input, textarea, select {
  font: inherit;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  color: var(--ink);
}
button, .button {
  min-height: 42px;
  padding: 0 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.primary { background: var(--green-700); color: white; border-color: var(--green-700); }
.danger { background: #9b2f2f; color: white; border-color: #9b2f2f; }
.topbar {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 18px;
  background: rgba(251,250,246,.94);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(12px);
}
.brand { font-weight: 800; color: var(--green-900); }
.topbar nav { display: flex; gap: 12px; font-size: 14px; }
.admin-topbar nav {
  align-items: center;
}
.admin-topbar nav button {
  min-height: 0;
  padding: 0;
  border: 0;
  background: transparent;
}
#cartSum { color: var(--coffee); font-weight: 700; }
.shell { width: min(1040px, 100%); margin: 0 auto; padding: 18px; }
.hero {
  min-height: 220px;
  display: grid;
  align-content: end;
  gap: 8px;
  padding: 28px;
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(16,40,31,.88), rgba(31,90,67,.76)),
    url("https://images.unsplash.com/photo-1442512595331-e89e73853f31?auto=format&fit=crop&w=1400&q=80");
  background-size: cover;
  background-position: center;
  color: white;
}
.hero h1 { margin: 0; font-size: clamp(44px, 11vw, 82px); letter-spacing: 0; }
.hero p, .kicker { margin: 0; color: rgba(255,255,255,.86); }
.toolbar { margin-top: 12px; }
h1, h2, h3 { letter-spacing: 0; }
.grid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.stack { display: grid; gap: 12px; }
.card {
  display: block;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  box-shadow: 0 10px 24px rgba(16,40,31,.06);
}
.card h3 { margin: 0 0 8px; }
.card p { color: var(--muted); }
.drink-row, .admin-order, .split-head {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 12px;
}
.cart-line {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) 120px 112px 120px 44px;
  align-items: center;
  gap: 12px;
}
.checkout-row {
  grid-template-columns: minmax(180px, 1fr) 120px 70px 120px;
}
.line-cell {
  display: grid;
  gap: 2px;
  justify-items: start;
}
.line-cell b {
  line-height: 1.2;
}
.line-subtotal {
  justify-items: end;
  text-align: right;
}
small { display: block; color: var(--muted); margin-top: 4px; }
.back { display: inline-block; margin-bottom: 14px; color: var(--green-700); }
.nav-actions, .page-actions, .modal-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.detail { max-width: 680px; margin: 0 auto; }
.detail .kicker { color: var(--coffee); font-weight: 700; }
.volume-list { display: grid; gap: 10px; margin-top: 24px; }
.volume { width: 100%; min-height: 66px; padding: 12px 14px; display: flex; justify-content: space-between; align-items: center; text-align: left; }
.total { display: flex; justify-content: space-between; margin: 20px 0; font-size: 20px; }
.form { display: grid; gap: 14px; max-width: 560px; }
label { display: grid; gap: 6px; color: var(--muted); }
.required-field > span::after {
  content: " *";
  color: #9b2f2f;
  font-weight: 800;
}
fieldset {
  display: grid;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
}
legend { color: var(--green-900); font-weight: 700; }
.choice-line {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr);
  align-items: start;
  column-gap: 10px;
  color: var(--ink);
}
.choice-line select {
  grid-column: 2;
  width: min(160px, 100%);
}
.choice-line input[type="radio"] { width: auto; }
.field-label {
  display: block;
  margin-bottom: 6px;
  color: var(--muted);
}
.stepper {
  width: fit-content;
  display: inline-grid;
  grid-template-columns: 42px 54px 42px;
  align-items: center;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
}
.stepper button {
  min-height: 42px;
  border: 0;
  border-radius: 0;
  font-weight: 800;
}
.stepper strong {
  text-align: center;
}
.stepper.compact {
  grid-template-columns: 34px 42px 34px;
}
.icon-danger {
  width: 42px;
  min-height: 42px;
  padding: 0;
  border-color: #ead3d3;
  background: #fff5f5;
  color: #9b2f2f;
  font-size: 24px;
  font-weight: 700;
}
.order-lines {
  display: grid;
  gap: 8px;
  margin: 12px 0;
}
.order-line {
  display: grid;
  grid-template-columns: minmax(160px, 1fr) 56px 110px;
  gap: 12px;
  align-items: center;
}
.order-line > strong {
  text-align: right;
}
.order-total {
  margin-bottom: 12px;
}
.order-comment {
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbf7ef;
}
.order-comment small {
  color: var(--muted);
}
.order-comment p {
  margin: 4px 0 0;
  color: var(--ink);
}
.order-actions {
  display: flex;
  justify-content: flex-start;
}
input, textarea, select { width: 100%; padding: 11px 12px; }
.inline-form { display: flex; gap: 8px; }
.tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.admin-panel { max-width: 440px; margin: 8vh auto; }
.admin-editor {
  margin-top: 18px;
}
.admin-toolbar {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 10px;
  margin: 12px 0 18px;
}
.admin-list-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}
.admin-two-column {
  display: grid;
  grid-template-columns: minmax(320px, 420px) minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}
.admin-form {
  display: grid;
  gap: 14px;
}
.form-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: start;
}
.form-head h2 {
  margin: 0;
}
.form-head code {
  max-width: 180px;
  overflow-wrap: anywhere;
  color: var(--muted);
}
.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px;
}
.locale-fieldset {
  background: #fbfdfb;
}
.check-line {
  display: flex;
  flex-direction: row;
  gap: 8px;
  align-items: center;
  color: var(--ink);
}
.check-line input {
  width: auto;
}
.volume-editor {
  display: grid;
  gap: 12px;
}
.volume-editor-row {
  display: grid;
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--cream);
}
.admin-order-card {
  display: grid;
  grid-template-columns: 140px 130px 150px minmax(160px, 1fr) 90px 110px 80px;
  gap: 12px;
  align-items: start;
}
.admin-order-title {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  justify-content: space-between;
}
.admin-order-title span:first-child {
  display: grid;
  gap: 4px;
}
.comment-badge {
  display: inline-grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--coffee);
  color: white;
  font-size: 13px;
  font-weight: 700;
  line-height: 1;
  flex: 0 0 auto;
}
.pager {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
  margin-top: 16px;
}
pre {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  color: var(--muted);
  max-height: 260px;
  overflow: auto;
}
.crud-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(280px, 420px); gap: 16px; align-items: start; }
.empty { color: var(--muted); }
.modal {
  position: fixed;
  inset: 0;
  z-index: 10;
  display: grid;
  place-items: end center;
  padding: 18px;
  background: rgba(16,40,31,.42);
}
.modal.hidden { display: none; }
.modal-card {
  width: min(520px, 100%);
  display: grid;
  gap: 14px;
  padding: 18px;
  border-radius: 8px;
  background: white;
  box-shadow: 0 18px 50px rgba(16,40,31,.24);
}
.modal-card h2, .modal-card p { margin: 0; }
@media (max-width: 720px) {
  .topbar { align-items: start; flex-direction: column; }
  .shell { padding: 14px; }
  .hero { min-height: 190px; padding: 22px; }
  .cart-line {
    grid-template-columns: minmax(0, 1fr) auto auto auto;
    align-items: start;
  }
  .cart-line > a,
  .checkout-row > span:first-child {
    grid-column: 1 / -1;
  }
  .cart-line .stepper {
    justify-self: start;
  }
  .cart-line .icon-danger {
    justify-self: end;
  }
  .checkout-row {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .checkout-row > span:first-child {
    grid-column: 1 / -1;
  }
  .line-subtotal {
    justify-items: start;
    text-align: left;
  }
  .admin-order, .admin-order-card, .split-head, .crud-layout, .admin-two-column { grid-template-columns: 1fr; }
  .order-line {
    grid-template-columns: minmax(0, 1fr) auto auto;
  }
  .order-line > strong {
    text-align: right;
  }
  .inline-form { flex-direction: column; }
  .page-actions .button, .page-actions button, .modal-actions button { width: 100%; }
}
