:root {
  --ink: #12211b;
  --muted: #68756f;
  --paper: #f4f1e8;
  --card: #fffdf7;
  --line: #d9d7cd;
  --lime: #c9f27b;
  --orange: #ef7f4d;
  --shadow: 0 18px 50px rgba(18, 33, 27, .10);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--paper);
  font-synthesis: none;
}

* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; background: var(--paper); }
button, input, textarea { font: inherit; }
button { cursor: pointer; }

.guest-shell { width: min(100% - 32px, 680px); margin: 0 auto; padding: 28px 0 72px; }
.eyebrow { margin: 0 0 10px; color: #56783f; font-size: 12px; font-weight: 850; letter-spacing: .15em; }
.bar-header h1 { margin: 0; font-family: Georgia, "Times New Roman", serif; font-size: clamp(46px, 9vw, 76px); font-weight: 500; line-height: .98; letter-spacing: -.055em; }
.order-card { display: grid; gap: 34px; padding: clamp(22px, 5vw, 42px); border: 1px solid rgba(18, 33, 27, .08); border-radius: 26px; background: var(--card); box-shadow: var(--shadow); }
.field { display: grid; gap: 10px; }
.field > span, legend { font-weight: 800; }
.field small { color: var(--muted); font-weight: 500; }
input[type="text"], input:not([type]), textarea { width: 100%; border: 1px solid var(--line); border-radius: 13px; background: #fff; padding: 15px 16px; color: var(--ink); outline: 0; transition: border-color .2s, box-shadow .2s; }
textarea { resize: vertical; }
input:focus, textarea:focus { border-color: #6c8f53; box-shadow: 0 0 0 4px rgba(117, 155, 86, .14); }
fieldset { min-width: 0; margin: 0; padding: 0; border: 0; }
legend { margin-bottom: 13px; }
.choice-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
.choice { position: relative; }
.choice input { position: absolute; opacity: 0; pointer-events: none; }
.choice span { display: flex; align-items: center; min-height: 51px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 13px; background: #fff; font-size: 14px; font-weight: 650; transition: .18s ease; }
.choice span::before { content: ''; width: 17px; height: 17px; margin-right: 10px; border: 1.5px solid #98a19d; border-radius: 50%; box-shadow: inset 0 0 0 4px #fff; }
.choice input:checked + span { border-color: var(--ink); background: #eff7df; box-shadow: inset 0 0 0 1px var(--ink); }
.choice input:checked + span::before { background: var(--ink); border-color: var(--ink); }
.choice input:focus-visible + span { outline: 3px solid rgba(117, 155, 86, .35); outline-offset: 2px; }
.primary-button { display: flex; justify-content: space-between; align-items: center; width: 100%; border: 0; border-radius: 14px; background: var(--ink); color: #fff; padding: 17px 20px; font-weight: 800; transition: transform .15s, opacity .15s; }
.primary-button:hover { transform: translateY(-1px); }
.primary-button:disabled { cursor: wait; opacity: .6; }
.form-message { min-height: 18px; margin: -21px 0 0; color: #a43b26; font-size: 14px; }
dialog { width: min(90vw, 440px); padding: 38px; border: 0; border-radius: 24px; background: var(--card); color: var(--ink); text-align: center; box-shadow: var(--shadow); }
dialog::backdrop { background: rgba(18, 33, 27, .72); backdrop-filter: blur(5px); }
dialog h2 { margin: 8px 0; font-family: Georgia, serif; font-size: 40px; font-weight: 500; }
dialog > p:not(.eyebrow) { margin: 0 0 28px; color: var(--muted); line-height: 1.6; }
.success-icon { display: grid; place-items: center; width: 62px; height: 62px; margin: 0 auto 24px; border-radius: 50%; background: var(--lime); font-size: 28px; }

.bar-page { background: #e8e7df; }
.bar-shell { width: min(100% - 32px, 1180px); margin: 0 auto; padding: 40px 0 80px; }
.bar-header { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; }
.bar-header h1 { font-size: clamp(42px, 7vw, 68px); }
.live-pill { display: flex; align-items: center; gap: 8px; padding: 9px 13px; border-radius: 999px; background: rgba(255,255,255,.7); font-size: 13px; font-weight: 750; }
.live-pill span { width: 8px; height: 8px; border-radius: 50%; background: #5c9b45; box-shadow: 0 0 0 4px rgba(92,155,69,.15); }
.filters { display: flex; gap: 8px; margin: 38px 0 22px; overflow-x: auto; }
.filters button { flex: 0 0 auto; border: 1px solid rgba(18,33,27,.14); border-radius: 999px; background: transparent; padding: 10px 16px; color: var(--ink); font-size: 14px; font-weight: 750; }
.filters button.active { border-color: var(--ink); background: var(--ink); color: #fff; }
.filters span { display: inline-grid; place-items: center; min-width: 20px; height: 20px; margin-left: 5px; border-radius: 50%; background: var(--lime); color: var(--ink); font-size: 11px; }
.orders { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 15px; }
.order-item { display: flex; flex-direction: column; min-height: 300px; padding: 24px; border-radius: 19px; background: var(--card); box-shadow: 0 8px 30px rgba(18,33,27,.06); }
.status-ready { box-shadow: inset 0 4px 0 var(--lime), 0 8px 30px rgba(18,33,27,.06); }
.order-heading { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.order-heading h2 { margin: 0; font-size: 21px; }
.order-heading time { display: block; margin-top: 3px; color: var(--muted); font-size: 12px; }
.status-badge { padding: 6px 8px; border-radius: 7px; background: #ecece6; font-size: 10px; font-weight: 850; letter-spacing: .08em; text-transform: uppercase; }
.status-making .status-badge { background: #ffe1d1; color: #893b1d; }
.status-ready .status-badge { background: #e5f6c1; color: #3e6723; }
.order-item h3 { margin: 28px 0 8px; font-family: Georgia, serif; font-size: 28px; font-weight: 500; }
.order-details { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.5; }
.order-notes { margin: 16px 0 0; padding: 12px; border-left: 3px solid var(--orange); background: #fff3e9; color: #684636; font-size: 13px; line-height: 1.45; }
.order-action { width: 100%; margin-top: auto; border: 1px solid var(--ink); border-radius: 11px; background: transparent; padding: 12px; color: var(--ink); font-weight: 800; }
.order-action:hover { background: var(--ink); color: #fff; }
.empty-state { grid-column: 1 / -1; padding: 90px 20px; color: var(--muted); text-align: center; }
.empty-state span { font-size: 38px; }
.empty-state h2 { margin: 12px 0 5px; color: var(--ink); }
.empty-state p { margin: 0; }

@media (max-width: 850px) { .orders { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) {
  .guest-shell, .bar-shell { width: min(100% - 22px, 680px); }
  .order-card { border-radius: 20px; }
  .choice-grid { grid-template-columns: 1fr; }
  .orders { grid-template-columns: 1fr; }
  .order-item { min-height: 280px; }
}

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; } }
