/* ===================== Tokens ===================== */
:root {
  --accent: #b30000;
  --accent-2: #ff4d4d;
  --secondary-bg: linear-gradient(135deg, #8f0000, #ff4d4d);
  --button-bg: var(--secondary-bg);
  --header-bg: #ffffff;
  --page-bg: #ffffff;
  --surface: #ffffff;
  --surface-2: #f6f7f9;
  --text: #16181d;
  --muted: #6b7280;
  --border: #e8eaee;
  --ok: #15803d;
  --ok-bg: #ecfdf3;
  --warn: #b45309;
  --warn-bg: #fff7ed;
  --danger: #c81e1e;
  --danger-bg: #fef2f2;
  --info: #1d4ed8;
  --info-bg: #eff6ff;
  --radius: 16px;
  --radius-sm: 12px;
  --shadow: 0 1px 2px rgba(16,24,40,.04), 0 4px 14px rgba(16,24,40,.06);
  --shadow-lg: 0 12px 32px rgba(16,24,40,.12);
  --header-h: 64px;
  --nav-h: 66px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --font-ar: 'Cairo', system-ui, sans-serif;
  --font-en: 'Poppins', system-ui, sans-serif;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font-ar);
  background: var(--page-bg);
  color: var(--text);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
html[dir="ltr"] body { font-family: var(--font-en); }
body:has(#bottom-nav) { padding-bottom: calc(var(--nav-h) + var(--safe-b)); }
body:has(#site-header) { padding-top: var(--header-h); }
body.no-scroll { overflow: hidden; }
img { max-width: 100%; display: block; }
a { text-decoration: none; color: inherit; }
button { font-family: inherit; cursor: pointer; color: inherit; }
input, select, textarea { font-family: inherit; }
h1, h2, h3 { line-height: 1.25; }
.hidden { display: none !important; }
i[data-lucide] { display: inline-flex; width: 1.1em; height: 1.1em; flex-shrink: 0; vertical-align: -.18em; }
i[data-lucide] > svg { width: 100%; height: 100%; display: block; }
.mini-note { font-size: .8rem; color: var(--muted); }
.mini-note i, .opts i { width: 13px; height: 13px; vertical-align: -2px; }

/* ===================== Header ===================== */
#site-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 60;
  height: var(--header-h);
  background: var(--header-bg);
  border-bottom: 1px solid rgba(0,0,0,.05);
}
.header-inner {
  position: relative; height: 100%; max-width: 1100px; margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between; padding: 0 12px;
}
.header-side { display: flex; align-items: center; gap: 8px; z-index: 1; }
.header-logo { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); display: flex; align-items: center; }
.header-logo img { height: 46px; max-width: 140px; object-fit: contain; border-radius: 8px; }
.logo-text { font-weight: 800; font-size: 1.35rem; color: var(--accent); white-space: nowrap; }
.icon-btn {
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--surface); border: 1px solid var(--border);
  width: 40px; height: 40px; border-radius: 12px; position: relative; flex-shrink: 0;
}
.icon-btn i, .icon-btn svg { width: 20px; height: 20px; }
.lang-toggle {
  height: 34px; min-width: 40px; padding: 0 10px; border-radius: 10px;
  border: 1px solid var(--border); background: var(--surface);
  font-weight: 700; font-size: .82rem; font-family: var(--font-ar);
}
html[dir="rtl"] .lang-toggle { font-family: var(--font-en); }
.cart-count {
  position: absolute; top: -6px; inset-inline-end: -6px;
  background: var(--button-bg); color: #fff; font-size: .68rem; font-weight: 700;
  min-width: 19px; height: 19px; border-radius: 10px; padding: 0 5px;
  display: flex; align-items: center; justify-content: center; border: 2px solid #fff;
  font-family: var(--font-en);
}

/* ===================== Drawer (hamburger) ===================== */
.drawer { position: fixed; inset: 0; z-index: 120; background: rgba(15,17,21,0); pointer-events: none; transition: background .25s; }
.drawer.open { background: rgba(15,17,21,.45); pointer-events: auto; }
.drawer-panel {
  position: absolute; top: 0; bottom: 0; inset-inline-start: 0; width: min(320px, 84vw);
  background: var(--surface); box-shadow: var(--shadow-lg); padding: 18px 14px calc(18px + var(--safe-b));
  transform: translateX(-104%); transition: transform .28s cubic-bezier(.2,.8,.2,1);
  display: flex; flex-direction: column; gap: 10px;
}
html[dir="rtl"] .drawer-panel { transform: translateX(104%); }
.drawer.open .drawer-panel { transform: none; }
.drawer-head { display: flex; align-items: center; gap: 12px; padding: 4px 4px 16px; border-bottom: 1px solid var(--border); }
.drawer-head img { width: 48px; height: 48px; object-fit: contain; border-radius: 12px; }
.drawer-head div { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.drawer-head strong { font-size: 1.05rem; }
.drawer-head span { font-size: .8rem; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.drawer-close { width: 36px; height: 36px; }
.drawer-links { display: flex; flex-direction: column; gap: 4px; padding-top: 6px; }
.drawer-link {
  display: flex; align-items: center; gap: 12px; width: 100%; padding: 14px 12px; border-radius: 12px;
  background: none; border: 0; font-size: .98rem; font-weight: 600; text-align: start;
}
.drawer-link:hover, .drawer-link:active { background: var(--surface-2); }
.drawer-link i { width: 20px; height: 20px; color: var(--accent); }

/* ===================== Bottom navigation ===================== */
.bottom-nav {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 70;
  height: calc(var(--nav-h) + var(--safe-b)); padding-bottom: var(--safe-b);
  background: rgba(255,255,255,.96); backdrop-filter: saturate(160%) blur(12px); -webkit-backdrop-filter: saturate(160%) blur(12px);
  border-top: 1px solid var(--border);
  display: grid; grid-template-columns: repeat(5, 1fr); align-items: center;
}
.bn-item { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; color: #8a909b; height: 100%; font-size: .7rem; font-weight: 600; }
.bn-icon { position: relative; display: flex; align-items: center; justify-content: center; width: 42px; height: 30px; border-radius: 16px; transition: background .2s; }
.bn-icon i, .bn-icon svg { width: 22px; height: 22px; }
.bn-item.active { color: var(--accent); }
.bn-item.active .bn-icon { background: color-mix(in srgb, var(--accent) 10%, transparent); }
.bn-home .bn-icon { width: 52px; height: 52px; margin-top: -26px; border-radius: 50%; background: var(--button-bg); color: #fff; box-shadow: 0 8px 18px color-mix(in srgb, var(--accent) 35%, transparent); border: 4px solid #fff; }
.bn-home.active .bn-icon { background: var(--button-bg); }
.bn-home .bn-label { margin-top: -2px; }
.bn-dot { position: absolute; top: -3px; inset-inline-end: 2px; min-width: 17px; height: 17px; padding: 0 4px; border-radius: 9px; background: var(--danger); color: #fff; font-size: .62rem; display: flex; align-items: center; justify-content: center; border: 2px solid #fff; font-family: var(--font-en); }

/* ===================== Footer ===================== */
#site-footer { margin-top: auto; padding: 36px 18px 22px; border-top: 1px solid var(--border); background: var(--surface); }
.footer-inner { max-width: 900px; margin: 0 auto; display: flex; flex-direction: column; gap: 16px; }
.footer-contact { display: flex; flex-direction: column; gap: 10px; }
.footer-contact-item { display: flex; align-items: center; gap: 10px; font-size: .86rem; font-weight: 600; color: #374151; }
.footer-contact-item i { width: 16px; height: 16px; color: var(--accent); flex-shrink: 0; }
.footer-socials { display: flex; gap: 18px; }
.footer-social { width: 22px; height: 22px; color: #374151; }
.footer-social svg { width: 100%; height: 100%; }
.footer-links { display: flex; gap: 8px; flex-wrap: wrap; font-size: .8rem; color: var(--muted); }
.footer-links a { text-decoration: underline; text-underline-offset: 3px; }
.footer-copyright { font-size: .74rem; color: var(--muted); text-align: center; width: 100%; }

/* ===================== Buttons & forms ===================== */
.btn-primary {
  width: 100%; background: var(--button-bg); color: #fff; border: none; border-radius: 14px;
  padding: 14px 18px; font-weight: 700; font-size: 1rem; display: flex; align-items: center; justify-content: center; gap: 8px;
  transition: transform .1s, opacity .2s;
}
.btn-primary:active { transform: scale(.98); }
.btn-primary:disabled { opacity: .5; }
.btn-primary i { width: 18px; height: 18px; }
.btn-inline { display: inline-flex; width: auto; padding: 12px 22px; }
.btn-secondary { display: inline-flex; align-items: center; justify-content: center; padding: 12px 22px; border-radius: 14px; color: #fff; font-weight: 700; background: var(--button-bg); }
.btn-google {
  display: flex; align-items: center; justify-content: center; gap: 12px; width: 100%;
  padding: 13px 18px; border-radius: 14px; border: 1px solid #dadce0; background: #fff; color: #1f1f1f;
  font-weight: 700; font-size: .98rem; box-shadow: 0 1px 2px rgba(0,0,0,.06);
}
.btn-google svg { width: 22px; height: 22px; flex-shrink: 0; }
.btn-google:active { background: #f7f8f8; }
.loading { opacity: .65; pointer-events: none; position: relative; }

.form-group { margin-bottom: 14px; }
.form-group label { display: flex; align-items: center; gap: 6px; margin-bottom: 6px; font-weight: 700; font-size: .86rem; }
.req { color: var(--danger); }
.form-group input:not([type="checkbox"]):not([type="radio"]):not([type="color"]), .form-group textarea, .form-group select {
  width: 100%; border: 1px solid var(--border); border-radius: 12px; padding: 12px 13px; font-size: 16px;
  background: #fff; color: var(--text); appearance: none; -webkit-appearance: none;
}
.form-group input:focus, .form-group textarea:focus, .form-group select:focus { outline: 2px solid color-mix(in srgb, var(--accent) 35%, transparent); border-color: var(--accent); }
.form-group select {
  background-image: url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23888' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: left 12px center; padding-inline-start: 36px;
}
html[dir="ltr"] .form-group select { background-position: right 12px center; padding-inline-start: 13px; padding-inline-end: 36px; }
.notes-field { width: 100%; border: 1px solid var(--border); border-radius: 12px; padding: 11px; font-size: 16px; resize: vertical; min-height: 64px; }
.form-error { background: var(--danger-bg); color: var(--danger); border-radius: 12px; padding: 11px 14px; font-weight: 600; font-size: .9rem; }
.notice { margin: 0 0 14px; }

.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; margin-bottom: 14px; box-shadow: var(--shadow); }
.card h3 { margin: 0 0 12px; font-size: 1rem; }
.skeleton { background: linear-gradient(90deg, #f1f2f4 25%, #f8f9fa 37%, #f1f2f4 63%); background-size: 400% 100%; animation: sk 1.3s ease infinite; border: 0; min-height: 96px; border-radius: var(--radius); }
.skeleton.tall { min-height: 220px; }
@keyframes sk { 0% { background-position: 100% 50%; } 100% { background-position: 0 50%; } }

/* ===================== Chips & progress ===================== */
.chip { display: inline-flex; align-items: center; gap: 5px; padding: 5px 10px; border-radius: 999px; font-size: .74rem; font-weight: 700; white-space: nowrap; }
.chip i { width: 13px; height: 13px; }
.chip-accent { background: var(--button-bg); color: #fff; }
.chip-ok { background: var(--ok-bg); color: var(--ok); }
.chip-muted { background: rgba(17,24,39,.72); color: #fff; backdrop-filter: blur(6px); }
.tier-head .chip-muted { background: var(--surface-2); color: var(--muted); }
.progress { height: 8px; border-radius: 99px; background: #eceef2; overflow: hidden; }
.progress span { display: block; height: 100%; border-radius: inherit; background: var(--button-bg); transition: width .6s ease; }
html[dir="rtl"] .progress span { margin-inline-start: 0; }
.progress-lg { height: 10px; }

/* ===================== Page hero (16:9) ===================== */
.page-hero { position: relative; width: 100%; max-width: 1100px; margin: 0 auto; aspect-ratio: 16 / 9; max-height: 52vh; background: #e9ebef center / cover no-repeat; }
.page-hero.no-image { background: var(--button-bg); }
.page-hero-shade { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0,0,0,0) 45%, rgba(0,0,0,.28)); }
.page-intro { position: relative; max-width: 760px; margin: -34px auto 0; padding: 18px 18px 6px; background: var(--page-bg); border-radius: 22px 22px 0 0; text-align: center; }
.page-intro h1 { margin: 0 0 6px; font-size: 1.45rem; font-weight: 800; }
.page-intro p { margin: 0; color: var(--muted); font-size: .95rem; }
.member-body { max-width: 760px; margin: 0 auto; width: 100%; padding: 12px 16px 26px; }
.locked-card { max-width: 520px; margin: 8px auto 30px; padding: 22px 18px; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 14px; }
.locked-card p { margin: 0; font-weight: 700; font-size: 1.02rem; }
.locked-icon { width: 54px; height: 54px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-2); color: var(--accent); }
.locked-icon i { width: 24px; height: 24px; }
.locked-card .btn-primary { min-width: 220px; justify-content: center; }
.login-card { padding-top: 6px; }
.login-card .btn-google { max-width: 360px; }

/* ===================== Summary card (points) ===================== */
.summary-card { border-radius: 20px; padding: 18px; margin-bottom: 18px; color: #fff; background: var(--button-bg); box-shadow: 0 10px 26px color-mix(in srgb, var(--accent) 28%, transparent); position: relative; overflow: hidden; }
.summary-card::after { content: ''; position: absolute; inset-inline-end: -40px; top: -60px; width: 180px; height: 180px; border-radius: 50%; background: rgba(255,255,255,.1); }
.summary-top { display: flex; justify-content: space-between; align-items: center; gap: 12px; position: relative; z-index: 1; }
.summary-label { display: block; font-size: .8rem; opacity: .85; }
.summary-value { font-size: 1.35rem; font-weight: 800; }
.summary-value small { font-size: .8rem; font-weight: 600; opacity: .85; }
.summary-points { text-align: end; display: flex; flex-direction: column; }
.summary-points strong { font-size: 1.35rem; font-family: var(--font-en); }
.summary-points span { font-size: .76rem; opacity: .85; }
.summary-card .progress { margin-top: 14px; background: rgba(255,255,255,.28); position: relative; z-index: 1; }
.summary-card .progress span { background: #fff; }
.summary-hint { margin: 10px 0 0; font-size: .84rem; opacity: .92; position: relative; z-index: 1; }
.summary-card .chip-accent { background: rgba(255,255,255,.2); }

/* ===================== Levels ===================== */
.levels-list { display: grid; gap: 14px; }
.level-card { display: grid; grid-template-columns: 132px 1fr; gap: 0; background: var(--surface); border: 1px solid var(--border); border-radius: 18px; overflow: hidden; box-shadow: var(--shadow); }
.level-card.is-current { border-color: color-mix(in srgb, var(--accent) 55%, var(--border)); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 14%, transparent), var(--shadow); }
.level-media { position: relative; background: #111; min-height: 128px; }
.level-media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.level-card.is-locked .level-media img { filter: grayscale(.6) brightness(.8); }
.level-media .chip { position: absolute; bottom: 8px; inset-inline-start: 8px; font-size: .68rem; padding: 4px 8px; }
.level-body { padding: 14px; display: flex; flex-direction: column; justify-content: center; gap: 9px; min-width: 0; }
.level-title-row { display: flex; flex-direction: column; gap: 2px; }
.level-title-row h3 { margin: 0; font-size: 1.05rem; }
.level-discount { font-size: .8rem; font-weight: 700; color: var(--accent); }
.level-meta { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 2px 10px; font-size: .74rem; color: var(--muted); font-weight: 600; }
.level-meta span { white-space: nowrap; }
.level-meta span:first-child { font-family: var(--font-en); direction: ltr; }
@media (min-width: 720px) {
  .levels-list { grid-template-columns: repeat(3, 1fr); }
  .level-card { grid-template-columns: 1fr; }
  .level-media { aspect-ratio: 4 / 3; }
}

/* ===================== Gifts ===================== */
.tier { margin-bottom: 22px; }
.tier-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.tier-head h2 { margin: 0; font-size: 1.08rem; }
.gift-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.gift-card { background: var(--surface); border: 1px solid var(--border); border-radius: 16px; overflow: hidden; display: flex; flex-direction: column; box-shadow: var(--shadow); }
.gift-media { position: relative; aspect-ratio: 1; background: var(--surface-2); }
.gift-media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.gift-card.is-locked .gift-media img { filter: grayscale(.7); opacity: .7; }
.gift-count { position: absolute; top: 6px; inset-inline-end: 6px; background: var(--button-bg); color: #fff; font-weight: 800; font-size: .72rem; padding: 2px 8px; border-radius: 99px; font-family: var(--font-en); }
.gift-body { padding: 9px; display: flex; flex-direction: column; gap: 4px; flex: 1; }
.gift-body h3 { margin: 0; font-size: .82rem; line-height: 1.35; }
.gift-points { font-size: .72rem; font-weight: 700; color: var(--accent); }
.gift-actions { display: flex; gap: 6px; margin-top: auto; padding-top: 4px; }
.btn-gift { flex: 1; border: 0; border-radius: 10px; padding: 8px 6px; background: var(--button-bg); color: #fff; font-weight: 700; font-size: .78rem; }
.btn-gift:disabled { background: #e5e7eb; color: #9ca3af; }
.qty-btn { width: 34px; border-radius: 10px; border: 1px solid var(--border); background: #fff; font-weight: 800; }
@media (min-width: 720px) { .gift-body h3 { font-size: .95rem; } .gift-body { padding: 12px; } }

/* ===================== Orders ===================== */
.order-card { background: var(--surface); border: 1px solid var(--border); border-radius: 18px; padding: 14px; margin-bottom: 12px; box-shadow: var(--shadow); }
.order-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.order-head > div { display: flex; flex-direction: column; min-width: 0; }
.status-chip { padding: 5px 11px; border-radius: 99px; font-size: .74rem; font-weight: 800; white-space: nowrap; }
.s-pending { background: var(--warn-bg); color: var(--warn); }
.s-preparing { background: var(--info-bg); color: var(--info); }
.s-delivered { background: var(--ok-bg); color: var(--ok); }
.s-cancelled { background: var(--danger-bg); color: var(--danger); }
.steps { list-style: none; padding: 0; margin: 16px 0 6px; display: grid; grid-template-columns: repeat(3, 1fr); position: relative; }
.steps li { display: flex; flex-direction: column; align-items: center; gap: 6px; font-size: .72rem; color: var(--muted); font-weight: 600; position: relative; text-align: center; }
.steps li::before { content: ''; position: absolute; top: 11px; inset-inline-start: -50%; width: 100%; height: 3px; background: #eceef2; z-index: 0; }
.steps li:first-child::before { display: none; }
.steps li.done::before, .steps li.now::before { background: var(--accent); }
.steps .dot { width: 24px; height: 24px; border-radius: 50%; background: #eceef2; position: relative; z-index: 1; display: grid; place-items: center; color: #fff; border: 3px solid #fff; box-shadow: 0 0 0 1px #e2e5ea; }
.steps .dot i { width: 13px; height: 13px; }
.steps li.done .dot { background: var(--accent); box-shadow: none; }
.steps li.now .dot { background: var(--accent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 20%, transparent); }
.steps li.now { color: var(--text); }
.order-items { margin: 8px 0; font-size: .86rem; color: #374151; }
.order-foot { display: flex; justify-content: space-between; align-items: flex-end; gap: 10px; border-top: 1px dashed var(--border); padding-top: 10px; }
.order-foot strong { font-size: 1.02rem; }
.order-points { display: flex; flex-direction: column; gap: 3px; font-size: .76rem; color: var(--muted); font-weight: 600; }
.order-points i { width: 13px; height: 13px; vertical-align: -2px; }
.order-points .ok { color: var(--ok); }

/* ===================== Notifications ===================== */
.push-card { margin-bottom: 16px; }
.push-ok { display: flex; align-items: center; gap: 8px; padding: 12px 14px; border-radius: 14px; background: var(--ok-bg); color: var(--ok); font-weight: 700; font-size: .9rem; margin: 0; }
.push-ok i { width: 18px; height: 18px; }
.push-ios { padding: 14px; border-radius: 14px; background: var(--info-bg); color: #1e3a8a; font-size: .88rem; }
.push-ios strong { display: flex; align-items: center; gap: 6px; }
.push-ios i { width: 18px; height: 18px; }
.push-ios p { margin: 6px 0 0; }
.notif-list { display: flex; flex-direction: column; gap: 10px; }
.notif-item { display: flex; gap: 12px; padding: 14px; background: var(--surface); border: 1px solid var(--border); border-radius: 16px; box-shadow: var(--shadow); }
.notif-item img { width: 64px; height: 64px; border-radius: 12px; object-fit: cover; flex-shrink: 0; }
.notif-icon { width: 42px; height: 42px; border-radius: 12px; flex-shrink: 0; display: grid; place-items: center; background: color-mix(in srgb, var(--accent) 10%, transparent); color: var(--accent); }
.notif-icon i { width: 20px; height: 20px; }
.notif-item h3 { margin: 0 0 3px; font-size: .96rem; }
.notif-item p { margin: 0 0 4px; font-size: .88rem; color: #374151; }
.notif-link { display: inline-block; margin-top: 4px; font-size: .82rem; font-weight: 700; color: var(--accent); }

/* ===================== Policies ===================== */
.policy { max-width: 760px; margin: -34px auto 30px; width: calc(100% - 32px); position: relative; padding: 22px 20px; }
.policy h1 { margin: 0 0 12px; font-size: 1.4rem; }
.policy p { color: #374151; margin: 0 0 12px; }

/* ===================== Home ===================== */
.home-hero { position: relative; min-height: 58vh; background: #222 var(--hero-image, none) center / cover no-repeat; display: flex; align-items: flex-end; overflow: hidden; }
.home-hero-overlay { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0,0,0,.15) 0%, rgba(0,0,0,.6) 100%); }
.home-hero-content { position: relative; z-index: 1; width: 100%; max-width: 1100px; margin: 0 auto; padding: 60px 20px 60px; color: #fff; }
.home-eyebrow { font-weight: 700; letter-spacing: .08em; font-size: .8rem; color: rgba(255,255,255,.88); }
.home-hero h1 { font-size: clamp(2.3rem, 9vw, 4.6rem); line-height: 1.05; margin: 10px 0; }
.home-hero p { font-size: 1.02rem; max-width: 540px; color: rgba(255,255,255,.92); margin: 0; }
.home-actions { margin-top: 18px; }
.home-account { max-width: 1100px; width: 100%; margin: -30px auto 0; padding: 0 16px; position: relative; z-index: 2; }
.account-card { background: var(--surface); border: 1px solid var(--border); border-radius: 20px; padding: 18px; box-shadow: var(--shadow-lg); display: flex; flex-direction: column; gap: 14px; }
.account-card h2 { margin: 0 0 4px; font-size: 1.12rem; }
.account-card p { margin: 0; color: var(--muted); font-size: .9rem; }
.account-card.skeleton { min-height: 120px; box-shadow: none; }
.account-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.stat { background: var(--surface-2); border-radius: 14px; padding: 12px; display: flex; flex-direction: column; }
.stat strong { font-size: 1.15rem; }
.stat span { font-size: .76rem; color: var(--muted); }
@media (min-width: 720px) { .account-card { flex-direction: row; align-items: center; justify-content: space-between; } .account-card .btn-google { width: auto; min-width: 300px; } .account-stats { min-width: 320px; } }
.home-section { max-width: 1100px; margin: 0 auto; padding: 46px 16px 10px; width: 100%; }
.section-heading { text-align: center; margin-bottom: 22px; }
.section-heading span, .home-cta span { font-size: .78rem; font-weight: 800; letter-spacing: .08em; color: var(--accent); }
.section-heading h2 { font-size: clamp(1.6rem, 5vw, 2.4rem); margin: 4px 0 0; }
.home-category-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 12px; }
.home-category { padding: 10px; background: var(--surface); border: 1px solid var(--border); border-radius: 18px; text-align: center; box-shadow: var(--shadow); }
.home-category img { width: 100%; aspect-ratio: 1.15; object-fit: cover; border-radius: 13px; }
.home-category strong { display: block; padding: 10px 4px 4px; }
.home-cta { max-width: 1100px; margin: 40px auto 40px; padding: 28px 22px; border-radius: 22px; background: var(--surface-2); display: flex; flex-direction: column; gap: 16px; width: calc(100% - 32px); }
.home-cta h2 { font-size: clamp(1.35rem, 4vw, 2.1rem); margin: 4px 0 0; }
@media (min-width: 720px) { .home-cta { flex-direction: row; justify-content: space-between; align-items: center; } }

/* ===================== Branches ===================== */
.page-head { text-align: center; padding: 26px 16px 4px; }
.page-head h1 { margin: 0; font-size: 1.5rem; }
.branches-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; padding: 18px 16px 30px; max-width: 760px; margin: 0 auto; width: 100%; }
.branch-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); text-align: center; padding: 0; transition: transform .15s; }
.branch-card.selected { border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 15%, transparent); }
.branch-card:active { transform: scale(.97); }
.branch-card img { width: 100%; height: 120px; object-fit: cover; }
.branch-name { padding: 12px 8px 4px; font-weight: 800; }
.branch-modes { display: flex; gap: 6px; justify-content: center; padding: 0 8px 12px; }
.branch-modes span { font-size: .7rem; background: var(--surface-2); padding: 3px 8px; border-radius: 99px; color: var(--muted); font-weight: 700; }

/* ===================== Menu ===================== */
.slider { position: relative; width: 100%; aspect-ratio: 16 / 7; overflow: hidden; background: #eee; touch-action: pan-y; }
.slider img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .6s ease; }
.slider img.active { opacity: 1; }
.slider-dots { position: absolute; bottom: 10px; left: 0; right: 0; display: flex; justify-content: center; gap: 6px; }
.slider-dots span { width: 7px; height: 7px; border-radius: 50%; background: rgba(255,255,255,.55); transition: width .2s; }
.slider-dots span.active { background: #fff; width: 18px; border-radius: 4px; }
.menu-branch-bar { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 16px; background: var(--surface-2); font-size: .86rem; font-weight: 700; border-radius: 0; }
.page-content .menu-branch-bar { border-radius: 12px; margin-bottom: 14px; }
.menu-branch-bar span { display: flex; align-items: center; gap: 6px; }
.menu-branch-bar i { width: 16px; height: 16px; color: var(--accent); }
.menu-branch-bar a { color: var(--accent); font-size: .8rem; }
.categories-bar { position: sticky; top: var(--header-h); z-index: 20; background: var(--page-bg); display: flex; gap: 12px; overflow-x: auto; padding: 14px 16px 10px; scrollbar-width: none; cursor: grab; user-select: none; border-bottom: 1px solid var(--border); }
.categories-bar.dragging { cursor: grabbing; }
.categories-bar::-webkit-scrollbar { display: none; }
.category-chip { flex: 0 0 auto; display: flex; flex-direction: column; align-items: center; gap: 6px; width: 72px; text-align: center; cursor: pointer; }
.category-chip img { width: 60px; height: 60px; border-radius: 50%; object-fit: cover; border: 3px solid transparent; pointer-events: none; }
.category-chip.active img { border-color: var(--accent); }
.category-chip span { font-size: .76rem; font-weight: 700; pointer-events: none; }
.menu-category-section { padding: 4px 16px 8px; scroll-margin-top: calc(var(--header-h) + 110px); max-width: 1100px; margin: 0 auto; width: 100%; }
.menu-category-title { font-size: 1.12rem; font-weight: 800; margin: 18px 0 12px; }
.products-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
@media (min-width: 640px) { .products-grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 960px) { .products-grid { grid-template-columns: repeat(4, 1fr); } }
.product-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); display: flex; flex-direction: column; cursor: pointer; }
.product-image-wrap { position: relative; }
.product-card img { width: 100%; aspect-ratio: 4 / 3; height: auto; object-fit: cover; }
.discount-badge { position: absolute; top: 8px; inset-inline-start: 8px; display: flex; align-items: center; gap: 2px; background: var(--danger); color: #fff; font-size: .7rem; font-weight: 800; padding: 3px 7px; border-radius: 8px; font-family: var(--font-en); }
.discount-badge i { width: 11px; height: 11px; }
.product-info { padding: 10px; display: flex; flex-direction: column; gap: 4px; flex: 1; }
.product-info h3 { margin: 0; font-size: .9rem; }
.product-info p { margin: 0; font-size: .74rem; color: var(--muted); flex: 1; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.product-price { font-weight: 800; display: flex; align-items: baseline; gap: 6px; flex-wrap: wrap; }
.old-price { font-weight: 600; font-size: .78em; color: var(--muted); text-decoration: line-through; }
.product-add-btn { margin-top: 6px; background: var(--button-bg); color: #fff; border: none; border-radius: 10px; padding: 8px; font-weight: 700; font-size: .8rem; text-align: center; }

/* ===================== Product modal ===================== */
.modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,.5); z-index: 130; display: flex; align-items: flex-end; justify-content: center; }
.modal-sheet-wrap { position: relative; width: 100%; max-width: 540px; }
.modal-sheet { background: #fff; width: 100%; max-height: 90vh; overflow-y: auto; border-radius: 22px 22px 0 0; padding-bottom: calc(18px + var(--safe-b)); animation: slideUp .25s ease; overscroll-behavior: contain; }
@keyframes slideUp { from { transform: translateY(30px); opacity: 0; } to { transform: none; opacity: 1; } }
.modal-sheet > img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; }
.modal-body { padding: 16px 18px; }
.modal-body h2 { margin: 0 0 6px; }
.modal-body .desc { color: var(--muted); font-size: .9rem; margin: 0 0 14px; }
.close-modal { position: absolute; top: 12px; inset-inline-end: 12px; z-index: 2; background: #fff; border-radius: 50%; width: 36px; height: 36px; border: none; display: flex; align-items: center; justify-content: center; box-shadow: var(--shadow); }
.option-group { margin-bottom: 16px; }
.option-group-title { font-weight: 800; margin-bottom: 8px; font-size: .95rem; }
.option-row { display: flex; align-items: center; justify-content: space-between; padding: 11px 12px; border: 1px solid var(--border); border-radius: 12px; margin-bottom: 8px; }
.option-row label { display: flex; align-items: center; gap: 10px; font-size: .9rem; flex: 1; cursor: pointer; }
.option-row input { accent-color: var(--accent); width: 18px; height: 18px; }
.option-row .delta { font-size: .82rem; color: var(--muted); font-family: var(--font-en); }
.qty-row { display: flex; align-items: center; justify-content: space-between; margin: 16px 0; }
.qty-control { display: flex; align-items: center; gap: 12px; }
.qty-control button { width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--border); background: #fff; font-size: 1.1rem; }
.qty-control span { min-width: 20px; text-align: center; font-weight: 700; }

/* ===================== Cart & checkout ===================== */
main.page-content { flex: 1; padding: 18px 16px; max-width: 720px; margin: 0 auto; width: 100%; }
.page-title { margin: 0 0 16px; font-size: 1.45rem; }
.section-sub { font-size: 1rem; margin: 20px 0 10px; }
.cart-item { position: relative; display: flex; gap: 12px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 12px; margin-bottom: 10px; box-shadow: var(--shadow); }
.cart-item img { width: 76px; height: 76px; object-fit: cover; border-radius: 12px; flex-shrink: 0; }
.cart-item-info { flex: 1; min-width: 0; padding-inline-end: 22px; }
.cart-item-info h3 { margin: 0 0 3px; font-size: .95rem; }
.cart-item-info .opts { font-size: .76rem; color: var(--muted); margin-bottom: 6px; }
.cart-item-footer { display: flex; align-items: center; justify-content: space-between; }
.cart-item-price { font-weight: 800; }
.remove-x { position: absolute; top: 8px; inset-inline-end: 8px; width: 28px; height: 28px; border-radius: 50%; border: 0; background: var(--surface-2); display: grid; place-items: center; color: var(--muted); }
.remove-x i { width: 15px; height: 15px; }
.gift-item { border-style: dashed; border-color: color-mix(in srgb, var(--accent) 40%, var(--border)); }
.gift-item .cart-item-price { color: var(--ok); }
.empty-state { text-align: center; padding: 50px 20px; color: var(--muted); display: flex; flex-direction: column; align-items: center; gap: 10px; }
.empty-state i { width: 48px; height: 48px; opacity: .45; }
.empty-state p { margin: 0; }
.cart-summary { position: sticky; bottom: calc(var(--nav-h) + var(--safe-b)); background: #fff; border-top: 1px solid var(--border); padding: 14px 16px; box-shadow: 0 -6px 16px rgba(0,0,0,.05); z-index: 30; }
.cart-summary .row { display: flex; justify-content: space-between; margin: 0 auto 10px; font-weight: 800; font-size: 1.05rem; max-width: 720px; }
.cart-summary .btn-primary { max-width: 720px; margin: 0 auto; }
.order-type-tabs { display: flex; gap: 12px; margin-bottom: 16px; }
.order-type-btn { flex: 1; background: var(--surface); border: 2px solid var(--border); border-radius: 14px; padding: 14px 8px; display: flex; flex-direction: column; align-items: center; gap: 6px; font-weight: 700; color: var(--muted); }
.order-type-btn.active { border-color: var(--accent); color: var(--accent); background: color-mix(in srgb, var(--accent) 6%, #fff); }
.order-type-btn i { width: 24px; height: 24px; }
.summary-item { display: flex; justify-content: space-between; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--border); font-size: .9rem; }
.summary-item.gift span:last-child { color: var(--ok); font-weight: 700; }
.checkout-line { display: flex; justify-content: space-between; padding: 7px 0; font-size: .9rem; color: #374151; }
.checkout-line.discount span:last-child { color: var(--ok); font-weight: 700; }
.checkout-total { display: flex; justify-content: space-between; padding-top: 10px; margin-top: 6px; border-top: 1px solid var(--border); font-weight: 800; font-size: 1.12rem; }
.points-note { display: flex; align-items: center; gap: 6px; margin: 12px 0 0; padding: 10px 12px; border-radius: 12px; background: color-mix(in srgb, var(--accent) 7%, #fff); color: var(--accent); font-weight: 700; font-size: .86rem; }
.points-note i { width: 16px; height: 16px; flex-shrink: 0; }
#checkoutForm .form-error { margin: 0 0 12px; }
.success-card { text-align: center; padding: 40px 20px; display: flex; flex-direction: column; align-items: center; gap: 10px; }
.success-card h2 { margin: 6px 0 0; }
.success-card p { margin: 0; color: var(--muted); }
.success-icon { width: 72px; height: 72px; border-radius: 50%; display: grid; place-items: center; background: var(--ok-bg); color: var(--ok); }
.success-icon i { width: 36px; height: 36px; }

/* ===================== Misc ===================== */
.toast { position: fixed; bottom: calc(var(--nav-h) + var(--safe-b) + 16px); left: 50%; transform: translateX(-50%) translateY(20px); background: var(--button-bg, #111827); color: #fff; padding: 12px 18px; border-radius: 12px; font-size: .88rem; opacity: 0; pointer-events: none; transition: all .25s; z-index: 300; max-width: 90%; text-align: center; font-weight: 600; }
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.fatal { text-align: center; padding: 30px; display: flex; flex-direction: column; align-items: center; gap: 14px; color: var(--text); font-family: var(--font-ar); }
.fatal p { margin: 0; max-width: 320px; }
@media (min-width: 720px) {
  .page-hero { border-radius: 0 0 24px 24px; }
}

/* ===================== Admin ===================== */
.admin-body { background: #f5f6f8; }
.admin-login-wrap { flex: 1; display: flex; align-items: center; justify-content: center; padding: 20px; min-height: 100vh; }
.admin-login-card { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); padding: 32px 24px; width: 100%; max-width: 380px; text-align: center; }
.admin-login-card h1 { margin-top: 0; font-size: 1.4rem; }
.admin-shell { display: flex; min-height: 100vh; }
.admin-sidebar { width: 230px; background: #fff; border-inline-end: 1px solid var(--border); padding: 20px 0; flex-shrink: 0; position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.admin-sidebar h2 { padding: 0 20px; font-size: 1rem; margin: 0 0 16px; }
.admin-nav-item { display: flex; align-items: center; gap: 10px; padding: 11px 20px; color: var(--muted); font-size: .9rem; border: 0; border-inline-start: 3px solid transparent; background: none; width: 100%; text-align: start; }
.admin-nav-item i { width: 18px; height: 18px; }
.admin-nav-item.active, .admin-nav-item:hover { background: #fff5f5; color: #8f0000; border-inline-start-color: #b30000; }
.admin-main { flex: 1; padding: 24px; max-width: 1000px; overflow-x: hidden; min-width: 0; }
.admin-topbar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; gap: 10px; flex-wrap: wrap; }
.admin-topbar h3 { margin: 0; }
.admin-section { display: none; }
.admin-section.active { display: block; }
.admin-card { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px; margin-bottom: 16px; }
.admin-card h3 { margin-top: 0; }
.admin-card h4 { margin: 18px 0 10px; }
.admin-list-item { display: flex; align-items: center; gap: 12px; padding: 10px; border: 1px solid var(--border); border-radius: 12px; margin-bottom: 10px; }
.admin-list-item img { width: 46px; height: 46px; object-fit: cover; border-radius: 8px; }
.admin-list-item .info { flex: 1; min-width: 0; }
.admin-list-item .actions { display: flex; gap: 6px; flex-wrap: wrap; }
.btn-sm { border: none; border-radius: 8px; padding: 8px 12px; font-size: .8rem; font-weight: 700; background: var(--surface-2); }
.btn-edit { background: #e0f2fe; color: #075985; }
.btn-del { background: #fee2e2; color: #b91c1c; }
.btn-ok { background: #dcfce7; color: #166534; }
.btn-add { background: var(--button-bg); color: #fff; border: none; border-radius: 10px; padding: 10px 16px; font-weight: 700; }
.form-row { display: flex; gap: 10px; flex-wrap: wrap; }
.form-row .form-group { flex: 1; min-width: 140px; }
.bi-field { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.bi-field > div { position: relative; }
.bi-field .bi-tag { position: absolute; top: 9px; inset-inline-end: 10px; font-size: .64rem; font-weight: 800; color: var(--muted); background: var(--surface-2); border-radius: 6px; padding: 1px 6px; pointer-events: none; }
.bi-field textarea { min-height: 90px; }
.form-group .bi-field input, .form-group .bi-field textarea { padding-right: 46px !important; }
.bi-field .bi-tag { right: 10px; inset-inline-end: auto; }
@media (max-width: 640px) { .bi-field { grid-template-columns: 1fr; } }
.image-preview { width: 96px; height: 96px; object-fit: cover; border-radius: 10px; border: 1px solid var(--border); margin-bottom: 8px; background: var(--surface-2); }
.image-preview.wide { width: 100%; max-width: 420px; height: auto; aspect-ratio: 16 / 9; }
.checkbox-row { display: flex; align-items: center; gap: 8px; }
.badge { display: inline-block; background: var(--surface-2); border-radius: 6px; padding: 2px 8px; font-size: .72rem; margin-inline-end: 4px; }
.option-group-card { border: 1px dashed var(--border); border-radius: 12px; padding: 12px; margin-bottom: 12px; }
.option-line { display: flex; gap: 8px; align-items: center; margin-bottom: 6px; flex-wrap: wrap; }
.option-line input { flex: 1; min-width: 110px; border: 1px solid var(--border); border-radius: 10px; padding: 9px; font-size: 15px; }
.color-preview { width: 100%; height: 44px; border-radius: 12px; border: 1px solid var(--border); margin: 10px 0 14px; }
.branch-checkbox-list, .selection-grid { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0; }
.branch-checkbox-list label, .selection-option { display: flex; align-items: center; gap: 6px; font-size: .84rem; background: var(--surface-2); border-radius: 8px; padding: 7px 10px; font-weight: 600; }
.admin-mobile-nav { display: none; overflow-x: auto; gap: 8px; padding: 10px 12px; background: #fff; border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 10; }
.admin-mobile-nav button { flex: 0 0 auto; background: #fff; border: 1.5px solid var(--border); border-radius: 20px; padding: 9px 14px; font-size: .8rem; white-space: nowrap; }
.admin-mobile-nav button.active { background: #fff5f5; border-color: #b30000; color: #8f0000; }
.rule-row { display: grid; grid-template-columns: repeat(4, 1fr) auto; gap: 8px; align-items: end; padding: 10px; border: 1px solid var(--border); border-radius: 12px; margin-bottom: 8px; }
.rule-row .form-group { margin: 0; }
@media (max-width: 640px) { .rule-row { grid-template-columns: 1fr 1fr; } }
.sync-bar { position: fixed; bottom: 16px; inset-inline-end: 16px; z-index: 300; background: #111827; color: #fff; padding: 9px 14px; border-radius: 10px; font-size: .8rem; font-weight: 700; display: none; }
.sync-bar.show { display: block; }
.filters { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.filters .form-group { margin: 0; min-width: 130px; flex: 1; }
.stats-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 14px; }
.stats-row div { background: #fff; border-radius: 12px; padding: 12px; box-shadow: var(--shadow); }
.stats-row strong { display: block; font-size: 1.2rem; }
.stats-row span { font-size: .76rem; color: var(--muted); }
@media (max-width: 800px) {
  .admin-sidebar { display: none; }
  .admin-mobile-nav { display: flex; }
  .admin-shell { flex-direction: column; }
  .admin-main { padding: 14px 12px; }
  .admin-list-item { flex-wrap: wrap; }
}

/* ===================== Staff order cards (admin + cashier) ===================== */
.staff-order { background: #fff; border: 1px solid var(--border); border-radius: 16px; padding: 14px; margin-bottom: 12px; box-shadow: var(--shadow); }
.staff-order.is-new { border-color: #f59e0b; box-shadow: 0 0 0 3px rgba(245,158,11,.18), var(--shadow); animation: glow 1.2s ease-in-out infinite; }
@keyframes glow { 50% { box-shadow: 0 0 0 6px rgba(245,158,11,.08), var(--shadow); } }
.so-head { display: flex; justify-content: space-between; gap: 10px; align-items: flex-start; }
.so-head strong { font-size: 1.1rem; }
.so-meta { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0; }
.so-meta span { font-size: .74rem; background: var(--surface-2); padding: 3px 8px; border-radius: 99px; font-weight: 700; }
.so-meta .type-delivery { background: var(--info-bg); color: var(--info); }
.so-meta .type-pickup { background: var(--ok-bg); color: var(--ok); }
.so-customer { font-size: .88rem; display: flex; flex-direction: column; gap: 2px; margin-bottom: 8px; }
.so-customer a { color: var(--info); font-weight: 700; align-self: flex-start; }
.so-items { list-style: none; margin: 0; padding: 0; border-top: 1px dashed var(--border); }
.so-items li { display: flex; justify-content: space-between; gap: 10px; padding: 7px 0; border-bottom: 1px dashed var(--border); font-size: .9rem; }
.so-items small { display: block; color: var(--muted); font-size: .76rem; }
.so-items .gift-li { color: var(--ok); }
.so-totals { font-size: .84rem; color: #374151; padding-top: 8px; }
.so-totals div { display: flex; justify-content: space-between; }
.so-totals .grand { font-size: 1.05rem; font-weight: 800; color: var(--text); margin-top: 4px; }
.so-notes { background: var(--warn-bg); color: var(--warn); border-radius: 10px; padding: 8px 10px; font-size: .85rem; margin: 8px 0; font-weight: 600; }
.so-actions { display: flex; gap: 8px; margin-top: 12px; flex-wrap: wrap; }
.so-actions button { flex: 1; min-width: 96px; border: 0; border-radius: 12px; padding: 12px; font-weight: 800; font-size: .92rem; display: inline-flex; align-items: center; justify-content: center; gap: 6px; }
.so-actions i { width: 17px; height: 17px; }
.act-accept { background: #16a34a; color: #fff; }
.act-reject { background: #fee2e2; color: #b91c1c; }
.act-deliver { background: #2563eb; color: #fff; }
.act-print { background: var(--surface-2); flex: 0 0 auto !important; min-width: 52px !important; }
.act-delete { background: #fee2e2; color: #b91c1c; flex: 0 0 auto !important; min-width: 52px !important; }
.so-actions select { flex: 1; border: 1px solid var(--border); border-radius: 12px; padding: 10px; font-size: 15px; background: #fff; }

/* ===================== Cashier ===================== */
.cashier-body { background: #f3f4f6; padding: 0; }
.cashier-top { position: sticky; top: 0; z-index: 20; background: #fff; border-bottom: 1px solid var(--border); padding: 10px 14px; display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.cashier-top .brand { display: flex; align-items: center; gap: 10px; min-width: 0; }
.cashier-top img { width: 38px; height: 38px; object-fit: contain; border-radius: 8px; }
.cashier-top strong { display: block; font-size: .98rem; }
.cashier-top small { color: var(--muted); font-size: .76rem; }
.conn { width: 10px; height: 10px; border-radius: 50%; background: #16a34a; display: inline-block; margin-inline-end: 4px; }
.conn.off { background: #dc2626; }
.cashier-tabs { display: flex; gap: 6px; padding: 10px 14px; overflow-x: auto; background: #fff; border-bottom: 1px solid var(--border); position: sticky; top: 59px; z-index: 19; }
.cashier-tabs button { flex: 0 0 auto; border: 1.5px solid var(--border); background: #fff; border-radius: 99px; padding: 8px 14px; font-weight: 800; font-size: .84rem; display: flex; gap: 6px; align-items: center; }
.cashier-tabs button.active { background: #111827; color: #fff; border-color: #111827; }
.cashier-tabs .count { background: var(--surface-2); color: var(--text); border-radius: 99px; padding: 0 7px; font-size: .72rem; min-width: 20px; text-align: center; }
.cashier-tabs button.active .count { background: rgba(255,255,255,.2); color: #fff; }
.cashier-tabs .count.alert { background: #f59e0b; color: #fff; }
.cashier-grid { padding: 14px; display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); align-items: start; }
.cashier-grid .staff-order { margin: 0; }
.shift-overlay { position: fixed; inset: 0; z-index: 200; background: rgba(17,24,39,.92); color: #fff; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px; padding: 24px; text-align: center; }
.shift-overlay button { background: #16a34a; color: #fff; border: 0; border-radius: 18px; padding: 20px 34px; font-size: 1.2rem; font-weight: 800; display: flex; gap: 10px; align-items: center; }
.shift-overlay i { width: 26px; height: 26px; }
.alarm-banner { position: fixed; bottom: 16px; left: 50%; transform: translateX(-50%); z-index: 150; background: #f59e0b; color: #111; font-weight: 800; padding: 12px 20px; border-radius: 99px; box-shadow: var(--shadow-lg); display: none; align-items: center; gap: 8px; }
.alarm-banner.show { display: flex; animation: shake .5s ease-in-out infinite alternate; }
@keyframes shake { from { transform: translateX(-50%) rotate(-1.5deg); } to { transform: translateX(-50%) rotate(1.5deg); } }

/* ===================== Busy mode ===================== */
.busy-banner { display: flex; align-items: center; gap: 10px; margin: 0 0 14px; padding: 14px 16px; border-radius: 14px; background: #fff4e5; color: #8a4b00; border: 1px solid #ffd59a; font-weight: 700; }
.busy-banner svg { flex: 0 0 auto; width: 20px; height: 20px; }
.busy-toggle { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface); font-weight: 700; font-size: .85rem; cursor: pointer; user-select: none; }
.busy-toggle input { position: absolute; opacity: 0; pointer-events: none; }
.busy-switch { position: relative; width: 38px; height: 22px; border-radius: 999px; background: #cfd4dc; transition: background .2s; flex: 0 0 auto; }
.busy-switch::after { content: ''; position: absolute; top: 3px; inset-inline-start: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: transform .2s; box-shadow: 0 1px 3px rgba(0,0,0,.25); }
.busy-toggle.on { border-color: #f59e0b; background: #fff4e5; color: #8a4b00; }
.busy-toggle.on .busy-switch { background: #f59e0b; }
.busy-toggle.on .busy-switch::after { transform: translateX(16px); }
[dir="rtl"] .busy-toggle.on .busy-switch::after { transform: translateX(-16px); }
.busy-strip { padding: 10px 16px; background: #f59e0b; color: #fff; font-weight: 800; text-align: center; }

/* ===================== Category bar styles (admin: Categories) ===================== */
.categories-bar.cat-static { position: static; }
body.cat-bar-static .menu-category-section { scroll-margin-top: calc(var(--header-h) + 12px); }
.categories-bar.cat-style-pills { gap: 8px; padding: 12px 16px; }
.cat-style-pills .category-chip { width: auto; flex-direction: row; padding: 9px 16px; border-radius: 999px; background: var(--surface); border: 1px solid var(--border); transition: background .15s, color .15s, border-color .15s; }
.cat-style-pills .category-chip span { font-size: .86rem; white-space: nowrap; }
.cat-style-pills .category-chip.active { background: var(--accent); border-color: var(--accent); color: var(--accent-contrast, #fff); }
.categories-bar.cat-style-cards { gap: 10px; }
.cat-style-cards .category-chip { width: 92px; gap: 0; background: var(--surface); border: 2px solid var(--border); border-radius: 16px; overflow: hidden; transition: border-color .15s; }
.cat-style-cards .category-chip img { width: 100%; height: 70px; border-radius: 0; border: 0; }
.cat-style-cards .category-chip span { display: block; width: 100%; padding: 6px 4px 7px; font-size: .74rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cat-style-cards .category-chip.active { border-color: var(--accent); }

/* iPhone: Safari zooms into any field under 16px; keep every input at 16px on phones. */
@media (max-width: 820px) { input:not([type="checkbox"]):not([type="radio"]), select, textarea { font-size: 16px !important; } }
