:root {
  --navy: #1A3062; --navy-d: #0D213C; --orange: #E2582C; --orange-l: #FDEDE6;
  --bg: #F3F5FA; --card: #fff; --ink: #18213A; --muted: #6B7590; --line: #E3E7F0;
  --ok: #1E8E5A; --ok-l: #E4F5EC; --warn: #B76E00; --warn-l: #FFF3DC; --bad: #C0392B; --bad-l: #FDE8E6;
  --r: 16px;
}
@media (prefers-color-scheme: dark) {
  :root { --bg: #0B1426; --card: #14203A; --ink: #EEF1F8; --muted: #9AA5C0; --line: #24324F; --orange-l: #3A2219; --ok-l: #12301F; --warn-l: #33270E; --bad-l: #3A1814; }
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; }
body { font-family: "Segoe UI", Tahoma, "Noto Sans Arabic", "Geeza Pro", Arial, sans-serif; background: var(--bg); color: var(--ink); font-size: 16px; line-height: 1.5; }
[hidden] { display: none !important; }
button, input, select, textarea { font: inherit; color: inherit; }
.muted { color: var(--muted); } .small { font-size: 13px; }

/* login */
.login { min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 28px 16px;
  background: radial-gradient(120% 70% at 50% 0%, #27417E 0%, var(--navy) 45%, var(--navy-d) 100%); }
.lockup { width: 170px; margin-bottom: 18px; filter: drop-shadow(0 8px 24px rgba(0,0,0,.35)); }
.lgcard { width: 100%; max-width: 380px; }
.lgtabs { width: 100%; max-width: 380px; justify-content: center; }
.chips.lgtabs button { background: rgba(255,255,255,.12); color: #fff; border-color: rgba(255,255,255,.3); }
.chips.lgtabs button.on { background: var(--orange); border-color: var(--orange); }
.lgcard h2 { margin: 0 0 4px; color: var(--navy); }
@media (prefers-color-scheme: dark) { .lgcard h2 { color: #fff; } }

/* layout */
.top { position: sticky; top: 0; z-index: 5; display: flex; align-items: center; gap: 10px; padding: calc(env(safe-area-inset-top) + 10px) 16px 10px;
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-d) 100%); color: #fff; box-shadow: 0 2px 12px rgba(13,33,60,.35); }
.top::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: var(--orange); }
.tlogo { width: 38px; height: auto; }
.ttl { flex: 1; display: flex; flex-direction: column; line-height: 1.25; } .ttl small { opacity: .85; }
.ghost { background: transparent; border: 1px solid rgba(255,255,255,.5); color: #fff; border-radius: 999px; padding: 5px 14px; cursor: pointer; }
.cash { background: var(--orange-l); color: var(--ink); border-bottom: 1px solid var(--line); padding: 8px 16px; font-size: 14px; }
.cash b { color: var(--orange); }
main { padding: 14px 16px calc(env(safe-area-inset-bottom) + 90px); max-width: 720px; margin: 0 auto; }
.tabs { position: fixed; bottom: 0; left: 0; right: 0; z-index: 6; display: flex; background: var(--card); border-top: 1px solid var(--line);
  padding-bottom: env(safe-area-inset-bottom); box-shadow: 0 -4px 18px rgba(13,33,60,.08); }
.tabs a { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 8px 2px 9px; text-decoration: none; color: var(--muted); font-size: 12px; }
.tabs a i { font-style: normal; font-size: 21px; line-height: 1; }
.tabs a.on { color: var(--orange); font-weight: 700; }
h1 { font-size: 21px; margin: 4px 0 12px; } h3 { font-size: 16px; margin: 18px 0 8px; color: var(--muted); font-weight: 600; }

/* cards */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 16px; box-shadow: 0 2px 10px rgba(13,33,60,.05); }
.card + .card { margin-top: 10px; }
.sub { position: relative; overflow: hidden; }
.sub::before { content: ""; position: absolute; inset: 0 0 0 auto; width: 5px; background: var(--navy); }
.sub.soon::before { background: var(--orange); } .sub.ended::before { background: var(--line); }
.subTop { display: flex; justify-content: space-between; gap: 8px; align-items: flex-start; }
.subTop b { font-size: 16px; }
.tag { display: inline-block; border-radius: 999px; padding: 2px 10px; font-size: 12px; font-weight: 600; white-space: nowrap; background: var(--bg); color: var(--muted); }
.tag.ok { background: var(--ok-l); color: var(--ok); } .tag.warn { background: var(--warn-l); color: var(--warn); } .tag.bad { background: var(--bad-l); color: var(--bad); }
.tag.or { background: var(--orange-l); color: var(--orange); }
.bar { height: 8px; background: var(--bg); border-radius: 99px; margin: 10px 0 6px; overflow: hidden; }
.bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--navy), #3A5BA8); border-radius: 99px; }
.sub.soon .bar i { background: linear-gradient(90deg, var(--orange), #F28A5C); }
.row { display: flex; gap: 8px; align-items: center; justify-content: space-between; }
.price { font-weight: 700; color: var(--navy); white-space: nowrap; }
@media (prefers-color-scheme: dark) { .price { color: #9DB6F0; } }
.hero { background: linear-gradient(135deg, var(--navy) 0%, #23408A 100%); color: #fff; border: 0; }
.hero .muted { color: rgba(255,255,255,.8); }
.quick { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 12px; }
.quick a { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 12px 6px; text-align: center; text-decoration: none; color: var(--ink); font-size: 13px; }
.quick a i { display: block; font-style: normal; font-size: 26px; margin-bottom: 4px; }
.empty { text-align: center; color: var(--muted); padding: 22px 10px; }

/* forms + buttons */
label { display: flex; flex-direction: column; gap: 5px; font-size: 14px; color: var(--muted); margin-top: 12px; }
input, select, textarea { width: 100%; padding: 12px 13px; border: 1px solid var(--line); border-radius: 12px; background: var(--card); font-size: 16px; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--orange); outline-offset: 0; border-color: transparent; }
textarea { min-height: 70px; resize: vertical; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; border: 1px solid var(--line); background: var(--card); border-radius: 12px; padding: 9px 14px; cursor: pointer; font-weight: 600; text-decoration: none; color: var(--ink); }
.btn.primary { background: var(--orange); border-color: var(--orange); color: #fff; }
.btn.navy { background: var(--navy); border-color: var(--navy); color: #fff; }
.btn.big { width: 100%; padding: 14px; font-size: 17px; margin-top: 16px; }
.btn.sm { padding: 6px 12px; font-size: 14px; }
.btn:disabled { opacity: .55; }
.err { background: var(--bad-l); color: var(--bad); border-radius: 10px; padding: 9px 12px; margin-top: 12px; font-size: 14px; }
.chips { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; margin-bottom: 8px; scrollbar-width: none; }
.chips button { flex: none; border: 1px solid var(--line); background: var(--card); border-radius: 999px; padding: 7px 14px; cursor: pointer; }
.chips button.on { background: var(--navy); border-color: var(--navy); color: #fff; }
.opt { display: flex; gap: 10px; }
.opt label { flex: 1; flex-direction: row; align-items: center; gap: 8px; margin: 0; padding: 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--card); color: var(--ink); cursor: pointer; }
.opt input { width: auto; }

/* menu */
.item { display: flex; align-items: center; gap: 10px; padding: 11px 0; border-bottom: 1px solid var(--line); }
.item:last-child { border-bottom: 0; }
.item .nm { flex: 1; }
.qty { display: flex; align-items: center; gap: 8px; }
.qty button { width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--line); background: var(--card); font-size: 20px; line-height: 1; cursor: pointer; }
.qty button.add { background: var(--orange); border-color: var(--orange); color: #fff; }
.qty b { min-width: 18px; text-align: center; }
.cart { position: fixed; left: 12px; right: 12px; bottom: calc(env(safe-area-inset-bottom) + 70px); z-index: 7; max-width: 696px; margin: 0 auto;
  background: var(--navy); color: #fff; border-radius: 14px; padding: 12px 16px; display: flex; align-items: center; justify-content: space-between; box-shadow: 0 8px 24px rgba(13,33,60,.35); cursor: pointer; border: 0; width: calc(100% - 24px); font-weight: 700; }

/* sheet + toast */
.sheet { position: fixed; inset: 0; z-index: 20; background: rgba(8,16,32,.5); display: flex; align-items: flex-end; justify-content: center; }
.sheetIn { background: var(--bg); width: 100%; max-width: 720px; max-height: 90vh; overflow: auto; border-radius: 20px 20px 0 0; padding: 18px 16px calc(env(safe-area-inset-bottom) + 18px); animation: up .22s ease-out; }
@keyframes up { from { transform: translateY(40px); opacity: .4; } to { transform: none; opacity: 1; } }
.sheetIn h2 { margin: 0 0 6px; font-size: 19px; }
.toast { position: fixed; z-index: 30; left: 50%; transform: translateX(-50%); bottom: calc(env(safe-area-inset-bottom) + 84px); background: var(--ink); color: var(--bg); padding: 10px 18px; border-radius: 999px; font-size: 14px; max-width: 90vw; box-shadow: 0 6px 20px rgba(0,0,0,.25); }
.note { background: var(--warn-l); color: var(--ink); border-radius: 12px; padding: 10px 12px; font-size: 14px; margin-top: 10px; }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 4px 12px; font-size: 14px; margin-top: 8px; } .kv span { color: var(--muted); }
.two { display: grid; grid-template-columns: 1.4fr 1fr; gap: 10px; } .two label { margin-top: 12px; }
