/* GS account theme.
   Gives EVERY page (home, stores, product, cart, checkout, orders, wishlist, services, legal, ads, messages, dashboards)
   the same look as the account & login screens
   (blue-violet-pink gradient page, lavender panels, gradient tiles and buttons).
   Loaded on all routes except the login/account screens, which have their own purple design (see index.html). Presentation only: no markup, logic or settings are touched.
   Light mode uses the account palette; dark mode keeps the app's own dark tokens. */

html.gs-admin:not(.dark){
  --background:262 60% 97%;--foreground:260 30% 16%;
  --card:0 0% 100%;--card-foreground:260 30% 16%;
  --popover:0 0% 100%;--popover-foreground:260 30% 16%;
  --primary:262 83% 58%;--primary-foreground:0 0% 100%;
  --secondary:322 80% 62%;--secondary-foreground:0 0% 100%;
  --muted:262 40% 95%;--muted-foreground:258 14% 44%;
  --accent:262 70% 96%;--accent-foreground:262 70% 40%;
  --border:262 35% 90%;--input:262 35% 90%;--ring:262 83% 58%;
  --radius:1.1rem;
  --sidebar-background:262 60% 98%;--sidebar-foreground:260 25% 22%;
  --sidebar-primary:262 83% 58%;--sidebar-primary-foreground:0 0% 100%;
  --sidebar-accent:262 60% 95%;--sidebar-accent-foreground:262 60% 30%;
  --sidebar-border:262 35% 91%;--sidebar-ring:262 83% 58%;
  --gs-grad:linear-gradient(135deg,#f46fcf 0%,#b36cf3 48%,#5fa8ff 100%);
  --gs-grad-blue:linear-gradient(135deg,#8d5cf3 0%,#3f5fe0 100%);
  --gs-grad-pink:linear-gradient(135deg,#f070c8 0%,#7a3fe0 100%);
  --gs-panel:linear-gradient(180deg,#f8f5fe 0%,#efeafa 100%);
  --btn-bg:var(--gs-grad);
  --btn-fg:#fff;
  --btn-shadow:rgba(139,92,246,.35);--btn-shadow-hover:rgba(139,92,246,.5);
}

/* ---------- page: same multi-colour gradient as the account page ---------- */
html.gs-admin,html.gs-admin body{overflow-x:clip;max-width:100%}
html.gs-admin body{position:relative;min-height:100vh;font-family:'Cairo',Tahoma,Arial,sans-serif}
html.gs-admin:not(.dark) body{background:transparent}
html.gs-admin:not(.dark) body::before{
  content:"";position:fixed;inset:0;z-index:-1;pointer-events:none;
  background:#f4f4f7; /* neutral default - change it from Admin > Site colours > Site background */
}
/* let the gradient show through the page wrappers */
html.gs-admin:not(.dark) #root > div,
html.gs-admin:not(.dark) .min-h-screen.bg-background{
  background-color:transparent !important;background-image:none !important;
}

/* ---------- top bar: translucent glass on the gradient, white text ---------- */
html.gs-admin:not(.dark) header{
  background:rgba(255,255,255,.14);
  border-color:transparent;
  backdrop-filter:blur(14px);-webkit-backdrop-filter:blur(14px);
  color:inherit;
}
html.gs-admin:not(.dark) header:not([style*="background"]) h1,
html.gs-admin:not(.dark) header:not([style*="background"]) h2,
html.gs-admin:not(.dark) header:not([style*="background"]) p{color:#fff}
html.gs-admin:not(.dark) header:not([style*="background"]) button:not(.bg-primary):not([class*="gradient"]){
  background:rgba(255,255,255,.22);color:#fff;border:0;
  box-shadow:none;backdrop-filter:blur(8px);
}
html.gs-admin:not(.dark) header:not([style*="background"]) button:not(.bg-primary):not([class*="gradient"]) svg{color:#fff}

/* ---------- main area: one big lavender panel (like the account card) ---------- */
html.gs-admin:not(.dark) main{
  background:transparent;
  border-radius:0;
  margin:12px;
  box-shadow:none;
  color:var(--gs-ink,#2b2450);
}
@media (min-width:1024px){html.gs-admin:not(.dark) main{margin:16px 24px 24px}}

/* form pages (create store / post an ad) keep a plain white card */
html:is(.gs-create,.gs-post):not(.dark) main{background:#fff;border-radius:28px;box-shadow:0 10px 30px rgba(0,0,0,.08)}
html:is(.gs-create,.gs-post).dark main{background:#1e1e26;border-radius:28px;box-shadow:0 10px 30px rgba(0,0,0,.4)}

/* ---------- cards inside the panel ---------- */
html.gs-admin:not(.dark) [class*="rounded-xl"][class*="border"],
html.gs-admin:not(.dark) [class*="rounded-2xl"][class*="border"],
html.gs-admin:not(.dark) [class*="rounded-lg"][class*="bg-card"],
html.gs-admin:not(.dark) .bg-card:not(aside):not(header){
  border-radius:20px !important;
  border-color:rgba(120,100,170,.14);
  box-shadow:0 10px 24px rgba(90,60,160,.12),inset 0 1px 0 rgba(255,255,255,.9);
}
html.gs-admin:not(.dark) main .bg-card,
html.gs-admin:not(.dark) main [class*="bg-white"]{background-color:#fff}

/* coloured stat tiles -> the gradient tiles of the account screen */
html.gs-admin:not(.dark) main [class*="from-primary/10"],
html.gs-admin:not(.dark) main [class*="from-blue-500/10"],
html.gs-admin:not(.dark) main [class*="from-green-500/10"],
html.gs-admin:not(.dark) main [class*="from-orange-500/10"],
html.gs-admin:not(.dark) main [class*="from-purple-500/10"],
html.gs-admin:not(.dark) main [class*="from-pink-500/10"]{
  background-image:var(--gs-grad-blue) !important;border:0 !important;
  box-shadow:0 12px 24px rgba(63,95,224,.32);
}
html.gs-admin:not(.dark) main [class*="from-green-500/10"],
html.gs-admin:not(.dark) main [class*="from-orange-500/10"]{background-image:var(--gs-grad-pink) !important;box-shadow:0 12px 24px rgba(122,63,224,.32)}
html.gs-admin:not(.dark) main [class*="from-primary/10"] *,
html.gs-admin:not(.dark) main [class*="from-blue-500/10"] *,
html.gs-admin:not(.dark) main [class*="from-green-500/10"] *,
html.gs-admin:not(.dark) main [class*="from-orange-500/10"] *,
html.gs-admin:not(.dark) main [class*="from-purple-500/10"] *,
html.gs-admin:not(.dark) main [class*="from-pink-500/10"] *{color:#fff !important}
html.gs-admin:not(.dark) main [class*="from-primary/10"] [class*="rounded-lg"],
html.gs-admin:not(.dark) main [class*="from-primary/10"] [class*="rounded-full"],
html.gs-admin:not(.dark) main [class*="from-blue-500/10"] [class*="rounded-lg"],
html.gs-admin:not(.dark) main [class*="from-blue-500/10"] [class*="rounded-full"],
html.gs-admin:not(.dark) main [class*="from-green-500/10"] [class*="rounded-lg"],
html.gs-admin:not(.dark) main [class*="from-green-500/10"] [class*="rounded-full"],
html.gs-admin:not(.dark) main [class*="from-orange-500/10"] [class*="rounded-lg"],
html.gs-admin:not(.dark) main [class*="from-orange-500/10"] [class*="rounded-full"]{
  background:rgba(255,255,255,.24) !important;
}

/* ---------- buttons ---------- */
html.gs-admin:not(.dark) .bg-primary,
html.gs-admin:not(.dark) button.bg-primary,
html.gs-admin:not(.dark) .gradient-primary{
  background-image:var(--btn-bg) !important;
  background-color:transparent !important;
  color:#fff !important;border:0;
  box-shadow:0 8px 20px var(--btn-shadow);
}
html.gs-admin:not(.dark) .bg-primary:hover,
html.gs-admin:not(.dark) .gradient-primary:hover{box-shadow:0 10px 24px var(--btn-shadow-hover)}
html.gs-admin:not(.dark) button{border-radius:999px}
html.gs-admin:not(.dark) button[class*="rounded-md"],
html.gs-admin:not(.dark) button[class*="rounded-lg"],
html.gs-admin:not(.dark) button[class*="rounded-xl"]{border-radius:999px !important}
html.gs-admin:not(.dark) main button[class*="border"]:not(.bg-primary):not([class*="gradient"]):not([role="tab"]){
  background:#fdfcff;border-color:rgba(120,100,170,.22);color:#4a3f8a;
}

/* ---------- inputs: the inset look of the account form ---------- */
html.gs-admin:not(.dark) input:not([type="checkbox"]):not([type="radio"]):not([type="file"]):not([type="range"]),
html.gs-admin:not(.dark) textarea,
html.gs-admin:not(.dark) select,
html.gs-admin:not(.dark) [role="combobox"]{
  border-radius:14px !important;
  background-color:#fdfcff;border-color:transparent;
  box-shadow:0 4px 12px rgba(90,60,160,.13),inset 0 0 0 1px rgba(255,255,255,.95);
}
html.gs-admin:not(.dark) input:focus,
html.gs-admin:not(.dark) textarea:focus,
html.gs-admin:not(.dark) [role="combobox"]:focus{
  box-shadow:0 4px 14px rgba(110,80,220,.28),0 0 0 2px rgba(130,100,240,.55);
  outline:none;
}
html.gs-admin:not(.dark) label{color:#2b2450}

/* ---------- tabs: pill bar ---------- */
html.gs-admin:not(.dark) [role="tablist"]{
  background:rgba(255,255,255,.85);border-radius:999px;padding:4px;
  box-shadow:0 6px 18px rgba(90,60,160,.12);
}
html.gs-admin:not(.dark) [role="tab"]{border-radius:999px !important}
html.gs-admin:not(.dark) [role="tab"][data-state="active"]{
  background-image:var(--btn-bg) !important;background-color:transparent !important;color:#fff !important;
  box-shadow:0 6px 14px var(--btn-shadow);
}

/* ---------- sidebar: lavender panel, gradient active item ---------- */
html.gs-admin:not(.dark) aside,
html.gs-admin:not(.dark) [data-sidebar="sidebar"]{
  background:var(--gs-panel) !important;
  border-color:transparent !important;
  box-shadow:0 0 40px rgba(50,25,130,.28);
}
html.gs-admin:not(.dark) aside .border-b,
html.gs-admin:not(.dark) aside .border-t{border-color:rgba(120,100,170,.16) !important}
html.gs-admin:not(.dark) aside nav button{border-radius:16px !important;color:#4a4470}
html.gs-admin:not(.dark) aside nav button.bg-primary,
html.gs-admin:not(.dark) aside nav button[class*="bg-primary"]{
  background-image:var(--gs-grad-blue) !important;color:#fff !important;
  box-shadow:0 8px 18px rgba(63,95,224,.32);
}
html.gs-admin:not(.dark) aside nav button.bg-primary svg{color:#fff !important}
html.gs-admin:not(.dark) [data-sidebar="menu-button"][data-active="true"],
html.gs-admin:not(.dark) [data-active="true"]{
  background-image:var(--gs-grad-blue) !important;color:#fff !important;border-radius:16px;
}

/* ---------- headings & text ---------- */
html.gs-admin:not(.dark) main h1,
html.gs-admin:not(.dark) main h2,
html.gs-admin:not(.dark) main h3{color:#2b1f5c}
html.gs-admin:not(.dark) .text-primary{color:#6d3fd9}

/* ---------- tables ---------- */
html.gs-admin:not(.dark) main table thead{background:rgba(139,92,246,.08)}
html.gs-admin:not(.dark) main th{color:#4a3f8a}

/* ---------- scrollbars ---------- */
html.gs-admin ::-webkit-scrollbar{width:8px;height:8px}
html.gs-admin ::-webkit-scrollbar-thumb{background:rgba(139,92,246,.35);border-radius:999px}

/* =====================================================================
   /create-store : same card-on-gradient layout as the account screen
   ===================================================================== */
html.gs-create:not(.dark) .min-h-screen{padding-bottom:110px}
html.gs-create:not(.dark) main{
  max-width:420px;margin:18px auto 0;padding:26px 22px 24px;
  border-radius:28px;
}
@media (max-width:460px){html.gs-create:not(.dark) main{margin:16px 16px 0}}
/* the separate boxes melt into the one panel */
html.gs-create:not(.dark) main > .bg-card,
html.gs-create:not(.dark) main > [class*="rounded-2xl"]{
  background:transparent !important;border:0 !important;box-shadow:none !important;padding:0 !important;
}
html.gs-create:not(.dark) main label{font-size:14px;font-weight:700;color:#2b2450;padding-inline:4px}
html.gs-create:not(.dark) main input:not([type="file"]),
html.gs-create:not(.dark) main textarea,
html.gs-create:not(.dark) main [role="combobox"]{
  min-height:48px;background:#fdfcff !important;color:#2b2450;
}
html.gs-create:not(.dark) main textarea{padding-block:12px}
html.gs-create:not(.dark) main input::placeholder,
html.gs-create:not(.dark) main textarea::placeholder{color:#9a93b4}
/* logo upload tile */
html.gs-create:not(.dark) main button[type="button"][class*="border-dashed"]{
  border-radius:20px !important;border-color:rgba(130,100,240,.45);background:#fdfcff;
  box-shadow:0 4px 12px rgba(90,60,160,.13);
}
/* submit = the "sign-up" gradient button of the login screen */
html.gs-create:not(.dark) main > button.w-full,
html.gs-create:not(.dark) main > button[class*="gradient"]{
  height:50px;border-radius:16px !important;font-size:16px;font-weight:700;
  background-image:linear-gradient(90deg,#f070c8 0%,#7a3fe0 100%) !important;
  box-shadow:0 10px 20px rgba(90,60,200,.35);
}
html.gs-create:not(.dark) main > button.w-full:disabled{opacity:.6}
@media (prefers-reduced-motion:no-preference){
  html.gs-create:not(.dark) main{animation:gsc .4s ease both}
  @keyframes gsc{from{opacity:0;transform:translateY(10px)}to{opacity:1;transform:none}}
}

/* =====================================================================
   Classifieds (/listings, /listings/:id, /listings/create, /listings/my)
   and messages (/messages, /messages/:id) : same account look.
   index.html adds  gs-admin + gs-ads  on these routes
   (+ gs-create gs-post on /listings/create, gs-detail on an ad, gs-chat on a conversation)
   ===================================================================== */
html.gs-ads:not(.dark) main{width:calc(100% - 24px);margin:12px auto;padding:6px}
html.gs-ads:not(.dark) .min-h-screen{padding-bottom:120px}

/* header: title row + search + category chips live inside it */
html.gs-ads:not(.dark) header{position:sticky;top:0;z-index:40;border-radius:0 0 26px 26px}
html.gs-ads:not(.dark) header input{background:rgba(255,255,255,.96) !important;color:#2b2450}
html.gs-ads:not(.dark) header input::placeholder{color:#9a93b4}
/* chips: idle = glass, selected = solid white */
html.gs-ads:not(.dark) header button[class*="rounded-full"]{
  background:rgba(255,255,255,.2) !important;color:#fff !important;border:1px solid rgba(255,255,255,.28) !important;box-shadow:none;
}
html.gs-ads:not(.dark) header button.bg-secondary,
html.gs-ads:not(.dark) header button.bg-primary[class*="rounded-full"]{
  background:#fff !important;background-image:none !important;color:#6d3fd9 !important;border-color:#fff !important;
  box-shadow:0 6px 14px rgba(50,25,130,.28);
}
/* the "post ad" shortcut in the header */
html.gs-ads:not(.dark) header .gradient-primary,
html.gs-ads:not(.dark) header button[class*="gradient"]{
  background:#fff !important;background-image:none !important;color:#6d3fd9 !important;
  box-shadow:0 8px 18px rgba(50,25,130,.28);font-weight:700;
}
html.gs-ads:not(.dark) header .gradient-primary svg,
html.gs-ads:not(.dark) header button[class*="gradient"] svg{color:#6d3fd9 !important}

/* buttons inside the panel: rows stay rounded rectangles, only pills/icons are round */
html.gs-ads:not(.dark) main button:not(.bg-primary):not([class*="gradient"]):not([class*="rounded-full"]){border-radius:20px !important}

/* ad cards (grid of listings) */
html.gs-ads:not(.dark) main button.bg-card,
html.gs-ads:not(.dark) main button[class*="overflow-hidden"]{
  background:#fff !important;border:0 !important;border-radius:22px !important;
  box-shadow:0 12px 26px rgba(90,60,160,.16),inset 0 1px 0 rgba(255,255,255,.9);
  transition:transform .2s ease,box-shadow .2s ease;
}
html.gs-ads:not(.dark) main button.bg-card:active{transform:scale(.98)}
html.gs-ads:not(.dark) main button.bg-card .aspect-square{background:#f1f1f4}
html.gs-ads:not(.dark) main .bg-warning{background:linear-gradient(135deg,#f070c8,#7a3fe0) !important;color:#fff !important}
html.gs-ads:not(.dark) .text-primary{color:#6d3fd9}
html.gs-ads:not(.dark) .font-bold.text-primary{background:linear-gradient(90deg,#d94fb8,#6d3fd9);-webkit-background-clip:text;background-clip:text;-webkit-text-fill-color:transparent}
html.gs-ads:not(.dark) .animate-pulse{background:rgba(139,92,246,.10) !important;border:0 !important;box-shadow:none !important}

/* empty states */
html.gs-ads:not(.dark) main .text-center .bg-muted{background:linear-gradient(135deg,#efeafa,#e3dcfb) !important}

/* my ads : cards */
html.gs-ads:not(.dark) main .bg-card.border{border:0}

/* messages list */
html.gs-ads:not(.dark) main .divide-y{overflow:hidden;border-radius:22px;background:#fff;box-shadow:0 12px 26px rgba(90,60,160,.12)}
html.gs-ads:not(.dark) main .divide-y > *{border-color:rgba(120,100,170,.12) !important}
html.gs-ads:not(.dark) main .divide-y button{background:transparent !important;box-shadow:none !important;border:0 !important;border-radius:0 !important}
html.gs-ads:not(.dark) main .divide-y button:active{background:rgba(139,92,246,.08) !important}
html.gs-ads:not(.dark) main .rounded-full.bg-muted{background:linear-gradient(135deg,#efeafa,#dcd2fa)}
/* unread bubble: small gradient dot, no big glow */
html.gs-ads:not(.dark) .bg-primary.rounded-full{box-shadow:0 3px 8px rgba(122,63,224,.45) !important;border:2px solid #fff}

/* ad details */
html.gs-ads:not(.dark) .bg-orange-500\/15{background:rgba(240,112,200,.16) !important;color:#b02f93 !important}
html.gs-ads:not(.dark) .bg-green-500\/15{background:rgba(63,95,224,.12) !important;color:#3f5fe0 !important}
html.gs-ads:not(.dark) main .bg-muted.rounded-lg{background:#efeafa !important;color:#4a3f8a !important}
html.gs-ads:not(.dark) main .border-b.border-border{border-color:rgba(120,100,170,.14) !important}

/* ad page and conversation: focused pages, the dock gives way to the action bars */
html.gs-detail .gs-dock,html.gs-chat .gs-dock{display:none}
html.gs-detail:not(.dark) .min-h-screen{padding-bottom:110px}
html.gs-detail:not(.dark) .fixed.inset-x-0.bottom-\[68px\]{
  bottom:calc(12px + env(safe-area-inset-bottom,0px)) !important;left:12px;right:12px;width:auto;max-width:calc(42rem - 24px);margin-inline:auto;
  background:transparent !important;backdrop-filter:none !important;-webkit-backdrop-filter:none !important;
  border:0 !important;border-radius:0;box-shadow:none !important;padding:10px;
}
html.gs-detail:not(.dark) .fixed.inset-x-0.bottom-\[68px\] button{border-radius:18px !important;height:48px}
html.gs-detail:not(.dark) .fixed.inset-x-0.bottom-\[68px\] button:not(.gradient-primary):not(.bg-primary){
  background:#fdfcff !important;border:1px solid rgba(120,100,170,.22) !important;color:#4a3f8a !important;box-shadow:none;
}

/* conversation */
html.gs-chat:not(.dark) #root > div{padding-bottom:env(safe-area-inset-bottom,0px) !important}
html.gs-chat:not(.dark) .bg-card.border-t{
  background:rgba(255,255,255,.88) !important;backdrop-filter:blur(16px);-webkit-backdrop-filter:blur(16px);
  border:0 !important;box-shadow:0 -10px 30px rgba(50,25,130,.18);
}
html.gs-chat:not(.dark) textarea{border-radius:22px !important;min-height:44px;background:#fdfcff !important}
html.gs-chat:not(.dark) button.gradient-primary{border-radius:50% !important;width:44px;height:44px}
html.gs-chat:not(.dark) .bg-card.border{background:#fff !important;border:0 !important;color:#2b2450 !important;box-shadow:0 6px 16px rgba(90,60,160,.14)}
html.gs-chat:not(.dark) .bg-primary.text-primary-foreground{background-image:var(--gs-grad-blue) !important;color:#fff !important;box-shadow:0 8px 18px rgba(63,95,224,.3) !important;border:0}
html.gs-chat:not(.dark) .bg-muted.text-muted-foreground.rounded-full{background:rgba(255,255,255,.28) !important;color:#fff !important}
html.gs-chat:not(.dark) .rounded-2xl.p-5{border-radius:26px !important;box-shadow:0 24px 60px rgba(50,25,130,.4)}
html.gs-chat:not(.dark) .flex-1.overflow-y-auto{padding-bottom:12px}
html.gs-chat:not(.dark) header ~ .rounded-xl.cursor-pointer,
html.gs-chat:not(.dark) .cursor-pointer.bg-card{background:rgba(255,255,255,.92) !important;border:0 !important;border-radius:20px !important;box-shadow:0 8px 20px rgba(90,60,160,.18)}

/* post an ad : same form panel as create-store */
html.gs-post:not(.dark) main{max-width:460px;padding:26px 22px 24px;margin:18px auto 0}
html.gs-post:not(.dark) main form{display:flex;flex-direction:column;gap:18px}
html.gs-post:not(.dark) main form > *{margin:0}
html.gs-post:not(.dark) main form .space-y-2 > label{display:block;margin-bottom:6px}
html.gs-post:not(.dark) main label.border-dashed{
  width:84px !important;height:84px !important;border-radius:20px !important;border:2px dashed rgba(130,100,240,.5) !important;
  background:#fdfcff;color:#7a3fe0;box-shadow:0 4px 12px rgba(90,60,160,.13);
}
html.gs-post:not(.dark) main label.border-dashed svg{color:#7a3fe0 !important}
html.gs-post:not(.dark) main .relative.w-20{width:84px !important;height:84px !important;border-radius:20px !important;border:0 !important;box-shadow:0 8px 18px rgba(90,60,160,.22)}
html.gs-post:not(.dark) main .relative.w-20 button{background:linear-gradient(135deg,#f070c8,#7a3fe0) !important;box-shadow:0 3px 8px rgba(90,60,200,.4)}
html.gs-post:not(.dark) main form button[type="submit"]{
  height:52px;border-radius:16px !important;font-size:16px;font-weight:700;color:#fff !important;
  background-image:linear-gradient(90deg,#f070c8 0%,#7a3fe0 100%) !important;box-shadow:0 10px 20px rgba(90,60,200,.35);
}
html.gs-post:not(.dark) main form button[type="submit"]:disabled{opacity:.6}
html.gs-post:not(.dark) main form > p{color:#7d75a3}
html.gs-post:not(.dark) header h1{font-weight:800}

/* dock on the purple pages: denser glass so form text never shows through; admin nav colour/image still win (inline style) */
html.gs-admin:not(.dark) .gs-dock-in{background:rgba(255,255,255,.95)}
html.gs-admin:not(.dark) .gs-btn.on{background:transparent}
html.gs-post:not(.dark) textarea{resize:none}

/* =====================================================================
   Home (/ and /category/:id) : same purple account look.
   index.html adds  gs-admin + gs-home  on these routes.
   ===================================================================== */
html:is(.gs-home,.gs-shop):not(.dark) main{width:calc(100% - 24px);max-width:64rem;margin:12px auto;padding:14px 12px}
html:is(.gs-home,.gs-shop):not(.dark) .min-h-screen{padding-bottom:120px}
html:is(.gs-home,.gs-shop):not(.dark) header{position:sticky;top:0;z-index:30;border-radius:0 0 26px 26px}
/* site title (may carry a gradient-text style from settings) -> white */
/* respect title styling from settings */
html:is(.gs-home,.gs-shop):not(.dark) header input{background:rgba(255,255,255,.96) !important;color:#2b2450}
html:is(.gs-home,.gs-shop):not(.dark) header input::placeholder{color:#9a93b4}
html:is(.gs-home,.gs-shop):not(.dark) header svg{color:#fff}
html:is(.gs-home,.gs-shop):not(.dark) header input ~ svg,html:is(.gs-home,.gs-shop):not(.dark) header .relative svg{color:inherit}
/* section titles & links */
html:is(.gs-home,.gs-shop):not(.dark) main h2{color:var(--gs-ink,#2b1f5c)}
html:is(.gs-home,.gs-shop):not(.dark) main .text-primary{color:#6d3fd9}
html:is(.gs-home,.gs-shop):not(.dark) main > div > .flex > button.text-primary,
html:is(.gs-home,.gs-shop):not(.dark) main .text-xs.text-primary{color:#7a3fe0}
/* banner slider */
html:is(.gs-home,.gs-shop):not(.dark) main img.rounded-xl.object-cover{border-radius:22px !important;box-shadow:0 12px 26px rgba(90,60,160,.22)}
/* category chips */
html:is(.gs-home,.gs-shop):not(.dark) main button.rounded-2xl:not(.gradient-primary){
  background:#fff !important;border:0 !important;color:#4a3f8a !important;
  box-shadow:0 6px 16px rgba(90,60,160,.14);
}
html:is(.gs-home,.gs-shop):not(.dark) main button.gradient-primary{
  background-image:var(--gs-grad-blue) !important;color:#fff !important;border:0 !important;
  box-shadow:0 8px 18px rgba(63,95,224,.34) !important;
}
html:is(.gs-home,.gs-shop):not(.dark) main button.rounded-full.bg-muted\/60{background:#efeafa !important;color:#4a3f8a !important}
html:is(.gs-home,.gs-shop):not(.dark) main button.rounded-full.bg-primary\/15{background:var(--gs-grad-blue) !important;color:#fff !important;border:0 !important}
/* scroll rows (category chips): room for the button shadow so it is not clipped into a visible box on a light page */
html:is(.gs-home,.gs-shop):not(.dark) main .overflow-x-auto{padding:6px 8px 18px;margin:-6px -8px -12px}
/* product cards */
html:is(.gs-home,.gs-shop):not(.dark) main .group.bg-card,
html:is(.gs-home,.gs-shop):not(.dark) main [class*="rounded-xl"][class*="bg-card"]{
  background:#fff !important;border:0 !important;border-radius:22px !important;
  box-shadow:0 12px 26px rgba(90,60,160,.16),inset 0 1px 0 rgba(255,255,255,.9);
}
html:is(.gs-home,.gs-shop):not(.dark) main .aspect-square{background:#f1f1f4}
html:is(.gs-home,.gs-shop):not(.dark) main .gradient-primary{background-image:var(--btn-bg) !important}
html:is(.gs-home,.gs-shop):not(.dark) .font-bold.text-primary{background:linear-gradient(90deg,#d94fb8,#6d3fd9);-webkit-background-clip:text;background-clip:text;-webkit-text-fill-color:transparent}
html:is(.gs-home,.gs-shop):not(.dark) main .animate-pulse{background:rgba(139,92,246,.10) !important;border:0 !important;box-shadow:none !important}
/* flash sale strip -> purple/pink */
html:is(.gs-home,.gs-shop):not(.dark) main [class*="from-destructive/90"]{background-image:linear-gradient(135deg,#f070c8,#7a3fe0) !important}
/* footer on the gradient */
html:is(.gs-home,.gs-shop):not(.dark) footer{background:transparent !important;border:0 !important}
html:is(.gs-home,.gs-shop):not(.dark) footer,html:is(.gs-home,.gs-shop):not(.dark) footer *{color:var(--gs-ink,#2b2450) !important}
/* dock: denser glass like the other purple pages (already in gs-admin) */
html:is(.gs-home,.gs-shop):not(.dark) .gs-fab{border-color:transparent}

/* =====================================================================
   Category banner (strip that opens when a category chip is tapped, e.g. "ملابس")
   Same look as the subject banners of bacbem.com: the category's own colour
   gradient + a big translucent circle on the side + a small crescent corner,
   rounded 28px, soft coloured shadow. Banners with an uploaded cover image keep it.
   ===================================================================== */
html:is(.gs-home,.gs-shop):not(.dark) main > .relative.rounded-2xl.overflow-hidden.mb-4{
  border-radius:28px !important;
  box-shadow:0 18px 34px -10px rgba(110,70,230,.55);
  isolation:isolate;
}
html:is(.gs-home,.gs-shop):not(.dark) main > .relative.rounded-2xl.overflow-hidden.mb-4::before,
html:is(.gs-home,.gs-shop):not(.dark) main > .relative.rounded-2xl.overflow-hidden.mb-4::after{
  content:"";position:absolute;border-radius:50%;background:rgba(255,255,255,.14);pointer-events:none;z-index:0;
}
html:is(.gs-home,.gs-shop):not(.dark) main > .relative.rounded-2xl.overflow-hidden.mb-4::before{
  width:300px;height:300px;left:-90px;top:50%;transform:translateY(-50%);
}
html:is(.gs-home,.gs-shop):not(.dark) main > .relative.rounded-2xl.overflow-hidden.mb-4::after{
  width:90px;height:90px;left:-30px;bottom:-45px;background:rgba(255,255,255,.10);
}
html:is(.gs-home,.gs-shop):not(.dark) main > .relative.rounded-2xl.overflow-hidden.mb-4 > div{
  position:relative;z-index:1;padding:30px 22px !important;min-height:108px;
}
html:is(.gs-home,.gs-shop):not(.dark) main > .relative.rounded-2xl.overflow-hidden.mb-4 h2{color:#fff !important;font-size:1.6rem;font-weight:800;text-shadow:none}
html:is(.gs-home,.gs-shop):not(.dark) main > .relative.rounded-2xl.overflow-hidden.mb-4 button{
  width:44px !important;height:44px !important;background:rgba(255,255,255,.24) !important;color:#fff !important;border-radius:16px !important;
}
html:is(.gs-home,.gs-shop):not(.dark) main > .relative.rounded-2xl.overflow-hidden.mb-4 button svg{color:#fff !important}

/* =====================================================================
   Side menu (the sheet opened by the header's menu button), any page.
   ===================================================================== */
html:not(.dark) [role="dialog"][class*="w-[300px]"]{
  background:var(--gs-panel,linear-gradient(180deg,#f8f5fe 0%,#efeafa 100%)) !important;
  background-image:linear-gradient(180deg,#f8f5fe 0%,#efeafa 100%) !important;
  color:#2b2450 !important;border:0 !important;
  box-shadow:0 0 50px rgba(50,25,130,.4);
}
html:not(.dark) [role="dialog"][class*="w-[300px]"] > div:first-child{
  background:linear-gradient(135deg,#f46fcf 0%,#b36cf3 48%,#5fa8ff 100%) !important;
  border-radius:0 0 26px 26px;box-shadow:0 10px 24px rgba(90,60,200,.3);
}
html:not(.dark) [role="dialog"][class*="w-[300px]"] > div:first-child *{color:#fff !important;-webkit-text-fill-color:#fff !important;background-image:none}
html:not(.dark) [role="dialog"][class*="w-[300px]"] > div:first-child button,
html:not(.dark) [role="dialog"][class*="w-[300px]"] > div:first-child a[target]{background:rgba(255,255,255,.25) !important}
/* login card -> gradient button, rows -> white rounded rows */
html:not(.dark) [role="dialog"][class*="w-[300px]"] a.bg-primary{
  background-image:linear-gradient(90deg,#f070c8 0%,#7a3fe0 100%) !important;background-color:transparent !important;
  color:#fff !important;box-shadow:0 10px 20px rgba(90,60,200,.35);
}
html:not(.dark) [role="dialog"][class*="w-[300px]"] a.bg-green-600{
  background-image:var(--gs-grad-blue) !important;background-color:transparent !important;box-shadow:0 8px 18px rgba(63,95,224,.32);
}
html:not(.dark) [role="dialog"][class*="w-[300px]"] a:not(.bg-primary):not(.bg-green-600),
html:not(.dark) [role="dialog"][class*="w-[300px]"] button:not([aria-label="Close"]):not([class*="rounded-full"]){
  color:#2b2450 !important;
}
html:not(.dark) [role="dialog"][class*="w-[300px]"] a:not(.bg-primary):not(.bg-green-600):hover{background:rgba(139,92,246,.10) !important}
html:not(.dark) [role="dialog"][class*="w-[300px]"] .bg-primary\/10{background:linear-gradient(135deg,#efeafa,#dcd2fa) !important}
html:not(.dark) [role="dialog"][class*="w-[300px]"] .text-primary{color:#6d3fd9 !important}
html:not(.dark) [role="dialog"][class*="w-[300px]"] .bg-muted\/50{background:#fff !important;box-shadow:0 6px 16px rgba(90,60,160,.12)}
html:not(.dark) [role="dialog"][class*="w-[300px]"] .text-muted-foreground{color:#7d75a3 !important}



/* =====================================================================
   ALL OTHER PAGES  (index.html adds  gs-admin + gs-shop  on them)
   Stores (/store/:slug), cart + checkout (/cart), orders, wishlist, services, legal pages, 404,
   and the product sheet that opens on any page. Same purple look as the home page; the old
   white / flat / green styling of these pages is overridden here.
   ===================================================================== */

/* page body: use the wide panel layout of the home page, narrower for forms/lists */
html.gs-shop:not(.dark) .min-h-screen{padding-bottom:120px}
html.gs-shop:not(.dark) main.max-w-2xl{max-width:42rem}
html.gs-shop:not(.dark) main.max-w-3xl{max-width:48rem}

/* top bars: purple tinted glass (readable also when content scrolls under it) */
html.gs-shop:not(.dark) header:not([style*="background"]){
  background:var(--header-bg, linear-gradient(135deg,rgba(122,63,224,.93),rgba(179,108,243,.9) 55%,rgba(240,112,200,.88)));
  border:0;border-radius:0 0 26px 26px;box-shadow:0 10px 26px rgba(60,30,150,.28);
}
html.gs-shop:not(.dark) header .text-foreground,
html.gs-shop:not(.dark) header .text-primary,
html.gs-shop:not(.dark) header .text-muted-foreground:not(.absolute),
html.gs-shop:not(.dark) header h1,html.gs-shop:not(.dark) header h2,html.gs-shop:not(.dark) header p{color:var(--title-color, #fff) !important;-webkit-text-fill-color:var(--title-color, #fff)}
html.gs-shop:not(.dark) header .bg-primary{background-image:linear-gradient(135deg,#f070c8,#ff5fa8) !important;color:#fff !important}
html.gs-shop:not(.dark) header .hover\:bg-accent:hover,
html.gs-shop:not(.dark) header .hover\:bg-muted:hover{background:rgba(255,255,255,.22) !important}
html.gs-shop:not(.dark) header a{color:#fff}

/* announcement strip of a store */
html.gs-shop:not(.dark) .bg-primary.text-center{border-radius:0 0 20px 20px}

/* ---------- store profile (cover + logo + name) -> one white rounded card ---------- */
html.gs-store:not(.dark) header + div.relative{
  margin:12px 12px 0;border-radius:28px;overflow:hidden;background:#fff;
  box-shadow:0 18px 40px rgba(50,25,130,.28),inset 0 1px 0 rgba(255,255,255,.95);padding-bottom:14px;
}
html.gs-store:not(.dark) header + div.relative [class*="from-primary/20"]{background-image:var(--gs-grad) !important}
html.gs-store:not(.dark) header + div.relative img.rounded-2xl,
html.gs-store:not(.dark) header + div.relative div.rounded-2xl.bg-primary{border-radius:22px !important;border-color:#fff !important;box-shadow:0 12px 26px rgba(90,60,160,.28)}
html.gs-store:not(.dark) header + div.relative h2{color:#2b1f5c !important}
html.gs-store:not(.dark) header + div.relative a[href^="tel"]{background:#efeafa !important;color:#6d3fd9 !important;border:0 !important}
/* category pills strip -> floating white bar */
html.gs-store:not(.dark) .bg-card\/80{margin:12px 12px 0;background:rgba(255,255,255,.94) !important;backdrop-filter:blur(10px);border:0 !important;border-radius:22px;box-shadow:0 10px 24px rgba(90,60,160,.16)}
html.gs-store:not(.dark) .bg-card\/80 > div{padding-block:12px}
html.gs-store:not(.dark) main > h2,html.gs-store:not(.dark) main h2.font-bold{color:#2b1f5c}

/* ---------- generic soft tints used across the old pages -> lavender ---------- */
html.gs-shop:not(.dark) main [class*="bg-primary/5"],
html.gs-shop:not(.dark) main [class*="bg-primary/10"]:not(.rounded-full),
html.gs-shop:not(.dark) main .bg-muted\/50,
html.gs-shop:not(.dark) main .bg-muted\/40{background:linear-gradient(135deg,#f6f2ff,#ebe3fd) !important;border-color:rgba(120,100,170,.14) !important}
html.gs-shop:not(.dark) main [class*="bg-primary/10"].rounded-full,
html.gs-shop:not(.dark) main [class*="bg-primary/10"][class*="rounded-xl"][class*="w-"]{background:linear-gradient(135deg,#efeafa,#dcd2fa) !important}
html.gs-shop:not(.dark) main .bg-green-500\/10{background:linear-gradient(135deg,#f3eefe,#e3dcfb) !important}
html.gs-shop:not(.dark) main .text-green-600{color:#6d3fd9 !important}
html.gs-shop:not(.dark) main .text-destructive{color:#d6336c}
html.gs-shop:not(.dark) main [class*="border-dashed"]{border-color:rgba(122,63,224,.4) !important;background:#faf7ff}
html.gs-shop:not(.dark) main .text-muted-foreground{color:#7d75a3}
html.gs-shop:not(.dark) main .text-foreground{color:#2b2450}

/* rows inside list cards (orders accordion...) must stay square, not pills */
html.gs-shop:not(.dark) main .overflow-hidden > button.w-full{border-radius:0 !important;background:transparent !important;box-shadow:none !important;color:inherit !important}
html.gs-shop:not(.dark) main .overflow-hidden > button.w-full:active{background:rgba(139,92,246,.08) !important}

/* ---------- cart + checkout ---------- */
html.gs-cart:not(.dark) main button[class*="border-2"]{border-radius:18px !important;background:#fff;border-color:rgba(122,63,224,.18)}
html.gs-cart:not(.dark) main button[class*="border-primary"][class*="border-2"]{
  background:linear-gradient(135deg,#f6f2ff,#e8defc) !important;border-color:#8d5cf3 !important;box-shadow:0 8px 18px rgba(109,63,217,.22)}
html.gs-cart:not(.dark) main .border-t{border-color:rgba(120,100,170,.18) !important}
html.gs-cart:not(.dark) main .font-bold.text-primary{font-size:1.05rem}
html.gs-cart:not(.dark) main button.gradient-primary,
html.gs-cart:not(.dark) main button.w-full.h-12{height:52px;font-size:1rem;box-shadow:0 12px 24px rgba(109,63,217,.38) !important}
html.gs-cart:not(.dark) main button.rounded-lg.bg-muted{background:#efeafa !important;color:#4a3f8a !important}
html.gs-cart:not(.dark) main .border-green-500{border-color:#8d5cf3 !important;--tw-ring-color:#8d5cf3}
html.gs-cart:not(.dark) main .ring-green-500{--tw-ring-color:#8d5cf3}

/* ---------- product sheet (opens over any page) + dialogs ---------- */
html.gs-admin:not(.dark) .fixed.inset-0 > .absolute.inset-0[class*="bg-black"]{background:rgba(43,31,92,.58) !important;backdrop-filter:blur(6px)}
html.gs-admin:not(.dark) .fixed.inset-0 > .relative.bg-card{
  background:var(--gs-panel) !important;color:#2b2450;border:0 !important;
  border-radius:28px 28px 0 0 !important;box-shadow:0 -18px 50px rgba(50,25,130,.4) !important;
}
@media (min-width:640px){html.gs-admin:not(.dark) .fixed.inset-0 > .relative.bg-card{border-radius:28px !important}}
html.gs-admin:not(.dark) .fixed.inset-0 > .relative.bg-card .sticky.top-0{
  background:linear-gradient(135deg,#7a3fe0,#b36cf3 60%,#f070c8) !important;color:#fff;border-radius:0 0 22px 22px}
html.gs-admin:not(.dark) .fixed.inset-0 > .relative.bg-card .sticky.top-0 *{color:#fff !important}
html.gs-admin:not(.dark) .fixed.inset-0 > .relative.bg-card .sticky.top-0 button{background:rgba(255,255,255,.22) !important}
html.gs-admin:not(.dark) .fixed.inset-0 > .relative.bg-card .sticky.bottom-0{background:linear-gradient(0deg,#efeafa 70%,rgba(239,234,250,0)) !important}
html.gs-admin:not(.dark) .fixed.inset-0 > .relative.bg-card .bg-muted\/50,
html.gs-admin:not(.dark) .fixed.inset-0 > .relative.bg-card .bg-muted\/40,
html.gs-admin:not(.dark) .fixed.inset-0 > .relative.bg-card .bg-muted\/60,
html.gs-admin:not(.dark) .fixed.inset-0 > .relative.bg-card .bg-muted{background:#fff !important;box-shadow:0 6px 16px rgba(90,60,160,.12);border-color:transparent}
html.gs-admin:not(.dark) .fixed.inset-0 > .relative.bg-card .bg-emerald-500\/10{background:linear-gradient(135deg,#f3eefe,#e3dcfb) !important;border-color:rgba(122,63,224,.25) !important}
html.gs-admin:not(.dark) .fixed.inset-0 > .relative.bg-card .bg-orange-500\/10{background:rgba(240,112,200,.14) !important;border-color:rgba(240,112,200,.35) !important}
html.gs-admin:not(.dark) .fixed.inset-0 > .relative.bg-card .text-emerald-500,
html.gs-admin:not(.dark) .fixed.inset-0 > .relative.bg-card .text-emerald-600,
html.gs-admin:not(.dark) .fixed.inset-0 > .relative.bg-card .text-emerald-700,
html.gs-admin:not(.dark) .fixed.inset-0 > .relative.bg-card .text-emerald-300{color:#6d3fd9 !important}
html.gs-admin:not(.dark) .fixed.inset-0 > .relative.bg-card .text-orange-500{color:#d6336c !important}
html.gs-admin:not(.dark) .fixed.inset-0 > .relative.bg-card [class*="border-border"]{border-color:rgba(120,100,170,.16) !important}
/* every green / emerald action button -> blue-violet gradient (like the side menu) */
html.gs-admin:not(.dark) .bg-green-600,
html.gs-admin:not(.dark) .bg-emerald-600{background-image:var(--gs-grad-blue) !important;background-color:transparent !important;color:#fff !important;box-shadow:0 8px 18px rgba(63,95,224,.32)}
html.gs-admin:not(.dark) .bg-green-600:hover,
html.gs-admin:not(.dark) .bg-emerald-600:hover{filter:brightness(1.06)}
/* secondary (pink) accents */
html.gs-admin:not(.dark) .bg-secondary{background-image:linear-gradient(135deg,#f070c8,#7a3fe0) !important;background-color:transparent !important;color:#fff !important}
html.gs-admin:not(.dark) .bg-destructive.rounded-full{background-image:linear-gradient(135deg,#f070c8,#7a3fe0) !important;background-color:transparent !important;color:#fff !important}
html.gs-admin:not(.dark) .text-secondary{color:#c13bd0}

/* categories drawer of a store (w-[280px]) -> same lavender panel as the main side menu */
html:not(.dark) [role="dialog"][class*="w-[280px]"]{
  background:linear-gradient(180deg,#f8f5fe 0%,#efeafa 100%) !important;color:#2b2450 !important;border:0 !important;box-shadow:0 0 50px rgba(50,25,130,.4)}
html:not(.dark) [role="dialog"][class*="w-[280px]"] button.w-full{border-radius:16px !important;background:transparent;color:#2b2450;box-shadow:none}
html:not(.dark) [role="dialog"][class*="w-[280px]"] button.w-full.bg-primary{background-image:var(--gs-grad-blue) !important;color:#fff;box-shadow:0 8px 18px rgba(63,95,224,.32)}

/* ---------- 404 / empty states on the gradient ---------- */
html.gs-shop:not(.dark) .min-h-screen > .text-center,
html.gs-shop:not(.dark) .min-h-screen > div > .text-center{color:var(--gs-ink,#2b2450)}
html.gs-shop:not(.dark) .min-h-screen > .text-center h1,
html.gs-shop:not(.dark) .min-h-screen > .text-center p{color:var(--gs-ink,#2b2450) !important}
html.gs-shop:not(.dark) main .text-center.py-12,html.gs-shop:not(.dark) main .text-center.py-16{padding-inline:12px}
html.gs-shop:not(.dark) .min-h-screen > .text-center .text-foreground,
html.gs-shop:not(.dark) .min-h-screen > .text-center .text-muted-foreground{color:var(--gs-ink,#2b2450) !important}
html.gs-shop:not(.dark) .min-h-screen > .text-center .bg-card\/80{background:rgba(0,0,0,.04) !important;border:0 !important}

/* =====================================================================
   DARK MODE  —  the same purple design on every page (html.dark + html.gs-admin).
   Deep-violet tokens, dark gradient page, glass top bar, dark lavender panels,
   gradient buttons. All text colours are light so everything stays readable.
   ===================================================================== */
html.gs-admin.dark{
  --background:258 45% 7%;--foreground:260 60% 96%;
  --card:258 32% 14%;--card-foreground:260 60% 96%;
  --popover:258 34% 12%;--popover-foreground:260 60% 96%;
  --primary:262 90% 70%;--primary-foreground:0 0% 100%;
  --secondary:322 80% 66%;--secondary-foreground:0 0% 100%;
  --muted:258 28% 20%;--muted-foreground:260 30% 80%;
  --accent:258 40% 22%;--accent-foreground:262 90% 85%;
  --border:258 28% 26%;--input:258 28% 26%;--ring:262 90% 70%;
  --sidebar-background:258 40% 10%;--sidebar-foreground:260 60% 96%;
  --sidebar-primary:262 90% 70%;--sidebar-primary-foreground:0 0% 100%;
  --sidebar-accent:258 35% 18%;--sidebar-accent-foreground:260 60% 96%;
  --sidebar-border:258 28% 22%;--sidebar-ring:262 90% 70%;
  --radius:1.1rem;
  --gs-grad:linear-gradient(135deg,#d44fb4 0%,#8d5cf3 52%,#4a7fe8 100%);
  --gs-grad-blue:linear-gradient(135deg,#8d5cf3 0%,#4a5fe0 100%);
  --gs-grad-pink:linear-gradient(135deg,#d44fb4 0%,#6d3fd9 100%);
  --gs-panel:linear-gradient(180deg,#2b2059 0%,#1e1745 100%);
  --btn-bg:var(--gs-grad);--btn-fg:#fff;
  --btn-shadow:rgba(141,92,243,.38);--btn-shadow-hover:rgba(141,92,243,.55);
  color-scheme:dark;
}
html.gs-admin.dark body{background:transparent;color:#f1ecff}
html.gs-admin.dark body::before{
  content:"";position:fixed;inset:0;z-index:-1;pointer-events:none;
  background:#14141a;
}
html.gs-admin.dark #root > div,
html.gs-admin.dark .min-h-screen.bg-background{background-color:transparent !important;background-image:none !important}

/* top bar */
html.gs-admin.dark header{
  background:rgba(20,12,50,.55) !important;border-color:transparent !important;
  backdrop-filter:blur(14px);-webkit-backdrop-filter:blur(14px);color:#fff;
}
html.gs-admin.dark header h1,html.gs-admin.dark header h2,html.gs-admin.dark header p,
html.gs-admin.dark header span:not([class*="bg-"]),
html.gs-admin.dark header .text-foreground,html.gs-admin.dark header .text-primary,
html.gs-admin.dark header .text-muted-foreground:not(.absolute){color:#fff !important;-webkit-text-fill-color:#fff}
html.gs-admin.dark header button:not(.bg-primary):not([class*="gradient"]){
  background:rgba(255,255,255,.14) !important;color:#fff !important;border:0 !important;box-shadow:none}
html.gs-admin.dark header button:not(.bg-primary):not([class*="gradient"]) svg,html.gs-admin.dark header svg{color:#fff !important}
html.gs-admin.dark header input{background:rgba(255,255,255,.12) !important;color:#fff;border:0}
html.gs-admin.dark header input::placeholder{color:rgba(255,255,255,.65)}
html.gs-admin.dark header input ~ svg,html.gs-admin.dark header .relative svg{color:rgba(255,255,255,.75) !important}
html.gs-admin.dark header .hover\:bg-accent:hover,html.gs-admin.dark header .hover\:bg-muted:hover{background:rgba(255,255,255,.2) !important}
html.gs-admin.dark header a{color:#fff}
html.gs-admin.dark header span[style]{background:none !important;-webkit-text-fill-color:#fff !important;color:#fff !important}
html:is(.gs-home,.gs-shop).dark header{position:sticky;top:0;z-index:30;border-radius:0 0 26px 26px}
html.gs-home.dark header{position:sticky;top:0;z-index:30}

/* main panel */
html.gs-admin.dark main{
  background:transparent;border-radius:0;margin:12px;color:#f1ecff;
  box-shadow:none;
}
@media (min-width:1024px){html.gs-admin.dark main{margin:16px 24px 24px}}
html:is(.gs-home,.gs-shop).dark main{width:calc(100% - 24px);max-width:64rem;margin:12px auto;padding:14px 12px}
html.gs-shop.dark main.max-w-2xl{max-width:42rem}
html.gs-shop.dark main.max-w-3xl{max-width:48rem}
html:is(.gs-home,.gs-shop).dark .min-h-screen{padding-bottom:120px}

/* cards */
html.gs-admin.dark [class*="rounded-xl"][class*="border"],
html.gs-admin.dark [class*="rounded-2xl"][class*="border"],
html.gs-admin.dark [class*="rounded-lg"][class*="bg-card"],
html.gs-admin.dark .bg-card:not(aside):not(header){
  border-radius:20px !important;border-color:rgba(190,170,255,.14);
  box-shadow:0 10px 24px rgba(0,0,0,.35),inset 0 1px 0 rgba(255,255,255,.06);
}
html.gs-admin.dark main .bg-card,html.gs-admin.dark main [class*="bg-white"]{background-color:#34286f}
html:is(.gs-home,.gs-shop).dark main .group.bg-card,
html:is(.gs-home,.gs-shop).dark main [class*="rounded-xl"][class*="bg-card"]{
  background:#34286f !important;border:0 !important;border-radius:22px !important;
  box-shadow:0 12px 26px rgba(0,0,0,.4),inset 0 1px 0 rgba(255,255,255,.07)}
html:is(.gs-home,.gs-shop).dark main .aspect-square{background:#262630}
html.gs-admin.dark main .bg-muted\/50,html.gs-admin.dark main .bg-muted\/40,html.gs-admin.dark main [class*="bg-primary/5"],
html.gs-admin.dark main [class*="bg-primary/10"]:not(.rounded-full){background:linear-gradient(135deg,#2a2250,#322863) !important;border-color:rgba(190,170,255,.16) !important}
html.gs-admin.dark main [class*="bg-primary/10"].rounded-full{background:linear-gradient(135deg,#352a6e,#4a3a8f) !important}
html.gs-admin.dark main .bg-green-500\/10{background:linear-gradient(135deg,#2a2250,#322863) !important}

/* stat tiles */
html.gs-admin.dark main [class*="from-primary/10"],html.gs-admin.dark main [class*="from-blue-500/10"],
html.gs-admin.dark main [class*="from-green-500/10"],html.gs-admin.dark main [class*="from-orange-500/10"],
html.gs-admin.dark main [class*="from-purple-500/10"],html.gs-admin.dark main [class*="from-pink-500/10"]{
  background-image:var(--gs-grad-blue) !important;border:0 !important;box-shadow:0 12px 24px rgba(0,0,0,.4)}
html.gs-admin.dark main [class*="from-green-500/10"],html.gs-admin.dark main [class*="from-orange-500/10"]{background-image:var(--gs-grad-pink) !important}
html.gs-admin.dark main [class*="from-primary/10"] *,html.gs-admin.dark main [class*="from-blue-500/10"] *,
html.gs-admin.dark main [class*="from-green-500/10"] *,html.gs-admin.dark main [class*="from-orange-500/10"] *,
html.gs-admin.dark main [class*="from-purple-500/10"] *,html.gs-admin.dark main [class*="from-pink-500/10"] *{color:#fff !important}

/* buttons */
html.gs-admin.dark .bg-primary,html.gs-admin.dark button.bg-primary,html.gs-admin.dark .gradient-primary,
html.gs-admin.dark .bg-green-600,html.gs-admin.dark .bg-emerald-600{
  background-image:var(--btn-bg) !important;background-color:transparent !important;color:#fff !important;border:0;
  box-shadow:0 8px 20px var(--btn-shadow)}
html.gs-admin.dark .bg-green-600,html.gs-admin.dark .bg-emerald-600{background-image:var(--gs-grad-blue) !important}
html.gs-admin.dark .bg-secondary,html.gs-admin.dark .bg-destructive.rounded-full{
  background-image:var(--gs-grad-pink) !important;background-color:transparent !important;color:#fff !important}
html.gs-admin.dark button{border-radius:999px}
html.gs-admin.dark button[class*="rounded-md"],html.gs-admin.dark button[class*="rounded-lg"],html.gs-admin.dark button[class*="rounded-xl"]{border-radius:999px !important}
html.gs-admin.dark main button[class*="border"]:not(.bg-primary):not([class*="gradient"]):not([role="tab"]){
  background:#3a2d7c;border-color:rgba(190,170,255,.24);color:#e6dcff}
html:is(.gs-home,.gs-shop).dark main button.rounded-2xl:not(.gradient-primary){
  background:#3a2d7c !important;border:0 !important;color:#e6dcff !important;box-shadow:0 6px 16px rgba(0,0,0,.35)}
html:is(.gs-home,.gs-shop).dark main button.gradient-primary{
  background-image:var(--gs-grad-blue) !important;color:#fff !important;border:0 !important;box-shadow:0 8px 18px rgba(74,95,224,.4) !important}
html:is(.gs-home,.gs-shop).dark main button.rounded-full.bg-muted\/60{background:#3a2d7c !important;color:#e6dcff !important}
html:is(.gs-home,.gs-shop).dark main button.rounded-full.bg-primary\/15{background:var(--gs-grad-blue) !important;color:#fff !important;border:0 !important}
html.gs-shop.dark main .overflow-hidden > button.w-full{border-radius:0 !important;background:transparent !important;box-shadow:none !important;color:inherit !important}
html.gs-cart.dark main button[class*="border-2"]{border-radius:18px !important;background:#3a2d7c;border-color:rgba(190,170,255,.2)}
html.gs-cart.dark main button[class*="border-primary"][class*="border-2"]{background:linear-gradient(135deg,#352a6e,#46378a) !important;border-color:#9a74ff !important}
html.gs-cart.dark main .border-green-500{border-color:#9a74ff !important}
html.gs-cart.dark main button.rounded-lg.bg-muted{background:#352a6e !important;color:#efe8ff !important}

/* inputs */
html.gs-admin.dark input:not([type="checkbox"]):not([type="radio"]):not([type="file"]):not([type="range"]),
html.gs-admin.dark textarea,html.gs-admin.dark select,html.gs-admin.dark [role="combobox"]{
  border-radius:14px !important;background-color:#2e2468;color:#f1ecff;border-color:transparent;
  box-shadow:0 4px 12px rgba(0,0,0,.35),inset 0 0 0 1px rgba(190,170,255,.14)}
html.gs-admin.dark input::placeholder,html.gs-admin.dark textarea::placeholder{color:#a79bd0}
html.gs-admin.dark input:focus,html.gs-admin.dark textarea:focus,html.gs-admin.dark [role="combobox"]:focus{
  box-shadow:0 4px 14px rgba(141,92,243,.4),0 0 0 2px rgba(154,116,255,.7);outline:none}
html.gs-admin.dark label{color:#e6dcff}

/* tabs */
html.gs-admin.dark [role="tablist"]{background:rgba(255,255,255,.08);border-radius:999px;padding:4px;box-shadow:0 6px 18px rgba(0,0,0,.3)}
html.gs-admin.dark [role="tab"]{border-radius:999px !important;color:#d8ccff}
html.gs-admin.dark [role="tab"][data-state="active"]{background-image:var(--btn-bg) !important;background-color:transparent !important;color:#fff !important;box-shadow:0 6px 14px var(--btn-shadow)}

/* sidebar + dialogs/menus */
html.gs-admin.dark aside,html.gs-admin.dark [data-sidebar="sidebar"]{background:var(--gs-panel) !important;border-color:transparent !important;box-shadow:0 0 40px rgba(0,0,0,.5)}
html.gs-admin.dark aside .border-b,html.gs-admin.dark aside .border-t{border-color:rgba(190,170,255,.16) !important}
html.gs-admin.dark aside nav button{border-radius:16px !important;color:#d8ccff}
html.gs-admin.dark aside nav button.bg-primary,html.gs-admin.dark aside nav button[class*="bg-primary"],
html.gs-admin.dark [data-sidebar="menu-button"][data-active="true"],html.gs-admin.dark [data-active="true"]{
  background-image:var(--gs-grad-blue) !important;color:#fff !important;border-radius:16px}
html.dark [role="dialog"][class*="w-[300px]"],html.dark [role="dialog"][class*="w-[280px]"]{
  background:linear-gradient(180deg,#2b2059 0%,#1e1745 100%) !important;color:#f1ecff !important;border:0 !important;box-shadow:0 0 50px rgba(0,0,0,.6)}
html.dark [role="dialog"][class*="w-[300px]"] > div:first-child{
  background:linear-gradient(135deg,#a8409a 0%,#6d3fd9 50%,#3f6fd8 100%) !important;border-radius:0 0 26px 26px}
html.dark [role="dialog"][class*="w-[300px]"] > div:first-child *{color:#fff !important;-webkit-text-fill-color:#fff !important;background-image:none}
html.dark [role="dialog"][class*="w-[300px]"] > div:first-child button{background:rgba(255,255,255,.22) !important}
html.dark [role="dialog"][class*="w-[300px]"] a:not(.bg-primary):not(.bg-green-600),
html.dark [role="dialog"][class*="w-[300px]"] button:not([aria-label="Close"]):not([class*="rounded-full"]){color:#f1ecff !important}
html.dark [role="dialog"][class*="w-[300px]"] a:not(.bg-primary):not(.bg-green-600):hover{background:rgba(141,92,243,.22) !important}
html.dark [role="dialog"][class*="w-[300px]"] .bg-muted\/50,html.dark [role="dialog"][class*="w-[300px]"] .bg-primary\/10{background:#3a2d7c !important}
html.dark [role="dialog"][class*="w-[300px]"] .text-muted-foreground{color:#b9aee0 !important}
html.dark [role="dialog"][class*="w-[300px]"] .text-primary{color:#c4a8ff !important}
html.dark [role="dialog"][class*="w-[280px]"] button.w-full{border-radius:16px !important;background:transparent;color:#f1ecff;box-shadow:none}
html.dark [role="dialog"][class*="w-[280px]"] button.w-full.bg-primary{background-image:var(--gs-grad-blue) !important}

/* text */
html.gs-admin.dark main h1,html.gs-admin.dark main h2,html.gs-admin.dark main h3{color:#f6f1ff}
html.gs-admin.dark .text-primary{color:#c4a8ff}
html.gs-admin.dark .text-foreground,html.gs-admin.dark main .text-foreground{color:#f1ecff}
html.gs-admin.dark .text-muted-foreground,html.gs-admin.dark main .text-muted-foreground{color:#bdb2e4}
html.gs-admin.dark .text-green-600,html.gs-admin.dark .text-emerald-500,html.gs-admin.dark .text-emerald-600{color:#c4a8ff !important}
html.gs-admin.dark .text-destructive{color:#ff7aa8}
html:is(.gs-home,.gs-shop).dark .font-bold.text-primary{background:linear-gradient(90deg,#ff8ad8,#b79cff);-webkit-background-clip:text;background-clip:text;-webkit-text-fill-color:transparent}
html:is(.gs-home,.gs-shop).dark main .animate-pulse,html.gs-admin.dark .animate-pulse{background:rgba(190,170,255,.12) !important;border:0 !important;box-shadow:none !important}
html.gs-admin.dark main table thead{background:rgba(141,92,243,.18)}
html.gs-admin.dark main th{color:#d8ccff}
html.gs-admin.dark main .divide-y > *,html.gs-admin.dark main .border-border,html.gs-admin.dark main .border-b,html.gs-admin.dark main .border-t{border-color:rgba(190,170,255,.16) !important}
html.gs-admin.dark main [class*="border-dashed"]{border-color:rgba(154,116,255,.5) !important;background:#201a3f}
html:is(.gs-home,.gs-shop).dark main > div > .flex > button.text-primary,html:is(.gs-home,.gs-shop).dark main .text-xs.text-primary{color:#c4a8ff}
html:is(.gs-home,.gs-shop).dark main [class*="from-destructive/90"]{background-image:linear-gradient(135deg,#d44fb4,#6d3fd9) !important}
html:is(.gs-home,.gs-shop).dark footer{background:transparent !important;border:0 !important}
html:is(.gs-home,.gs-shop).dark footer,html:is(.gs-home,.gs-shop).dark footer *{color:rgba(255,255,255,.9) !important}
html:is(.gs-home,.gs-shop).dark main > .relative.rounded-2xl.overflow-hidden.mb-4{border-radius:28px !important;box-shadow:0 18px 34px -10px rgba(0,0,0,.6);isolation:isolate}
html:is(.gs-home,.gs-shop).dark main > .relative.rounded-2xl.overflow-hidden.mb-4 h2{color:#fff !important}

/* dock (bottom bar) */
html.gs-admin.dark .gs-dock-in{background:rgba(24,16,56,.95)}
html.gs-admin.dark .gs-btn.on{background:transparent}

/* store profile card + category strip */
html.gs-store.dark header + div.relative{margin:12px 12px 0;border-radius:28px;overflow:hidden;background:#2d2262;box-shadow:0 18px 40px rgba(0,0,0,.5);padding-bottom:14px}
html.gs-store.dark header + div.relative [class*="from-primary/20"]{background-image:var(--gs-grad) !important}
html.gs-store.dark header + div.relative img.rounded-2xl,html.gs-store.dark header + div.relative div.rounded-2xl.bg-primary{border-radius:22px !important;border-color:#2d2262 !important}
html.gs-store.dark header + div.relative h2{color:#f6f1ff !important}
html.gs-store.dark header + div.relative a[href^="tel"]{background:#352a6e !important;color:#d8ccff !important;border:0 !important}
html.gs-store.dark .bg-card\/80{margin:12px 12px 0;background:rgba(33,26,66,.92) !important;border:0 !important;border-radius:22px;box-shadow:0 10px 24px rgba(0,0,0,.4)}
html.gs-store.dark .bg-card\/80 > div{padding-block:12px}
html.gs-shop.dark header{background:linear-gradient(135deg,rgba(90,45,180,.92),rgba(130,80,215,.88) 55%,rgba(190,70,160,.85)) !important;box-shadow:0 10px 26px rgba(0,0,0,.4)}

/* product sheet / overlays */
html.gs-admin.dark .fixed.inset-0 > .absolute.inset-0[class*="bg-black"]{background:rgba(8,4,24,.7) !important;backdrop-filter:blur(6px)}
html.gs-admin.dark .fixed.inset-0 > .relative.bg-card{
  background:var(--gs-panel) !important;color:#f1ecff;border:0 !important;
  border-radius:28px 28px 0 0 !important;box-shadow:0 -18px 50px rgba(0,0,0,.6) !important}
@media (min-width:640px){html.gs-admin.dark .fixed.inset-0 > .relative.bg-card{border-radius:28px !important}}
html.gs-admin.dark .fixed.inset-0 > .relative.bg-card .sticky.top-0{background:linear-gradient(135deg,#5a2db4,#8250d7 60%,#be46a0) !important;border-radius:0 0 22px 22px}
html.gs-admin.dark .fixed.inset-0 > .relative.bg-card .sticky.top-0 *{color:#fff !important}
html.gs-admin.dark .fixed.inset-0 > .relative.bg-card .sticky.top-0 button{background:rgba(255,255,255,.22) !important}
html.gs-admin.dark .fixed.inset-0 > .relative.bg-card .sticky.bottom-0{background:linear-gradient(0deg,#171231 70%,rgba(23,18,49,0)) !important}
html.gs-admin.dark .fixed.inset-0 > .relative.bg-card [class*="bg-muted"]{background:#3a2d7c !important;box-shadow:none;border-color:transparent}
html.gs-admin.dark .fixed.inset-0 > .relative.bg-card .bg-emerald-500\/10{background:#3a2d7c !important;border-color:rgba(154,116,255,.35) !important}
html.gs-admin.dark .fixed.inset-0 > .relative.bg-card .bg-orange-500\/10{background:rgba(212,79,180,.18) !important;border-color:rgba(212,79,180,.4) !important}
html.gs-admin.dark .fixed.inset-0 > .relative.bg-card .text-orange-500{color:#ff9ad0 !important}
html.gs-admin.dark .fixed.inset-0 > .relative.bg-card [class*="border-border"]{border-color:rgba(190,170,255,.18) !important}

/* 404 */
html.gs-shop.dark .min-h-screen > .text-center .text-foreground,
html.gs-shop.dark .min-h-screen > .text-center .text-muted-foreground{color:#fff !important}

/* scrollbars */
html.gs-admin.dark ::-webkit-scrollbar-thumb{background:rgba(154,116,255,.45)}

/* Header background + title colour: ONE source of truth (the --header-bg / --title-color variables).
   The variables are filled (1) by the server inside theme.css before first paint, (2) by the inline script in
   index.html from the local cache, (3) by the app once settings load - all three give the same value, so nothing flips.
   (The old rule here used "color: inherit", which fought the other header rules and caused the black -> white flash.) */
html:not(.dark) header {
  background-color: var(--header-bg, inherit);
}
html:not(.dark) header span[style*="color"]:not([class*="bg-"]):not([style*="transparent"]),
html:not(.dark) header h1[style*="color"],
html:not(.dark) header a[style*="color"] {
  color: var(--title-color, #fff) !important;
  -webkit-text-fill-color: currentColor !important;
}


/* ===== banners: full-bleed, no gap under the header, no rounded corners ===== */
html:is(.gs-home,.gs-shop) main > .gs-banner-wrap,
html:is(.gs-home,.gs-shop) main > .gs-offer-banner{width:100vw !important;max-width:100vw !important;margin-left:calc(50% - 50vw) !important;margin-right:calc(50% - 50vw) !important;margin-top:-6px !important;border-radius:0 !important}
html:is(.gs-home,.gs-shop) main > .gs-banner-wrap *{border-radius:0 !important;box-shadow:none !important}
html:is(.gs-home,.gs-shop) main > .gs-banner-wrap .rounded-full{border-radius:9999px !important}
html:is(.gs-home,.gs-shop) main > .gs-offer-banner{margin-bottom:4px}
