/* Beeline CloudPBX Admin — Dark Theme */

:root {
    /* ── Backgrounds ── */
    --bg-primary: #0f1117;
    --bg-secondary: #1a1d27;
    --bg-card: #1e2130;
    --bg-card-hover: #252838;
    --bg-sidebar: #141620;
    /* ── Borders ── */
    --border: #2a2d3a;
    --border-light: #323548;
    --border-subtle: rgba(255, 255, 255, 0.06);
    --border-hover: rgba(255, 255, 255, 0.12);
    /* ── Text ── */
    --text-primary: #e4e5eb;
    --text-secondary: #9395a5;
    --text-muted: #6b6e80;
    /* ── Accent ── */
    --accent: #f59e0b;
    --accent-hover: #d97706;
    /* ── Semantic colors ── */
    --green: #22c55e;
    --red: #ef4444;
    --blue: #3b82f6;
    --purple: #a855f7;
    --cyan: #06b6d4;
    --rose: #f43f5e;
    --indigo: #6366f1;
    /* ── Chart palette (synced with charts-config.js) ── */
    --chart-1: #10b981;
    --chart-2: #3b82f6;
    --chart-3: #f59e0b;
    --chart-4: #ef4444;
    --chart-5: #8b5cf6;
    --chart-6: #06b6d4;
    /* ── Shadows (elevation system) ── */
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.2);
    --shadow-md: 0 4px 16px rgba(0,0,0,0.25);
    --shadow-lg: 0 8px 32px rgba(0,0,0,0.35);
    --shadow-xl: 0 20px 60px rgba(0,0,0,0.5);
    --shadow-glow-amber: 0 0 20px rgba(245,158,11,0.15);
    --shadow-glow-green: 0 0 20px rgba(16,185,129,0.15);
    --shadow-glow-red: 0 0 20px rgba(239,68,68,0.15);
    /* ── Glass ── */
    --glass-bg: rgba(22, 25, 35, 0.75);
    --glass-blur: blur(20px);
    --glass-border: rgba(255, 255, 255, 0.06);
    /* ── Gradients ── */
    --gradient-amber: linear-gradient(135deg, #f59e0b, #f97316);
    --gradient-emerald: linear-gradient(135deg, #10b981, #059669);
    --gradient-blue: linear-gradient(135deg, #3b82f6, #2563eb);
    --gradient-red: linear-gradient(135deg, #ef4444, #dc2626);
    --gradient-violet: linear-gradient(135deg, #8b5cf6, #7c3aed);
    --gradient-card: linear-gradient(135deg, rgba(255,255,255,0.08) 0%, transparent 50%, rgba(245,158,11,0.05) 100%);
    /* ── Animation timing ── */
    --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
    --ease-out-cubic: cubic-bezier(0.33, 1, 0.68, 1);
    --ease-in-out: cubic-bezier(0.4, 0, 0.2, 1);
    --duration-fast: 150ms;
    --duration-normal: 250ms;
    --duration-slow: 500ms;
}

* { box-sizing: border-box; }

body {
    background: var(--bg-primary);
    color: var(--text-primary);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

/* Sidebar */
.nav-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.6rem 0.85rem;
    border-radius: 0.6rem;
    font-size: 0.875rem;
    color: var(--text-secondary);
    transition: all 0.2s ease;
    text-decoration: none;
    font-weight: 500;
}

.nav-link:hover {
    background: rgba(245, 158, 11, 0.08);
    color: var(--text-primary);
}

.nav-link.active {
    background: rgba(245, 158, 11, 0.12);
    color: var(--accent);
    box-shadow: inset 3px 0 0 var(--accent);
}

.nav-link.active svg {
    color: var(--accent);
}

/* Cards */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 1rem;
    padding: 1.25rem;
    transition: all 0.2s ease;
}

.card:hover {
    border-color: var(--border-light);
}

.card-glow {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 1rem;
    padding: 1.25rem;
    position: relative;
    overflow: hidden;
}

.card-glow::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--accent), transparent);
    opacity: 0.6;
}

/* KPI cards */
.kpi-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 1rem;
    padding: 1.25rem;
    position: relative;
    overflow: hidden;
}

.kpi-card .kpi-icon {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 0.75rem;
}

/* Tables */
.dark-table {
    width: 100%;
    font-size: 0.875rem;
}

.dark-table thead th {
    padding: 0.75rem 1rem;
    text-align: left;
    font-weight: 500;
    color: var(--text-muted);
    border-bottom: 1px solid var(--border);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.dark-table tbody tr {
    border-bottom: 1px solid var(--border);
    transition: background 0.15s ease;
}

.dark-table tbody tr:hover {
    background: var(--bg-card-hover);
}

.dark-table tbody td {
    padding: 0.65rem 1rem;
    color: var(--text-primary);
}

/* Status badges */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.2rem 0.65rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.02em;
}

.badge-green { background: rgba(34, 197, 94, 0.15); color: #4ade80; }
.badge-red { background: rgba(239, 68, 68, 0.15); color: #f87171; }
.badge-blue { background: rgba(59, 130, 246, 0.15); color: #60a5fa; }
.badge-yellow { background: rgba(245, 158, 11, 0.15); color: #fbbf24; }
.badge-gray { background: rgba(107, 110, 128, 0.15); color: #9395a5; }

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.5rem 1rem;
    border-radius: 0.6rem;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.2s ease;
    cursor: pointer;
    border: none;
    outline: none;
}

.btn-accent {
    background: var(--accent);
    color: #000;
}
.btn-accent:hover { background: var(--accent-hover); }

.btn-ghost {
    background: transparent;
    color: var(--text-secondary);
    border: 1px solid var(--border);
}
.btn-ghost:hover { background: var(--bg-card-hover); color: var(--text-primary); }

.btn-sm { padding: 0.35rem 0.75rem; font-size: 0.8rem; }

/* Inputs */
.input-dark {
    width: 100%;
    padding: 0.55rem 0.85rem;
    background: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: 0.6rem;
    color: var(--text-primary);
    font-size: 0.875rem;
    outline: none;
    transition: border-color 0.2s ease;
}

.input-dark:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 2px rgba(245, 158, 11, 0.15);
}

.input-dark::placeholder { color: var(--text-muted); }

select.input-dark {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%236b6e80' viewBox='0 0 16 16'%3E%3Cpath d='m4.427 6.427 3.396 3.396a.25.25 0 0 0 .354 0l3.396-3.396A.25.25 0 0 0 11.396 6H4.604a.25.25 0 0 0-.177.427z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.6rem center;
    padding-right: 2rem;
}

/* Service status */
.status-card {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem;
    border-radius: 0.75rem;
    border: 1px solid var(--border);
    background: var(--bg-card);
}

.status-dot {
    width: 0.625rem;
    height: 0.625rem;
    border-radius: 50%;
    flex-shrink: 0;
}

.status-dot.ok { background: var(--green); box-shadow: 0 0 6px rgba(34, 197, 94, 0.5); }
.status-dot.error { background: var(--red); box-shadow: 0 0 6px rgba(239, 68, 68, 0.5); }

/* Scrollbar */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border-light); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }

/* Lang selector */
.lang-btn {
    padding: 0.3rem 0.5rem;
    border-radius: 0.4rem;
    font-size: 0.75rem;
    cursor: pointer;
    transition: all 0.15s;
    background: transparent;
    color: var(--text-muted);
    border: 1px solid transparent;
}
.lang-btn:hover { color: var(--text-primary); background: var(--bg-card-hover); }
.lang-btn.active { color: var(--accent); border-color: var(--accent); background: rgba(245, 158, 11, 0.08); }

/* Period buttons */
.period-btn {
    padding: 0.4rem 0.85rem;
    border-radius: 0.5rem;
    font-size: 0.8rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s;
    background: var(--bg-card);
    color: var(--text-secondary);
    border: 1px solid var(--border);
}
.period-btn:hover { color: var(--text-primary); }
.period-btn.active { background: var(--accent); color: #000; border-color: var(--accent); }

/* Chart containers */
.chart-container {
    position: relative;
    height: 220px;
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

.fade-in { animation: fadeIn 0.3s ease; }

/* Progress bar */
.progress-bar {
    height: 0.5rem;
    border-radius: 9999px;
    overflow: hidden;
    background: rgba(245, 158, 11, 0.1);
}
.progress-bar-fill {
    height: 100%;
    border-radius: 9999px;
    background: linear-gradient(90deg, var(--accent), #f97316);
    transition: width 0.5s ease;
}

/* ============================================
   USER CABINET - PREMIUM DARK LUXURY SaaS
   Linear / Vercel / Raycast inspired
   ============================================ */

/* ---- Sidebar ---- */
.sidebar {
  width: 260px;
  min-height: 100vh;
  background: linear-gradient(180deg, #12141c 0%, #0d0f15 100%);
  border-right: 1px solid rgba(255, 255, 255, 0.04);
  transition: width 280ms cubic-bezier(0.4, 0, 0.2, 1);
  position: fixed;
  top: 0;
  left: 0;
  z-index: 40;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  box-shadow: 1px 0 24px rgba(0, 0, 0, 0.4);
}

.sidebar::after {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 1px;
  height: 100%;
  background: linear-gradient(180deg, rgba(245, 158, 11, 0.15) 0%, transparent 40%, transparent 60%, rgba(59, 130, 246, 0.1) 100%);
  pointer-events: none;
}

.sidebar.collapsed {
  width: 64px;
}

.sidebar-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 35;
  opacity: 0;
  pointer-events: none;
  transition: opacity 250ms ease;
}

.sidebar-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

/* ---- Sidebar Nav Items ---- */
.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  margin: 2px 10px;
  border-radius: 10px;
  color: rgba(255, 255, 255, 0.55);
  text-decoration: none;
  transition: all 200ms cubic-bezier(0.4, 0, 0.2, 1);
  white-space: nowrap;
  overflow: hidden;
  position: relative;
}

.nav-item:hover {
  color: rgba(255, 255, 255, 0.95);
  background: rgba(255, 255, 255, 0.04);
  transform: translateX(2px);
}

.nav-item.active {
  color: #f59e0b;
  background: rgba(245, 158, 11, 0.08);
  box-shadow: inset 3px 0 0 #f59e0b, 0 0 12px rgba(245, 158, 11, 0.08);
}

.nav-item.active::after {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 60%;
  background: #f59e0b;
  border-radius: 0 2px 2px 0;
  box-shadow: 0 0 8px rgba(245, 158, 11, 0.6);
}

.nav-item .nav-icon {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  transition: transform 200ms ease;
}

.nav-item:hover .nav-icon {
  transform: scale(1.1);
}

.nav-item .nav-label {
  opacity: 1;
  transition: opacity 200ms ease, transform 200ms ease;
}

.sidebar.collapsed .nav-item .nav-label {
  opacity: 0;
  width: 0;
  transform: translateX(-8px);
}

/* ---- Main Content ---- */
.main-content {
  margin-left: 260px;
  min-height: 100vh;
  transition: margin-left 280ms cubic-bezier(0.4, 0, 0.2, 1);
  animation: page-enter 0.4s ease-out;
}

.sidebar.collapsed ~ .main-content,
.main-content.sidebar-collapsed {
  margin-left: 64px;
}

/* ---- Header Bar ---- */
.header-bar {
  height: 64px;
  background: rgba(15, 17, 23, 0.85);
  backdrop-filter: blur(16px) saturate(1.2);
  -webkit-backdrop-filter: blur(16px) saturate(1.2);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 28px;
  position: sticky;
  top: 0;
  z-index: 30;
}

/* ---- Glass Cards (deep glassmorphism) ---- */
.glass-card {
  background: rgba(22, 25, 35, 0.75);
  backdrop-filter: blur(20px) saturate(1.3);
  -webkit-backdrop-filter: blur(20px) saturate(1.3);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 16px;
  padding: 24px;
  position: relative;
  transition: all 300ms cubic-bezier(0.4, 0, 0.2, 1);
  overflow: hidden;
}

.glass-card::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 16px;
  padding: 1px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.08) 0%, transparent 50%, rgba(245, 158, 11, 0.05) 100%);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
  transition: opacity 300ms ease;
  opacity: 0.6;
}

.glass-card:hover {
  background: rgba(26, 29, 39, 0.9);
  border-color: rgba(255, 255, 255, 0.1);
  box-shadow:
    0 8px 32px rgba(0, 0, 0, 0.35),
    0 0 0 1px rgba(245, 158, 11, 0.05),
    inset 0 1px 0 rgba(255, 255, 255, 0.04);
  transform: translateY(-1px);
}

.glass-card:hover::before {
  opacity: 1;
}

/* ---- Stat Cards (gradient per type) ---- */
.stat-card {
  background: rgba(22, 25, 35, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 14px;
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  position: relative;
  overflow: hidden;
  transition: all 250ms ease;
}

.stat-card::before {
  content: '';
  position: absolute;
  inset: 0;
  opacity: 0.04;
  border-radius: 14px;
  transition: opacity 250ms ease;
}

.stat-card:hover::before {
  opacity: 0.08;
}

.stat-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3);
}

.stat-card.stat-positive::before {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
}
.stat-card.stat-positive {
  border-color: rgba(16, 185, 129, 0.15);
}

.stat-card.stat-negative::before {
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
}
.stat-card.stat-negative {
  border-color: rgba(239, 68, 68, 0.15);
}

.stat-card.stat-neutral::before {
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
}
.stat-card.stat-neutral {
  border-color: rgba(245, 158, 11, 0.15);
}

.stat-card.stat-info::before {
  background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
}
.stat-card.stat-info {
  border-color: rgba(59, 130, 246, 0.15);
}

.stat-card .stat-value {
  font-size: 2rem;
  font-weight: 700;
  color: #fff;
  font-family: 'JetBrains Mono', 'SF Mono', monospace;
  letter-spacing: -0.02em;
}

.stat-card .stat-label {
  font-size: 0.78rem;
  color: rgba(255, 255, 255, 0.5);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 500;
}

.stat-card .stat-change {
  font-size: 0.75rem;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: 6px;
  width: fit-content;
}

.stat-card .stat-change.positive {
  color: #34d399;
  background: rgba(16, 185, 129, 0.1);
}
.stat-card .stat-change.negative {
  color: #f87171;
  background: rgba(239, 68, 68, 0.1);
}

/* ---- Notification Bell ---- */
.notification-bell {
  position: relative;
  cursor: pointer;
  padding: 8px;
  border-radius: 10px;
  transition: all 200ms ease;
}

.notification-bell:hover {
  background: rgba(255, 255, 255, 0.06);
  transform: scale(1.05);
}

.notification-badge {
  position: absolute;
  top: 3px;
  right: 3px;
  min-width: 17px;
  height: 17px;
  background: linear-gradient(135deg, #ef4444, #dc2626);
  border-radius: 999px;
  font-size: 10px;
  font-weight: 700;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
  box-shadow: 0 2px 8px rgba(239, 68, 68, 0.4);
  animation: pulse-glow 2s ease-in-out infinite;
}

/* ---- Dropdown Menu ---- */
.dropdown-menu {
  position: absolute;
  top: 100%;
  right: 0;
  margin-top: 8px;
  background: rgba(22, 25, 35, 0.98);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 6px;
  min-width: 210px;
  box-shadow:
    0 20px 60px rgba(0, 0, 0, 0.5),
    0 0 0 1px rgba(255, 255, 255, 0.03);
  z-index: 50;
  animation: dropdown-enter 0.2s ease-out;
}

@keyframes dropdown-enter {
  from { opacity: 0; transform: translateY(-4px) scale(0.97); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.dropdown-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 8px;
  color: rgba(255, 255, 255, 0.7);
  text-decoration: none;
  font-size: 0.875rem;
  transition: all 150ms ease;
}

.dropdown-item:hover {
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
  transform: translateX(2px);
}

/* ---- Data Table (premium) ---- */
.data-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
}

.data-table thead th {
  padding: 14px 16px;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: rgba(255, 255, 255, 0.45);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  text-align: left;
  white-space: nowrap;
  position: sticky;
  top: 0;
  background: rgba(15, 17, 23, 0.95);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 5;
}

.data-table tbody td {
  padding: 13px 16px;
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.82);
  border-bottom: 1px solid rgba(255, 255, 255, 0.03);
  transition: color 150ms ease;
}

.data-table tbody tr {
  transition: all 180ms ease;
}

.data-table tbody tr:nth-child(even) {
  background: rgba(255, 255, 255, 0.015);
}

.data-table tbody tr:hover {
  background: rgba(245, 158, 11, 0.04);
  box-shadow: inset 3px 0 0 rgba(245, 158, 11, 0.4);
}

.data-table tbody tr:hover td {
  color: rgba(255, 255, 255, 0.95);
}

/* ---- Filters Panel ---- */
.filters-panel {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  padding: 18px 22px;
  background: rgba(22, 25, 35, 0.5);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.04);
  border-radius: 12px;
  margin-bottom: 16px;
}

.filter-group {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.filter-label {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: rgba(255, 255, 255, 0.38);
  font-weight: 500;
}

/* ---- Pagination ---- */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  margin-top: 24px;
}

.pagination-btn {
  padding: 8px 13px;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.55);
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.08);
  cursor: pointer;
  transition: all 180ms ease;
}

.pagination-btn:hover {
  background: rgba(255, 255, 255, 0.05);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.15);
}

.pagination-btn.active {
  background: rgba(245, 158, 11, 0.12);
  border-color: rgba(245, 158, 11, 0.5);
  color: #f59e0b;
  box-shadow: 0 0 12px rgba(245, 158, 11, 0.15);
}

/* ---- Modal (scale + fade entrance) ---- */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: modal-bg-enter 0.25s ease-out;
}

@keyframes modal-bg-enter {
  from { opacity: 0; }
  to { opacity: 1; }
}

.modal-content {
  background: rgba(22, 25, 35, 0.98);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 20px;
  padding: 32px;
  max-width: 520px;
  width: 100%;
  max-height: 80vh;
  overflow-y: auto;
  box-shadow:
    0 32px 80px rgba(0, 0, 0, 0.6),
    0 0 0 1px rgba(255, 255, 255, 0.03),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
  animation: modal-enter 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes modal-enter {
  from { opacity: 0; transform: scale(0.94) translateY(8px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

/* ---- Empty State ---- */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 72px 20px;
  text-align: center;
  animation: page-enter 0.4s ease-out;
}

.empty-state .empty-icon {
  width: 72px;
  height: 72px;
  color: rgba(255, 255, 255, 0.1);
  margin-bottom: 20px;
}

.empty-state .empty-title {
  font-size: 1.2rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.75);
  margin-bottom: 8px;
}

.empty-state .empty-text {
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.4);
  max-width: 340px;
  line-height: 1.5;
}

/* ---- Loading Skeleton ---- */
.skeleton {
  background: linear-gradient(90deg, rgba(255,255,255,0.03) 25%, rgba(255,255,255,0.07) 50%, rgba(255,255,255,0.03) 75%);
  background-size: 200% 100%;
  animation: skeleton-loading 1.5s ease-in-out infinite;
  border-radius: 8px;
}

@keyframes skeleton-loading {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ---- Audio Player ---- */
.audio-player {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 14px;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 24px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  transition: all 200ms ease;
}

.audio-player:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(245, 158, 11, 0.2);
}

.audio-player button {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: rgba(245, 158, 11, 0.12);
  color: #f59e0b;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  cursor: pointer;
  transition: all 200ms ease;
}

.audio-player button:hover {
  background: rgba(245, 158, 11, 0.25);
  transform: scale(1.08);
  box-shadow: 0 0 12px rgba(245, 158, 11, 0.2);
}

/* ---- Tabs ---- */
.tabs {
  display: flex;
  gap: 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  margin-bottom: 24px;
}

.tab {
  padding: 12px 22px;
  font-size: 0.875rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.45);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: all 200ms ease;
  position: relative;
}

.tab:hover {
  color: rgba(255, 255, 255, 0.85);
}

.tab.active {
  color: #f59e0b;
  border-bottom-color: #f59e0b;
}

.tab.active::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 20%;
  right: 20%;
  height: 2px;
  background: #f59e0b;
  box-shadow: 0 0 8px rgba(245, 158, 11, 0.5);
  border-radius: 1px;
}

/* ---- Charts Area ---- */
.chart-area {
  background: rgba(22, 25, 35, 0.5);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.04);
  border-radius: 14px;
  padding: 24px;
  box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.2);
}

/* ---- Buttons (premium glow) ---- */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.55rem 1.2rem;
  border-radius: 10px;
  font-size: 0.875rem;
  font-weight: 600;
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: #000;
  border: none;
  cursor: pointer;
  transition: all 200ms ease;
  box-shadow: 0 2px 12px rgba(245, 158, 11, 0.2);
}

.btn-primary:hover {
  background: linear-gradient(135deg, #fbbf24, #f59e0b);
  box-shadow: 0 4px 20px rgba(245, 158, 11, 0.35);
  transform: translateY(-1px);
}

.btn-primary:active {
  transform: translateY(0);
  box-shadow: 0 2px 8px rgba(245, 158, 11, 0.2);
}

.btn-ghost-premium {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.5rem 1rem;
  border-radius: 10px;
  font-size: 0.875rem;
  font-weight: 500;
  background: transparent;
  color: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.1);
  cursor: pointer;
  transition: all 250ms ease;
  position: relative;
  overflow: hidden;
}

.btn-ghost-premium::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 10px;
  padding: 1px;
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.3), rgba(59, 130, 246, 0.3));
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0;
  transition: opacity 250ms ease;
}

.btn-ghost-premium:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.03);
}

.btn-ghost-premium:hover::before {
  opacity: 1;
}

/* ---- Inputs (glow focus ring) ---- */
.input-premium {
  width: 100%;
  padding: 0.6rem 0.9rem;
  background: rgba(15, 17, 23, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  color: var(--text-primary);
  font-size: 0.875rem;
  outline: none;
  transition: all 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

.input-premium:focus {
  border-color: rgba(245, 158, 11, 0.5);
  box-shadow:
    0 0 0 3px rgba(245, 158, 11, 0.1),
    0 0 16px rgba(245, 158, 11, 0.08);
  background: rgba(15, 17, 23, 0.95);
}

.input-premium::placeholder {
  color: rgba(255, 255, 255, 0.25);
}

/* ---- Status Badges (pill + dot + glow) ---- */
.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.status-badge::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
}

.status-badge.status-active {
  background: rgba(16, 185, 129, 0.1);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.2);
}
.status-badge.status-active::before {
  background: #34d399;
  box-shadow: 0 0 6px rgba(16, 185, 129, 0.6);
}

.status-badge.status-inactive {
  background: rgba(239, 68, 68, 0.1);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.2);
}
.status-badge.status-inactive::before {
  background: #f87171;
  box-shadow: 0 0 6px rgba(239, 68, 68, 0.6);
}

.status-badge.status-pending {
  background: rgba(245, 158, 11, 0.1);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.2);
}
.status-badge.status-pending::before {
  background: #fbbf24;
  box-shadow: 0 0 6px rgba(245, 158, 11, 0.6);
}

.status-badge.status-info {
  background: rgba(59, 130, 246, 0.1);
  color: #60a5fa;
  border: 1px solid rgba(59, 130, 246, 0.2);
}
.status-badge.status-info::before {
  background: #60a5fa;
  box-shadow: 0 0 6px rgba(59, 130, 246, 0.6);
}

/* ---- Animated Gradient Border (featured cards) ---- */
.gradient-border {
  position: relative;
  background: rgba(26, 29, 39, 0.9);
  border-radius: 16px;
  padding: 1px;
}

.gradient-border::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 16px;
  padding: 1px;
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.3), rgba(59, 130, 246, 0.3), rgba(16, 185, 129, 0.3));
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  animation: gradient-rotate 4s linear infinite;
}

@keyframes gradient-rotate {
  0% { background: linear-gradient(135deg, rgba(245, 158, 11, 0.3), rgba(59, 130, 246, 0.3), rgba(16, 185, 129, 0.3)); }
  33% { background: linear-gradient(225deg, rgba(245, 158, 11, 0.3), rgba(59, 130, 246, 0.3), rgba(16, 185, 129, 0.3)); }
  66% { background: linear-gradient(315deg, rgba(245, 158, 11, 0.3), rgba(59, 130, 246, 0.3), rgba(16, 185, 129, 0.3)); }
  100% { background: linear-gradient(405deg, rgba(245, 158, 11, 0.3), rgba(59, 130, 246, 0.3), rgba(16, 185, 129, 0.3)); }
}

/* ---- Pulse Glow (live indicators) ---- */
.pulse-glow {
  animation: pulse-glow 2s ease-in-out infinite;
}

@keyframes pulse-glow {
  0%, 100% { box-shadow: 0 0 5px currentColor; opacity: 1; }
  50% { box-shadow: 0 0 15px currentColor; opacity: 0.7; }
}

/* ---- Page Enter Animation ---- */
.page-enter {
  animation: page-enter 0.3s ease-out;
}

@keyframes page-enter {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ---- Custom Scrollbar (thin dark) ---- */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.08); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: rgba(255, 255, 255, 0.16); }

/* Firefox scrollbar */
* {
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.08) transparent;
}

/* ---- Responsive ---- */
@media (max-width: 1024px) {
  .sidebar { width: 64px; }
  .sidebar .nav-item .nav-label { opacity: 0; width: 0; }
  .main-content { margin-left: 64px; }
  .sidebar.expanded { width: 260px; }
  .sidebar.expanded .nav-item .nav-label { opacity: 1; width: auto; }
}

@media (max-width: 768px) {
  .sidebar {
    transform: translateX(-100%);
    width: 260px;
  }
  .sidebar.mobile-open {
    transform: translateX(0);
  }
  .sidebar .nav-item .nav-label { opacity: 1; width: auto; }
  .main-content { margin-left: 0; }
  .header-bar { padding: 0 16px; }
  .glass-card { padding: 16px; border-radius: 12px; }
  .filters-panel { flex-direction: column; }
  .stat-card { padding: 16px; }
  .modal-content { padding: 24px; border-radius: 16px; }
}

/* ============================================
   ENHANCED UI — Phase 1 additions
   ============================================ */

/* ---- Stagger animation (children appear sequentially) ---- */
.stagger-enter > * {
  opacity: 0;
  transform: translateY(12px);
  animation: stagger-fade-in 0.4s var(--ease-out-expo) forwards;
}
.stagger-enter > *:nth-child(1) { animation-delay: 0s; }
.stagger-enter > *:nth-child(2) { animation-delay: 0.05s; }
.stagger-enter > *:nth-child(3) { animation-delay: 0.1s; }
.stagger-enter > *:nth-child(4) { animation-delay: 0.15s; }
.stagger-enter > *:nth-child(5) { animation-delay: 0.2s; }
.stagger-enter > *:nth-child(6) { animation-delay: 0.25s; }
.stagger-enter > *:nth-child(7) { animation-delay: 0.3s; }
.stagger-enter > *:nth-child(8) { animation-delay: 0.35s; }

@keyframes stagger-fade-in {
  to { opacity: 1; transform: translateY(0); }
}

/* ---- Slide-in for live feed items ---- */
@keyframes slide-in-right {
  from { opacity: 0; transform: translateX(20px); }
  to { opacity: 1; transform: translateX(0); }
}
.slide-in { animation: slide-in-right 0.35s var(--ease-out-expo); }

@keyframes slide-in-top {
  from { opacity: 0; transform: translateY(-12px); }
  to { opacity: 1; transform: translateY(0); }
}
.slide-in-top { animation: slide-in-top 0.3s var(--ease-out-expo); }

/* ---- Fade-out for removing items ---- */
@keyframes fade-out-down {
  to { opacity: 0; transform: translateY(8px); }
}
.fade-out { animation: fade-out-down 0.25s var(--ease-in-out) forwards; }

/* ---- Toast notifications ---- */
.toast-container {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 9999;
  display: flex;
  flex-direction: column-reverse;
  gap: 8px;
  pointer-events: none;
}

.toast {
  pointer-events: auto;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  background: rgba(22, 25, 35, 0.95);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border);
  border-radius: 12px;
  box-shadow: var(--shadow-xl);
  max-width: 380px;
  animation: toast-enter 0.4s var(--ease-out-expo);
}

.toast.toast-exit {
  animation: toast-exit 0.3s var(--ease-in-out) forwards;
}

.toast-icon {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.toast-icon.toast-inbound { background: rgba(59, 130, 246, 0.15); color: #60a5fa; }
.toast-icon.toast-outbound { background: rgba(16, 185, 129, 0.15); color: #34d399; }
.toast-icon.toast-missed { background: rgba(239, 68, 68, 0.15); color: #f87171; }
.toast-icon.toast-info { background: rgba(245, 158, 11, 0.15); color: #fbbf24; }

.toast-body {
  flex: 1;
  min-width: 0;
}
.toast-title {
  font-size: 0.8rem;
  font-weight: 600;
  color: rgba(255,255,255,0.9);
  line-height: 1.3;
}
.toast-text {
  font-size: 0.7rem;
  color: rgba(255,255,255,0.45);
  margin-top: 2px;
}

.toast-close {
  flex-shrink: 0;
  padding: 4px;
  color: rgba(255,255,255,0.3);
  cursor: pointer;
  transition: color var(--duration-fast);
  background: none;
  border: none;
}
.toast-close:hover { color: rgba(255,255,255,0.7); }

@keyframes toast-enter {
  from { opacity: 0; transform: translateX(40px) scale(0.95); }
  to { opacity: 1; transform: translateX(0) scale(1); }
}
@keyframes toast-exit {
  to { opacity: 0; transform: translateX(40px) scale(0.95); }
}

/* ---- Live connection indicator ---- */
.live-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 0.65rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.live-badge.live-connected {
  background: rgba(16, 185, 129, 0.1);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.2);
}
.live-badge.live-reconnecting {
  background: rgba(245, 158, 11, 0.1);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.2);
}
.live-badge.live-offline {
  background: rgba(239, 68, 68, 0.1);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.2);
}

.live-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}
.live-connected .live-dot {
  animation: live-pulse 2s ease-in-out infinite;
}
@keyframes live-pulse {
  0%, 100% { opacity: 1; box-shadow: 0 0 0 0 rgba(16,185,129,0.4); }
  50% { opacity: 0.7; box-shadow: 0 0 0 4px rgba(16,185,129,0); }
}

/* ---- Skeleton loading (enhanced) ---- */
.skeleton {
  background: linear-gradient(90deg,
    rgba(255,255,255,0.03) 25%,
    rgba(255,255,255,0.07) 50%,
    rgba(255,255,255,0.03) 75%);
  background-size: 200% 100%;
  animation: skeleton-loading 1.5s ease-in-out infinite;
  border-radius: 8px;
}
.skeleton-text { height: 14px; width: 80%; margin-bottom: 8px; }
.skeleton-title { height: 24px; width: 50%; margin-bottom: 12px; }
.skeleton-chart { height: 200px; width: 100%; border-radius: 12px; }
.skeleton-card { height: 100px; width: 100%; border-radius: 14px; }

/* ---- Button press effect ---- */
.btn-press { transition: transform var(--duration-fast); }
.btn-press:active { transform: scale(0.97); }

/* ---- KPI sparkline container ---- */
.kpi-sparkline {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 45px;
  opacity: 0.6;
  pointer-events: none;
}

/* ---- Expandable row ---- */
.expand-row {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s var(--ease-out-expo);
}
.expand-row.open {
  max-height: 400px;
}

/* ---- Filter chip (pill style) ---- */
.filter-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 500;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  color: rgba(255,255,255,0.6);
  cursor: pointer;
  transition: all var(--duration-normal) var(--ease-in-out);
  user-select: none;
}
.filter-chip:hover {
  background: rgba(255,255,255,0.07);
  border-color: rgba(255,255,255,0.15);
  color: rgba(255,255,255,0.85);
}
.filter-chip.active {
  background: rgba(245, 158, 11, 0.12);
  border-color: rgba(245, 158, 11, 0.4);
  color: #f59e0b;
}
.filter-chip .chip-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  border-radius: 999px;
  font-size: 0.65rem;
  font-weight: 700;
  background: rgba(255,255,255,0.08);
  padding: 0 4px;
}
.filter-chip.active .chip-count {
  background: rgba(245,158,11,0.2);
  color: #fbbf24;
}

/* ---- Quick stats bar ---- */
.quick-stats {
  display: flex;
  gap: 16px;
  padding: 12px 18px;
  background: rgba(22, 25, 35, 0.5);
  border: 1px solid rgba(255,255,255,0.04);
  border-radius: 12px;
  margin-bottom: 12px;
}
.quick-stat {
  display: flex;
  align-items: center;
  gap: 6px;
}
.quick-stat-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}
.quick-stat-label {
  font-size: 0.75rem;
  color: rgba(255,255,255,0.45);
}
.quick-stat-value {
  font-size: 0.85rem;
  font-weight: 600;
  color: rgba(255,255,255,0.9);
  font-feature-settings: 'tnum';
}

/* ---- Live call indicator (top of calls page) ---- */
.live-call-card {
  position: relative;
  padding: 14px 18px;
  background: rgba(16, 185, 129, 0.06);
  border: 1px solid rgba(16, 185, 129, 0.2);
  border-radius: 14px;
  margin-bottom: 16px;
  animation: live-call-pulse 3s ease-in-out infinite;
}
@keyframes live-call-pulse {
  0%, 100% { border-color: rgba(16, 185, 129, 0.2); }
  50% { border-color: rgba(16, 185, 129, 0.45); box-shadow: 0 0 20px rgba(16, 185, 129, 0.08); }
}

/* ---- Date range picker ---- */
.date-preset-btn {
  padding: 5px 12px;
  font-size: 0.75rem;
  font-weight: 500;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,0.08);
  background: transparent;
  color: rgba(255,255,255,0.5);
  cursor: pointer;
  transition: all var(--duration-fast);
}
.date-preset-btn:hover {
  background: rgba(255,255,255,0.04);
  color: rgba(255,255,255,0.8);
}
.date-preset-btn.active {
  background: rgba(59, 130, 246, 0.15);
  border-color: rgba(59, 130, 246, 0.4);
  color: #60a5fa;
}

/* ---- Tabular nums for data displays ---- */
.tabular-nums { font-variant-numeric: tabular-nums; }
.mono { font-family: 'JetBrains Mono', 'SF Mono', 'Fira Code', monospace; }

/* ---- ApexCharts dark overrides ---- */
.apexcharts-tooltip {
  background: rgba(15, 17, 23, 0.95) !important;
  border: 1px solid rgba(255,255,255,0.1) !important;
  border-radius: 10px !important;
  box-shadow: var(--shadow-lg) !important;
}
.apexcharts-tooltip-title {
  background: rgba(255,255,255,0.04) !important;
  border-bottom: 1px solid rgba(255,255,255,0.06) !important;
  color: rgba(255,255,255,0.6) !important;
  font-family: 'Inter', sans-serif !important;
  font-size: 11px !important;
}
.apexcharts-tooltip-text {
  font-family: 'Inter', sans-serif !important;
  font-size: 12px !important;
}
.apexcharts-tooltip-series-group {
  padding: 4px 10px !important;
}
.apexcharts-xaxistooltip,
.apexcharts-yaxistooltip {
  background: rgba(15, 17, 23, 0.95) !important;
  border: 1px solid rgba(255,255,255,0.1) !important;
  border-radius: 6px !important;
  color: rgba(255,255,255,0.7) !important;
}
.apexcharts-legend-text {
  color: rgba(255,255,255,0.6) !important;
}
.apexcharts-menu {
  background: rgba(22, 25, 35, 0.98) !important;
  border: 1px solid rgba(255,255,255,0.08) !important;
  border-radius: 8px !important;
}
.apexcharts-menu-item:hover {
  background: rgba(255,255,255,0.06) !important;
}

/* ---- Smooth number transitions ---- */
.counter-value {
  font-size: 2rem;
  font-weight: 700;
  line-height: 1.1;
  font-feature-settings: 'tnum';
  transition: color 0.3s ease;
}

/* ---- Analytics summary cards ---- */
.summary-card {
  position: relative;
  background: rgba(15, 17, 23, 0.6);
  border-radius: 16px;
  padding: 24px;
  overflow: hidden;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.summary-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}
.summary-card::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 16px;
  padding: 1px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.02));
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}
.summary-card.card-total::before {
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.5), rgba(59, 130, 246, 0.05));
}
.summary-card.card-answered::before {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.5), rgba(16, 185, 129, 0.05));
}
.summary-card.card-missed::before {
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.5), rgba(239, 68, 68, 0.05));
}
.summary-card.card-rate::before {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.5), rgba(245, 158, 11, 0.05));
}

/* ---- Trend badges ---- */
.trend-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: 99px;
  font-size: 0.75rem;
  font-weight: 500;
}
.trend-up { background: rgba(16, 185, 129, 0.15); color: #34d399; }
.trend-down { background: rgba(239, 68, 68, 0.15); color: #f87171; }

/* ---- Chart panel ---- */
.chart-panel {
  background: rgba(15, 17, 23, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 16px;
  padding: 24px;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

/* ---- Leaderboard items ---- */
.leaderboard-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.04);
  transition: background 0.2s ease;
}
.leaderboard-item:hover { background: rgba(255, 255, 255, 0.05); }

.leaderboard-rank {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  flex-shrink: 0;
}
.rank-1 { background: linear-gradient(135deg, #f59e0b, #d97706); color: #fff; }
.rank-2 { background: linear-gradient(135deg, #94a3b8, #64748b); color: #fff; }
.rank-3 { background: linear-gradient(135deg, #b45309, #92400e); color: #fff; }
.rank-default { background: rgba(255, 255, 255, 0.06); color: rgba(255, 255, 255, 0.5); }

/* ============================================
   PUBLIC PAGES — Landing, Pricing, Features
   ============================================ */

/* ---- Public header ---- */
.public-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(15, 17, 23, 0.85);
  backdrop-filter: blur(16px) saturate(1.2);
  -webkit-backdrop-filter: blur(16px) saturate(1.2);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  transition: background 0.3s ease;
}

/* ---- Hero section ---- */
.hero-section {
  position: relative;
  padding: clamp(80px, 12vw, 160px) 0 clamp(60px, 8vw, 120px);
  overflow: hidden;
}

.hero-glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(100px);
  pointer-events: none;
  opacity: 0.5;
}
.hero-glow-amber {
  width: 600px; height: 600px;
  top: -200px; right: -100px;
  background: radial-gradient(circle, rgba(245,158,11,0.12) 0%, transparent 70%);
}
.hero-glow-blue {
  width: 500px; height: 500px;
  bottom: -150px; left: -100px;
  background: radial-gradient(circle, rgba(59,130,246,0.08) 0%, transparent 70%);
}

.hero-title {
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.02em;
  background: linear-gradient(135deg, #ffffff 30%, rgba(255,255,255,0.6) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-subtitle {
  font-size: clamp(1rem, 2vw, 1.25rem);
  color: rgba(255,255,255,0.5);
  line-height: 1.6;
  max-width: 600px;
}

/* ---- Plan card ---- */
.plan-card {
  background: rgba(22, 25, 35, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 20px;
  padding: 32px 28px;
  transition: all 0.3s var(--ease-out-expo);
  position: relative;
  overflow: hidden;
}
.plan-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.4);
  border-color: rgba(255, 255, 255, 0.1);
}
.plan-card.plan-featured {
  border-color: rgba(245, 158, 11, 0.3);
  box-shadow: 0 0 40px rgba(245, 158, 11, 0.08);
}
.plan-card.plan-featured::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 20px;
  padding: 1px;
  background: linear-gradient(135deg, rgba(245,158,11,0.4), rgba(59,130,246,0.2));
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}

.plan-price {
  font-size: 2.5rem;
  font-weight: 800;
  color: #fff;
  font-feature-settings: 'tnum';
  letter-spacing: -0.02em;
  line-height: 1;
}
.plan-price-suffix {
  font-size: 1rem;
  font-weight: 400;
  color: rgba(255,255,255,0.4);
  margin-left: 4px;
}

.plan-badge {
  display: inline-flex;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  background: linear-gradient(135deg, #f59e0b, #f97316);
  color: #000;
}

/* ---- Feature check list ---- */
.feature-check {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 0;
  font-size: 0.875rem;
  color: rgba(255,255,255,0.7);
}
.feature-check-icon {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

/* ---- How it works steps ---- */
.step-number {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  font-weight: 800;
  color: #000;
  background: var(--gradient-amber);
  box-shadow: 0 8px 24px rgba(245,158,11,0.2);
  flex-shrink: 0;
}
.step-connector {
  flex: 1;
  height: 2px;
  background: linear-gradient(90deg, rgba(245,158,11,0.3), rgba(255,255,255,0.05));
  margin: 0 -8px;
}

/* ---- FAQ ---- */
.faq-item {
  background: rgba(22, 25, 35, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.04);
  border-radius: 14px;
  overflow: hidden;
  transition: border-color 0.2s ease;
}
.faq-item:hover {
  border-color: rgba(255, 255, 255, 0.08);
}
.faq-question {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 22px;
  cursor: pointer;
  font-size: 0.925rem;
  font-weight: 500;
  color: rgba(255,255,255,0.85);
  transition: color 0.2s;
}
.faq-question:hover { color: #fff; }
.faq-answer {
  padding: 0 22px 18px;
  font-size: 0.875rem;
  color: rgba(255,255,255,0.5);
  line-height: 1.6;
}

/* ---- Public footer ---- */
.public-footer {
  background: rgba(15, 17, 23, 0.95);
  border-top: 1px solid rgba(255, 255, 255, 0.04);
  padding: 48px 0 32px;
}
.public-footer a {
  color: rgba(255,255,255,0.4);
  font-size: 0.875rem;
  transition: color 0.15s;
  text-decoration: none;
}
.public-footer a:hover { color: #f59e0b; }

/* ---- Payment page ---- */
.payment-method-card {
  cursor: pointer;
  transition: all 0.2s ease;
}
.payment-method-card:hover {
  border-color: rgba(255,255,255,0.12);
  transform: translateY(-1px);
}
.payment-method-card.selected {
  border-color: rgba(245, 158, 11, 0.4);
  background: rgba(245, 158, 11, 0.04);
}

.requisites-block {
  background: rgba(255,255,255,0.02);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 12px;
  padding: 20px;
  font-family: 'JetBrains Mono', 'SF Mono', monospace;
  font-size: 0.8rem;
  color: rgba(255,255,255,0.6);
  line-height: 1.8;
}

/* ---- Auth pages shared ---- */
.auth-bg-glow {
  position: fixed;
  border-radius: 50%;
  pointer-events: none;
  filter: blur(80px);
}

/* ---- Password strength ---- */
.pwd-strength-bar {
  height: 4px;
  border-radius: 2px;
  background: rgba(255,255,255,0.06);
  flex: 1;
  overflow: hidden;
  transition: background 0.3s ease;
}
.pwd-strength-bar.active { background: var(--color); }
.pwd-strength-0 { --color: #ef4444; }
.pwd-strength-1 { --color: #f59e0b; }
.pwd-strength-2 { --color: #3b82f6; }
.pwd-strength-3 { --color: #10b981; }

/* ---- Onboarding stepper ---- */
.onboarding-step-line {
  flex: 1;
  height: 2px;
  border-radius: 1px;
  transition: background 0.5s ease;
}
.onboarding-step-line.done { background: #10b981; }
.onboarding-step-line.pending { background: rgba(255,255,255,0.06); }
