/* =====================================================================
   سیستم مدیریت هوشمند مشتریان — لایه ظاهری v25
   آواتار متحرک طراح، سایدبار، نوار وضعیت، تنظیمات، ورود، درباره، موبایل
   ===================================================================== */

/* ---------- آواتار متحرک طراح ---------- */
.dz-av{--dzs:48px;--dz-w:max(2.5px,calc(var(--dzs)*.045));position:relative;display:inline-grid;place-items:center;width:var(--dzs);height:var(--dzs);flex:0 0 var(--dzs);border-radius:50%;isolation:isolate;vertical-align:middle}
.dz-av .dz-ring{position:absolute;inset:0;border-radius:50%;background:conic-gradient(#0f8b95,#2f7cf6,#7c5cf6,#e2559a,#f2a33a,#0f8b95);animation:dzSpin 7s linear infinite;-webkit-mask:radial-gradient(farthest-side,transparent calc(100% - var(--dz-w)),#000 calc(100% - var(--dz-w) + .6px));mask:radial-gradient(farthest-side,transparent calc(100% - var(--dz-w)),#000 calc(100% - var(--dz-w) + .6px))}
.dz-av .dz-glow{position:absolute;inset:6%;z-index:-1;border-radius:50%;background:conic-gradient(#0f8b95,#2f7cf6,#7c5cf6,#e2559a,#0f8b95);filter:blur(calc(var(--dzs)*.12));opacity:.42;animation:dzSpin 7s linear infinite,dzGlow 3.6s ease-in-out infinite}
.dz-av .dz-photo{position:absolute;inset:calc(var(--dz-w) + max(1.5px,calc(var(--dzs)*.025)));border-radius:50%;overflow:hidden;background:linear-gradient(160deg,#f4f7fb,#dfe7f1);box-shadow:inset 0 0 0 1px rgba(255,255,255,.7)}
.dz-av .dz-photo img{display:block;width:100%;height:100%;object-fit:cover;object-position:50% 30%;transform-origin:50% 40%;animation:dzBreath 6.5s ease-in-out infinite;user-select:none;-webkit-user-drag:none}
.dz-av .dz-shine{position:absolute;inset:calc(var(--dz-w) + 1px);border-radius:50%;overflow:hidden;pointer-events:none}
.dz-av .dz-shine::before{content:"";position:absolute;top:-20%;bottom:-20%;width:45%;left:-60%;background:linear-gradient(100deg,transparent,rgba(255,255,255,.55),transparent);transform:skewX(-18deg);animation:dzShine 5.5s ease-in-out infinite}
.dz-av .dz-dot{position:absolute;width:max(9px,calc(var(--dzs)*.17));height:max(9px,calc(var(--dzs)*.17));bottom:4%;left:6%;border-radius:50%;background:#22c55e;border:max(2px,calc(var(--dzs)*.03)) solid #fff;box-shadow:0 1px 3px rgba(0,0,0,.25)}
.dz-av .dz-dot::after{content:"";position:absolute;inset:-3px;border-radius:50%;border:2px solid #22c55e;animation:dzPing 2.4s cubic-bezier(0,0,.2,1) infinite}
.dz-av.dz-lg{animation:dzFloat 5s ease-in-out infinite;transition:transform .35s cubic-bezier(.2,.8,.2,1)}
.dz-av.dz-lg:hover{transform:perspective(500px) rotateY(-10deg) rotateX(6deg) scale(1.03)}
.dz-av.dz-lg .dz-glow{opacity:.55}
@keyframes dzSpin{to{rotate:360deg}}
@keyframes dzGlow{0%,100%{opacity:.28;scale:.96}50%{opacity:.6;scale:1.06}}
@keyframes dzBreath{0%,100%{transform:scale(1)}50%{transform:scale(1.045) translateY(-1%)}}
@keyframes dzShine{0%,62%{left:-60%}82%,100%{left:125%}}
@keyframes dzPing{0%{transform:scale(1);opacity:.7}80%,100%{transform:scale(2);opacity:0}}
@keyframes dzFloat{0%,100%{translate:0 0}50%{translate:0 -5px}}
@media (prefers-reduced-motion:reduce){.dz-av,.dz-av *,.dz-av *::before,.dz-av *::after{animation:none!important;transition:none!important}}
html.no-heavyfx .dz-av .dz-glow,html.no-heavyfx .dz-av .dz-shine{display:none}
html.no-heavyfx .dz-av,html.no-heavyfx .dz-av img{animation:none!important}

/* آواتار عکس‌دار کاربر (در فهرست‌ها) */
html body .av.av-photo{position:relative;background:conic-gradient(from 0deg,#0f8b95,#2f7cf6,#7c5cf6,#0f8b95)!important;padding:2px!important;border:0!important}
html body .av.av-photo img{border-radius:50%;border:1.5px solid #fff;box-sizing:border-box}

/* ---------- سایدبار ---------- */
html body .side .brand.v25-brand{overflow:hidden;min-width:0}
html body .side .brand.v25-brand>div{min-width:0}
html body .side .brand.v25-brand b{white-space:normal!important;overflow-wrap:anywhere;font-size:14px!important;line-height:1.55!important;display:block}
html body .side .brand.v25-brand small{white-space:normal!important}
html body .side .app-credit.v25-credit{display:flex!important;align-items:center;gap:10px;margin:8px 10px!important;padding:8px 10px!important;border-radius:16px;cursor:pointer;background:linear-gradient(135deg,color-mix(in srgb,var(--acc,#0f7f8a) 9%,transparent),color-mix(in srgb,#7c5cf6 8%,transparent));border:1px solid color-mix(in srgb,var(--acc,#0f7f8a) 18%,transparent);transition:transform .2s,box-shadow .2s;min-width:0;overflow:hidden}
html body .side .app-credit.v25-credit:hover,html body .side .app-credit.v25-credit:focus-visible{transform:translateY(-1px);box-shadow:0 10px 22px -16px rgba(30,70,140,.7);outline:none}
html body .side .v25-credit-t{display:flex;flex-direction:column;min-width:0;line-height:1.45;flex:1}
html body .side .v25-credit-t small{font-size:10px;color:var(--muted,#64748b)}
html body .side .v25-credit-t b{font-size:12.5px;color:var(--ink,#0f172a);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
html body .side .v25-credit-v{font-size:10px;direction:ltr;color:var(--acc,#0f7f8a);background:color-mix(in srgb,var(--acc,#0f7f8a) 10%,transparent);padding:2px 7px;border-radius:99px;font-weight:700}
html body .side .app-credit-mark{display:none}

/* ---------- نوار وضعیت فشرده (دسکتاپ) ---------- */
@media (min-width:761px){
 html body footer#status.status{display:flex!important;align-items:center!important;gap:8px!important;padding:6px 10px!important}
 html body #status .status-redesign{display:flex!important;flex:1 1 auto!important;gap:6px!important;grid-template-columns:none!important;width:auto!important;overflow:hidden}
 html body #status .status-item{flex:0 1 auto!important;align-items:center!important;gap:6px!important;padding:5px 10px!important;border-radius:11px!important;white-space:nowrap!important;box-shadow:none!important;font-size:11.5px!important}
 html body #status .status-item:last-child{margin-inline-start:auto!important}
 html body #status .status-icon{flex:0 0 22px!important;width:22px!important;height:22px!important;border-radius:7px!important;font-size:11px!important}
 html body #status .status-content{overflow:hidden!important;text-overflow:ellipsis!important;overflow-wrap:normal!important}
 html body #status .build-tag{position:static!important;flex:0 0 auto!important;margin:0!important;font-size:10.5px!important}
}
/* ---------- تنظیمات ---------- */
html body #page .ph.v25-ph-hidden{display:none!important}
html body #page .pp-settings-hero{margin-bottom:12px}
html body #page .v25-hero-av{flex:0 0 auto;display:grid;place-items:center;padding:4px}
html body #page .pp-settings-hero .v25-hero-bar{display:flex!important;flex-direction:row!important;flex-wrap:wrap;gap:6px;align-self:flex-start;margin-inline-start:auto;z-index:1}
html body #page .pp-settings-hero .v25-hero-bar .btn{font-size:12px}
html body #page .pp-settings-shortcuts>[data-v25-goto]{cursor:pointer;transition:transform .2s,box-shadow .2s,border-color .2s}
html body #page .pp-settings-shortcuts>[data-v25-goto]:hover,html body #page .pp-settings-shortcuts>[data-v25-goto]:focus-visible{transform:translateY(-2px);border-color:color-mix(in srgb,var(--acc,#0f7f8a) 45%,transparent);box-shadow:0 14px 26px -20px rgba(20,70,140,.75);outline:none}
html body #page .pp-settings-shortcuts{margin-bottom:12px}
@keyframes v25Flash{0%{box-shadow:0 0 0 0 color-mix(in srgb,var(--acc,#0f7f8a) 55%,transparent)}100%{box-shadow:0 0 0 14px transparent}}
html body .v25-flash{animation:v25Flash 1s ease-out 2}
@media (max-width:760px){
 html body #page .pp-settings-hero{flex-wrap:wrap}
 html body #page .pp-settings-hero .v25-hero-bar{width:100%;margin:2px 0 0}
 html body #page .pp-settings-hero .v25-hero-bar .btn{flex:1}
 html body #page .v25-hero-av .dz-av{--dzs:72px!important}
}

/* ---------- ورود ---------- */
html body .login-card-pro .v25-login-credit{display:flex;align-items:center;gap:10px;margin-top:14px;padding-top:12px;border-top:1px dashed rgba(100,116,139,.28);min-width:0}
html body .login-card-pro .v25-login-credit>span:not(.dz-av){display:flex;flex-direction:column;line-height:1.5;min-width:0}
html body .login-card-pro .v25-login-credit small{font-size:10.5px;color:#64748b}
html body .login-card-pro .v25-login-credit b{font-size:13px;color:#16324f}
html body .login-card-pro .v25-login-credit .v25-login-ver{margin-inline-start:auto;font-size:10.5px;color:#0f7f8a;background:#e8f6f6;padding:3px 9px;border-radius:99px;font-weight:700;flex-direction:row!important}

/* ---------- درباره نرم‌افزار ---------- */
html body #layer .dlg.v25-about{width:min(560px,calc(100% - 24px));padding:0;overflow:hidden;border-radius:26px}
html body .v25-about .v25-about-x{position:absolute;top:12px;left:12px;z-index:2}
html body .v25-about .v25-about-hero{display:flex;align-items:center;gap:22px;padding:30px 26px 22px;background:radial-gradient(circle at 85% 0%,rgba(124,92,246,.18),transparent 45%),radial-gradient(circle at 0% 100%,rgba(15,139,149,.18),transparent 50%),linear-gradient(160deg,var(--panel,#fff),color-mix(in srgb,var(--acc,#0f7f8a) 6%,var(--panel,#fff)))}
html body .v25-about .v25-eyebrow{display:inline-block;font-size:11px;font-weight:800;color:var(--acc,#0f7f8a);background:color-mix(in srgb,var(--acc,#0f7f8a) 11%,transparent);padding:4px 10px;border-radius:99px}
html body .v25-about h2{margin:8px 0 6px;font-size:24px;line-height:1.4}
html body .v25-about p{margin:0;color:var(--muted,#64748b);font-size:12.5px;line-height:2}
html body .v25-about .v25-about-tags{display:flex;flex-wrap:wrap;gap:6px;margin-top:10px}
html body .v25-about .v25-about-tags span{font-size:11px;padding:4px 10px;border-radius:99px;border:1px solid var(--line,#e2e8f0);background:var(--panel,#fff)}
html body .v25-about .v25-about-facts{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px;padding:16px 22px}
html body .v25-about .v25-about-facts div{text-align:center;padding:10px 6px;border-radius:14px;border:1px solid var(--line,#e2e8f0);background:color-mix(in srgb,var(--acc,#0f7f8a) 3%,var(--panel,#fff))}
html body .v25-about .v25-about-facts b{display:block;font-size:15px;color:var(--acc,#0f7f8a)}
html body .v25-about .v25-about-facts small{font-size:10.5px;color:var(--muted,#64748b)}
html body .v25-about .v25-about-f{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:12px 22px 18px;font-size:11px;color:var(--muted,#64748b)}
@media (max-width:560px){
 html body .v25-about .v25-about-hero{flex-direction:column;text-align:center;padding:30px 18px 16px}
 html body .v25-about .v25-about-tags{justify-content:center}
 html body .v25-about .dz-av.dz-lg{--dzs:112px!important}
 html body .v25-about .v25-about-facts{grid-template-columns:repeat(2,minmax(0,1fr));padding:12px 16px}
 html body .v25-about .v25-about-f{flex-direction:column-reverse;text-align:center}
}

/* ---------- تعیین رمز ---------- */
html body #layer .dlg.v25-pin{width:min(430px,calc(100% - 24px))}
html body .v25-pin .v25-pin-b{padding:14px 18px;display:flex;flex-direction:column;gap:10px}
html body .v25-pin .v25-pin-b p{margin:0;font-size:12.5px;line-height:2;color:var(--muted,#475569)}
html body .v25-pin .dlg-f{padding:0 18px 16px}

/* ---------- موبایل ---------- */
@media (max-width:760px){
 /* دکمه شناور دستیار بالاتر از نوار پایین و بدون پوشاندن محتوا */
 html body #fab.fab{bottom:calc(76px + env(safe-area-inset-bottom,0px))!important;transform:scale(.86);transform-origin:left bottom}
 html body #page{padding-bottom:calc(96px + env(safe-area-inset-bottom,0px))!important}
 /* ابزار اشتراک‌گذاری سربرگ‌ها: فشرده */
 html body #page .ph .bar .btn{min-height:38px;font-size:12px;padding-inline:10px}
}

/* ---------- اعلان نسخه جدید ---------- */
.v25-update{position:fixed;z-index:10050;inset-inline:0;margin:auto;bottom:calc(18px + env(safe-area-inset-bottom,0px));width:max-content;max-width:calc(100% - 24px);display:flex;align-items:center;gap:12px;padding:10px 12px 10px 16px;border-radius:16px;background:#14304f;color:#fff;font-size:13px;box-shadow:0 18px 40px -16px rgba(10,30,60,.7);animation:v25Up .35s cubic-bezier(.2,.8,.2,1)}
.v25-update button{border:0;border-radius:11px;padding:7px 14px;font:inherit;font-weight:700;background:#2dd4bf;color:#06302c;cursor:pointer}
@keyframes v25Up{from{transform:translateY(20px);opacity:0}}
@media (max-width:760px){.v25-update{bottom:calc(84px + env(safe-area-inset-bottom,0px))}}

/* ---------- کارت کوچک دستیار (div.coach) — برچسب در ستون باریک می‌شکست ---------- */
html body #page div.coach{display:flex!important;flex-direction:column!important;align-items:stretch!important;gap:6px!important;grid-template-columns:none!important}
html body #page div.coach>.c-name{width:auto!important;max-width:none!important;display:flex!important;align-items:center;gap:6px;white-space:normal}
html body #page div.coach>.c-name svg{width:16px;height:16px;flex:0 0 16px}

/* ---------- حالت تیره (با گذر خودکار در v25.js) ---------- */
html[data-theme="dark"] body .v25-dk:not(#_v1):not(#_v2){background:color-mix(in srgb,var(--v25bg,#fff) 9%,#172235)!important;background-image:none!important;border-color:rgba(148,163,184,.16)!important}
html[data-theme="dark"] body .v25-dkt:not(#_v1):not(#_v2){color:color-mix(in srgb,var(--v25fg,#000) 18%,#e5ecf5)!important}
html[data-theme="dark"] body{background:#0d1522}
html[data-theme="dark"] body #app .side .app-credit.v25-credit{background:linear-gradient(135deg,rgba(45,212,191,.10),rgba(124,92,246,.12))!important}
html[data-theme="dark"] body #app .side .v25-credit-t b{color:#e5ecf5}
html[data-theme="dark"] body #app input,html[data-theme="dark"] body #app select,html[data-theme="dark"] body #app textarea,html[data-theme="dark"] body #layer input,html[data-theme="dark"] body #layer select,html[data-theme="dark"] body #layer textarea{color-scheme:dark}
html[data-theme="dark"] body #app .side .brand:not(#_v1){background:linear-gradient(150deg,#1a2a40,#15283a)!important;border-color:rgba(148,163,184,.16)!important}
html[data-theme="dark"] body #app .side .brand:not(#_v1) b{color:#eef3fa!important}
html[data-theme="dark"] body #app .side .brand:not(#_v1) small{color:#9fb0c6!important}
