/* Hallmark · component scope: merchant commerce controls · genre: atmospheric · tone: quiet functional
 * theme: studied-DNA (source: user screenshots) · palette anchor: Maraya plum · macrostructure: existing app + paired fixed rail + modal settings
 * interaction contract: default, hover, focus, active, disabled, loading, error, success · pre-emit critique: P5 H5 E5 S5 R5 V5
 * contrast: pass (40–41) · nav: N8 paired rail · footer: existing Ft1 · honest: pass · chrome: pass · tokens: pass · responsive: pass · icons: pass
 * slop: pass (42–49) · mobile: pass (34,49–57)
 */
:root{
  --merchant-action-bg:#111;
  --merchant-action-fg:#fff;
  --merchant-shell-canvas:var(--paper,#fffdf9);
  --merchant-shell-panel:var(--paper,#fffdf9);
  --merchant-shell-panel-raised:#fff;
  --merchant-shell-text:var(--ink,#221f24);
  --merchant-shell-muted:var(--muted,#706970);
  --merchant-shell-line:var(--control-line,rgba(17,17,17,.18));
  --merchant-shell-danger:oklch(49% .17 25);
  --merchant-shell-danger-soft:oklch(96% .025 25);
  --merchant-shell-backdrop:rgba(17,17,17,.52);
  --merchant-shell-shadow:rgba(17,17,17,.24);
  --merchant-shell-shadow-soft:rgba(17,17,17,.09);
  --merchant-shell-focus:var(--merchant-shell-text);
  --merchant-shell-today:var(--plum,#4b2142);
  --merchant-shell-soft:oklch(97% .008 70);
  --merchant-shell-choice:oklch(94% .006 70);
  --merchant-rail-surface:var(--control-surface,#fff);
  --merchant-rail-ink:var(--control-ink,#111);
  --merchant-rail-hover:var(--control-hover,#f5f5f5);
  --merchant-search-surface:var(--merchant-rail-surface);
  --merchant-search-ink:var(--merchant-rail-ink);
  --merchant-search-muted:color-mix(in srgb,var(--merchant-search-ink) 62%,var(--merchant-search-surface) 38%);
  --merchant-search-line:var(--merchant-shell-line);
  --merchant-space-3xs:4px;
  --merchant-space-2xs:8px;
  --merchant-space-xs:12px;
  --merchant-space-sm:16px;
  --merchant-space-md:24px;
  --merchant-space-lg:32px;
  --merchant-rail-size:50px;
  --merchant-rail-gap:var(--merchant-space-2xs);
}

:root[data-theme="dark"]{
  --merchant-action-bg:#fff;
  --merchant-action-fg:#111;
  --merchant-shell-canvas:var(--night-canvas,var(--maraya-canvas,#111));
  --merchant-shell-panel:var(--night-panel,var(--maraya-panel,#211a21));
  --merchant-shell-panel-raised:var(--night-panel-raised,var(--maraya-panel-2,#2a222a));
  --merchant-shell-text:var(--night-ink,var(--maraya-ink,#fff8f4));
  --merchant-shell-muted:var(--night-muted,var(--maraya-muted,#c9bec6));
  --merchant-shell-line:var(--night-line,var(--maraya-line,rgba(255,248,244,.18)));
  --merchant-shell-danger:oklch(68% .15 25);
  --merchant-shell-danger-soft:oklch(24% .045 25);
  --merchant-shell-soft:oklch(24% .009 70);
  --merchant-shell-choice:oklch(28% .008 70);
}

html,body{overflow-x:clip}
body.merchant-shell-active{padding-bottom:0!important;background:var(--merchant-shell-canvas)!important;color:var(--merchant-shell-text)!important}
body.merchant-shell-active :is(.merchant-single-panel,.merchant-order-card,.invoice-card,.order-management){border-color:var(--merchant-shell-line)!important;background:var(--merchant-shell-panel)!important;color:var(--merchant-shell-text)!important}
body.merchant-shell-active .invoice-card{background:var(--merchant-shell-panel-raised)!important}
body.merchant-shell-active :is(.merchant-order-card,.invoice-card) :is(h2,strong,p,time,small){color:inherit}
body.merchant-shell-active .order-grand-total{color:#fff!important}
body.merchant-shell-active :is(.merchant-order-card,.invoice-card) :is(input,select,.unified-select-trigger){border-color:var(--merchant-shell-line)!important;background:var(--merchant-shell-panel-raised)!important;color:var(--merchant-shell-text)!important}
body.merchant-shell-active>.bottom-nav,
body.merchant-shell-active>.legacy-bottom-nav,
body.merchant-shell-active>.utility-rail,
body.merchant-shell-active>.shopper-rail,
body.merchant-shell-active .rail-nav,
body.merchant-shell-active .reel-quick-actions,
body.merchant-shell-active .merchant-mobile-account,
body.merchant-shell-active .cart-icon-link,
body.merchant-shell-active .header-account-actions{display:none!important}

.merchant-rail{
  position:fixed;
  z-index:400;
  top:50%;
  right:max(var(--merchant-space-2xs),env(safe-area-inset-right));
  display:grid;
  gap:var(--merchant-rail-gap);
  width:calc(var(--merchant-rail-size) * 2 + var(--merchant-rail-gap));
  direction:rtl;
  transform:translateY(-50%);
}

.merchant-form-nav-toggle{position:fixed;bottom:max(16px,env(safe-area-inset-bottom));right:max(12px,calc((100vw - 480px)/2 + 12px));z-index:160;width:48px;height:48px;border-radius:50%;font-size:23px;background:var(--merchant-rail-surface);color:var(--merchant-rail-ink)}
.merchant-form-page:not(.merchant-form-nav-open) .merchant-rail{display:none}
.merchant-form-page .merchant-rail{bottom:80px;top:auto;transform:none}
.merchant-form-page .merchant-shell{padding-bottom:80px}
.merchant-rail-row{
  display:grid;
  grid-template-columns:repeat(2,var(--merchant-rail-size));
  gap:var(--merchant-rail-gap);
}

.merchant-rail-market-row{
  grid-template-columns:repeat(3,var(--merchant-rail-size));
  width:max-content;
  justify-self:start;
}
.merchant-shell-form .store-photo-field input[type="file"]{
  box-sizing:border-box;
  width:100%;
  min-width:0;
  max-width:100%;
  padding:12px;
  font-size:14px;
}

.merchant-rail-link{
  position:relative;
  width:var(--merchant-rail-size);
  height:var(--merchant-rail-size);
  min-width:var(--merchant-rail-size);
  min-height:var(--merchant-rail-size);
  display:grid;
  place-items:center;
  margin:0;
  padding:0;
  border:1px solid var(--merchant-shell-line);
  border-radius:50%;
  background:var(--merchant-rail-surface);
  color:var(--merchant-rail-ink);
  box-shadow:0 8px 24px var(--merchant-shell-shadow-soft);
  text-decoration:none;
  cursor:pointer;
  transition:transform 140ms var(--ease-out,cubic-bezier(.16,1,.3,1)),border-color 140ms var(--ease-out,cubic-bezier(.16,1,.3,1)),background-color 140ms var(--ease-out,cubic-bezier(.16,1,.3,1));
}

.merchant-rail-link:hover{background:var(--merchant-rail-hover)}
.merchant-rail-link:focus-visible{outline:3px solid var(--merchant-shell-focus);outline-offset:3px}
.merchant-rail-link:active{transform:scale(.95)}
.merchant-rail-link:disabled{cursor:not-allowed;opacity:.45}
.merchant-rail-link.is-active{border:3px solid var(--merchant-rail-ink)}
.merchant-rail-link svg{width:25px;height:25px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.merchant-rail-notice{position:absolute;top:2px;right:2px;width:8px;height:8px;border:2px solid var(--merchant-rail-surface);border-radius:50%;background:var(--coral)}

.merchant-settings-sheet{
  position:fixed;
  inset:auto 0 max(12px,env(safe-area-inset-bottom));
  width:min(calc(100% - 24px),440px);
  max-width:440px;
  max-height:calc(100svh - 32px);
  margin:0 auto;
  padding:0;
  overflow:hidden;
  border:1px solid var(--merchant-shell-line);
  border-radius:30px;
  background:var(--merchant-shell-panel);
  color:var(--merchant-shell-text);
  box-shadow:0 26px 80px var(--merchant-shell-shadow);
}

.merchant-settings-sheet::backdrop{background:color-mix(in srgb,var(--merchant-shell-canvas) 80%,transparent);backdrop-filter:blur(10px);-webkit-backdrop-filter:blur(10px)}
.merchant-settings-card{max-height:calc(100svh - 34px);overflow:auto;padding:var(--merchant-space-md) var(--merchant-space-md) var(--merchant-space-sm);overscroll-behavior:contain;scrollbar-width:thin}
.merchant-settings-card>header{display:flex;align-items:center;justify-content:space-between;margin-bottom:var(--merchant-space-xs)}
.merchant-settings-card>header h2{margin:0;color:var(--merchant-shell-text);font-size:1.45rem;line-height:1.4}
.merchant-shell-icon-button{width:46px;height:46px;display:grid;place-items:center;padding:0;border:1px solid var(--merchant-shell-line);border-radius:50%;background:var(--merchant-shell-panel-raised);color:var(--merchant-shell-text);font-size:1.5rem;line-height:1;cursor:pointer}
.merchant-shell-icon-button:hover{background:color-mix(in srgb,var(--merchant-shell-panel-raised) 82%,var(--merchant-shell-text) 18%)}
.merchant-shell-icon-button:focus-visible{outline:3px solid var(--merchant-shell-focus);outline-offset:2px}
.merchant-shell-icon-button:active{transform:scale(.96)}
.merchant-shell-icon-button:disabled{cursor:not-allowed;opacity:.55}

.merchant-confirm-dialog{width:min(92vw,520px);margin:auto;padding:0;border:1px solid var(--merchant-shell-line);border-radius:24px;background:var(--merchant-shell-panel);color:var(--merchant-shell-text);box-shadow:0 26px 80px var(--merchant-shell-shadow)}
.merchant-confirm-dialog::backdrop{background:var(--merchant-shell-backdrop);backdrop-filter:blur(5px)}
.merchant-confirm-card{display:grid;gap:var(--merchant-space-md);padding:var(--merchant-space-md)}
.merchant-confirm-card>header{display:flex;align-items:center;justify-content:space-between;gap:var(--merchant-space-sm)}
.merchant-confirm-card h2{margin:0;color:var(--merchant-shell-text);font-size:1.35rem;line-height:1.4}
.merchant-confirm-card p{margin:0;color:var(--merchant-shell-muted);font-size:1rem;line-height:1.8}
.merchant-confirm-card .merchant-shell-primary{width:min(100%,300px);margin-inline:auto}

.merchant-settings-sheet [hidden]{display:none!important}
.merchant-store-settings{border-block-start:1px solid var(--merchant-shell-line)}
.merchant-store-settings>summary{min-height:78px;display:flex;align-items:center;justify-content:space-between;gap:var(--merchant-space-sm);padding:var(--merchant-space-xs) var(--merchant-space-3xs);list-style:none;cursor:pointer}
.merchant-store-settings>summary::-webkit-details-marker{display:none}
.merchant-store-settings>summary span{display:grid;text-align:right}
.merchant-store-settings>summary strong{color:var(--merchant-shell-text);font-size:.94rem}
.merchant-store-settings>summary small{color:var(--merchant-shell-muted);font-size:.7rem}
.merchant-store-settings>summary b{display:none!important}
.merchant-store-settings>summary:focus-visible{outline:3px solid var(--merchant-shell-focus);outline-offset:-2px;border-radius:12px}

.merchant-shell-form{display:grid;gap:var(--merchant-space-xs);padding:var(--merchant-space-sm) 0 var(--merchant-space-md)}
.merchant-shell-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:var(--merchant-space-xs)}
.merchant-shell-form>label,.merchant-shell-grid label{display:grid;gap:var(--merchant-space-2xs);color:var(--merchant-shell-text);font-size:.86rem;font-weight:700;text-align:right}
.merchant-shell-form :is(input,select,textarea){width:100%;min-height:52px;padding:var(--merchant-space-2xs) var(--merchant-space-xs);border:1px solid var(--merchant-shell-line);border-radius:14px;background:var(--merchant-shell-panel-raised);color:var(--merchant-shell-text);font-family:inherit;font-size:1rem;font-weight:600;outline:2px solid transparent;outline-offset:1px}
.merchant-shell-form textarea{min-height:92px;resize:vertical;line-height:1.7}
.merchant-shell-form :is(input,select,textarea):focus{border-color:var(--merchant-shell-text);outline-color:var(--merchant-shell-text);box-shadow:none}
.merchant-shell-form :is(input,select,textarea):invalid:not(:placeholder-shown){border-color:var(--merchant-shell-danger)}
.merchant-shell-form :is(input,select,textarea):disabled{cursor:not-allowed;opacity:.55;background:var(--merchant-shell-panel)}
.merchant-shell-form fieldset{margin:0;padding:0;border:0}
.merchant-shell-form legend{margin-bottom:var(--merchant-space-2xs);color:var(--merchant-shell-text);font-size:.72rem;font-weight:700}
.merchant-shell-form fieldset>div{display:flex;flex-wrap:wrap;gap:var(--merchant-space-2xs)}
.merchant-shell-form fieldset label{min-height:44px;display:flex;align-items:center;gap:var(--merchant-space-2xs);padding:0 var(--merchant-space-xs);border:1px solid var(--merchant-shell-line);border-radius:999px;background:var(--merchant-shell-panel-raised);color:var(--merchant-shell-text);font-size:.7rem;cursor:pointer}
.merchant-shell-form fieldset input{width:16px;min-height:16px;height:16px;margin:0;accent-color:var(--merchant-action-bg)}
.merchant-shell-status{min-height:1.4em;margin:0;color:var(--merchant-shell-muted);font-size:.7rem}
.merchant-unified-select{position:relative;z-index:1}
.merchant-unified-select:focus-within,.merchant-unified-select.open{z-index:8}
.merchant-unified-select>select{position:absolute!important;width:1px!important;height:1px!important;min-height:0!important;margin:-1px!important;padding:0!important;overflow:hidden!important;clip:rect(0,0,0,0)!important;white-space:nowrap!important;border:0!important}
.merchant-unified-select-trigger{width:100%;min-height:52px;display:grid;grid-template-columns:22px 1fr 22px;align-items:center;padding:0 var(--merchant-space-xs);border:1px solid var(--merchant-shell-line);border-radius:14px;background:var(--merchant-shell-panel-raised);color:var(--merchant-shell-text);font:600 1rem "Cairo";text-align:right;cursor:pointer}
.merchant-unified-select-trigger span{grid-column:2;justify-self:stretch}
.merchant-unified-select-trigger i{grid-column:3;grid-row:1;width:9px;height:9px;justify-self:center;border-inline-end:2px solid currentColor;border-bottom:2px solid currentColor;transform:rotate(45deg) translateY(-2px)}
.merchant-unified-select.open .merchant-unified-select-trigger i{transform:rotate(225deg) translate(-2px,-2px)}
.merchant-unified-select-trigger:focus-visible{outline:3px solid var(--merchant-shell-focus);outline-offset:2px}
@media(hover:hover) and (pointer:fine){.merchant-unified-select-trigger:hover{background:var(--merchant-shell-soft)}}
.merchant-unified-select-trigger:active{background:var(--merchant-shell-soft)}
.merchant-unified-select-trigger:disabled{cursor:not-allowed;opacity:.55}
.merchant-unified-select-trigger[aria-busy="true"]{cursor:progress;opacity:.7}
.merchant-unified-select-trigger[data-state="error"]{outline:2px solid var(--merchant-shell-danger);outline-offset:1px}
.merchant-unified-select-trigger[data-state="success"]{outline:2px solid var(--merchant-shell-text);outline-offset:1px}
.merchant-unified-select-menu{position:absolute;inset-inline:0;top:calc(100% + 7px);display:none;max-height:240px;padding:7px;overflow:auto;border:1px solid var(--merchant-shell-line);border-radius:16px;background:var(--merchant-shell-panel-raised);box-shadow:0 18px 40px var(--merchant-shell-shadow);z-index:20}
.merchant-unified-select.open .merchant-unified-select-menu{display:grid;gap:4px}
.merchant-unified-select-menu button{min-height:44px;padding:8px 12px;border:0;border-radius:11px;background:transparent;color:var(--merchant-shell-text);font:600 .94rem "Cairo";text-align:right;cursor:pointer}
.merchant-unified-select-menu button:hover,.merchant-unified-select-menu button[aria-selected="true"]{background:var(--merchant-shell-soft)}

.merchant-shell-primary,
body[data-role="merchant"] .btn.primary,
body[data-role="merchant"] .merchant-submit,
body[data-role="merchant"] .merchant-save,
body[data-role="merchant"] #create-ad-toggle,
body[data-role="merchant"] button[type="submit"]:not(.confirm-danger),
body.merchant-shell-active.stores-body :is(.market-banner-slide button,.apply-market-filters){
  min-height:50px;
  border:1px solid var(--merchant-action-bg)!important;
  border-radius:999px;
  background:var(--merchant-action-bg)!important;
  background-image:none!important;
  color:var(--merchant-action-fg)!important;
  box-shadow:none!important;
  filter:none!important;
  font-weight:700;
  white-space:nowrap;
  cursor:pointer;
  transition:transform 140ms var(--ease-out,cubic-bezier(.16,1,.3,1)),opacity 140ms var(--ease-out,cubic-bezier(.16,1,.3,1));
}

.merchant-shell-primary{width:100%}
.merchant-shell-primary:hover,
body[data-role="merchant"] .btn.primary:hover,
body[data-role="merchant"] button[type="submit"]:not(.confirm-danger):hover{opacity:.88}
.merchant-shell-primary:focus-visible,
body[data-role="merchant"] .btn.primary:focus-visible,
body[data-role="merchant"] button[type="submit"]:not(.confirm-danger):focus-visible{outline:3px solid var(--merchant-shell-focus);outline-offset:3px}
.merchant-shell-primary:active,
body[data-role="merchant"] .btn.primary:active,
body[data-role="merchant"] button[type="submit"]:not(.confirm-danger):active{transform:scale(.985)}

body[data-role="merchant"] :is(.btn.primary,.merchant-shell-primary,#create-ad-toggle,button[type="submit"]:not(.confirm-danger))::before,
body[data-role="merchant"] :is(.btn.primary,.merchant-shell-primary,#create-ad-toggle,button[type="submit"]:not(.confirm-danger))::after{
  content:none!important;
  display:none!important;
  background:none!important;
}

body[data-role="merchant"] :is(.product-form .form-actions .btn,.ad-request-success button){
  border:1px solid var(--merchant-action-bg)!important;
  background:var(--merchant-action-bg)!important;
  background-image:none!important;
  color:var(--merchant-action-fg)!important;
  box-shadow:none!important;
  filter:none!important;
  white-space:nowrap;
}
body[data-role="merchant"] :is(.product-form .form-actions .btn,.ad-request-success button):hover{opacity:.88}
body[data-role="merchant"] :is(.product-form .form-actions .btn,.ad-request-success button):focus-visible{outline:3px solid var(--merchant-shell-focus);outline-offset:3px}
body[data-role="merchant"] :is(.product-form .form-actions .btn,.ad-request-success button):active{transform:scale(.985)}
body[data-role="merchant"] :is(.product-form .form-actions .btn,.ad-request-success button):disabled{cursor:not-allowed;opacity:.55}

body[data-role="merchant"] .merchant-product-row .choice{
  min-width:74px;
  min-height:48px;
  border:1px solid var(--merchant-shell-line)!important;
  background:var(--merchant-shell-soft)!important;
  background-image:none!important;
  color:var(--merchant-shell-text)!important;
  box-shadow:none!important;
  white-space:nowrap;
}
body[data-role="merchant"] .merchant-product-row .choice:hover{background:var(--merchant-shell-choice)!important}
body[data-role="merchant"] .merchant-product-row .choice:focus-visible{outline:3px solid var(--merchant-shell-focus);outline-offset:3px}
body[data-role="merchant"] .merchant-product-row .choice:active{transform:translateY(1px)}
body[data-role="merchant"] .merchant-product-row .choice:disabled{cursor:not-allowed;opacity:.55}
:root[data-theme="dark"] body[data-role="merchant"] .merchant-product-row .choice{border-color:var(--merchant-action-bg)!important;background:var(--merchant-action-bg)!important;color:var(--merchant-action-fg)!important}
:root[data-theme="dark"] body[data-role="merchant"] .merchant-product-row .choice:hover{opacity:.88}
.merchant-shell-primary:disabled,
body[data-role="merchant"] .btn.primary:disabled,
body[data-role="merchant"] button[type="submit"]:not(.confirm-danger):disabled{cursor:not-allowed;opacity:.45}
.merchant-shell-primary[aria-busy="true"],body[data-role="merchant"] button[aria-busy="true"]{cursor:progress;opacity:.7}
.merchant-shell-primary[data-state="error"],body[data-role="merchant"] button[data-state="error"]{outline:2px solid var(--merchant-shell-danger);outline-offset:2px}
.merchant-shell-primary[data-state="success"],body[data-role="merchant"] button[data-state="success"]{outline:2px solid var(--merchant-shell-text);outline-offset:2px}

.merchant-shell-danger{width:100%;min-height:48px;border:1px solid var(--merchant-shell-danger);border-radius:999px;background:var(--merchant-shell-danger-soft);color:var(--merchant-shell-danger);font-weight:700;cursor:pointer}
.merchant-shell-danger:hover{background:color-mix(in srgb,var(--merchant-shell-danger-soft) 76%,var(--merchant-shell-danger) 24%)}
.merchant-shell-danger:focus-visible{outline:3px solid var(--merchant-shell-danger);outline-offset:3px}
.merchant-shell-danger:active{transform:scale(.985)}
.merchant-shell-danger:disabled{cursor:not-allowed;opacity:.55}

/* Hallmark · settings disclosure · genre: playful · tone: restrained · anchor: plum · pre-emit: P5 H5 E5 S5 R5 V4 */
.merchant-settings-menu{display:grid}
.merchant-settings-menu>a,.merchant-settings-menu>button{min-height:56px;display:flex;align-items:center;padding:var(--merchant-space-2xs) var(--merchant-space-3xs);border:0;border-bottom:1px solid var(--merchant-shell-line);border-radius:0;background:transparent;color:var(--merchant-shell-text);text-align:right;text-decoration:none;white-space:normal;cursor:pointer}
.merchant-settings-menu span{display:flex;align-items:center;justify-content:space-between;gap:var(--merchant-space-sm);width:100%}
.merchant-settings-menu strong{color:var(--merchant-shell-text);font-size:.86rem}
.merchant-settings-menu small{color:var(--merchant-shell-muted);font-size:.68rem}
.merchant-settings-menu b,.merchant-settings-menu>a small,#merchant-account-settings small{display:none}
@media(hover:hover) and (pointer:fine){.merchant-settings-menu>a:hover,.merchant-settings-menu>button:hover{background:color-mix(in srgb,var(--merchant-shell-panel) 88%,var(--merchant-shell-text) 12%)}}
.merchant-settings-menu>a:focus-visible,.merchant-settings-menu>button:focus-visible{outline:3px solid var(--merchant-shell-focus);outline-offset:-3px}
.merchant-settings-menu>a:active,.merchant-settings-menu>button:active{transform:translateX(-2px)}
.merchant-settings-menu>button:disabled{cursor:not-allowed;opacity:.55}
.merchant-settings-menu>button[aria-busy="true"]{cursor:progress;opacity:.7}
.merchant-settings-menu>button[data-state="error"]{outline:2px solid var(--merchant-shell-danger);outline-offset:-2px}
.merchant-settings-menu>button[data-state="success"]{outline:2px solid var(--merchant-shell-text);outline-offset:-2px}
.merchant-settings-menu-status{padding-block:var(--merchant-space-2xs);text-align:right}
.merchant-settings-menu-status:empty{display:none}
.merchant-settings-legal{display:flex!important;justify-content:center!important;gap:var(--merchant-space-2xs)!important;margin:0!important;padding:var(--merchant-space-sm) 0 var(--merchant-space-3xs)!important;border:0!important;background:transparent!important;color:var(--merchant-shell-muted)!important;font-size:.68rem!important}
.merchant-settings-legal a{color:var(--merchant-shell-text)!important;text-decoration:none!important;font-size:inherit!important}
.merchant-settings-legal a:hover{text-decoration:underline!important;text-underline-offset:3px}
.merchant-settings-legal a:focus-visible{outline:2px solid var(--merchant-shell-focus);outline-offset:2px}
.merchant-settings-legal a:active{opacity:.7}

.merchant-module-head{
  display:grid;
  justify-items:start;
  gap:var(--merchant-space-sm);
  padding-block:var(--merchant-space-sm) var(--merchant-space-lg);
}
.merchant-module-head h1{min-width:0;margin:0;color:var(--merchant-shell-text);font-size:clamp(1.7rem,4vw,2.5rem);line-height:1.25;overflow-wrap:anywhere}
.merchant-product-search{width:min(100%,680px);display:grid;gap:var(--merchant-space-2xs);color:var(--merchant-shell-text);font-size:.86rem;font-weight:800;text-align:right}
.merchant-product-search input{width:100%;min-height:58px;padding:0 var(--merchant-space-sm);border:1px solid var(--merchant-shell-line);border-radius:16px;background:var(--merchant-shell-panel-raised);color:var(--merchant-shell-text);font:inherit;font-weight:600;outline:2px solid transparent;outline-offset:1px}
.merchant-product-search input::placeholder{color:var(--merchant-shell-muted)}
.merchant-product-search input:hover{background:var(--merchant-shell-soft)}
.merchant-product-search input:focus-visible{border-color:var(--merchant-shell-text);outline-color:var(--merchant-shell-text)}
.merchant-product-search input:active{border-color:var(--merchant-shell-text)}
.merchant-product-search input:disabled{cursor:not-allowed;opacity:.55}
.merchant-product-search input[aria-busy="true"]{cursor:progress;background:var(--merchant-shell-soft)}
.merchant-product-search input[aria-invalid="true"]{border-color:var(--merchant-shell-danger);outline-color:var(--merchant-shell-danger)}
.merchant-product-search input[data-state="success"]{border-color:var(--merchant-shell-text)}
.merchant-product-search-dashboard{margin:0 0 var(--merchant-space-sm)}
.merchant-module-head :is(.catalog-actions,.ads-page-actions){width:min(100%,360px);margin-inline:auto}
.merchant-module-head .catalog-actions{display:block!important}
.merchant-module-head :is(#add-product,#create-ad-toggle){width:100%;min-width:0;justify-content:center}
.merchant-products-page{padding-block-start:var(--merchant-space-sm)!important}
.merchant-ads-head{margin-bottom:var(--merchant-space-xs)}
.merchant-campaign-section>h2{margin:0 0 var(--merchant-space-xs);color:var(--merchant-shell-text);font-size:1.35rem}

:root:not([data-theme="dark"]) body[data-role="merchant"] .contact-panel h1{color:var(--ui-ink,var(--merchant-shell-text))!important}
:root[data-theme="dark"] body[data-role="merchant"] .contact-panel h1{color:var(--ui-ink,var(--merchant-shell-text))!important}

.merchant-brand-fields{margin:var(--merchant-space-sm) 0;border:1px solid var(--merchant-shell-line);border-radius:18px;background:#fff;color:#221f24}
.merchant-brand-fields>summary{min-height:64px;display:flex;align-items:center;justify-content:space-between;gap:var(--merchant-space-xs);padding:var(--merchant-space-xs) var(--merchant-space-sm);list-style:none;color:var(--merchant-shell-text);cursor:pointer}
.merchant-brand-fields>summary::-webkit-details-marker{display:none}
.merchant-brand-fields>summary span{display:flex;align-items:baseline;gap:var(--merchant-space-2xs)}
.merchant-brand-fields>summary strong{font-weight:800}
.merchant-brand-fields>summary small{color:var(--merchant-shell-muted);font-size:.72rem;font-weight:600}
.merchant-brand-fields>summary i{width:11px;height:11px;border-inline-end:2px solid currentColor;border-bottom:2px solid currentColor;transform:rotate(45deg);transition:transform 180ms var(--ease-out,cubic-bezier(.16,1,.3,1))}
.merchant-brand-fields[open]>summary i{transform:rotate(225deg)}
.merchant-brand-fields>summary:hover{background:var(--merchant-shell-soft)}
.merchant-brand-fields>summary:focus-visible{outline:3px solid var(--merchant-shell-focus);outline-offset:-3px;border-radius:inherit}
.merchant-brand-fields>summary:active{transform:translateY(1px)}
.merchant-brand-content{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:var(--merchant-space-xs);padding:0 var(--merchant-space-sm) var(--merchant-space-sm);background:#fff}
.merchant-brand-content label{display:grid;gap:var(--merchant-space-2xs)}
.merchant-brand-content input[name="brandName"]{min-height:60px;font-size:1.05rem;font-weight:700}
.merchant-brand-upload{min-height:132px;align-content:start;padding:10px;border:1px solid var(--merchant-shell-line);border-radius:14px;background:#fff!important;color:#221f24!important}
.merchant-brand-upload input[type="file"]{background:#fff!important;color:#221f24!important}
.product-brand-preview{width:92px;height:92px;margin:0 auto 8px;object-fit:contain;border:1px solid var(--merchant-shell-line);border-radius:14px;background:#fff}
.product-image-gallery{display:grid;grid-template-columns:repeat(auto-fill,minmax(132px,1fr));gap:14px;margin:14px 0 20px}
.product-image-gallery[hidden]{display:none}
.product-image-gallery figure{position:relative;margin:0;padding:8px;border:1px solid var(--merchant-shell-line);border-radius:16px;background:#fff}
.product-image-gallery img{display:block;width:100%;aspect-ratio:1/1;object-fit:contain;border-radius:11px;background:#fff}
.product-image-gallery figcaption{padding:7px 3px 1px;color:var(--merchant-shell-muted);font-size:.72rem;text-align:center}
.product-image-delete{width:100%;min-height:42px;display:flex;align-items:center;justify-content:center;gap:7px;margin-top:6px;border:1px solid #b3262e;border-radius:12px;background:#fff;color:#b3262e;font:700 .72rem var(--merchant-font,"Cairo",sans-serif);cursor:pointer}.product-image-delete svg{width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.product-image-delete:hover{background:#fff3f3}.product-image-delete:focus-visible{outline:3px solid #b3262e;outline-offset:2px}
.product-form input[type="number"]{-moz-appearance:textfield;appearance:textfield}
.product-form input[type="number"]::-webkit-inner-spin-button,.product-form input[type="number"]::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}

body[data-role="merchant"] #ad-target-options,body[data-role="merchant"] #ad-target-options>label,body[data-role="merchant"] .ad-date-range{background:#fff!important;color:#221f24!important}
.ad-draft-review{display:grid;gap:12px;margin-top:18px;padding:16px;border:1px solid var(--merchant-shell-line);border-radius:22px;background:#fff;color:#221f24}.ad-draft-review>strong{font-size:1rem}.ad-draft-review>p{margin:0;color:#625a61;font-size:.72rem;line-height:1.8}
.ad-preview-actions{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1.3fr);gap:10px}.ad-preview-actions button{min-height:52px;border:1px solid #221f24;border-radius:999px;background:#fff;color:#221f24;font:700 .76rem var(--merchant-font,"Cairo",sans-serif);cursor:pointer}.ad-preview-actions .btn{background:#111;color:#fff}
.ad-review-preview{display:grid;gap:12px;margin:0;padding:12px;border:1px solid var(--merchant-shell-line);border-radius:18px;background:#fff;color:#221f24;text-align:right}
.ad-review-banner{position:relative;display:grid;gap:8px;overflow:hidden;border-radius:14px;background:#fff}.ad-review-banner img{display:block;width:100%;aspect-ratio:12/5;object-fit:cover}.ad-review-banner span{position:absolute;z-index:1;top:10px;right:12px;padding:5px 10px;border-radius:999px;background:#221f24;color:#fff;font-size:.68rem}.ad-review-banner strong{padding:0 4px 4px;font-size:.8rem}
.ad-review-products{grid-template-columns:repeat(auto-fit,minmax(170px,1fr));gap:10px}.ad-review-product{position:relative;display:grid;grid-template-columns:106px minmax(0,1fr);align-items:center;gap:12px;padding:12px;border:1px solid var(--merchant-shell-line);border-radius:16px;background:#fff}.ad-review-product img{width:106px;aspect-ratio:4/5;object-fit:contain;border-radius:10px;background:#fff}.ad-review-product>span:last-child{display:grid;gap:7px}.ad-review-product strong{font-size:.82rem}.ad-review-product .ad-sponsored-label{position:absolute;z-index:1;top:10px;right:10px;width:max-content;padding:4px 8px;border-radius:999px;background:#221f24;color:#fff;font-size:.56rem}.ad-review-product b{color:#b3262e;font-size:.72rem}
.active-discounts .active-discount-product{display:grid;grid-template-columns:72px minmax(0,1fr);align-items:center;gap:12px}.active-discount-product img{width:72px;height:82px;object-fit:contain;border:1px solid var(--merchant-shell-line);border-radius:12px;background:#fff}.active-discount-product span{display:grid;gap:3px}

@media(max-width:560px){.merchant-brand-content{grid-template-columns:minmax(0,1fr)}.product-image-gallery{grid-template-columns:repeat(2,minmax(0,1fr))}}

body[data-role="merchant"] :is(#merchant-discount-form,#merchant-discount-builder,#merchant-ad-form) input[name="percent"],
body[data-role="merchant"] #merchant-ad-form input[name="discount"]{-moz-appearance:textfield;appearance:textfield}
body[data-role="merchant"] :is(#merchant-discount-form,#merchant-discount-builder,#merchant-ad-form) input[name="percent"]::-webkit-inner-spin-button,
body[data-role="merchant"] :is(#merchant-discount-form,#merchant-discount-builder,#merchant-ad-form) input[name="percent"]::-webkit-outer-spin-button,
body[data-role="merchant"] #merchant-ad-form input[name="discount"]::-webkit-inner-spin-button,
body[data-role="merchant"] #merchant-ad-form input[name="discount"]::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}

.date-range-filter label{position:relative}
.merchant-date-native{position:absolute!important;inline-size:1px!important;block-size:1px!important;inset-inline-start:0!important;inset-block-end:0!important;padding:0!important;border:0!important;opacity:0!important;pointer-events:none!important}
.merchant-date-trigger{width:100%;min-height:58px;display:flex;align-items:center;justify-content:space-between;gap:var(--merchant-space-xs);padding:0 var(--merchant-space-sm);border:1px solid var(--merchant-shell-line);border-radius:16px;background:var(--merchant-shell-panel-raised);color:var(--merchant-shell-text);font:inherit;font-weight:700;text-align:right;cursor:pointer;outline:2px solid transparent;outline-offset:1px}
.merchant-date-trigger svg{width:22px;height:22px;flex:0 0 auto;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.merchant-date-trigger.is-placeholder{color:var(--merchant-shell-muted)}
.merchant-date-trigger:hover{background:color-mix(in srgb,var(--merchant-shell-panel-raised) 92%,var(--merchant-shell-text) 8%)}
.merchant-date-trigger:focus-visible{outline-color:var(--merchant-shell-focus)}
.merchant-date-trigger:active{transform:translateY(1px)}
.merchant-date-trigger:disabled{cursor:not-allowed;opacity:.55}
.merchant-date-trigger.is-error{border-color:var(--merchant-shell-danger);outline-color:var(--merchant-shell-danger)}

.merchant-date-picker{width:min(92vw,520px);margin:auto;padding:0;border:1px solid var(--merchant-shell-line);border-radius:28px;background:var(--merchant-shell-panel);color:var(--merchant-shell-text);box-shadow:0 26px 80px var(--merchant-shell-shadow)}
.merchant-date-picker::backdrop{background:var(--merchant-shell-backdrop);backdrop-filter:blur(5px)}
.merchant-date-card{display:grid;gap:var(--merchant-space-sm);padding:var(--merchant-space-md)}
.merchant-date-card>header{display:flex;align-items:center;justify-content:space-between;gap:var(--merchant-space-sm)}
.merchant-date-card>header h2{margin:0;color:var(--merchant-shell-text);font-size:1.35rem}
.merchant-date-month{display:grid;grid-template-columns:44px minmax(0,1fr) 44px;align-items:center;gap:var(--merchant-space-2xs)}
.merchant-date-month strong{text-align:center;font-variant-numeric:tabular-nums}
.merchant-date-month button{width:44px;height:44px;display:grid;place-items:center;padding:0;border:1px solid var(--merchant-shell-line);border-radius:50%;background:var(--merchant-shell-panel-raised);color:var(--merchant-shell-text);font-size:1.35rem;cursor:pointer}
.merchant-date-month button:hover{background:color-mix(in srgb,var(--merchant-shell-panel-raised) 86%,var(--merchant-shell-text) 14%)}
.merchant-date-month button:focus-visible{outline:3px solid var(--merchant-shell-focus);outline-offset:2px}
.merchant-date-month button:active{transform:scale(.96)}
.merchant-date-month button:disabled{cursor:not-allowed;opacity:.55}
.merchant-date-weekdays,.merchant-date-days{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:var(--merchant-space-3xs);direction:rtl}
.merchant-date-weekdays span{display:grid;place-items:center;min-height:32px;color:var(--merchant-shell-muted);font-size:.72rem;font-weight:800}
.merchant-date-days>span,.merchant-date-days>button{min-width:0;aspect-ratio:1;display:grid;place-items:center}
.merchant-date-days>button{border:1px solid transparent;border-radius:12px;background:transparent;color:var(--merchant-shell-text);font:inherit;font-weight:700;cursor:pointer;font-variant-numeric:tabular-nums}
.merchant-date-days>button:hover{background:color-mix(in srgb,var(--merchant-shell-panel) 82%,var(--merchant-shell-text) 18%)}
.merchant-date-days>button:focus-visible{outline:3px solid var(--merchant-shell-focus);outline-offset:1px}
.merchant-date-days>button:active{transform:scale(.95)}
.merchant-date-days>button:disabled{cursor:not-allowed;opacity:.55}
.merchant-date-days>button.is-selected{border-color:var(--merchant-shell-text);border-radius:10px;background:var(--merchant-shell-soft);color:var(--merchant-shell-text)}
.merchant-date-days>button.is-selected:focus-visible{outline-color:var(--merchant-shell-text)}
.merchant-date-card>footer{min-height:0!important;display:grid!important;grid-template-columns:minmax(0,280px);justify-content:center;gap:var(--merchant-space-xs);margin:0!important;padding:0!important;border:0!important;background:transparent!important;color:var(--merchant-shell-text)!important}
.merchant-date-card>footer button{width:100%;min-height:48px}
.merchant-date-secondary{border:1px solid var(--merchant-action-bg);border-radius:999px;background:var(--merchant-action-bg);color:var(--merchant-action-fg);font-weight:700;cursor:pointer}
.merchant-date-secondary:hover{opacity:.88}
.merchant-date-secondary:focus-visible{outline:3px solid var(--merchant-shell-focus);outline-offset:2px}
.merchant-date-secondary:active{transform:scale(.985)}
.merchant-date-secondary:disabled{cursor:not-allowed;opacity:.55}

body.merchant-shell-active .dash{display:block!important}
body.merchant-shell-active .dash>aside{display:none!important}
body.merchant-shell-active .dash>main{width:min(1180px,100%);margin:auto;padding-inline:var(--merchant-space-md)}
body.merchant-shell-active .dash main>p.kicker,
body.merchant-shell-active .dash main>h1,
body.merchant-shell-active .dash main>.metrics,
body.merchant-shell-active .dash main>.merchant-dashboard-links,
body.merchant-shell-active .dash main>#products{display:revert!important}
body.merchant-shell-active .dash main>.metrics{display:grid!important}
body.merchant-shell-active .dash main>.merchant-dashboard-links{display:grid!important}
.merchant-dashboard-notices{margin-top:var(--merchant-space-md);padding:var(--merchant-space-md);border:1px solid var(--merchant-shell-line);border-radius:24px;background:var(--merchant-shell-panel)}.merchant-dashboard-notices h2{margin:0 0 var(--merchant-space-sm)}#merchant-notification-list{display:grid;gap:10px}#merchant-notification-list article{display:grid;gap:4px;padding:14px;border-bottom:1px solid var(--merchant-shell-line)}#merchant-notification-list article:last-child{border-bottom:0}

.merchant-order-card summary time,
.invoice-summary-meta time,
.invoice-card time,
.merchant-report-section time{
  color:var(--merchant-shell-muted)!important;
  font-size:clamp(.9rem,2.8vw,1.05rem)!important;
  font-weight:700!important;
  line-height:1.55!important;
  font-variant-numeric:tabular-nums;
}

body.merchant-shell-active.stores-body .stores-shell{padding-right:var(--merchant-space-2xs)!important;padding-left:var(--merchant-space-2xs)!important}
body.merchant-shell-active.stores-body .market-tabs{display:none!important}
body.merchant-shell-active.stores-body .market-pages{display:block!important;transform:none!important}
body.merchant-shell-active.stores-body.merchant-view-stores .market-page:first-child{display:block!important}
body.merchant-shell-active.stores-body.merchant-view-stores .market-page:nth-child(2){display:none!important}
body.merchant-shell-active.stores-body.merchant-view-clothes .market-page:first-child{display:none!important}
body.merchant-shell-active.stores-body.merchant-view-clothes .market-page:nth-child(2){display:block!important}
body.merchant-shell-active.stores-body .stores-list{grid-template-columns:repeat(3,minmax(0,1fr));gap:var(--merchant-space-xs)}
body.merchant-shell-active.stores-body .market-store-visual{aspect-ratio:16/10}
body.merchant-shell-active.stores-body .market-store-copy{min-height:74px}
body.merchant-shell-active.stores-body :is(.market-cart-button,#market-try-add-cart,#try-add-cart){display:none!important}

body[data-role="merchant"] .product-form>.grid2>label{
  gap:var(--merchant-space-2xs);
  color:var(--merchant-shell-text);
  font-size:clamp(1.1rem,2.4vw,1.2rem);
  font-weight:800;
}
body[data-role="merchant"] .product-form .form-actions{
  grid-template-columns:minmax(0,360px)!important;
  justify-content:center!important;
}
body[data-role="merchant"] .product-form .form-actions .btn{width:100%}
body[data-role="merchant"] .merchant-product-description{display:grid;gap:12px;color:var(--merchant-shell-text);font-size:clamp(1.1rem,2.4vw,1.2rem);font-weight:400}
body[data-role="merchant"] .merchant-product-description textarea{font-size:1rem;line-height:1.8;min-height:132px;resize:vertical}
body[data-role="merchant"] .merchant-product-description small{font-size:.85rem;font-weight:400;color:var(--merchant-shell-muted)}

body[data-role="merchant"] .order-management .unified-select-menu{grid-template-columns:minmax(0,1fr)!important}
body[data-role="merchant"] .order-management .unified-select-menu button{
  width:100%!important;
  box-sizing:border-box;
  display:flex;
  align-items:center;
  justify-content:center;
}

:root:not([data-theme="dark"]) body[data-role="merchant"] #ad-target-options>label:has(input:checked){
  border-color:var(--merchant-shell-text)!important;
  background:var(--merchant-shell-panel-raised)!important;
  color:var(--merchant-shell-text)!important;
}
body[data-role="merchant"] #ad-target-options>label:has(input:checked){box-shadow:0 0 0 1px var(--merchant-shell-text)}
body[data-role="merchant"] .ad-province-options label{
  border:1px solid transparent;
  background:var(--merchant-shell-choice)!important;
  color:var(--merchant-shell-text)!important;
}
body[data-role="merchant"] .ad-province-options label:has(input:checked){border-color:var(--merchant-shell-text)}
body[data-role="merchant"] .ad-price{
  border:1px solid var(--merchant-shell-text)!important;
  background:var(--merchant-shell-panel-raised)!important;
  color:var(--merchant-shell-text)!important;
  box-shadow:none!important;
}
body[data-role="merchant"] .ad-price strong{color:var(--merchant-shell-text)!important}
body[data-role="merchant"] .discount-products{
  grid-template-columns:minmax(0,1fr)!important;
  gap:var(--merchant-space-2xs);
}
body[data-role="merchant"] .discount-products label{
  width:100%;
  grid-template-columns:auto 58px minmax(0,1fr);
  min-height:76px;
  background:var(--merchant-shell-panel-raised);
  color:var(--merchant-shell-text);
}
body[data-role="merchant"] .ad-discount-field{
  margin-top:var(--merchant-space-xs);
  padding:var(--merchant-space-sm);
  border:1px solid var(--merchant-shell-line);
  border-radius:18px;
  background:var(--merchant-shell-panel-raised);
}
body[data-role="merchant"] .percentage-field b{background:var(--merchant-shell-soft)!important;color:var(--merchant-shell-text)!important}
body[data-role="merchant"] :is(.price-before-after strong,.discount-price-preview strong,.discount-price-preview b){color:var(--merchant-shell-text)!important}
body[data-role="merchant"] .price-before-after{grid-template-columns:minmax(0,1fr)!important;background:var(--merchant-shell-soft)!important}
body[data-role="merchant"] .ad-discount-preview-item{display:grid;gap:var(--merchant-space-3xs);padding:var(--merchant-space-2xs);border-bottom:1px solid var(--merchant-shell-line)}
body[data-role="merchant"] .ad-discount-preview-item:last-child{border-bottom:0}
body[data-role="merchant"] .ad-discount-preview-item>b{color:var(--merchant-shell-text);font-size:.78rem}
body[data-role="merchant"] .discount-scope-grid{grid-template-columns:minmax(0,1fr)!important}
body[data-role="merchant"] .discount-percent-field{display:grid;gap:var(--merchant-space-2xs)}
body[data-role="merchant"] .discount-builder{gap:var(--merchant-space-sm)}
body[data-role="merchant"] #ad-target-options input[type="checkbox"]{accent-color:var(--merchant-shell-text)}

/* Hallmark · component: merchant night surfaces · genre: atmospheric · theme: Maraya
 * states: default · hover · focus · active · disabled · loading · error · success
 * pre-emit critique: P5 H5 E5 S5 R5 V5 · contrast: pass (40–41)
 */
body.merchant-shell-active .merchant-portal{color:var(--merchant-shell-text)!important}
body.merchant-shell-active :is(.product-table,.merchant-single-panel,.discount-product-picker,.discount-builder,.active-discount-section){border-color:var(--merchant-shell-line)!important;background:var(--merchant-shell-panel)!important;color:var(--merchant-shell-text)!important;box-shadow:none!important}
body.merchant-shell-active :is(.merchant-module-head h1,.merchant-module-head span,.merchant-single-panel h1,.merchant-single-panel h2,.merchant-single-panel label,.active-discount-section h2,.merchant-product-row,.merchant-product-row b,.merchant-product-row span){color:var(--merchant-shell-text)!important}
body.merchant-shell-active .merchant-product-row{border-color:var(--merchant-shell-line)!important;background:var(--merchant-shell-panel)!important}
body.merchant-shell-active .merchant-product-row .stock{color:var(--merchant-shell-text)!important}
body.merchant-shell-active :is(.merchant-product-search input,.report-search input,.discount-grid select,.percentage-field,.percentage-field input,.date-range-filter,.discount-price-preview article){border-color:var(--merchant-shell-line)!important;background:var(--merchant-shell-panel-raised)!important;color:var(--merchant-shell-text)!important;box-shadow:none!important}
body.merchant-shell-active :is(.merchant-product-search input,.report-search input,.percentage-field input)::placeholder{color:var(--merchant-shell-muted)!important;opacity:1}
body.merchant-shell-active .date-range-filter label>span{color:var(--merchant-shell-text)!important}
body.merchant-shell-active .discount-products label{border-color:var(--merchant-shell-line)!important;background:var(--merchant-shell-panel-raised)!important;color:var(--merchant-shell-text)!important}
body.merchant-shell-active .discount-products input[type="checkbox"]{accent-color:var(--merchant-shell-text)}
body.merchant-shell-active .discount-price-preview :is(small,span,del,b,strong){color:var(--merchant-shell-text)!important}
body.merchant-shell-active :is(.merchant-product-search input,.report-search input,.discount-grid select,.percentage-field input):focus-visible{border-color:var(--merchant-shell-text)!important;outline:2px solid var(--merchant-shell-text)!important;outline-offset:2px}

body.merchant-shell-active :is(#close-product-dialog,button[aria-label^="إغلاق"]){width:46px!important;height:46px!important;min-width:46px!important;min-height:46px!important;padding:0!important;border:1px solid var(--merchant-shell-line)!important;border-radius:50%!important;background:var(--merchant-shell-panel-raised)!important;color:var(--merchant-shell-text)!important;box-shadow:none!important;filter:none!important}
body.merchant-shell-active :is(#close-product-dialog,button[aria-label^="إغلاق"]):focus-visible{outline:2px solid var(--merchant-shell-text)!important;outline-offset:3px!important;box-shadow:none!important}

/* Hallmark · component: product catalog, sales summary, and unified night search
 * genre: atmospheric · states: default, hover, focus, active, disabled, loading, error, success
 * pre-emit critique: P5 H5 E5 S5 R5 V5 · contrast: pass · tokens: pass · responsive: pass
 */
.merchant-products-overview{
  display:grid;
  grid-template-columns:minmax(0,1fr);
  align-items:end;
  gap:var(--merchant-space-md);
  margin-bottom:var(--merchant-space-md);
}
.merchant-products-overview>div:first-child{min-width:0}
.merchant-products-overview h1{min-width:0;margin:0;color:var(--merchant-shell-text);font-size:clamp(2rem,5vw,4.5rem);line-height:1.15;overflow-wrap:anywhere}
.merchant-products-overview p{max-width:68ch;color:var(--merchant-shell-muted);line-height:1.8}
.merchant-products-overview .catalog-actions{width:min(100%,320px);display:block!important;justify-self:center;margin-inline:auto}
.merchant-products-overview #add-product{width:100%;min-height:58px;justify-content:center;white-space:nowrap}
.merchant-products-page>.merchant-product-search{width:100%;margin-bottom:var(--merchant-space-sm)}
.merchant-product-row{grid-template-columns:minmax(0,1.4fr) minmax(0,.7fr) minmax(0,.8fr) minmax(0,.8fr) auto}
.merchant-product-price,.merchant-product-sizes{font-variant-numeric:tabular-nums;white-space:nowrap}
.merchant-sales-head{display:grid;gap:var(--merchant-space-3xs)}
.merchant-sales-head h1{margin:0;color:var(--merchant-shell-text);font-size:clamp(1.8rem,4vw,2.8rem);line-height:1.25}
.merchant-sales-head p{margin:0;color:var(--merchant-shell-muted);line-height:1.7}
.sales-metrics{margin:var(--merchant-space-md) 0}
.sales-metrics .metric{border-color:var(--merchant-shell-line)!important;background:var(--merchant-shell-panel-raised)!important;color:var(--merchant-shell-text)!important;box-shadow:none!important}
.sales-metrics .metric :is(small,b,p){color:var(--merchant-shell-text)!important}
.sales-metrics .metric{display:grid;grid-template-columns:minmax(0,1fr);align-content:start;gap:12px}
.sales-metrics .metric small,.sales-metrics .metric b,.sales-metrics .metric p{display:block;margin:0}
.sales-metrics .metric small{font-size:clamp(.92rem,2.4vw,1.08rem);font-weight:800;line-height:1.55}
.sales-metrics .metric b{font-size:clamp(1.65rem,4vw,2.15rem);line-height:1;font-variant-numeric:tabular-nums}
.sales-metrics .metric p{color:var(--merchant-shell-muted)!important;line-height:1.7}

/* يطابق قسم ملابس التاجر بطاقات المشتري حرفيًا */
body.merchant-shell-active.stores-body.merchant-view-clothes .market-products{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
body.merchant-shell-active.stores-body.merchant-view-clothes .market-product-card{overflow:hidden;border:1px solid rgba(75,33,66,.08);border-radius:22px;background:#fff;box-shadow:0 9px 25px rgba(55,29,49,.05)}
body.merchant-shell-active.stores-body.merchant-view-clothes .market-product-image{height:210px;border-radius:0}
body.merchant-shell-active.stores-body.merchant-view-clothes .market-product-copy{min-height:0;padding:11px}
body.merchant-shell-active.stores-body.merchant-view-clothes .market-product-copy h2{margin:5px 0 2px;font-size:.72rem;font-weight:600}
body.merchant-shell-active.stores-body.merchant-view-clothes .market-product-copy strong{font-size:.65rem}
body.merchant-shell-active.stores-body.merchant-view-clothes .market-compact-sizes{position:static;display:flex;align-items:center;gap:5px;margin-top:7px;color:var(--merchant-shell-muted)}
body.merchant-shell-active.stores-body.merchant-view-clothes .market-compact-sizes span{min-width:0;min-height:0;padding:0;border:0;font-size:.62rem}
body.merchant-shell-active.stores-body.merchant-view-clothes .market-compact-sizes b{font-size:.56rem}
.sales-report-tools{display:grid!important;grid-template-columns:minmax(0,1fr)!important;align-items:stretch!important;gap:var(--merchant-space-sm)!important}
.sales-report-tools .report-search{width:100%}
.sales-report-tools .date-range-filter{width:100%;max-width:none;min-width:0}

:root[data-theme="dark"] input[type="search"]{
  min-height:58px;
  padding-inline:var(--merchant-space-lg) var(--merchant-space-sm)!important;
  border:1px solid var(--merchant-search-line)!important;
  border-radius:999px!important;
  background-color:var(--merchant-search-surface)!important;
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23111' stroke-width='1.8' stroke-linecap='round'%3E%3Ccircle cx='10.8' cy='10.8' r='6.4'/%3E%3Cpath d='m16 16 4.2 4.2'/%3E%3C/svg%3E")!important;
  background-repeat:no-repeat!important;
  background-position:right var(--merchant-space-sm) center!important;
  background-size:24px!important;
  color:var(--merchant-search-ink)!important;
  caret-color:var(--merchant-search-ink);
  box-shadow:none!important;
  outline:2px solid transparent;
  outline-offset:2px;
}
:root[data-theme="dark"] input[type="search"]::placeholder{color:var(--merchant-search-muted)!important;opacity:1}
:root[data-theme="dark"] input[type="search"]:hover{border-color:var(--merchant-search-ink)!important}
:root[data-theme="dark"] input[type="search"]:focus-visible{border-color:var(--merchant-search-ink)!important;outline-color:var(--merchant-shell-focus)!important}
:root[data-theme="dark"] input[type="search"]:active{border-color:var(--merchant-search-ink)!important}
:root[data-theme="dark"] input[type="search"]:disabled{cursor:not-allowed;opacity:.55}
:root[data-theme="dark"] input[type="search"][aria-busy="true"]{cursor:progress}
:root[data-theme="dark"] input[type="search"][aria-invalid="true"]{border-color:var(--merchant-shell-danger)!important;outline-color:var(--merchant-shell-danger)!important}
:root[data-theme="dark"] input[type="search"][data-state="success"]{border-color:var(--merchant-search-ink)!important}
:root[data-theme="dark"] .market-search{border-color:var(--merchant-search-line)!important;border-radius:999px!important;background:var(--merchant-search-surface)!important;color:var(--merchant-search-ink)!important;box-shadow:none!important}
:root[data-theme="dark"] .market-search input{padding-inline:var(--merchant-space-sm)!important;background-color:transparent!important;background-image:none!important;color:var(--merchant-search-ink)!important}
:root[data-theme="dark"] .market-search-icon{color:var(--merchant-search-ink)!important}
:root[data-theme="dark"] .market-search-icon svg{stroke:currentColor!important}

@media(max-width:700px){
  .merchant-product-row{grid-template-columns:repeat(2,minmax(0,1fr))}
  .merchant-product-price{grid-column:1}
  .merchant-product-sizes{grid-column:2}
}

@media(max-width:720px){
  body.merchant-shell-active.stores-body .stores-list{grid-template-columns:repeat(2,minmax(0,1fr))}
  body.merchant-shell-active .dash>main{padding-inline:var(--merchant-space-xs)}
}

@media(max-width:560px){
  :root{--merchant-rail-size:50px;--merchant-rail-gap:var(--merchant-space-2xs)}
  .merchant-rail{right:max(7px,env(safe-area-inset-right))}
  .merchant-rail-link svg{width:22px;height:22px}
  .merchant-settings-sheet{width:calc(100% - 24px);max-width:440px;border-radius:24px}
  .merchant-settings-card{max-height:94svh;padding:var(--merchant-space-sm) var(--merchant-space-sm) var(--merchant-space-xs)}
  .merchant-settings-card>header h2{font-size:1.25rem}
  .merchant-shell-grid{grid-template-columns:minmax(0,1fr)}
  .merchant-store-settings>summary{min-height:72px}
  .merchant-settings-menu>a,.merchant-settings-menu>button{min-height:56px}
  .merchant-module-head{padding-block:var(--merchant-space-xs) var(--merchant-space-md)}
  .merchant-module-head :is(.catalog-actions,.ads-page-actions){width:100%}
  .merchant-brand-content{grid-template-columns:minmax(0,1fr)}
  .merchant-date-picker{width:calc(100vw - 16px);border-radius:24px}
  .merchant-date-card{padding:var(--merchant-space-sm)}
  .merchant-date-days{gap:2px}
  .merchant-date-days>button{border-radius:10px;font-size:.78rem}
  body.merchant-shell-active.stores-body .market-store-copy h2{font-size:.86rem!important}
  body.merchant-shell-active.stores-body .market-store-copy p{font-size:.64rem!important}
  body.merchant-shell-active.stores-body .market-store-visual{aspect-ratio:4/3}
  body.merchant-shell-active.stores-body.merchant-view-clothes .market-product-image{height:190px}
}

@media(max-width:374px){
  :root{--merchant-rail-size:46px;--merchant-rail-gap:var(--merchant-space-2xs)}
  .merchant-rail-link svg{width:21px;height:21px}
}

@media(prefers-reduced-motion:reduce){
  .merchant-rail-link,.merchant-shell-primary,.merchant-shell-danger,.merchant-shell-icon-button,.merchant-settings-menu>a,.merchant-settings-menu>button,.merchant-date-trigger,.merchant-date-month button,.merchant-date-days button,.merchant-date-secondary{transition:none!important;transform:none!important}
  body.merchant-shell-active .market-store-visual img{transition:none!important;transform:none!important}
}

.merchant-settings-sheet[open] .merchant-settings-card{animation:merchant-settings-sheet-in .2s var(--merchant-ease,ease-out) both}
@keyframes merchant-settings-sheet-in{from{opacity:0;transform:translateY(28px)}to{opacity:1;transform:none}}
@media(prefers-reduced-motion:reduce){.merchant-settings-sheet[open] .merchant-settings-card{animation:none}}
.product-photo-guidance{display:block;color:#333!important;font-size:13px;line-height:1.7;margin:6px 0 12px}
html[data-theme="dark"] .product-photo-guidance{color:#fff!important}
.product-size-tools{display:grid;gap:8px;margin-block:10px}
.product-size-tools select,.product-custom-size input{width:100%;min-width:0;box-sizing:border-box}
.product-custom-size[hidden]{display:none}
.product-size-tools small,.product-size-preview small{display:block;font-size:12px;line-height:1.7}
.product-size-preview{padding:12px;margin-block:12px;border:1px solid #aaa;border-radius:12px}
.product-size-preview-row{display:flex;gap:6px;flex-wrap:wrap;margin-block:8px}
.product-size-preview-row span{display:inline-flex;align-items:center;justify-content:center;min-width:48px;height:44px;padding-inline:5px;border:1px solid #aaa;border-radius:10px;font-size:13px;unicode-bidi:plaintext;overflow-wrap:anywhere}
.product-custom-size button{border:1px solid #aaa;border-radius:12px;background:var(--app-paper,#fff);color:inherit;padding:9px 16px;margin-block:8px;cursor:pointer;font:inherit}
.product-size-preview-row span[dir="ltr"]{direction:ltr;unicode-bidi:isolate}
html:root body #product-form .product-custom-size-fields{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr) minmax(0,1.2fr);gap:8px}
html:root body #product-form .product-custom-size-fields>label{min-width:0}
html:root body #product-form .product-size-add{border-radius:999px!important;background:#111!important;color:#fff!important;border:1px solid #111!important;padding:10px 22px;min-height:44px;font:inherit}
html:root[data-theme="dark"] body #product-form .product-size-add{background:#fff!important;color:#111!important;border-color:#fff!important}
html:root body #product-form .product-size-tools :is(.unified-select-menu,.merchant-unified-select-menu){background:var(--merchant-shell-panel-raised,#fff)!important;color:var(--merchant-shell-text,#222)!important;border:1px solid var(--merchant-shell-line,#ccc)!important;padding:6px!important;border-radius:14px!important}
html:root body #product-form .product-size-tools :is(.unified-select-menu,.merchant-unified-select-menu) button{background:transparent!important;color:inherit!important;border-radius:8px!important;box-shadow:none!important;border:0!important}
html:root body #product-form .product-size-tools :is(.unified-select-menu,.merchant-unified-select-menu) button[aria-selected="true"]{background:var(--merchant-shell-soft,#eee)!important;color:var(--merchant-shell-text,#222)!important}
html:root[data-theme="dark"] body #product-form .product-size-tools :is(.unified-select-menu,.merchant-unified-select-menu){background:#28232b!important;color:#fff!important;border-color:#625b65!important}
html:root[data-theme="dark"] body #product-form .product-size-tools :is(.unified-select-menu,.merchant-unified-select-menu) button[aria-selected="true"]{background:#443d48!important;color:#fff!important}
html:root body #product-form .product-custom-size-chip{display:inline-flex;align-items:center;gap:6px;max-width:100%}
html:root body #product-form .product-custom-size-chip>label{min-width:0;margin:0}
html:root body #product-form .product-custom-size-remove{display:inline-flex;align-items:center;justify-content:center;flex:0 0 30px;width:30px;height:30px;min-height:30px;padding:0;border:1px solid var(--merchant-shell-line,#aaa);border-radius:50%;background:transparent;color:inherit;font:22px/1 sans-serif;cursor:pointer}
.product-shoe-sizes[hidden],.product-shoe-sizes [data-shoe-group][hidden]{display:none!important}
html:root body #product-form .product-shoe-sizes .product-custom-size-fields{grid-template-columns:repeat(2,minmax(0,1fr))}

.merchant-product-row .product-row-actions>small{color:var(--merchant-shell-ink,#252025);font-size:13px;font-weight:500}

.product-department-options{display:flex;flex-wrap:wrap;gap:10px;margin:0 0 20px}.product-dialog .product-department-choice{appearance:none;border:1px solid #242024;border-radius:999px;background:#242024;color:#fff;padding:9px 18px;min-height:42px;font-family:inherit;font-size:14px;font-weight:500;line-height:1.5;cursor:default;width:auto}

.merchant-ad-tabs{display:flex;gap:8px;flex-wrap:wrap;margin:24px 0 20px}.merchant-ad-tabs button{font:inherit;font-size:14px;padding:9px 22px;border:1px solid #ddd;border-radius:999px;background:transparent;color:inherit;cursor:pointer}.merchant-ad-tabs button[aria-pressed="true"]{background:#242024;color:#fff;border-color:#242024}.campaign-history[open]>summary{display:none}.ad-tab-empty{color:#777;font-size:14px}
