/* ======================================================================
   MARSA — Fresh Seafood Marketplace
   Shared design system. Every screen (customer / vendor / admin) loads
   this file. Do NOT redefine these tokens or components per-screen.
   ====================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&family=Fraunces:opsz,wght@9..144,500;9..144,600;9..144,700&family=Cairo:wght@400;500;600;700;800&display=swap');

:root{
  /* brand */
  --sea:#0B6FB8;        /* deep sea blue (primary) */
  --sea-deep:#064E84;   /* darker */
  --sea-soft:#E8F3FA;   /* tinted blue surface */
  --aqua:#00C2CB;       /* teal accent / CTAs */
  --aqua-deep:#019AA1;
  --fresh:#7DD957;      /* "landed today" lime */
  --fresh-deep:#3C7A1E;
  --ice:#F4F9FC;        /* icy white bg */
  --ink:#0A2540;        /* deep navy text */
  --muted:#6B8299;      /* muted slate */
  --card:#FFFFFF;
  --line:#E5EEF4;
  --line-2:#D6E4EE;

  /* status */
  --ok:#1FA463; --ok-soft:#E4F6EC;
  --warn:#E08A00; --warn-soft:#FEF1DC;
  --danger:#E0463C; --danger-soft:#FCE8E6;
  --info:#0B6FB8;  --info-soft:#E8F3FA;

  /* tiers */
  --gold-bg:#FFF1CC; --gold-fg:#9A6B00;
  --silver-bg:#ECF1F5; --silver-fg:#5B7185;
  --bronze-bg:#F6E7DA; --bronze-fg:#9A5B27;

  /* shape & shadow */
  --r-sm:10px; --r:16px; --r-lg:20px; --r-xl:26px; --r-pill:999px;
  --sh-sm:0 4px 14px rgba(11,111,184,.07);
  --sh:0 8px 24px rgba(6,78,132,.12);
  --sh-lg:0 14px 40px rgba(6,78,132,.18);
}

*{margin:0;padding:0;box-sizing:border-box;-webkit-tap-highlight-color:transparent}
html{scroll-behavior:smooth}
body{
  font-family:'Plus Jakarta Sans',system-ui,sans-serif;
  color:var(--ink);
  background:#cdd9e2;
  -webkit-font-smoothing:antialiased;
}
a{color:inherit;text-decoration:none}
img{display:block;max-width:100%}
button{font-family:inherit;cursor:pointer}
.serif{font-family:'Fraunces',Georgia,serif}

/* ============================ MOBILE SHELL ============================ */
.app-bg{display:flex;justify-content:center;min-height:100vh}
.phone{
  width:100%;max-width:430px;background:var(--ice);
  height:100vh;height:100dvh;position:relative;overflow:hidden;
  box-shadow:0 0 60px rgba(11,111,184,.18);
  display:flex;flex-direction:column;
}
/* the scrollable middle — header + .tabbar stay pinned, only this scrolls */
.phone-scroll{flex:1;min-height:0;overflow-y:auto;-webkit-overflow-scrolling:touch;padding-bottom:8px}

/* status bar */
.statusbar{
  display:flex;justify-content:space-between;align-items:center;
  padding:14px 22px 6px;font-size:15px;font-weight:700;color:#fff;
  position:relative;z-index:3;
}
.statusbar.dark{color:var(--ink)}
.statusbar .right{display:flex;gap:7px;align-items:center;font-size:13px}
.batt{background:#fff;color:var(--sea);border-radius:4px;padding:1px 5px;font-size:11px;font-weight:800}
.statusbar.dark .batt{background:var(--sea);color:#fff}

/* generic app top bar (white, with back) */
.topbar{
  display:flex;align-items:center;gap:12px;padding:10px 16px 14px;
  background:var(--card);border-bottom:1px solid var(--line);position:relative;z-index:3;
}
.topbar .back{
  width:38px;height:38px;border-radius:12px;border:1px solid var(--line);background:#fff;
  display:flex;align-items:center;justify-content:center;font-size:20px;color:var(--ink);flex-shrink:0;
}
.topbar .ttl{font-size:17px;font-weight:800;letter-spacing:-.2px;flex:1;min-width:0;
  white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.topbar .act{width:38px;height:38px;border-radius:12px;border:1px solid var(--line);background:#fff;
  display:flex;align-items:center;justify-content:center;font-size:17px;color:var(--ink);position:relative}
/* invisible 44px touch target (centred over the 38px button) — no visual change */
.topbar .act::before{content:"";position:absolute;top:50%;left:50%;
  width:44px;height:44px;transform:translate(-50%,-50%)}
.topbar.onsea{background:transparent;border-bottom:none}
/* over a sea gradient OR a vendor banner photo these buttons can wash out, so
   darken the fill and add a faint ring + shadow — the close/back glyph stays
   AA-legible on any backdrop without changing the layout. */
.topbar.onsea .back,.topbar.onsea .act{background:rgba(10,37,64,.32);border-color:rgba(255,255,255,.22);
  color:#fff;backdrop-filter:blur(4px);-webkit-backdrop-filter:blur(4px);
  box-shadow:0 2px 8px rgba(6,78,132,.22)}
.topbar.onsea .ttl{color:#fff;text-shadow:0 1px 6px rgba(6,78,132,.45)}

/* ============================ HERO ============================ */
.hero{
  background:linear-gradient(160deg,var(--sea) 0%,var(--sea-deep) 100%);
  padding:0 0 26px;border-radius:0 0 26px 26px;position:relative;overflow:hidden;
}
.hero::after{
  content:"";position:absolute;right:-40px;top:-30px;width:200px;height:200px;
  background:radial-gradient(circle,rgba(0,194,203,.35),transparent 70%);
}
.hero-sm{padding-bottom:18px}

/* hero shop BANNER (vendor branding). When a vendor has an on-spec 3:1
   banner, the page sets `style="--hero-banner:url(...)"` (or the bg via
   MarsaAssets.bannerStyle) and adds .has-banner. The banner image fills the
   hero UNDER a dark gradient scrim so the white title/sub text stays legible.
   No banner → no .has-banner → the existing sea gradient shows, unchanged. */
.hero.has-banner{background-image:var(--hero-banner);background-size:cover;background-position:center}
.hero.has-banner::before{
  content:"";position:absolute;inset:0;z-index:1;
  background:linear-gradient(180deg,rgba(6,78,132,.42) 0%,rgba(6,78,132,.62) 55%,rgba(10,37,64,.86) 100%);
}
.hero.has-banner>*{position:relative;z-index:2}

.deliver{display:flex;align-items:center;gap:6px;color:#fff;
  padding:4px 22px 14px;font-size:14px;position:relative;z-index:2}
.deliver b{font-weight:700}.deliver .chev{opacity:.8}
.tagline{color:#fff;padding:18px 22px 0;position:relative;z-index:2}
.tagline .eyebrow{font-size:12px;letter-spacing:2px;text-transform:uppercase;
  color:var(--aqua);font-weight:700;margin-bottom:4px}
.tagline h1{font-family:'Fraunces',serif;font-weight:600;font-size:26px;line-height:1.15}
.tagline h1 .accent{color:var(--fresh)}

/* search */
.searchbar{
  margin:0 18px;background:#fff;border-radius:16px;
  display:flex;align-items:center;gap:10px;padding:15px 18px;
  position:relative;z-index:2;box-shadow:0 8px 24px rgba(6,78,132,.25);
}
.searchbar input{border:none;outline:none;font-size:15px;font-family:inherit;width:100%;color:var(--ink);background:transparent}
.searchbar input::placeholder{color:#9DB2C4}
.searchbar.flat{box-shadow:none;border:1px solid var(--line)}

/* ============================ SECTIONS ============================ */
.section{padding:22px 18px 0}
.section.tight{padding-top:14px}
.rowhead{display:flex;align-items:center;justify-content:space-between;margin-bottom:14px}
.rowhead h2{font-size:19px;font-weight:800;letter-spacing:-.3px}
.rowhead .all,.rowhead .link{font-size:13px;color:var(--sea);font-weight:700}
.eyebrow-2{font-size:12px;letter-spacing:1.5px;text-transform:uppercase;color:var(--muted);font-weight:700}

/* categories */
.cats{display:grid;grid-template-columns:repeat(4,1fr);gap:12px;padding:18px 18px 0}
.cat{background:var(--card);border-radius:18px;padding:14px 6px 10px;text-align:center;
  border:1px solid var(--line);transition:transform .15s}
.cat:active{transform:scale(.94)}
.cat.on{border-color:var(--sea);background:var(--sea-soft)}
.cat .ic{font-size:26px;display:block;margin-bottom:6px}
.cat .lbl{font-size:11.5px;font-weight:600;color:var(--ink);line-height:1.2}
.cat .cnt{display:block;margin-top:3px;font-size:10px;font-weight:700;color:var(--aqua-deep);letter-spacing:.2px}
.cat.out{opacity:.55}
.cat.out .ic{filter:grayscale(1)}
.cat.out .cnt{color:var(--muted)}

/* hero brand mark (logo badge, top of the home hero) */
.hero .brandmark{position:absolute;top:80px;right:38px;width:72px;height:72px;border-radius:50%;
  background:rgba(255,255,255,.10);border:1px solid rgba(0,194,203,.55);
  display:flex;align-items:center;justify-content:center;backdrop-filter:blur(3px);z-index:2}
/* compact heroes (admin-app etc.): the 72px badge at top:80px overflows the short hero —
   shrink it and vertically centre it on the title row so it sits fully inside. */
.hero-sm .brandmark{top:50%;bottom:auto;transform:translateY(-50%);right:24px;width:58px;height:58px}
.hero-sm .brandmark svg{width:32px;height:34px}
[dir="rtl"] .hero-sm .brandmark{right:auto;left:24px}

/* ============================ BADGES / PILLS ============================ */
.freshtag{display:inline-flex;align-items:center;gap:5px;background:rgba(125,217,87,.16);
  color:var(--fresh-deep);font-size:11px;font-weight:700;padding:4px 9px;border-radius:20px}
.freshtag .dot{width:6px;height:6px;border-radius:50%;background:var(--fresh)}
/* On-image freshness chip. Sits over photos, so it needs hard separation from
   whatever pixels are behind it: a hairline white ring + a soft drop shadow lift
   it off the image, and the text drops to 11px (the global min) so it stays
   legible. The lime fill (#7DD957) on #1E3A0E ink clears WCAG AA on its own; the
   ring guarantees the chip edge is visible even on a busy/bright photo. */
.badge-fresh{position:absolute;top:10px;left:10px;background:var(--fresh);color:#152B0A;
  font-size:11px;font-weight:800;padding:4px 9px;border-radius:9px;letter-spacing:.2px;
  box-shadow:0 1px 4px rgba(10,37,64,.28),0 0 0 1.5px rgba(255,255,255,.75) inset;
  text-shadow:0 1px 0 rgba(255,255,255,.25)}
.badge{display:inline-flex;align-items:center;gap:5px;font-size:11px;font-weight:800;
  padding:3px 9px;border-radius:var(--r-pill);letter-spacing:.2px}
.badge.aqua{background:rgba(0,194,203,.14);color:var(--aqua-deep)}
.badge.sea{background:var(--sea-soft);color:var(--sea)}
.badge.ok{background:var(--ok-soft);color:var(--ok)}
.badge.warn{background:var(--warn-soft);color:var(--warn)}
.badge.danger{background:var(--danger-soft);color:var(--danger)}
.badge.ink{background:#EEF3F7;color:var(--ink)}
.tier{font-size:10px;font-weight:800;padding:2px 7px;border-radius:6px;letter-spacing:.4px;text-transform:uppercase}
.tier.gold{background:var(--gold-bg);color:var(--gold-fg)}
.tier.silver{background:var(--silver-bg);color:var(--silver-fg)}
.tier.bronze{background:var(--bronze-bg);color:var(--bronze-fg)}
.verified{display:inline-flex;align-items:center;gap:4px;color:var(--ok);font-size:11px;font-weight:700}

/* ---- vendor-type chip (REUSABLE) ----
   ONE compact, de-emphasized chip naming how the vendor trades — a small icon
   + a SHORT label (e.g. "🛒 Mobile" / "🏬 Shop"). Deliberately quieter than
   the price/name: hairline outline, muted ink, no fill, so it reads as a
   secondary qualifier and never competes with the catch name or price. Sits in
   its own row under the vendor name (do NOT stack 4 colored pills). Consumed by
   customer + web product cards via the .vtype class. */
.vtype{display:inline-flex;align-items:center;align-self:center;gap:4px;
  background:transparent;border:1px solid var(--line-2);color:var(--muted);
  font-size:10.5px;font-weight:700;line-height:1.3;letter-spacing:.1px;
  padding:2px 8px;border-radius:var(--r-pill);white-space:nowrap;flex-shrink:0}
.vtype .vt-ic{font-size:11px;line-height:1}
.vtype .vt-lbl{display:inline-block}
/* the row that hosts the single vendor-type chip (one tidy line under the name) */
.vtype-row{display:flex;align-items:center;gap:6px;flex-wrap:wrap;margin-top:6px}

/* status pill (orders/deliveries) */
.spill{display:inline-flex;align-items:center;gap:6px;font-size:11.5px;font-weight:800;
  padding:5px 11px;border-radius:var(--r-pill)}
.spill::before{content:"";width:7px;height:7px;border-radius:50%;background:currentColor}
.spill.new{background:var(--info-soft);color:var(--sea)}
.spill.prep{background:var(--warn-soft);color:var(--warn)}
.spill.way{background:rgba(0,194,203,.14);color:var(--aqua-deep)}
.spill.done{background:var(--ok-soft);color:var(--ok)}
.spill.cancel{background:var(--danger-soft);color:var(--danger)}

/* chips / filters — these are NAVIGATION (category/filter selectors), so every
   chip must be reachable: WRAP instead of horizontal-scrolling behind a hidden
   scrollbar. No clipped/off-screen options, no edge mask needed. */
.chiprow{display:flex;flex-wrap:wrap;gap:9px;padding:2px 18px}
.chip{flex-shrink:0;background:#fff;border:1px solid var(--line);border-radius:var(--r-pill);
  padding:9px 15px;font-size:13px;font-weight:700;color:var(--muted);display:flex;align-items:center;gap:6px}
.chip.on{background:var(--sea);border-color:var(--sea);color:#fff}

/* ============================ BUTTONS ============================ */
.btn{display:inline-flex;align-items:center;justify-content:center;gap:8px;border:none;
  font-weight:800;font-size:15px;padding:14px 22px;border-radius:var(--r);transition:transform .12s,filter .15s}
.btn:active{transform:scale(.97)}
.btn-primary{background:var(--sea);color:#fff}
.btn-primary:active{background:var(--sea-deep)}
.btn-aqua{background:var(--aqua);color:#063b3d}
.btn-dark{background:var(--ink);color:#fff}
.btn-ghost{background:#fff;color:var(--sea);border:1.5px solid var(--line)}
.btn-soft{background:var(--sea-soft);color:var(--sea)}
.btn-danger{background:var(--danger);color:#fff}
.btn-ok{background:var(--ok);color:#fff}
.btn-block{display:flex;width:100%}
.btn-sm{padding:9px 14px;font-size:13px;border-radius:12px}
.btn-lg{padding:16px 26px;font-size:16px}
/* Canonical bulk-action bar — one look for every admin list (customers, vendors,
   approvals). White card, pinned to the BOTTOM of the list, hidden until ≥1 row is
   selected (.show). Actions use the shared .btn btn-* btn-sm buttons inside .bb-actions. */
.bulkbar{position:sticky;bottom:0;z-index:30;display:none;align-items:center;gap:12px;flex-wrap:wrap;
  background:#fff;border:1px solid var(--line);border-radius:14px;
  box-shadow:0 6px 24px rgba(11,111,184,.16);padding:12px 16px;margin-top:14px}
.bulkbar.show{display:flex}
.bulkbar .bb-count{font-weight:800;color:var(--sea);white-space:nowrap}
.bulkbar .bb-count .bb-n{font-variant-numeric:tabular-nums}
.bulkbar .bb-spacer{flex:1}
.bulkbar .bb-actions{display:flex;gap:8px;flex-wrap:wrap}
[dir="rtl"] .bulkbar{box-shadow:0 6px 24px rgba(11,111,184,.16)}
.icon-btn{width:34px;height:34px;border-radius:50%;display:flex;align-items:center;justify-content:center;
  background:var(--sea);color:#fff;border:none;font-size:18px}
.icon-btn.ghost{background:#fff;color:var(--sea);border:1px solid var(--line)}
.icon-btn:active{filter:brightness(.93)}
.fab{position:fixed;right:20px;bottom:96px;width:56px;height:56px;border-radius:18px;background:var(--sea);
  color:#fff;font-size:26px;display:flex;align-items:center;justify-content:center;box-shadow:var(--sh-lg);z-index:20}

/* ============================ PRODUCT CARDS ============================ */
/* product rail — a genuine CONTENT carousel: keeps horizontal scroll but now
   shows a VISIBLE slim scrollbar as the "more →" affordance (was hidden). */
.rail{display:flex;gap:14px;overflow-x:auto;padding:2px 18px 4px;
  scrollbar-width:thin;scrollbar-color:var(--line-2) transparent}
.rail::-webkit-scrollbar{height:6px}
.rail::-webkit-scrollbar-track{background:transparent}
.rail::-webkit-scrollbar-thumb{background:var(--line-2);border-radius:var(--r-pill)}
.rail::-webkit-scrollbar-thumb:hover{background:var(--muted)}
.catch{min-width:172px;background:var(--card);border-radius:var(--r-lg);overflow:hidden;
  border:1px solid var(--line);box-shadow:var(--sh-sm);transition:transform .15s,box-shadow .15s;
  display:flex;flex-direction:column}
.catch:active{transform:scale(.97)}
.catch .img{height:120px;position:relative;display:flex;align-items:center;justify-content:center;font-size:50px}
/* the body fills the card and lays its rows top-to-bottom so the price/add row
   sits flush on the card floor regardless of how many badges the catch carries —
   in a horizontal .rail this keeps every card the SAME height (no ragged edge). */
.catch .body{padding:12px 13px 14px;flex:1;display:flex;flex-direction:column;min-height:118px}
.catch .name{font-size:14.5px;font-weight:700;margin-bottom:3px;line-height:1.25;
  display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.catch .vendor{font-size:11.5px;color:var(--muted);margin-bottom:9px;display:flex;align-items:center;gap:4px;
  white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
/* push the price/add row to the bottom of the body so cards align */
.catch .meta{display:flex;align-items:center;justify-content:space-between;margin-top:auto}
.catch .price{font-size:15px;font-weight:800;color:var(--sea)}
.catch .price small{font-size:10px;color:var(--muted);font-weight:600}
.catch .add{width:30px;height:30px;border-radius:50%;background:var(--sea);color:#fff;border:none;
  font-size:18px;display:flex;align-items:center;justify-content:center;position:relative}
/* invisible 44px touch target (centred over the 30px button) — no visual change */
.catch .add::before{content:"";position:absolute;top:50%;left:50%;
  width:44px;height:44px;transform:translate(-50%,-50%)}
.catch .add:active{background:var(--sea-deep)}
/* pointer devices (web grid) get a gentle lift; touch frames ignore :hover */
@media(hover:hover){.catch:hover{box-shadow:var(--sh)}}
.catch.sold{opacity:.55}
.catch .stockbar{height:4px;background:var(--line);border-radius:3px;margin-top:9px;overflow:hidden}
.catch .stockbar>i{display:block;height:100%;background:var(--fresh);border-radius:3px}

/* product image gradients */
.c1{background:linear-gradient(135deg,#BDE5F2,#7FC9E8)}
.c2{background:linear-gradient(135deg,#FFD9C2,#FFB38A)}
.c3{background:linear-gradient(135deg,#C8E6CE,#94D3A6)}
.c4{background:linear-gradient(135deg,#D9D2F2,#B3A6E8)}
.c5{background:linear-gradient(135deg,#FFE7A8,#FFD15C)}
.c6{background:linear-gradient(135deg,#CDEFF0,#8FE0E3)}

/* product grid (2-col) */
.grid2{display:grid;grid-template-columns:1fr 1fr;gap:14px;padding:14px 18px}
.grid2 .catch{min-width:0}

/* ============================ LIST ROWS / VENDOR CARDS ============================ */
.vendor-card{background:var(--card);border:1px solid var(--line);border-radius:var(--r-lg);
  padding:14px;display:flex;gap:14px;align-items:center;margin-bottom:12px;transition:transform .15s}
.vendor-card:active{transform:scale(.985)}
.vendor-card .ava{width:58px;height:58px;border-radius:16px;flex-shrink:0;display:flex;align-items:center;
  justify-content:center;font-size:30px;background:linear-gradient(135deg,#E3F2FA,#C5E6F5)}
.vendor-card .info{flex:1;min-width:0}
.vendor-card .vtop{display:flex;align-items:center;gap:7px;margin-bottom:3px}
.vendor-card .vname{font-size:15.5px;font-weight:700}
.vendor-card .vsub{font-size:12px;color:var(--muted);display:flex;align-items:center;gap:6px;flex-wrap:wrap}
.vendor-card .rating{display:flex;align-items:center;gap:3px;font-weight:700;color:var(--ink)}
.star{color:#FFB400}
.vendor-card .arrow{color:var(--muted);font-size:20px}

.list{background:#fff;border:1px solid var(--line);border-radius:var(--r-lg);overflow:hidden}
.list-row{display:flex;align-items:center;gap:13px;padding:14px 16px;border-bottom:1px solid var(--line)}
.list-row:last-child{border-bottom:none}
.list-row .lead{width:44px;height:44px;border-radius:13px;background:var(--sea-soft);display:flex;
  align-items:center;justify-content:center;font-size:21px;flex-shrink:0}
.list-row .lr-main{flex:1;min-width:0}
.list-row .lr-t{font-size:14.5px;font-weight:700}
.list-row .lr-s{font-size:12px;color:var(--muted);margin-top:2px}
.list-row .lr-end{text-align:right;font-size:13px;font-weight:700}
.list-row .chev{color:var(--muted);font-size:20px}

/* ============================ FORMS ============================ */
.field{margin-bottom:16px}
.field>label{display:block;font-size:13px;font-weight:700;margin-bottom:7px;color:var(--ink)}
.field .hint{font-size:11.5px;color:var(--muted);margin-top:6px}
.inp,.field input,.field textarea,.field select{
  width:100%;background:#fff;border:1.5px solid var(--line);border-radius:14px;
  padding:14px 15px;font-size:15px;font-family:inherit;color:var(--ink);outline:none;transition:border-color .15s}
.inp:focus,.field input:focus,.field textarea:focus,.field select:focus{border-color:var(--sea)}
.field textarea{min-height:92px;resize:vertical}
.inp-group{display:flex;align-items:center;background:#fff;border:1.5px solid var(--line);border-radius:14px;padding:0 14px}
.inp-group input{border:none;padding:14px 0}
.inp-group .unit{font-size:13px;font-weight:700;color:var(--muted)}
.row2{display:grid;grid-template-columns:1fr 1fr;gap:12px}

/* upload tile */
.upload{border:1.6px dashed var(--line-2);border-radius:16px;padding:24px;text-align:center;background:var(--sea-soft)}
.upload .uic{font-size:30px;margin-bottom:8px}
.upload .ut{font-weight:700;font-size:14px}
.upload .us{font-size:12px;color:var(--muted);margin-top:3px}
.thumb-row{display:flex;gap:10px;flex-wrap:wrap;margin-top:12px}
.thumb{width:64px;height:64px;border-radius:12px;background:linear-gradient(135deg,#BDE5F2,#7FC9E8);
  display:flex;align-items:center;justify-content:center;font-size:26px;position:relative}
.thumb .x{position:absolute;top:-6px;right:-6px;width:20px;height:20px;border-radius:50%;background:var(--ink);
  color:#fff;font-size:12px;display:flex;align-items:center;justify-content:center}
/* invisible 44px touch target (centred over the 20px remove badge) — no visual change */
.thumb .x::before{content:"";position:absolute;top:50%;left:50%;
  width:44px;height:44px;transform:translate(-50%,-50%)}

/* ============================ VENDOR BRAND ASSETS ============================ */
/* UNIFORM image logos — whenever a real logo <img> is dropped into one of the
   fixed brandmark boxes, it fills the box exactly (cover) and inherits the
   box's radius. Vendors WITHOUT a logo keep the emoji+gradient fallback, so
   the current look is never broken. Boxes: storefront .ava 58, vendor hero
   .vhero-ava 64, admin .cf-ava 38, home .brandmark. */
.ava img,.cf-ava img,.brandmark img,.vhero-ava img{
  width:100%;height:100%;object-fit:cover;display:block;border-radius:inherit}

/* the asset upload widget (MarsaAssets.field) — reuses the .upload dropzone
   vibe with a live preview box + ok/err states. */
.asset-field{margin-bottom:16px}
.asset-field .asset-head{font-size:13px;font-weight:700;margin-bottom:8px;color:var(--ink)}
.asset-field .asset-req{color:var(--danger);font-weight:800}
.asset-prev{border-radius:14px;overflow:hidden;background:var(--sea-soft);
  border:1px solid var(--line);display:flex;align-items:center;justify-content:center;margin-bottom:10px}
.asset-prev.logo{width:88px;height:88px}                 /* square logo */
.asset-prev.banner{width:100%;aspect-ratio:3/1}          /* wide 3:1 banner */
.asset-prev.photo{width:100%;aspect-ratio:4/3}           /* catch photo 4:3 */
.asset-prev img{width:100%;height:100%;object-fit:cover;display:block}
.asset-prev .asset-ph{font-size:30px;opacity:.7}
.asset-drop{display:flex;flex-direction:column;align-items:center;gap:3px;cursor:pointer;
  border:1.6px dashed var(--line-2);border-radius:14px;padding:16px;text-align:center;background:var(--sea-soft)}
.asset-drop:active{transform:scale(.99)}
.asset-drop .asset-cta{font-weight:700;font-size:14px;color:var(--sea)}
.asset-drop .asset-help{font-size:11.5px;color:var(--muted);line-height:1.35}
.asset-field.is-checking .asset-drop{opacity:.7}
.asset-msg{margin-top:9px;font-size:12.5px;line-height:1.45}
.asset-msg:empty{display:none}
.asset-msg.asset-ok{color:var(--ok);font-weight:700;background:var(--ok-soft);
  padding:8px 11px;border-radius:11px}
.asset-msg.asset-err{color:var(--danger);background:var(--danger-soft);padding:9px 12px;border-radius:11px}
.asset-msg.asset-err .asset-err-t{font-weight:800;margin-bottom:3px}
.asset-msg.asset-err ul{margin:0;padding-left:17px}
.asset-msg.asset-err li{margin-top:2px}
[dir="rtl"] .asset-msg.asset-err ul{padding-left:0;padding-right:17px}

/* toggle switch */
.switch{position:relative;width:46px;height:27px;flex-shrink:0}
.switch input{display:none}
.switch .track{position:absolute;inset:0;background:var(--line-2);border-radius:var(--r-pill);transition:background .18s}
.switch .knob{position:absolute;top:3px;left:3px;width:21px;height:21px;border-radius:50%;background:#fff;
  box-shadow:0 1px 3px rgba(0,0,0,.2);transition:transform .18s}
.switch input:checked + .track{background:var(--sea)}
.switch input:checked + .track + .knob,.switch input:checked ~ .knob{transform:translateX(19px)}
.opt-row{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:14px 0;border-bottom:1px solid var(--line)}
.opt-row:last-child{border-bottom:none}
.opt-row .or-t{font-size:14.5px;font-weight:700}
.opt-row .or-s{font-size:12px;color:var(--muted);margin-top:2px}

/* segmented control */
.segmented{display:flex;background:var(--sea-soft);border-radius:14px;padding:4px;gap:4px}
.segmented button{flex:1;border:none;background:transparent;padding:10px;border-radius:10px;font-weight:700;
  font-size:13.5px;color:var(--muted)}
.segmented button.on{background:#fff;color:var(--sea);box-shadow:var(--sh-sm)}

/* radio cards (cleaning options / payment) */
.radio-card{display:flex;align-items:center;gap:12px;border:1.5px solid var(--line);border-radius:14px;
  padding:14px;margin-bottom:10px;background:#fff}
.radio-card.on{border-color:var(--sea);background:var(--sea-soft)}
.radio-card .rc-ic{font-size:22px}
.radio-card .rc-main{flex:1}
.radio-card .rc-t{font-weight:700;font-size:14.5px}
.radio-card .rc-s{font-size:12px;color:var(--muted);margin-top:2px}
.radio-card .rc-dot{width:20px;height:20px;border-radius:50%;border:2px solid var(--line-2)}
.radio-card.on .rc-dot{border-color:var(--sea);background:var(--sea);box-shadow:inset 0 0 0 3px #fff}

/* stepper / qty */
.stepper{display:inline-flex;align-items:center;gap:0;border:1.5px solid var(--line);border-radius:var(--r-pill);overflow:hidden}
.stepper button{width:40px;height:40px;min-width:44px;min-height:44px;border:none;background:#fff;font-size:20px;color:var(--sea);font-weight:700}
.stepper .val{min-width:50px;text-align:center;font-weight:800;font-size:15px}

/* range slider */
.range{width:100%;-webkit-appearance:none;height:6px;border-radius:6px;
  background:linear-gradient(90deg,var(--sea) 0%,var(--sea) 50%,var(--line) 50%);outline:none}
.range::-webkit-slider-thumb{-webkit-appearance:none;width:24px;height:24px;border-radius:50%;background:#fff;
  border:3px solid var(--sea);box-shadow:var(--sh-sm)}

/* ============================ PANELS / CARDS ============================ */
.panel{background:#fff;border:1px solid var(--line);border-radius:var(--r-lg);padding:16px}
.panel + .panel{margin-top:14px}
.panel-t{font-size:15px;font-weight:800;margin-bottom:12px}
.kv{display:flex;justify-content:space-between;align-items:center;padding:9px 0;font-size:14px}
.kv .k{color:var(--muted)}
.kv .v{font-weight:700}
.kv.total{border-top:1px dashed var(--line-2);margin-top:6px;padding-top:13px;font-size:17px}
.kv.total .v{color:var(--sea);font-weight:800}
.divider{height:1px;background:var(--line);margin:14px 0}

/* sticky bottom action bar */
.actionbar{position:sticky;bottom:0;background:#fff;border-top:1px solid var(--line);
  padding:14px 18px calc(14px + env(safe-area-inset-bottom));display:flex;gap:12px;align-items:center;z-index:15}
.actionbar .price-lead{flex-shrink:0}
.actionbar .price-lead .pl-s{font-size:11px;color:var(--muted)}
.actionbar .price-lead .pl-v{font-size:20px;font-weight:800;color:var(--sea)}

/* ============================ TIMELINE / TRACKING ============================ */
.timeline{position:relative;padding-left:8px}
.tl-step{display:flex;gap:14px;position:relative;padding-bottom:22px}
.tl-step:last-child{padding-bottom:0}
.tl-step .tl-dot{width:28px;height:28px;border-radius:50%;background:#fff;border:2px solid var(--line-2);
  display:flex;align-items:center;justify-content:center;font-size:13px;flex-shrink:0;z-index:2;color:var(--muted)}
.tl-step::before{content:"";position:absolute;left:13px;top:28px;bottom:0;width:2px;background:var(--line)}
.tl-step:last-child::before{display:none}
.tl-step.done .tl-dot{background:var(--ok);border-color:var(--ok);color:#fff}
.tl-step.done::before{background:var(--ok)}
.tl-step.active .tl-dot{background:var(--sea);border-color:var(--sea);color:#fff;
  box-shadow:0 0 0 5px var(--sea-soft)}
.tl-step .tl-main{padding-top:3px}
.tl-step .tl-t{font-weight:700;font-size:14.5px}
.tl-step .tl-s{font-size:12px;color:var(--muted);margin-top:2px}

/* map placeholder */
.mapbox{height:230px;border-radius:var(--r-lg);position:relative;overflow:hidden;
  background:linear-gradient(135deg,#D6EAF5,#BFE0F0);border:1px solid var(--line)}
.mapbox::before{content:"";position:absolute;inset:0;
  background-image:linear-gradient(rgba(255,255,255,.5) 1px,transparent 1px),
   linear-gradient(90deg,rgba(255,255,255,.5) 1px,transparent 1px);background-size:34px 34px}
.mapbox .route{position:absolute;left:18%;top:70%;right:20%;bottom:24%;border-top:3px dashed var(--sea);
  border-left:3px dashed var(--sea);border-top-left-radius:30px}
.map-pin{position:absolute;font-size:28px;transform:translate(-50%,-100%);filter:drop-shadow(0 4px 6px rgba(0,0,0,.2))}
.driver-card{display:flex;align-items:center;gap:13px;background:#fff;border:1px solid var(--line);
  border-radius:var(--r-lg);padding:14px;box-shadow:var(--sh-sm)}
.driver-card .dava{width:50px;height:50px;border-radius:50%;background:var(--sea-soft);display:flex;
  align-items:center;justify-content:center;font-size:24px}
.driver-card .dcall{width:44px;height:44px;border-radius:50%;background:var(--ok);color:#fff;display:flex;
  align-items:center;justify-content:center;font-size:19px}

/* ============================ REVIEWS ============================ */
.rating-hero{display:flex;gap:18px;align-items:center}
.rating-hero .big{font-size:46px;font-weight:800;line-height:1}
.rating-hero .stars{font-size:15px}
.bar-row{display:flex;align-items:center;gap:9px;font-size:12px;color:var(--muted);margin-bottom:6px}
.bar-row .bar{flex:1;height:7px;background:var(--line);border-radius:5px;overflow:hidden}
.bar-row .bar>i{display:block;height:100%;background:#FFB400}
.review{padding:16px 0;border-bottom:1px solid var(--line)}
.review:last-child{border-bottom:none}
.review .rv-top{display:flex;align-items:center;gap:11px;margin-bottom:8px}
.review .rv-ava{width:40px;height:40px;border-radius:50%;background:var(--sea-soft);display:flex;
  align-items:center;justify-content:center;font-size:18px;font-weight:800;color:var(--sea)}
.review .rv-name{font-weight:700;font-size:14px}
.review .rv-date{font-size:11.5px;color:var(--muted)}
.review .rv-body{font-size:13.5px;color:#33526B;line-height:1.5}

/* ranking breakdown */
.rank-row{display:flex;align-items:center;gap:12px;margin-bottom:14px}
.rank-row .rr-lbl{width:120px;font-size:12.5px;color:var(--muted);font-weight:600}
.rank-row .rr-bar{flex:1;height:8px;background:var(--line);border-radius:5px;overflow:hidden}
.rank-row .rr-bar>i{display:block;height:100%;background:linear-gradient(90deg,var(--aqua),var(--sea))}
.rank-row .rr-val{width:42px;text-align:right;font-weight:800;font-size:13px}

/* ============================ PROMO ============================ */
.promo{margin:6px 18px 0;background:linear-gradient(135deg,var(--aqua),var(--sea));
  border-radius:22px;padding:20px 22px;color:#fff;position:relative;overflow:hidden}
.promo::after{content:"🐟";position:absolute;right:-6px;bottom:-14px;font-size:90px;opacity:.18}
.promo .pe{font-size:11px;letter-spacing:1.5px;text-transform:uppercase;font-weight:700;opacity:.85;margin-bottom:5px}
.promo h3{font-family:'Fraunces',serif;font-size:22px;font-weight:600;line-height:1.15;max-width:230px}
.promo .cta{margin-top:14px;background:#fff;color:var(--sea);border:none;font-family:inherit;
  font-weight:700;font-size:13px;padding:10px 20px;border-radius:30px}

/* ============================ TAB BAR ============================ */
.tabbar{position:sticky;bottom:0;background:#fff;border-top:1px solid var(--line);
  display:flex;justify-content:space-around;padding:10px 0 max(22px,calc(10px + env(safe-area-inset-bottom)));z-index:15}

/* ============ NATIVE SHELL (Capacitor): real OS status bar + safe areas ============ */
/* Applied only when shared/native.js detects the wrapped app (adds .is-native). */
/* In a browser none of this triggers, so the web/LAN experience is unchanged.      */
.is-native .statusbar{display:none}                                   /* use the real OS status bar */
.is-native .hero{padding-top:calc(8px + env(safe-area-inset-top))}    /* clear the notch / dynamic island */
.is-native .topbar{padding-top:calc(10px + env(safe-area-inset-top))}
.is-native .desk-top,.is-native .admin-top{padding-top:calc(env(safe-area-inset-top))}
.tab{display:flex;flex-direction:column;align-items:center;gap:4px;font-size:11px;color:var(--muted);font-weight:600}
.tab .ti{font-size:21px}
.tab.active{color:var(--sea)}

/* ============================ EMPTY / MISC ============================ */
.empty{text-align:center;padding:50px 30px;color:var(--muted)}
.empty .eic{font-size:54px;margin-bottom:14px}
.empty .et{font-size:16px;font-weight:700;color:var(--ink);margin-bottom:6px}
.spacer{height:8px}.spacer-lg{height:24px}
.muted{color:var(--muted)}.center{text-align:center}
.cart-count{position:absolute;top:-5px;right:-5px;background:var(--fresh);color:#1E3A0E;font-size:10px;
  font-weight:800;min-width:18px;height:18px;border-radius:9px;display:flex;align-items:center;justify-content:center;padding:0 4px}

/* ============================ TOAST ============================ */
.toast{position:fixed;left:50%;bottom:110px;transform:translateX(-50%) translateY(20px);
  background:var(--ink);color:#fff;padding:13px 20px;border-radius:14px;font-size:14px;font-weight:600;
  box-shadow:var(--sh-lg);opacity:0;pointer-events:none;transition:.25s;z-index:60;max-width:330px;text-align:center}
.toast.show{opacity:1;transform:translateX(-50%) translateY(0)}

/* ============================ MODAL / SHEET ============================ */
.scrim{position:fixed;inset:0;background:rgba(10,37,64,.45);opacity:0;pointer-events:none;transition:.2s;z-index:50}
.scrim.show{opacity:1;pointer-events:auto}
.sheet{position:fixed;left:50%;bottom:0;transform:translateX(-50%) translateY(100%);width:100%;max-width:430px;
  background:#fff;border-radius:24px 24px 0 0;padding:22px 20px calc(24px + env(safe-area-inset-bottom));
  transition:transform .28s cubic-bezier(.2,.8,.2,1);z-index:55}
.sheet.show{transform:translateX(-50%) translateY(0)}
.sheet .grip{width:42px;height:5px;border-radius:3px;background:var(--line-2);margin:0 auto 16px}
.sheet-t{font-size:18px;font-weight:800;margin-bottom:14px}

/* ====================================================================
   DESKTOP DASHBOARD SHELL  (admin)
   ==================================================================== */
.desk{display:flex;min-height:100vh;background:var(--ice)}
.sidebar{width:248px;background:linear-gradient(180deg,var(--sea-deep),#053A63);color:#fff;
  padding:24px 16px;flex-shrink:0;position:sticky;top:0;height:100vh;overflow-y:auto}
.sidebar .brand{display:flex;align-items:center;gap:10px;font-family:'Fraunces',serif;font-weight:700;
  font-size:22px;padding:0 8px 22px}
.sidebar .brand .logo{width:34px;height:34px;border-radius:10px;font-size:0;flex-shrink:0;
  background:url(../assets/marsa-icon.svg) center/cover no-repeat}
.nav-sec{font-size:11px;letter-spacing:1.5px;text-transform:uppercase;color:rgba(255,255,255,.45);
  font-weight:700;padding:18px 12px 8px}
.nav-item{display:flex;align-items:center;gap:12px;padding:12px 14px;border-radius:12px;font-size:14px;
  font-weight:600;color:rgba(255,255,255,.78);margin-bottom:3px}
.nav-item .ni{font-size:18px;width:22px;text-align:center}
.nav-item:hover{background:rgba(255,255,255,.08)}
.nav-item.on{background:rgba(255,255,255,.16);color:#fff}
.nav-item .nb{margin-inline-start:auto;background:var(--fresh);color:#1E3A0E;font-size:11px;font-weight:800;
  min-width:20px;height:20px;border-radius:10px;display:flex;align-items:center;justify-content:center;padding:0 5px}
.main{flex:1;min-width:0;display:flex;flex-direction:column}
.dtop{display:flex;align-items:center;flex-wrap:wrap;gap:12px 16px;padding:18px 30px;background:#fff;border-bottom:1px solid var(--line);
  position:sticky;top:0;z-index:10}
.dtop h1{font-size:21px;font-weight:800;flex:1}
.dtop .dsearch{background:var(--ice);border:1px solid var(--line);border-radius:12px;padding:10px 16px;
  display:flex;align-items:center;gap:9px;width:300px}
.dtop .dsearch input{border:none;background:transparent;outline:none;font-family:inherit;font-size:14px;width:100%}
.dtop .duser{width:42px;height:42px;border-radius:12px;background:var(--sea-soft);display:flex;align-items:center;
  justify-content:center;font-size:20px}
.dbody{padding:26px 30px;max-width:1280px;width:100%}

/* KPI cards */
.kpis{display:grid;grid-template-columns:repeat(4,1fr);gap:18px;margin-bottom:24px}
.kpi{background:#fff;border:1px solid var(--line);border-radius:var(--r-lg);padding:20px}
.kpi .kt{font-size:13px;color:var(--muted);font-weight:600;display:flex;align-items:center;gap:8px}
.kpi .kt .ki{width:34px;height:34px;border-radius:10px;display:flex;align-items:center;justify-content:center;font-size:17px}
.kpi .kv{font-size:30px;font-weight:800;margin-top:10px;letter-spacing:-.5px}
.kpi .kd{font-size:12px;font-weight:700;margin-top:5px;display:flex;align-items:center;gap:5px}
.kpi .kd.up{color:var(--ok)}.kpi .kd.down{color:var(--danger)}

/* data table */
.tablewrap{background:#fff;border:1px solid var(--line);border-radius:var(--r-lg);overflow:hidden}
.tbl-head{display:flex;align-items:center;justify-content:space-between;padding:18px 20px;border-bottom:1px solid var(--line)}
.tbl-head h3{font-size:16px;font-weight:800}
table.data{width:100%;border-collapse:collapse}
table.data th{text-align:left;font-size:11.5px;letter-spacing:.4px;text-transform:uppercase;color:var(--muted);
  font-weight:700;padding:13px 20px;background:var(--ice);border-bottom:1px solid var(--line)}
table.data td{padding:15px 20px;border-bottom:1px solid var(--line);font-size:14px;vertical-align:middle}
table.data tr:last-child td{border-bottom:none}
table.data tr:hover td{background:var(--sea-soft)}
.cellface{display:flex;align-items:center;gap:11px}
.cellface .cf-ava{width:38px;height:38px;border-radius:11px;background:var(--sea-soft);display:flex;
  align-items:center;justify-content:center;font-size:18px;flex-shrink:0}
.cellface .cf-t{font-weight:700;font-size:14px}
.cellface .cf-s{font-size:11.5px;color:var(--muted)}
.tbl-actions{display:flex;gap:8px}

/* two-column dashboard layout */
.cols{display:grid;grid-template-columns:1.5fr 1fr;gap:18px}
@media(max-width:1080px){.cols{grid-template-columns:1fr}.kpis{grid-template-columns:1fr 1fr}}
@media(max-width:720px){
  .kpis{grid-template-columns:1fr}.dbody{padding:18px}
  /* narrow viewports: don't hide nav — collapse the sidebar into a sticky,
     horizontally-scrollable top strip so all admin pages stay reachable on a
     phone. Markup untouched; purely a responsive re-flow of the same nodes. */
  .desk{flex-direction:column}
  .sidebar{width:100%;height:auto;position:sticky;top:0;z-index:40;
    padding:8px 12px;display:flex;align-items:center;gap:6px;
    overflow-x:auto;overflow-y:hidden;-webkit-overflow-scrolling:touch;flex-wrap:nowrap}
  .sidebar .brand{padding:0 10px 0 4px;font-size:18px;border:none;flex-shrink:0}
  .sidebar .nav-sec{display:none}   /* section labels are noise in a horizontal strip */
  .nav-item{position:relative;flex-direction:column;gap:3px;padding:6px 10px;margin-bottom:0;font-size:11px;
    white-space:nowrap;flex-shrink:0;text-align:center}
  .nav-item .ni{font-size:17px;width:auto}
  .nav-item .nb{margin-left:0;position:absolute;top:2px;right:4px}
}

/* dispute thread */
.thread{display:flex;flex-direction:column;gap:12px}
.msg{max-width:74%;padding:12px 15px;border-radius:16px;font-size:13.5px;line-height:1.45}
.msg .who{font-size:11px;font-weight:700;margin-bottom:4px;opacity:.7}
.msg.cust{align-self:flex-start;background:var(--sea-soft);border-bottom-left-radius:5px}
.msg.vend{align-self:flex-end;background:#EEF3F7;border-bottom-right-radius:5px}
.msg.admin{align-self:flex-end;background:var(--ink);color:#fff;border-bottom-right-radius:5px}

/* ====================================================================
   ARABIC / RTL   (applied when <html dir="rtl" lang="ar">)
   ==================================================================== */
[dir="rtl"]{text-align:right}
[dir="rtl"] .hero .brandmark{right:auto;left:20px}
[lang="ar"] body,[dir="rtl"] body{font-family:'Cairo','Plus Jakarta Sans',sans-serif}
/* Arabic display font for the serif/headline elements (Fraunces has no Arabic) */
[dir="rtl"] .serif,[dir="rtl"] .tagline h1,[dir="rtl"] .promo h3,[dir="rtl"] .lbrand .nm,
[dir="rtl"] .sidebar .brand,[dir="rtl"] h1,[dir="rtl"] h2,[dir="rtl"] h3{font-family:'Cairo',sans-serif;font-weight:700}
/* mirror directional glyphs: back/forward chevrons & arrows point the other way */
[dir="rtl"] .back,[dir="rtl"] .chev,[dir="rtl"] .arrow,[dir="rtl"] .rarrow,
[dir="rtl"] .topbar .back{display:inline-block;transform:scaleX(-1)}
/* side-hugging absolutes flip side */
[dir="rtl"] .badge-fresh{left:auto;right:10px}
[dir="rtl"] .fab{right:auto;left:20px}
[dir="rtl"] .cart-count{right:auto;left:-5px}
[dir="rtl"] .promo::after{right:auto;left:-6px}
[dir="rtl"] .hero::after{right:auto;left:-40px}
/* trailing-end cells align to the trailing (left) edge in RTL */
[dir="rtl"] .lr-end{text-align:left}
[dir="rtl"] table.data th,[dir="rtl"] table.data td{text-align:right}
[dir="rtl"] .kpi .kd,[dir="rtl"] .actionbar .price-lead{text-align:right}
/* vertical timeline rail moves to the right side */
[dir="rtl"] .timeline{padding-left:0;padding-right:8px}
[dir="rtl"] .tl-step::before{left:auto;right:13px}
/* sidebar nav badge pushes to the (new) trailing edge */
[dir="rtl"] .nav-item .nb{margin-left:0;margin-right:auto}
/* range slider fills from the right */
[dir="rtl"] .range{direction:rtl}
/* toggle switch mirrored: knob rests on the trailing (right) edge when off
   and slides leftward on check, so it reads correctly in Arabic RTL */
[dir="rtl"] .switch .knob{left:auto;right:3px}
[dir="rtl"] .switch input:checked + .track + .knob,
[dir="rtl"] .switch input:checked ~ .knob{transform:translateX(-19px)}
/* keep number-ish values LTR so prices/codes read correctly inside RTL text */
.ltr-num{direction:ltr;unicode-bidi:isolate;display:inline-block}
/* apply the same isolation to the concrete pure-number money-value spans so a
   decimal/price never gets reordered by surrounding Arabic text even where the
   .ltr-num wrapper wasn't hand-applied. Scoped to RTL so LTR is untouched, and
   limited to pure-number cells (not .kpi .kd, which mixes a glyph + text). */
[dir="rtl"] .catch .price,[dir="rtl"] .actionbar .price-lead .pl-v,
[dir="rtl"] .kv .v,
/* earnings headline + driver payout values + admin money-table cells: same
   pure-number isolation so amounts never reorder inside surrounding Arabic */
[dir="rtl"] .promo h3,[dir="rtl"] #net,
[dir="rtl"] .rp-v,[dir="rtl"] .wb-v,[dir="rtl"] .zp-v,
[dir="rtl"] .zn-pay,[dir="rtl"] .dr-pay,
[dir="rtl"] table.data td{unicode-bidi:isolate}

/* ======================================================================
   MARSA — SHARED SURFACE KIT  (appended block — do not reorder above)
   Reusable primitives consumed by ALL 5 surfaces (customer / vendor /
   admin / driver / web). Surface-agnostic: nothing here is bound to
   .phone, so each class works identically inside the phone frame and the
   wide web layouts. Reuses existing tokens (--warn/--aqua/--fresh/--muted
   /--line/--sea/--ink ...). One local cool-blue is derived from the sea
   family for the "frozen" treatment (no global --frozen token exists).
   ====================================================================== */
:root{
  --frozen-bg:#E6F1FB;   /* cool icy blue surface (sea-family, lighter than --sea-soft) */
  --frozen-fg:#2C6FA6;   /* muted cold blue ink */
}

/* ---- inline status badges (pill-shaped, sit in catch cards / rows / lists) ---- */
/* amber low-stock warning — text is either "Low stock" or "Only N kg" */
.badge-low{display:inline-flex;align-items:center;gap:5px;background:var(--warn-soft);color:var(--warn);
  font-size:11px;font-weight:800;padding:3px 9px;border-radius:var(--r-pill);letter-spacing:.2px;line-height:1.3}
.badge-low::before{content:"";width:6px;height:6px;border-radius:50%;background:var(--warn);flex-shrink:0}

/* imported-origin pill — flag glyph + origin label (e.g. "🇴🇲 Oman") */
.badge-import{display:inline-flex;align-items:center;gap:5px;background:var(--sea-soft);color:var(--sea);
  font-size:10.5px;font-weight:700;padding:3px 8px;border-radius:var(--r-pill);letter-spacing:.2px;line-height:1.3}
.badge-import .flag{font-size:12px;line-height:1}

/* subtle "Sponsored" disclosure — intentionally low-contrast / unobtrusive */
.badge-sponsored{display:inline-flex;align-items:center;background:#EEF3F7;color:var(--muted);
  font-size:10px;font-weight:700;padding:2px 7px;border-radius:6px;letter-spacing:.4px;text-transform:uppercase}

/* frozen (not fresh-landed) — cool blue */
.badge-frozen{display:inline-flex;align-items:center;gap:5px;background:var(--frozen-bg);color:var(--frozen-fg);
  font-size:11px;font-weight:800;padding:3px 9px;border-radius:var(--r-pill);letter-spacing:.2px;line-height:1.3}
.badge-frozen::before{content:"❄";font-size:11px;line-height:1;flex-shrink:0}

/* ---- stories rail (vendor "fresh today" stories, horizontal scroll) ----
   Genuine carousel: keep horizontal scroll, but show a VISIBLE slim scrollbar
   as the affordance (was a hidden scrollbar with no cue). */
.stories-rail{display:flex;gap:14px;overflow-x:auto;padding:4px 18px 6px;
  scrollbar-width:thin;scrollbar-color:var(--line-2) transparent;-webkit-overflow-scrolling:touch}
.stories-rail::-webkit-scrollbar{height:6px}
.stories-rail::-webkit-scrollbar-track{background:transparent}
.stories-rail::-webkit-scrollbar-thumb{background:var(--line-2);border-radius:var(--r-pill)}
.stories-rail::-webkit-scrollbar-thumb:hover{background:var(--muted)}
.story{flex-shrink:0;width:66px;display:flex;flex-direction:column;align-items:center;gap:6px;
  background:none;border:none;padding:0;color:var(--ink);cursor:pointer}
/* aqua gradient ring around the avatar — padding gap reveals card bg as the inner ring */
.story .ring{width:58px;height:58px;border-radius:var(--r-pill);padding:2.5px;
  background:linear-gradient(150deg,var(--aqua) 0%,var(--sea) 100%);display:flex;flex-shrink:0}
.story .ring img,.story .ring .av{width:100%;height:100%;border-radius:var(--r-pill);object-fit:cover;
  border:2px solid var(--card);background:var(--sea-soft);display:flex;align-items:center;
  justify-content:center;font-size:24px;color:var(--sea)}
.story .label{font-size:11px;font-weight:600;color:var(--ink);max-width:64px;text-align:center;
  white-space:nowrap;overflow:hidden;text-overflow:ellipsis;line-height:1.2}
/* already-viewed stories fade their ring to neutral */
.story.seen .ring{background:var(--line-2)}
.story.seen .label{color:var(--muted);font-weight:500}

/* a vendor with a live story wears an Instagram-style ring on its OWN logo/avatar
   (no separate feed — it's a marketplace). Tap the ringed logo to open the story. */
.has-story{position:relative;cursor:pointer}
.has-story::after{content:"";position:absolute;inset:-5px;border-radius:inherit;
  border:2.5px solid var(--aqua);pointer-events:none}
.has-story::before{content:"";position:absolute;inset:-2.5px;border-radius:inherit;
  border:2.5px solid #fff;pointer-events:none;z-index:1}

/* ---- in-app camera capture sheet (vendor catch photo / driver proof) ---- */
.cam-sheet{position:fixed;inset:0;z-index:60;background:#06121F;
  display:flex;flex-direction:column}
.cam-sheet .cam-view{flex:1;min-height:0;position:relative;overflow:hidden;
  display:flex;align-items:center;justify-content:center;background:#000;color:#5B7185}
.cam-sheet .cam-view video,.cam-sheet .cam-view img{width:100%;height:100%;object-fit:cover}
.cam-sheet .cam-bar{display:flex;align-items:center;justify-content:space-between;
  padding:18px 26px calc(18px + env(safe-area-inset-bottom));background:#06121F;gap:16px}
.cam-sheet .cam-bar .side{width:46px;height:46px;border-radius:var(--r-pill);border:none;
  background:rgba(255,255,255,.12);color:#fff;font-size:20px;display:flex;align-items:center;justify-content:center}
/* big round shutter button */
.cam-shot{width:72px;height:72px;border-radius:var(--r-pill);border:4px solid rgba(255,255,255,.5);
  background:#fff;flex-shrink:0;padding:0;cursor:pointer;transition:transform .1s}
.cam-shot:active{transform:scale(.92)}
.cam-shot::after{content:"";display:block;width:100%;height:100%;border-radius:var(--r-pill);
  background:#fff;border:2px solid #06121F}

/* timestamp overlay pinned to the bottom-left of captured media (anti-fraud proof) */
.ts-stamp{position:absolute;left:8px;bottom:8px;z-index:2;
  background:rgba(6,18,31,.66);color:#fff;font-size:10px;font-weight:700;letter-spacing:.3px;
  padding:3px 7px;border-radius:6px;font-variant-numeric:tabular-nums;
  backdrop-filter:saturate(140%) blur(2px);-webkit-backdrop-filter:saturate(140%) blur(2px)}

/* row of captured thumbnails (each .shot can host a .ts-stamp) — a media
   carousel: keep horizontal scroll with a VISIBLE slim scrollbar cue. */
.media-strip{display:flex;gap:8px;overflow-x:auto;padding:2px 0 6px;
  scrollbar-width:thin;scrollbar-color:var(--line-2) transparent;-webkit-overflow-scrolling:touch}
.media-strip::-webkit-scrollbar{height:6px}
.media-strip::-webkit-scrollbar-track{background:transparent}
.media-strip::-webkit-scrollbar-thumb{background:var(--line-2);border-radius:var(--r-pill)}
.media-strip::-webkit-scrollbar-thumb:hover{background:var(--muted)}
.media-strip .shot{position:relative;flex-shrink:0;width:74px;height:74px;border-radius:var(--r-sm);
  overflow:hidden;border:1px solid var(--line);background:var(--sea-soft)}
.media-strip .shot img{width:100%;height:100%;object-fit:cover}
.media-strip .shot.add{display:flex;align-items:center;justify-content:center;
  color:var(--sea);font-size:24px;border:1.5px dashed var(--line-2);background:#fff}

/* "Verified" capture tag — used on proof media / verified vendor catches */
.verified-tag{display:inline-flex;align-items:center;gap:4px;background:var(--ok-soft);color:var(--ok);
  font-size:10.5px;font-weight:800;padding:3px 8px;border-radius:var(--r-pill);letter-spacing:.2px;line-height:1.3}
.verified-tag::before{content:"✓";font-size:10px;font-weight:900;line-height:1}

/* ---- RTL: flip the bottom-left timestamp to bottom-right ---- */
[dir="rtl"] .ts-stamp{left:auto;right:8px}

/* ======================================================================
   FILTER BAR  (window.MarsaFilters — shared/filters.js)
   ----------------------------------------------------------------------
   Reusable filter + sort row for any list page. Renders as chip-groups
   (one per filter) followed by a sort <select> + a ▲/▼ direction toggle.
   Built only from existing tokens so it looks native in BOTH the .phone
   frame and the .desk dashboard shells. Flex + gap keep it RTL-safe.
   Classes: .filterbar .fgroup .flabel .fchip(.on) .fsort .fdir .fclear
   ====================================================================== */
.filterbar{
  display:flex;flex-wrap:wrap;align-items:center;gap:8px 14px;
  padding:10px 16px;background:var(--card);border-bottom:1px solid var(--line);
}
.filterbar .fgroup{display:flex;align-items:center;gap:6px;flex-wrap:wrap}
.filterbar .flabel{
  font-size:11px;font-weight:800;letter-spacing:.4px;text-transform:uppercase;
  color:var(--muted);margin-right:2px;
}
.filterbar .fchip{
  flex-shrink:0;background:#fff;border:1px solid var(--line);border-radius:var(--r-pill);
  padding:7px 13px;font-size:12.5px;font-weight:700;color:var(--muted);
  display:inline-flex;align-items:center;gap:6px;line-height:1;transition:background .14s,border-color .14s,color .14s;
}
.filterbar .fchip:hover{border-color:var(--line-2)}
.filterbar .fchip.on{background:var(--sea);border-color:var(--sea);color:#fff}
.filterbar .fchip:active{transform:scale(.97)}

/* sort: a compact select + a square direction toggle */
.filterbar .fsort-group{gap:6px;margin-inline-start:auto}
.filterbar .fsort{
  background:#fff;border:1px solid var(--line);border-radius:var(--r-pill);
  padding:7px 30px 7px 13px;font-size:12.5px;font-weight:700;font-family:inherit;
  color:var(--ink);outline:none;cursor:pointer;line-height:1;
  -webkit-appearance:none;appearance:none;
  background-image:url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236B8299' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'><polyline points='6 9 12 15 18 9'/></svg>");
  background-repeat:no-repeat;background-position:right 11px center;
}
.filterbar .fsort:focus{border-color:var(--sea)}
.filterbar .fchip.fdir{
  padding:0;width:30px;height:30px;justify-content:center;color:var(--sea);
  font-size:12px;font-weight:900;
}
.filterbar .fchip.fdir:hover{border-color:var(--sea)}

/* clear-all (only shown when a filter is active) */
.filterbar .fclear{
  background:transparent;border:none;color:var(--sea);
  font-size:12.5px;font-weight:800;padding:7px 6px;line-height:1;cursor:pointer;
}
.filterbar .fclear:hover{text-decoration:underline}

/* desktop shells get a touch more breathing room */
.desk .filterbar,.main .filterbar{padding:12px 30px;gap:10px 16px}

/* RTL: select chevron + auto-margin flip naturally via gap/flex;
   only the select's padding side needs swapping for the chevron */
[dir="rtl"] .filterbar .fsort{padding:7px 13px 7px 30px;background-position:left 11px center}
[dir="rtl"] .filterbar .flabel{margin-right:0;margin-left:2px}
[dir="rtl"] .filterbar .fsort-group{margin-left:0;margin-right:auto}

/* ======================================================================
   SURFACE E — VISUAL POLISH  (appended; global, CSS-led)
   ----------------------------------------------------------------------
   One CSS block that lifts every surface at once. Pure additions: no token
   is redefined, no existing rule is reordered. Everything below reuses the
   existing tokens (--line / --sea-soft / --muted / --card / --ink ...) and
   is RTL-safe (logical mirroring handled at the end).
   Pieces:
     1. global minimum-readable-font floor (~11px)
     2. .skeleton / .shimmer  — loading placeholders (no empty flash)
     3. scroll fade-edge       — chip rows & rails stop looking like dead walls
     4. .close-x               — one AA-contrast popup/sheet close button
     5. busy-card spacing tidy — gentle hierarchy on the densest cards
   ====================================================================== */

/* ---- 1. minimum readable font -------------------------------------------
   A safety floor so nothing anywhere renders below ~11px. Component rules
   above set their own (>=10px) sizes; this catches any stray inline 8–9px
   text and the few decorative <small> tags. Kept at 11px — the WCAG-friendly
   lower bound for body-adjacent UI text on mobile. */
body{font-size:14px;line-height:1.45}
small,.fineprint{font-size:11px}

/* ---- 2. SKELETON / SHIMMER ----------------------------------------------
   Drop .skeleton on any block (a catch-card stand-in, a table row, an avatar)
   to paint a shimmering placeholder while data loads — no blank flash, no
   layout jump. Give the element a width/height (or use the size helpers).
   .skeleton-text makes a short rounded text bar; stack a few for a paragraph.
   Honors prefers-reduced-motion (falls back to a static tint). */
.skeleton{
  position:relative;overflow:hidden;background:var(--sea-soft);
  border-radius:var(--r-sm);
  background-image:linear-gradient(100deg,
     rgba(255,255,255,0) 30%,
     rgba(255,255,255,.55) 50%,
     rgba(255,255,255,0) 70%);
  background-size:240% 100%;background-repeat:no-repeat;
  background-position:-120% 0;
  animation:marsa-shimmer 1.3s ease-in-out infinite;
}
@keyframes marsa-shimmer{to{background-position:120% 0}}
.skeleton.round{border-radius:50%}
.skeleton.pill{border-radius:var(--r-pill)}
.skeleton-text{height:11px;border-radius:6px;margin:6px 0}
.skeleton-text.w-40{width:40%}
.skeleton-text.w-60{width:60%}
.skeleton-text.w-80{width:80%}
/* a ready-made card skeleton matching the .catch rail footprint */
.skeleton-card{min-width:172px;height:236px;border-radius:var(--r-lg)}
/* a skeleton table row for admin tables (.tablewrap) before data paints */
.skeleton-row{height:54px;border-radius:0;margin:0}
.skeleton-row + .skeleton-row{border-top:1px solid var(--line)}
@media(prefers-reduced-motion:reduce){
  .skeleton{animation:none;background-image:none}
}

/* ---- 3. SCROLL AFFORDANCE (chip rows + rails) ---------------------------
   The old mask-image edge-fade was REMOVED here. It violated the no-hidden-cut
   rule two ways: on the WRAPPING navigation rows (.chiprow, .filterbar .fgroup)
   it fogged the chips that wrapped to the trailing edge, and on the genuine
   carousels (.rail / .stories-rail / .media-strip) it visually COVERED the
   first/last item instead of cueing beside it. The correct affordances now
   live on the components themselves: the chip/filter rows WRAP (every option
   visible, nothing faded), and the carousels carry a VISIBLE slim scrollbar.
   No mask is applied to any of them. */
/* an explicit opt-out hook kept for back-compat — masks are gone, so it is a
   harmless no-op, but any markup still referencing .no-fade keeps working. */
.no-fade{-webkit-mask-image:none !important;mask-image:none !important}

/* ---- 4. CLOSE BUTTON (AA contrast) --------------------------------------
   One reusable close affordance for sheets / popovers / dismissible cards.
   Solid ink-on-tint with a clear focus ring → clears WCAG AA where the old
   faint ✕ glyphs did not. The visible box is 34px but a transparent ::before
   overlay extends the hit area to the 44px WCAG min touch target without
   changing the layout. Use:
     <button class="close-x" aria-label="Close">✕</button>  */
.close-x{
  position:relative;
  width:34px;height:34px;flex-shrink:0;border-radius:var(--r-pill);
  border:1px solid var(--line-2);background:#fff;color:var(--ink);
  font-size:17px;line-height:1;display:inline-flex;align-items:center;justify-content:center;
  cursor:pointer;transition:background .14s,border-color .14s,color .14s;
}
/* invisible 44px hit area (centred over the 34px box) — touch-target only,
   no visual change */
.close-x::before{content:"";position:absolute;top:50%;left:50%;
  width:44px;height:44px;transform:translate(-50%,-50%)}
.close-x:hover{background:var(--sea-soft);border-color:var(--sea);color:var(--sea)}
.close-x:active{transform:scale(.94)}
.close-x:focus-visible{outline:2px solid var(--sea);outline-offset:2px}
/* on a dark / image backdrop (camera sheet, on-sea topbar) */
.close-x.on-dark{background:rgba(10,37,64,.34);border-color:rgba(255,255,255,.28);color:#fff;
  backdrop-filter:blur(4px);-webkit-backdrop-filter:blur(4px)}
.close-x.on-dark:hover{background:rgba(10,37,64,.5);color:#fff}

/* a global focus-visible ring so keyboard users can see where they are
   (was previously invisible on most interactive elements) */
a:focus-visible,button:focus-visible,.chip:focus-visible,.fchip:focus-visible,
.btn:focus-visible,.cat:focus-visible,.close-x:focus-visible{outline:2px solid var(--sea);outline-offset:2px}
/* form controls set outline:none for a clean look, which left keyboard focus
   invisible on the search + sort inputs. Give them a visible, non-outline ring
   (border tint + soft glow) so tab-focus is always perceivable. */
input:focus-visible,select:focus-visible,textarea:focus-visible,
.searchbar input:focus-visible,.dtop .dsearch input:focus-visible,
.filterbar .fsort:focus-visible{
  border-color:var(--sea);box-shadow:0 0 0 3px var(--sea-soft)}

/* ---- 5. BUSY-CARD SPACING / HIERARCHY TIDY ------------------------------
   The densest cards (vendor cards, list rows, catch cards) carry a name, a
   sub-line, several pills and an action. Small consistency nudges so the
   busiest ones don't read as cramped: clamp the inline badge cluster to one
   tidy wrapping row with even gaps, and give the vendor sub-line a touch more
   line-height so stacked pills breathe. Purely additive. */
.catch .body>div[style*="flex-wrap"]{margin-top:5px}
.vendor-card .vsub{line-height:1.5;row-gap:3px}
.list-row .lr-s{line-height:1.4}
/* the on-card badge cluster (origin/frozen/low/sponsored) — even rhythm */
.badge-import,.badge-frozen,.badge-low,.badge-sponsored,.verified-tag{vertical-align:middle}

/* ---- RTL: the edge-fade mask was removed (see SCROLL AFFORDANCE above), so
   there is no LTR/RTL mask to mirror here anymore. The wrapping rows and the
   visible-scrollbar carousels are direction-agnostic. ---- */

/* ======================================================================
   VISUAL-UPLIFT CANON (ADDITIVE ONLY — no existing rule above is changed)
   1. Canonical chips — THE canonical four: .chip-solid / .chip-soft /
      .chip-outline / .chip-dot. Use these (not ad-hoc pills) for any new
      status/tag chip. Shared padding / radius / 12px weight-700 type.
      (.chip above stays what it is: the nav/filter selector chip.)
   2. .skel shimmer + .skel-row / .skel-card loading-placeholder sizes.
   3. prefers-reduced-motion — kills the shimmer + transform animations.
   ====================================================================== */

/* ---- 1. canonical chips (the canonical four) ---- */
.chip-solid,.chip-soft,.chip-outline,.chip-dot{
  display:inline-flex;align-items:center;gap:6px;
  padding:4px 11px;border-radius:var(--r-pill);
  font-size:12px;font-weight:700;line-height:1.35;
  white-space:nowrap;vertical-align:middle;border:1px solid transparent;
}
.chip-solid{background:var(--sea);border-color:var(--sea);color:#fff}
.chip-soft{background:var(--sea-soft);color:var(--sea)}
.chip-outline{background:#fff;border-color:var(--line-2);color:var(--ink)}
.chip-dot{background:#fff;border-color:var(--line);color:var(--muted)}
.chip-dot::before{content:"";width:7px;height:7px;border-radius:50%;background:var(--sea);flex-shrink:0}
/* tone modifiers */
.chip-solid.ok{background:var(--ok);border-color:var(--ok)}
.chip-solid.warn{background:var(--warn);border-color:var(--warn)}
.chip-solid.danger{background:var(--danger);border-color:var(--danger)}
.chip-soft.ok{background:var(--ok-soft);color:var(--ok)}
.chip-soft.warn{background:var(--warn-soft);color:var(--warn)}
.chip-soft.danger{background:var(--danger-soft);color:var(--danger)}
.chip-dot.ok::before{background:var(--ok)}
.chip-dot.warn::before{background:var(--warn)}
.chip-dot.danger::before{background:var(--danger)}

/* ---- 2. .skel loading shimmer ----
   Usage: <div class="skel skel-row"></div> / <div class="skel skel-card"></div>
   or drop .skel on any block that already has a width/height. */
.skel{
  position:relative;overflow:hidden;background:var(--sea-soft);border-radius:var(--r-sm);
  background-image:linear-gradient(100deg,
    rgba(255,255,255,0) 32%,rgba(255,255,255,.6) 50%,rgba(255,255,255,0) 68%);
  background-size:220% 100%;background-repeat:no-repeat;background-position:-120% 0;
  animation:skel-sweep 1.25s ease-in-out infinite;
}
@keyframes skel-sweep{to{background-position:120% 0}}
.skel-row{height:52px;margin:8px 0}
.skel-card{height:180px;border-radius:var(--r-lg)}

/* ---- 3. reduced motion: no shimmer, no transform/animation movement ---- */
@media (prefers-reduced-motion: reduce){
  .skel{animation:none;background-image:none}
  *,*::before,*::after{
    animation-duration:.01ms !important;
    animation-iteration-count:1 !important;
    transition-duration:.01ms !important;
    scroll-behavior:auto !important;
  }
}
