/* Shared design system — A+B direction: Midnight Navy / Champagne Gold / Warm Ivory, Alexandria (Arabic + Latin).
   Shop pages may override --brand / --accent at runtime with the shop's own colors; everything else stays on-brand.
   Contrast rules (WCAG, checked by brand-candidates/orivela-v2/audit.mjs): gold is never text on ivory (1.6:1) —
   on light surfaces the gold role uses --gold-ink (#7D5F28); gold text only on navy (9.9:1). */
@font-face { font-family: 'Alexandria'; font-style: normal; font-weight: 300 600; font-display: swap; src: url(/fonts/alexandria-arabic.woff2) format('woff2');
  unicode-range: U+0600-06FF, U+0750-077F, U+0870-0891, U+0897-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC; }
@font-face { font-family: 'Alexandria'; font-style: normal; font-weight: 300 600; font-display: swap; src: url(/fonts/alexandria-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
:root {
  --navy: #101820; --navy-2: #18222D; --navy-3: #1E2935; --gold: #D9BD89; --gold-ink: #7D5F28; --ivory: #F3F0E9; --paper: #FBFAF6;
  --brand: var(--navy); --on-brand: var(--ivory); --accent: var(--navy); --on-accent: var(--ivory);
  --bg: var(--ivory); --surface: #FFFFFF; --surface-2: var(--paper); --ink: var(--navy); --ink-2: #4A5260; --line: #DCD5C6;
  --ok: #1F6B4E; --ok-bg: #E6F0EB; --warn: #8A4B0F; --warn-bg: #F6E9D8; --danger: #A1281F; --danger-bg: #F8E3E0;
  --info: var(--navy); --info-bg: #E7E9EC;
  --r-sm: 10px; --r: 18px; --r-lg: 24px;
  --sh: 0 1px 2px rgba(16,24,32,.05), 0 8px 24px -12px rgba(16,24,32,.12);
  --font: 'Alexandria', -apple-system, BlinkMacSystemFont, "SF Arabic", "Segoe UI", Tahoma, sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root { --bg: var(--navy); --surface: var(--navy-2); --surface-2: var(--navy-3); --ink: var(--ivory); --ink-2: #AEB5BF; --line: rgba(243,240,233,.12);
    --gold-ink: var(--gold); --accent: var(--gold); --on-accent: var(--navy);
    --ok: #8FD1B3; --ok-bg: #15302A; --warn: #E8B98A; --warn-bg: #33261A; --danger: #F2A69E; --danger-bg: #3A1D1B;
    --info: var(--ivory); --info-bg: var(--navy-3); --sh: 0 1px 2px rgba(0,0,0,.4); color-scheme: dark; }
}
* { box-sizing: border-box; }
/* clip (not hidden): stops sideways overflow without turning <body> into its own scroll box,
   which on iPhone breaks momentum scrolling and tap-status-bar-to-top on long pages */
html, body { margin: 0; overflow-x: clip; }
body { font-family: var(--font); background: var(--bg); color: var(--ink); font-size: 16px; line-height: 1.65; font-weight: 400;
  -webkit-tap-highlight-color: transparent; -webkit-text-size-adjust: 100%; }
h1, h2, h3, b, strong { font-weight: 500; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; touch-action: manipulation; }
:focus-visible { outline: 2px solid var(--gold-ink); outline-offset: 2px; border-radius: 6px; }
[hidden] { display: none !important; }
.num { font-variant-numeric: tabular-nums; direction: ltr; unicode-bidi: isolate; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* brand mark (same everywhere): ivory ring + champagne arc */
.mark { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; direction: ltr; letter-spacing: .28em; font-size: 14px; font-weight: 500; text-decoration: none; color: inherit; }
.mark svg { flex: none; }
.mark .wm { display: inline; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 46px; padding: 0 18px;
  border-radius: 14px; border: 1px solid var(--line); background: var(--surface); font-size: 15px; font-weight: 500; text-decoration: none; transition: transform .12s ease-out, background .2s, opacity .15s; }
.btn:active { transform: scale(.97); }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn.primary { background: var(--accent); color: var(--on-accent); border-color: transparent; }
.btn.gold { background: var(--gold); color: var(--navy); border-color: transparent; }
.btn.danger { color: var(--danger); border-color: var(--danger-bg); background: var(--danger-bg); }
.btn.ghost { background: transparent; border-color: transparent; }
.btn.sm { min-height: 44px; padding: 0 14px; font-size: 14px; }
.btn.pill { border-radius: 999px; }
.field { display: grid; gap: 6px; }
.field label { font-size: 14px; color: var(--ink-2); }
.input { width: 100%; min-height: 50px; border-radius: 14px; border: 1px solid var(--line); background: var(--surface); padding: 0 14px; font-size: 16px; }
.input:focus { border-color: var(--ink); outline: none; box-shadow: 0 0 0 3px rgba(16,24,32,.10); }
textarea.input { padding: 12px 14px; min-height: 84px; resize: vertical; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 16px; box-shadow: var(--sh); }
.tag { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 500; border-radius: 999px; padding: 3px 10px; white-space: nowrap; }
.tag.new { background: var(--navy); color: var(--gold); }
.tag.confirmed, .tag.handoff { background: var(--warn-bg); color: var(--warn); }
.tag.out_for_delivery { background: var(--info-bg); color: var(--info); }
.tag.delivered, .tag.ordered { background: var(--ok-bg); color: var(--ok); }
.tag.cancelled { background: var(--danger-bg); color: var(--danger); }
.tag.bot { background: var(--surface-2); color: var(--ink-2); border: 1px solid var(--line); }
.toast { position: fixed; inset-inline: 16px; bottom: calc(env(safe-area-inset-bottom) + 84px); max-width: 440px; margin: 0 auto; z-index: 100;
  background: var(--navy); color: var(--ivory); border-radius: 14px; padding: 12px 16px; font-size: 15px; box-shadow: var(--sh); animation: up .2s ease-out; }
.toast.err { background: var(--danger); color: #fff; }
@keyframes up { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }
.logo { width: 44px; height: 44px; border-radius: 50%; flex: none; display: grid; place-items: center; overflow: hidden;
  background: var(--ivory); color: var(--navy); font-weight: 600; font-size: 18px; }
.logo img { width: 100%; height: 100%; object-fit: cover; }
.empty { color: var(--ink-2); text-align: center; padding: 28px 16px; font-size: 15px; }
