@import url('https://fonts.googleapis.com/css2?family=Bebas+Neue&family=Poppins:wght@400;500;600;700&family=Yellowtail&display=swap');

:root {
  --sage: #62816a;
  --sage-dark: #4b6853;
  --sage-light: #c9d5c6;
  --stripe-a: #bccabb;
  --stripe-b: #c8d4c6;
  --cream: #f4f3ec;
  --paper: #fbfaf5;
  --butter: #fbf3c8;
  --yolk: #e9c85a;
  --ink: #2f3b33;
  --muted: #6c7a6f;
  --danger: #b4483c;
  --radius: 14px;
  --shadow: 0 1px 2px rgb(47 59 51 / 8%), 0 6px 20px rgb(47 59 51 / 8%);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: Poppins, system-ui, sans-serif;
  color: var(--ink);
  background: var(--cream);
  line-height: 1.45;
}
button, input, textarea, select { font: inherit; color: inherit; }
img, svg { display: block; }

/* ---------- Header ---------- */
.hero {
  background: repeating-linear-gradient(90deg, var(--stripe-a) 0 28px, var(--stripe-b) 28px 56px);
  padding: 28px 20px 24px;
  text-align: center;
}
.brand { display: inline-flex; flex-direction: column; align-items: center; gap: 2px; text-decoration: none; color: var(--sage); }
.brand img.logo { width: min(300px, 70vw); height: auto; }
.wordmark { font-family: Yellowtail, cursive; font-size: 3rem; line-height: 1; }
.subbrand { font-family: Georgia, serif; letter-spacing: .25em; font-size: .7rem; text-transform: uppercase; margin-top: -2px; }
.tagline { font-family: 'Bebas Neue', sans-serif; font-size: 1.5rem; letter-spacing: .04em; color: var(--sage-dark); margin: 14px 0 0; }

h1, h2, h3, .display { font-family: 'Bebas Neue', sans-serif; font-weight: 400; letter-spacing: .03em; color: var(--sage); margin: 0; }
h2 { font-size: 1.9rem; }
h3 { font-size: 1.35rem; }

.wrap { max-width: 1040px; margin: 0 auto; padding: 24px 20px 120px; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }

/* ---------- Cards & controls ---------- */
.card { background: var(--paper); border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px; }
.btn {
  appearance: none; border: 0; border-radius: 999px; cursor: pointer;
  background: var(--sage); color: #fff; font-weight: 600; padding: 12px 20px;
  transition: background .15s, transform .05s;
}
.btn:hover { background: var(--sage-dark); }
.btn:active { transform: translateY(1px); }
.btn:disabled { background: #a7b5aa; cursor: not-allowed; }
.btn.ghost { background: transparent; color: var(--sage); box-shadow: inset 0 0 0 1.5px var(--sage); }
.btn.ghost:hover { background: rgb(98 129 106 / 8%); }
a.btn { display: inline-block; text-decoration: none; text-align: center; }
.btn.block { display: block; width: 100%; }
.linkish { background: none; border: 0; color: var(--sage); text-decoration: underline; cursor: pointer; padding: 0; }

label.field { display: block; font-size: .85rem; font-weight: 600; margin: 12px 0 4px; }
input[type=text], input[type=tel], input[type=password], textarea {
  width: 100%; padding: 11px 12px; border-radius: 10px; border: 1.5px solid var(--sage-light);
  background: #fff; outline: none;
}
input:focus, textarea:focus { border-color: var(--sage); box-shadow: 0 0 0 3px rgb(98 129 106 / 15%); }
textarea { resize: vertical; min-height: 60px; }

.error { color: var(--danger); font-size: .9rem; margin-top: 8px; min-height: 1.2em; }
.notice { background: var(--butter); border-radius: 10px; padding: 10px 14px; font-size: .9rem; }

/* ---------- Login ---------- */
.login-card { max-width: 380px; margin: 32px auto; text-align: center; }
.login-card form { text-align: left; margin-top: 8px; }

/* ---------- Runs ---------- */
.runs { display: grid; grid-template-columns: repeat(auto-fill, minmax(135px, 1fr)); gap: 10px; margin-top: 12px; }
.run {
  text-align: left; background: #fff; border: 1.5px solid var(--sage-light); border-radius: 12px;
  padding: 10px 12px; cursor: pointer;
}
.run:hover { border-color: var(--sage); }
.run[aria-pressed=true] { border-color: var(--sage); background: var(--sage); color: #fff; }
.run[aria-pressed=true] .muted { color: #e6eee6; }
.run .day { font-weight: 600; font-size: .9rem; }
.run .time { font-family: 'Bebas Neue', sans-serif; font-size: 1.6rem; line-height: 1.1; }
.countdown { margin-top: 10px; font-size: .9rem; }

/* ---------- Layout ---------- */
.layout { display: grid; grid-template-columns: 1fr 340px; gap: 24px; align-items: start; margin-top: 24px; }
@media (max-width: 860px) { .layout { grid-template-columns: 1fr; } }

.category { margin-top: 26px; }
.items { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; margin-top: 10px; }
.item {
  display: flex; flex-direction: column; gap: 4px; text-align: left; cursor: pointer;
  background: var(--paper); border: 0; border-radius: var(--radius); box-shadow: var(--shadow); padding: 14px 16px;
}
.item:hover { box-shadow: 0 0 0 2px var(--sage), var(--shadow); }
.item .name { font-weight: 700; text-transform: uppercase; color: var(--sage-dark); letter-spacing: .01em; }
.item .desc { font-size: .85rem; color: var(--muted); }
.item .price { margin-top: auto; padding-top: 6px; font-weight: 600; }
.vegan { display: inline-block; font-size: .7rem; font-weight: 700; color: var(--sage); border: 1.5px solid var(--sage); border-radius: 999px; padding: 0 6px; margin-left: 4px; vertical-align: 2px; }

/* ---------- Cart ---------- */
.cart { position: sticky; top: 16px; }
.cart-line { display: flex; justify-content: space-between; gap: 10px; padding: 10px 0; border-bottom: 1px dashed var(--sage-light); }
.cart-line .mods { font-size: .8rem; color: var(--muted); }
.cart-line .qty { display: flex; align-items: center; gap: 6px; margin-top: 4px; }
.qty button { width: 26px; height: 26px; border-radius: 50%; border: 1.5px solid var(--sage-light); background: #fff; cursor: pointer; line-height: 1; }
.totals { margin-top: 10px; font-size: .92rem; }
.totals div { display: flex; justify-content: space-between; padding: 2px 0; }
.totals .grand { font-weight: 700; font-size: 1.05rem; border-top: 1.5px solid var(--sage-light); margin-top: 6px; padding-top: 8px; }
.fee-hint { font-size: .8rem; color: var(--sage-dark); background: var(--butter); border-radius: 8px; padding: 6px 10px; margin-top: 8px; }

.mobile-bar { display: none; }
@media (max-width: 860px) {
  .cart { position: static; }
  .mobile-bar {
    display: flex; position: fixed; left: 12px; right: 12px; bottom: 12px; z-index: 5;
    justify-content: space-between; align-items: center; gap: 10px;
    background: var(--sage); color: #fff; border-radius: 999px; padding: 10px 10px 10px 20px; box-shadow: var(--shadow);
  }
  .mobile-bar .btn { background: #fff; color: var(--sage); }
  .mobile-bar[hidden] { display: none; }
  .run .time { font-size: 1.35rem; }
}

/* ---------- Item dialog ---------- */
dialog { border: 0; border-radius: 18px; padding: 0; width: min(460px, calc(100vw - 24px)); box-shadow: 0 20px 60px rgb(0 0 0 / 25%); background: var(--paper); }
dialog::backdrop { background: rgb(47 59 51 / 45%); }
.dlg-body { padding: 20px; max-height: 70vh; overflow: auto; }
.dlg-foot { display: flex; gap: 10px; align-items: center; padding: 14px 20px; border-top: 1px solid var(--sage-light); }
.opt-group { margin-top: 16px; }
.opt-group legend { font-weight: 700; font-size: .9rem; padding: 0; }
.opt-group legend .req { font-weight: 500; color: var(--muted); font-size: .8rem; margin-left: 6px; }
fieldset { border: 0; padding: 0; margin: 0; }
.opt { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 9px 12px; margin-top: 6px; border: 1.5px solid var(--sage-light); border-radius: 10px; cursor: pointer; background: #fff; }
.opt:has(input:checked) { border-color: var(--sage); background: rgb(98 129 106 / 7%); }
.opt input { accent-color: var(--sage); margin-right: 8px; }
.opt span:first-child { display: flex; align-items: center; }

/* ---------- Thanks / checkout ---------- */
.center-card { max-width: 520px; margin: 32px auto; }
.tips { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin: 10px 0 16px; }
.tips button[aria-pressed=true] { background: var(--sage); color: #fff; }
.venmo-qr { display: flex; flex-direction: column; align-items: center; margin: 16px 0 6px; text-align: center; }
.venmo-qr img { width: 180px; height: 180px; background: #fff; border-radius: 12px; padding: 6px; box-shadow: var(--shadow); }
.venmo-qr p { margin: 8px 0 0; }
.mock-banner { background: #fde8e4; color: #7a2d24; border-radius: 10px; padding: 10px 14px; font-size: .85rem; margin-bottom: 14px; }

/* ---------- Admin ---------- */
.admin-top { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; }
select { padding: 10px 12px; border-radius: 10px; border: 1.5px solid var(--sage-light); background: #fff; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 12px; margin: 16px 0; }
.stat .num { font-family: 'Bebas Neue', sans-serif; font-size: 2.2rem; color: var(--sage); line-height: 1; }
.stat .lbl { font-size: .8rem; color: var(--muted); }
.cols { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
@media (max-width: 860px) { .cols { grid-template-columns: 1fr; } }
table { width: 100%; border-collapse: collapse; font-size: .9rem; }
th, td { text-align: left; padding: 8px 6px; border-bottom: 1px solid var(--sage-light); vertical-align: top; }
th { font-size: .75rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
td.num, th.num { text-align: right; white-space: nowrap; }
.pill { display: inline-block; font-size: .72rem; font-weight: 700; border-radius: 999px; padding: 1px 8px; }
.pill.paid { background: #dfeadf; color: var(--sage-dark); }
.pill.submitted { background: var(--butter); color: #6b5512; }
.pill.pending { background: var(--butter); color: #7a6420; }
.small-btn { padding: 5px 12px; font-size: .8rem; margin-top: 4px; }
tr.waiting td { background: #fdf9e8; }
.check { width: 18px; height: 18px; accent-color: var(--sage); }

@media print {
  .hero, .no-print, .mobile-bar { display: none !important; }
  body { background: #fff; }
  .card { box-shadow: none; border: 1px solid #ccc; }
  .wrap { padding: 0; }
}
