/**
 * Premium dashboard: glassmorphism + dark theme + gradients + motion
 * Scoped under .dash-premium to avoid clashes with legacy .dashboard-* in style.css
 */

.dash-premium {
  --dash-bg-0: #080c14;
  --dash-bg-1: #0a1018;
  --dash-shell: #0c121a;
  --dash-glass: rgba(255, 255, 255, 0.06);
  --dash-glass-border: rgba(255, 255, 255, 0.12);
  --dash-text: #f1f5f9;
  --dash-muted: #94a3b8;
  --dash-accent: #38bdf8;
  --dash-shadow: 0 18px 50px rgba(0, 0, 0, 0.45);
  position: relative;
  isolation: isolate;
  color: var(--dash-text);
  padding: 0 !important;
  margin: -1rem !important;
  margin-top: 0 !important;
  min-height: calc(100vh - 52px);
  overflow: hidden;
  border-radius: 0;
  background: var(--dash-shell);
}

/* Variant 1: тёмный glassmorphism для ВСЕЙ страницы app.html, когда активен .dash-premium */

/* Полный reset для HTML и body */
html:has(.dash-premium) {
  background: #0c121a !important;
  color: #f1f5f9;
  margin: 0 !important;
  padding: 0 !important;
  border: none !important;
  outline: none !important;
  height: 100%;
  overflow-x: hidden;
  color-scheme: dark;
}

body:has(.dash-premium) {
  background: #0c121a !important;
  color: #f1f5f9;
  margin: 0 !important;
  padding: 0 !important;
  border: none !important;
  outline: none !important;
  position: relative;
  top: 0 !important;
  min-height: 100vh;
  overflow-x: hidden;
  color-scheme: dark;
}

/* Убираем ВСЕ верхние отступы для прямых потомков body */
body:has(.dash-premium) > * {
  margin-top: 0 !important;
}

body:has(.dash-premium) > *:first-child {
  margin-top: 0 !important;
  padding-top: 0.75rem !important;
}

body:has(.dash-premium) *::before,
body:has(.dash-premium) *::after {
  margin-top: 0 !important;
}

/* Нативные select/option в тёмной теме (Chrome/Edge частично подхватывает color-scheme; доп. страховка) */
body:has(.dash-premium) select:not([multiple]) {
  background-color: rgba(15, 23, 42, 0.92);
  color: var(--dash-text, #f1f5f9);
  border: 1px solid rgba(255, 255, 255, 0.14);
}

body:has(.dash-premium) select option {
  background-color: #0f172a;
  color: #f1f5f9;
}

body:has(.dash-premium) .layout {
  background: var(--dash-shell);
  min-height: 100vh;
  margin: 0 !important;
  padding: 0 !important;
  min-width: 0;
  max-width: 100%;
  overflow-x: hidden;
}

body:has(.dash-premium) .main {
  background: var(--dash-shell);
  padding: 0 !important;
  margin: 0 !important;
  flex: 1;
  min-width: 0;
  max-width: 100%;
  overflow-x: hidden;
  overflow-y: auto;
}

/* Убираем светлые отступы/рамки каркаса (style.css), чтобы premium не "ломал" геометрию */

body:has(.dash-premium) .panel {
  padding: 0 !important;
  margin: 0 !important;
  border: none;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

body:has(.dash-premium) #extra {
  padding: 0 !important;
  margin: 0 !important;
}

body:has(.dash-premium) pre.data#out {
  display: none;
}

/* Шапка */
body:has(.dash-premium) .app-header {
  background: #0c121a !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--dash-text);
  margin: 0 !important;
  padding: 0.75rem 1rem !important;
  position: relative;
  top: 0 !important;
}

body:has(.dash-premium) .app-header strong {
  color: var(--dash-text);
}

body:has(.dash-premium) .app-header .user {
  color: var(--dash-muted);
}

body:has(.dash-premium) .app-header .header-logout-btn {
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.1) 0%,
    rgba(255, 255, 255, 0.05) 100%
  );
  border: 1px solid rgba(255, 255, 255, 0.16);
  color: rgba(241, 245, 249, 0.94);
  box-shadow:
    0 10px 28px rgba(0, 0, 0, 0.35),
    inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

body:has(.dash-premium) .app-header .header-logout-btn:hover {
  border-color: rgba(248, 113, 113, 0.55);
  color: #fecdd3;
  background: linear-gradient(
    180deg,
    rgba(239, 68, 68, 0.22) 0%,
    rgba(239, 68, 68, 0.08) 100%
  );
  box-shadow:
    0 12px 32px rgba(239, 68, 68, 0.18),
    inset 0 1px 0 rgba(255, 255, 255, 0.12);
  transform: translateY(-1px);
}

body:has(.dash-premium) .app-header .header-logout-btn:active {
  transform: translateY(0);
}

body:has(.dash-premium) .app-header .header-logout-btn:focus-visible {
  box-shadow:
    0 0 0 3px rgba(56, 189, 248, 0.45),
    0 10px 28px rgba(0, 0, 0, 0.35);
}

body:has(.dash-premium) .app-header .header-lang-switch-options {
  display: inline-flex;
  gap: 0.3rem;
  padding: 0.18rem;
  border-radius: 999px;
  background: rgba(2, 6, 23, 0.38);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow:
    0 10px 28px rgba(0, 0, 0, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

body:has(.dash-premium) .app-header .header-lang-option {
  padding: 0.32rem 0.58rem;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  color: rgba(226, 232, 240, 0.82);
  border-radius: 999px;
  border: 1px solid transparent;
  background: transparent;
}

body:has(.dash-premium) .app-header .header-lang-option:hover {
  color: #f8fafc;
  background: rgba(255, 255, 255, 0.08);
}

body:has(.dash-premium) .app-header .header-lang-option.is-active {
  color: #0c121a;
  background: linear-gradient(180deg, #7dd3fc 0%, var(--login-accent) 48%, #0ea5e9 100%);
  border-color: rgba(56, 189, 248, 0.45);
  box-shadow:
    0 8px 20px rgba(56, 189, 248, 0.22),
    inset 0 1px 0 rgba(255, 255, 255, 0.35);
}

body:has(.dash-premium) .app-header .header-lang-option .login-lang-flag {
  width: 18px;
  height: 12px;
}

body:has(.dash-premium) .app-header .header-lang-btn {
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.1) 0%,
    rgba(255, 255, 255, 0.05) 100%
  );
  border: 1px solid rgba(255, 255, 255, 0.16);
  color: rgba(241, 245, 249, 0.94);
  box-shadow:
    0 10px 28px rgba(0, 0, 0, 0.35),
    inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

body:has(.dash-premium) .app-header .header-lang-btn:hover {
  border-color: rgba(129, 140, 248, 0.55);
  color: #f8fafc;
  background: linear-gradient(
    180deg,
    rgba(129, 140, 248, 0.22) 0%,
    rgba(129, 140, 248, 0.08) 100%
  );
  transform: translateY(-1px);
}

/* Левое меню */
body:has(.dash-premium) .nav {
  background: #0c121a;
  border-right: 1px solid rgba(255, 255, 255, 0.1);
}

body:has(.dash-premium) .nav button {
  color: rgba(226, 232, 240, 0.92);
}

body:has(.dash-premium) .nav button:hover {
  background: rgba(255, 255, 255, 0.06);
  color: rgba(248, 250, 252, 0.96);
}

body:has(.dash-premium) .nav button.active {
  background: rgba(255, 255, 255, 0.1);
  color: rgba(248, 250, 252, 0.96);
}

/* Toolbar в тёмной теме (иначе кнопки остаются белыми из style.css) */
body:has(.dash-premium) .toolbar {
  background: transparent !important;
  padding: 0;
  margin: 0;
}

body:has(.dash-premium) #section-title {
  display: none;
}

body:has(.dash-premium) .panel h2 {
  display: none;
}

body:has(.dash-premium) .toolbar button {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: var(--dash-text);
}

body:has(.dash-premium) .toolbar button:hover {
  background: rgba(255, 255, 255, 0.12);
}

body:has(.dash-premium) .muted {
  color: var(--dash-muted);
}

@media (prefers-reduced-motion: reduce) {
  .dash-premium *,
  .dash-premium *::before,
  .dash-premium *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Лёгкий шум поверх общего цвета (без резких пятен) */
.dash-premium-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  background: radial-gradient(ellipse 100% 80% at 50% -20%, rgba(99, 102, 241, 0.07), transparent 55%);
  opacity: 1;
  filter: none;
  pointer-events: none;
}

.dash-premium-overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(180deg, rgba(10, 15, 24, 0.55) 0%, var(--dash-shell) 38%, var(--dash-shell) 100%);
  pointer-events: none;
}

.dash-premium-inner {
  position: relative;
  z-index: 2;
  padding: 1.35rem 1.25rem 2rem;
  max-width: 1280px;
  margin: 0 auto;
  min-width: 0;
}

/* Hero */
.dash-hero {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
  margin-bottom: 1.75rem;
  animation: dashFadeInUp 0.7s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.dash-hero h1 {
  margin: 0 0 0.35rem;
  font-size: clamp(1.35rem, 3vw, 1.85rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  background: linear-gradient(90deg, #fff 0%, #c7d2fe 45%, #f5d0fe 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.dash-hero-meta {
  margin: 0;
  font-size: 0.9rem;
  color: var(--dash-muted);
}

/* Виджет времени */
.dash-clock-widget {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  min-width: 220px;
  padding: 0.85rem 1.05rem;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow:
    0 0 0 1px rgba(99, 102, 241, 0.12),
    0 14px 40px rgba(0, 0, 0, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(20px);
  animation: dashFadeInUp 0.72s cubic-bezier(0.22, 1, 0.36, 1) 0.04s both;
}

.dash-clock-day {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: rgba(148, 163, 184, 0.95);
  margin-bottom: 0.35rem;
}

.dash-clock-row {
  display: flex;
  align-items: baseline;
  gap: 0.08em;
  font-variant-numeric: tabular-nums;
}

.dash-clock-hms,
.dash-clock-minutes {
  font-size: clamp(1.75rem, 4vw, 2.35rem);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.03em;
  background: linear-gradient(120deg, #fff 12%, #a5b4fc 52%, #5eead4 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.dash-clock-colon {
  font-size: clamp(1.5rem, 3.5vw, 2rem);
  font-weight: 700;
  color: rgba(148, 163, 184, 0.75);
}

.dash-clock-sec-wrap {
  margin-top: 0.45rem;
  display: flex;
  align-items: baseline;
  gap: 0.35rem;
}

.dash-clock-seconds {
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--dash-accent);
  text-shadow:
    0 0 20px rgba(56, 189, 248, 0.45),
    0 0 32px rgba(56, 189, 248, 0.2);
  animation: dashSecGlow 2s ease-in-out infinite;
  font-variant-numeric: tabular-nums;
}

.dash-clock-sec-label {
  font-size: 0.62rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: rgba(148, 163, 184, 0.8);
}

@keyframes dashSecGlow {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.72;
  }
}


@keyframes dashFadeInUp {
  from {
    opacity: 0;
    transform: translate3d(0, 22px, 0);
  }
  to {
    opacity: 1;
    transform: translate3d(0, 0, 0);
  }
}

@keyframes dashShimmer {
  100% {
    transform: translateX(100%);
  }
}

/* Stat grid */
.dash-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
  margin-bottom: 1.35rem;
}

@media (max-width: 1199px) {
  .dash-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 559px) {
  .dash-stats {
    grid-template-columns: 1fr;
  }
}

.dash-stat-card {
  position: relative;
  border-radius: 18px;
  padding: 1.15rem 1.2rem;
  overflow: hidden;
  min-height: 132px;
  border: 1px solid var(--dash-glass-border);
  background: linear-gradient(
    155deg,
    color-mix(in srgb, var(--c1) 88%, transparent) 0%,
    rgba(255, 255, 255, 0.04) 48%,
    color-mix(in srgb, var(--c2) 55%, transparent) 110%
  );
  backdrop-filter: blur(22px);
  box-shadow:
    var(--dash-shadow),
    inset 0 1px 0 rgba(255, 255, 255, 0.12);
  transform: translate3d(0, 0, 0);
  transition:
    transform 0.38s cubic-bezier(0.22, 1, 0.36, 1),
    box-shadow 0.38s ease,
    border-color 0.35s ease;
  animation: dashFadeInUp 0.75s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.dash-stat-card[data-dash-delay='1'] {
  animation-delay: 0.08s;
}

.dash-stat-card[data-dash-delay='2'] {
  animation-delay: 0.16s;
}

.dash-stat-card[data-dash-delay='3'] {
  animation-delay: 0.24s;
}

.dash-stat-card:hover {
  transform: translateY(-6px) scale(1.02);
  box-shadow:
    0 24px 56px rgba(0, 0, 0, 0.5),
    0 0 40px color-mix(in srgb, var(--c2) 22%, transparent);
  border-color: color-mix(in srgb, var(--c2) 45%, white);
}

.dash-stat-card--link {
  cursor: pointer;
}

.dash-stat-card--link:focus-visible {
  outline: 2px solid color-mix(in srgb, var(--c2) 70%, white);
  outline-offset: 2px;
}

/* Premium balance card (dashboard) */
.dash-balance-card {
  position: relative;
  display: flex;
  flex-direction: column;
  border-radius: 18px;
  padding: 1.15rem 1.2rem 1.05rem;
  min-height: 132px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: linear-gradient(135deg, #2f5eb8 0%, #244a96 52%, #1a3778 100%);
  box-shadow:
    0 12px 32px rgba(20, 50, 120, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.14);
  animation: dashFadeInUp 0.75s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.dash-balance-card::before {
  content: '';
  position: absolute;
  inset: -40% -20% auto auto;
  width: 70%;
  height: 120%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 68%);
  pointer-events: none;
}

.dash-balance-card__head {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
}

.dash-balance-card__label-row {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.82rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.92);
  letter-spacing: 0.01em;
}

.dash-balance-card__sparkle {
  width: 1rem;
  height: 1rem;
  flex-shrink: 0;
  opacity: 0.95;
}

.dash-balance-card__wallet {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.18);
  flex-shrink: 0;
}

.dash-balance-card__wallet svg {
  width: 1.15rem;
  height: 1.15rem;
  stroke: #fff;
  fill: none;
}

.dash-balance-card__amount {
  position: relative;
  z-index: 1;
  margin-top: 0.55rem;
  font-size: clamp(1.65rem, 3.2vw, 2.15rem);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.03em;
  color: #fff;
  font-variant-numeric: tabular-nums;
}

.dash-balance-card__divider {
  position: relative;
  z-index: 1;
  margin: 0.85rem 0 0.75rem;
  border: none;
  border-top: 1px solid rgba(255, 255, 255, 0.18);
}

.dash-balance-card__cta {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  width: 100%;
  margin-top: auto;
  padding: 0.62rem 1rem;
  border: none;
  border-radius: 12px;
  background: #fff;
  color: #244a96;
  font: inherit;
  font-size: 0.92rem;
  font-weight: 700;
  cursor: pointer;
  transition:
    transform 0.22s ease,
    box-shadow 0.22s ease,
    background 0.22s ease;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.1);
}

.dash-balance-card__cta:hover {
  transform: translateY(-1px);
  background: #f8fafc;
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.14);
}

.dash-balance-card__cta:focus-visible {
  outline: 2px solid rgba(255, 255, 255, 0.85);
  outline-offset: 2px;
}

.dash-balance-card__cta-plus {
  font-size: 1.05rem;
  line-height: 1;
  font-weight: 700;
}

.dash-stat-card::before {
  content: '';
  position: absolute;
  inset: -30%;
  background: radial-gradient(
    circle at 20% 20%,
    color-mix(in srgb, var(--c2) 28%, transparent),
    transparent 60%
  );
  pointer-events: none;
  opacity: 0.9;
}

.dash-stat-top {
  position: relative;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.5rem;
  z-index: 1;
}

.dash-stat-icon {
  font-size: 1.55rem;
  line-height: 1;
  filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.35));
}

.dash-stat-icon-img {
  width: 1.75rem;
  height: 1.75rem;
  object-fit: contain;
  display: block;
}

.dash-stat-label {
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: rgba(241, 245, 249, 0.85);
}

.dash-stat-value {
  position: relative;
  z-index: 1;
  margin-top: 0.85rem;
  font-size: clamp(1.25rem, 2.8vw, 1.85rem);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.02em;
}

.dash-stat-hint {
  position: relative;
  z-index: 1;
  margin-top: 0.4rem;
  font-size: 0.76rem;
  color: rgba(226, 232, 240, 0.75);
  line-height: 1.35;
}

.dash-spark {
  width: 100%;
  height: 40px;
  margin-top: 0.65rem;
  display: block;
  border-radius: 8px;
  opacity: 0.92;
}

/* Charts row */
.dash-charts {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
  gap: 1rem;
  margin-bottom: 1.35rem;
}

@media (max-width: 992px) {
  .dash-charts {
    grid-template-columns: 1fr;
  }
}

.dash-chart-panel {
  position: relative;
  border-radius: 18px;
  padding: 1rem 1.05rem;
  border: 1px solid var(--dash-glass-border);
  background: var(--dash-glass);
  backdrop-filter: blur(26px);
  box-shadow: var(--dash-shadow);
  animation: dashFadeInUp 0.82s cubic-bezier(0.22, 1, 0.36, 1) 0.12s both;
}

.dash-chart-panel h3 {
  margin: 0 0 0.85rem;
  font-size: 0.92rem;
  font-weight: 700;
  color: #e2e8f0;
  letter-spacing: 0.02em;
}

.dash-chart-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.65rem;
}

.dash-chart-head-left {
  min-width: 0;
}

.dash-chart-head .dash-chart-panel-title,
.dash-chart-head h3 {
  margin: 0;
}

.dash-chart-subtitle {
  margin: 0.25rem 0 0;
  font-size: 0.78rem;
  font-weight: 500;
  color: #94a3b8;
}

.dash-period-toggle {
  display: inline-flex;
  flex-shrink: 0;
  padding: 0.2rem;
  border-radius: 10px;
  background: rgba(15, 23, 42, 0.55);
  border: 1px solid rgba(148, 163, 184, 0.18);
}

.dash-period-toggle button {
  appearance: none;
  border: none;
  background: transparent;
  color: #94a3b8;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0.35rem 0.65rem;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}

.dash-period-toggle button:hover {
  color: #e2e8f0;
}

.dash-period-toggle button.is-active {
  background: rgba(255, 255, 255, 0.95);
  color: #0f172a;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.18);
}

.dash-chart-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  margin-bottom: 0.75rem;
}

.dash-chart-legend-item {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.78rem;
  font-weight: 600;
  color: #cbd5e1;
}

.dash-chart-legend-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.dash-chart-legend-dot--total {
  background: #38bdf8;
}

.dash-chart-legend-dot--answered {
  background: #22c55e;
}

.dash-chart-canvas-wrap {
  position: relative;
  height: 240px;
}

@media (max-width: 559px) {
  .dash-chart-canvas-wrap {
    height: 200px;
  }
}

.dash-chart-canvas-wrap canvas {
  max-height: 100%;
}

/* Glass panels: quick stats + devices */
.dash-glass-panel {
  position: relative;
  border-radius: 18px;
  padding: 1rem 1.05rem;
  margin-bottom: 1rem;
  border: 1px solid var(--dash-glass-border);
  background: rgba(255, 255, 255, 0.04);
  backdrop-filter: blur(24px);
  box-shadow: var(--dash-shadow);
  animation: dashFadeInUp 0.88s cubic-bezier(0.22, 1, 0.36, 1) 0.2s both;
}

.dash-glass-panel h3 {
  margin: 0 0 0.85rem;
  font-size: 0.92rem;
  font-weight: 700;
  color: #cbd5f5;
}

/* Quick stats (Karaya): двухколоночный блок glassmorphism */
.dash-qs-title {
  margin: 0 0 1rem;
}

.dash-qs-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  min-height: 200px;
  border-radius: 18px;
  padding: 1.5rem;
  background: rgba(22, 27, 34, 0.8);
  backdrop-filter: blur(24px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
}

@media (max-width: 992px) {
  .dash-qs-layout {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
}

.dash-qs-col {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 0;
  background: transparent;
}

.dash-qs-col-billing {
  border-right: 1px solid rgba(255, 255, 255, 0.05);
  padding-right: 1.5rem;
}

@media (max-width: 992px) {
  .dash-qs-col-billing {
    border-right: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    padding-right: 0;
    padding-bottom: 1rem;
  }
}

.dash-qs-col-billing img {
  vertical-align: middle;
  filter: saturate(1.08);
}

.dash-qs-month-stat {
  margin-bottom: 1rem;
}

.dash-qs-month-label {
  text-transform: uppercase;
  font-size: 0.75rem;
  letter-spacing: 0.05em;
  color: #9ca3af;
  margin-bottom: 0.25rem;
}

.dash-qs-month-value {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
}

.dash-qs-month-number {
  font-size: 1.875rem;
  font-weight: 700;
  line-height: 1;
  color: #f3f4f6;
  font-variant-numeric: tabular-nums;
}

.dash-qs-month-unit {
  font-size: 0.875rem;
  color: #6b7280;
}

.dash-qs-duration-block {
  padding-top: 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.dash-qs-duration-label {
  text-transform: uppercase;
  font-size: 0.75rem;
  letter-spacing: 0.05em;
  color: #9ca3af;
  margin-bottom: 0.25rem;
}

.dash-qs-duration-value {
  font-size: 1.5rem;
  font-weight: 600;
  color: #e0f2fe;
  font-variant-numeric: tabular-nums;
}

.dash-premium .dash-qs-col-billing table {
  display: none;
}

.dash-qs-empty {
  margin: 0;
  padding: 1rem 0;
  color: #9ca3af;
}

.dash-qs-bal-title {
  text-transform: uppercase;
  font-size: 0.75rem;
  letter-spacing: 0.05em;
  font-weight: 600;
  color: #9ca3af;
  margin-bottom: 0.5rem;
}

.dash-qs-balance-canvas {
  display: block;
  width: 100%;
  height: 64px;
  margin: 0 0 1rem;
  border-radius: 8px;
  filter: drop-shadow(0 0 4px rgba(139, 92, 246, 0.3));
}

.dash-qs-meta-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.5rem;
  font-size: 0.75rem;
  margin-top: 0.25rem;
  color: #e2e8f0;
}

.dash-qs-meta-lbl {
  color: #6b7280;
}

.dash-qs-meta-val {
  font-weight: 500;
  color: #f3f4f6;
}

.dash-qs-balance-row .dash-qs-meta-lbl {
  font-weight: 400;
}

.dash-qs-balance-big {
  font-size: 0.875rem;
  font-weight: 400;
  color: #60a5fa;
  font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
  font-variant-numeric: tabular-nums;
  color: #bae6fd;
  letter-spacing: -0.01em;
}

/* Устройства: сетка карточек (дашборд) */
.dash-dev-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1rem;
  margin-top: 0.35rem;
}

.dash-dev-card {
  position: relative;
  padding: 1.15rem 1.15rem 1.05rem;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: linear-gradient(
    158deg,
    rgba(255, 255, 255, 0.07) 0%,
    rgba(255, 255, 255, 0.02) 48%,
    rgba(129, 140, 248, 0.06) 100%
  );
  box-shadow:
    0 12px 40px rgba(0, 0, 0, 0.35),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(20px);
  transition:
    transform 0.34s cubic-bezier(0.22, 1, 0.36, 1),
    box-shadow 0.34s ease,
    border-color 0.3s ease;
}

.dash-dev-card:hover {
  transform: translateY(-5px);
  border-color: rgba(129, 140, 248, 0.45);
  box-shadow:
    0 20px 52px rgba(0, 0, 0, 0.45),
    0 0 40px rgba(99, 102, 241, 0.2);
}

.dash-dev-status-tag {
  position: absolute;
  top: 0.85rem;
  right: 0.85rem;
  padding: 0.32rem 0.72rem;
  border-radius: 999px;
  font-size: 0.62rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.dash-dev-status-tag.is-on {
  background: rgba(52, 211, 153, 0.18);
  color: #6ee7b7;
  border: 1px solid rgba(52, 211, 153, 0.42);
  box-shadow: 0 0 18px rgba(52, 211, 153, 0.2);
}

.dash-dev-status-tag.is-off {
  background: rgba(248, 113, 113, 0.12);
  color: #fca5a5;
  border: 1px solid rgba(248, 113, 113, 0.32);
}

.dash-dev-ext-num {
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #eef2ff;
  margin-bottom: 0.45rem;
  padding-right: 5rem;
}

.dash-dev-card-sub {
  font-size: 0.78rem;
  color: rgba(148, 163, 184, 0.95);
  margin-bottom: 0.85rem;
  line-height: 1.4;
}

.dash-dev-card-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.65rem;
  font-size: 0.76rem;
  padding: 0.35rem 0;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
}

.dash-dev-card-row:first-of-type {
  border-top: none;
  padding-top: 0;
}

.dash-dev-k {
  color: rgba(148, 163, 184, 0.9);
  flex-shrink: 0;
}

.dash-dev-v {
  font-weight: 600;
  color: #f1f5f9;
  text-align: right;
  word-break: break-word;
}


/* Совместимость старых вложений .dash-quick-inner внутри дашборда */
.dash-premium .dash-quick-inner {
  font-size: 0.82rem;
  line-height: 1.5;
  color: #e2e8f0;
  overflow-x: auto;
}

/* Toolbar refresh */
/* (removed empty hook rule) */

body .main .toolbar .dash-btn-refresh {
  padding: 0.5rem 1.1rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.45), rgba(236, 72, 153, 0.35));
  color: #fff;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
  transition:
    transform 0.25s ease,
    box-shadow 0.25s ease;
}

body .main .toolbar .dash-btn-refresh:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 32px rgba(99, 102, 241, 0.35);
}

/* Skeleton */
.dash-skeleton {
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--dash-glass-border);
  overflow: hidden;
  position: relative;
  min-height: 120px;
}

.dash-skeleton::after {
  content: '';
  position: absolute;
  inset: 0;
  transform: translateX(-100%);
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.08),
    transparent
  );
  animation: dashShimmer 1.4s infinite;
}

.dash-skel-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  margin-bottom: 1.25rem;
}

@media (max-width: 1199px) {
  .dash-skel-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 559px) {
  .dash-skel-grid {
    grid-template-columns: 1fr;
  }
}

.dash-empty-charts {
  margin: 0;
  padding: 2rem 1rem;
  text-align: center;
  color: var(--dash-muted);
  font-size: 0.88rem;
}

/* Devices table dark premium theme */
.dash-devices-table-wrap {
  margin-top: 1rem;
  border-radius: 16px;
  max-width: 100%;
  min-width: 0;
  overflow-x: auto;
  overflow-y: visible;
  -webkit-overflow-scrolling: touch;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

/* Пагинация «Последние звонки» / записи: один ряд, без «лестницы» из десятков кнопок */
.lc-pagination {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.65rem 0.85rem;
  min-width: 0;
}

.lc-page-jump-wrap {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  min-width: 0;
  flex: 1 1 auto;
  justify-content: center;
}

.lc-page-jump-label {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin: 0;
  font-size: 0.88rem;
}

.lc-page-jump {
  min-width: 3.25rem;
  max-width: 100%;
  padding: 0.35rem 0.5rem;
}

.lc-page-jump-input {
  box-sizing: border-box;
  width: 4.35rem;
  min-width: 0;
  padding: 0.35rem 0.4rem;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.08);
  color: var(--dash-text, #f1f5f9);
  font-size: 0.88rem;
  font-variant-numeric: tabular-nums;
  text-align: center;
}

.lc-page-jump-input:focus {
  outline: none;
  border-color: rgba(129, 140, 248, 0.85);
  box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.28);
}

.lc-page-jump-input::placeholder {
  color: rgba(148, 163, 184, 0.85);
}

.lc-page-jump-input::-webkit-outer-spin-button,
.lc-page-jump-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.lc-page-jump-input[type='number'] {
  -moz-appearance: textfield;
  appearance: textfield;
}

.lc-page-btn {
  flex: 0 0 auto;
  padding: 0.45rem 0.85rem;
  white-space: nowrap;
}


/* Записи: «Результаты» на всю ширину панели; таблица как у «Последние звонки» (те же padding/раскладка колонок) */
.rec-results-host {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

#rec-export-table th,
#rec-export-table td {
  overflow-wrap: anywhere;
  word-break: break-word;
}

/* Таблица «Записи»: ширина колонок, шапка над данными, действия узкие по центру */
#rec-export-table {
  min-width: 0;
}

#rec-export-table col.rec-col-action {
  width: 3.25rem;
}

#rec-export-table col.rec-col-data {
  width: auto;
}

#rec-export-table th,
#rec-export-table td {
  padding: 0.55rem 0.65rem;
  box-sizing: border-box;
}

#rec-export-table th.rec-th-data,
#rec-export-table td.rec-td-data {
  text-align: left;
  min-width: 0;
}

#rec-export-table th.rec-th-action,
#rec-export-table td.rec-td-action {
  text-align: center;
  vertical-align: middle;
  white-space: nowrap;
}

#rec-export-table td.rec-td-action {
  padding-left: 0.35rem;
  padding-right: 0.35rem;
}

/* Перебиваем поведение «последней колонки» у общей dash-devices-table */
#rec-export-table th:last-child,
#rec-export-table td:last-child {
  text-align: inherit;
}

#rec-export-table th.rec-th-action:last-child,
#rec-export-table td.rec-td-action:last-child {
  text-align: center;
}

#rec-export-table th.rec-th-data:last-child,
#rec-export-table td.rec-td-data:last-child {
  text-align: left;
}

#rec-export-table .rec-cell-text {
  display: block;
  max-width: 100%;
}

#rec-export-table td.rec-td-wrap .rec-cell-text {
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
}

#rec-export-table td.rec-td-ellipsis .rec-cell-text {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#rec-export-table th.rec-th-data {
  vertical-align: bottom;
}

#rec-export-table th.rec-th-action {
  vertical-align: middle;
}

.dash-devices-table {
  width: 100%;
  max-width: 100%;
  border-collapse: collapse;
  font-size: 0.8125rem;
  table-layout: fixed;
}

.dash-devices-table thead {
  background: rgba(255, 255, 255, 0.03);
}

.dash-devices-table thead tr {
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.dash-devices-table th {
  text-align: left;
  padding: 0.45rem 0.4rem;
  font-weight: 500;
  font-size: 0.72rem;
  color: rgba(148, 163, 184, 0.9);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  overflow-wrap: anywhere;
  word-break: break-word;
  vertical-align: bottom;
}

.dash-devices-table th:last-child {
  text-align: right;
}

.dash-devices-table tbody tr {
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  transition: background-color 0.2s ease;
}

.dash-devices-table tbody tr:hover {
  background: rgba(255, 255, 255, 0.02);
}

.dash-devices-table td {
  padding: 0.5rem 0.4rem;
  color: rgba(226, 232, 240, 0.95);
  overflow-wrap: anywhere;
  word-break: break-word;
  vertical-align: top;
}


.dash-devices-table td:last-child {
  text-align: right;
}

.dash-table-id {
  font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
  color: rgba(203, 213, 225, 0.85);
  font-size: 0.85rem;
}

.dash-table-ext {
  font-weight: 500;
  letter-spacing: 0.02em;
  color: #f1f5f9;
}

.dash-table-login {
  color: rgba(148, 163, 184, 0.9);
}

/* Платежи: колонка «Адрес» + копирование */
.payments-address-cell {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.5rem 0.75rem;
}

.payments-address-text {
  flex: 1;
  min-width: 0;
  word-break: break-word;
  color: rgba(226, 232, 240, 0.95);
}

.payments-copy-btn {
  flex-shrink: 0;
  appearance: none;
  font: inherit;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  padding: 0.35rem 0.65rem;
  border-radius: 8px;
  border: 1px solid rgba(56, 189, 248, 0.35);
  background: rgba(56, 189, 248, 0.12);
  color: #7dd3fc;
  cursor: pointer;
  transition:
    background 0.18s ease,
    border-color 0.18s ease;
}

.payments-copy-btn:hover {
  background: rgba(56, 189, 248, 0.2);
  border-color: rgba(56, 189, 248, 0.55);
}

.payments-copy-btn:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.25);
}

.dash-table-status-wrap {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.dash-table-status-icon {
  width: 1.25rem;
  height: 1.25rem;
  flex-shrink: 0;
}

.dash-table-status-icon.online {
  color: #22c55e;
}

.dash-table-status-icon.offline {
  color: #6b7280;
}

.dash-table-status-text {
  color: rgba(203, 213, 225, 0.9);
  font-size: 0.85rem;
}

.dash-table-online-wrap {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.5rem;
}

.dash-table-online-dot {
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 9999px;
  flex-shrink: 0;
}

.dash-table-online-dot.online {
  background: #22c55e;
  box-shadow: 0 0 8px #22c55e;
}

.dash-table-online-dot.offline {
  background: #374151;
}

.dash-table-online-text {
  font-weight: 500;
  font-size: 0.85rem;
}

.dash-table-online-text.online {
  color: #22c55e;
}

.dash-table-online-text.offline {
  color: #6b7280;
}

/* 3 колонки для статистики устройств */
body:has(.dash-premium) .dash-stats.devices-stats {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

@media (max-width: 992px) {
  body:has(.dash-premium) .dash-stats.devices-stats {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 768px) {
  body:has(.dash-premium) .dash-stats.devices-stats {
    grid-template-columns: 1fr;
  }
}

.dash-stat-icon img {
  width: 2.75rem;
  height: 2.75rem;
  object-fit: contain;
  display: block;
  filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.35));
}

/* Космический дизайн для фильтров */
.cosmic-filter-panel {
  backdrop-filter: blur(24px) saturate(180%);
}

.cosmic-date-row select,
.cosmic-date-row input {
  background: rgba(17, 24, 39, 0.8) !important;
  border: 1px solid rgba(139, 92, 246, 0.3) !important;
  color: rgba(255, 255, 255, 0.95) !important;
  padding: 0.5rem 0.75rem !important;
  border-radius: 8px !important;
  font-size: 0.9rem !important;
  transition: all 0.3s ease !important;
  backdrop-filter: blur(10px);
}

.cosmic-date-row select:focus,
.cosmic-date-row input:focus {
  outline: none !important;
  border-color: rgba(139, 92, 246, 0.8) !important;
  box-shadow: 0 0 20px rgba(139, 92, 246, 0.5), 0 0 40px rgba(99, 102, 241, 0.3) !important;
  background: rgba(30, 41, 59, 0.9) !important;
}

.cosmic-date-row select:hover,
.cosmic-date-row input:hover {
  border-color: rgba(139, 92, 246, 0.5) !important;
  background: rgba(30, 41, 59, 0.85) !important;
}

/* Анимация для электрической линии */
@keyframes electric-pulse {
  0%, 100% {
    opacity: 0.6;
    transform: scaleX(1);
  }
  50% {
    opacity: 1;
    transform: scaleX(1.05);
  }
}

/* Анимация блика на кнопке */
@keyframes sparkle-pulse {
  0%, 100% {
    opacity: 0.4;
    transform: scale(1);
  }
  50% {
    opacity: 1;
    transform: scale(1.3);
  }
}

/* Стили для других полей фильтра */
.lc-filters select,
.lc-filters input {
  background: rgba(17, 24, 39, 0.7) !important;
  border: 1px solid rgba(139, 92, 246, 0.25) !important;
  color: rgba(255, 255, 255, 0.9) !important;
  padding: 0.6rem 0.9rem !important;
  border-radius: 10px !important;
  transition: all 0.3s ease !important;
  backdrop-filter: blur(8px);
}

.lc-filters select:focus,
.lc-filters input:focus {
  outline: none !important;
  border-color: rgba(139, 92, 246, 0.7) !important;
  box-shadow: 0 0 25px rgba(139, 92, 246, 0.4) !important;
  background: rgba(30, 41, 59, 0.85) !important;
}

.lc-filters select:hover,
.lc-filters input:hover {
  border-color: rgba(139, 92, 246, 0.4) !important;
  background: rgba(30, 41, 59, 0.75) !important;
}

/* Placeholder для инпутов */
.lc-filters input::placeholder {
  color: rgba(148, 163, 184, 0.6);
  font-style: italic;
}

/* Стили для таблиц статистики */
.us-summary-row {
  margin-bottom: 1.5rem;
}

.us-summary-tables {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.5rem;
  margin-top: 0;
  align-items: stretch;
}

.us-summary-tables > .dash-glass-panel {
  min-height: auto;
  margin: 0;
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
  min-width: 0;
}

.us-summary-tables > .dash-glass-panel > .us-summary-inline {
  flex: 1 1 auto;
  min-height: 0;
}

/* Таблица и кольцевая диаграмма в одной карточке: сверху таблица, снизу график */
.us-summary-inline {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  align-items: stretch;
}

.us-summary-inline-table {
  min-width: 0;
  width: 100%;
}

/* Одинаковая сетка колонок между «Направление звонков» (Type·Count·%) и «Статус» (Disp·Out·In·Total) */
.us-summary-tables .us-summary-table-direction .dash-devices-table,
.us-summary-tables .us-summary-table-disposition .dash-devices-table {
  table-layout: fixed;
  width: 100%;
  border-collapse: collapse;
}

/* Первая колонка текстовых подписей — одинаковая доля под Disposition ↔ Type */
.us-summary-tables .us-summary-table-direction .dash-devices-table th:nth-child(1),
.us-summary-tables .us-summary-table-direction .dash-devices-table td:nth-child(1),
.us-summary-tables .us-summary-table-disposition .dash-devices-table th:nth-child(1),
.us-summary-tables .us-summary-table-disposition .dash-devices-table td:nth-child(1) {
  width: 42%;
}

/* Направление: Count (~как сумма узких числовых в статусе — Out+In занимают почти те же два «слота» по ширине) */
.us-summary-tables .us-summary-table-direction .dash-devices-table th:nth-child(2),
.us-summary-tables .us-summary-table-direction .dash-devices-table td:nth-child(2) {
  width: 29%;
}
.us-summary-tables .us-summary-table-direction .dash-devices-table th:nth-child(3),
.us-summary-tables .us-summary-table-direction .dash-devices-table td:nth-child(3) {
  width: 29%;
}

/* Статус: узкие Out / In как у пары узких полей сверху, Total дополняет ряд как «третья цифра» */
.us-summary-tables .us-summary-table-disposition .dash-devices-table th:nth-child(2),
.us-summary-tables .us-summary-table-disposition .dash-devices-table td:nth-child(2) {
  width: 19%;
}
.us-summary-tables .us-summary-table-disposition .dash-devices-table th:nth-child(3),
.us-summary-tables .us-summary-table-disposition .dash-devices-table td:nth-child(3) {
  width: 19%;
}
.us-summary-tables .us-summary-table-disposition .dash-devices-table th:nth-child(4),
.us-summary-tables .us-summary-table-disposition .dash-devices-table td:nth-child(4) {
  width: 20%;
}

.us-summary-tables .us-summary-table-direction .dash-devices-table td:nth-child(2),
.us-summary-tables .us-summary-table-direction .dash-devices-table td:nth-child(3),
.us-summary-tables .us-summary-table-disposition .dash-devices-table td:nth-child(2),
.us-summary-tables .us-summary-table-disposition .dash-devices-table td:nth-child(3),
.us-summary-tables .us-summary-table-disposition .dash-devices-table td:nth-child(4) {
  text-align: right;
}

.us-summary-tables .us-summary-table-direction .dash-devices-table th:nth-child(2),
.us-summary-tables .us-summary-table-direction .dash-devices-table th:nth-child(3),
.us-summary-tables .us-summary-table-disposition .dash-devices-table th:nth-child(2),
.us-summary-tables .us-summary-table-disposition .dash-devices-table th:nth-child(3),
.us-summary-tables .us-summary-table-disposition .dash-devices-table th:nth-child(4) {
  text-align: right;
}

.us-summary-tables .us-summary-table-direction .dash-devices-table th:nth-child(1),
.us-summary-tables .us-summary-table-disposition .dash-devices-table th:nth-child(1) {
  text-align: left;
}

.us-summary-tables .us-summary-inline-table td,
.us-summary-tables .us-summary-inline-table th {
  overflow-wrap: anywhere;
}

.us-summary-inline-chart {
  min-width: 0;
  max-width: min(260px, 100%);
  width: 100%;
  align-self: center;
  box-sizing: border-box;
}

/* Donut-сводки: те же акценты и hover, что у «Графики и визуализация», чуть компактнее */
.us-summary-inline-chart.user-stats-chart-wrapper {
  width: 100%;
  max-width: min(300px, 100%);
  padding: 1rem 1.1rem 1.2rem;
}

.us-summary-inline-chart.user-stats-chart-wrapper canvas {
  max-height: min(260px, 58vw);
  width: 100% !important;
}

@media (max-width: 992px) {
  .us-summary-tables > .dash-glass-panel > .us-summary-inline {
    min-height: unset;
    display: flex;
    flex-direction: column;
    gap: 1.1rem;
  }

  .us-summary-inline-chart,
  .us-summary-inline-chart.user-stats-chart-wrapper {
    width: min(300px, 100%);
    max-width: min(300px, 100%);
  }
}

@media (max-width: 768px) {
  .us-summary-tables {
    grid-template-columns: 1fr;
  }

  .us-summary-inline-chart {
    max-width: min(288px, 100%);
  }
}

/* Стили для мини-таблиц статистики - используем те же стили что и dash-devices-table */
.us-mini-table .dash-devices-table-wrap {
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(15, 23, 42, 0.4);
  box-shadow: 
    0 4px 15px rgba(0, 0, 0, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.us-mini-table .dash-devices-table {
  width: 100%;
  font-size: 0.85rem;
  table-layout: auto;
}

.us-mini-table .dash-devices-table thead {
  background: rgba(99, 102, 241, 0.1);
  border-bottom: 2px solid rgba(139, 92, 246, 0.3);
}

.us-mini-table .dash-devices-table th {
  padding: 0.7rem 0.9rem;
  font-size: 0.75rem;
  color: rgba(196, 181, 253, 0.95);
  font-weight: 700;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.us-mini-table .dash-devices-table td {
  padding: 0.8rem 0.9rem;
  color: rgba(226, 232, 240, 0.95);
  text-shadow: 0 1px 1px rgba(0, 0, 0, 0.2);
}

.us-mini-table .dash-devices-table tbody tr {
  transition: all 0.2s ease;
}

.us-mini-table .dash-devices-table tbody tr:hover {
  background: rgba(99, 102, 241, 0.08);
  transform: translateX(2px);
}

/* Стили для графиков статистики с 3D эффектами */
.user-stats-chart-root {
  margin-top: 1.5rem;
  margin-bottom: 1.5rem;
}

.user-stats-charts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.user-stats-bar-charts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 1.5rem;
}

.user-stats-chart-wrapper {
  position: relative;
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.8) 0%, rgba(30, 41, 59, 0.7) 100%);
  border: 1px solid rgba(139, 92, 246, 0.3);
  border-radius: 16px;
  padding: 1.5rem;
  backdrop-filter: blur(20px);
  transition: all 0.4s cubic-bezier(0.22, 1, 0.36, 1);
  
  /* 3D эффект - объемная тень */
  box-shadow: 
    0 10px 30px rgba(0, 0, 0, 0.5),
    0 20px 60px rgba(0, 0, 0, 0.3),
    0 0 50px rgba(99, 102, 241, 0.15),
    inset 0 1px 0 rgba(255, 255, 255, 0.1),
    inset 0 -1px 0 rgba(0, 0, 0, 0.3);
  
  /* 3D трансформация */
  transform: perspective(1000px) rotateX(0deg) rotateY(0deg) translateZ(0px);
  transform-style: preserve-3d;
}

/* 3D эффект при наведении */
.user-stats-chart-wrapper:hover {
  border-color: rgba(139, 92, 246, 0.6);
  box-shadow: 
    0 15px 40px rgba(0, 0, 0, 0.6),
    0 25px 70px rgba(0, 0, 0, 0.4),
    0 0 80px rgba(99, 102, 241, 0.3),
    0 0 120px rgba(139, 92, 246, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.15),
    inset 0 -2px 0 rgba(0, 0, 0, 0.4);
  transform: perspective(1000px) rotateX(2deg) rotateY(-2deg) translateZ(20px) translateY(-8px);
}

/* Псевдо-элемент для создания 3D глубины */
.user-stats-chart-wrapper::before {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: 16px;
  padding: 2px;
  background: linear-gradient(135deg, 
    rgba(139, 92, 246, 0.3) 0%,
    rgba(99, 102, 241, 0.2) 50%,
    rgba(168, 85, 247, 0.3) 100%
  );
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask-composite: exclude;
  opacity: 0;
  transition: opacity 0.4s ease;
  z-index: -1;
}

.user-stats-chart-wrapper:hover::before {
  opacity: 1;
}

/* 3D эффект отражения снизу */
.user-stats-chart-wrapper::after {
  content: '';
  position: absolute;
  bottom: -30px;
  left: 10%;
  right: 10%;
  height: 20px;
  background: radial-gradient(ellipse at center, 
    rgba(139, 92, 246, 0.2) 0%, 
    transparent 70%
  );
  filter: blur(10px);
  opacity: 0;
  transition: opacity 0.4s ease;
  z-index: -2;
}

.user-stats-chart-wrapper:hover::after {
  opacity: 1;
}

.user-stats-chart-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: rgba(196, 181, 253, 0.95);
  margin-bottom: 1.25rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  text-shadow: 
    0 2px 4px rgba(0, 0, 0, 0.5),
    0 0 20px rgba(139, 92, 246, 0.4);
  position: relative;
  padding-bottom: 0.5rem;
}

/* Подчеркивание заголовка с градиентом */
.user-stats-chart-title::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, 
    rgba(139, 92, 246, 0.6) 0%,
    rgba(99, 102, 241, 0.4) 50%,
    rgba(139, 92, 246, 0.6) 100%
  );
  border-radius: 2px;
  box-shadow: 0 0 10px rgba(139, 92, 246, 0.5);
}

/* Canvas внутри wrapper с дополнительным 3D эффектом */
.user-stats-chart-wrapper canvas {
  position: relative;
  z-index: 1;
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.3));
  transition: filter 0.3s ease;
}

.user-stats-chart-wrapper:hover canvas {
  filter: drop-shadow(0 6px 12px rgba(0, 0, 0, 0.4));
}

@media (max-width: 768px) {
  .user-stats-charts,
  .user-stats-bar-charts {
    grid-template-columns: 1fr;
  }
  
  /* Упрощаем 3D эффекты на мобильных */
  .user-stats-chart-wrapper {
    transform: none;
  }
  
  .user-stats-chart-wrapper:hover {
    transform: translateY(-4px);
  }
}

/* —— Страница входа клиента (визуально как dash-premium / боковой brand-meta) —— */

body.login-body--premium {
  --login-shell: #0c121a;
  --login-glass: rgba(255, 255, 255, 0.06);
  --login-glass-border: rgba(255, 255, 255, 0.12);
  --login-text: #f1f5f9;
  --login-muted: #94a3b8;
  --login-accent: #38bdf8;
  margin: 0;
  min-height: 100vh;
  color: var(--login-text);
  background: var(--login-shell);
  color-scheme: dark;
  font-family: "Manrope", system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
}

html:has(body.login-body--premium) {
  background: var(--login-shell);
  color-scheme: dark;
}

body.login-body--premium.login-body {
  display: block;
}

.login-premium-shell {
  position: relative;
  isolation: isolate;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.35rem 1rem 2rem;
  box-sizing: border-box;
}

.login-premium-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 14% 10%, rgba(18, 148, 109, 0.14), transparent 42%),
    radial-gradient(circle at 100% 0%, rgba(91, 124, 255, 0.1), transparent 36%),
    radial-gradient(ellipse 100% 80% at 50% -20%, rgba(99, 102, 241, 0.07), transparent 55%);
  opacity: 0.85;
}

.login-premium-overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: linear-gradient(
    180deg,
    rgba(10, 15, 24, 0.55) 0%,
    var(--login-shell) 42%,
    var(--login-shell) 100%
  );
}

.login-premium-inner {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 420px;
  animation: dashFadeInUp 0.72s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.login-panel-premium {
  border-radius: 18px;
  padding: 1.35rem 1.35rem 1.15rem;
  border: 1px solid var(--login-glass-border);
  background: linear-gradient(
    165deg,
    rgba(255, 255, 255, 0.09) 0%,
    var(--login-glass) 45%,
    rgba(15, 23, 42, 0.35) 100%
  );
  backdrop-filter: blur(22px);
  box-shadow:
    0 18px 50px rgba(0, 0, 0, 0.45),
    inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

.login-brand-meta {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  align-items: center;
  gap: 14px;
  padding: 16px 18px;
  margin: 0 0 1.25rem;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.075);
  box-shadow: 0 10px 18px rgba(0, 0, 0, 0.14);
}

.login-brand-logo-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 72px;
  height: 72px;
  flex-shrink: 0;
}

.login-brand-logo {
  width: 64px;
  height: 64px;
  object-fit: contain;
  display: block;
  transform: scale(1.38);
  transform-origin: center center;
}

.login-brand-copy {
  display: grid;
  gap: 6px;
  align-content: center;
  min-width: 0;
}

.login-brand-title {
  margin: 0;
  font-size: clamp(1.15rem, 3.5vw, 1.45rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.15;
  background: linear-gradient(90deg, #fff 0%, #c7d2fe 45%, #e9d5ff 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.login-brand-sub {
  margin: 0;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--login-muted);
  line-height: 1.35;
}

.login-form-premium label {
  display: block;
  margin: 0.85rem 0 0.3rem;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: rgba(148, 163, 184, 0.95);
}

.login-form-premium label:first-of-type {
  margin-top: 0;
}

.login-form-premium input {
  width: 100%;
  box-sizing: border-box;
  padding: 0.62rem 0.85rem;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(15, 23, 42, 0.55);
  color: var(--login-text);
  font: inherit;
  font-size: 0.95rem;
  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease,
    background 0.2s ease;
}

.login-form-premium input::placeholder {
  color: rgba(148, 163, 184, 0.5);
}

.login-form-premium input:hover {
  border-color: rgba(255, 255, 255, 0.2);
}

.login-form-premium input:focus {
  outline: none;
  border-color: rgba(56, 189, 248, 0.55);
  box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.22);
  background: rgba(15, 23, 42, 0.72);
}

.login-submit-premium {
  margin-top: 0.85rem;
  width: 100%;
  padding: 0.72rem 1rem;
  border: 1px solid rgba(56, 189, 248, 0.35);
  border-radius: 14px;
  font: inherit;
  font-size: 0.95rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  cursor: pointer;
  color: #0c121a;
  background: linear-gradient(180deg, #7dd3fc 0%, var(--login-accent) 48%, #0ea5e9 100%);
  box-shadow:
    0 10px 28px rgba(56, 189, 248, 0.22),
    inset 0 1px 0 rgba(255, 255, 255, 0.35);
  transition:
    transform 0.18s ease,
    box-shadow 0.18s ease,
    filter 0.18s ease;
}

.login-submit-premium:hover {
  filter: brightness(1.06);
  box-shadow:
    0 14px 36px rgba(56, 189, 248, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.4);
  transform: translateY(-1px);
}

.login-submit-premium:active {
  transform: translateY(0);
}

.login-submit-premium:focus-visible {
  outline: none;
  box-shadow:
    0 0 0 3px rgba(56, 189, 248, 0.45),
    0 10px 28px rgba(0, 0, 0, 0.35);
}

.login-lang-switch {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-top: 1.15rem;
  padding: 0.55rem 0.65rem;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(15, 23, 42, 0.42);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.login-lang-switch-label {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(226, 232, 240, 0.82);
  white-space: nowrap;
}

.login-lang-switch-options {
  display: inline-flex;
  gap: 0.45rem;
  padding: 0.2rem;
  border-radius: 999px;
  background: rgba(2, 6, 23, 0.42);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.login-lang-option {
  appearance: none;
  display: inline-flex;
  align-items: center;
  gap: 0.38rem;
  padding: 0.42rem 0.72rem;
  border: 1px solid transparent;
  border-radius: 999px;
  background: transparent;
  color: rgba(226, 232, 240, 0.78);
  font: inherit;
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition:
    background 0.18s ease,
    border-color 0.18s ease,
    color 0.18s ease,
    box-shadow 0.18s ease,
    transform 0.18s ease;
}

.login-lang-flag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 15px;
  border-radius: 3px;
  overflow: hidden;
  flex-shrink: 0;
  box-shadow:
    0 0 0 1px rgba(15, 23, 42, 0.22),
    0 1px 2px rgba(0, 0, 0, 0.18);
}

.login-lang-flag svg {
  display: block;
  width: 100%;
  height: 100%;
}

.login-lang-option:hover {
  color: #f8fafc;
  background: rgba(255, 255, 255, 0.08);
}

.login-lang-option.is-active {
  color: #0c121a;
  background: linear-gradient(180deg, #7dd3fc 0%, var(--login-accent) 48%, #0ea5e9 100%);
  border-color: rgba(56, 189, 248, 0.45);
  box-shadow:
    0 8px 20px rgba(56, 189, 248, 0.22),
    inset 0 1px 0 rgba(255, 255, 255, 0.35);
}

.login-lang-option:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.35);
}

.login-error-premium {
  margin: 0.85rem 0 0;
  font-size: 0.88rem;
  font-weight: 600;
  color: #fecaca;
  text-shadow: 0 0 24px rgba(248, 113, 113, 0.35);
}

@media (prefers-reduced-motion: reduce) {
  .login-premium-inner {
    animation: none;
  }

  .login-submit-premium,
  .login-submit-premium:hover,
  .login-submit-premium:active {
    transform: none;
    transition: none;
  }
}

/* SIP Devices management */
.dash-devices-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.dash-devices-toolbar .btn-create {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.45rem 1rem;
  border: none;
  border-radius: 8px;
  background: linear-gradient(135deg, #4c1d95, #5b21b6);
  color: #fff;
  font-weight: 600;
  cursor: pointer;
}

.dash-devices-toolbar .btn-delete {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.45rem 1rem;
  border: none;
  border-radius: 8px;
  background: linear-gradient(135deg, #dc2626, #ef4444);
  color: #fff;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 2px 12px rgba(239, 68, 68, 0.4);
}

.dash-devices-toolbar .btn-delete:not(:disabled):hover {
  background: linear-gradient(135deg, #b91c1c, #f87171);
  box-shadow: 0 4px 18px rgba(239, 68, 68, 0.55);
}

.dash-devices-toolbar .btn-delete:disabled {
  opacity: 0.38;
  cursor: not-allowed;
  box-shadow: none;
}

.dash-devices-table .col-check {
  width: 36px;
  text-align: center;
}

.dash-devices-table tbody tr.dash-device-row {
  cursor: pointer;
}

.dash-devices-table tbody tr.dash-device-row:hover td {
  background: rgba(56, 189, 248, 0.08);
}

#modal-root .device-field-row input[readonly] {
  color: var(--dash-muted);
  cursor: default;
}

.dash-toggle {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
}

.dash-toggle input {
  opacity: 0;
  width: 0;
  height: 0;
}

.dash-toggle-slider {
  position: absolute;
  inset: 0;
  border-radius: 999px;
  background: #cbd5e1;
  cursor: pointer;
  transition: background 0.2s ease;
}

.dash-toggle-slider::before {
  content: '';
  position: absolute;
  width: 18px;
  height: 18px;
  left: 3px;
  top: 3px;
  border-radius: 50%;
  background: #fff;
  transition: transform 0.2s ease;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.dash-toggle input:checked + .dash-toggle-slider {
  background: linear-gradient(135deg, #5b21b6, #7c3aed);
}

.dash-toggle input:checked + .dash-toggle-slider::before {
  transform: translateX(20px);
}

.dash-toggle input:disabled + .dash-toggle-slider {
  opacity: 0.6;
  cursor: wait;
}

.dash-toggle input:disabled + .dash-toggle-slider {
  opacity: 0.6;
  cursor: wait;
}

#modal-root .modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  background: rgba(4, 8, 16, 0.72);
  backdrop-filter: blur(6px);
}

#modal-root .modal.device-modal {
  width: min(520px, 100%);
  --dash-text: #f1f5f9;
  --dash-muted: #94a3b8;
  --dash-glass-border: rgba(255, 255, 255, 0.12);
  background: linear-gradient(165deg, rgba(18, 24, 38, 0.98) 0%, rgba(10, 15, 24, 0.98) 100%);
  border-radius: 16px;
  border: 1px solid var(--dash-glass-border);
  padding: 1.25rem 1.5rem 1.5rem;
  box-shadow: var(--dash-shadow), 0 0 0 1px rgba(255, 255, 255, 0.04) inset;
  color: var(--dash-text);
}

#modal-root .device-modal h3 {
  margin: 0 0 0.25rem;
  font-size: 1.35rem;
  color: var(--dash-text);
  font-weight: 600;
}

#modal-root .device-modal .device-modal-section {
  margin-top: 1rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--dash-glass-border);
}

#modal-root .modal-loading .modal-loading-body {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.85rem;
  min-height: 120px;
  padding: 1.25rem 0 0.5rem;
}

#modal-root .modal-loading-spinner {
  width: 36px;
  height: 36px;
  border: 3px solid rgba(148, 163, 184, 0.25);
  border-top-color: #a78bfa;
  border-radius: 50%;
  animation: modal-spin 0.75s linear infinite;
}

#modal-root .modal-loading-text {
  margin: 0;
  color: var(--dash-muted);
  font-size: 0.95rem;
}

@keyframes modal-spin {
  to {
    transform: rotate(360deg);
  }
}

.dash-devices-table .col-status {
  width: 72px;
  text-align: center;
  vertical-align: middle;
}

.dash-devices-table .col-status .dash-toggle {
  margin: 0 auto;
}

#modal-root .device-modal .device-modal-section h4 {
  margin: 0 0 1rem;
  font-size: 1rem;
  color: var(--dash-text);
}

#modal-root .device-field {
  margin-bottom: 1rem;
}

#modal-root .device-field label {
  display: block;
  margin-bottom: 0.35rem;
  font-size: 0.85rem;
  color: #cbd5e1;
  font-weight: 500;
}

#modal-root .device-field-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  border-bottom: 1px solid rgba(148, 163, 184, 0.35);
}

#modal-root .device-field-row input,
#modal-root .device-field-row select {
  flex: 1;
  border: none;
  padding: 0.5rem 0;
  font-size: 0.95rem;
  background: transparent;
  outline: none;
  color: var(--dash-text);
}

#modal-root .device-field-row input::placeholder {
  color: rgba(148, 163, 184, 0.55);
}

#modal-root .device-field-row select {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--dash-glass-border);
  border-radius: 8px;
  padding: 0.45rem 0.65rem;
  color: var(--dash-text);
}

#modal-root .device-field-row input[type='number'] {
  -moz-appearance: textfield;
}

#modal-root .device-field-row input[type='number']::-webkit-outer-spin-button,
#modal-root .device-field-row input[type='number']::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

#modal-root .device-field-row select option {
  background: #0f172a;
  color: var(--dash-text);
}

#modal-root .device-gen-btn {
  border: none;
  background: transparent;
  color: #4ade80;
  font-size: 1.1rem;
  cursor: pointer;
  padding: 0.25rem;
}

#modal-root .device-modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.65rem;
  margin-top: 1.25rem;
}

#modal-root .device-close-btn {
  padding: 0.55rem 1.15rem;
  border: 1px solid var(--dash-glass-border);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--dash-text);
  font-weight: 600;
  cursor: pointer;
}

#modal-root .device-close-btn:hover {
  background: rgba(255, 255, 255, 0.1);
}

#modal-root .device-save-btn {
  padding: 0.55rem 1.25rem;
  border: none;
  border-radius: 8px;
  background: linear-gradient(135deg, #4c1d95, #5b21b6);
  color: #fff;
  font-weight: 600;
  cursor: pointer;
}

#modal-root .device-save-btn:hover {
  filter: brightness(1.08);
}

#modal-root .device-modal-error {
  margin-top: 0.75rem;
  color: #fca5a5;
  font-size: 0.85rem;
}

.dash-section-heading {
  margin: 0 0 1rem;
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--dash-text);
}

.reseller-customers-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
  margin-bottom: 0.75rem;
}

.reseller-sip-toolbar {
  align-items: center;
}

.dash-devices-toolbar .customers-search {
  margin-left: auto;
  min-width: 220px;
  max-width: 340px;
  flex: 1 1 220px;
  padding: 0.52rem 1.1rem 0.52rem 2.5rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cline x1='16.65' y1='16.65' x2='21' y2='21'/%3E%3C/svg%3E")
    no-repeat 0.95rem center,
    rgba(15, 23, 42, 0.55);
  color: var(--dash-text);
  font-size: 0.88rem;
  line-height: 1.35;
  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease,
    background-color 0.2s ease;
}

.dash-devices-toolbar .customers-search::-webkit-search-cancel-button {
  -webkit-appearance: none;
  height: 14px;
  width: 14px;
  margin-left: 0.25rem;
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cline x1='18' y1='6' x2='6' y2='18'/%3E%3Cline x1='6' y1='6' x2='18' y2='18'/%3E%3C/svg%3E")
    center / contain no-repeat;
  cursor: pointer;
  opacity: 0.75;
}

.dash-devices-toolbar .customers-search::-webkit-search-cancel-button:hover {
  opacity: 1;
}

.dash-devices-toolbar .customers-search::placeholder {
  color: rgba(148, 163, 184, 0.78);
}

.dash-devices-toolbar .customers-search:hover {
  border-color: rgba(255, 255, 255, 0.22);
  background-color: rgba(15, 23, 42, 0.68);
}

.dash-devices-toolbar .customers-search:focus {
  outline: none;
  border-color: rgba(129, 140, 248, 0.65);
  box-shadow:
    0 0 0 3px rgba(99, 102, 241, 0.18),
    0 4px 18px rgba(15, 23, 42, 0.35);
  background-color: rgba(15, 23, 42, 0.78);
}

.reseller-customers-pager {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
  justify-content: flex-end;
  margin-top: 0.75rem;
  color: var(--dash-muted);
  font-size: 0.82rem;
}

.reseller-customers-pager button {
  padding: 0.35rem 0.7rem;
  border-radius: 8px;
  border: 1px solid var(--dash-glass-border);
  background: rgba(255, 255, 255, 0.06);
  color: var(--dash-text);
  cursor: pointer;
}

.reseller-customers-pager button:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.1);
}

.reseller-customers-pager button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.reseller-customers-pager .rch-select-trigger,
.reseller-customers-pager select {
  padding: 0.35rem 0.55rem;
  border-radius: 8px;
  border: 1px solid var(--dash-glass-border);
  background: rgba(255, 255, 255, 0.06);
  color: var(--dash-text);
}

.reseller-customers-pager span {
  color: var(--dash-muted);
}

#modal-root .customer-form-section-title {
  margin: 1.1rem 0 0.75rem;
  font-size: 0.95rem;
  font-weight: 600;
  color: #e2e8f0;
  letter-spacing: 0.02em;
}

#modal-root .customer-form-section-title:first-of-type {
  margin-top: 0;
}

#modal-root .device-field-checkbox {
  margin-top: 0.25rem;
}

#modal-root .customer-checkbox-label {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  color: #e2e8f0;
  font-size: 0.9rem;
  cursor: pointer;
}

#modal-root .customer-checkbox-label input[type='checkbox'] {
  width: 16px;
  height: 16px;
  accent-color: #7c3aed;
}

.customer-balance-wrap {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}

.customer-balance-value {
  min-width: 1.5rem;
}

.customer-balance-add-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  padding: 0;
  border: none;
  border-radius: 6px;
  background: linear-gradient(135deg, #4c1d95, #7c3aed);
  color: #fff;
  font-size: 1rem;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(124, 58, 237, 0.35);
}

.customer-balance-add-btn:hover {
  background: linear-gradient(135deg, #5b21b6, #8b5cf6);
  box-shadow: 0 3px 12px rgba(124, 58, 237, 0.5);
}

#modal-root .customer-refill-modal textarea {
  width: 100%;
  min-height: 72px;
  padding: 0.55rem 0.65rem;
  border: 1px solid rgba(148, 163, 184, 0.35);
  border-radius: 8px;
  background: rgba(15, 23, 42, 0.55);
  color: #e2e8f0;
  font: inherit;
  resize: vertical;
}

#modal-root .modal.connect-route-modal {
  width: min(920px, 100%);
}

#modal-root .connect-route-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem 1.25rem;
  align-items: start;
}

#modal-root .connect-route-form-col {
  border: 1px solid var(--dash-glass-border);
  border-radius: 12px;
  padding: 1rem 1.1rem 1.15rem;
  background: rgba(255, 255, 255, 0.02);
}

#modal-root .connect-route-form-col .customer-form-section-title {
  margin-top: 0;
  margin-bottom: 0.85rem;
  padding-bottom: 0.55rem;
  border-bottom: 1px solid rgba(148, 163, 184, 0.15);
}

#modal-root .country-search-select {
  position: relative;
  width: 100%;
}

#modal-root .country-search-trigger {
  width: 100%;
  text-align: left;
  padding: 0.55rem 2rem 0.55rem 0.65rem;
  border: 1px solid rgba(148, 163, 184, 0.35);
  border-radius: 8px;
  background: rgba(15, 23, 42, 0.55);
  color: #e2e8f0;
  font: inherit;
  cursor: pointer;
  position: relative;
}

#modal-root .country-search-trigger::after {
  content: '▾';
  position: absolute;
  right: 0.65rem;
  top: 50%;
  transform: translateY(-50%);
  color: #94a3b8;
  pointer-events: none;
}

#modal-root .country-search-trigger--empty {
  color: #94a3b8;
}

#modal-root .country-search-panel {
  position: absolute;
  z-index: 30;
  left: 0;
  right: 0;
  top: calc(100% + 4px);
  border: 1px solid rgba(148, 163, 184, 0.35);
  border-radius: 10px;
  background: rgba(15, 23, 42, 0.98);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.45);
  overflow: hidden;
}

#modal-root .country-search-input {
  width: 100%;
  box-sizing: border-box;
  padding: 0.55rem 0.65rem;
  border: none;
  border-bottom: 1px solid rgba(148, 163, 184, 0.2);
  background: rgba(255, 255, 255, 0.04);
  color: #e2e8f0;
  font: inherit;
}

#modal-root .country-search-list {
  list-style: none;
  margin: 0;
  padding: 0.25rem 0;
  max-height: 220px;
  overflow-y: auto;
}

#modal-root .country-search-option {
  display: block;
  width: 100%;
  text-align: left;
  padding: 0.45rem 0.75rem;
  border: none;
  background: transparent;
  color: #e2e8f0;
  font: inherit;
  cursor: pointer;
}

#modal-root .country-search-option:hover,
#modal-root .country-search-option.is-selected {
  background: rgba(124, 58, 237, 0.18);
}

#modal-root .country-search-empty {
  padding: 0.65rem 0.75rem;
  color: #94a3b8;
  font-size: 0.9rem;
}

@media (max-width: 820px) {
  #modal-root .connect-route-form-grid {
    grid-template-columns: 1fr;
  }
}

/* Reseller call history — filters & actions */
.reseller-call-history-panel {
  background: linear-gradient(
    135deg,
    rgba(15, 23, 42, 0.96) 0%,
    rgba(30, 41, 59, 0.9) 50%,
    rgba(15, 23, 42, 0.96) 100%
  );
  background-image:
    radial-gradient(ellipse 120% 100% at 50% -20%, rgba(99, 102, 241, 0.18), transparent 60%),
    radial-gradient(circle at 85% 15%, rgba(168, 85, 247, 0.14), transparent 45%),
    radial-gradient(circle at 10% 85%, rgba(59, 130, 246, 0.1), transparent 45%),
    linear-gradient(135deg, rgba(15, 23, 42, 0.96) 0%, rgba(30, 41, 59, 0.9) 50%, rgba(15, 23, 42, 0.96) 100%);
  border: 1px solid rgba(139, 92, 246, 0.35);
  box-shadow:
    0 0 45px rgba(99, 102, 241, 0.14),
    0 20px 60px rgba(0, 0, 0, 0.45),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
  overflow: visible;
}

.reseller-call-history-filter-title {
  color: rgba(255, 255, 255, 0.96) !important;
  text-shadow: 0 0 22px rgba(139, 92, 246, 0.45);
  margin-bottom: 1rem !important;
  font-size: 1.05rem !important;
  letter-spacing: 0.02em;
}

.reseller-call-history-results-panel {
  border: 1px solid rgba(139, 92, 246, 0.22);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35);
}

.reseller-call-history-filters {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.85rem 1rem;
  margin-bottom: 0.25rem;
}

.reseller-call-history-field {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  min-width: 0;
  padding: 0.55rem 0.65rem;
  border-radius: 10px;
  background: rgba(17, 24, 39, 0.5);
  border: 1px solid rgba(139, 92, 246, 0.18);
  transition: border-color 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
}

.reseller-call-history-field:focus-within {
  border-color: rgba(139, 92, 246, 0.5);
  background: rgba(30, 41, 59, 0.55);
  box-shadow: 0 0 22px rgba(99, 102, 241, 0.14), inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.reseller-call-history-field label {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: rgba(196, 181, 253, 0.88);
}

.reseller-call-history-split {
  display: flex;
  gap: 0.35rem;
  min-width: 0;
}

.reseller-call-history-split select {
  flex: 0 0 38%;
  min-width: 0;
}

.reseller-call-history-split input,
.reseller-call-history-field > input[type='text'],
.reseller-call-history-field > select,
.reseller-call-history-field > input[type='datetime-local'] {
  flex: 1;
  min-width: 0;
  width: 100%;
  box-sizing: border-box;
  background: rgba(15, 23, 42, 0.75);
  border: 1px solid rgba(139, 92, 246, 0.28);
  color: rgba(255, 255, 255, 0.95);
  border-radius: 8px;
  padding: 0.48rem 0.6rem;
  font-size: 0.84rem;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  color-scheme: dark;
}

.reseller-call-history-field > input[type='text']:hover,
.reseller-call-history-field > select:hover,
.reseller-call-history-field > input[type='datetime-local']:hover {
  border-color: rgba(167, 139, 250, 0.45);
}

.reseller-call-history-field > input:focus,
.reseller-call-history-field > select:focus {
  outline: none;
  border-color: rgba(167, 139, 250, 0.75);
  box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.25);
}

.reseller-call-history-field > select option {
  background: #1e293b;
  color: #f1f5f9;
}

.reseller-call-history-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 0.85rem;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(139, 92, 246, 0.25);
}

.rch-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.58rem 1.45rem;
  border-radius: 10px;
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: transform 0.22s ease, box-shadow 0.22s ease, background 0.22s ease, border-color 0.22s ease;
  min-width: 7.5rem;
  line-height: 1.2;
}

.rch-btn--search {
  border: none;
  color: #fff;
  background: linear-gradient(135deg, #6366f1 0%, #7c3aed 55%, #5b21b6 100%);
  box-shadow:
    0 0 28px rgba(139, 92, 246, 0.45),
    0 6px 22px rgba(0, 0, 0, 0.35),
    inset 0 1px 0 rgba(255, 255, 255, 0.22);
}

.rch-btn--search:hover {
  transform: translateY(-2px);
  box-shadow:
    0 0 40px rgba(139, 92, 246, 0.6),
    0 10px 30px rgba(0, 0, 0, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.28);
}

.rch-btn--search:active {
  transform: translateY(0);
}

.rch-btn--clear {
  background: rgba(255, 255, 255, 0.07);
  color: rgba(241, 245, 249, 0.95);
  border: 1px solid rgba(148, 163, 184, 0.4);
  backdrop-filter: blur(10px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.rch-btn--clear:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(196, 181, 253, 0.55);
  color: #fff;
}

.rch-btn--export {
  background: rgba(56, 189, 248, 0.12);
  color: #7dd3fc;
  border: 1px solid rgba(56, 189, 248, 0.35);
  min-width: auto;
  padding: 0.5rem 1.1rem;
  font-size: 0.85rem;
}

.rch-btn--export:hover {
  background: rgba(56, 189, 248, 0.2);
  border-color: rgba(125, 211, 252, 0.55);
  color: #e0f2fe;
}

.reseller-call-history-results-panel h3 {
  margin: 0 0 0.85rem;
  font-size: 1.05rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.96);
  text-shadow: 0 0 18px rgba(139, 92, 246, 0.35);
}

.reseller-call-history-results {
  min-width: 0;
}

.reseller-call-history-export-bar {
  margin-bottom: 0.85rem;
}

.reseller-call-history-table-wrap {
  margin-top: 0.25rem;
  border-radius: 12px;
  border: 1px solid rgba(139, 92, 246, 0.22);
  background: rgba(8, 12, 22, 0.45);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.reseller-call-history-table-scroll {
  overflow-x: auto;
  overflow-y: visible;
  -webkit-overflow-scrolling: touch;
  max-width: 100%;
}

.reseller-call-history-table {
  width: max-content;
  min-width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 0.8125rem;
  table-layout: auto;
}

.reseller-call-history-table thead {
  position: sticky;
  top: 0;
  z-index: 2;
}

.reseller-call-history-table thead tr {
  background: linear-gradient(180deg, rgba(30, 41, 59, 0.98), rgba(15, 23, 42, 0.98));
}

.reseller-call-history-table th,
.reseller-call-history-table td {
  padding: 0.62rem 0.75rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  text-align: left;
  vertical-align: middle;
  line-height: 1.35;
}

.reseller-call-history-table th {
  color: rgba(196, 181, 253, 0.92);
  font-weight: 600;
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  white-space: nowrap;
  border-bottom: 1px solid rgba(139, 92, 246, 0.28);
}

.reseller-call-history-table td {
  color: rgba(226, 232, 240, 0.95);
  font-variant-numeric: tabular-nums;
}

.reseller-call-history-table tbody tr:nth-child(even):not(.grand-total) {
  background: rgba(255, 255, 255, 0.015);
}

.reseller-call-history-table tbody tr:hover:not(.grand-total) {
  background: rgba(99, 102, 241, 0.08);
}

.reseller-call-history-table .rch-col-date {
  min-width: 8.75rem;
  white-space: nowrap;
}

.reseller-call-history-table .rch-col-caller,
.reseller-call-history-table .rch-col-called {
  min-width: 7.5rem;
  white-space: nowrap;
}

.reseller-call-history-table .rch-col-sip {
  min-width: 6.5rem;
  white-space: nowrap;
}

.reseller-call-history-table .rch-col-code {
  min-width: 3.25rem;
  text-align: center;
}

.reseller-call-history-table th.rch-col-code {
  text-align: center;
}

.reseller-call-history-table .rch-col-dest {
  min-width: 6.5rem;
  max-width: 9rem;
  white-space: normal;
}

.reseller-call-history-table .rch-col-num {
  min-width: 4.75rem;
  text-align: right;
  white-space: nowrap;
}

.reseller-call-history-table th.rch-col-num {
  text-align: right;
}

.reseller-call-history-table .rch-col-disposition {
  min-width: 9.5rem;
  max-width: 12rem;
  white-space: normal;
}

.reseller-call-history-table .rch-col-account,
.reseller-call-history-table .rch-col-rate {
  min-width: 7rem;
  max-width: 10rem;
  white-space: normal;
  word-break: break-word;
}

.reseller-call-history-table .rch-col-direction {
  min-width: 5.5rem;
  white-space: nowrap;
  text-transform: lowercase;
}

.rch-disposition-badge {
  display: inline-block;
  max-width: 100%;
  padding: 0.2rem 0.45rem;
  border-radius: 6px;
  background: rgba(99, 102, 241, 0.16);
  border: 1px solid rgba(139, 92, 246, 0.28);
  color: rgba(224, 231, 255, 0.95);
  font-size: 0.72rem;
  font-weight: 500;
  line-height: 1.3;
  word-break: break-word;
}

.reseller-call-history-table tr.grand-total td {
  font-weight: 700;
  color: rgba(196, 181, 253, 0.98);
  background: rgba(99, 102, 241, 0.12);
  border-top: 2px solid rgba(139, 92, 246, 0.4);
  border-bottom: none;
  padding-top: 0.75rem;
  padding-bottom: 0.75rem;
}

.reseller-call-history-table tr.grand-total td.rch-col-num {
  font-size: 0.875rem;
}

.reseller-call-history-table .col-check,
.reseller-call-history-table .rch-col-check {
  width: 36px;
  min-width: 36px;
  text-align: center;
  white-space: nowrap;
}

.reseller-call-history-table .col-status,
.reseller-call-history-table .rch-col-status {
  width: 72px;
  min-width: 72px;
  text-align: center;
  vertical-align: middle;
  white-space: nowrap;
}

.reseller-call-history-table .col-status .dash-toggle {
  margin: 0 auto;
}

.reseller-call-history-table tbody tr.dash-device-row {
  cursor: pointer;
}

.reseller-call-history-table tbody tr.dash-device-row:hover:not(.grand-total) {
  background: rgba(99, 102, 241, 0.12);
}

.reseller-call-history-table .customer-balance-cell {
  white-space: nowrap;
}

.reseller-call-history-table .customer-balance-wrap {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.35rem;
  width: 100%;
}

.reseller-call-history-table th.rch-col-num,
.reseller-call-history-table td.rch-col-num.customer-balance-cell {
  text-align: right;
}

@media (max-width: 1100px) {
  .reseller-call-history-filters {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 640px) {
  .reseller-call-history-filters {
    grid-template-columns: 1fr;
  }
}

.reseller-customer-summary-group-title {
  margin-top: 0.5rem;
}

.reseller-customer-summary-actions {
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.reseller-customer-summary-display-in {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  margin-right: auto;
}

.reseller-customer-summary-display-in label {
  font-size: 0.8125rem;
  color: var(--dash-muted, rgba(255, 255, 255, 0.65));
  white-space: nowrap;
}

.reseller-customer-summary-display-in .cosmic-select-wrap {
  min-width: 8.5rem;
}

/* Cosmic date picker (call history) */
.rch-date-input-wrap {
  position: relative;
  width: 100%;
}

.rch-date-input {
  width: 100%;
  box-sizing: border-box;
  padding: 0.48rem 2.1rem 0.48rem 0.6rem;
  background: rgba(15, 23, 42, 0.75);
  border: 1px solid rgba(139, 92, 246, 0.28);
  border-radius: 8px;
  color: rgba(255, 255, 255, 0.95);
  font-size: 0.84rem;
  cursor: pointer;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.rch-date-input:hover,
.rch-date-input:focus {
  outline: none;
  border-color: rgba(167, 139, 250, 0.65);
  box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.22);
}

.rch-date-input-icon {
  position: absolute;
  right: 0.55rem;
  top: 50%;
  transform: translateY(-50%);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1rem;
  height: 1rem;
  color: rgba(196, 181, 253, 0.88);
  pointer-events: none;
  transition: color 0.2s ease;
}

.rch-date-input-icon svg {
  display: block;
  width: 100%;
  height: 100%;
}

.rch-date-input-wrap:hover .rch-date-input-icon,
.rch-date-input-wrap:focus-within .rch-date-input-icon {
  color: rgba(167, 139, 250, 1);
}

.cosmic-calendar-popup--rch {
  width: 260px;
  background: rgba(15, 23, 42, 0.98);
  border: 1px solid rgba(139, 92, 246, 0.5);
  border-radius: 12px;
  padding: 0.55rem;
  box-shadow: 0 0 50px rgba(139, 92, 246, 0.35), 0 20px 70px rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(24px);
}

.cosmic-cal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.45rem;
  padding-bottom: 0.4rem;
  border-bottom: 1px solid rgba(139, 92, 246, 0.3);
}

.cosmic-cal-month {
  font-size: 0.88rem;
  font-weight: 700;
  color: rgba(196, 181, 253, 0.95);
  text-shadow: 0 0 12px rgba(139, 92, 246, 0.4);
}

.cosmic-cal-nav {
  background: rgba(139, 92, 246, 0.15);
  border: 1px solid rgba(139, 92, 246, 0.35);
  color: rgba(196, 181, 253, 0.9);
  padding: 0.25rem 0.5rem;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.7rem;
  font-weight: 700;
  transition: background 0.2s ease, box-shadow 0.2s ease;
}

.cosmic-cal-nav:hover {
  background: rgba(139, 92, 246, 0.3);
  box-shadow: 0 0 12px rgba(139, 92, 246, 0.35);
}

.cosmic-cal-weekdays {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 0.1rem;
  margin-bottom: 0.25rem;
}

.cosmic-cal-weekdays div {
  text-align: center;
  font-size: 0.62rem;
  color: rgba(148, 163, 184, 0.85);
  font-weight: 700;
  text-transform: uppercase;
  padding: 0.15rem 0;
}

.cosmic-cal-days {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 0.12rem;
  margin-bottom: 0.45rem;
}

.cosmic-cal-day {
  aspect-ratio: 1;
  border: none;
  border-radius: 50%;
  background: transparent;
  color: rgba(226, 232, 240, 0.88);
  font-size: 0.72rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
  padding: 0;
}

.cosmic-cal-day:hover {
  background: rgba(139, 92, 246, 0.25);
  color: #fff;
}

.cosmic-cal-day.is-selected {
  background: linear-gradient(135deg, #8b5cf6, #6366f1);
  color: #fff;
  box-shadow: 0 0 14px rgba(139, 92, 246, 0.45);
}

.cosmic-cal-time {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.45rem;
  background: rgba(30, 41, 59, 0.65);
  border-radius: 10px;
  border: 1px solid rgba(139, 92, 246, 0.25);
}

.cosmic-cal-time-label {
  font-size: 0.72rem;
  font-weight: 600;
  color: rgba(148, 163, 184, 0.9);
}

.cosmic-cal-time-colon {
  color: rgba(139, 92, 246, 0.85);
  font-weight: 700;
}

.cosmic-cal-time-select {
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid rgba(139, 92, 246, 0.35);
  color: rgba(255, 255, 255, 0.95);
  border-radius: 7px;
  padding: 0.3rem 0.35rem;
  font-size: 0.78rem;
  font-weight: 600;
  min-width: 46px;
  text-align: center;
  cursor: pointer;
  color-scheme: dark;
}

.cosmic-cal-time-select option {
  background: #0f172a;
  color: #f1f5f9;
}

/* Custom cosmic select (call history) */
.rch-select {
  position: relative;
  width: 100%;
}

.rch-select-trigger {
  width: 100%;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.48rem 0.6rem;
  background: rgba(15, 23, 42, 0.75);
  border: 1px solid rgba(139, 92, 246, 0.28);
  border-radius: 8px;
  color: rgba(255, 255, 255, 0.95);
  font-size: 0.84rem;
  text-align: left;
  cursor: pointer;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.rch-select-trigger::after {
  content: '▾';
  color: rgba(196, 181, 253, 0.85);
  font-size: 0.9rem;
  flex-shrink: 0;
}

.rch-select-trigger:hover,
.rch-select-trigger:focus {
  outline: none;
  border-color: rgba(167, 139, 250, 0.65);
  background: rgba(30, 41, 59, 0.8);
  box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.2);
}

.rch-select-trigger--empty {
  color: rgba(148, 163, 184, 0.85);
}

.rch-select-panel {
  position: absolute;
  z-index: 100040;
  left: 0;
  right: 0;
  top: calc(100% + 4px);
  max-height: 220px;
  overflow: auto;
  background: rgba(15, 23, 42, 0.98);
  border: 1px solid rgba(139, 92, 246, 0.45);
  border-radius: 10px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.55), 0 0 24px rgba(139, 92, 246, 0.2);
  backdrop-filter: blur(16px);
  padding: 0.35rem;
}

.rch-select-list {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.rch-select-option {
  width: 100%;
  border: none;
  border-radius: 7px;
  background: transparent;
  color: rgba(241, 245, 249, 0.92);
  text-align: left;
  padding: 0.45rem 0.55rem;
  font-size: 0.82rem;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}

.rch-select-option:hover,
.rch-select-option.is-selected {
  background: rgba(139, 92, 246, 0.22);
  color: #fff;
}

.rch-select-option.is-selected {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.35), rgba(139, 92, 246, 0.35));
  font-weight: 600;
}

.rch-select-trigger--disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.rch-select--compact .rch-select-trigger {
  padding: 0.35rem 0.55rem;
  font-size: 0.8rem;
}

.rch-select--page-limit {
  width: auto;
  min-width: 4.25rem;
  flex: 0 0 auto;
}

#modal-root .device-field-row .rch-select {
  flex: 1;
  min-width: 0;
}

#modal-root .device-field-row .rch-select-trigger {
  width: 100%;
}

.reseller-customers-pager .rch-select--page-limit {
  margin-left: 0.35rem;
}

/* Reseller balance top-up — medium-dark glass (matches dash shell) */
.reseller-deposit-checkout-wrap {
  max-width: 720px;
  margin: 0 auto 1rem;
}

.reseller-deposit-checkout-wrap--waiting {
  max-width: 520px;
}

.reseller-deposit-checkout {
  background: linear-gradient(
    135deg,
    rgba(15, 23, 42, 0.96) 0%,
    rgba(30, 41, 59, 0.9) 50%,
    rgba(15, 23, 42, 0.96) 100%
  );
  background-image:
    radial-gradient(ellipse 120% 100% at 50% -20%, rgba(99, 102, 241, 0.18), transparent 60%),
    radial-gradient(circle at 85% 15%, rgba(168, 85, 247, 0.14), transparent 45%),
    radial-gradient(circle at 10% 85%, rgba(59, 130, 246, 0.1), transparent 45%),
    linear-gradient(135deg, rgba(15, 23, 42, 0.96) 0%, rgba(30, 41, 59, 0.9) 50%, rgba(15, 23, 42, 0.96) 100%);
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid rgba(139, 92, 246, 0.35);
  box-shadow:
    0 0 45px rgba(99, 102, 241, 0.14),
    0 20px 60px rgba(0, 0, 0, 0.45),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(20px);
}

.reseller-deposit-checkout--success {
  padding: 1.5rem 1.25rem;
}

.reseller-deposit-checkout-error {
  margin: 0;
  padding: 1.25rem;
  color: #fca5a5;
  font-size: 0.9rem;
}

.reseller-deposit-checkout__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.15rem 1.35rem;
  background: linear-gradient(
    135deg,
    rgba(99, 102, 241, 0.2) 0%,
    rgba(139, 92, 246, 0.14) 50%,
    rgba(15, 23, 42, 0.55) 100%
  );
  border-bottom: 1px solid rgba(139, 92, 246, 0.22);
  color: var(--dash-text);
}

.reseller-deposit-checkout__balance-label {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: rgba(196, 181, 253, 0.88);
  margin-bottom: 0.2rem;
}

.reseller-deposit-checkout__balance-value {
  font-size: clamp(1.5rem, 4vw, 1.85rem);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: rgba(255, 255, 255, 0.96);
  text-shadow: 0 0 22px rgba(139, 92, 246, 0.35);
}

.reseller-deposit-checkout__network-badge {
  flex-shrink: 0;
  padding: 0.35rem 0.65rem;
  border-radius: 999px;
  background: rgba(139, 92, 246, 0.15);
  border: 1px solid rgba(139, 92, 246, 0.35);
  font-size: 0.72rem;
  font-weight: 600;
  white-space: nowrap;
  color: rgba(196, 181, 253, 0.95);
}

.reseller-deposit-checkout__body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
}

@media (max-width: 680px) {
  .reseller-deposit-checkout__body {
    grid-template-columns: 1fr;
  }
}

.reseller-deposit-checkout__col {
  padding: 1.15rem 1.25rem;
}

.reseller-deposit-checkout__col--summary {
  border-left: 1px solid rgba(139, 92, 246, 0.15);
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  background: rgba(15, 23, 42, 0.35);
}

@media (max-width: 680px) {
  .reseller-deposit-checkout__col--summary {
    border-left: none;
    border-top: 1px solid rgba(139, 92, 246, 0.15);
  }
}

.reseller-deposit-checkout__col-title {
  margin: 0 0 0.65rem;
  font-size: 0.92rem;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.96);
  text-shadow: 0 0 18px rgba(139, 92, 246, 0.25);
}

.reseller-deposit-amount-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.5rem;
  margin-bottom: 0.85rem;
}

.reseller-deposit-amount-btn {
  position: relative;
  appearance: none;
  font: inherit;
  padding: 0.75rem 0.55rem;
  border: 1px solid rgba(139, 92, 246, 0.18);
  border-radius: 10px;
  background: rgba(17, 24, 39, 0.5);
  color: rgba(255, 255, 255, 0.92);
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  transition:
    border-color 0.2s ease,
    background 0.2s ease,
    color 0.2s ease,
    box-shadow 0.2s ease;
}

.reseller-deposit-amount-btn:hover {
  border-color: rgba(167, 139, 250, 0.45);
  background: rgba(30, 41, 59, 0.55);
  box-shadow: 0 0 18px rgba(99, 102, 241, 0.12);
}

.reseller-deposit-amount-btn--active {
  border-color: rgba(139, 92, 246, 0.65);
  background: rgba(99, 102, 241, 0.14);
  color: #c4b5fd;
  box-shadow: 0 0 22px rgba(99, 102, 241, 0.18), inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.reseller-deposit-amount-btn--active::after {
  content: '✓';
  position: absolute;
  top: 0.35rem;
  right: 0.4rem;
  width: 1rem;
  height: 1rem;
  border-radius: 50%;
  background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
  color: #fff;
  font-size: 0.62rem;
  font-weight: 800;
  display: grid;
  place-items: center;
  line-height: 1;
}

.reseller-deposit-checkout__custom-label {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: rgba(196, 181, 253, 0.88);
  margin-bottom: 0.35rem;
}

.reseller-deposit-checkout__input-wrap {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.55rem 0.75rem;
  border-radius: 10px;
  border: 1px solid rgba(139, 92, 246, 0.28);
  background: rgba(15, 23, 42, 0.75);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.reseller-deposit-checkout__input-wrap:focus-within {
  border-color: rgba(167, 139, 250, 0.75);
  box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.25);
}

.reseller-deposit-checkout__input-prefix {
  color: var(--dash-muted);
  font-weight: 600;
}

.reseller-deposit-checkout__input {
  flex: 1;
  min-width: 0;
  border: none;
  background: transparent;
  font: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  color: #f8fafc;
  outline: none;
}

.reseller-deposit-checkout__input::placeholder {
  color: rgba(148, 163, 184, 0.55);
  font-weight: 500;
}

.reseller-deposit-checkout__min-hint {
  margin-top: 0.35rem;
  font-size: 0.72rem;
  color: var(--dash-muted);
}

.reseller-deposit-checkout__info-box {
  display: flex;
  gap: 0.65rem;
  padding: 0.75rem 0.85rem;
  border-radius: 10px;
  background: rgba(99, 102, 241, 0.1);
  border: 1px solid rgba(139, 92, 246, 0.22);
}

.reseller-deposit-checkout__info-box svg {
  width: 1.15rem;
  height: 1.15rem;
  flex-shrink: 0;
  color: #a78bfa;
  margin-top: 0.1rem;
}

.reseller-deposit-checkout__info-text strong {
  display: block;
  font-size: 0.82rem;
  color: #c4b5fd;
  margin-bottom: 0.2rem;
}

.reseller-deposit-checkout__info-text p {
  margin: 0;
  font-size: 0.75rem;
  line-height: 1.45;
  color: rgba(203, 213, 225, 0.88);
}

.reseller-deposit-checkout__summary {
  display: grid;
  gap: 0.45rem;
  padding: 0.75rem 0.85rem;
  border-radius: 10px;
  background: rgba(17, 24, 39, 0.45);
  border: 1px solid rgba(139, 92, 246, 0.18);
}

.reseller-deposit-checkout__summary-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  font-size: 0.8rem;
  color: var(--dash-muted);
}

.reseller-deposit-checkout__summary-num {
  font-weight: 600;
  color: #e2e8f0;
}

.reseller-deposit-checkout__summary-row--total {
  padding-top: 0.45rem;
  border-top: 1px dashed rgba(139, 92, 246, 0.22);
  font-weight: 700;
  color: #f1f5f9;
}

.reseller-deposit-checkout__summary-total-num {
  font-size: 1.05rem;
  font-weight: 800;
  color: #c4b5fd;
  text-shadow: 0 0 16px rgba(139, 92, 246, 0.35);
}

.reseller-deposit-checkout__ttl {
  margin: 0;
  font-size: 0.72rem;
  color: var(--dash-muted);
  text-align: center;
}

.reseller-deposit-checkout-form {
  margin-top: auto;
}

.reseller-deposit-checkout__submit {
  appearance: none;
  width: 100%;
  border: none;
  border-radius: 10px;
  padding: 0.78rem 1rem;
  font: inherit;
  font-size: 0.88rem;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(135deg, #6366f1 0%, #7c3aed 55%, #5b21b6 100%);
  box-shadow:
    0 0 22px rgba(139, 92, 246, 0.35),
    0 4px 16px rgba(0, 0, 0, 0.3);
  cursor: pointer;
  transition:
    opacity 0.15s ease,
    transform 0.15s ease;
}

.reseller-deposit-checkout__submit:hover:not(:disabled) {
  transform: translateY(-1px);
}

.reseller-deposit-checkout__submit:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.reseller-deposit-checkout__submit--secondary {
  background: rgba(17, 24, 39, 0.5);
  color: #e2e8f0;
  border: 1px solid rgba(139, 92, 246, 0.28);
  box-shadow: none;
}

.reseller-deposit-checkout-wrap .reseller-deposit-status {
  margin-top: 0.65rem;
  border-radius: 10px;
}

.reseller-deposit-history-card {
  max-width: 720px;
  margin: 0 auto;
  padding: 1rem 1.15rem;
  border-radius: 14px;
  background: linear-gradient(
    135deg,
    rgba(15, 23, 42, 0.96) 0%,
    rgba(30, 41, 59, 0.9) 50%,
    rgba(15, 23, 42, 0.96) 100%
  );
  border: 1px solid rgba(139, 92, 246, 0.22);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(20px);
}

.reseller-deposit-history-card h3 {
  margin: 0 0 0.75rem;
  font-size: 0.95rem;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.96);
  text-shadow: 0 0 18px rgba(139, 92, 246, 0.25);
}

.reseller-deposit-history-card .muted {
  color: var(--dash-muted);
}

.reseller-deposit-checkout--success .reseller-deposit-success-card {
  color: var(--dash-text);
}

.reseller-deposit-checkout--success .reseller-deposit-success-meta {
  color: var(--dash-muted);
}

.reseller-deposit-checkout--success .reseller-deposit-success-balance {
  color: #f8fafc;
}

.reseller-deposit-checkout--success .reseller-deposit-success-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.65rem;
  width: 100%;
}

.reseller-deposit-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr);
  gap: 1.25rem;
  margin-bottom: 1.25rem;
}

@media (max-width: 960px) {
  .reseller-deposit-grid {
    grid-template-columns: 1fr;
  }
}

.reseller-deposit-panel {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.reseller-deposit-panel--side {
  justify-content: flex-start;
}

.reseller-deposit-balance {
  padding: 1rem 1.1rem;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.16), rgba(139, 92, 246, 0.1));
  border: 1px solid rgba(139, 92, 246, 0.22);
}

.reseller-deposit-balance__label {
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(148, 163, 184, 0.95);
  margin-bottom: 0.35rem;
}

.reseller-deposit-balance__value {
  font-size: 1.85rem;
  font-weight: 800;
  color: #f8fafc;
  line-height: 1.1;
}

.reseller-deposit-steps {
  margin: 0;
  padding-left: 1.15rem;
  color: rgba(203, 213, 225, 0.92);
  display: grid;
  gap: 0.55rem;
  font-size: 0.92rem;
}

.reseller-deposit-brand {
  margin: 0;
  font-size: 0.85rem;
  color: rgba(148, 163, 184, 0.95);
}

.reseller-deposit-qr-wrap {
  display: flex;
  justify-content: center;
  padding: 0.75rem;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.96);
  width: fit-content;
  margin: 0 auto;
  box-shadow: 0 8px 28px rgba(15, 23, 42, 0.28);
}

.reseller-deposit-qr {
  width: 180px;
  height: 180px;
  object-fit: contain;
  display: block;
}

.reseller-deposit-address {
  margin-top: 0.25rem;
}

.reseller-deposit-network-warn {
  margin: 0;
  padding: 0.65rem 0.8rem;
  border-radius: 10px;
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid rgba(245, 158, 11, 0.28);
  color: #fcd34d;
  font-size: 0.86rem;
}

.reseller-deposit-form {
  display: grid;
  gap: 0.75rem;
  margin-top: 0.35rem;
}

.reseller-deposit-form label {
  display: grid;
  gap: 0.4rem;
  font-size: 0.88rem;
  color: rgba(226, 232, 240, 0.95);
}

.reseller-deposit-tx-input {
  width: 100%;
  padding: 0.72rem 0.85rem;
  border-radius: 10px;
  border: 1px solid rgba(148, 163, 184, 0.28);
  background: rgba(15, 23, 42, 0.55);
  color: #f8fafc;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.82rem;
}

.reseller-deposit-tx-input:focus {
  outline: none;
  border-color: rgba(96, 165, 250, 0.65);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.18);
}

.reseller-deposit-submit {
  width: 100%;
  justify-content: center;
}

.reseller-deposit-status {
  padding: 0.75rem 0.9rem;
  border-radius: 10px;
  font-size: 0.88rem;
  line-height: 1.45;
  white-space: pre-line;
}

.reseller-deposit-status--loading {
  background: rgba(59, 130, 246, 0.12);
  border: 1px solid rgba(59, 130, 246, 0.28);
  color: #bfdbfe;
}

.reseller-deposit-status--success {
  background: rgba(99, 102, 241, 0.12);
  border: 1px solid rgba(139, 92, 246, 0.28);
  color: #c4b5fd;
}

.reseller-deposit-status--error {
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.28);
  color: #fecaca;
}

.reseller-deposit-history {
  margin-top: 0.25rem;
}

.reseller-deposit-note {
  margin-bottom: 0.75rem;
}

.reseller-deposit-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  margin-top: 1rem;
}

.reseller-deposit-payment-block {
  display: grid;
  gap: 0.85rem;
  margin-top: 0.5rem;
  padding-top: 0.85rem;
  border-top: 1px solid rgba(148, 163, 184, 0.15);
}

.reseller-deposit-exact-title {
  margin: 0;
  font-size: 0.88rem;
  color: rgba(203, 213, 225, 0.92);
}

.reseller-deposit-exact-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.65rem;
}

.reseller-deposit-exact-amount {
  font-size: 1.65rem;
  font-weight: 800;
  color: #c4b5fd;
  letter-spacing: 0.01em;
}

.reseller-deposit-exact-hint {
  margin: 0;
  font-size: 0.84rem;
  line-height: 1.45;
}

.reseller-deposit-panel--waiting-compact {
  width: 100%;
  max-width: 520px;
  margin: 0 auto;
  padding: 1.15rem 1.25rem 1.25rem !important;
  border-radius: 14px !important;
  background: linear-gradient(
    135deg,
    rgba(15, 23, 42, 0.96) 0%,
    rgba(30, 41, 59, 0.9) 50%,
    rgba(15, 23, 42, 0.96) 100%
  ) !important;
  background-image:
    radial-gradient(ellipse 120% 100% at 50% -20%, rgba(99, 102, 241, 0.18), transparent 60%),
    radial-gradient(circle at 85% 15%, rgba(168, 85, 247, 0.14), transparent 45%),
    linear-gradient(135deg, rgba(15, 23, 42, 0.96) 0%, rgba(30, 41, 59, 0.9) 50%, rgba(15, 23, 42, 0.96) 100%) !important;
  border: 1px solid rgba(139, 92, 246, 0.35) !important;
  box-shadow:
    0 0 45px rgba(99, 102, 241, 0.14),
    0 20px 60px rgba(0, 0, 0, 0.45),
    inset 0 1px 0 rgba(255, 255, 255, 0.08) !important;
  backdrop-filter: blur(20px) !important;
  overflow: hidden;
}

.reseller-deposit-panel--waiting-compact::before,
.reseller-deposit-panel--waiting-compact::after {
  display: none !important;
}

.reseller-deposit-waiting-card {
  display: grid;
  gap: 1rem;
}

.reseller-deposit-panel--waiting-compact .reseller-deposit-waiting__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding-bottom: 0.85rem;
  border-bottom: 1px solid rgba(139, 92, 246, 0.18);
}

.reseller-deposit-panel--waiting-compact .reseller-deposit-waiting__head-left {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  min-width: 0;
}

.reseller-deposit-panel--waiting-compact .reseller-deposit-waiting__head h3 {
  margin: 0;
  font-size: 0.98rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.96);
  text-shadow: 0 0 18px rgba(139, 92, 246, 0.25);
}

.reseller-deposit-panel--waiting-compact .reseller-deposit-back {
  appearance: none;
  display: grid;
  place-items: center;
  width: 1.75rem;
  height: 1.75rem;
  padding: 0;
  border: none;
  border-radius: 6px;
  background: transparent;
  color: var(--dash-muted);
  cursor: pointer;
}

.reseller-deposit-panel--waiting-compact .reseller-deposit-back svg {
  width: 1.2rem;
  height: 1.2rem;
}

.reseller-deposit-panel--waiting-compact .reseller-deposit-back:hover {
  color: #e2e8f0;
  background: rgba(139, 92, 246, 0.12);
}

.reseller-deposit-panel--waiting-compact .reseller-deposit-timer-wrap {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  flex-shrink: 0;
}

.reseller-deposit-panel--waiting-compact .reseller-deposit-timer-icon {
  width: 1rem;
  height: 1rem;
  color: #a78bfa;
}

.reseller-deposit-panel--waiting-compact .reseller-deposit-timer {
  font-variant-numeric: tabular-nums;
  font-size: 0.92rem;
  font-weight: 600;
  color: #c4b5fd;
}

.reseller-deposit-panel--waiting-compact .reseller-deposit-waiting__pay-section {
  display: grid;
  gap: 0.2rem;
}

.reseller-deposit-panel--waiting-compact .reseller-deposit-waiting__amount-line {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 0.5rem;
}

.reseller-deposit-panel--waiting-compact .reseller-deposit-waiting__amount-value {
  font-size: 1.15rem;
  font-weight: 600;
  color: #f8fafc;
  letter-spacing: -0.01em;
}

.reseller-deposit-panel--waiting-compact .reseller-deposit-waiting__usd-inline {
  font-size: 0.88rem;
  color: var(--dash-muted);
}

.reseller-deposit-panel--waiting-compact .reseller-deposit-waiting__amount-label {
  font-size: 0.78rem;
  color: var(--dash-muted);
}

.reseller-deposit-panel--waiting-compact .reseller-deposit-icon-copy {
  appearance: none;
  display: grid;
  place-items: center;
  width: 1.5rem;
  height: 1.5rem;
  padding: 0;
  border: none;
  border-radius: 4px;
  background: transparent;
  color: var(--dash-muted);
  cursor: pointer;
}

.reseller-deposit-panel--waiting-compact .reseller-deposit-icon-copy__svg {
  width: 0.95rem;
  height: 0.95rem;
}

.reseller-deposit-panel--waiting-compact .reseller-deposit-icon-copy:hover {
  color: #e2e8f0;
  background: rgba(139, 92, 246, 0.12);
}

.reseller-deposit-panel--waiting-compact .reseller-deposit-icon-copy--done {
  color: #c4b5fd;
}

.reseller-deposit-panel--waiting-compact .reseller-deposit-waiting__addr-section {
  display: grid;
  gap: 0.25rem;
  padding-top: 0.15rem;
}

.reseller-deposit-panel--waiting-compact .reseller-deposit-waiting__address-value {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.82rem;
  line-height: 1.4;
  color: rgba(226, 232, 240, 0.96);
  word-break: break-all;
}

.reseller-deposit-panel--waiting-compact .reseller-deposit-waiting__addr-hint {
  margin: 0.1rem 0 0;
  font-size: 0.78rem;
  color: var(--dash-muted);
}

.reseller-deposit-panel--waiting-compact .reseller-deposit-network-tag {
  color: #a78bfa;
  font-weight: 500;
}

.reseller-deposit-panel--waiting-compact .reseller-deposit-waiting__visual {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 0.75rem;
  align-items: stretch;
  margin-top: 0.15rem;
}

@media (max-width: 560px) {
  .reseller-deposit-panel--waiting-compact .reseller-deposit-waiting__visual {
    grid-template-columns: 1fr;
  }
}

.reseller-deposit-panel--waiting-compact .reseller-deposit-qr-card {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 0.75rem;
  border-radius: 10px;
  background: rgba(17, 24, 39, 0.5);
  border: 1px solid rgba(139, 92, 246, 0.18);
}

.reseller-deposit-panel--waiting-compact .reseller-deposit-qr-wrap {
  display: flex;
  justify-content: center;
  padding: 0.35rem;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.96);
  width: fit-content;
  margin: 0.15rem auto 0;
  box-shadow: none;
}

.reseller-deposit-panel--waiting-compact .reseller-deposit-qr {
  width: 132px;
  height: 132px;
  object-fit: contain;
  display: block;
}

.reseller-deposit-panel--waiting-compact .reseller-deposit-warn-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  padding: 0.85rem 0.65rem;
  border-radius: 10px;
  background: rgba(245, 158, 11, 0.1);
  border: 1px solid rgba(245, 158, 11, 0.22);
  text-align: center;
}

.reseller-deposit-panel--waiting-compact .reseller-deposit-warn-box__icon {
  width: 2.1rem;
  height: 2.1rem;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(245, 158, 11, 0.18);
  color: #fbbf24;
}

.reseller-deposit-panel--waiting-compact .reseller-deposit-warn-box__icon svg {
  width: 1.15rem;
  height: 1.15rem;
}

.reseller-deposit-panel--waiting-compact .reseller-deposit-warn-box p {
  margin: 0;
  color: #fcd34d;
  font-size: 0.72rem;
  line-height: 1.45;
}

.reseller-deposit-panel--waiting-compact .reseller-deposit-warn-box__exact {
  color: rgba(252, 211, 77, 0.88) !important;
  font-size: 0.7rem !important;
}

.reseller-deposit-auto-hint {
  margin: 0;
  font-size: 0.88rem;
  line-height: 1.5;
  color: rgba(203, 213, 225, 0.92);
}

.reseller-deposit-exact-warn {
  margin: 0.65rem auto 0;
  max-width: 420px;
  padding: 0.65rem 0.75rem;
  border-radius: 10px;
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.28);
  color: #fecaca;
  font-size: 0.82rem;
  line-height: 1.45;
  text-align: center;
}

.reseller-deposit-success-card {
  display: grid;
  gap: 0.85rem;
  justify-items: center;
  text-align: center;
  padding: 1.25rem 0.5rem 0.5rem;
}

.reseller-deposit-success-icon {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 1.6rem;
  font-weight: 800;
  color: #c4b5fd;
  background: rgba(139, 92, 246, 0.15);
  border: 2px solid rgba(139, 92, 246, 0.35);
  box-shadow: 0 0 24px rgba(99, 102, 241, 0.25);
}

.reseller-deposit-success-card h3 {
  margin: 0;
  font-size: 1.2rem;
}

.reseller-deposit-success-meta {
  margin: 0;
  color: rgba(203, 213, 225, 0.95);
}

.reseller-deposit-success-balance {
  margin: 0;
  font-size: 1.35rem;
  font-weight: 800;
  color: #f8fafc;
}

.reseller-deposit-success-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  justify-content: center;
  margin-top: 0.35rem;
}

/* FAQ section */
.faq-video-section,
.faq-text-section {
  margin-top: 1.25rem;
}

.faq-video-section h3,
.faq-text-section h3 {
  margin: 0 0 1rem;
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--dash-text, #f1f5f9);
}

.faq-video-player {
  display: block;
  width: 100%;
  max-width: 960px;
  height: auto;
  border-radius: 12px;
  border: 1px solid var(--dash-glass-border, rgba(255, 255, 255, 0.12));
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.35);
  background: #000;
}

.faq-step {
  margin-bottom: 1rem;
  padding: 1rem 1.1rem;
  background: rgba(255, 255, 255, 0.04);
  border-left: 4px solid var(--dash-accent, #38bdf8);
  border-radius: 8px;
}

.faq-step:last-child {
  margin-bottom: 0;
}

.faq-step h4 {
  margin: 0 0 0.45rem;
  font-size: 1rem;
  font-weight: 700;
  color: var(--dash-text, #f1f5f9);
}

.faq-step p {
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.65;
  color: var(--dash-muted, #94a3b8);
}