/* ============================================================
   3mak UI — نظام التصميم الموحّد (الطيار + المطعم)
   كل الأسماء مبدوءة بـ u- علشان مفيش تعارض مع أي كلاس موجود.
   الخط: IBM Plex Sans Arabic — مجاني (SIL Open Font License).
   ============================================================ */

/* ---------- 1) الخط ---------- */
@font-face{font-family:'IBM Plex Sans Arabic';font-style:normal;font-weight:400;font-display:swap;
  src:url('fonts/IBMPlexSansArabic-400-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:'IBM Plex Sans Arabic';font-style:normal;font-weight:400;font-display:swap;
  src:url('fonts/IBMPlexSansArabic-400-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;}
@font-face{font-family:'IBM Plex Sans Arabic';font-style:normal;font-weight:500;font-display:swap;
  src:url('fonts/IBMPlexSansArabic-500-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:'IBM Plex Sans Arabic';font-style:normal;font-weight:500;font-display:swap;
  src:url('fonts/IBMPlexSansArabic-500-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;}
@font-face{font-family:'IBM Plex Sans Arabic';font-style:normal;font-weight:600;font-display:swap;
  src:url('fonts/IBMPlexSansArabic-600-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:'IBM Plex Sans Arabic';font-style:normal;font-weight:600;font-display:swap;
  src:url('fonts/IBMPlexSansArabic-600-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;}
@font-face{font-family:'IBM Plex Sans Arabic';font-style:normal;font-weight:700;font-display:swap;
  src:url('fonts/IBMPlexSansArabic-700-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:'IBM Plex Sans Arabic';font-style:normal;font-weight:700;font-display:swap;
  src:url('fonts/IBMPlexSansArabic-700-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;}

/* ---------- 2) المتغيرات ---------- */
:root{
  --u-brand:#F55906; --u-brand-600:#DD4A00; --u-brand-400:#FF8A3D; --u-brand-50:#FFF3EA;
  --u-ink-900:#101828; --u-ink-700:#344054; --u-ink-500:#667085; --u-ink-300:#98A2B3;
  --u-line:#EAECF0; --u-bg:#F7F8FA;
  --u-ok:#0E9F6E; --u-ok-bg:#ECFDF3; --u-bad:#D92D20; --u-bad-bg:#FEF3F2; --u-info:#175CD3;
  --u-sh1:0 1px 2px rgba(16,24,40,.05); --u-sh2:0 4px 16px rgba(16,24,40,.09); --u-sh3:0 12px 32px rgba(16,24,40,.14);
  --u-r-card:18px; --u-r-btn:14px; --u-r-inp:15px; --u-r-sheet:26px;
  --u-tabbar:74px;
}

/* ---------- 3) أساسيات آمنة (بتحل كسر الكلمات) ---------- */
/* !important مقصود: الصفحة فيها قاعدة html body{...!important} للخط، فمحتاجين نفس التحديد أو أعلى.
   لو الخط مش ظاهر بعد التركيب، دي أشهر حاجة بتحصل. */
html body,html body button,html body input,html body select,html body textarea,html body *{
  font-family:'IBM Plex Sans Arabic',system-ui,-apple-system,'Segoe UI',Roboto,Arial,sans-serif!important}
html body{overflow-wrap:break-word!important;word-break:normal!important;hyphens:none!important;-webkit-text-size-adjust:100%}
.u-num{font-variant-numeric:tabular-nums}
.u-nb{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;min-width:0}
.u-flex{display:flex;align-items:center;gap:10px;min-width:0}

/* ---------- 4) الهيدر ---------- */
.u-hdr{height:60px;display:flex;align-items:center;justify-content:space-between;padding:0 14px;
  background:linear-gradient(120deg,#FF7C33 0%,#F55906 55%,#E24C00 100%);
  box-shadow:0 2px 10px rgba(245,89,6,.18);position:relative;z-index:50}
.u-logo{color:#fff;font-weight:700;font-size:22px;letter-spacing:-.4px;direction:ltr;display:flex;align-items:baseline;gap:3px}
.u-logo span{font-weight:500;font-size:15px;opacity:.95}
.u-hdr .u-acts{display:flex;align-items:center;gap:8px}
.u-iconbtn{width:40px;height:40px;border-radius:13px;background:rgba(255,255,255,.18);color:#fff;border:0;
  display:grid;place-items:center;position:relative;transition:background .16s ease,transform .12s ease}
.u-iconbtn:active{transform:scale(.96);background:rgba(255,255,255,.28)}
.u-badge{position:absolute;top:-3px;left:-3px;min-width:18px;height:18px;border-radius:99px;background:#fff;color:var(--u-brand-600);
  font-size:10.5px;font-weight:700;display:grid;place-items:center;border:2px solid var(--u-brand);padding:0 3px}

/* ---------- 5) الشريط السفلي ---------- */
.u-tabbar{position:fixed;left:0;right:0;bottom:0;height:var(--u-tabbar);background:#fff;border-top:1px solid var(--u-line);
  display:grid;grid-template-columns:repeat(5,1fr);z-index:900;padding-bottom:env(safe-area-inset-bottom)}
.u-tab{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:4px;border:0;background:none;
  color:var(--u-ink-300);font-family:inherit;font-size:10.5px;font-weight:600;min-width:0}
.u-tab svg{width:22px;height:22px;stroke:currentColor;fill:none;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.u-tab.on{color:var(--u-brand)}
.u-tab.on svg{stroke-width:2.1}
.u-has-tabbar{padding-bottom:calc(var(--u-tabbar) + env(safe-area-inset-bottom))}

/* ---------- 6) الأزرار ---------- */
.u-btn{border:0;border-radius:var(--u-r-btn);min-height:50px;padding:0 16px;font-family:inherit;font-size:14.5px;font-weight:700;
  display:inline-flex;align-items:center;justify-content:center;gap:7px;transition:transform .12s ease,box-shadow .16s ease,opacity .16s ease;
  -webkit-tap-highlight-color:transparent}
.u-btn:active{transform:scale(.985)}
.u-btn--primary{background:linear-gradient(180deg,#FF6A16,#F55906);color:#fff;box-shadow:0 8px 18px rgba(245,89,6,.26)}
.u-btn--primary:active{background:linear-gradient(180deg,#DD4A00,#C04000);box-shadow:0 4px 10px rgba(245,89,6,.22)}
.u-btn--outline{background:#fff;color:var(--u-brand-600);border:1.5px solid #FFD3B8}
.u-btn--ghost{background:var(--u-bg);color:var(--u-ink-700)}
.u-btn--danger{background:var(--u-bad);color:#fff}
.u-btn[disabled],.u-btn.is-loading{opacity:.5;box-shadow:none;pointer-events:none}
.u-btn--block{width:100%}
.u-btn--sm{min-height:42px;font-size:13.5px;border-radius:12px;padding:0 18px}

/* ---------- 7) الكروت ---------- */
.u-card{background:#fff;border:1px solid var(--u-line);border-radius:var(--u-r-card);box-shadow:var(--u-sh1);padding:14px}
.u-card--pad0{padding:0}
.u-row{display:flex;align-items:center;justify-content:space-between;gap:10px}
.u-row>span{flex:1;min-width:0;text-align:right}
.u-row>b{flex:0 0 auto;white-space:nowrap}
.u-muted{color:var(--u-ink-500);font-size:12.5px;font-weight:500}
.u-title{font-size:17px;font-weight:700;color:var(--u-ink-900)}
.u-sec{display:flex;align-items:center;justify-content:space-between;margin:2px 2px 8px}
.u-sec h3{font-size:14px;font-weight:700}
.u-sec .u-count{font-size:11.5px;color:var(--u-ink-500);font-weight:600}

/* ---------- 8) البِلز والحالة ---------- */
.u-pill{display:inline-flex;align-items:center;gap:8px;background:#fff;border-radius:999px;min-height:44px;padding:0 14px;
  font-size:13.5px;font-weight:600;color:var(--u-ink-700);box-shadow:var(--u-sh2);max-width:100%}
.u-pill b{font-weight:700;color:var(--u-ink-900)}
.u-dot{width:9px;height:9px;border-radius:50%;background:var(--u-ok);box-shadow:0 0 0 4px rgba(14,159,110,.15);flex:0 0 auto}
.u-dot--off{background:var(--u-bad);box-shadow:0 0 0 4px rgba(217,45,32,.15)}
.u-chip{display:inline-flex;align-items:center;gap:7px;background:var(--u-ok-bg);color:#067647;font-size:12px;font-weight:700;
  padding:7px 12px;border-radius:99px}
.u-tag{background:var(--u-brand-50);color:var(--u-brand-600);font-size:11.5px;font-weight:700;padding:4px 10px;border-radius:99px;white-space:nowrap}

/* ---------- 9) تنبيه بعرض الشاشة (بدل العمود الضيق) ---------- */
.u-banner{display:grid;grid-template-columns:34px 1fr;grid-template-areas:"ic t" "b b";gap:9px 10px;
  background:var(--u-bad-bg);border:1px solid #FECDCA;border-radius:18px;padding:12px 13px;box-shadow:var(--u-sh2);margin:10px 16px}
.u-banner__ic{grid-area:ic;width:34px;height:34px;border-radius:11px;background:#FEE4E2;color:var(--u-bad);display:grid;place-items:center}
.u-banner__t{grid-area:t;min-width:0}
.u-banner__t b{display:block;font-size:14px;font-weight:700;color:#912018}
.u-banner__t span{display:block;font-size:12px;color:#B42318;line-height:1.55;margin-top:2px}
.u-banner .u-btn{grid-area:b;min-height:38px;font-size:13px;border-radius:11px;width:100%}
.u-banner--info{background:#EFF8FF;border-color:#B2DDFF}
.u-banner--info .u-banner__ic{background:#D1E9FF;color:var(--u-info)}
.u-banner--info .u-banner__t b{color:#194185}
.u-banner--info .u-banner__t span{color:#175CD3}

/* ---------- 10) الحقول ---------- */
.u-field{margin-bottom:12px}
.u-field label{display:block;font-size:12.5px;font-weight:600;color:var(--u-ink-700);margin-bottom:6px}
.u-input{height:54px;width:100%;border-radius:var(--u-r-inp);border:1.5px solid var(--u-line);background:#FCFCFD;
  padding:0 14px;font-family:inherit;font-size:15px;font-weight:600;color:var(--u-ink-900);outline:none}
.u-input::placeholder{color:var(--u-ink-300);font-weight:500}
.u-input:focus{border-color:var(--u-brand);background:#fff;box-shadow:0 0 0 4px rgba(245,89,6,.10)}

/* ---------- 11) الشيت والإحصائيات ---------- */
.u-sheet{background:#fff;border-radius:var(--u-r-sheet) var(--u-r-sheet) 0 0;box-shadow:0 -10px 34px rgba(16,24,40,.10);padding:8px 16px 0}
.u-grab{width:42px;height:4px;border-radius:99px;background:#E4E7EC;margin:2px auto 14px}
.u-stats{display:grid;grid-template-columns:repeat(3,1fr);gap:8px}
.u-stat{background:var(--u-bg);border-radius:16px;padding:10px 6px;text-align:center;min-width:0}
.u-stat__v{font-size:20px;font-weight:700;line-height:1.25;font-variant-numeric:tabular-nums}
.u-stat__l{font-size:11px;color:var(--u-ink-500);font-weight:500;margin-top:2px;line-height:1.3}

/* ---------- 12) الحالة الفاضية ---------- */
.u-empty{background:#fff;border:1px solid var(--u-line);border-radius:20px;box-shadow:var(--u-sh1);padding:26px 18px;text-align:center}
.u-empty__ill{width:66px;height:66px;border-radius:50%;background:var(--u-brand-50);color:var(--u-brand);display:grid;place-items:center;margin:0 auto 12px}
.u-empty h4{font-size:16px;font-weight:700;margin-bottom:5px}
.u-empty p{font-size:12.5px;color:var(--u-ink-500);line-height:1.6;margin-bottom:14px}

/* ---------- 13) صف قائمة ---------- */
.u-lrow{display:flex;align-items:center;gap:12px;background:#fff;border:1px solid var(--u-line);border-radius:18px;
  padding:13px 14px;box-shadow:var(--u-sh1);min-width:0}
.u-lrow__sq{width:38px;height:38px;border-radius:12px;background:var(--u-brand-50);color:var(--u-brand);display:grid;place-items:center;flex:0 0 auto}
.u-lrow__t{flex:1;min-width:0;font-size:14px;font-weight:700}
.u-lrow__s{font-size:11.5px;color:var(--u-ink-500);font-weight:500;margin-top:2px}

/* ---------- 14) مفتاح تشغيل ---------- */
.u-switch{width:48px;height:28px;border-radius:99px;background:#D0D5DD;position:relative;flex:0 0 auto;border:0;transition:background .18s ease}
.u-switch i{position:absolute;top:3px;right:3px;width:22px;height:22px;border-radius:50%;background:#fff;box-shadow:0 1px 3px rgba(0,0,0,.2);transition:transform .18s ease}
.u-switch.on{background:var(--u-ok)}
.u-switch.on i{transform:translateX(-20px)}

/* ---------- 15) أدوات ---------- */
.u-skel{background:linear-gradient(90deg,#F2F4F7 25%,#E9ECF1 37%,#F2F4F7 63%);background-size:400% 100%;animation:u-sh 1.2s ease-in-out infinite;border-radius:10px}
@keyframes u-sh{0%{background-position:100% 0}100%{background-position:0 0}}
@media (prefers-reduced-motion:reduce){*{animation-duration:.01ms!important;transition-duration:.01ms!important}}

/* ---------- 16) مكوّنات خاصة بكارت الطلب (الطيار) ---------- */
.u-oid{font-size:12px;color:var(--u-ink-500);font-weight:600;direction:ltr}
.u-oname{font-size:17px;font-weight:700;margin:6px 0 5px}
.u-oaddr{display:flex;align-items:center;gap:6px;font-size:12.5px;color:var(--u-ink-500);margin-bottom:11px;min-width:0}
.u-cash{background:#F5FBF8;border:1px solid #D9F0E4;border-radius:13px;padding:10px 12px;font-size:13px;font-weight:600;
  color:#05603A;display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:12px}
.u-cash b{font-size:17px;font-weight:700;font-variant-numeric:tabular-nums;white-space:nowrap}
.u-actions{display:grid;grid-template-columns:1.4fr 1fr;gap:8px}
.u-actions .u-btn{min-height:48px;font-size:13.5px}
@media (max-width:340px){.u-actions{grid-template-columns:1fr}}

/* ---------- 17) كارت المتجر (المطعم) ---------- */
.u-store{display:flex;align-items:center;gap:12px;background:#fff;border:1px solid var(--u-line);
  border-radius:20px;padding:14px;box-shadow:var(--u-sh1);min-width:0}
.u-store__ava{width:46px;height:46px;border-radius:14px;background:linear-gradient(150deg,#FF8A3D,#F55906);
  display:grid;place-items:center;color:#fff;font-weight:700;font-size:19px;flex:0 0 auto}
.u-store__nm{font-size:16px;font-weight:700;line-height:1.35;min-width:0}
.u-store__up{font-size:11.5px;color:var(--u-ink-500);font-weight:500;margin-top:2px}
.u-store__sw{display:flex;flex-direction:column;align-items:center;gap:4px;margin-inline-start:auto;flex:0 0 auto}
.u-store__sw span{font-size:10.5px;font-weight:700;color:#067647}
.u-store__sw.off span{color:var(--u-bad)}

/* ---------- 18) ما فوق الشريط السفلي ---------- */
/* الشريط السفلي ثابت؛ أي زرار/بار ثابت تحت لازم يطلع فوقه */
body.u-has-tabbar #fab,body.u-has-tabbar .u-fab{bottom:calc(var(--u-tabbar) + env(safe-area-inset-bottom))!important}
