:root {
  --brand: #E4572E;
  --on-brand: #fff;
  --brand-soft: color-mix(in srgb, var(--brand) 10%, #fff);
  --brand-line: color-mix(in srgb, var(--brand) 28%, #fff);
  --bg: #F6F5F3;
  --card: #FFFFFF;
  --ink: #1A1A1A;
  --ink-2: #57534E;
  --ink-3: #8A8580;
  --line: #E7E5E1;
  --line-2: #F0EEEA;
  --green: #15803D;
  --green-soft: #E9F7EE;
  --red: #C42B1C;
  --red-soft: #FDECEA;
  --amber: #B45309;
  --amber-soft: #FEF3E2;
  --blue: #1D4ED8;
  --blue-soft: #EAF0FE;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 1px 2px rgba(20, 16, 10, .06), 0 4px 16px rgba(20, 16, 10, .06);
  --shadow-lg: 0 10px 40px rgba(20, 16, 10, .18);
  --font: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--font); color: var(--ink); background: var(--bg); font-size: 15px; line-height: 1.45; -webkit-font-smoothing: antialiased; }
img { display: block; max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: inherit; }
.ic { flex: none; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 18px; border-radius: 12px; border: 1px solid var(--line); background: var(--card); font-weight: 650; font-size: 15px; text-decoration: none; transition: transform .08s, background .15s, box-shadow .15s; white-space: nowrap; }
.btn:active { transform: scale(.98); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-primary { background: var(--brand); border-color: var(--brand); color: var(--on-brand); }
.btn-primary:hover { box-shadow: 0 4px 14px color-mix(in srgb, var(--brand) 35%, transparent); }
.btn-dark { background: var(--ink); border-color: var(--ink); color: #fff; }
.btn-ghost { background: transparent; border-color: transparent; }
.btn-ghost:hover { background: var(--line-2); }
.btn-danger { color: var(--red); }
.btn-danger:hover { background: var(--red-soft); border-color: var(--red-soft); }
.btn-lg { min-height: 54px; font-size: 16px; border-radius: 14px; padding: 0 22px; }
.btn-sm { min-height: 36px; padding: 0 12px; font-size: 14px; border-radius: 10px; }
.btn-block { width: 100%; }
.icon-btn { display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; border: 1px solid var(--line); background: var(--card); }

/* form fields */
.field { display: grid; gap: 6px; }
.field > span { font-size: 13px; font-weight: 650; color: var(--ink-2); }
.field small { color: var(--ink-3); font-size: 12.5px; }
.input, .select, .textarea { width: 100%; min-height: 46px; padding: 11px 14px; border: 1.5px solid var(--line); border-radius: 12px; background: #fff; outline: none; transition: border-color .15s, box-shadow .15s; font-size: 15px; }
.textarea { min-height: 84px; resize: vertical; }
.input:focus, .select:focus, .textarea:focus { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }

/* switch */
.switch { position: relative; display: inline-flex; align-items: center; gap: 10px; cursor: pointer; user-select: none; font-weight: 600; font-size: 14px; }
.switch input { position: absolute; opacity: 0; pointer-events: none; }
.switch .track { width: 44px; height: 26px; border-radius: 99px; background: #D6D3CE; position: relative; transition: background .2s; flex: none; }
.switch .track::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.25); transition: transform .2s; }
.switch input:checked + .track { background: var(--green); }
.switch input:checked + .track::after { transform: translateX(18px); }
.switch input:focus-visible + .track { outline: 3px solid var(--brand-soft); }

/* diet marks */
.diet { display: inline-grid; place-items: center; width: 16px; height: 16px; border: 1.6px solid; border-radius: 3px; flex: none; }
.diet i { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.diet.veg { color: #16A34A; }
.diet.nonveg { color: #B91C1C; }
.diet.nonveg i { width: 0; height: 0; border-radius: 0; background: none; border-left: 4.5px solid transparent; border-right: 4.5px solid transparent; border-bottom: 8px solid currentColor; }
.diet.egg { color: #CA8A04; }

/* chips & badges */
.badge { display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border-radius: 99px; font-size: 12px; font-weight: 700; line-height: 1.5; }
.badge-brand { background: var(--brand-soft); color: color-mix(in srgb, var(--brand) 80%, #000); }
.badge-green { background: var(--green-soft); color: var(--green); }
.badge-red { background: var(--red-soft); color: var(--red); }
.badge-amber { background: var(--amber-soft); color: var(--amber); }
.badge-blue { background: var(--blue-soft); color: var(--blue); }
.badge-grey { background: var(--line-2); color: var(--ink-2); }

/* sheets / modals */
.overlay { position: fixed; inset: 0; background: rgba(15, 12, 8, .45); z-index: 60; display: flex; align-items: flex-end; justify-content: center; animation: fade .18s ease; }
.sheet { background: var(--card); width: 100%; max-width: 560px; max-height: 92vh; border-radius: 24px 24px 0 0; overflow: auto; animation: up .24s cubic-bezier(.2,.8,.2,1); box-shadow: var(--shadow-lg); }
@media (min-width: 720px) { .overlay.center { align-items: center; } .overlay.center .sheet { border-radius: 22px; } }
.sheet-head { position: sticky; top: 0; z-index: 2; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 18px 20px 12px; background: var(--card); }
.sheet-head h2, .sheet-head h3 { margin: 0; font-size: 19px; }
.sheet-body { padding: 4px 20px 20px; }
.sheet-foot { position: sticky; bottom: 0; padding: 14px 20px calc(14px + env(safe-area-inset-bottom)); background: var(--card); border-top: 1px solid var(--line-2); }
@keyframes up { from { transform: translateY(40px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }

/* toasts */
.toasts { position: fixed; left: 50%; top: 16px; transform: translateX(-50%); z-index: 100; display: grid; gap: 8px; width: min(92vw, 420px); pointer-events: none; }
.toast { pointer-events: auto; background: var(--ink); color: #fff; padding: 12px 16px; border-radius: 14px; box-shadow: var(--shadow-lg); font-weight: 600; font-size: 14px; display: flex; gap: 10px; align-items: center; animation: drop .25s ease; }
.toast.error { background: var(--red); }
.toast.ok { background: #14532D; }
@keyframes drop { from { transform: translateY(-12px); opacity: 0; } to { transform: none; opacity: 1; } }

.muted { color: var(--ink-3); }
.empty { text-align: center; color: var(--ink-3); padding: 40px 16px; }
.empty .ic { color: #C9C5BF; margin: 0 auto 10px; }
