/* ═══════════════════════════════════════════════════════════════════════════
   تمِ آلو · رز · طلایی (شفاف و مدرن) + زبانِ متریال ۳ روی همان اسکلتِ salon-booking — بعد از sb-skin.css بار می‌شود.
   دستورِ مالک ۲۰۲۶-۱۰-۰۶: همین مسیر خوبه؛ تمِ آلو رز طلایی، شفاف و مدرن، شبیهِ متریال؛ سایدبار زیباتر؛ المان‌های متحرکِ زنده.
   آلو = --c-primary (سوپرادمین) · طلایی = --zb-gold (سوپرادمین) · رز = --sb-rose (پیش‌فرضِ برندکیت). سند: docs/living/DESIGN-SB.md
   ═══════════════════════════════════════════════════════════════════════════ */
html:root{
  --sb-plum:var(--c-primary,#402635); --sb-rose:#C9798E; --sb-gold:var(--zb-gold,#BE9762); --sb-blush:#EED6D9;
  --c-gradient-from:var(--sb-plum); --c-gradient-to:color-mix(in srgb,var(--sb-plum) 42%,var(--sb-rose));
  --c-bg-light:color-mix(in srgb,var(--sb-rose) 10%,#fff); --c-bg-card:color-mix(in srgb,var(--sb-rose) 20%,#fff);
  --sb-surf-1:color-mix(in srgb,var(--sb-plum) 3%,#fff);
  --sb-state:color-mix(in srgb,var(--sb-plum) 8%,transparent);
  --sb-el-1:0 1px 2px rgba(64,38,53,.08),0 1px 3px 1px rgba(64,38,53,.06);
  --sb-el-2:0 1px 2px rgba(64,38,53,.1),0 2px 6px 2px rgba(64,38,53,.08);
  --sb-el-3:0 4px 8px 3px rgba(64,38,53,.1),0 1px 3px rgba(64,38,53,.12);
  --sb-out:cubic-bezier(.23,1,.32,1); --sb-std:cubic-bezier(.2,0,0,1);
}

/* ── موجِ لمس (ripple) ── */
.sb-rp{position:relative;overflow:hidden}
.sb-ripple{position:absolute;border-radius:50%;pointer-events:none;background:currentColor;opacity:.16;transform:scale(.2);animation:sb-ripple .55s var(--sb-std) forwards}
@keyframes sb-ripple{to{transform:scale(1);opacity:0}}

/* ── کشوی ناوبریِ متریال ── */
html:not([data-theme="dark"]) body.zb-dashboard #sidebar{background:var(--sb-surf-1)!important;border:0!important;box-shadow:var(--sb-el-2);scrollbar-width:thin}
/* سربرگِ برند: کارتِ گرادیانیِ شفاف با دو حبابِ رز و طلایی که آرام شناورند */
body.zb-dashboard #sidebar>div:first-child{position:relative;overflow:hidden;isolation:isolate;margin:12px;padding:18px 16px;border:0!important;border-radius:24px;color:#fff;
  background:linear-gradient(135deg,var(--sb-plum),color-mix(in srgb,var(--sb-plum) 55%,var(--sb-rose)));box-shadow:var(--sb-el-2)}
body.zb-dashboard #sidebar>div:first-child::before,body.zb-dashboard #sidebar>div:first-child::after{content:"";position:absolute;z-index:-1;border-radius:50%;will-change:transform}
body.zb-dashboard #sidebar>div:first-child::before{width:150px;height:150px;top:-70px;left:-40px;background:var(--sb-rose);opacity:.5;animation:sb-drift 14s ease-in-out infinite alternate}
body.zb-dashboard #sidebar>div:first-child::after{width:110px;height:110px;bottom:-60px;right:-20px;background:var(--sb-gold);opacity:.38;animation:sb-drift 18s ease-in-out infinite alternate-reverse}
@keyframes sb-drift{to{transform:translate3d(22px,16px,0) scale(1.12)}}
body.zb-dashboard #sidebar>div:first-child h2{color:#fff!important;font-size:15px;font-weight:800}
body.zb-dashboard #sidebar>div:first-child span{color:rgba(255,255,255,.75)!important}
body.zb-dashboard #sidebar>div:first-child img,body.zb-dashboard #sidebar>div:first-child .w-11{border-radius:16px;box-shadow:0 0 0 2px rgba(255,255,255,.35);background:#fff}
/* کارتِ ساعت: ظرفِ تونالِ رز */
html:not([data-theme="dark"]) body.zb-dashboard #sidebar .zb-clockcard{margin:0 12px 6px;border-radius:20px;border:0;box-shadow:none;color:var(--sb-plum);background:color-mix(in srgb,var(--sb-rose) 16%,#fff)}
html:not([data-theme="dark"]) body.zb-dashboard #sidebar .zb-clockcard::after{display:none}
html:not([data-theme="dark"]) body.zb-dashboard #sidebar .zb-clockcard-orb{background:var(--sb-gold);opacity:.28}
html:not([data-theme="dark"]) body.zb-dashboard #sidebar .zb-clock-time{color:var(--sb-plum);font-weight:900;font-variant-numeric:tabular-nums}
html:not([data-theme="dark"]) body.zb-dashboard #sidebar .zb-clock-date{color:color-mix(in srgb,var(--sb-plum) 70%,#fff)}
body.zb-dashboard #sidebar>div:nth-child(3){border:0!important;padding:10px 20px 6px}
/* پیوندها: قرصِ کاملِ متریال + لایهٔ حالت + نشانگرِ لغزان */
body.zb-dashboard #sidebar nav{position:relative}
body.zb-dashboard #sidebar .sidebar-link{position:relative;z-index:1;min-height:44px;padding:0 16px;gap:12px;border-radius:999px;color:color-mix(in srgb,var(--sb-plum) 78%,#555);font-size:14px;font-weight:500;
  transition:color .2s var(--sb-std),background-color .2s var(--sb-std)}
body.zb-dashboard #sidebar .sidebar-link svg{width:20px;height:20px;transition:transform .3s var(--sb-out)}
body.zb-dashboard #sidebar .sidebar-link:hover{background:var(--sb-state);color:var(--sb-plum)}
body.zb-dashboard #sidebar.sb-has-ind .sidebar-link:not(.active):hover{background:transparent}
body.zb-dashboard #sidebar .sidebar-link:hover svg{transform:scale(1.12)}
body.zb-dashboard #sidebar .sidebar-link.active{background:color-mix(in srgb,var(--sb-rose) 26%,#fff);color:var(--sb-plum);font-weight:800;box-shadow:none}
body.zb-dashboard #sidebar .sidebar-link.active::after{content:"";width:6px;height:6px;border-radius:50%;background:var(--sb-gold);margin-inline-start:auto;box-shadow:0 0 0 3px color-mix(in srgb,var(--sb-gold) 25%,transparent)}
body.zb-dashboard #sidebar .sidebar-link.active svg{stroke-width:2.4}
.sb-ind{position:absolute;z-index:0;right:0;left:0;top:0;height:44px;border-radius:999px;background:var(--sb-state);opacity:0;pointer-events:none;will-change:transform;
  transition:transform .28s var(--sb-out),opacity .2s ease}
body.zb-dashboard #sidebar .zb-navgroup-head{min-height:40px;padding:0 16px;border-radius:999px;color:color-mix(in srgb,var(--sb-plum) 55%,#888);font-size:11.5px;font-weight:800;letter-spacing:.02em;transition:color .2s,background-color .2s}
body.zb-dashboard #sidebar .zb-navgroup-head::before{background:var(--sb-gold);border-radius:50%}
body.zb-dashboard #sidebar .zb-navgroup-head:hover{color:var(--sb-plum);background:var(--sb-state)}
body.zb-dashboard #sidebar .zb-navgroup+.zb-navgroup{margin-top:2px}
body.zb-dashboard #sidebar nav>p{color:color-mix(in srgb,var(--sb-plum) 55%,#888)!important;font-size:11.5px!important;padding-inline:16px!important}
body.zb-dashboard #sidebar .border-t{border-color:color-mix(in srgb,var(--sb-plum) 9%,transparent)!important}
/* دکمهٔ منوی موبایل = دکمهٔ شناورِ متریال */
html body.zb-dashboard button#sidebar-toggle{border:0!important;background:linear-gradient(135deg,var(--sb-plum),color-mix(in srgb,var(--sb-plum) 55%,var(--sb-rose)))!important;box-shadow:var(--sb-el-3)!important;width:56px;height:56px;padding:0;display:grid;place-items:center;border-radius:18px!important}
html body.zb-dashboard button#sidebar-toggle svg{color:#fff!important}
@media (min-width:1024px){html body.zb-dashboard button#sidebar-toggle{display:none}}
body.zb-dashboard #sidebar-overlay{background:rgba(43,32,40,.42);-webkit-backdrop-filter:blur(2px);backdrop-filter:blur(2px)}

/* ── نوارِ بالای متریال ── */
html:not([data-theme="dark"]) body.zb-dashboard main>header{background:color-mix(in srgb,#fff 82%,transparent)!important;border:0!important;box-shadow:0 1px 0 color-mix(in srgb,var(--sb-plum) 8%,transparent)}
html:not([data-theme="dark"]) body.zb-dashboard main>header h1{color:var(--sb-plum);font-weight:900}

/* ── سطح‌ها: کارتِ متریال با گوشهٔ ۲۰ و ارتفاعِ نرم ── */
html:not([data-theme="dark"]) body :is(.card,.analytics-card,.glass-card){border-radius:20px;box-shadow:var(--sb-el-1);border:1px solid color-mix(in srgb,var(--sb-plum) 6%,transparent)}
@media (hover:hover) and (pointer:fine){html:not([data-theme="dark"]) body :is(.card,.glass-card):hover{box-shadow:var(--sb-el-3)}}
html:not([data-theme="dark"]) body.zb-dashboard :is(.zbd-card,.zb-card,.zdo-card,.zbd-box){border-radius:20px;box-shadow:var(--sb-el-1);border:1px solid color-mix(in srgb,var(--sb-plum) 6%,transparent);background:#fff}

/* کارتِ آمار: گرادیانِ شفافِ آلو/رز/طلایی با حبابِ شناور و نورِ همراهِ نشانگر */
html body:is(.zb-dashboard,body) .stat-hero{border-radius:24px;box-shadow:var(--sb-el-2);isolation:isolate;color:#fff}
html body:is(.zb-dashboard,body) .stat-hero::before{content:"";position:absolute;z-index:0;width:130px;height:130px;border-radius:50%;top:-50px;left:-30px;background:rgba(255,255,255,.16);animation:sb-drift 16s ease-in-out infinite alternate}
html body:is(.zb-dashboard,body) .stat-hero::after{top:0;left:0;width:260px;height:260px;border-radius:50%;background:radial-gradient(circle,rgba(255,255,255,.3) 0%,transparent 62%);opacity:0;transition:opacity .4s;transform:translate3d(calc(var(--gx,0px) - 130px),calc(var(--gy,0px) - 130px),0)}
@media (hover:hover) and (pointer:fine){html body:is(.zb-dashboard,body) .stat-hero:hover::after{opacity:1}html body:is(.zb-dashboard,body) .stat-hero:hover{box-shadow:var(--sb-el-3)}}
html body:is(.zb-dashboard,body) .stat-hero.t-plum{background:linear-gradient(135deg,var(--sb-plum),color-mix(in srgb,var(--sb-plum) 55%,var(--sb-rose)))}
html body:is(.zb-dashboard,body) .stat-hero.t-rose{background:linear-gradient(135deg,color-mix(in srgb,var(--sb-rose) 78%,var(--sb-plum)),var(--sb-rose))}
html body:is(.zb-dashboard,body) .stat-hero.t-gold{background:linear-gradient(135deg,color-mix(in srgb,var(--sb-gold) 78%,var(--sb-plum)),var(--sb-gold))}
html body:is(.zb-dashboard,body) .stat-hero.t-deep{background:linear-gradient(135deg,color-mix(in srgb,var(--sb-plum) 78%,#000),var(--sb-plum))}
html body:is(.zb-dashboard,body) .stat-hero.t-deep::before{background:color-mix(in srgb,var(--sb-gold) 45%,transparent)}
html body:is(.zb-dashboard,body) .stat-hero .sb-spark{position:absolute;inset:auto 0 0 0;height:46%;width:100%;z-index:0;opacity:.55;pointer-events:none}
body .sb-chip{display:inline-flex;align-items:center;gap:.35rem;min-height:32px;padding:0 .85rem;border-radius:999px;font-size:12px;font-weight:700;background:var(--c-bg-light);color:var(--sb-plum);transition:background-color .2s,box-shadow .2s}
body a.sb-chip:hover{background:var(--c-bg-card)}
body .sb-ic{display:grid;place-items:center;width:2.25rem;height:2.25rem;border-radius:12px;background:var(--c-bg-light);color:var(--sb-plum);flex:none}
body .sb-ic svg{width:1.1rem;height:1.1rem}
body .sb-ic.gold{background:color-mix(in srgb,var(--sb-gold) 18%,#fff);color:color-mix(in srgb,var(--sb-gold) 62%,var(--sb-plum))}
body .sb-ic.rose{background:color-mix(in srgb,var(--sb-rose) 20%,#fff);color:color-mix(in srgb,var(--sb-rose) 55%,var(--sb-plum))}
body .mini-stat{border-radius:16px;background:var(--sb-surf-1);border-color:color-mix(in srgb,var(--sb-plum) 6%,transparent)}
body .mini-stat:hover{background:var(--c-bg-light)}
body .progress-bar{background:color-mix(in srgb,var(--sb-plum) 9%,#fff)}
body .progress-fill{background:linear-gradient(90deg,var(--sb-plum),var(--sb-rose))}
body .progress-fill.gold{background:linear-gradient(90deg,color-mix(in srgb,var(--sb-gold) 70%,var(--sb-plum)),var(--sb-gold))}
html.sb-js body .progress-fill:not(.in){transform:scaleX(0)}
/* دکمهٔ متریال: قرصِ پر با ارتفاع */
html body :is(.btn-primary,.btn.btn-primary){border-radius:999px;box-shadow:var(--sb-el-1)}
html:not([data-theme="dark"]) body :is(.btn-ghost,.btn.btn-ghost,.btn-secondary){border-radius:999px}
html:not([data-theme="dark"]) body :is(.form-input,.form-select,.form-textarea){border-radius:14px;background:var(--sb-surf-1)}
body .sb-tl li.now::before{background:var(--sb-rose);border-color:var(--sb-rose);box-shadow:0 0 0 4px color-mix(in srgb,var(--sb-rose) 22%,transparent)}
body .sb-dot.busy{background:var(--sb-gold)}
@media (prefers-reduced-motion:reduce){
  body.zb-dashboard #sidebar>div:first-child::before,body.zb-dashboard #sidebar>div:first-child::after,html body:is(.zb-dashboard,body) .stat-hero::before{animation:none}
  .sb-ripple{display:none}.sb-ind{transition:none}html.sb-js body .progress-fill:not(.in){transform:none}
}
html[data-motion="off"] body.zb-dashboard #sidebar>div:first-child::before,html[data-motion="off"] body.zb-dashboard #sidebar>div:first-child::after,html[data-motion="off"] html body:is(.zb-dashboard,body) .stat-hero::before{animation:none}

/* zbd.css (لایهٔ قدیمیِ «آرام») کارتِ آمار را سفید و متنش را تیره می‌کرد؛ این‌جا به شکلِ salon-booking برمی‌گردد. */
html body:is(.zb-dashboard,body) .stat-hero :is(.text-white,p.font-black){color:#fff!important}
html body:is(.zb-dashboard,body) .stat-hero :is(.text-white\/70,.text-white\/75,.text-white\/80,.text-white\/85){color:rgba(255,255,255,.82)!important}
html body:is(.zb-dashboard,body) .stat-hero{border:0}

/* ناوبریِ پایینِ قدیمی (zb-mnav) در salon-booking نیست؛ منو فقط با دکمهٔ شناور باز می‌شود. */
body.zb-dashboard .zb-mnav{display:none!important}
html body.zb-dashboard button#sidebar-toggle{inset:auto 16px calc(16px + env(safe-area-inset-bottom,0px)) auto!important;transition:transform .2s var(--sb-out)}
html body.zb-dashboard button#sidebar-toggle:active{transform:scale(.94)}

/* ═══ فول‌کنترلِ سوپرادمین (استودیوی برند → html[data-*]) ═══ */
/* گوشه‌ها: soft = طراحیِ مرجع · sharp = رسمی · round = کاملاً گرد */
html[data-radius="sharp"] body :is(.card,.glass-card,.analytics-card,.stat-hero,.mini-stat,.zbd-card){border-radius:8px!important}
html[data-radius="sharp"] body :is(.btn-primary,.btn-ghost,.btn-secondary,.sb-chip,.form-input,.form-select){border-radius:8px!important}
html[data-radius="sharp"] body.zb-dashboard #sidebar :is(.sidebar-link,.zb-navgroup-head,.zb-clockcard),html[data-radius="sharp"] .sb-ind{border-radius:8px!important}
html[data-radius="sharp"] body.zb-dashboard #sidebar>div:first-child{border-radius:10px}
html[data-radius="round"] body :is(.card,.glass-card,.analytics-card,.stat-hero){border-radius:28px!important}
/* سایدبارِ تیرهٔ برند */
html[data-sidebar="plum"]:not([data-theme="dark"]) body.zb-dashboard #sidebar{background:linear-gradient(185deg,var(--sb-plum),color-mix(in srgb,var(--sb-plum) 78%,#000))!important;color:#fff}
html[data-sidebar="plum"] body.zb-dashboard #sidebar>div:first-child{background:rgba(255,255,255,.08);box-shadow:none}
html[data-sidebar="plum"] body.zb-dashboard #sidebar .sidebar-link{color:rgba(255,255,255,.78)}
html[data-sidebar="plum"] body.zb-dashboard #sidebar .sidebar-link:hover{color:#fff;background:rgba(255,255,255,.1)}
html[data-sidebar="plum"] body.zb-dashboard #sidebar .sidebar-link.active{background:rgba(255,255,255,.16);color:#fff}
html[data-sidebar="plum"] .sb-ind{background:rgba(255,255,255,.1)}
html[data-sidebar="plum"] body.zb-dashboard #sidebar :is(.zb-navgroup-head,nav>p){color:rgba(255,255,255,.55)!important}
html[data-sidebar="plum"] body.zb-dashboard #sidebar :is(p,h2){color:#fff!important}
html[data-sidebar="plum"]:not([data-theme="dark"]) body.zb-dashboard #sidebar .zb-clockcard{background:rgba(255,255,255,.1);color:#fff}
html[data-sidebar="plum"]:not([data-theme="dark"]) body.zb-dashboard #sidebar :is(.zb-clock-time,.zb-clock-date){color:#fff}
/* تراکم */
html[data-density="compact"] body.zb-dashboard #sidebar .sidebar-link{min-height:38px;font-size:13px}
html[data-density="compact"] body .glass-card{padding:.85rem}
html[data-density="compact"] body:is(.zb-dashboard,body) .stat-hero{padding:.75rem 1rem}

/* ═══ جدول‌ها در موبایل: هر ردیف یک کارت (sb.js برچسب‌ها را از سرستون می‌گذارد) ═══ */
@media (max-width:640px){
  html body .sb-stack-wrap{overflow:visible!important;border:0!important;margin:0!important;padding:0!important;background:transparent!important;box-shadow:none!important}
  html body table.sb-stack{display:block;min-width:0!important;width:100%!important;border:0;background:transparent}
  html body table.sb-stack thead{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)}
  html body table.sb-stack tbody{display:grid;gap:.75rem}
  html body table.sb-stack tbody tr{display:grid;grid-template-columns:1fr 1fr;gap:.1rem .75rem;padding:.9rem 1rem;background:#fff;border:1px solid color-mix(in srgb,var(--sb-plum) 7%,transparent)!important;border-radius:18px;box-shadow:var(--sb-el-1)}
  html body table.sb-stack tbody td{display:flex;flex-direction:column;gap:.15rem;padding:.4rem 0!important;border:0!important;white-space:normal!important;font-size:.84rem!important;text-align:start!important;min-width:0;overflow-wrap:anywhere;background:transparent!important}
  html body table.sb-stack tbody td::before{content:attr(data-label);font-size:.68rem;font-weight:700;color:#9ca3af;letter-spacing:.01em}
  html body table.sb-stack tbody td:not([data-label])::before{display:none}
  html body table.sb-stack tbody td:first-child,html body table.sb-stack tbody td:last-child:has(form,a,button){grid-column:1/-1}
  html body table.sb-stack tbody td:last-child:has(form,a,button){padding-top:.6rem!important;margin-top:.3rem;border-top:1px dashed #f3f4f6!important}
  html body table.sb-stack tbody td:last-child:has(form,a,button)::before{display:none}
  html body table.sb-stack tbody td :is(form,.flex){flex-wrap:wrap}
  html body table.sb-stack tbody td :is(button,a[class*="px-"]){min-height:40px;display:inline-flex;align-items:center;justify-content:center;padding-inline:1rem}
  html body table.sb-stack tfoot{display:block;margin-top:.75rem}
  html body table.sb-stack tfoot tr{display:flex;flex-wrap:wrap;gap:.5rem 1rem;padding:.75rem 1rem;background:var(--c-bg-light);border-radius:16px}
  html body table.sb-stack tfoot :is(td,th){padding:0!important;border:0!important}
}
/* کارت‌ها و شبکه‌ها در موبایل: فاصله و اندازهٔ لمس */
@media (max-width:640px){
  html body .glass-card{padding:1rem;border-radius:20px}
  html body:is(.zb-dashboard,body) .stat-hero{padding:.9rem 1rem;border-radius:20px;min-height:118px}
  html body .sb-chip{min-height:36px}
  html body.zb-dashboard main>div{padding:.85rem}
}
