/* Dorm Food — design system & components */
@font-face {
  font-family: 'Vazirmatn';
  src: url('/fonts/vazirmatn.woff2') format('woff2');
  font-weight: 100 900;
  font-display: swap;
}

:root {
  --bg: #fff7ef;
  --bg-2: #fdeee0;
  --surface: #ffffff;
  --surface-2: #fbf6f1;
  --text: #221a14;
  --muted: #7d7067;
  --faint: #b6aaa0;
  --border: #f0e4d8;
  --primary: #ff6a3d;
  --primary-600: #ec5225;
  --primary-50: #fff0e9;
  --primary-ink: #ffffff;
  --green: #12a150;
  --green-50: #e7f8ee;
  --red: #e5384f;
  --red-50: #fdecee;
  --amber: #e69500;
  --amber-50: #fff5dc;
  --blue: #3b6fe0;
  --blue-50: #ebf1ff;
  --lunch: #f5a524;
  --lunch-50: #fff4dd;
  --dinner: #6c5ce7;
  --dinner-50: #efecff;
  --radius: 18px;
  --radius-sm: 12px;
  --shadow-sm: 0 1px 2px rgba(60, 30, 10, 0.06);
  --shadow: 0 6px 24px -8px rgba(80, 40, 10, 0.18), 0 1px 2px rgba(60, 30, 10, 0.05);
  --shadow-lg: 0 24px 60px -20px rgba(60, 25, 5, 0.35);
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
  --spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --nav-h: 68px;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #14100d;
    --bg-2: #1b1511;
    --surface: #211a15;
    --surface-2: #2a221c;
    --text: #f6eee7;
    --muted: #b0a297;
    --faint: #6f635a;
    --border: #352b24;
    --primary-50: #3a2117;
    --green-50: #12301f;
    --red-50: #3a1a1f;
    --amber-50: #33270e;
    --blue-50: #17223d;
    --lunch-50: #352812;
    --dinner-50: #241f45;
    --shadow: 0 6px 24px -8px rgba(0, 0, 0, 0.6);
    --shadow-lg: 0 24px 60px -20px rgba(0, 0, 0, 0.8);
    color-scheme: dark;
  }
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;
}

body {
  margin: 0;
  font-family: 'Vazirmatn', Tahoma, system-ui, sans-serif;
  font-size: 15px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  min-height: 100vh;
  min-height: 100dvh;
  -webkit-font-smoothing: antialiased;
}

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

a {
  color: var(--primary-600);
  text-decoration: none;
}

h1,
h2,
h3,
h4 {
  margin: 0;
  line-height: 1.35;
}

p {
  margin: 0;
}

img,
svg {
  display: block;
}

.ltr {
  direction: ltr;
  unicode-bidi: isolate;
}

.muted {
  color: var(--muted);
}

.small {
  font-size: 13px;
}

.tiny {
  font-size: 12px;
}

.bold {
  font-weight: 700;
}

.grow {
  flex: 1;
  min-width: 0;
}

.row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.row-between {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.stack {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.wrap {
  flex-wrap: wrap;
}

.center {
  text-align: center;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--primary) 55%, transparent);
  outline-offset: 2px;
}

/* ---------- Buttons ---------- */
.btn {
  --b-bg: var(--surface-2);
  --b-fg: var(--text);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 18px;
  border: 0;
  border-radius: 14px;
  background: var(--b-bg);
  color: var(--b-fg);
  font-weight: 700;
  font-size: 15px;
  cursor: pointer;
  user-select: none;
  white-space: nowrap;
  transition: transform 0.15s var(--ease), background 0.2s, box-shadow 0.2s, opacity 0.2s;
}

.btn:active:not(:disabled) {
  transform: scale(0.96);
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn-primary {
  --b-bg: var(--primary);
  --b-fg: var(--primary-ink);
  box-shadow: 0 8px 20px -8px color-mix(in srgb, var(--primary) 70%, transparent);
}

.btn-primary:hover:not(:disabled) {
  --b-bg: var(--primary-600);
}

.btn-green {
  --b-bg: var(--green);
  --b-fg: #fff;
  box-shadow: 0 8px 20px -8px color-mix(in srgb, var(--green) 70%, transparent);
}

.btn-red {
  --b-bg: var(--red);
  --b-fg: #fff;
}

.text-red {
  color: var(--red);
}

.btn-danger {
  --b-bg: var(--red-50);
  --b-fg: var(--red);
}

.btn-ghost {
  --b-bg: transparent;
  --b-fg: var(--muted);
}

.btn-ghost:hover:not(:disabled) {
  --b-bg: var(--surface-2);
}

.btn-soft {
  --b-bg: var(--primary-50);
  --b-fg: var(--primary-600);
}

.btn-sm {
  min-height: 36px;
  padding: 0 12px;
  border-radius: 11px;
  font-size: 13.5px;
}

.btn-lg {
  min-height: 54px;
  font-size: 16.5px;
  border-radius: 16px;
}

.btn-block {
  width: 100%;
}

.icon-btn {
  display: inline-grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 13px;
  background: var(--surface-2);
  color: var(--text);
  cursor: pointer;
  transition: transform 0.15s var(--ease), background 0.2s;
  flex-shrink: 0;
}

.icon-btn:active {
  transform: scale(0.92);
}

.icon-btn:hover {
  background: var(--border);
}

.spinner {
  width: 18px;
  height: 18px;
  border: 2.5px solid currentColor;
  border-inline-end-color: transparent;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  flex-shrink: 0;
}

.spinner-lg {
  width: 34px;
  height: 34px;
  border-width: 3.5px;
  color: var(--primary);
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* ---------- Forms ---------- */
.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.field > label,
.label {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--muted);
}

.input,
.select,
.textarea {
  width: 100%;
  min-height: 48px;
  padding: 10px 14px;
  border: 1.5px solid var(--border);
  border-radius: 14px;
  background: var(--surface);
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.textarea {
  min-height: 80px;
  resize: vertical;
}

.input:focus,
.select:focus,
.textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--primary) 18%, transparent);
}

.input-lg {
  min-height: 58px;
  font-size: 20px;
  font-weight: 700;
  text-align: center;
  letter-spacing: 0.04em;
}

.input-code {
  letter-spacing: 0.5em;
  font-size: 26px;
  padding-inline-start: calc(14px + 0.5em);
}

.hint {
  font-size: 12.5px;
  color: var(--muted);
}

.form-error {
  padding: 10px 14px;
  border-radius: 12px;
  background: var(--red-50);
  color: var(--red);
  font-size: 14px;
  font-weight: 600;
  animation: shake 0.35s;
}

@keyframes shake {
  25% {
    transform: translateX(-5px);
  }
  50% {
    transform: translateX(5px);
  }
  75% {
    transform: translateX(-3px);
  }
}

.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.switch {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  user-select: none;
  font-weight: 600;
}

.switch input {
  appearance: none;
  width: 46px;
  height: 28px;
  border-radius: 99px;
  background: var(--border);
  position: relative;
  cursor: pointer;
  transition: background 0.2s;
  flex-shrink: 0;
  margin: 0;
}

.switch input::after {
  content: '';
  position: absolute;
  top: 3px;
  inset-inline-start: 3px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #fff;
  box-shadow: var(--shadow-sm);
  transition: transform 0.25s var(--spring);
}

.switch input:checked {
  background: var(--green);
}

.switch input:checked::after {
  transform: translateX(-18px);
}

/* ---------- Surfaces ---------- */
.card {
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 16px;
}

.card-flat {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 2px 10px;
  border-radius: 99px;
  font-size: 12px;
  font-weight: 700;
  background: var(--surface-2);
  color: var(--muted);
  white-space: nowrap;
}

.pill-green {
  background: var(--green-50);
  color: var(--green);
}

.pill-red {
  background: var(--red-50);
  color: var(--red);
}

.pill-amber {
  background: var(--amber-50);
  color: var(--amber);
}

.pill-blue {
  background: var(--blue-50);
  color: var(--blue);
}

.pill-primary {
  background: var(--primary-50);
  color: var(--primary-600);
}

.pill-lunch {
  background: var(--lunch-50);
  color: var(--lunch);
}

.pill-dinner {
  background: var(--dinner-50);
  color: var(--dinner);
}

.empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 8px;
  padding: 48px 20px;
  color: var(--muted);
}

.empty-emoji {
  font-size: 56px;
  line-height: 1;
  margin-bottom: 6px;
  animation: float 3s ease-in-out infinite;
}

@keyframes float {
  50% {
    transform: translateY(-8px);
  }
}

.skeleton {
  border-radius: var(--radius);
  background: linear-gradient(90deg, var(--surface-2) 25%, var(--border) 50%, var(--surface-2) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.2s infinite;
}

@keyframes shimmer {
  to {
    background-position: -200% 0;
  }
}

.progress {
  height: 8px;
  border-radius: 99px;
  background: var(--surface-2);
  overflow: hidden;
}

.progress > span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--primary);
  transition: width 0.6s var(--ease);
}

.progress.green > span {
  background: var(--green);
}

.divider {
  height: 1px;
  background: var(--border);
  margin: 4px 0;
}

/* ---------- Toasts ---------- */
.toasts {
  position: fixed;
  top: max(12px, env(safe-area-inset-top));
  left: 50%;
  transform: translateX(-50%);
  z-index: 1000;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  width: min(92vw, 420px);
  pointer-events: none;
}

.toast {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border-radius: 16px;
  background: #241c17;
  color: #fff;
  font-weight: 600;
  font-size: 14px;
  box-shadow: var(--shadow-lg);
  animation: toast-in 0.35s var(--spring);
  pointer-events: auto;
  max-width: 100%;
}

.toast-error {
  background: var(--red);
}

.toast-success {
  background: var(--green);
}

@keyframes toast-in {
  from {
    opacity: 0;
    transform: translateY(-16px) scale(0.95);
  }
}

/* ---------- Sheets / modals ---------- */
.overlay {
  position: fixed;
  inset: 0;
  z-index: 500;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  background: rgba(20, 10, 4, 0.45);
  backdrop-filter: blur(3px);
  animation: fade-in 0.2s;
}

.sheet {
  width: 100%;
  max-width: 560px;
  max-height: 92dvh;
  overflow: auto;
  overscroll-behavior: contain;
  background: var(--surface);
  border-radius: 26px 26px 0 0;
  padding: 10px 20px calc(20px + env(safe-area-inset-bottom));
  box-shadow: var(--shadow-lg);
  animation: sheet-up 0.35s var(--ease);
}

.sheet-handle {
  width: 42px;
  height: 5px;
  border-radius: 99px;
  background: var(--border);
  margin: 0 auto 12px;
}

.sheet-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 14px;
}

.sheet-head h2 {
  font-size: 18px;
}

@media (min-width: 720px) {
  .overlay {
    align-items: center;
    padding: 20px;
  }
  .sheet {
    border-radius: 26px;
    padding-bottom: 22px;
    animation: pop-in 0.3s var(--spring);
  }
  .sheet-handle {
    display: none;
  }
  .sheet-wide {
    max-width: 760px;
  }
}

@keyframes fade-in {
  from {
    opacity: 0;
  }
}

@keyframes sheet-up {
  from {
    transform: translateY(100%);
  }
}

@keyframes pop-in {
  from {
    opacity: 0;
    transform: scale(0.94);
  }
}

/* ---------- Student app shell ---------- */
.app {
  max-width: 560px;
  margin: 0 auto;
  min-height: 100dvh;
  padding-bottom: calc(var(--nav-h) + 24px + env(safe-area-inset-bottom));
}

.app.has-cart {
  padding-bottom: calc(var(--nav-h) + 100px + env(safe-area-inset-bottom));
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: calc(10px + env(safe-area-inset-top)) 16px 10px;
  background: color-mix(in srgb, var(--bg) 85%, transparent);
  backdrop-filter: saturate(1.6) blur(14px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
}

.brand-logo {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 13px;
  background: linear-gradient(140deg, #ffb347, var(--primary) 60%, #e8432f);
  font-size: 22px;
  box-shadow: 0 6px 16px -6px color-mix(in srgb, var(--primary) 80%, transparent);
  transform: rotate(-6deg);
}

.brand-name {
  font-weight: 800;
  font-size: 18px;
  letter-spacing: -0.01em;
}

.brand-sub {
  font-size: 11.5px;
  color: var(--muted);
  margin-top: -3px;
}

.avatar {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--primary-50);
  color: var(--primary-600);
  font-weight: 800;
  border: 0;
  cursor: pointer;
}

.page {
  padding: 4px 16px 16px;
  animation: page-in 0.3s var(--ease);
}

@keyframes page-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
}

.hello {
  padding: 6px 2px 14px;
}

.hello h1 {
  font-size: 23px;
  font-weight: 800;
}

.section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 22px 2px 10px;
}

.section-title h2 {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 17px;
  font-weight: 800;
}

.slot-ico {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 10px;
  font-size: 16px;
}

.slot-ico.lunch {
  background: var(--lunch-50);
}

.slot-ico.dinner {
  background: var(--dinner-50);
}

/* Day chips */
.days {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: none;
  padding: 4px 16px 10px;
  margin: 0 -16px;
  scroll-snap-type: x proximity;
}

.days::-webkit-scrollbar {
  display: none;
}

.day {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
  min-width: 70px;
  padding: 9px 10px 8px;
  border: 1.5px solid var(--border);
  border-radius: 18px;
  background: var(--surface);
  cursor: pointer;
  scroll-snap-align: start;
  transition: transform 0.2s var(--spring), background 0.2s, border-color 0.2s, color 0.2s;
}

.day:active {
  transform: scale(0.94);
}

.day-wd {
  font-size: 12px;
  color: var(--muted);
  font-weight: 600;
}

.day-num {
  font-size: 22px;
  font-weight: 800;
  line-height: 1.25;
}

.day-mon {
  font-size: 11px;
  color: var(--muted);
}

.day.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
  box-shadow: 0 10px 22px -10px var(--primary);
}

.day.active .day-wd,
.day.active .day-mon {
  color: rgba(255, 255, 255, 0.85);
}

/* Food card */
.food {
  display: flex;
  gap: 14px;
  align-items: center;
  padding: 14px;
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  transition: transform 0.2s var(--ease), opacity 0.2s;
}

.food + .food {
  margin-top: 10px;
}

.food.disabled {
  opacity: 0.6;
}

.food.in-cart {
  box-shadow: 0 0 0 2px var(--primary), var(--shadow);
}

.food-emoji {
  display: grid;
  place-items: center;
  width: 62px;
  height: 62px;
  border-radius: 18px;
  font-size: 34px;
  flex-shrink: 0;
  background: var(--primary-50);
}

.food-emoji.lunch {
  background: var(--lunch-50);
}

.food-emoji.dinner {
  background: var(--dinner-50);
}

.food-name {
  font-weight: 800;
  font-size: 15.5px;
}

.food-desc {
  font-size: 12.5px;
  color: var(--muted);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.food-price {
  font-weight: 800;
  font-size: 14.5px;
}

.food-price small {
  font-weight: 500;
  color: var(--muted);
  font-size: 11.5px;
}

.food-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin-top: 4px;
}

/* Stepper */
.stepper {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 3px;
  border-radius: 14px;
  background: var(--primary-50);
  animation: pop-in 0.25s var(--spring);
}

.stepper button {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 11px;
  background: var(--surface);
  color: var(--primary-600);
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: transform 0.12s;
}

.stepper button:active:not(:disabled) {
  transform: scale(0.88);
}

.stepper button:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.stepper .qty {
  min-width: 28px;
  text-align: center;
  font-weight: 800;
  color: var(--primary-600);
  font-size: 16px;
}

.add-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 40px;
  padding: 0 14px;
  border: 0;
  border-radius: 13px;
  background: var(--primary);
  color: #fff;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 8px 18px -8px var(--primary);
  transition: transform 0.15s;
}

.add-btn:active {
  transform: scale(0.92);
}

/* Bottom nav */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  z-index: 60;
  width: 100%;
  max-width: 560px;
  display: flex;
  justify-content: space-around;
  height: calc(var(--nav-h) + env(safe-area-inset-bottom));
  padding: 6px 10px env(safe-area-inset-bottom);
  background: color-mix(in srgb, var(--surface) 92%, transparent);
  backdrop-filter: saturate(1.6) blur(16px);
  border-top: 1px solid var(--border);
}

.nav-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  border: 0;
  background: none;
  color: var(--faint);
  font-size: 11.5px;
  font-weight: 700;
  cursor: pointer;
  border-radius: 14px;
  position: relative;
  transition: color 0.2s;
}

.nav-item .nav-ico {
  display: grid;
  place-items: center;
  width: 52px;
  height: 30px;
  border-radius: 99px;
  transition: background 0.25s, transform 0.25s var(--spring);
}

.nav-item.active {
  color: var(--primary-600);
}

.nav-item.active .nav-ico {
  background: var(--primary-50);
  transform: translateY(-1px);
}

.nav-badge {
  position: absolute;
  top: 2px;
  inset-inline-end: calc(50% - 26px);
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 99px;
  background: var(--red);
  color: #fff;
  font-size: 11px;
  line-height: 18px;
  text-align: center;
}

/* Cart bar */
.cart-bar {
  position: fixed;
  z-index: 55;
  bottom: calc(var(--nav-h) + 10px + env(safe-area-inset-bottom));
  left: 50%;
  transform: translateX(-50%);
  width: calc(100% - 24px);
  max-width: 536px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 10px 10px 16px;
  padding-inline-start: 16px;
  border-radius: 20px;
  background: #241c17;
  color: #fff;
  box-shadow: var(--shadow-lg);
  animation: cart-in 0.4s var(--spring);
  cursor: pointer;
  border: 0;
  text-align: start;
}

@keyframes cart-in {
  from {
    transform: translate(-50%, 120%);
  }
}

.cart-count {
  display: grid;
  place-items: center;
  min-width: 34px;
  height: 34px;
  padding: 0 6px;
  border-radius: 11px;
  background: var(--primary);
  font-weight: 800;
}

.cart-count.bump {
  animation: bump 0.35s var(--spring);
}

@keyframes bump {
  50% {
    transform: scale(1.25);
  }
}

.cart-total {
  font-weight: 800;
  font-size: 15px;
}

.cart-go {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 42px;
  padding: 0 16px;
  border-radius: 14px;
  background: var(--primary);
  color: #fff;
  font-weight: 800;
}

.line-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
}

.line-item + .line-item {
  border-top: 1px dashed var(--border);
}

.line-emoji {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 14px;
  background: var(--surface-2);
  font-size: 24px;
  flex-shrink: 0;
}

.total-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 0 6px;
  font-size: 17px;
  font-weight: 800;
}

/* Reservations */
.date-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 20px 2px 10px;
  font-weight: 800;
  font-size: 15px;
}

.res-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.res-card + .res-card {
  margin-top: 10px;
}

.res-card.done {
  box-shadow: none;
  border: 1px dashed var(--border);
  background: transparent;
}

.qr-btn {
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  border-radius: 17px;
  border: 0;
  background: var(--primary);
  color: #fff;
  cursor: pointer;
  flex-shrink: 0;
  box-shadow: 0 10px 22px -10px var(--primary);
  transition: transform 0.15s var(--spring);
}

.qr-btn:active {
  transform: scale(0.9) rotate(-4deg);
}

.today-badge {
  padding: 1px 9px;
  border-radius: 99px;
  background: var(--primary);
  color: #fff;
  font-size: 11.5px;
}

/* QR sheet */
.qr-wrap {
  position: relative;
  display: grid;
  place-items: center;
  margin: 8px auto 4px;
  width: 268px;
  max-width: 100%;
  aspect-ratio: 1;
  padding: 14px;
  border-radius: 24px;
  background: #fff;
  box-shadow: 0 0 0 1px var(--border), var(--shadow);
}

.qr-wrap img {
  width: 100%;
  height: 100%;
  image-rendering: pixelated;
  transition: opacity 0.25s, filter 0.25s;
}

.qr-wrap.refreshing img {
  opacity: 0.35;
  filter: blur(2px);
}

.qr-timer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: 10px;
  font-size: 13px;
  color: var(--muted);
}

.ring {
  transform: rotate(-90deg);
}

.ring circle {
  fill: none;
  stroke-width: 4;
}

.ring .ring-bg {
  stroke: var(--border);
}

.ring .ring-fg {
  stroke: var(--primary);
  stroke-linecap: round;
  transition: stroke-dashoffset 1s linear;
}

.qr-qty {
  display: inline-flex;
  align-items: baseline;
  gap: 4px;
  padding: 4px 14px;
  border-radius: 99px;
  background: var(--primary-50);
  color: var(--primary-600);
  font-weight: 800;
}

.celebrate {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 10px;
  padding: 20px 10px 6px;
}

.celebrate-ico {
  display: grid;
  place-items: center;
  width: 96px;
  height: 96px;
  border-radius: 50%;
  background: var(--green-50);
  color: var(--green);
  animation: pop-big 0.6s var(--spring);
}

.celebrate-ico.fail {
  background: var(--red-50);
  color: var(--red);
}

.celebrate-ico.wait {
  background: var(--amber-50);
  color: var(--amber);
}

@keyframes pop-big {
  0% {
    transform: scale(0.3);
    opacity: 0;
  }
  60% {
    transform: scale(1.12);
  }
}

.check-draw path {
  stroke-dasharray: 40;
  stroke-dashoffset: 40;
  animation: draw 0.5s 0.25s var(--ease) forwards;
}

@keyframes draw {
  to {
    stroke-dashoffset: 0;
  }
}

.confetti {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 900;
  overflow: hidden;
}

.confetti i {
  position: absolute;
  top: -20px;
  width: 9px;
  height: 14px;
  border-radius: 3px;
  animation: confetti-fall linear forwards;
}

@keyframes confetti-fall {
  to {
    transform: translateY(110vh) rotate(720deg);
  }
}

/* Payment result */
.result {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 12px;
  padding: 40px 10px 10px;
}

.result h1 {
  font-size: 22px;
  font-weight: 800;
}

.kv {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 0;
  font-size: 14px;
}

.kv + .kv {
  border-top: 1px dashed var(--border);
}

.kv span:first-child {
  color: var(--muted);
}

/* Login */
.login-hero {
  text-align: center;
  padding: 6px 0 16px;
}

.login-hero .brand-logo {
  width: 64px;
  height: 64px;
  font-size: 34px;
  border-radius: 20px;
  margin: 0 auto 12px;
}

.dev-code {
  padding: 8px 12px;
  border-radius: 12px;
  background: var(--amber-50);
  color: var(--amber);
  font-size: 13px;
  text-align: center;
}

.link-btn {
  border: 0;
  background: none;
  padding: 4px;
  color: var(--primary-600);
  font-weight: 700;
  cursor: pointer;
}

.link-btn:disabled {
  color: var(--faint);
  cursor: default;
}

/* Dummy gateway page */
body.gateway {
  display: grid;
  place-items: center;
  padding: 20px;
  background: linear-gradient(160deg, #e9eefc, #f8f9fe);
  color: #1c2340;
}

.gateway-card {
  width: 100%;
  max-width: 400px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 28px 22px;
  border-radius: 24px;
  background: #fff;
  box-shadow: 0 30px 60px -30px rgba(30, 40, 90, 0.45);
  text-align: center;
}

.gateway-card form {
  margin: 0;
}

.gateway-badge {
  align-self: center;
  padding: 4px 12px;
  border-radius: 99px;
  background: #fff4d6;
  color: #9a6b00;
  font-size: 12.5px;
  font-weight: 700;
}

.gateway-amount {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 16px;
  border-radius: 16px;
  background: #f2f5ff;
}

/* ---------- Admin ---------- */
.admin-shell {
  min-height: 100dvh;
  display: grid;
  grid-template-columns: 1fr;
}

.sidebar {
  display: none;
}

.admin-main {
  min-width: 0;
  padding: 0 16px calc(var(--nav-h) + 24px + env(safe-area-inset-bottom));
}

.admin-top {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: calc(12px + env(safe-area-inset-top)) 0 12px;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(14px);
}

.admin-top h1 {
  font-size: 21px;
  font-weight: 800;
}

.admin-nav {
  position: fixed;
  bottom: 0;
  inset-inline: 0;
  z-index: 60;
  display: flex;
  gap: 2px;
  overflow-x: auto;
  scrollbar-width: none;
  height: calc(var(--nav-h) + env(safe-area-inset-bottom));
  padding: 6px 6px env(safe-area-inset-bottom);
  background: color-mix(in srgb, var(--surface) 94%, transparent);
  backdrop-filter: blur(16px);
  border-top: 1px solid var(--border);
}

.admin-nav .nav-item {
  min-width: 64px;
}

@media (min-width: 960px) {
  .admin-shell {
    grid-template-columns: 250px 1fr;
  }
  .sidebar {
    position: sticky;
    top: 0;
    height: 100dvh;
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 20px 14px;
    background: var(--surface);
    border-inline-end: 1px solid var(--border);
  }
  .sidebar .brand {
    padding: 0 8px 18px;
  }
  .side-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 11px 14px;
    border: 0;
    border-radius: 14px;
    background: none;
    color: var(--muted);
    font-weight: 700;
    cursor: pointer;
    text-align: start;
    transition: background 0.2s, color 0.2s;
  }
  .side-item:hover {
    background: var(--surface-2);
    color: var(--text);
  }
  .side-item.active {
    background: var(--primary-50);
    color: var(--primary-600);
  }
  .admin-nav {
    display: none;
  }
  .admin-main {
    padding: 0 32px 40px;
  }
}

.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
}

.stat {
  padding: 16px;
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.stat-label {
  font-size: 13px;
  color: var(--muted);
  font-weight: 600;
}

.stat-value {
  font-size: 24px;
  font-weight: 800;
  margin-top: 2px;
}

.stat-ico {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 12px;
  margin-bottom: 8px;
  font-size: 20px;
}

/* Week planner */
.week-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 14px;
}

.week-title {
  font-weight: 800;
  font-size: 15.5px;
  text-align: center;
}

.week-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

@media (min-width: 700px) {
  .week-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1200px) {
  .week-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (min-width: 1600px) {
  .week-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

.day-col {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 14px;
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.day-col.past {
  opacity: 0.65;
}

.day-col.today {
  box-shadow: 0 0 0 2px var(--primary), var(--shadow);
}

.slot-box {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 10px;
  border-radius: 14px;
  background: var(--surface-2);
}

.slot-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 13px;
  font-weight: 800;
  color: var(--muted);
}

.mini-meal {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
  border: 0;
  border-radius: 12px;
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  text-align: start;
  width: 100%;
  transition: transform 0.15s var(--ease), box-shadow 0.2s;
}

.mini-meal:hover {
  box-shadow: var(--shadow);
}

.mini-meal:active {
  transform: scale(0.98);
}

.mini-meal.inactive {
  opacity: 0.55;
}

.mini-emoji {
  font-size: 24px;
  line-height: 1;
}

.add-slot {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 38px;
  border: 1.5px dashed var(--faint);
  border-radius: 12px;
  background: none;
  color: var(--muted);
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
  transition: border-color 0.2s, color 0.2s, background 0.2s;
}

.add-slot:hover {
  border-color: var(--primary);
  color: var(--primary-600);
  background: var(--primary-50);
}

.emoji-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(44px, 1fr));
  gap: 6px;
}

.emoji-opt {
  display: grid;
  place-items: center;
  height: 44px;
  border: 2px solid transparent;
  border-radius: 12px;
  background: var(--surface-2);
  font-size: 24px;
  cursor: pointer;
  transition: transform 0.15s var(--spring), border-color 0.2s;
}

.emoji-opt:active {
  transform: scale(0.88);
}

.emoji-opt.active {
  border-color: var(--primary);
  background: var(--primary-50);
}

.segmented {
  display: flex;
  padding: 4px;
  border-radius: 14px;
  background: var(--surface-2);
  gap: 4px;
}

.segmented button {
  flex: 1;
  min-height: 40px;
  border: 0;
  border-radius: 11px;
  background: none;
  font-weight: 700;
  color: var(--muted);
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}

.segmented button.active {
  background: var(--surface);
  color: var(--text);
  box-shadow: var(--shadow-sm);
}

/* Tables / lists */
.list {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.list-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
}

.list-row + .list-row {
  border-top: 1px solid var(--border);
}

.toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 14px;
}

.toolbar .input,
.toolbar .select {
  min-height: 44px;
}

/* Scanner */
.scanner {
  position: relative;
  width: 100%;
  max-width: 520px;
  aspect-ratio: 1;
  margin: 0 auto;
  border-radius: 26px;
  overflow: hidden;
  background: #0d0a08;
  box-shadow: var(--shadow-lg);
}

.scanner video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.scan-frame {
  position: absolute;
  inset: 16%;
  border-radius: 22px;
  box-shadow: 0 0 0 999px rgba(0, 0, 0, 0.35);
  pointer-events: none;
}

.scan-frame::before,
.scan-frame::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  border: 3px solid rgba(255, 255, 255, 0.9);
  mask: linear-gradient(#000 0 0) top / 100% 28% no-repeat, linear-gradient(#000 0 0) bottom / 100% 28% no-repeat;
}

.scan-frame::after {
  mask: linear-gradient(#000 0 0) left / 28% 100% no-repeat, linear-gradient(#000 0 0) right / 28% 100% no-repeat;
}

.scan-line {
  position: absolute;
  inset-inline: 18%;
  top: 18%;
  height: 3px;
  border-radius: 99px;
  background: var(--primary);
  box-shadow: 0 0 18px 4px var(--primary);
  animation: scan 2.2s ease-in-out infinite alternate;
}

@keyframes scan {
  to {
    top: 82%;
  }
}

.scanner-msg {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 24px;
  color: #fff;
  text-align: center;
}

.scan-result {
  max-width: 520px;
  margin: 14px auto 0;
  padding: 18px;
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-lg);
  border-top: 6px solid var(--green);
  animation: pop-in 0.3s var(--spring);
}

.scan-result.warn {
  border-top-color: var(--amber);
}

.scan-result.error {
  border-top-color: var(--red);
}

.scan-result.done {
  border-top-color: var(--green);
  background: var(--green-50);
}

.scan-name {
  font-size: 22px;
  font-weight: 800;
}

.scan-qty {
  display: grid;
  place-items: center;
  min-width: 84px;
  height: 84px;
  padding: 0 10px;
  border-radius: 22px;
  background: var(--primary-50);
  color: var(--primary-600);
  font-size: 40px;
  font-weight: 900;
  line-height: 1;
}

.scan-qty small {
  font-size: 12px;
  font-weight: 700;
}

.login-page {
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: 20px;
  background: radial-gradient(circle at 20% 10%, var(--bg-2), var(--bg) 60%);
}

.login-card {
  width: 100%;
  max-width: 400px;
  padding: 28px 22px;
  border-radius: 26px;
  background: var(--surface);
  box-shadow: var(--shadow-lg);
}

.not-found {
  padding: 80px 20px;
}

/* ---------- Add-ons ---------- */
.meal-grid {
  display: grid;
  gap: 10px;
}

.meal-grid .food + .food {
  margin-top: 0;
}

.food-actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}

.add-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.in-cart-count {
  font-size: 11.5px;
  font-weight: 800;
  color: var(--primary-600);
}

.pill-soft {
  background: var(--primary-50);
  color: var(--primary-600);
}

.addon-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: -4px 0 14px;
}

.addon-group {
  margin: 0 0 14px;
  padding: 12px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  min-width: 0;
  transition: border-color 0.2s;
}

.addon-group legend {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  padding: 0 6px;
}

.addon-group.missing {
  border-color: var(--red);
  animation: shake 0.4s;
}

.addon-opt {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background 0.15s;
}

.addon-opt + .addon-opt {
  margin-top: 4px;
}

.addon-opt:hover {
  background: var(--surface-2);
}

.addon-opt.active {
  background: var(--primary-50);
}

.addon-opt input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.addon-opt input:focus-visible + span {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

.addon-radio,
.addon-check {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  flex-shrink: 0;
  border: 2px solid var(--faint);
  background: var(--surface);
  color: transparent;
  transition: all 0.15s;
}

.addon-radio {
  border-radius: 50%;
}

.addon-check {
  border-radius: 7px;
}

.addon-opt.active .addon-radio {
  border: 7px solid var(--primary);
}

.addon-opt.active .addon-check {
  border-color: var(--primary);
  background: var(--primary);
  color: #fff;
}

.addon-price {
  font-size: 13px;
  font-weight: 700;
  color: var(--muted);
  white-space: nowrap;
}

.addon-opt.active .addon-price {
  color: var(--primary-600);
}

.stepper-sm button {
  width: 28px;
  height: 28px;
}

.stepper-sm .qty {
  min-width: 22px;
  font-size: 14px;
}

.addon-foot {
  position: sticky;
  bottom: calc(-20px - env(safe-area-inset-bottom));
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 4px -20px calc(-20px - env(safe-area-inset-bottom));
  padding: 12px 20px calc(16px + env(safe-area-inset-bottom));
  background: var(--surface);
  border-top: 1px solid var(--border);
}

.line-addons {
  margin-top: 3px;
  font-size: 12.5px;
  color: var(--muted);
  line-height: 1.7;
}

.line-addons b {
  color: var(--text);
}

.line-addons.refunded {
  text-decoration: line-through;
  opacity: 0.6;
}

.line-addons.center {
  text-align: center;
  margin-top: 8px;
}

/* Admin: add-on editor and scan details */
.addon-edit {
  padding: 12px;
  margin-bottom: 10px;
  border: 1.5px dashed var(--border);
  border-radius: var(--radius);
  background: var(--surface-2);
}

.addon-edit-head,
.addon-edit-row {
  display: flex;
  align-items: center;
  gap: 6px;
}

.addon-edit-head {
  margin: 10px 0 4px;
}

.addon-edit-row + .addon-edit-row {
  margin-top: 6px;
}

.addon-edit .input {
  min-width: 0;
}

/* Narrow phones: the option name gets its own full-width line, price and maximum below it. */
@media (max-width: 480px) {
  .addon-edit-row {
    flex-wrap: wrap;
  }
  .addon-edit-row > .input.grow {
    flex: 1 0 100%;
    order: -1;
  }
  .addon-edit-row .col-price {
    flex: 1 1 auto;
  }
  .addon-edit-head .col-price,
  .addon-edit-head .col-max {
    display: none;
  }
  .addon-edit-head .grow::after {
    content: ' · قیمت (تومان) · حداکثر در هر پرس';
  }
  .addon-edit-head.req .grow::after {
    content: ' · قیمت (تومان)';
  }
}

.col-price {
  width: 104px;
  flex-shrink: 0;
}

.col-max {
  width: 76px;
  flex-shrink: 0;
}

.addon-edit-head .col-max,
.addon-edit-head .col-price {
  line-height: 1.3;
}

.scan-addons {
  margin-top: 12px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  background: var(--amber-50);
  color: var(--text);
  font-size: 15.5px;
  line-height: 1.8;
}

/* ---------- Auth ---------- */
.captcha-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.captcha-img {
  display: grid;
  place-items: center;
  width: 180px;
  height: 64px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: #f4eee6;
  border: 1px solid var(--border);
}

.captcha-img img {
  display: block;
  width: 180px;
  height: 64px;
}

.captcha-input {
  letter-spacing: 0.35em;
  text-align: center;
  font-weight: 800;
}

.password-field {
  position: relative;
}

/* The password is typed left-to-right; the show/hide toggle sits at its right edge. */
.password-field .input {
  padding-right: 48px;
  padding-left: 14px;
  text-align: left;
}

.pw-toggle {
  position: absolute;
  top: 50%;
  right: 6px;
  transform: translateY(-50%);
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}

.auth-switch {
  text-align: center;
  font-size: 14px;
  color: var(--muted);
}

.res-grid {
  display: grid;
  gap: 10px;
}

.res-grid .res-card + .res-card {
  margin-top: 0;
}

/* ---------- Student desktop layout ---------- */
.top-nav {
  display: flex;
  gap: 4px;
  padding: 4px;
  border-radius: 16px;
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.top-nav-item {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 9px 16px;
  border-radius: 12px;
  color: var(--muted);
  font-weight: 700;
  font-size: 14.5px;
  transition: background 0.15s, color 0.15s;
}

.top-nav-item:hover {
  color: var(--text);
  background: var(--surface-2);
}

.top-nav-item.active {
  color: var(--primary-600);
  background: var(--primary-50);
}

.topbar-end {
  min-width: 40px;
}

.cart-panel {
  position: sticky;
  top: 84px;
  align-self: start;
  max-height: calc(100dvh - 104px);
  overflow: auto;
  padding: 16px 18px;
  background: var(--surface);
  border-radius: 22px;
  box-shadow: var(--shadow);
}

.cart-panel-head {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 800;
  font-size: 16px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 4px;
}

.cart-panel-head .pill {
  margin-inline-start: auto;
}

.cart-empty {
  padding: 26px 0 12px;
  text-align: center;
}

.cart-empty .empty-emoji {
  font-size: 40px;
}

.account-layout {
  display: grid;
  gap: 0;
  grid-template-areas: 'profile' 'location' 'orders' 'security';
  margin-top: 6px;
}

.acc-location {
  grid-area: location;
  margin-top: 12px;
}

.loc-ico {
  font-size: 22px;
  line-height: 1;
}

/* Which location's menu is shown */
.loc-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  margin-bottom: 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-sm);
}

.loc-bar label {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.loc-select {
  padding-block: 6px;
  font-weight: 700;
}

.loc-bar.away {
  border-color: var(--amber);
  background: var(--amber-50);
}

.loc-note {
  flex-basis: 100%;
  font-size: 13px;
  color: var(--text);
}

.acc-profile {
  grid-area: profile;
}

.acc-orders {
  grid-area: orders;
  min-width: 0;
}

.acc-security {
  grid-area: security;
  min-width: 0;
}

@media (min-width: 960px) {
  /* Below the top bar's navigation, not over it. */
  .toasts {
    top: 84px;
  }
  .app {
    max-width: 1180px;
    padding-bottom: 40px;
  }
  .app.has-cart {
    padding-bottom: 40px;
  }
  .topbar {
    padding: 14px 24px;
  }
  .page {
    padding: 8px 24px 24px;
  }
  .page-wide .hello h1 {
    font-size: 27px;
  }
  .menu-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    gap: 28px;
    align-items: start;
  }
  .meal-grid {
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 14px;
  }
  .meal-grid .food {
    align-items: flex-start;
    height: 100%;
  }
  .meal-grid .food .food-actions,
  .meal-grid .food .stepper {
    align-self: center;
  }
  .res-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
  }
  .account-layout {
    grid-template-columns: 360px minmax(0, 1fr);
    grid-template-areas: 'profile orders' 'location orders' 'security orders';
    grid-template-rows: auto auto 1fr;
    column-gap: 28px;
    align-items: start;
  }
  .acc-orders .section-title:first-child {
    margin-top: 0;
  }
  .days {
    flex-wrap: wrap;
    overflow: visible;
    margin: 0;
    padding: 4px 0 10px;
  }
  .result {
    max-width: 640px;
    margin-inline: auto;
  }
  .page > .card,
  .page > .stack {
    max-width: 640px;
    margin-inline: auto;
  }
}

@media (min-width: 1280px) {
  .res-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

.nowrap {
  white-space: nowrap;
}

/* --- delivery locations (admin) --- */
.loc-picker {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.plan-loc {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 12px 14px;
  margin-bottom: 12px;
}

.serve-loc {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-width: 520px;
  margin: 0 auto 12px;
  padding: 12px 14px;
}

.serve-loc.missing {
  border: 2px solid var(--amber);
  background: var(--amber-50);
}

/* --- order report (admin and viewer) --- */
.report-days {
  margin: 0;
  padding: 4px 0 6px;
}

.report-loc {
  font-size: 16px;
  margin-top: 6px;
}

.report-row {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 10px 0;
  border-top: 1px solid var(--border);
}

.report-qty {
  font-size: 28px;
  font-weight: 800;
  line-height: 1;
  text-align: center;
  min-width: 64px;
}

.report-qty small {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
}

.report-addons {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
