/* PinDoDo v62 — Elite Premium design tokens and finishing layer.
   Additive layer: preserves V61 component/business logic and existing theme hooks. */
:root{
  --pdd-brand-950:#21172f;
  --pdd-brand-800:#392451;
  --pdd-brand-600:#7650ad;
  --pdd-brand-500:#8b65c5;
  --pdd-brand-100:#f3eef9;
  --pdd-accent:#a67ad8;
  --pdd-text:#211d29;
  --pdd-muted:#716b7b;
  --pdd-surface:#fff;
  --pdd-surface-soft:#faf9fc;
  --pdd-line:rgba(35,28,48,.10);
  --pdd-radius-xs:10px;
  --pdd-radius-sm:14px;
  --pdd-radius-md:18px;
  --pdd-radius-lg:24px;
  --pdd-radius-xl:30px;
  --pdd-shadow-soft:0 3px 14px rgba(25,20,40,.045),0 1px 3px rgba(25,20,40,.035);
  --pdd-shadow-card:0 14px 38px rgba(25,20,40,.085),0 3px 9px rgba(25,20,40,.035);
  --pdd-shadow-float:0 22px 60px rgba(25,20,40,.14);
  --pdd-control-height:48px;
  --pdd-content-max:1320px;
  --pdd-motion-fast:160ms;
  --pdd-motion-base:220ms;
}
html{scroll-padding-top:92px}
body{min-width:320px;overflow-x:clip}
:where(button,input,select,textarea){font:inherit}
:where(button,a,[role="button"]){-webkit-tap-highlight-color:transparent}
:where(button,a,[role="button"],input,select,textarea):focus-visible{
  outline:3px solid color-mix(in srgb,var(--pdd-brand-500) 78%,white)!important;
  outline-offset:3px!important;
}
:where(.pdd-product-card,.pdd-cat-card,.admin-card,.stat-card,.dashboard-card,.settings-card,.pdd-modal,.pdd-sheet){
  border-radius:var(--pdd-radius-md);
}
:where(.pdd-product-card,.pdd-cat-card,.admin-card,.stat-card,.dashboard-card,.settings-card){
  min-width:0;transition:box-shadow var(--pdd-motion-base) ease,border-color var(--pdd-motion-base) ease,transform var(--pdd-motion-base) ease;
}
:where(.pdd-product-card,.admin-card,.stat-card,.dashboard-card,.settings-card):focus-within{
  box-shadow:var(--pdd-shadow-card);
}
:where(.pdd-modal,.pdd-sheet,[role="dialog"]){overscroll-behavior:contain}
:where(.pdd-toast,[role="status"],[role="alert"]){overflow-wrap:anywhere}
:where(.pdd-product-card img,.pdd-cat-card img){display:block}
:where(.pdd-product-card .pdd-media){overflow:hidden}
:where(.pdd-product-card button,.pdd-cat-card button){min-height:44px}
:where(.pdd-bottom-nav){padding-bottom:env(safe-area-inset-bottom,0px)}
:where(.pdd-modal,.pdd-sheet){padding-bottom:max(16px,env(safe-area-inset-bottom,0px))}
:where(.pdd-home,.pdd-catalog,.pdd-product-page,#root){max-width:100%;min-width:0}
@media(hover:hover) and (pointer:fine){
  :where(.pdd-product-card,.pdd-cat-card,.admin-card,.stat-card,.dashboard-card):hover{
    transform:translateY(-2px);box-shadow:var(--pdd-shadow-card)
  }
}
@media(max-width:760px){
  :where(.admin-main,.main,.content,.pdd-home,.pdd-catalog){min-width:0;max-width:100%}
  :where(.admin-table,.table-wrap,.table-responsive){max-width:100%;overflow-x:auto;-webkit-overflow-scrolling:touch}
  :where(.pdd-modal,.pdd-sheet,.modal,.sheet){max-height:calc(100dvh - 16px);overflow:auto}
  :where(.pdd-bottom-nav){padding-left:max(10px,env(safe-area-inset-left));padding-right:max(10px,env(safe-area-inset-right))}
}
@media(max-width:380px){
  :where(.pdd-catalog-grid){grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:10px!important}
  :where(.pdd-product-card .pdd-name,.pdd-product-card .pdd-title){overflow-wrap:anywhere}
}
@media(prefers-reduced-motion:reduce){
  *,*::before,*::after{scroll-behavior:auto!important;animation-duration:.01ms!important;animation-iteration-count:1!important;transition-duration:.01ms!important}
}
@media(prefers-contrast:more){
  :root{--pdd-line:rgba(20,15,30,.3)}
  :where(button,a,input,select,textarea,.pdd-product-card,.pdd-cat-card){border-color:currentColor}
}
@media(forced-colors:active){
  :where(button,a,input,select,textarea){forced-color-adjust:auto}
  :where(button,a):focus-visible{outline:2px solid Highlight!important}
}
html[data-theme="dark"]{
  color-scheme:dark;
  --pdd-text:#f6f4fa;--pdd-muted:#b9b2c4;
  --pdd-surface:#171520;--pdd-surface-soft:#201d2b;
  --pdd-line:rgba(235,230,248,.17);
  --pdd-shadow-soft:0 4px 18px rgba(0,0,0,.22);
  --pdd-shadow-card:0 14px 36px rgba(0,0,0,.34);
  --pdd-shadow-float:0 22px 60px rgba(0,0,0,.45);
}
html[data-theme="dark"] :where(input,select,textarea){color-scheme:dark}
html[data-theme="dark"] :where(.pdd-product-card,.pdd-cat-card,.admin-card,.stat-card,.dashboard-card,.settings-card,.table-wrap){
  border-color:var(--pdd-line)
}
html[data-theme="dark"] :where(.pdd-toast,[role="status"],[role="alert"]){color:var(--ink,#f6f7fb)}
