/* ==========================================================================
   کنسولِ مدرنِ دانا — پشتیبانی کامل از دو تم تیره (Dark) و روشن (Light)
   طراحی های‌تک، گرادیان‌های نئونی، چارت‌های تعاملی، ۱۰۰٪ مستقل از اینترنت
   ========================================================================== */

/* ── متغیرهای پایه: تم تیره (Dark Mode) ────────────────────── */
:root, [data-theme="dark"] {
  --bg-main: #0c0f17;
  --bg-sidebar: #101421;
  --bg-card: #151a29;
  --bg-card-hover: #1b2135;
  --bg-input: #0f1422;
  --border: #1e263d;
  --border-light: #2c3755;
  
  /* گرادیان‌های نئونی */
  --grad-purple: linear-gradient(135deg, #a855f7 0%, #ec4899 100%);
  --grad-cyan: linear-gradient(135deg, #06b6d4 0%, #3b82f6 100%);
  --grad-bar: linear-gradient(180deg, #06b6d4 0%, #6366f1 100%);
  --grad-btn: linear-gradient(135deg, #9333ea 0%, #ec4899 100%);
  
  /* رنگ‌های کمکی */
  --accent-cyan: #06b6d4;
  --accent-purple: #a855f7;
  --accent-pink: #ec4899;
  --accent-blue: #3b82f6;
  --accent-green: #10b981;
  --accent-yellow: #f59e0b;
  --accent-red: #ef4444;

  /* متن‌ها */
  --text-main: #f8fafc;
  --text-sub: #94a3b8;
  --text-muted: #64748b;

  --chart-grid: rgba(255, 255, 255, 0.06);
  --chart-text: #64748b;
  --chart-fill-cyan: rgba(6, 182, 212, 0.12);
  --chart-fill-purple: rgba(168, 85, 247, 0.08);

  --shadow-card: 0 4px 20px -2px rgba(0, 0, 0, 0.5), 0 0 0 1px var(--border);
  --shadow-glow-purple: 0 0 25px rgba(168, 85, 247, 0.25);
  --shadow-glow-cyan: 0 0 25px rgba(6, 182, 212, 0.25);
}

/* ── تم روشن (Light Mode) ─────────────────────────────────── */
[data-theme="light"] {
  --bg-main: #f1f5f9;
  --bg-sidebar: #ffffff;
  --bg-card: #ffffff;
  --bg-card-hover: #f8fafc;
  --bg-input: #f8fafc;
  --border: #e2e8f0;
  --border-light: #cbd5e1;

  /* گرادیان‌های غنی و زنده برای حالت روشن */
  --grad-purple: linear-gradient(135deg, #8b5cf6 0%, #d946ef 100%);
  --grad-cyan: linear-gradient(135deg, #0284c7 0%, #2563eb 100%);
  --grad-bar: linear-gradient(180deg, #0284c7 0%, #4f46e5 100%);
  --grad-btn: linear-gradient(135deg, #7c3aed 0%, #db2777 100%);

  /* رنگ‌های کمکی */
  --accent-cyan: #0284c7;
  --accent-purple: #7c3aed;
  --accent-pink: #db2777;
  --accent-blue: #2563eb;
  --accent-green: #059669;
  --accent-yellow: #d97706;
  --accent-red: #dc2626;

  /* متن‌ها */
  --text-main: #0f172a;
  --text-sub: #475569;
  --text-muted: #94a3b8;

  --chart-grid: rgba(0, 0, 0, 0.06);
  --chart-text: #94a3b8;
  --chart-fill-cyan: rgba(2, 132, 199, 0.08);
  --chart-fill-purple: rgba(139, 92, 246, 0.06);

  --shadow-card: 0 4px 20px -2px rgba(0, 0, 0, 0.06), 0 0 0 1px var(--border);
  --shadow-glow-purple: 0 4px 18px rgba(139, 92, 246, 0.2);
  --shadow-glow-cyan: 0 4px 18px rgba(2, 132, 199, 0.2);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  background-color: var(--bg-main);
  color: var(--text-main);
  font-family: "Vazirmatn", "IRANSans", "Segoe UI", -apple-system, BlinkMacSystemFont, Tahoma, sans-serif;
  font-size: 14.5px;
  line-height: 1.6;
  direction: rtl;
  min-height: 100vh;
  transition: background-color 0.25s ease, color 0.25s ease;
}

a {
  color: var(--accent-cyan);
  text-decoration: none;
  transition: all 0.2s ease;
}
a:hover {
  color: var(--accent-purple);
}

/* ── چیدمان سایدبار و ناحیه محتوا ───────────────────────────── */
.app-container {
  display: flex;
  min-height: 100vh;
}

aside.sidebar {
  width: 260px;
  min-width: 260px;
  max-width: 260px;
  background: var(--bg-sidebar);
  border-left: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  padding: 24px 16px;
  position: -webkit-sticky;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  flex-shrink: 0;
  transition: background-color 0.25s ease, border-color 0.25s ease;
}

.brand-wrapper {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 10px 24px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 20px;
}
.brand-icon {
  width: 36px;
  height: 36px;
  background: var(--grad-purple);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 800;
  font-size: 18px;
  box-shadow: var(--shadow-glow-purple);
}
.brand-title {
  font-size: 17px;
  font-weight: 800;
  letter-spacing: -0.5px;
  color: var(--text-main);
}

.nav-group {
  margin-bottom: 18px;
}
.nav-heading {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--text-muted);
  padding: 6px 12px;
  margin-bottom: 4px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.nav-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  color: var(--text-sub);
  border-radius: 10px;
  margin-bottom: 4px;
  font-size: 13.5px;
  font-weight: 500;
  transition: all 0.2s ease;
  position: relative;
}
.nav-item:hover {
  background: rgba(148, 163, 184, 0.08);
  color: var(--text-main);
}
.nav-item.active {
  background: linear-gradient(270deg, rgba(168, 85, 247, 0.18) 0%, rgba(168, 85, 247, 0.04) 100%);
  color: var(--accent-purple);
  font-weight: 600;
  border-right: 3px solid var(--accent-purple);
}
[data-theme="light"] .nav-item.active {
  background: rgba(139, 92, 246, 0.1);
  color: var(--accent-purple);
}

.nav-badge {
  background: var(--accent-pink);
  color: #fff;
  font-size: 10px;
  padding: 1px 7px;
  border-radius: 999px;
  font-weight: 700;
  box-shadow: 0 0 10px rgba(236, 72, 153, 0.3);
}

.sidebar-bottom {
  margin-top: auto;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}
.btn-download {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 11px;
  background: var(--grad-btn);
  color: #fff;
  border: 0;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: var(--shadow-glow-purple);
  transition: all 0.2s;
}
.btn-download:hover {
  filter: brightness(1.1);
  transform: translateY(-1px);
}

/* فضای محتوای اصلی */
.content-area {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow-x: hidden;
}

header.app-header {
  background: var(--bg-sidebar);
  border-bottom: 1px solid var(--border);
  padding: 14px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 20;
  transition: background-color 0.25s ease;
}
.header-left {
  display: flex;
  align-items: center;
  gap: 16px;
}
.header-right {
  display: flex;
  align-items: center;
  gap: 14px;
}

/* کلید سوئیچ تم تیره / روشن */
.theme-toggle-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  color: var(--text-main);
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}
.theme-toggle-btn:hover {
  border-color: var(--accent-cyan);
  background: rgba(6, 182, 212, 0.08);
}

.user-info {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13.5px;
}
.user-avatar {
  width: 32px;
  height: 32px;
  background: rgba(148, 163, 184, 0.15);
  border: 1px solid var(--border-light);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-cyan);
  font-weight: 700;
}

main.main-body {
  padding: 28px;
  max-width: 1420px;
  width: 100%;
  margin: 0 auto;
}

/* ── کارت‌ها ────────────────────────────────────────────────── */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 22px;
  box-shadow: var(--shadow-card);
  transition: border-color 0.2s, background-color 0.25s ease;
}
.card:hover {
  border-color: var(--border-light);
}
.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}
.card-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-main);
}
.card-sub {
  font-size: 12.5px;
  color: var(--text-muted);
}

/* ── ردیف اول: کارت‌های گرادیانی KPI ──────────────────────── */
.kpi-row {
  display: grid;
  grid-template-columns: 1.2fr 1.2fr 1fr 1.6fr;
  gap: 18px;
  margin-bottom: 22px;
}
@media (max-width: 1200px) {
  .kpi-row { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 768px) {
  .kpi-row { grid-template-columns: 1fr; }
}

.kpi-card {
  border-radius: 18px;
  padding: 22px 24px;
  color: #ffffff !important;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 135px;
  position: relative;
  overflow: hidden;
}
.kpi-card.purple {
  background: var(--grad-purple) !important;
  box-shadow: var(--shadow-glow-purple);
  color: #ffffff !important;
}
.kpi-card.cyan {
  background: var(--grad-cyan) !important;
  box-shadow: var(--shadow-glow-cyan);
  color: #ffffff !important;
}
.kpi-label {
  font-size: 13.5px;
  font-weight: 500;
  opacity: 0.94;
  color: #ffffff !important;
}
.kpi-val {
  font-size: 34px;
  font-weight: 800;
  letter-spacing: -1px;
  display: flex;
  align-items: baseline;
  gap: 6px;
  direction: ltr;
  text-align: right;
  justify-content: flex-end;
  color: #ffffff !important;
}
.kpi-unit {
  font-size: 14px;
  font-weight: 600;
  opacity: 0.88;
  color: #ffffff !important;
}

/* کارت شاخص‌های درصدی */
.indicators-card {
  display: flex;
  flex-direction: column;
  justify-content: space-around;
  padding: 16px 20px;
}
.ind-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 0;
}
.ind-item:not(:last-child) {
  border-bottom: 1px solid var(--border);
}
.ind-left {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: var(--text-main);
  font-weight: 500;
}
.ind-icon {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
}
.ind-icon.pink { background: rgba(236, 72, 153, 0.15); color: #ec4899; }
.ind-icon.cyan { background: rgba(6, 182, 212, 0.15); color: #0284c7; }
.ind-badge {
  font-size: 11.5px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 6px;
  direction: ltr;
}
.ind-badge.pos { background: rgba(16, 185, 129, 0.18); color: var(--accent-green); }
.ind-badge.neg { background: rgba(239, 68, 68, 0.18); color: var(--accent-red); }

/* کارت مینی چارت موجی */
.mini-wave-card {
  padding: 16px 20px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.wave-header {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-main);
  margin-bottom: 4px;
}
.wave-tag {
  background: rgba(6, 182, 212, 0.15);
  border: 1px solid rgba(6, 182, 212, 0.4);
  color: var(--accent-cyan);
  padding: 3px 9px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 700;
  display: inline-block;
  margin-bottom: 6px;
}

/* ── ردیف میانی: چارت بزرگ روندی ──────────────────────────── */
.trend-section {
  margin-bottom: 22px;
}
.chart-legend {
  display: flex;
  align-items: center;
  gap: 20px;
  font-size: 12.5px;
  color: var(--text-sub);
}
.legend-item {
  display: flex;
  align-items: center;
  gap: 8px;
}
.legend-line {
  width: 18px;
  height: 3px;
  border-radius: 2px;
}
.legend-line.cyan { background: var(--accent-cyan); }
.legend-line.purple-dots {
  border-top: 3px dotted var(--accent-purple);
  height: 0;
}

/* ── ردیف پایین: چارت‌های دوناتی و میله‌ای ─────────────────── */
.bottom-charts-row {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 18px;
  margin-bottom: 24px;
}
@media (max-width: 1080px) {
  .bottom-charts-row { grid-template-columns: 1fr; }
}

.donut-container {
  display: flex;
  align-items: center;
  justify-content: space-around;
  gap: 16px;
  padding: 10px 0;
}
.donut-legend {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.donut-leg-item {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12.5px;
  color: var(--text-sub);
}
.donut-ring-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 2.5px solid transparent;
}

/* ── جداول و ردیف‌ها ────────────────────────────────────────── */
table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 8px;
}
th {
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 600;
  text-align: right;
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
}
td {
  padding: 13px 14px;
  font-size: 13.5px;
  color: var(--text-main);
  border-bottom: 1px solid var(--border);
}
tbody tr {
  transition: background 0.15s;
}
tbody tr:hover {
  background: rgba(148, 163, 184, 0.05);
}
td.mono, .mono {
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  direction: ltr;
  text-align: left;
}

/* بج‌ها */
.badge-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 2px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
}
.badge-pill.success {
  background: rgba(16, 185, 129, 0.15);
  color: var(--accent-green);
  border: 1px solid rgba(16, 185, 129, 0.3);
}
.badge-pill.warning {
  background: rgba(245, 158, 11, 0.15);
  color: var(--accent-yellow);
  border: 1px solid rgba(245, 158, 11, 0.3);
}
.badge-pill.info {
  background: rgba(6, 182, 212, 0.15);
  color: var(--accent-cyan);
  border: 1px solid rgba(6, 182, 212, 0.3);
}
.badge-pill.neutral {
  background: rgba(148, 163, 184, 0.15);
  color: var(--text-muted);
  border: 1px solid var(--border);
}

/* دکمه‌ها و فرم‌ها */
button, .btn {
  font-family: inherit;
  font-size: 13.5px;
  font-weight: 600;
  padding: 8px 18px;
  border-radius: 8px;
  border: 0;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s;
  background: var(--accent-blue);
  color: #fff;
}
button:hover, .btn:hover {
  filter: brightness(1.1);
}
button.ghost, .btn.ghost {
  background: transparent;
  color: var(--text-sub);
  border: 1px solid var(--border-light);
}
button.ghost:hover, .btn.ghost:hover {
  background: rgba(148, 163, 184, 0.1);
  color: var(--text-main);
}
button.danger {
  background: rgba(239, 68, 68, 0.15);
  color: var(--accent-red);
  border: 1px solid rgba(239, 68, 68, 0.3);
}

input, select, textarea {
  font-family: inherit;
  font-size: 13.5px;
  padding: 10px 14px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text-main);
  width: 100%;
  outline: none;
  transition: border-color 0.2s, background-color 0.25s ease;
}
input:focus, select:focus, textarea:focus {
  border-color: var(--accent-cyan);
  box-shadow: 0 0 0 2px rgba(6, 182, 212, 0.2);
}

.flash, .error {
  padding: 12px 16px;
  border-radius: 8px;
  margin-bottom: 20px;
  font-size: 13.5px;
}
.flash {
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.3);
  color: var(--accent-green);
}
.error {
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: var(--accent-red);
}

/* جعبه ورود */
.login-box {
  max-width: 400px;
  margin: 12vh auto;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 34px;
  box-shadow: var(--shadow-card);
}
.login-box h1 {
  font-size: 22px;
  text-align: center;
  margin-bottom: 24px;
}

/* ══════════════════════════════════════════════════════════════
   ویجت تلفن نرم‌افزاری وب‌فون (WebRTC Softphone Widget)
   ══════════════════════════════════════════════════════════════ */
.webphone-toggle-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.35);
  color: var(--accent-green);
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}
.webphone-toggle-btn:hover {
  background: rgba(16, 185, 129, 0.22);
  border-color: var(--accent-green);
  transform: translateY(-1px);
}
.phone-status-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--accent-green);
  box-shadow: 0 0 10px var(--accent-green);
  display: inline-block;
  animation: pulseDot 2s infinite;
}
@keyframes pulseDot {
  0% { transform: scale(0.95); opacity: 0.8; }
  50% { transform: scale(1.2); opacity: 1; }
  100% { transform: scale(0.95); opacity: 0.8; }
}

/* پنجره شناور وب‌فون */
.webphone-drawer {
  position: fixed;
  bottom: 24px;
  left: 24px;
  width: 320px;
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: 24px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
  z-index: 1000;
  overflow: hidden;
  display: none;
  flex-direction: column;
  animation: slideUp 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}
.webphone-drawer.active {
  display: flex;
}
@keyframes slideUp {
  from { opacity: 0; transform: translateY(20px) scale(0.96); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.webphone-header {
  background: var(--bg-sidebar);
  padding: 14px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border);
}
.webphone-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13.5px;
  font-weight: 700;
  color: var(--text-main);
}
.webphone-close-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 16px;
  cursor: pointer;
  padding: 4px;
  border-radius: 6px;
  transition: all 0.2s;
}
.webphone-close-btn:hover {
  color: var(--text-main);
  background: rgba(148, 163, 184, 0.1);
}

.webphone-body {
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.webphone-screen {
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 12px 14px;
  position: relative;
}
.webphone-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  font-weight: 600;
  color: var(--accent-green);
  margin-bottom: 6px;
}
.webphone-display-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.webphone-input {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  font-size: 20px !important;
  font-weight: 800 !important;
  letter-spacing: 1px !important;
  direction: ltr !important;
  color: var(--text-main) !important;
  padding: 0 !important;
  font-family: ui-monospace, monospace !important;
}
.webphone-backspace {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 18px;
  cursor: pointer;
  padding: 4px 6px;
  border-radius: 6px;
  transition: all 0.2s;
}
.webphone-backspace:hover {
  color: var(--accent-red);
}

/* صفحه کلید عددی */
.webphone-keypad {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}
.dial-key {
  background: rgba(148, 163, 184, 0.06);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 10px 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s ease;
  user-select: none;
}
.dial-key:hover {
  background: rgba(148, 163, 184, 0.14);
  border-color: var(--border-light);
  transform: scale(1.02);
}
.dial-key:active {
  background: rgba(6, 182, 212, 0.2);
  border-color: var(--accent-cyan);
  transform: scale(0.96);
}
.dial-key-num {
  font-size: 17px;
  font-weight: 700;
  color: var(--text-main);
  line-height: 1;
}
.dial-key-sub {
  font-size: 9px;
  color: var(--text-muted);
  margin-top: 3px;
  letter-spacing: 0.5px;
}

/* کلیدهای عملیاتی تماس */
.webphone-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 4px;
}
.btn-call {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%) !important;
  color: #fff !important;
  border: none !important;
  border-radius: 12px !important;
  padding: 12px !important;
  font-size: 13.5px !important;
  font-weight: 700 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 8px !important;
  cursor: pointer !important;
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.3) !important;
  transition: all 0.2s ease !important;
}
.btn-call:hover {
  filter: brightness(1.1) !important;
  transform: translateY(-1px) !important;
}
.btn-hangup {
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%) !important;
  color: #fff !important;
  border: none !important;
  border-radius: 12px !important;
  padding: 12px !important;
  font-size: 13.5px !important;
  font-weight: 700 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 8px !important;
  cursor: pointer !important;
  box-shadow: 0 4px 14px rgba(239, 68, 68, 0.3) !important;
  transition: all 0.2s ease !important;
}
.btn-hangup:hover {
  filter: brightness(1.1) !important;
  transform: translateY(-1px) !important;
}
.btn-mute {
  background: rgba(148, 163, 184, 0.1) !important;
  color: var(--text-main) !important;
  border: 1px solid var(--border) !important;
  border-radius: 12px !important;
  padding: 10px !important;
  font-size: 12px !important;
  font-weight: 600 !important;
  cursor: pointer !important;
  transition: all 0.2s ease !important;
}

.webphone-presets {
  border-top: 1px solid var(--border);
  padding-top: 12px;
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.preset-tag {
  background: rgba(148, 163, 184, 0.08);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 4px 8px;
  font-size: 11px;
  color: var(--text-sub);
  cursor: pointer;
  transition: all 0.15s ease;
}
.preset-tag:hover {
  background: rgba(6, 182, 212, 0.12);
  color: var(--accent-cyan);
  border-color: var(--accent-cyan);
}

/* ══════════════════════════════════════════════════════════════
   بورد بصری کانبان برای پرونده‌ها (Visual Kanban Board Pipeline)
   ══════════════════════════════════════════════════════════════ */
.view-switcher {
  display: inline-flex;
  align-items: center;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 4px;
  gap: 4px;
  margin-bottom: 18px;
}
.view-switch-btn {
  padding: 6px 14px;
  border-radius: 8px;
  border: none;
  background: transparent;
  color: var(--text-sub);
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.view-switch-btn.active {
  background: var(--grad-btn);
  color: #fff;
  box-shadow: var(--shadow-glow-purple);
}

.kanban-board {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-top: 16px;
  overflow-x: auto;
  padding-bottom: 16px;
}
@media (max-width: 1100px) {
  .kanban-board {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 650px) {
  .kanban-board {
    grid-template-columns: 1fr;
  }
}

.kanban-column {
  background: var(--bg-sidebar);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  min-height: 480px;
  transition: background-color 0.25s ease;
}
.kanban-col-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 12px;
  margin-bottom: 14px;
  border-bottom: 1px solid var(--border);
}
.kanban-col-title {
  font-size: 14px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-main);
}
.kanban-col-title.new { color: var(--accent-cyan); }
.kanban-col-title.progress { color: var(--accent-purple); }
.kanban-col-title.pending { color: var(--accent-yellow); }
.kanban-col-title.resolved { color: var(--accent-green); }

.kanban-count-pill {
  background: rgba(148, 163, 184, 0.12);
  border-radius: 12px;
  padding: 2px 8px;
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
}

.kanban-cards-container {
  display: flex;
  flex-direction: column;
  gap: 12px;
  flex: 1;
}

.kanban-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 14px;
  box-shadow: var(--shadow-card);
  transition: all 0.2s ease;
  position: relative;
  cursor: grab;
}
.kanban-card:hover {
  border-color: var(--border-light);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
}
.kanban-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}
.kanban-case-id {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
  font-family: ui-monospace, monospace;
}
.kanban-priority-pill {
  font-size: 10px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 8px;
}
.kanban-priority-pill.urgent {
  background: rgba(239, 68, 68, 0.15);
  color: var(--accent-red);
  border: 1px solid rgba(239, 68, 68, 0.3);
}
.kanban-priority-pill.high {
  background: rgba(245, 158, 11, 0.15);
  color: var(--accent-yellow);
  border: 1px solid rgba(245, 158, 11, 0.3);
}
.kanban-priority-pill.normal {
  background: rgba(59, 130, 246, 0.15);
  color: var(--accent-blue);
  border: 1px solid rgba(59, 130, 246, 0.3);
}

.kanban-card-title {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text-main);
  margin-bottom: 10px;
  line-height: 1.4;
}

.kanban-card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11.5px;
  color: var(--text-sub);
  border-top: 1px solid var(--border);
  padding-top: 10px;
  margin-top: 6px;
}

.kanban-quick-call {
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.3);
  color: var(--accent-green);
  border-radius: 8px;
  padding: 3px 8px;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: all 0.15s;
}
.kanban-quick-call:hover {
  background: var(--accent-green);
  color: #fff;
}

/* ── میلهٔ نسبیِ گزارش ───────────────────────────────────────────
   نمودار با CSS، نه کتابخانه: قید هوا-بسته یعنی هیچ CDN‌ای در کار
   نیست و آوردنِ یک کتابخانهٔ نمودار فقط برای چند میلهٔ افقی،
   مگابایت‌ها وابستگی برای چیزی است که دو خطِ CSS انجامش می‌دهد. */
.bar-track {
  background: var(--surface-2, rgba(128, 128, 128, .18));
  border-radius: 6px;
  height: 10px;
  overflow: hidden;
  width: 100%;
}
.bar-fill {
  background: var(--grad-btn, var(--accent-purple, #7c5cff));
  border-radius: 6px;
  height: 100%;
  min-width: 2px;
}
