/* Final warm Arabic identity, selected with logo 01. */
@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Sans+Arabic:wght@400;500;600;700&display=swap');
:root{
  /* الألوان الأساسية */
  --ink:#30251F; --ink-soft:#7B6A5B; --ink-faint:#999999;
  --paper:#FFF8EE; --surface:#FFFDFA; --line:#EDDFCF; --line-strong:#DCC6B0;
  --teal:#C9401D; --teal-deep:#9F2E14; --teal-tint:#FDE9DE; --teal-hover:#B23717; --teal-tint-deep:#F9DCCB;
  --gold:#EAB94F; --gold-tint:#FFF0CB; --gold-hover:#E0AB3B;
  /* ألوان دلالية */
  --danger:#B5453A; --danger-tint:#F8E9E7; --danger-tint-deep:#F1D6D1;
  --success:#2F7A52; --success-tint:#E5F2EA;
  --warning:#8A5B00; --whatsapp:#1f9d55;
  --on-gold:#2A1D06; --gold-ink:#5C4315; --on-teal-soft:#CBD8D3;
  /* الحواف والظلال */
  --radius-s:12px; --radius-m:20px; --radius-l:28px;
  --shadow:0 10px 30px #5A2A1110;
  --shadow-sm:0 1px 2px rgba(48,37,31,.07);
  --shadow-lg:0 18px 44px -14px rgba(48,37,31,.28);
  --focus-ring:0 0 0 3px rgba(201,64,29,.18);
  /* مقياس المسافات */
  --space-1:4px; --space-2:8px; --space-3:12px; --space-4:16px; --space-5:24px; --space-6:32px;
  /* مقياس الخط */
  --text-xs:11px; --text-sm:12.5px; --text-md:14px; --text-lg:16px; --text-xl:20px;
}
body{font-family:'IBM Plex Sans Arabic',sans-serif;background:#EDE3D6;line-height:1.65}#appRoot{background:var(--paper);box-shadow:0 0 0 1px #DDCDB9,0 20px 90px #61402D15}button,input,select,textarea{font-family:inherit}button:focus-visible,a:focus-visible{outline:3px solid #30251F;outline-offset:3px}
#topbar{background:var(--paper);color:var(--ink);padding:24px 22px 16px;border-bottom:0;gap:10px}#topbar .tb-title{font-size:21px;line-height:1.35}#topbar .tb-title:before{content:'';display:block;float:right;width:36px;height:36px;background:url('/logo.svg') center/contain no-repeat;margin-left:10px;margin-top:4px}#topbar .tb-title small{color:var(--ink-soft);font-size:12px;margin-top:5px;font-weight:400}.icon-btn{background:#F0E5D6;color:var(--ink);border-radius:14px;width:42px;height:42px}.icon-btn .dot{border-color:var(--paper)}
#searchBar{background:var(--paper);padding:4px 22px 18px}#searchBar .box{border-radius:14px;background:#F1E7DA;border:1px solid transparent;padding:14px 16px}#searchBar .box:focus-within{border-color:var(--teal)}#searchBar input{font-size:14px;min-width:0}#mainContent{padding:12px 22px 150px}
.section-head{margin:30px 0 16px}.section-head h3{font-size:21px;font-weight:700;letter-spacing:-.5px}.section-head .more{font-size:13px;border-bottom:1px solid currentColor}.banner-strip{gap:12px;scroll-snap-type:x mandatory}.banner{min-width:91%;padding:28px 24px 34px;border-radius:24px;background:#E75025;color:#FFFDFA;scroll-snap-align:start;border:0}.banner h4{font-size:25px;max-width:230px;line-height:1.45;letter-spacing:-.5px}.banner p{font-size:14px;margin-top:12px;color:#FFE5D4;max-width:220px}.banner i{font-size:100px;opacity:.16;left:-2px;bottom:-5px;transform:rotate(-12deg)}.banner:nth-child(2){background:#F4CB63;color:#30251F}.banner:nth-child(2) p{color:#645020}
.cat-scroll{gap:12px;padding:2px 0 8px}.cat-chip{border:0;background:transparent;padding:0;min-width:76px;gap:10px}.cat-chip .em{background:#F2E7D9;border-radius:23px;width:68px;height:68px;display:flex;align-items:center;justify-content:center;font-size:27px;border:1px solid #EADCC9}.cat-chip span{font-size:12px;line-height:1.5;font-weight:600}.cat-chip.active{background:transparent}.cat-chip.active .em{background:var(--teal-tint);border-color:var(--teal)}
.card,.merchant-card,.order-card{padding:20px;border:1px solid var(--line);box-shadow:none;border-radius:22px}.card h3{font-size:19px;margin:0 0 16px}.list-gap{gap:16px}.product-grid{gap:14px}.product-card{border:0;background:transparent;overflow:visible;border-radius:0}.product-card .thumb{border-radius:20px;aspect-ratio:1;background-color:#F0E4D6}.product-card .body{padding:12px 2px 8px}.product-card h5{font-size:15px;line-height:1.55;min-height:46px;font-weight:600}.product-card .price{font-size:18px;letter-spacing:-.4px;color:var(--ink)}.product-card .old-price{font-size:12px}.product-card .price-row{margin-bottom:12px}.product-card .add-btn{padding:11px;background:#FFFDF9;color:var(--teal);border:1px solid #D7B5A2;border-radius:12px;font-size:13px}.product-card .add-btn:hover{background:var(--teal);color:white}.product-card .disc{border-radius:8px;padding:4px 8px}.qty-stepper{border-radius:12px}.qty-stepper button{height:38px;width:36px}
#bottomNav{bottom:14px;width:calc(100% - 28px);max-width:452px;border:1px solid #E1CFBC;border-radius:24px;background:#FFFDFAF5;box-shadow:0 8px 35px #50301A18;padding:10px 5px calc(10px + env(safe-area-inset-bottom));backdrop-filter:blur(16px)}.nav-btn{gap:6px;font-size:11px;padding:4px 0;font-weight:600}.nav-btn i{font-size:19px}.nav-btn.active{color:var(--teal)}.nav-btn.active>span:first-child{background:var(--teal-tint);width:42px;border-radius:10px;padding:3px}.nav-btn .badge{margin-top:-18px}
.btn{padding:15px 18px;font-size:15px;border-radius:14px;font-weight:600;min-height:48px}.btn-primary{background:var(--teal)}.btn-ghost{background:#F3EADF;color:#543D2E}.btn-outline{border-width:1px}.btn-sm{padding:10px 14px;min-height:40px;font-size:13px}.field label{font-size:13px;color:var(--ink);font-weight:500;margin-bottom:9px}.field input,.field select,.field textarea{border:1px solid #DCCBB8;padding:15px;border-radius:12px;background:#FFFDFA;font-size:15px}.field{margin-bottom:20px}
.stat-grid{gap:14px}.stat-card{border:0;background:#F1E6D6;padding:20px;border-radius:20px}.stat-card:nth-child(2){background:#F8DECD}.stat-card .num{color:var(--ink);font-size:28px;font-weight:700;line-height:1.3;letter-spacing:-.6px}.stat-card .lbl{font-size:12px;margin-top:10px;color:#6E5646}.badge-chip{border-radius:8px;font-size:11px}.hint-box{background:#FFF0CE;border:1px solid #EDD49B;border-radius:16px;color:#6D5227;line-height:1.9}.seg{border-radius:12px;background:#F0E5D6;padding:4px}.seg button{border-radius:9px;min-height:40px}.seg button.active{background:#30251F;color:#FFF8EE}.status-pill{border-radius:6px}.summary-row{padding:9px 0;font-size:14px}.summary-row.total{border-top:1px solid #CDB9A1;font-size:21px}.cart-line{padding:18px 0;gap:14px}.cart-line .thumb{width:70px;height:70px;border-radius:14px}.cart-line .info h5{font-size:15px;line-height:1.5}.cart-line .info .m{font-size:12px}
.modal-sheet{border-radius:28px 28px 0 0;padding:26px 22px calc(28px + env(safe-area-inset-bottom));background:var(--paper)}.modal-head h3{font-size:21px}.modal-close{width:40px;height:40px;background:#F0E5D6;color:var(--ink)}.modal-backdrop{background:#34231780;backdrop-filter:blur(3px)}.empty-state{padding:64px 24px}.empty-state i{color:#C9B59C;font-size:44px}.empty-state h4{font-size:19px}.empty-state p{font-size:14px}
#authScreen{background:#E75025}.auth-hero{padding:56px 24px 34px}.auth-hero .logo{font-size:42px;letter-spacing:-1px}.auth-hero .logo img{width:88px;height:88px;border-radius:24px!important}.auth-hero p{color:#FFE9D4;font-size:15px}.auth-card{border-radius:32px 32px 0 0;padding:30px 24px 50px}.auth-tabs{background:#EFE2D1;border-radius:14px;padding:5px}.auth-tab{border-radius:10px;font-weight:600}.role-opt{border-radius:16px}.role-opt.active{background:#FCE3D4}.auth-error{border-radius:12px}.divider{margin:24px 0}#loadingScreen{background:#E75025}
body>#pwaInstallBtn{background:#30251F!important;border:1px solid #30251F!important;font-family:inherit!important;border-radius:12px!important;font-size:12px!important;max-width:230px!important;bottom:158px!important}#toast{font-family:inherit;border-radius:12px}
@media(min-width:481px){body{background:#EDE3D6}#bottomNav{position:fixed;left:50%;transform:translateX(-50%)}}
@media(prefers-reduced-motion:reduce){*{animation:none!important;transition:none!important;scroll-behavior:auto!important}}
.cat-chip .em i{font-size:25px;color:#72513A}.cat-chip.active .em i{color:var(--teal)}

.auth-hero .logo img{width:88px!important;height:88px!important;border-radius:0!important;margin:0 auto 16px!important}#loadingScreen .brand img{display:inline-block;width:48px;height:48px;vertical-align:middle;margin-inline-end:10px}.brand-loading{display:flex;align-items:center;gap:12px}

/* Admin catalog: reserve readable text space and a separate mobile action row. */
.admin-catalog-row{display:grid;grid-template-columns:56px minmax(0,1fr) auto;gap:12px;align-items:center}
.admin-catalog-thumb{width:56px;height:56px;border-radius:12px;display:grid;place-items:center}
.admin-catalog-info{min-width:0;overflow-wrap:anywhere;line-height:1.8}
.admin-catalog-info>b{display:block}
.admin-catalog-actions{display:flex;gap:8px;align-items:center}
.admin-catalog-actions .icon-btn{flex:none;min-width:44px;min-height:44px}
@media(max-width:560px){
 .admin-catalog-row{grid-template-columns:56px minmax(0,1fr)}
 .admin-catalog-actions{grid-column:1/-1;justify-content:flex-end;border-top:1px solid var(--line);padding-top:12px}
}

/* ---------- تحسينات واجهة العميل ---------- */
/* قائمة الفرز في التصفح */
.sort-select{appearance:none;-webkit-appearance:none;border:1px solid var(--line-strong);border-radius:12px;background:var(--surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%237B6A5B' stroke-width='1.6' fill='none' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat left 12px center;padding:9px 14px 9px 30px;font-family:inherit;font-size:12.5px;font-weight:600;color:var(--ink);cursor:pointer;transition:border-color .15s,box-shadow .15s}
.sort-select:hover{border-color:var(--teal)}
.sort-select:focus{outline:none;border-color:var(--teal);box-shadow:var(--focus-ring)}
/* بطاقات الطلبات */
.order-card{transition:transform .15s,box-shadow .15s}
.order-card:hover{box-shadow:var(--shadow-sm)}
.order-card:active{transform:scale(.995)}
.order-card .top-row{display:flex;justify-content:space-between;align-items:center;gap:8px}
.order-card .oid{font-weight:800;font-size:15px}
.order-card .status-pill{display:inline-flex;align-items:center;gap:5px}
.order-card .status-pill i{font-size:10px}
.order-card .date{display:flex;align-items:center;gap:6px}
.order-card .date i{font-size:11px;opacity:.7}
/* صفوف قائمة الحساب */
.menu-row{min-height:58px;transition:background-color .15s}
.menu-row:hover{background:#FFFBF3}
.menu-row:active{background:var(--teal-tint)}
.menu-row span{display:inline-flex;align-items:center}
.menu-row span>i{width:34px;height:34px;border-radius:11px;background:#F3EADF;display:inline-flex;align-items:center;justify-content:center;font-size:14px;margin-left:10px}
.menu-row>i:last-child{color:var(--ink-faint);font-size:13px}
/* الأزرار العائمة: بصمة أصغر على الموبايل + مساحة تمرير تكفي لتجاوزها */
#mainContent{padding-bottom:190px}
@media(max-width:480px){
  body>#pwaInstallBtn{font-size:11px!important;padding:8px 12px!important;max-width:205px!important;bottom:150px!important}
  .support-btn{padding:8px 12px;font-size:11.5px;bottom:96px}
}

/* ---------- تحسينات لوحة التاجر ---------- */
.qty-badge{display:inline-flex;align-items:center;justify-content:center;min-width:24px;height:20px;padding:0 5px;border-radius:7px;background:var(--teal-tint);color:var(--teal);font-size:11px;font-weight:800}
.order-item{font-size:12.5px;margin-bottom:6px}
.prod-title{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;line-height:1.55}
.info-lbl{display:inline-flex;align-items:center;gap:8px;color:var(--ink-soft);font-size:13px}
.info-lbl i{width:27px;height:27px;border-radius:9px;background:#F3EADF;color:#72513A;display:inline-flex;align-items:center;justify-content:center;font-size:11px}
.stat-card .stat-ic{font-size:15px;color:#9C6B48;margin-bottom:8px;display:block}
.rank-chip{display:inline-flex;align-items:center;justify-content:center;width:23px;height:23px;border-radius:8px;background:var(--gold-tint);color:var(--gold-ink);font-size:12px;font-weight:800}

/* ==== تحسينات شاشات السائق والمسوق ==== */
.status-pill{display:inline-flex;align-items:center;gap:5px}
.status-pill i{font-size:10px}

/* ==== تحسينات النوافذ المنبثقة والتنبيهات ==== */
@keyframes sheetUp{from{transform:translateY(26px);opacity:0}to{transform:translateY(0);opacity:1}}
@keyframes fadeIn{from{opacity:0}to{opacity:1}}
.modal-backdrop{animation:fadeIn .22s ease-out}
.modal-sheet{animation:sheetUp .3s cubic-bezier(.2,.8,.3,1)}
.modal-close{transition:background .15s,color .15s,transform .12s}
.modal-close:hover{background:#E4D4BE}
.modal-close:active{transform:scale(.92)}
#toast{box-shadow:0 10px 28px rgba(48,37,31,.28);padding:13px 22px}
