/* glass.css — فاز ۸۵: طراحی شیشه‌ای مات روی پس‌زمینهٔ مدار نئونی (تصویر طراحی‌شدهٔ کاربر، نسخهٔ تیره و روشن)
   - پس از style.css و theme.css بارگذاری می‌شود؛ توکن‌های رنگ کارت‌ها نیمه‌شفاف می‌شوند و سطح‌های اصلی
     (سایدبار، کارت‌ها، ستون‌های کانبان، جدول‌ها، پنجره‌ها و منوها) پشت خود را مات (blur) می‌کنند
   - منوی کناری: نشانگر نئونی شناور، آکاردئون تک‌باز، جمع‌شدن به حالت فقط‌آیکن، ورود پلکانی
   - کلید متحرک تم، کارت پروفایل، دکمهٔ شناور تماس و صفحهٔ ورود شیشه‌ای */

/* ===================== توکن‌های شیشه ===================== */
/* فاز ۸۶: به درخواست کاربر، همهٔ باکس‌ها دقیقاً همان شیشهٔ مات سایدبار را دارند (رنگ ۵۰٪ و تاری ۲۲px) */
:root,
:root[data-theme='light'] {
  --bg-image: url('/img/bg/bg-light.webp');
  --bg-filter: none;
  --bg: #eaf7f6;
  --card: rgba(255, 255, 255, 0.5);
  --card-hi: rgba(255, 255, 255, 0.5);
  --card-lo: rgba(255, 255, 255, 0.5);
  --surface-2: rgba(240, 249, 248, 0.75);
  --surface-3: rgba(222, 244, 242, 0.85);
  --border: rgba(31, 138, 142, 0.16);
  --border-strong: rgba(31, 138, 142, 0.3);
  --input-bg: rgba(255, 255, 255, 0.85);
  --glass-blur: blur(22px) saturate(160%);
  --glass-edge: inset 0 1px 0 rgba(255, 255, 255, 0.9), inset 0 0 0 1px rgba(255, 255, 255, 0.4);
  --glass-solid: rgba(248, 253, 252, 0.95);
  --neon: #18b6b8;
  --neon-soft: rgba(24, 182, 184, 0.32);
  --side-glass: rgba(255, 255, 255, 0.5);
  --side-text: #2a4441;
  --side-strong: #0d2826;
  --side-muted: #66807c;
  --side-hover: rgba(31, 138, 142, 0.08);
  --side-line: rgba(31, 138, 142, 0.14);
  --shadow: 0 1px 0 rgba(255, 255, 255, 0.7) inset, 0 10px 30px -14px rgba(16, 80, 78, 0.28);
  --shadow-lift: 0 1px 0 rgba(255, 255, 255, 0.8) inset, 0 24px 44px -18px rgba(16, 80, 78, 0.38), 0 0 0 1px rgba(24, 182, 184, 0.22);
}
:root[data-theme='dark'] {
  --bg-image: url('/img/bg/bg-dark.webp');
  --bg: #031417;
  --card: rgba(4, 20, 23, 0.5);
  --card-hi: rgba(4, 20, 23, 0.5);
  --card-lo: rgba(4, 20, 23, 0.5);
  --surface-2: rgba(255, 255, 255, 0.045);
  --surface-3: rgba(255, 255, 255, 0.08);
  --border: rgba(120, 230, 226, 0.12);
  --border-strong: rgba(120, 230, 226, 0.24);
  --input-bg: rgba(2, 12, 14, 0.6);
  --glass-blur: blur(22px) saturate(160%);
  --glass-edge: inset 0 1px 0 rgba(255, 255, 255, 0.07), inset 0 0 0 1px rgba(120, 230, 226, 0.035);
  --glass-solid: rgba(8, 22, 25, 0.96);
  --neon: #2ee6e0;
  --neon-soft: rgba(46, 230, 224, 0.32);
  --side-glass: rgba(4, 20, 23, 0.5);
  --side-text: #a9c4c0;
  --side-strong: #effffd;
  --side-muted: #6f8f8b;
  --side-hover: rgba(255, 255, 255, 0.045);
  --side-line: rgba(255, 255, 255, 0.07);
}

/* ===================== پس‌زمینه ===================== */
/* تصویر روی یک لایهٔ ثابت جداگانه است تا تم‌های رنگی (زمردی/سایبرپانک) بتوانند رنگش را با فیلتر عوض کنند */
html { background: var(--bg); }
body { background: transparent; }
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: var(--bg-image) center bottom / cover no-repeat;
  filter: var(--bg-filter, none);
  transition: filter 0.6s ease;
}

/* ===================== سطح‌های شیشه‌ای ===================== */
.panel,
.stat-card,
.table-wrap,
.delivery-photo-card,
.kanban-col,
.chat-sidebar,
.chat-main,
.auth-card,
.lock-screen-card,
.modal,
.call-dialer-panel,
.otp-card {
  background: linear-gradient(160deg, var(--card-hi) 0%, var(--card) 45%, var(--card-lo) 100%);
  border: 1px solid var(--border);
  -webkit-backdrop-filter: var(--glass-blur);
  backdrop-filter: var(--glass-blur);
  box-shadow: var(--glass-edge), var(--shadow);
}
.modal { box-shadow: var(--glass-edge), var(--shadow-pop); }
/* منوهای شناور باید خوانا بمانند: شیشهٔ پررنگ‌تر */
.user-menu-dropdown,
.mobile-menu-dropdown,
.toast,
.call-popup,
.notif-dropdown,
.autocomplete-list,
.dropdown-menu {
  background: var(--glass-solid) !important;
  -webkit-backdrop-filter: var(--glass-blur);
  backdrop-filter: var(--glass-blur);
  border: 1px solid var(--border-strong) !important;
  color: var(--text);
}
.deal-card {
  background: linear-gradient(165deg, var(--card-hi), var(--surface-2));
  box-shadow: var(--glass-edge), 0 8px 18px -12px rgba(0, 0, 0, 0.5);
}
/* هدر چسبان جدول‌ها روی محتوای اسکرول‌شده مات شود */
thead th {
  background: linear-gradient(180deg, var(--surface-3), var(--surface-2));
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}
/* نوار حضور پایین صفحه */
.presence-bar {
  background: var(--side-glass) !important;
  -webkit-backdrop-filter: var(--glass-blur);
  backdrop-filter: var(--glass-blur);
  border-top: 1px solid var(--side-line) !important;
}
.toast { color: var(--text) !important; }
/* درخشش لبه هنگام هاور کارت‌ها */
.panel:hover,
.stat-card:hover { border-color: var(--border-strong); }

/* ===================== آیکن‌های سه‌بعدی ===================== */
img.ic3d {
  filter: drop-shadow(0 3px 4px rgba(0, 0, 0, 0.28)) drop-shadow(0 0 0.5px rgba(255, 255, 255, 0.3));
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.btn img.ic3d,
button img.ic3d { width: 1.3em; height: 1.3em; vertical-align: -0.3em; }
.btn:hover img.ic3d,
button:hover img.ic3d { transform: translateY(-2px) rotate(-8deg) scale(1.12); }
h1 img.ic3d, h2 img.ic3d, h3 img.ic3d { width: 1.35em; height: 1.35em; vertical-align: -0.3em; margin-inline-end: 4px; }
.topbar h2 img.ic3d { animation: icoFloat 4.5s ease-in-out infinite; }
@keyframes icoFloat {
  0%, 100% { transform: translateY(0) rotate(0); }
  50% { transform: translateY(-3px) rotate(-4deg); }
}
.empty-state .big img.ic3d { animation: icoFloat 5s ease-in-out infinite; filter: drop-shadow(0 14px 14px rgba(0, 0, 0, 0.3)); }

/* ===================== سایدبار شیشه‌ای و نئونی ===================== */
.sidebar {
  background: var(--side-glass) !important;
  -webkit-backdrop-filter: blur(22px) saturate(160%);
  backdrop-filter: blur(22px) saturate(160%);
  border-inline-start: none;
  border-inline-end: 1px solid var(--side-line);
  box-shadow: var(--glass-edge), 10px 0 40px -24px rgba(0, 0, 0, 0.6);
  transition: width 0.42s cubic-bezier(0.65, 0, 0.25, 1), padding 0.42s cubic-bezier(0.65, 0, 0.25, 1);
  overflow-x: hidden;
}
.sidebar::before { background: radial-gradient(240px 180px at 70% 0%, var(--neon-soft), transparent 70%); opacity: 0.55; }
/* خط نئونی لبهٔ داخلی سایدبار با نور در حال حرکت */
.sidebar::after {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  inset-inline-end: 0;
  width: 2px;
  pointer-events: none;
  background: linear-gradient(180deg, transparent 0%, var(--neon) 18%, transparent 36%, transparent 60%, var(--neon) 78%, transparent 100%);
  background-size: 100% 220%;
  box-shadow: 0 0 12px var(--neon-soft);
  opacity: 0.75;
  animation: neonRun 6s linear infinite;
}
@keyframes neonRun {
  from { background-position: 0 0%; }
  to { background-position: 0 220%; }
}
.sidebar .brand { color: var(--side-strong); position: relative; }
.sidebar .brand .brand-logo { box-shadow: 0 6px 14px -4px rgba(0, 0, 0, 0.45), 0 0 0 1px var(--side-line); }
.brand-text { white-space: nowrap; transition: opacity 0.25s ease; }

#nav-items { position: relative; }
.nav-item {
  position: relative;
  z-index: 1;
  color: var(--side-text);
  white-space: nowrap;
  transition: color 0.2s ease, transform 0.2s ease;
}
.nav-label { overflow: hidden; text-overflow: ellipsis; transition: opacity 0.2s ease; }
.nav-item:hover { background: transparent; color: var(--side-strong); }
.nav-item:hover .nav-label { transform: translateX(-2px); }
.nav-label { display: inline-block; transition: transform 0.25s ease, opacity 0.2s ease; }
.nav-item.active {
  background: transparent;
  border-color: transparent;
  box-shadow: none;
  color: var(--side-strong);
  font-weight: 700;
}
/* نشانگر شناور: کپسول شیشه‌ای با لبهٔ نئونی که بین گزینه‌ها سر می‌خورد */
.nav-glider {
  position: absolute;
  top: 0;
  inset-inline: 0;
  height: 44px;
  border-radius: 12px;
  pointer-events: none;
  opacity: 0;
  z-index: 0;
  background: linear-gradient(90deg, rgba(46, 230, 224, 0.04), var(--neon-soft));
  border: 1px solid var(--neon-soft);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12), 0 8px 24px -10px var(--neon-soft);
  transition: transform 0.45s cubic-bezier(0.34, 1.4, 0.64, 1), height 0.3s ease, opacity 0.25s ease;
}
.nav-glider::after {
  content: '';
  position: absolute;
  top: 18%;
  bottom: 18%;
  inset-inline-start: -1px;
  width: 3px;
  border-radius: 3px;
  background: var(--neon);
  box-shadow: 0 0 8px var(--neon), 0 0 18px var(--neon);
}
/* آیکن‌های منو: برجسته، با پرش فنری روی هاور و شناوری ملایم برای گزینهٔ فعال */
.nav-item .ic { transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1); filter: none; }
.nav-item .ic img.ic3d { width: 24px; height: 24px; filter: drop-shadow(0 4px 5px rgba(0, 0, 0, 0.35)); }
.nav-item:hover .ic { transform: translateY(-2px) rotate(-10deg) scale(1.18); }
.nav-item:hover .ic img.ic3d,
.nav-item.active .ic img.ic3d { transform: none; }
.nav-item.active .ic { animation: icoFloat 3.2s ease-in-out infinite; }
.nav-item.active .ic img.ic3d { filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.35)) drop-shadow(0 0 8px var(--neon-soft)); }
/* آکاردئون */
.nav-group-chevron { transition: transform 0.45s cubic-bezier(0.34, 1.56, 0.64, 1); color: var(--side-muted); }
.nav-group.open > .nav-group-toggle { color: var(--side-strong); }
.nav-group.open .nav-group-chevron { color: var(--neon); }
.nav-group-children { border-inline-start-color: var(--side-line); }
.nav-group.open .nav-subitem { animation: subIn 0.38s cubic-bezier(0.2, 0.8, 0.2, 1) both; }
.nav-group.open .nav-subitem:nth-child(2) { animation-delay: 0.04s; }
.nav-group.open .nav-subitem:nth-child(3) { animation-delay: 0.08s; }
.nav-group.open .nav-subitem:nth-child(4) { animation-delay: 0.12s; }
.nav-group.open .nav-subitem:nth-child(5) { animation-delay: 0.16s; }
.nav-group.open .nav-subitem:nth-child(6) { animation-delay: 0.2s; }
@keyframes subIn {
  from { opacity: 0; transform: translateX(14px); }
  to { opacity: 1; transform: none; }
}
/* ورود پلکانی منو بار اول */
.nav-intro > .nav-item,
.nav-intro > .nav-group { animation: navIn 0.55s cubic-bezier(0.2, 0.8, 0.2, 1) both; }
.nav-intro > :nth-child(2) { animation-delay: 0.03s; }
.nav-intro > :nth-child(3) { animation-delay: 0.06s; }
.nav-intro > :nth-child(4) { animation-delay: 0.09s; }
.nav-intro > :nth-child(5) { animation-delay: 0.12s; }
.nav-intro > :nth-child(6) { animation-delay: 0.15s; }
.nav-intro > :nth-child(7) { animation-delay: 0.18s; }
.nav-intro > :nth-child(8) { animation-delay: 0.21s; }
.nav-intro > :nth-child(9) { animation-delay: 0.24s; }
.nav-intro > :nth-child(10) { animation-delay: 0.27s; }
.nav-intro > :nth-child(11) { animation-delay: 0.3s; }
.nav-intro > :nth-child(12) { animation-delay: 0.33s; }
.nav-intro > :nth-child(n + 13) { animation-delay: 0.36s; }
@keyframes navIn {
  from { opacity: 0; transform: translateX(26px); filter: blur(4px); }
  to { opacity: 1; transform: none; filter: none; }
}
.nav-badge { box-shadow: 0 0 0 2px var(--side-glass), 0 0 12px -2px var(--danger); animation: badgePop 0.5s cubic-bezier(0.34, 1.56, 0.64, 1); }
@keyframes badgePop {
  from { transform: scale(0); }
  to { transform: scale(1); }
}

/* متن‌ها و اجزای دیگر سایدبار با توکن‌های تم (در تم روشن تیره می‌شوند) */
.user-chip .name { color: var(--side-strong); }
.user-chip .role,
.logout-link,
.sidebar-datetime-date,
.user-menu-section-label { color: var(--side-muted); }
.user-menu { border-top-color: var(--side-line); }
.user-menu-item { color: var(--text); }
.user-menu-item:hover { background: var(--primary-light); color: var(--text); }
.user-menu-divider { background: var(--border); }
.sidebar .btn-outline { background: var(--side-hover); border-color: var(--side-line); color: var(--side-strong); }
.sidebar .btn-outline:hover { background: var(--neon-soft); border-color: var(--neon); }
.sidebar-datetime-box {
  background: linear-gradient(160deg, var(--neon-soft), transparent 140%);
  border: 1px solid var(--side-line);
  box-shadow: var(--glass-edge);
}
.sidebar-datetime-time { background: linear-gradient(90deg, var(--neon), var(--primary)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.mobile-menu-btn { color: var(--side-strong) !important; background: var(--side-hover) !important; border-color: var(--side-line) !important; }

/* ===================== کارت پروفایل ===================== */
.user-chip-text { min-width: 0; flex: 1; overflow: hidden; transition: opacity 0.2s ease; }
.user-chip-text .name,
.user-chip-text .role { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.profile-avatar-ring {
  position: relative;
  flex-shrink: 0;
  padding: 2px;
  border-radius: 50%;
  background: conic-gradient(from 0deg, var(--neon), transparent 30%, var(--primary) 55%, transparent 80%, var(--neon));
  animation: ringSpin 6s linear infinite;
}
.profile-avatar-ring .avatar { border: 2px solid var(--side-glass); animation: ringSpin 6s linear infinite reverse; }
@keyframes ringSpin { to { transform: rotate(360deg); } }
.user-chip-chevron { color: var(--side-muted); font-size: 11px; transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1), color 0.2s; }
.user-menu-dropdown { transform: translateY(10px) scale(0.96); transform-origin: 50% 100%; filter: blur(3px); transition: opacity 0.22s ease, transform 0.32s cubic-bezier(0.34, 1.4, 0.64, 1), filter 0.22s ease, visibility 0.22s; border-radius: 16px; }
.user-menu-dropdown.open { transform: none; filter: none; }

/* ===================== کلید متحرک تم ===================== */
.theme-toggle {
  display: flex;
  align-items: center;
  gap: 10px;
  justify-content: flex-start;
  width: 100%;
  padding: 7px 10px;
  margin-bottom: 10px;
  border-radius: 14px;
  color: var(--side-strong);
  background: var(--side-hover);
  border: 1px solid var(--side-line);
  box-shadow: var(--glass-edge);
}
.theme-toggle:hover { background: var(--neon-soft); }
.tt-label { white-space: nowrap; font-weight: 700; transition: opacity 0.2s ease; }
.tt-switch {
  direction: ltr;
  position: relative;
  flex-shrink: 0;
  width: 52px;
  height: 26px;
  border-radius: 20px;
  overflow: hidden;
  background: linear-gradient(180deg, #6fd3f7, #a9e7fb);
  box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.3), 0 0 0 1px rgba(255, 255, 255, 0.35);
  transition: background 0.6s ease;
}
:root[data-theme='dark'] .tt-switch { background: linear-gradient(180deg, #0b1f3a, #1b2f57); }
.tt-knob {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #fff6b8, #ffcf3f 55%, #f5a316);
  box-shadow: 0 0 10px 2px rgba(255, 200, 60, 0.75), inset -2px -2px 4px rgba(0, 0, 0, 0.15);
  transition: left 0.6s cubic-bezier(0.68, -0.4, 0.27, 1.45), background 0.6s ease, box-shadow 0.6s ease, transform 0.6s ease;
}
:root[data-theme='dark'] .tt-knob {
  left: 29px;
  transform: rotate(320deg);
  background: radial-gradient(circle at 35% 30%, #ffffff, #d7dde8 60%, #aab3c3);
  box-shadow: 0 0 10px 1px rgba(220, 230, 255, 0.55), inset -2px -2px 4px rgba(0, 0, 0, 0.2);
}
.tt-crater { position: absolute; border-radius: 50%; background: rgba(120, 130, 150, 0.45); opacity: 0; transition: opacity 0.4s ease 0.2s; }
.tt-crater:nth-child(1) { width: 6px; height: 6px; top: 4px; left: 9px; }
.tt-crater:nth-child(2) { width: 4px; height: 4px; top: 11px; left: 4px; }
.tt-crater:nth-child(3) { width: 3px; height: 3px; top: 13px; left: 12px; }
:root[data-theme='dark'] .tt-crater { opacity: 1; }
.tt-stars i,
.tt-clouds i { position: absolute; display: block; transition: transform 0.6s ease, opacity 0.6s ease; }
.tt-stars i { width: 2px; height: 2px; border-radius: 50%; background: #fff; box-shadow: 0 0 3px #fff; opacity: 0; transform: translateY(-8px); }
.tt-stars i:nth-child(1) { top: 6px; left: 8px; }
.tt-stars i:nth-child(2) { top: 15px; left: 15px; }
.tt-stars i:nth-child(3) { top: 8px; left: 20px; width: 1.5px; height: 1.5px; }
.tt-stars i:nth-child(4) { top: 18px; left: 6px; width: 1.5px; height: 1.5px; }
:root[data-theme='dark'] .tt-stars i { opacity: 1; transform: none; animation: twinkle 2.4s ease-in-out infinite; }
:root[data-theme='dark'] .tt-stars i:nth-child(2) { animation-delay: 0.6s; }
:root[data-theme='dark'] .tt-stars i:nth-child(3) { animation-delay: 1.2s; }
@keyframes twinkle { 50% { opacity: 0.3; } }
.tt-clouds i { height: 8px; border-radius: 8px; background: #fff; opacity: 0.95; }
.tt-clouds i:nth-child(1) { width: 18px; top: 13px; left: 28px; }
.tt-clouds i:nth-child(2) { width: 12px; top: 6px; left: 34px; opacity: 0.8; }
:root[data-theme='dark'] .tt-clouds i { opacity: 0; transform: translateY(14px); }
.theme-toggle:active .tt-knob { transform: scale(0.88); }
:root[data-theme='dark'] .theme-toggle:active .tt-knob { transform: rotate(320deg) scale(0.88); }

/* ===================== سایدبار جمع‌شده (فقط دسکتاپ) ===================== */
@media (min-width: 761px) {
  html.sidebar-collapsed .sidebar { width: 78px; padding-inline: 10px; }
  html.sidebar-collapsed .brand { flex-direction: column; gap: 10px; padding-inline: 0; }
  html.sidebar-collapsed .brand-text,
  html.sidebar-collapsed .nav-label,
  html.sidebar-collapsed .nav-group-chevron,
  html.sidebar-collapsed .user-chip-text,
  html.sidebar-collapsed .user-chip-chevron,
  html.sidebar-collapsed .tt-label,
  html.sidebar-collapsed .sidebar-datetime-box { display: none; }
  html.sidebar-collapsed .nav-item { justify-content: center; padding-inline: 0; gap: 0; }
  html.sidebar-collapsed .nav-group-children { margin-inline-start: 0; padding-inline-start: 0; border-inline-start: none; border-top: 1px dashed var(--side-line); }
  html.sidebar-collapsed .nav-subitem .ic img.ic3d { width: 20px; height: 20px; }
  html.sidebar-collapsed .nav-badge { position: absolute; top: 3px; inset-inline-start: 6px; min-width: 16px; height: 16px; font-size: 10px; }
  html.sidebar-collapsed .theme-toggle { justify-content: center; padding: 7px 0; }
  html.sidebar-collapsed .sidebar-footer .btn { font-size: 0; padding: 8px 0; gap: 0; }
  html.sidebar-collapsed .sidebar-footer .btn img.ic3d { width: 22px; height: 22px; }
}
@media (max-width: 760px) {
  .nav-glider,
  .sidebar-collapse-btn,
  .sidebar::after { display: none; }
  .nav-item.active { background: var(--neon-soft); border-color: var(--neon); }
  .user-chip-chevron { display: none; }
}

/* ===================== دکمهٔ شناور تماس ===================== */
.call-dialer-btn {
  width: 58px;
  height: 58px;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: visible;
  color: var(--side-strong);
  background:
    radial-gradient(circle at 30% 25%, rgba(255, 255, 255, 0.35), transparent 45%),
    linear-gradient(150deg, var(--card-hi), var(--card-lo)) !important;
  -webkit-backdrop-filter: var(--glass-blur);
  backdrop-filter: var(--glass-blur);
  border: 1px solid var(--neon-soft) !important;
  box-shadow: var(--glass-edge), 0 0 0 4px rgba(46, 230, 224, 0.06), 0 14px 32px -12px var(--neon-soft), 0 0 22px -6px var(--neon) !important;
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1), left 0.2s, bottom 0.2s, box-shadow 0.3s ease !important;
}
.call-dialer-btn::before {
  /* حلقهٔ نئونی چرخان دور دکمه */
  content: '';
  position: absolute;
  inset: -3px;
  border-radius: 50%;
  padding: 2px;
  background: conic-gradient(from 0deg, var(--neon), transparent 35%, transparent 60%, var(--neon));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  animation: ringSpin 3.5s linear infinite;
  pointer-events: none;
}
.cd-fab-pulse {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 2px solid var(--neon);
  opacity: 0;
  animation: fabPulse 3s ease-out infinite;
  pointer-events: none;
}
@keyframes fabPulse {
  0% { transform: scale(1); opacity: 0.6; }
  70%, 100% { transform: scale(1.7); opacity: 0; }
}
.cd-fab-ic {
  width: 32px;
  height: 32px;
  filter: drop-shadow(0 5px 6px rgba(0, 0, 0, 0.4));
  transition: transform 0.45s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.25s ease;
}
.cd-fab-close {
  position: absolute;
  width: 22px;
  height: 22px;
  color: var(--neon);
  opacity: 0;
  transform: rotate(-90deg) scale(0.4);
  transition: transform 0.45s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.25s ease;
  filter: drop-shadow(0 0 6px var(--neon-soft));
}
.call-dialer-btn:hover { transform: translateY(-3px) scale(1.06); filter: none; }
.call-dialer-btn:hover .cd-fab-ic { animation: phoneRing 0.9s ease-in-out; }
@keyframes phoneRing {
  0%, 100% { transform: rotate(0); }
  15%, 45%, 75% { transform: rotate(-16deg); }
  30%, 60% { transform: rotate(16deg); }
}
.call-dialer-btn.open .cd-fab-ic { opacity: 0; transform: rotate(90deg) scale(0.4); animation: none; }
.call-dialer-btn.open .cd-fab-close { opacity: 1; transform: none; }
.call-dialer-btn.open .cd-fab-pulse { animation: none; }
.call-dialer-panel { border-radius: 20px; animation: modal3dIn 0.32s cubic-bezier(0.2, 0.9, 0.25, 1.05); transform-origin: 0% 100%; }

/* ===================== صفحهٔ ورود شیشه‌ای ===================== */
.auth-wrap {
  position: relative;
  overflow: hidden;
  background: var(--bg-image) center bottom / cover no-repeat fixed, var(--bg) !important;
}
.auth-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(40px);
  opacity: 0.55;
  pointer-events: none;
  animation: orbDrift 14s ease-in-out infinite alternate;
}
.auth-orb-1 { width: 340px; height: 340px; background: var(--neon); top: 12%; right: 18%; opacity: 0.22; }
.auth-orb-2 { width: 260px; height: 260px; background: var(--primary); bottom: 14%; left: 16%; opacity: 0.3; animation-duration: 18s; }
@keyframes orbDrift {
  from { transform: translate(0, 0) scale(1); }
  to { transform: translate(-60px, 40px) scale(1.15); }
}
.auth-theme-toggle { position: absolute; top: 18px; left: 18px; width: auto; margin: 0; z-index: 2; }
.auth-card {
  position: relative;
  max-width: 400px;
  padding: 40px 34px 34px;
  border-radius: 28px;
  text-align: center;
  background: linear-gradient(155deg, rgba(255, 255, 255, 0.16), rgba(255, 255, 255, 0.04)) !important;
  -webkit-backdrop-filter: blur(26px) saturate(170%);
  backdrop-filter: blur(26px) saturate(170%);
  border: 1px solid rgba(255, 255, 255, 0.22) !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35), 0 30px 80px -20px rgba(0, 0, 0, 0.55), 0 0 60px -20px var(--neon-soft) !important;
  animation: authIn 0.8s cubic-bezier(0.2, 0.9, 0.25, 1.05) both;
}
:root[data-theme='light'] .auth-card {
  background: linear-gradient(155deg, rgba(255, 255, 255, 0.72), rgba(255, 255, 255, 0.38)) !important;
  border-color: rgba(255, 255, 255, 0.85) !important;
  box-shadow: inset 0 1px 0 #fff, 0 30px 70px -24px rgba(16, 90, 88, 0.4), 0 0 60px -24px var(--neon-soft) !important;
}
/* لبهٔ نئونی متحرک دور کارت */
.auth-card::before {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  padding: 1.5px;
  background: conic-gradient(from var(--auth-angle, 0deg), transparent 0deg, var(--neon) 40deg, transparent 100deg, transparent 220deg, var(--primary) 260deg, transparent 320deg);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  animation: authBorder 6s linear infinite;
  pointer-events: none;
}
@property --auth-angle { syntax: '<angle>'; initial-value: 0deg; inherits: false; }
@keyframes authBorder { to { --auth-angle: 360deg; } }
@keyframes authIn {
  from { opacity: 0; transform: perspective(1000px) rotateX(10deg) translateY(30px) scale(0.96); filter: blur(6px); }
  to { opacity: 1; transform: none; filter: none; }
}
.auth-logo-wrap {
  width: 84px;
  height: 84px;
  margin: 0 auto 14px;
  border-radius: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(150deg, rgba(255, 255, 255, 0.95), rgba(220, 245, 243, 0.85));
  box-shadow: inset 0 1px 0 #fff, 0 14px 30px -10px rgba(0, 0, 0, 0.45), 0 0 30px -6px var(--neon-soft);
  animation: icoFloat 5s ease-in-out infinite;
}
.auth-logo-wrap .auth-logo-img { width: 60px; height: 60px; margin: 0; }
.auth-card h1 { font-size: 24px; font-weight: 800; color: var(--text); }
.auth-card p.sub { color: var(--muted); }
.auth-field { text-align: right; }
.auth-input { position: relative; display: flex; align-items: center; }
.auth-input-ic {
  position: absolute;
  inset-inline-start: 12px;
  width: 19px;
  height: 19px;
  color: var(--muted);
  pointer-events: none;
  transition: color 0.2s ease, transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.auth-input:focus-within .auth-input-ic { color: var(--neon); transform: scale(1.12); }
.auth-card .auth-input input {
  padding-inline-start: 40px;
  height: 46px;
  border-radius: 14px;
  background: var(--input-bg);
  border: 1px solid var(--border-strong);
}
.auth-card .auth-input input[type='password'],
.auth-card .auth-input #login-password { padding-inline-end: 42px; }
.auth-card .auth-input input:focus { box-shadow: 0 0 0 3px var(--neon-soft), 0 0 22px -6px var(--neon) !important; border-color: var(--neon) !important; }
.auth-eye {
  position: absolute;
  inset-inline-end: 8px;
  width: 30px;
  height: 30px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.auth-eye svg { width: 19px; height: 19px; }
.auth-eye:hover,
.auth-eye.on { color: var(--neon); }
.auth-submit {
  position: relative;
  overflow: hidden;
  height: 48px;
  margin-top: 6px;
  border-radius: 14px !important;
  font-size: 16.5px;
  background: linear-gradient(120deg, var(--primary), var(--neon), var(--primary)) !important;
  background-size: 200% 100% !important;
  box-shadow: 0 12px 30px -10px var(--neon-soft), inset 0 1px 0 rgba(255, 255, 255, 0.35) !important;
  transition: background-position 0.6s ease, transform 0.2s ease !important;
}
.auth-submit:hover { background-position: 100% 0 !important; transform: translateY(-1px); }
.auth-submit::after {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  width: 40%;
  left: -60%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.45), transparent);
  transform: skewX(-20deg);
  animation: shine 3.6s ease-in-out infinite;
}
@keyframes shine {
  0%, 60% { left: -60%; }
  100% { left: 130%; }
}
@media (max-width: 480px) {
  .auth-card { padding: 30px 20px 24px; }
  .auth-theme-toggle .tt-label { display: none; }
}

/* ===================== رمز انتقال بانکی ===================== */
.otp-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 14px; }
.otp-list > .empty-state,
.otp-list > p { grid-column: 1 / -1; }
.otp-card { border-radius: 18px; padding: 14px 16px; transition: opacity 0.4s ease, transform 0.25s ease, border-color 0.3s; animation: page3dIn 0.4s both; }
.otp-card-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); margin-bottom: 8px; }
.otp-sender { font-weight: 700; color: var(--text); direction: ltr; unicode-bidi: plaintext; }
.otp-code-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 8px; }
.otp-code {
  font-family: 'Vazirmatn', ui-monospace, monospace;
  font-size: 30px;
  font-weight: 800;
  letter-spacing: 0.18em;
  color: var(--text);
  user-select: all;
}
.otp-card.is-fresh { border-color: var(--neon-soft); box-shadow: var(--glass-edge), 0 0 0 1px var(--neon-soft), 0 14px 34px -16px var(--neon-soft); }
.otp-card.is-fresh .otp-code { color: var(--neon); text-shadow: 0 0 18px var(--neon-soft); }
.otp-card.is-fresh .otp-age { color: var(--success); font-weight: 700; }
.otp-card.is-stale { opacity: 0.6; }
.otp-card.is-stale .otp-code { text-decoration: line-through; text-decoration-color: var(--muted); text-decoration-thickness: 1px; }
.otp-amount { font-size: 14px; margin-bottom: 8px; }
.otp-sms {
  white-space: pre-wrap;
  font-size: 13px;
  line-height: 1.8;
  color: var(--muted);
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 14px 14px 14px 4px;
  padding: 8px 12px;
}
.otp-time { font-size: 12px; color: var(--muted); margin-top: 6px; text-align: left; }

@media (prefers-reduced-motion: reduce) {
  .sidebar::after, .profile-avatar-ring, .profile-avatar-ring .avatar, .call-dialer-btn::before, .cd-fab-pulse, .auth-orb, .auth-card::before, .auth-submit::after { animation: none !important; }
}

/* بنر پیشنهاد فعال‌سازی اعلان‌ها هم شیشه‌ای */
.push-subscribe-banner {
  background: var(--glass-solid) !important;
  color: var(--text) !important;
  -webkit-backdrop-filter: var(--glass-blur);
  backdrop-filter: var(--glass-blur);
  border: 1px solid var(--border-strong);
  box-shadow: var(--glass-edge), 0 18px 40px -16px rgba(0, 0, 0, 0.5);
}

/* ===================== لوگوی پارت مارکت (فاز ۸۵) ===================== */
.logo-on-dark { display: none; }
:root[data-theme='dark'] .logo-on-dark { display: block; }
:root[data-theme='dark'] .logo-on-light { display: none; }
.brand-logos { display: flex; align-items: center; min-width: 0; }
.brand-wordmark { height: 46px; width: auto; max-width: 150px; object-fit: contain; filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.25)); }
.brand-mark { display: none; height: 34px; width: auto; filter: drop-shadow(0 3px 6px rgba(0, 0, 0, 0.3)); }
@media (min-width: 761px) {
  html.sidebar-collapsed .brand-wordmark { display: none !important; }
  html.sidebar-collapsed .brand-mark { display: block; height: 30px; max-width: 54px; }
}
@media (max-width: 760px) {
  .brand-wordmark { height: 30px; max-width: 100px; }
}
.auth-brand { margin: 0 auto 18px; display: flex; justify-content: center; animation: icoFloat 5s ease-in-out infinite; }
.auth-wordmark { width: 230px; max-width: 80%; height: auto; filter: drop-shadow(0 10px 20px rgba(0, 0, 0, 0.35)); }

/* =====================================================================================
   فاز ۸۶: پیاده‌سازی دقیق سه ویدئوی نمونه
   ۱) تم‌های رنگی (زمردی، سایبرپانک) روی پایهٔ تیره  ۲) سایدبار شناور «Sidebar v2»
   ۳) انتخابگر چهارحالتهٔ تم  ۴) فرم ورود شیشه‌ای دوبخشی «Glassy login form V2»
   ===================================================================================== */

/* ---------- ۱) تم‌های رنگی: فاز ۸۷ حذف شد (فقط تیره و روشن) ---------- */

/* ---------- ۲) سایدبار شناور ---------- */
.nav-search { display: none; }
@media (min-width: 761px) {
  .sidebar {
    margin: 12px;
    margin-inline-end: 0;
    height: calc(100vh - 32px - 24px);
    border-radius: 24px;
    border: 1px solid var(--side-line) !important;
    overflow: visible;
    padding: 18px 14px 14px;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06), 0 24px 60px -20px rgba(0, 0, 0, 0.7) !important;
  }
  :root[data-theme='light'] .sidebar { box-shadow: inset 0 1px 0 #fff, 0 24px 50px -24px rgba(16, 80, 78, 0.35) !important; }
  .sidebar::before { border-radius: inherit; }
  .sidebar::after { display: none; }
  .sidebar .brand { padding: 0 6px 16px; }
  .nav-search {
    display: flex;
    align-items: center;
    gap: 9px;
    height: 42px;
    padding: 0 12px;
    margin-bottom: 16px;
    border-radius: 13px;
    cursor: text;
    color: var(--side-muted);
    background: var(--side-hover);
    border: 1px solid var(--side-line);
    box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.18);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
  }
  .nav-search svg { width: 17px; height: 17px; flex-shrink: 0; }
  .nav-search input {
    flex: 1;
    min-width: 0;
    border: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    padding: 0;
    font: inherit;
    font-size: 14px;
    color: var(--side-strong);
    outline: none;
  }
  .nav-search input::-webkit-search-cancel-button { filter: grayscale(1); }
  .nav-search:focus-within { border-color: var(--neon-soft); box-shadow: 0 0 0 3px var(--neon-soft); color: var(--neon); }
  #nav-items {
    flex: 1 1 auto;
    min-height: 120px;
    overflow-y: auto;
    overflow-x: hidden;
    margin-inline: -14px;
    padding-inline: 14px;
    scrollbar-width: none;
  }
  #nav-items::-webkit-scrollbar { display: none; }
  .nav-item { border-radius: 12px; }
  /* نشانگر: نوار نورانی روی لبهٔ پنل + نور افقی که به داخل گزینه پخش می‌شود (مثل ویدئو) */
  .nav-glider {
    inset-inline-start: 0;
    inset-inline-end: 14px;
    border: 0;
    border-radius: 12px;
    border-start-start-radius: 0;
    border-end-start-radius: 0;
    background:
      radial-gradient(70px 40px at 100% 50%, var(--neon-soft), transparent 80%),
      linear-gradient(to left, var(--neon-soft), rgba(255, 255, 255, 0.03) 60%, transparent 95%);
    box-shadow: none;
  }
  .nav-glider::after {
    top: 22%;
    bottom: 22%;
    inset-inline-start: 0;
    width: 4px;
    border-radius: 4px 0 0 4px;
    background: var(--neon);
    box-shadow: 0 0 10px var(--neon), 0 0 22px var(--neon), 0 0 36px var(--neon-soft);
  }
  .nav-item.active .nav-label { text-shadow: 0 0 18px var(--neon-soft); }
  .nav-group-children { margin-inline-start: 22px; }
  .nav-subitem { font-size: 13.5px; }
  html.sidebar-collapsed .sidebar { width: 80px; padding-inline: 12px; }
  html.sidebar-collapsed #nav-items { margin-inline: -12px; padding-inline: 12px; }
  html.sidebar-collapsed .nav-glider { inset-inline-end: 12px; }
  html.sidebar-collapsed .nav-search { width: 44px; height: 44px; padding: 0; justify-content: center; margin-inline: auto; cursor: pointer; }
  html.sidebar-collapsed .nav-search input { display: none; }
  html.sidebar-collapsed .nav-search svg { width: 19px; height: 19px; }
  html.sidebar-collapsed .brand { padding-inline: 0; align-items: center; }
}
.nav-filtered .nav-group-chevron { visibility: hidden; }

/* ---------- ۳) انتخابگر چهارحالتهٔ تم ---------- */
.theme-tray { display: flex; flex-direction: column; gap: 7px; margin-bottom: 10px; }
.theme-tray-btns .tt-btn { flex: 1; }
.theme-tray-label {
  text-align: center;
  font-size: 12px;
  font-weight: 800;
  color: var(--neon);
  text-shadow: 0 0 12px var(--neon-soft);
  transition: color 0.4s ease;
}
.theme-tray-btns {
  display: flex;
  gap: 7px;
  padding: 6px;
  border-radius: 17px;
  background: var(--side-hover);
  box-shadow: inset 3px 3px 7px rgba(0, 0, 0, 0.38), inset -2px -2px 6px rgba(255, 255, 255, 0.045);
}
:root[data-theme='light'] .theme-tray-btns { background: rgba(225, 238, 237, 0.7); box-shadow: inset 3px 3px 7px rgba(16, 80, 78, 0.16), inset -3px -3px 7px rgba(255, 255, 255, 0.95); }
.tt-btn {
  --c: #2ee6e0;
  position: relative;
  flex: 1;
  height: 38px;
  min-width: 34px;
  border: 0;
  border-radius: 12px;
  cursor: pointer;
  color: var(--side-muted);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.01));
  box-shadow: 3px 3px 8px rgba(0, 0, 0, 0.4), -2px -2px 6px rgba(255, 255, 255, 0.05);
  transition: color 0.3s ease, box-shadow 0.35s ease, transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}
:root[data-theme='light'] .tt-btn { background: linear-gradient(145deg, #ffffff, #e8f1f0); box-shadow: 4px 4px 9px rgba(16, 80, 78, 0.16), -4px -4px 9px #ffffff; }
.tt-btn svg { width: 18px; height: 18px; transition: transform 0.45s cubic-bezier(0.34, 1.56, 0.64, 1), filter 0.3s ease; }
.tt-btn:hover { color: var(--c); transform: translateY(-2px); }
.tt-btn:hover svg { transform: rotate(-12deg) scale(1.1); }
.tt-btn.active {
  color: var(--c);
  transform: none;
  box-shadow: inset 2px 2px 6px rgba(0, 0, 0, 0.45), inset -1px -1px 3px rgba(255, 255, 255, 0.05), 0 0 0 1.5px var(--c), 0 0 16px -3px var(--c);
}
:root[data-theme='light'] .tt-btn.active { box-shadow: inset 2px 2px 5px rgba(16, 80, 78, 0.18), inset -2px -2px 5px #fff, 0 0 0 1.5px var(--c), 0 0 16px -4px var(--c); }
.tt-btn.active svg { filter: drop-shadow(0 0 6px var(--c)); animation: ttPop 0.5s cubic-bezier(0.34, 1.56, 0.64, 1); }
@keyframes ttPop {
  0% { transform: scale(0.6) rotate(-30deg); }
  100% { transform: none; }
}
.tt-light { --c: #f5a524; }
.tt-dark { --c: #2ee6e0; }
/* برچسب رنگی زیر دکمه هنگام هاور */
.tt-btn::after {
  content: attr(data-tip);
  position: absolute;
  top: calc(100% + 7px);
  left: 50%;
  z-index: 20;
  padding: 2px 9px;
  border-radius: 7px;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
  color: #fff;
  background: var(--c);
  box-shadow: 0 6px 14px -4px var(--c);
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, -4px) scale(0.85);
  transition: opacity 0.2s ease, transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.tt-btn::after { color: #062221; }
.tt-btn:hover::after,
.tt-btn:focus-visible::after { opacity: 1; transform: translate(-50%, 0) scale(1); }
/* ---------- ۴) فرم ورود شیشه‌ای دوبخشی ---------- */
.auth-wrap { background: transparent !important; padding: 24px; }
.auth-theme-tray { position: absolute; top: 18px; left: 18px; width: 120px; margin: 0; z-index: 3; }
.auth-card.auth-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  width: 100%;
  max-width: 820px;
  min-height: 460px;
  padding: 0;
  overflow: hidden;
  text-align: right;
  border-radius: 26px;
  background: linear-gradient(140deg, rgba(255, 255, 255, 0.11), rgba(255, 255, 255, 0.03)) !important;
  -webkit-backdrop-filter: blur(34px) saturate(130%);
  backdrop-filter: blur(34px) saturate(130%);
  border: 1px solid rgba(255, 255, 255, 0.16) !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 40px 90px -30px rgba(0, 0, 0, 0.75) !important;
}
:root[data-theme='light'] .auth-card.auth-split {
  background: linear-gradient(140deg, rgba(255, 255, 255, 0.72), rgba(255, 255, 255, 0.45)) !important;
  border-color: rgba(255, 255, 255, 0.9) !important;
  box-shadow: inset 0 1px 0 #fff, 0 40px 80px -34px rgba(16, 90, 88, 0.45) !important;
}
.auth-card.auth-split::before { display: none; }
.auth-pane {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 44px 42px;
  transition: transform 0.85s cubic-bezier(0.7, 0, 0.2, 1), clip-path 0.85s cubic-bezier(0.7, 0, 0.2, 1);
}
.auth-pane-form { z-index: 2; }
.auth-pane-form .auth-brand { justify-content: flex-start; margin: 0 0 18px; animation: none; }
.auth-pane-form .auth-wordmark { width: 170px; max-width: 70%; }
.auth-split h1 { font-size: 26px; font-weight: 800; margin: 0 0 18px; color: var(--text); }
/* پنل خوشامد: شیشهٔ روشن‌تر با لبهٔ مورب */
.auth-pane-hello {
  color: #fff;
  background: linear-gradient(150deg, rgba(255, 255, 255, 0.14), rgba(255, 255, 255, 0.04));
  clip-path: polygon(0 0, 100% 0, 86% 100%, 0 100%);
  padding-inline-end: 64px;
}
:root[data-theme='light'] .auth-pane-hello { color: var(--text); background: linear-gradient(150deg, rgba(255, 255, 255, 0.85), rgba(225, 245, 243, 0.55)); }
.auth-split.swapped .auth-pane-form { transform: translateX(-100%); }
.auth-split.swapped .auth-pane-hello { transform: translateX(100%); clip-path: polygon(14% 0, 100% 0, 100% 100%, 0 100%); padding-inline-end: 42px; padding-inline-start: 64px; }
.auth-hello { position: absolute; inset-inline: 42px 64px; top: 50%; transform: translateY(-50%); transition: opacity 0.45s ease 0.25s, transform 0.6s cubic-bezier(0.2, 0.8, 0.2, 1) 0.2s; }
.auth-split.swapped .auth-hello { inset-inline: 64px 42px; }
.auth-hello h2 { font-size: 32px; line-height: 1.35; font-weight: 900; margin: 0 0 12px; }
.auth-hello p { font-size: 14px; line-height: 1.9; opacity: 0.78; margin: 0 0 22px; }
.auth-hello-help { opacity: 0; transform: translate(-30px, -50%); pointer-events: none; }
.auth-split.swapped .auth-hello-welcome { opacity: 0; transform: translate(30px, -50%); pointer-events: none; transition-delay: 0s; }
.auth-split.swapped .auth-hello-help { opacity: 1; transform: translateY(-50%); pointer-events: auto; }
/* فیلدهای خط‌زیرین با آیکن */
.auth-split .auth-field { margin-bottom: 18px; }
.auth-split .auth-input { position: relative; }
.auth-split .auth-input::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--neon), transparent);
  transform: scaleX(0);
  transition: transform 0.4s ease;
}
.auth-split .auth-input:focus-within::after { transform: scaleX(1); }
.auth-split .auth-input-ic { inset-inline-start: 2px; right: 2px; left: auto; width: 18px; height: 18px; }
.auth-split .auth-input input {
  width: 100%;
  height: 46px;
  padding: 0 30px 0 36px !important;
  border: 0 !important;
  border-bottom: 1.5px solid var(--border-strong) !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  color: var(--text);
  font-size: 15px;
}
.auth-split .auth-input input#login-email::placeholder { text-align: right; }
.auth-split .auth-input input:focus { box-shadow: none !important; }
.auth-split .auth-eye { inset-inline-end: auto; left: 0; right: auto; }
.auth-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  align-self: flex-start;
  height: 42px;
  padding: 0 24px;
  border-radius: 999px;
  font: inherit;
  font-size: 14.5px;
  font-weight: 700;
  cursor: pointer;
  color: inherit;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.35);
  transition: background 0.25s ease, transform 0.2s ease, box-shadow 0.25s ease;
}
:root[data-theme='light'] .auth-pill { border-color: var(--border-strong); background: rgba(255, 255, 255, 0.6); }
.auth-pill:hover { background: rgba(255, 255, 255, 0.16); transform: translateY(-1px); box-shadow: 0 10px 24px -12px rgba(0, 0, 0, 0.6); }
.auth-pill-solid.auth-submit {
  width: 100%;
  height: 46px;
  margin-top: 8px;
  color: #fff;
  border: 0;
  border-radius: 999px !important;
  background: linear-gradient(120deg, var(--primary), var(--neon), var(--primary)) !important;
  background-size: 200% 100% !important;
}
.auth-link {
  align-self: center;
  margin-top: 16px;
  padding: 4px;
  border: 0;
  background: none;
  cursor: pointer;
  font: inherit;
  font-size: 13px;
  color: var(--muted);
  text-decoration: underline;
  text-underline-offset: 4px;
}
.auth-link:hover { color: var(--neon); }
.auth-split .error-box { margin-bottom: 12px; }
@media (max-width: 760px) {
  .auth-card.auth-split { grid-template-columns: 1fr; max-width: 420px; min-height: 0; }
  .auth-pane-hello { order: -1; clip-path: none !important; padding: 26px 26px 20px !important; min-height: 190px; }
  .auth-pane-form { padding: 26px; }
  .auth-split.swapped .auth-pane-form,
  .auth-split.swapped .auth-pane-hello { transform: none; }
  .auth-hello,
  .auth-split.swapped .auth-hello { inset-inline: 26px; }
  .auth-hello h2 { font-size: 24px; }
  .auth-theme-tray { position: static; width: 140px; margin: 0 auto 14px; }
  .auth-wrap { flex-direction: column; }
}
@media (max-width: 760px) {
  .auth-hello { position: static; transform: none !important; }
  .auth-hello-help,
  .auth-split.swapped .auth-hello-welcome { display: none; }
  .auth-split.swapped .auth-hello-help { display: block; }
  .auth-pane-hello { min-height: 0; }
}
/* منوی کناری: محو شدن پایین فهرست وقتی گزینه‌های بیشتری با اسکرول دیده می‌شوند */
@media (min-width: 761px) {
  #nav-items { -webkit-mask-image: linear-gradient(to bottom, #000 calc(100% - 26px), transparent); mask-image: linear-gradient(to bottom, #000 calc(100% - 26px), transparent); padding-bottom: 18px; }
}

/* =====================================================================================
   فاز ۸۷: ردیف دکمه‌های پایین سایدبار — از راست: جمع/باز، تم تیره، تم روشن، پروفایل
   ===================================================================================== */
.sb-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 2px 12px;
  margin-top: auto;
  border-top: 1px solid var(--side-line);
}
.sb-actions .sb-act {
  flex: 1 1 0;
  height: 42px;
  min-width: 0;
  padding: 0;
  font: inherit;
}
.sb-actions .sidebar-collapse-btn { --c: var(--neon); }
.sb-actions .sidebar-collapse-btn svg { transition: transform 0.45s cubic-bezier(0.65, 0, 0.25, 1); }
.sb-actions .user-menu-trigger { --c: var(--neon); width: auto; border-radius: 12px; }
.sb-actions .user-menu-trigger:hover { background: linear-gradient(145deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.01)); }
:root[data-theme='light'] .sb-actions .user-menu-trigger:hover { background: linear-gradient(145deg, #ffffff, #e8f1f0); }
.sb-actions .user-menu-trigger.open-state,
.sb-actions:has(.user-menu-dropdown.open) .user-menu-trigger {
  box-shadow: inset 2px 2px 6px rgba(0, 0, 0, 0.35), 0 0 0 1.5px var(--neon), 0 0 16px -3px var(--neon);
}
.sb-actions .user-menu-trigger .profile-avatar-ring { padding: 2px; }
.sb-actions .user-menu-trigger .avatar { width: 28px; height: 28px; font-size: 12px; }
/* برچسب هاور بالای دکمه */
.sb-actions .tt-btn::after { top: auto; bottom: calc(100% + 8px); }
/* پنجرهٔ پروفایل: بالای ردیف، شیشهٔ پررنگ */
.sb-actions .user-menu-dropdown {
  left: 0;
  right: 0;
  bottom: calc(100% + 8px);
  padding: 10px;
  border-radius: 18px;
  box-shadow: 0 24px 50px -16px rgba(0, 0, 0, 0.55);
}
.user-menu-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 4px 4px 12px;
  margin-bottom: 6px;
  border-bottom: 1px solid var(--border);
}
.user-menu-head .avatar { width: 40px; height: 40px; font-size: 16px; }
.user-menu-head .name { font-weight: 800; font-size: 14.5px; color: var(--text); }
.user-menu-head .role { font-size: 12.5px; color: var(--muted); }
@media (min-width: 761px) {
  html.sidebar-collapsed .sb-actions { flex-direction: column; gap: 7px; padding-inline: 0; }
  html.sidebar-collapsed .sb-actions .sb-act { flex: none; width: 46px; height: 40px; }
  html.sidebar-collapsed .sb-actions .sidebar-collapse-btn svg { transform: scaleX(-1); }
  html.sidebar-collapsed .sb-actions .tt-btn::after { bottom: auto; top: 50%; left: auto; right: calc(100% + 10px); transform: translateY(-50%) scale(0.85); }
  html.sidebar-collapsed .sb-actions .tt-btn:hover::after { transform: translateY(-50%) scale(1); }
  /* در حالت جمع‌شده پنجرهٔ پروفایل بیرون پنل (سمت چپ) باز می‌شود */
  html.sidebar-collapsed .sb-actions .user-menu-dropdown { left: auto; right: calc(100% + 16px); bottom: 0; width: 250px; transform-origin: 100% 100%; }
}
@media (max-width: 760px) {
  .sb-actions { display: none !important; }
  .mobile-theme-tray { margin: 10px 0; }
}
@media (min-width: 761px) { html.sidebar-collapsed .user-menu-head .user-chip-text { display: block; } }
/* فاز ۸۷: نوار عنوان صفحه بالاتر از محتوا تا پنل‌های بازشوی آن (مثل «آخرین درخواست‌های داخلی») زیر ستون‌های کانبان نروند */
.main > .topbar,
.topbar { position: relative; z-index: 60; }
/* سرعت: تاری تو در تو اثری ندارد (فقط پردازش اضافه) — جدول داخل پنل و هدر جدول بدون تاری جداگانه */
.panel .table-wrap { -webkit-backdrop-filter: none; backdrop-filter: none; background: transparent; box-shadow: none; }
.panel .panel { -webkit-backdrop-filter: none; backdrop-filter: none; background: var(--surface-2); }
thead th { -webkit-backdrop-filter: none; backdrop-filter: none; }

/* =====================================================================================
   فاز ۸۷: پیام‌رسان داخلی خواناتر (متن‌ها بزرگ‌تر) و حباب‌ها/باکس‌ها با شیشهٔ مات یکدست
   ===================================================================================== */
.chat-tab { font-size: 14.5px; padding: 8px 6px; }
.chat-channels-title { font-size: 13.5px; }
.chat-channel-btn { font-size: 15px; padding: 9px 11px; }
.chat-pv-preview { font-size: 12.5px; }
.chat-pv-avatar .avatar { width: 24px; height: 24px; font-size: 11px; }
.chat-channels .btn-sm { font-size: 13.5px; padding: 7px 10px; }
.chat-main-head { font-size: 16.5px; padding: 11px 16px; }
.chat-main-head .btn-sm { font-size: 13.5px; }
.chat-msg-sender { font-size: 14px; }
.chat-msg-body { font-size: 16px; line-height: 1.75; }
.chat-msg-time { font-size: 11.5px; }
.chat-msg-edited { font-size: 11px; }
.chat-msg-tick { font-size: 12px; }
.chat-msg-reply-quote { font-size: 13.5px; padding: 4px 9px; }
.chat-msg-referred { font-size: 13px; }
.chat-msg-deleted-text { font-size: 14.5px; }
.chat-msg-file-name { font-size: 14.5px; }
.chat-msg-context-item { font-size: 14.5px; }
.chat-input-row textarea { font-size: 15.5px; height: 46px; max-height: 46px; padding: 10px 14px; border-radius: 23px; }
.chat-reply-preview-text { font-size: 13.5px; }
.chat-typing { font-size: 13.5px; }
.chat-day-divider span { font-size: 12.5px; }
.chat-msg-bubble { padding: 7px 12px 5px; max-width: min(72%, 600px); }
.chat-summary-msg-line { font-size: 14.5px; }
.chat-summary-time { font-size: 12px; }
.chat-search-result-meta, .chat-activity-log-meta { font-size: 13px; }
.chat-activity-log-desc { font-size: 14.5px; }
/* حباب‌ها روی شیشهٔ پنل: پررنگ‌تر و یکدست با لبهٔ نازک؛ پیام خودم با ته‌رنگ نئون تم */
.chat-msg-bubble { background: var(--glass-solid); border: 1px solid var(--border); box-shadow: 0 4px 12px -8px rgba(0, 0, 0, 0.45); }
.chat-msg.mine .chat-msg-bubble { background: color-mix(in srgb, var(--neon) 16%, var(--glass-solid)); border-color: var(--neon-soft); }
.chat-main-head,
.chat-composer,
.chat-reply-preview,
.chat-attachment-preview { background: var(--surface-2); }
.chat-messages { background-color: transparent; }
.chat-messages > .empty-state { background: var(--glass-solid); }
@media (max-width: 760px) {
  .chat-msg-body { font-size: 15.5px; }
  .chat-msg-bubble { max-width: 86%; }
}
/* نوار حضور پایین: رنگ متن از توکن‌های تم (در تم روشن، متن روشن قبلی روی شیشهٔ روشن محو می‌شد) */
.presence-bar { color: var(--side-text) !important; }
.presence-bar-copyright { color: var(--side-muted); border-inline-start-color: var(--side-line); }
.presence-bar-version { color: var(--side-strong); }
/* انیمیشن ورود صفحه پس از پایان، transform باقی نگذارد (وگرنه هر بخش لایهٔ جدا می‌شود و منوهای بازشو زیر بخش بعدی می‌روند) */
.main > * { animation-fill-mode: backwards; }
/* آواتار حرف اول (کاربر بی‌عکس): رنگ پررنگ تا در هر دو تم دیده شود */
.avatar { background: linear-gradient(135deg, var(--neon), var(--primary)); color: #04201f; font-weight: 800; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.chat-day-divider span { background: var(--glass-solid); color: var(--text); border: 1px solid var(--border); backdrop-filter: none; }
/* موبایل: سایدبار شیشه‌ای (backdrop-filter) والد منوی ⋮ است و با overflow آن را می‌برید — منو کامل دیده شود */
@media (max-width: 760px) {
  .sidebar { overflow: visible !important; position: relative; z-index: 200; }
  .mobile-menu-dropdown { max-height: calc(100vh - 90px); overflow-y: auto; }
}

/* =====================================================================================
   فاز ۸۸: پیام صوتی مثل تلگرام (js/voiceplayer.js)
   ===================================================================================== */
.tg-voice {
  --vc: var(--neon);
  direction: ltr;
  display: flex;
  align-items: center;
  gap: 11px;
  min-width: 230px;
  max-width: 300px;
  padding: 3px 2px 2px;
  user-select: none;
  -webkit-user-select: none;
}
.chat-msg.mine .tg-voice { --vc: var(--primary); }
:root[data-theme='dark'] .chat-msg.mine .tg-voice { --vc: #7ff3ee; }
.tg-voice-play {
  position: relative;
  flex: 0 0 auto;
  width: 46px;
  height: 46px;
  border: 0;
  border-radius: 50%;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  background: var(--vc);
  box-shadow: 0 6px 16px -8px var(--vc);
  transition: transform 0.18s cubic-bezier(0.34, 1.56, 0.64, 1), filter 0.2s ease;
}
:root[data-theme='dark'] .tg-voice-play { color: #04201f; }
.tg-voice-play:hover { filter: brightness(1.08); }
.tg-voice-play:active { transform: scale(0.92); }
.tg-voice-play svg { width: 22px; height: 22px; fill: currentColor; position: absolute; transition: opacity 0.18s ease, transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1); }
.tg-ic-play { transform: translateX(1.5px); }
.tg-ic-pause { opacity: 0; transform: scale(0.4) rotate(-90deg); }
.tg-voice.is-playing .tg-ic-play { opacity: 0; transform: scale(0.4) rotate(90deg); }
.tg-voice.is-playing .tg-ic-pause { opacity: 1; transform: none; }
/* حلقهٔ بارگذاری دور دکمه */
.tg-voice-spin { position: absolute; inset: -3px; border-radius: 50%; border: 2.5px solid transparent; border-top-color: var(--vc); opacity: 0; }
.tg-voice.is-loading .tg-voice-spin { opacity: 1; animation: tgSpin 0.8s linear infinite; }
@keyframes tgSpin { to { transform: rotate(360deg); } }
.tg-voice-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.tg-voice-wave { position: relative; height: 26px; cursor: pointer; touch-action: none; outline: none; border-radius: 4px; }
.tg-voice-wave:focus-visible { box-shadow: 0 0 0 2px var(--neon-soft); }
.tg-voice-bars { position: absolute; inset: 0; display: flex; align-items: center; gap: 2px; }
.tg-voice-bars i { flex: 1 1 0; min-width: 2px; max-width: 3.5px; border-radius: 3px; background: var(--vc); opacity: 0.32; }
/* لایهٔ پرشده تا نقطهٔ پخش (--p بین ۰ و ۱) */
.tg-voice-fill { clip-path: inset(0 calc((1 - var(--p)) * 100%) 0 0); }
.tg-voice-fill i { opacity: 1; }
.tg-voice-info { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--muted); line-height: 1; }
.tg-voice.is-active .tg-voice-time { color: var(--vc); font-weight: 700; }
.tg-voice-speed {
  margin-inline-start: auto;
  border: 0;
  cursor: pointer;
  font: inherit;
  font-size: 11.5px;
  font-weight: 800;
  padding: 3px 7px;
  border-radius: 9px;
  color: var(--vc);
  background: color-mix(in srgb, var(--vc) 16%, transparent);
  opacity: 0;
  transition: opacity 0.2s ease;
}
.tg-voice.is-active .tg-voice-speed,
.tg-voice:hover .tg-voice-speed { opacity: 1; }
.chat-msg-audio { margin: 2px 0 2px; }
.chat-msg-bubble:has(.tg-voice) { min-width: 250px; }
@media (max-width: 760px) {
  .tg-voice { min-width: 200px; }
  .tg-voice-speed { opacity: 1; }
}

/* ---------- فاز ۸۸: کادر نوشتن مثل تلگرام ---------- */
.chat-input-row { position: relative; align-items: center; }
.chat-composer:not(.has-text) #chat-send-btn { display: none; }
.chat-composer.has-text #chat-mic-btn { display: none; }
#chat-send-btn,
#chat-mic-btn {
  width: 46px !important;
  height: 46px !important;
  padding: 0 !important;
  border-radius: 50% !important;
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0 !important;
  color: #fff !important;
  background: linear-gradient(135deg, var(--neon), var(--primary)) !important;
  box-shadow: 0 8px 18px -10px var(--neon);
  animation: tgPop 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}
:root[data-theme='dark'] #chat-send-btn,
:root[data-theme='dark'] #chat-mic-btn { color: #04201f !important; }
#chat-send-btn svg { width: 22px; height: 22px; fill: currentColor; transform: scaleX(-1); }
#chat-mic-btn svg { width: 22px; height: 22px; fill: currentColor; }
@keyframes tgPop { from { transform: scale(0.5); opacity: 0; } to { transform: none; opacity: 1; } }
/* هنگام ضبط: دکمه بزرگ و قرمز با موج‌های تپنده، نوار ضبط روی کادر متن */
#chat-mic-btn.recording {
  z-index: 3;
  transform: scale(1.35);
  background: #e5484d !important;
  color: #fff !important;
  animation: none;
  box-shadow: 0 0 0 0 rgba(229, 72, 77, 0.5);
  animation: tgRecPulse 1.3s ease-out infinite;
}
@keyframes tgRecPulse {
  0% { box-shadow: 0 0 0 0 rgba(229, 72, 77, 0.45); }
  100% { box-shadow: 0 0 0 16px rgba(229, 72, 77, 0); }
}
.chat-rec-bar {
  display: none;
  position: absolute;
  inset: 0;
  z-index: 2;
  align-items: center;
  gap: 10px;
  padding-inline: 16px;
  border-radius: 23px;
  background: var(--glass-solid);
  border: 1px solid var(--border);
  font-size: 15px;
}
.chat-composer:has(#chat-mic-btn.recording) .chat-rec-bar { display: flex; }
.chat-rec-dot { width: 11px; height: 11px; border-radius: 50%; background: #e5484d; animation: tgBlink 1s ease-in-out infinite; }
@keyframes tgBlink { 50% { opacity: 0.2; } }
.chat-rec-bar .chat-mic-timer { position: static; transform: none; background: none; color: var(--text); font-size: 15px; font-weight: 700; padding: 0; direction: ltr; font-variant-numeric: tabular-nums; }
.chat-rec-hint { color: var(--muted); font-size: 13.5px; margin-inline-start: 6px; animation: tgHint 1.6s ease-in-out infinite; }
@keyframes tgHint { 50% { opacity: 0.5; } }
/* دنبالهٔ حباب (فقط آخرین پیام هر دسته) مثل تلگرام */
/* پیام خودم سمت راست، پیام دیگران سمت چپ (مثل تلگرام) */
.chat-msg { justify-content: flex-end; }
.chat-msg.mine { justify-content: flex-start; }
.chat-msg .chat-msg-bubble { border-radius: 16px; }
.chat-msg.mine .chat-msg-bubble { border-end-start-radius: 16px; }
.chat-msg:not(.mine) .chat-msg-bubble { border-end-end-radius: 16px; }
.chat-msg:not(:has(+ .chat-msg.grouped)) .chat-msg-bubble { position: relative; }
.chat-msg.mine:not(:has(+ .chat-msg.grouped)) .chat-msg-bubble { border-end-start-radius: 4px; }
.chat-msg:not(.mine):not(:has(+ .chat-msg.grouped)) .chat-msg-bubble { border-end-end-radius: 4px; }

/* فاز ۸۸: فیلتر بازهٔ زمانی پیامک‌های واریزی */
.sms-period-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; margin: 0 0 12px; }
.sms-period-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.sms-period-custom { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.sms-period-custom[hidden] { display: none; }
.sms-period-custom label { font-size: 13.5px; color: var(--muted); }
.sms-period-custom .jalali-date-field { width: 150px; }
.sms-period-summary { margin-inline-start: auto; font-size: 14px; }
.sms-period-summary b { color: var(--text); }
@media (max-width: 760px) {
  .sms-period-chips { flex-wrap: nowrap; overflow-x: auto; width: 100%; scrollbar-width: none; padding-bottom: 2px; }
  .sms-period-chips .btn { flex: 0 0 auto; }
  .sms-period-summary { margin-inline-start: 0; }
}
.chat-composer:has(#chat-mic-btn.recording) .chat-input-row > :not(#chat-mic-btn):not(.chat-rec-bar) { visibility: hidden; }

/* =====================================================================================
   فاز ۸۹: کشیدن‌ورهاکردن و حرکت روان کارت‌های کانبان (js/kanbanmotion.js)
   ===================================================================================== */
.main > .no-enter { animation: none !important; }
.deal-card { cursor: grab; -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
html.kanban-dragging, html.kanban-dragging * { cursor: grabbing !important; -webkit-user-select: none !important; user-select: none !important; }
#kanban-fly-layer { position: fixed; inset: 0; pointer-events: none; z-index: 900; }
.kanban-fly { position: fixed !important; margin: 0 !important; box-sizing: border-box; pointer-events: none; will-change: transform; transform-origin: 50% 50%; }
.kanban-fly.deal-card { background: var(--glass-solid) !important; }
.kanban-fly.is-dragging {
  box-shadow: 0 28px 50px -18px rgba(0, 0, 0, 0.6), 0 0 0 1.5px var(--neon), 0 0 26px -6px var(--neon) !important;
  transition: box-shadow 0.2s ease;
}
.kanban-fly.is-settling { box-shadow: 0 10px 22px -12px rgba(0, 0, 0, 0.5) !important; transition: box-shadow 0.4s ease; }
.kanban-fly.is-flying { box-shadow: 0 22px 40px -16px rgba(0, 0, 0, 0.55), 0 0 0 1px var(--neon-soft) !important; }
/* جای خالی کارتی که در حال کشیدن است */
.deal-card.drag-source { opacity: 0.28; border-style: dashed !important; box-shadow: none !important; transform: scale(0.98); transition: opacity 0.2s ease, transform 0.2s ease; }
.kanban-col { transition: box-shadow 0.25s ease, border-color 0.25s ease, background-color 0.25s ease; }
.kanban-col.drop-allowed { border-color: var(--neon) !important; box-shadow: inset 0 0 0 1.5px var(--neon), 0 0 28px -8px var(--neon) !important; }
.kanban-col.drop-denied { border-color: rgba(229, 72, 77, 0.6) !important; box-shadow: inset 0 0 0 1.5px rgba(229, 72, 77, 0.55) !important; }
.kanban-col.drop-denied .kanban-cards { opacity: 0.6; }
.deal-card.just-landed { animation: cardLand 0.6s cubic-bezier(0.22, 1, 0.36, 1); }
@keyframes cardLand {
  0% { box-shadow: 0 0 0 2px var(--neon), 0 0 24px -4px var(--neon); }
  100% { box-shadow: var(--glass-edge), 0 8px 18px -12px rgba(0, 0, 0, 0.5); }
}

/* فاز ۸۹ — دوربین داخل برنامه (CameraCapture.open) */
.cam-sheet {
  position: fixed; inset: 0; z-index: 5000; display: flex; flex-direction: column;
  background: rgba(2, 8, 12, 0.94); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  animation: camIn 0.2s ease-out;
}
.cam-sheet.closing { opacity: 0; transition: opacity 0.18s ease; }
@keyframes camIn { from { opacity: 0; transform: scale(0.98); } to { opacity: 1; transform: none; } }
.cam-stage { position: relative; flex: 1; min-height: 0; display: flex; align-items: center; justify-content: center; padding: 16px; }
.cam-video, .cam-shot { max-width: 100%; max-height: 100%; border-radius: 18px; box-shadow: 0 20px 60px -20px rgba(0, 0, 0, 0.8); background: #000; }
.cam-video.mirror { transform: scaleX(-1); }
.cam-msg { position: absolute; inset: auto 16px 50% 16px; transform: translateY(50%); text-align: center; color: #e6f4f4; font-size: 15px; line-height: 2; }
.cam-sheet.flash .cam-stage::after { content: ''; position: absolute; inset: 0; background: #fff; animation: camFlash 0.22s ease-out forwards; }
@keyframes camFlash { from { opacity: 0.85; } to { opacity: 0; } }
.cam-bar {
  display: flex; align-items: center; justify-content: center; gap: 22px; flex-wrap: wrap;
  padding: 16px 16px calc(18px + env(safe-area-inset-bottom));
}
.cam-btn {
  min-width: 48px; height: 48px; padding: 0 16px; border-radius: 999px; border: 1px solid rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.08); color: #fff; font: inherit; font-size: 15px; cursor: pointer;
}
.cam-btn.btn-primary { background: var(--neon, #2dd4bf); color: #04201c; border-color: transparent; font-weight: 700; }
.cam-msg .cam-btn { margin-top: 12px; }
.cam-shutter {
  width: 74px; height: 74px; border-radius: 50%; border: 4px solid #fff; background: transparent; padding: 5px; cursor: pointer;
}
.cam-shutter span { display: block; width: 100%; height: 100%; border-radius: 50%; background: #fff; transition: transform 0.12s ease; }
.cam-shutter:active span { transform: scale(0.88); }
.cam-shutter:disabled { opacity: 0.4; cursor: default; }
[hidden].cam-btn, .cam-shutter[hidden], .cam-video[hidden], .cam-shot[hidden], .cam-msg[hidden] { display: none !important; }
/* فاز ۸۹: برچسب هاور دکمه‌های پایین منوی جمع‌شده پشت جدول/کارت‌های صفحه می‌رفت (محتوای اصلی بعد از منو در DOM
   است و لایهٔ خودش را دارد) — منو یک لایه بالاتر از محتوا و پایین‌تر از مودال‌ها (۱۰۰) قرار می‌گیرد */
@media (min-width: 761px) { .sidebar { z-index: 80; } }
/* فاز ۸۹: پایان مهلت ۲۴ ساعتهٔ تایید حسابداری — آلارم قرمز چشمک‌زن دور کارت و دور شمارش معکوس */
.deal-card.deal-card-24h-expired,
.alarm-24h-expired {
  border-color: var(--danger) !important;
  animation: alarm24h 1.1s ease-in-out infinite;
}
@keyframes alarm24h {
  0%, 100% { box-shadow: 0 0 0 2px var(--danger), 0 0 22px -2px var(--danger); }
  50% { box-shadow: 0 0 0 1px transparent, 0 0 0 0 transparent; }
}
@media (prefers-reduced-motion: reduce) {
  .deal-card.deal-card-24h-expired, .alarm-24h-expired { animation: none; box-shadow: 0 0 0 2px var(--danger); }
}
/* فاز ۹۱: لیست‌های بازشوی جست‌وجو (دستیار قیمت، جست‌وجوی محصول، انتخابگر حساب، «دیده‌شده» پیام) با رنگ
   نیمه‌شفاف کارت ساخته شده بودند و متن زیرشان دیده می‌شد — شیشهٔ پررنگ و بالاتر از بخش‌های بعدی */
.pa-results,
.product-search-results,
.acc-select-panel,
.chat-seen-popover {
  background: var(--glass-solid) !important;
  -webkit-backdrop-filter: var(--glass-blur);
  backdrop-filter: var(--glass-blur);
  border: 1px solid var(--border-strong) !important;
  box-shadow: var(--shadow-pop) !important;
}
.pa-search-wrap { z-index: 40; }
.pa-results { z-index: 41; }
.pa-result { color: var(--text); }

/* فاز ۹۵: چیپ تلفن داخل مرورگر (softphone.js) — گوشهٔ پایین، بالای دکمهٔ شماره‌گیر */
.softphone-chip {
  position: fixed;
  left: 18px;
  bottom: 108px;
  z-index: 85;
  display: flex;
  align-items: center;
  gap: 8px;
  max-width: min(420px, calc(100vw - 36px));
  padding: 7px 12px;
  border-radius: 999px;
  background: var(--glass-solid);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--border-strong);
  box-shadow: var(--shadow);
  color: var(--text);
  font-size: 13px;
  line-height: 1.4;
}
.softphone-chip .sp-label { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.softphone-chip .sp-timer { font-variant-numeric: tabular-nums; margin-inline-start: 4px; color: var(--muted, inherit); }
.softphone-chip .sp-dot { width: 9px; height: 9px; border-radius: 50%; flex: none; background: #9aa5a3; }
.softphone-chip[data-state='registered'] .sp-dot { background: var(--success); }
.softphone-chip[data-state='connecting'] .sp-dot,
.softphone-chip[data-state='other-tab'] .sp-dot { background: #e0a526; }
.softphone-chip[data-state='failed'] .sp-dot { background: var(--danger); }
.softphone-chip[data-state='incall'] { border-color: var(--success); }
.softphone-chip[data-state='incall'] .sp-dot { background: var(--success); animation: sp-pulse 1.4s ease-in-out infinite; }
.softphone-chip[data-state='ringing'] { border-color: var(--neon); }
.softphone-chip[data-state='ringing'] .sp-dot { background: var(--neon); animation: sp-pulse 0.8s ease-in-out infinite; }
.softphone-chip .sp-btn {
  border: 1px solid var(--border-strong);
  background: var(--surface-2);
  color: inherit;
  border-radius: 999px;
  min-width: 32px;
  height: 30px;
  padding: 0 8px;
  cursor: pointer;
  font-size: 14px;
}
.softphone-chip .sp-btn:hover { background: var(--surface-3); }
.softphone-chip .sp-btn-ok { border-color: var(--success); }
.softphone-chip .sp-btn-danger { border-color: var(--danger); color: var(--danger); }
@keyframes sp-pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.35; } }
@media (max-width: 640px) {
  .softphone-chip { left: 12px; bottom: 92px; font-size: 12.5px; }
}
@media (prefers-reduced-motion: reduce) {
  .softphone-chip .sp-dot { animation: none !important; }
}
/* فاز ۹۷: وقتی پنجرهٔ تماس باز است، نشان تلفن کنار آن (نه زیر آن) دیده شود تا بی‌صدا/قطع در دسترس بماند */
body:has(#incoming-call-popup:not(.collapsed)) .softphone-chip:not(.in-sidebar) { left: 418px; }
@media (max-width: 760px) {
  body:has(#incoming-call-popup:not(.collapsed)) .softphone-chip:not(.in-sidebar) { left: 12px; bottom: 14px; z-index: 190; }
}

/* فاز ۹۹: نشان تلفن داخل سایدبار، درست بالای ردیف ۴ دکمهٔ پایین (جمع‌کردن، تم تیره، تم روشن، پروفایل) */
.softphone-chip.in-sidebar {
  position: static;
  width: 100%;
  max-width: none;
  margin: 0 0 8px;
  border-radius: 12px;
  box-shadow: none;
  background: var(--surface-2);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  font-size: 12.5px;
  flex-wrap: wrap;
}
.softphone-chip.in-sidebar .sp-label { flex: 1 1 auto; min-width: 0; white-space: normal; }
html.sidebar-collapsed .softphone-chip.in-sidebar { justify-content: center; padding: 7px 4px; gap: 4px; }
html.sidebar-collapsed .softphone-chip.in-sidebar .sp-label { display: none; }

/* فاز ۹۹: صفحه‌کلید حین مکالمه در پنجرهٔ تماس (DTMF به سانترال) */
.call-popup-keypad { margin: 8px 0 4px; padding: 10px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--border); }
.call-popup-keypad .cpk-display { min-height: 24px; text-align: center; font-family: ui-monospace, Consolas, monospace; font-size: 18px; letter-spacing: 2px; margin-bottom: 8px; }
.call-popup-keypad .cpk-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; direction: ltr; }
.call-popup-keypad .cpk-key { height: 40px; border-radius: 10px; border: 1px solid var(--border-strong); background: var(--surface-3); color: var(--text); font-size: 18px; font-weight: 600; cursor: pointer; }
.call-popup-keypad .cpk-key:hover { border-color: var(--neon); }
.call-popup-keypad .cpk-key:active { transform: scale(0.96); }
.call-popup-keypad .cpk-hint { font-size: 12px; text-align: center; margin-top: 6px; }
.call-popup-row-secondary:has(#call-popup-keypad-btn) { flex-wrap: wrap; }
/* فاز ۱۰۰: برچسب «شبکهٔ داخلی» در گزارش آی‌پی کاربران */
.lip-tag { display: inline-block; font-size: 11px; padding: 1px 7px; border-radius: 999px; background: var(--surface-3); border: 1px solid var(--border); margin-inline-start: 4px; }

/* فاز ۱۰۳: نشان تلفن فقط وضعیت اتصال — چراغ درست کنار کلمهٔ «تلفن» */
.softphone-chip .sp-label { display: inline-flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.softphone-chip .sp-label .sp-dot { margin: 0; }
.softphone-chip.in-sidebar { flex-wrap: nowrap; }
.softphone-chip .sp-reason { font-size: 11.5px; opacity: 0.85; }
#call-popup-mute[aria-pressed='true'] { border-color: var(--danger); color: var(--danger); }
/* فاز ۱۰۳: کادر «پیام‌ها، ارجاع‌ها و اعلان‌های من» */
.chat-summary-msg { display: flex; flex-direction: column; gap: 2px; }
.chat-summary-kind { font-size: 11.5px; color: var(--text-muted, var(--muted)); }
.chat-summary-msg.is-unread { border-inline-start: 3px solid var(--neon); padding-inline-start: 8px; }
.chat-summary-new { display: inline-block; font-size: 10.5px; padding: 0 6px; border-radius: 999px; background: var(--neon); color: #04201f; font-weight: 700; }

/* فاز ۱۰۳: پشتیبانی سایت — نمای بخش‌بندی‌شده */
.ss-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.ss-search { width: 260px; max-width: 100%; }
.ss-viewtoggle { display: inline-flex; gap: 4px; }
.ss-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin: 0 0 14px; }
.ss-stat { background: var(--card); border: 1px solid var(--border); border-radius: 14px; padding: 10px 14px; display: flex; align-items: baseline; gap: 8px; box-shadow: var(--glass-edge); }
.ss-stat b { font-size: 22px; color: var(--text); }
.ss-stat span { font-size: 13px; color: var(--text-muted, var(--muted)); }
.ss-stat.warn b { color: var(--danger); }
.ss-board { display: grid; grid-template-columns: repeat(5, minmax(220px, 1fr)); gap: 12px; align-items: start; overflow-x: auto; padding-bottom: 6px; }
.ss-col { background: var(--card); border: 1px solid var(--border); border-radius: 16px; display: flex; flex-direction: column; max-height: calc(100vh - 260px); min-height: 160px; }
.ss-col-head { display: flex; justify-content: space-between; align-items: center; padding: 10px 12px; font-weight: 700; border-bottom: 1px solid var(--border); position: sticky; top: 0; }
.ss-col-count { min-width: 26px; text-align: center; padding: 1px 8px; border-radius: 999px; background: var(--surface-3); font-size: 12.5px; }
.ss-col-new .ss-col-head { border-top: 3px solid #e0a526; border-radius: 16px 16px 0 0; }
.ss-col-in_progress .ss-col-head { border-top: 3px solid #3b82f6; border-radius: 16px 16px 0 0; }
.ss-col-waiting_customer .ss-col-head { border-top: 3px solid #a855f7; border-radius: 16px 16px 0 0; }
.ss-col-done .ss-col-head { border-top: 3px solid var(--success); border-radius: 16px 16px 0 0; }
.ss-col-cancelled .ss-col-head { border-top: 3px solid #8a9593; border-radius: 16px 16px 0 0; }
.ss-col-body { padding: 10px; display: flex; flex-direction: column; gap: 8px; overflow-y: auto; }
.ss-col.is-closed .ss-card { opacity: 0.85; }
.ss-col-empty { color: var(--text-muted, var(--muted)); font-size: 13px; text-align: center; padding: 14px 0; }
.ss-card { background: var(--surface-2); border: 1px solid var(--border); border-radius: 12px; padding: 10px 12px; cursor: pointer; transition: border-color .15s, transform .15s; }
.ss-card:hover, .ss-card:focus-visible { border-color: var(--neon); transform: translateY(-1px); outline: none; }
.ss-card.is-stale { border-inline-start: 3px solid var(--danger); }
.ss-card-top { display: flex; align-items: center; gap: 6px; font-size: 11.5px; color: var(--text-muted, var(--muted)); margin-bottom: 4px; }
.ss-card-id { font-family: ui-monospace, Consolas, monospace; }
.ss-card-type { padding: 0 7px; border-radius: 999px; background: var(--surface-3); }
.ss-card-type.inq { color: #a855f7; }
.ss-card-type.tk { color: #3b82f6; }
.ss-card-age { margin-inline-start: auto; }
.ss-card-title { font-weight: 700; font-size: 14px; color: var(--text); line-height: 1.5; }
.ss-card-sub { font-size: 12.5px; color: var(--text-muted, var(--muted)); margin-top: 2px; }
.ss-card-meta, .ss-card-foot { display: flex; gap: 10px; flex-wrap: wrap; font-size: 12.5px; margin-top: 6px; }
.ss-card-foot { color: var(--text-muted, var(--muted)); justify-content: space-between; }
.ss-unassigned { color: var(--danger); }
.ss-more { width: 100%; }
@media (max-width: 900px) {
  .ss-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ss-board { grid-template-columns: 1fr; overflow-x: visible; }
  .ss-col { max-height: none; }
  .ss-search { width: 100%; }
}

/* ===================== فاز ۱۰۳: خوانایی بیشتر متن در هر دو تم =====================
   به درخواست کاربر رنگ متن‌ها کمی پررنگ‌تر شد: در تم روشن تیره‌تر و در تم تیره روشن‌تر؛ متن کم‌رنگ (muted)
   و متن سایدبار هم یک درجه پررنگ‌تر شدند، شیشهٔ کارت‌ها کمی کدرتر تا پس‌زمینه کمتر از پشت متن دیده شود،
   و وزن پایهٔ فونت از ۴۰۰ به ۵۰۰ رسید (فونت متغیر وزیرمتن). */
:root,
:root[data-theme='light'] {
  --text: #04110f;
  --muted: #3c5552;
  --text-muted: #3c5552;
  --side-text: #0f2c28;
  --side-strong: #031614;
  --side-muted: #45605c;
  --card: rgba(255, 255, 255, 0.66);
  --card-hi: rgba(255, 255, 255, 0.66);
  --card-lo: rgba(255, 255, 255, 0.62);
}
:root[data-theme='dark'] {
  --text: #f4fbfa;
  --muted: #b0c8c4;
  --text-muted: #b0c8c4;
  --side-text: #d6e9e6;
  --side-strong: #ffffff;
  --side-muted: #9ab4b0;
  --card: rgba(4, 20, 23, 0.66);
  --card-hi: rgba(4, 20, 23, 0.66);
  --card-lo: rgba(4, 20, 23, 0.62);
}
body { font-weight: 500; }
.muted, small, .cw-sub, .chat-summary-time, th { font-weight: 500; }
th { color: var(--text); }
.softphone-chip.in-sidebar .sp-label { white-space: nowrap; flex-wrap: nowrap; overflow: hidden; text-overflow: ellipsis; }
