/* =================================
   DASHBOARD LAYOUT STYLES - ENHANCED
   With Sticky User Info Header & Submenus
   ================================= */

/* Auth guard: body gizli başlayır, dashboard.js auth keçdikdən sonra göstərir */
body {
  visibility: hidden !important;
}

/* CSS-only preloader — JS yüklənmədən əvvəl belə görsənir */
body::before {
  content: '';
  visibility: visible !important;
  position: fixed;
  inset: 0;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  z-index: 99999;
  transition: opacity 0.4s ease, visibility 0.4s ease;
}

body::after {
  content: '';
  visibility: visible !important;
  position: fixed;
  top: 50%;
  left: 50%;
  width: 44px;
  height: 44px;
  margin: -22px 0 0 -22px;
  border: 3px solid rgba(255, 255, 255, 0.25);
  border-top-color: #fff;
  border-radius: 50%;
  z-index: 100000;
  animation: authSpin 0.7s linear infinite;
  transition: opacity 0.4s ease, visibility 0.4s ease;
}

@keyframes authSpin {
  to { transform: rotate(360deg); }
}

/* Auth keçdikdən sonra preloader gizlənir */
body.auth-ready {
  visibility: visible !important;
}

body.auth-ready::before,
body.auth-ready::after {
  opacity: 0;
  visibility: hidden !important;
  pointer-events: none;
}

/* Sticky User Info Header */
.topbar {
  position: sticky;
  top: 0;
  z-index: 600;
  background: var(--topbar-bg);
  height: 0;
  display: none;
  align-items: center;
  justify-content: space-between;
  padding: 0 25px;
  box-shadow: none;
  transition: box-shadow 0.3s ease, background 0.3s ease;
  border-bottom: none;
  overflow: hidden;
}

.topbar.scrolled {
  box-shadow: 0 4px 12px var(--shadow);
}

/* User Info Card Styles */
.user-info-card {
  display: flex;
  align-items: center;
  gap: 15px;
  background: var(--surface);
  padding: 12px 20px;
  border-radius: 12px;
  box-shadow: 0 2px 8px var(--shadow);
  border: 1px solid var(--border-color);
}

.user-avatar {
  width: 45px;
  height: 45px;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 700;
  font-size: 18px;
  box-shadow: 0 2px 8px rgba(74, 144, 226, 0.3);
}

.user-details {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.user-name {
  font-weight: 600;
  font-size: 15px;
  color: var(--text-color);
  line-height: 1.2;
}

.user-balance {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 13px;
  color: var(--text-light);
}

.balance-amount {
  font-weight: 700;
  color: var(--primary);
  font-size: 14px;
}

.balance-icon {
  font-size: 12px;
}

/* Guest State */
.user-info-card.guest {
  background: var(--surface-alt);
  border: 1px solid var(--border-color);
}

.user-info-card.guest .user-avatar {
  background: linear-gradient(135deg, #6c757d, #495057);
}

.user-info-card.guest .user-name {
  color: var(--text-muted);
}

/* Loading State */
.balance-loading {
  display: inline-block;
  width: 40px;
  height: 12px;
  background: linear-gradient(90deg, var(--border-color) 25%, var(--surface-alt) 50%, var(--border-color) 75%);
  background-size: 200% 100%;
  animation: loading 1.5s infinite;
  border-radius: 4px;
}

@keyframes loading {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}

/* ===============================================
   PROMOTIONAL BANNER STYLES
   =============================================== */

.promo-banner {
  position: relative;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-radius: 12px;
  padding: 25px 30px;
  margin-bottom: 25px;
  box-shadow: 0 4px 20px rgba(102, 126, 234, 0.3);
  overflow: hidden;
  animation: slideDown 0.6s ease;
}

.promo-banner::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  opacity: 0.3;
  pointer-events: none;
}

.promo-content {
  position: relative;
  display: flex;
  align-items: center;
  gap: 20px;
  z-index: 1;
}

.promo-icon {
  font-size: 3em;
  animation: float 3s ease-in-out infinite;
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.2));
}

@keyframes float {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-10px); }
}

.promo-text {
  flex: 1;
}

.promo-label {
  font-size: 1.2em;
  font-weight: 700;
  color: white;
  margin-bottom: 8px;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.promo-description {
  font-size: 0.95em;
  color: rgba(255, 255, 255, 0.95);
  line-height: 1.6;
  max-width: 800px;
}

.promo-btn {
  background: white;
  color: #667eea;
  padding: 12px 28px;
  border-radius: 25px;
  text-decoration: none;
  font-weight: 700;
  font-size: 0.95em;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  white-space: nowrap;
}

.promo-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
  background: #f8f9fa;
  text-decoration: none;
}

.promo-arrow {
  font-size: 1.2em;
  transition: transform 0.3s ease;
}

.promo-btn:hover .promo-arrow {
  transform: translateX(4px);
}

.promo-close {
  position: absolute;
  top: 15px;
  right: 15px;
  background: rgba(255, 255, 255, 0.2);
  border: none;
  color: white;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2em;
  transition: all 0.3s ease;
  z-index: 2;
}

.promo-close:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: rotate(90deg);
}

.promo-banner.hidden {
  animation: slideUp 0.4s ease forwards;
  margin-bottom: 0;
}

@keyframes slideUp {
  from {
    opacity: 1;
    transform: translateY(0);
    max-height: 300px;
  }
  to {
    opacity: 0;
    transform: translateY(-20px);
    max-height: 0;
    padding: 0;
    margin: 0;
  }
}

/* ===============================================
   CAROUSEL BANNER STYLES
   =============================================== */

.carousel-banner {
  position: relative;
  border-radius: 14px;
  overflow: hidden;
  margin-bottom: 25px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
  min-height: 180px;
}

.carousel-slides {
  position: relative;
  width: 100%;
  min-height: 180px;
}

.carousel-slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  min-height: 180px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.8s ease, visibility 0.8s ease;
  text-decoration: none !important;
  color: white !important;
  display: flex;
  align-items: center;
  padding: 30px 35px;
  box-sizing: border-box;
  cursor: pointer;
}

.carousel-slide:hover {
  text-decoration: none !important;
  color: white !important;
}

.carousel-slide:hover * {
  text-decoration: none !important;
  color: inherit !important;
}

.carousel-slide.active {
  opacity: 1;
  visibility: visible;
  position: relative;
}

.carousel-slide-pattern {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.04'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  pointer-events: none;
}

.carousel-slide-content {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 25px;
  width: 100%;
}

.carousel-badge {
  position: absolute;
  top: 12px;
  right: 15px;
  background: rgba(255,255,255,0.15);
  color: rgba(255,255,255,0.8);
  padding: 3px 12px;
  border-radius: 10px;
  font-size: 0.7em;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  backdrop-filter: blur(5px);
  z-index: 2;
}

.carousel-icon-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  min-width: 80px;
  flex-shrink: 0;
}

.carousel-icon {
  font-size: 3em;
  filter: drop-shadow(0 4px 8px rgba(0,0,0,0.2));
  animation: float 3s ease-in-out infinite;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  line-height: 1;
}

.carousel-icon svg {
  width: 56px;
  height: 56px;
  stroke: currentColor;
  fill: none;
}

.carousel-logo-text {
  font-size: 1.1em;
  font-weight: 800;
  color: #e94560;
  letter-spacing: 0.5px;
}

.carousel-text {
  flex: 1;
  min-width: 0;
}

.carousel-title {
  font-size: 1.35em;
  font-weight: 700;
  margin-bottom: 8px;
  text-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.carousel-desc {
  font-size: 0.95em;
  color: rgba(255,255,255,0.85);
  line-height: 1.6;
  max-width: 600px;
}

.carousel-cta {
  background: rgba(255,255,255,0.2);
  backdrop-filter: blur(5px);
  color: white;
  padding: 12px 28px;
  border-radius: 25px;
  font-weight: 700;
  font-size: 0.9em;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all 0.3s ease;
  border: 1px solid rgba(255,255,255,0.3);
  white-space: nowrap;
  flex-shrink: 0;
}

.carousel-slide:hover .carousel-cta {
  background: rgba(255,255,255,0.3) !important;
  transform: translateX(3px);
}

.carousel-cta-arrow {
  transition: transform 0.3s ease;
}

.carousel-slide:hover .carousel-cta-arrow {
  transform: translateX(4px);
}

/* Carousel Arrows */
.carousel-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 40px;
  height: 40px;
  min-width: 40px;
  min-height: 40px;
  aspect-ratio: 1 / 1;
  padding: 0;
  background: rgba(255,255,255,0.15);
  backdrop-filter: blur(5px);
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 50%;
  color: white;
  font-size: 1.5em;
  cursor: pointer;
  z-index: 3;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  flex-shrink: 0;
}

.carousel-arrow:hover {
  background: rgba(255,255,255,0.3);
  transform: translateY(-50%) scale(1.1);
}

.carousel-prev { left: 12px; }
.carousel-next { right: 12px; }

/* Carousel Dots */
.carousel-dots {
  position: absolute;
  bottom: 12px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
  z-index: 3;
}

.carousel-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255,255,255,0.35);
  cursor: pointer;
  transition: all 0.3s ease;
}

.carousel-dot.active {
  background: white;
  transform: scale(1.2);
  box-shadow: 0 0 8px rgba(255,255,255,0.5);
}

.carousel-dot:hover {
  background: rgba(255,255,255,0.7);
}

/* Carousel Caption */
.carousel-caption {
  position: absolute;
  bottom: 12px;
  right: 15px;
  color: rgba(255,255,255,0.5);
  font-size: 0.7em;
  font-style: italic;
  z-index: 3;
}

/* Welcome Section */
/* Welcome Section */
.welcome-section {
  background: linear-gradient(135deg, #4a90e2 0%, #357abd 50%, #2a6aad 100%);
  color: white;
  padding: 40px 44px;
  border-radius: 16px;
  margin-bottom: 30px;
  box-shadow: 0 8px 32px rgba(74, 144, 226, 0.25);
  position: relative;
  overflow: hidden;
}

.welcome-section::before {
  content: '';
  position: absolute;
  top: -60%;
  right: -15%;
  width: 340px;
  height: 340px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
  pointer-events: none;
}

.welcome-section::after {
  content: '';
  position: absolute;
  bottom: -40%;
  left: -10%;
  width: 260px;
  height: 260px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.08) 0%, transparent 70%);
  pointer-events: none;
}

.welcome-section h1 {
  margin-bottom: 10px;
  color: white;
  font-size: 1.7em;
  font-weight: 700;
  position: relative;
  z-index: 1;
}

.welcome-text {
  font-size: 1em;
  opacity: 0.7;
  position: relative;
  z-index: 1;
  max-width: 600px;
}

/* Quick Actions Grid */
.quick-actions {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
  margin-top: 28px;
  position: relative;
  z-index: 1;
}

.quick-action-btn {
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.9);
  padding: 14px 18px;
  border-radius: 10px;
  text-decoration: none;
  text-align: center;
  font-weight: 600;
  font-size: 0.9em;
  transition: all 0.25s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 50px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  cursor: pointer;
  position: relative;
  backdrop-filter: blur(4px);
}

.quick-action-btn:hover {
  transform: translateY(-2px);
  background: rgba(255, 255, 255, 0.18);
  border-color: rgba(255, 255, 255, 0.35);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
  text-decoration: none !important;
  color: white !important;
}

.quick-action-btn svg {
  stroke: rgba(255, 255, 255, 0.85);
}

/* Stats Grid */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-bottom: 30px;
}

.stat-card {
  background: var(--card-bg);
  padding: 22px 24px;
  border-radius: 16px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.stat-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.08);
}

/* Icon */
.stat-card-icon {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
}

.stat-card-icon.sms { background: #eff6ff; color: #3b82f6; }
.stat-card-icon.sms svg { stroke: #3b82f6; }
.stat-card-icon.form { background: #f0fdf4; color: #22c55e; }
.stat-card-icon.form svg { stroke: #22c55e; }
.stat-card-icon.users { background: #faf5ff; color: #a855f7; }
.stat-card-icon.users svg { stroke: #a855f7; }
.stat-card-icon.events { background: #fef3c7; color: #f59e0b; }
.stat-card-icon.events svg { stroke: #f59e0b; }

/* Value */
.stat-card-value {
  font-size: 28px;
  font-weight: 700;
  color: var(--stat-value);
  line-height: 1;
  margin-bottom: 4px;
}

/* Label */
.stat-card-label {
  font-size: 13px;
  color: var(--stat-label);
  font-weight: 500;
  margin-bottom: 14px;
}

/* Mini stats row */
.stat-card-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding-top: 14px;
  border-top: 1px solid var(--border-color);
}

.stat-mini {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  font-weight: 500;
  color: var(--stat-label);
}

.stat-mini-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
}

.stat-mini.success .stat-mini-dot { background: #22c55e; }
.stat-mini.success span:last-child { color: #22c55e; }
.stat-mini.error .stat-mini-dot { background: #ef4444; }
.stat-mini.error span:last-child { color: #ef4444; }
.stat-mini.pending .stat-mini-dot { background: #f59e0b; }
.stat-mini.pending span:last-child { color: #f59e0b; }
.stat-mini.muted .stat-mini-dot { background: var(--stat-label); }

/* ===== ACTIVITY FEED ===== */
.activity-list {
  max-height: 500px;
  overflow-y: auto;
}

.activity-item {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 14px 0;
  border-bottom: 1px solid var(--border-color, #f0f0f0);
}

.activity-item:last-child { border-bottom: none; }

.activity-icon {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.activity-content { flex: 1; min-width: 0; }

.activity-desc {
  font-size: 0.9em;
  font-weight: 500;
  color: var(--text-color, #2c3e50);
  line-height: 1.4;
}

.activity-detail {
  font-weight: 400;
  color: var(--text-light, #7f8c8d);
}

.activity-meta {
  font-size: 0.78em;
  color: var(--text-light, #95a5a6);
  margin-top: 3px;
}

/* Dark theme activity */
body.dark-theme .activity-desc { color: #e2e8f0; }
body.dark-theme .activity-detail { color: #94a3b8; }
body.dark-theme .activity-meta { color: #64748b; }

/* Dark theme stat icons */
body.dark-theme .stat-card-icon.sms { background: rgba(59, 130, 246, 0.12); }
body.dark-theme .stat-card-icon.form { background: rgba(34, 197, 94, 0.12); }
body.dark-theme .stat-card-icon.users { background: rgba(168, 85, 247, 0.12); }
body.dark-theme .stat-card-icon.events { background: rgba(245, 158, 11, 0.12); }

/* Section Title */
.section-title {
  margin-bottom: 15px;
  color: var(--stat-value);
  font-weight: 700;
  font-size: 1.15em;
}

/* Empty State */
.empty-state {
  text-align: center;
  color: var(--text-light);
  padding: 40px;
  margin: 0;
}

/* ========================================
   SIDEBAR STYLES
   ======================================== */
.sidebar {
  /* Dark Theme (default) */
  --sb-bg: linear-gradient(180deg, #141627 0%, #171a30 50%, #1a1d35 100%);
  --sb-text: rgba(255, 255, 255, 0.6);
  --sb-text-active: #e4e7f1;
  --sb-text-muted: rgba(255, 255, 255, 0.3);
  --sb-border: rgba(255, 255, 255, 0.06);
  --sb-hover: rgba(91, 156, 240, 0.07);
  --sb-active-bg: linear-gradient(135deg, #5b9cf0, #4888dc);
  --sb-active-text: #ffffff;
  --sb-accent: #5b9cf0;
  --sb-search-bg: rgba(255, 255, 255, 0.05);
  --sb-search-border: rgba(255, 255, 255, 0.07);
  --sb-submenu-bg: rgba(0, 0, 0, 0.12);
  --sb-dot: rgba(255, 255, 255, 0.2);
  --sb-avatar-border: rgba(91, 156, 240, 0.45);
  --sb-toggle-bg: rgba(255, 255, 255, 0.05);

  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  height: 100vh;
  height: 100dvh; /* iOS-da brauzer barı dəyişdikdə dinamik */
  width: 270px;
  background: var(--sb-bg);
  color: var(--sb-text);
  display: flex;
  flex-direction: column;
  transition: transform 0.3s ease;
  z-index: 10000;
  box-shadow: 2px 0 24px rgba(0, 0, 0, 0.35);
  overscroll-behavior: contain;
  --glow-x: -1000px;
  --glow-y: -1000px;
}

/* Light Theme */
.sidebar.sidebar-light {
  --sb-bg: linear-gradient(180deg, #f7f8fc 0%, #f0f2f8 50%, #eef0f6 100%);
  --sb-text: #4a5568;
  --sb-text-active: #1a202c;
  --sb-text-muted: #a0aec0;
  --sb-border: #e2e8f0;
  --sb-hover: rgba(74, 144, 226, 0.06);
  --sb-active-bg: linear-gradient(135deg, #4a90e2, #357abd);
  --sb-active-text: #ffffff;
  --sb-accent: #4a90e2;
  --sb-search-bg: #ffffff;
  --sb-search-border: #e2e8f0;
  --sb-submenu-bg: rgba(74, 144, 226, 0.03);
  --sb-dot: #cbd5e0;
  --sb-avatar-border: rgba(74, 144, 226, 0.35);
  --sb-toggle-bg: #ffffff;
  box-shadow: 2px 0 15px rgba(0, 0, 0, 0.05);
}

.sidebar.sidebar-light .sidebar-profile-avatar::after {
  border-color: #f0f2f8;
}

/* Subtle glow (dark only) */
.sidebar::after {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: radial-gradient(circle 200px at var(--glow-x) var(--glow-y), rgba(74, 144, 226, 0.05), transparent 70%);
  pointer-events: none;
  z-index: 0;
  transition: background 0.15s ease;
}
.sidebar.sidebar-light::after { background: none; }

/* --- Profile (like the reference image) --- */
.sidebar-profile {
  position: relative;
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 24px 20px 20px;
  border-bottom: 1px solid var(--sb-border);
}

.sidebar-profile-avatar {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: linear-gradient(135deg, #4a90e2, #357abd);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 17px;
  font-weight: 700;
  flex-shrink: 0;
  border: 3px solid var(--sb-avatar-border);
  box-shadow: 0 4px 14px rgba(74, 144, 226, 0.25);
  position: relative;
}

/* Online status indicator */
.sidebar-profile-avatar::after {
  content: '';
  position: absolute;
  bottom: 1px;
  right: 1px;
  width: 12px;
  height: 12px;
  background: #22c55e;
  border-radius: 50%;
  border: 2.5px solid var(--sb-bg, #0f1923);
  box-shadow: 0 0 6px rgba(34, 197, 94, 0.5);
}
.sidebar.sidebar-light .sidebar-profile-avatar::after {
  border-color: #edf1f7;
}

.sidebar-profile-info {
  flex: 1;
  min-width: 0;
}

.sidebar-profile-name {
  font-size: 1em;
  font-weight: 700;
  color: var(--sb-text-active);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  cursor: pointer;
  line-height: 1.3;
}
.sidebar-profile-name:hover { color: var(--sb-accent); }

.sidebar-profile-role {
  font-size: 0.78em;
  color: var(--sb-accent);
  font-weight: 600;
  cursor: pointer;
  margin-top: 2px;
}

.sidebar-profile-actions {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}

.sidebar-profile-actions .notification-bell-btn {
  width: 36px;
  height: 36px;
  background: var(--sb-search-bg);
  border: 1px solid var(--sb-search-border);
  color: var(--sb-text);
  border-radius: 10px;
}

.sidebar-profile-actions .notification-bell-btn:hover {
  background: var(--sb-hover);
}

.sidebar-profile-actions .bell-icon {
  color: var(--sb-text);
}

.sidebar-profile-actions .bell-icon svg {
  stroke: var(--sb-text);
}

.close-btn {
  display: none;
  background: none;
  border: none;
  color: var(--sb-text);
  cursor: pointer;
  padding: 6px;
  border-radius: 8px;
  transition: background 0.2s;
}
.close-btn:hover { background: var(--sb-hover); }

/* --- Search --- */
.sidebar-search {
  position: relative;
  z-index: 1;
  padding: 16px 16px 6px;
}

.sidebar-search-icon {
  position: absolute;
  left: 28px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--sb-text-muted);
  pointer-events: none;
}

.sidebar-search input {
  width: 100%;
  padding: 10px 14px 10px 36px;
  background: var(--sb-search-bg);
  border: 1.5px solid var(--sb-search-border);
  border-radius: 12px;
  color: var(--sb-text-active);
  font-size: 0.88em;
  font-family: var(--font-family);
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.sidebar-search input::placeholder { color: var(--sb-text-muted); }
.sidebar-search input:focus {
  border-color: var(--sb-accent);
  box-shadow: 0 0 0 3px rgba(74, 144, 226, 0.1);
}

/* --- Nav --- */
.sidebar-nav {
  position: relative;
  z-index: 1;
  flex: 1 1 auto;
  min-height: 0; /* flex item-i öz scroll-unu götürsün, footer ekrandan çıxmasın */
  padding: 8px 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.sidebar-nav::-webkit-scrollbar { width: 8px; }
.sidebar-nav::-webkit-scrollbar-track { background: transparent; }
.sidebar-nav::-webkit-scrollbar-thumb { background: var(--sb-border); border-radius: 4px; }
.sidebar-nav::-webkit-scrollbar-thumb:hover { background: var(--sb-text-muted); }

/* Footer həmişə görünsün — flex shrink etməsin */
.sidebar-footer { flex: 0 0 auto; }
.sidebar-profile { flex: 0 0 auto; }
.sidebar-search { flex: 0 0 auto; }

.nav-item-wrapper { position: relative; z-index: 1; }
.nav-item-wrapper:has(.submenu.open) { z-index: 10; }

.nav-item {
  display: flex;
  align-items: center;
  padding: 11px 14px;
  color: var(--sb-text);
  text-decoration: none;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
  position: relative;
  margin: 3px 12px;
  border-radius: 14px;
  border: none;
  --item-glow-x: -100px;
  --item-glow-y: -100px;
}
.nav-item.has-submenu { padding-right: 38px; }

.submenu-arrow {
  position: absolute;
  right: 14px;
  transition: transform 0.3s ease;
  color: var(--sb-text-muted);
  display: flex;
  align-items: center;
}
.nav-item.has-submenu.open .submenu-arrow {
  transform: rotate(90deg);
  color: var(--sb-accent);
}

/* Hover - yüngül böyümə + fon */
.nav-item:hover {
  background: var(--sb-hover);
  color: var(--sb-text-active);
  text-decoration: none;
  transform: translateX(3px);
}

/* Active item - gradient pill, kölgəli, böyümə effekti */
.nav-item.active {
  background: var(--sb-active-bg);
  color: var(--sb-active-text);
  font-weight: 600;
  box-shadow: 0 4px 18px rgba(74, 144, 226, 0.4);
  transform: scale(1.02);
}
.nav-item.active:hover {
  transform: scale(1.03);
  box-shadow: 0 6px 22px rgba(74, 144, 226, 0.45);
}
.nav-item.active .nav-icon { color: var(--sb-active-text); }
.nav-item.active .nav-text { color: var(--sb-active-text); }
.nav-item.active .submenu-arrow { color: rgba(255, 255, 255, 0.7); }

/* Nav icon - aktiv olduqda dairəvi ağ fon */
.nav-icon {
  font-size: 1.15em;
  margin-right: 12px;
  width: 28px;
  height: 28px;
  text-align: center;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  transition: all 0.3s ease;
}

.nav-item.active .nav-icon {
  background: rgba(255, 255, 255, 0.2);
  border-radius: 8px;
}

.nav-text {
  font-size: 0.9em;
  font-weight: 500;
  flex: 1;
}

/* --- Submenu --- */
.submenu {
  max-height: 0;
  overflow: hidden;
  background: var(--sb-submenu-bg);
  transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1), padding 0.4s ease;
  padding: 0;
  margin: 2px 12px;
  border-radius: 12px;
}
.submenu.open {
  max-height: 500px;
  padding: 6px 0;
}

/* Submenu items fade in sequentially */
.submenu.open .submenu-item {
  animation: sbSlideIn 0.3s ease forwards;
  opacity: 0;
}
.submenu.open .submenu-item:nth-child(1) { animation-delay: 0.03s; }
.submenu.open .submenu-item:nth-child(2) { animation-delay: 0.06s; }
.submenu.open .submenu-item:nth-child(3) { animation-delay: 0.09s; }
.submenu.open .submenu-item:nth-child(4) { animation-delay: 0.12s; }
.submenu.open .submenu-item:nth-child(5) { animation-delay: 0.15s; }
.submenu.open .submenu-item:nth-child(6) { animation-delay: 0.18s; }
.submenu.open .submenu-item:nth-child(7) { animation-delay: 0.21s; }
.submenu.open .submenu-item:nth-child(8) { animation-delay: 0.24s; }

@keyframes sbSlideIn {
  from { opacity: 0; transform: translateX(-8px); }
  to { opacity: 1; transform: translateX(0); }
}

.submenu-item {
  display: flex;
  align-items: center;
  padding: 9px 14px 9px 40px;
  color: var(--sb-text);
  text-decoration: none;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  font-size: 0.87em;
  position: relative;
  border-radius: 10px;
  margin: 2px 6px;
  border: none;
  --item-glow-x: -100px;
  --item-glow-y: -100px;
}

.submenu-item::before {
  content: '';
  position: absolute;
  left: 18px;
  top: 50%;
  width: 5px;
  height: 5px;
  background: var(--sb-dot);
  border-radius: 50%;
  transform: translateY(-50%);
  transition: all 0.3s ease;
}

.submenu-item:hover {
  background: var(--sb-hover);
  color: var(--sb-text-active);
  text-decoration: none;
  transform: translateX(3px);
}
.submenu-item:hover::before {
  background: var(--sb-accent);
  width: 6px; height: 6px;
}

/* Active submenu - gradient pill */
.submenu-item.active {
  background: var(--sb-active-bg);
  color: var(--sb-active-text);
  font-weight: 600;
  box-shadow: 0 3px 12px rgba(74, 144, 226, 0.35);
  transform: scale(1.01);
}
.submenu-item.active:hover {
  transform: scale(1.02);
}
.submenu-item.active::before {
  background: #ffffff;
  width: 6px; height: 6px;
}

.submenu-item .nav-icon {
  font-size: 1em;
  margin-right: 10px;
  width: 18px;
}

/* --- Footer --- */
.sidebar-footer {
  position: relative;
  z-index: 1;
  padding: 12px 16px calc(16px + env(safe-area-inset-bottom, 0px));
  border-top: 1px solid var(--sb-border);
}

.btn-logout {
  width: 100%;
  display: flex;
  align-items: center;
  padding: 10px 14px;
  background: rgba(231, 76, 60, 0.1);
  border: 1px solid rgba(231, 76, 60, 0.15);
  color: #e74c3c;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: var(--font-family);
  font-size: 0.88em;
  font-weight: 500;
  margin-bottom: 12px;
}
.btn-logout:hover {
  background: rgba(231, 76, 60, 0.18);
  border-color: rgba(231, 76, 60, 0.35);
}

/* Theme Toggle - pill style like reference image */
.sidebar-theme-toggle {
  display: flex;
  background: var(--sb-toggle-bg);
  border: 1.5px solid var(--sb-border);
  border-radius: 14px;
  padding: 3px;
  gap: 0;
}

.theme-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 9px 12px;
  background: transparent;
  border: none;
  color: var(--sb-text-muted);
  font-size: 0.82em;
  font-weight: 600;
  font-family: var(--font-family);
  cursor: pointer;
  transition: all 0.3s ease;
  border-radius: 11px;
}

.theme-btn.active {
  background: var(--sb-active-bg);
  color: #ffffff;
  box-shadow: 0 3px 12px rgba(74, 144, 226, 0.35);
}

.theme-btn:not(.active):hover {
  color: var(--sb-text-active);
  background: var(--sb-hover);
}

/* Kompakt controls sırası — tema (icon button) + dil (dropdown) yan-yana */
.sidebar-controls-row {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 6px;
  flex-wrap: nowrap;
}
/* Logo — sol kənarda, qalanı sağa axır (lang/theme/home/logout) */
.sidebar-controls-row .sidebar-mini-logo { margin-right: auto; }
.sidebar-home-btn:hover { color: #6366f1; }
.sidebar-logout-btn { color: #ef4444; }
.sidebar-logout-btn:hover {
  background: rgba(239, 68, 68, 0.1) !important;
  border-color: rgba(239, 68, 68, 0.3) !important;
  color: #dc2626;
}
.sidebar-light .sidebar-logout-btn { color: #dc2626; }
.sidebar-light .sidebar-logout-btn:hover {
  background: rgba(220, 38, 38, 0.08) !important;
}

.sidebar-icon-btn {
  flex: 0 0 auto;
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--sb-toggle-bg);
  border: 1.5px solid var(--sb-border);
  color: var(--sb-text-muted);
  border-radius: 10px;
  cursor: pointer;
  padding: 0;
  transition: color 0.2s, background 0.2s, border-color 0.2s, transform 0.15s;
  font-family: var(--font-family);
}
.sidebar-icon-btn:hover {
  color: var(--sb-text-active);
  background: var(--sb-hover);
  border-color: var(--sb-border);
}
.sidebar-icon-btn:active { transform: scale(0.94); }
.sidebar-icon-btn .sb-theme-ico { display: none; }
.sidebar-icon-btn[data-theme="light"] .sb-theme-ico-sun { display: block; color: #f59e0b; }
.sidebar-icon-btn[data-theme="dark"]  .sb-theme-ico-moon { display: block; color: #93c5fd; }

.sidebar-lang-wrap { flex: 0 0 auto; }
.sidebar-lang-wrap .i18n-lang-toggle {
  height: 36px;
  padding: 0 10px;
  border-radius: 10px;
  background: var(--sb-toggle-bg);
  border: 1.5px solid var(--sb-border);
  color: var(--sb-text-muted);
  gap: 6px;
  font-family: var(--font-family);
}
.sidebar-lang-wrap .i18n-lang-toggle:hover {
  background: var(--sb-hover);
  color: var(--sb-text-active);
}
.sidebar-lang-wrap .i18n-lang-cur { font-size: 0.8em; }
/* Sidebar aşağısındadır — dropdown-u yuxarı açaq ki, ekran kənarına çıxmasın.
   AZ düyməsi sol kənardadır → menyu sağa açılmalıdır (left:0, right:auto),
   yoxsa ekrandan çölə düşür. */
.sidebar-lang-wrap .i18n-lang-menu {
  top: auto;
  bottom: calc(100% + 8px);
  left: 0;
  right: auto;
  min-width: 180px;
  max-width: calc(100vw - 32px);
  transform: translateY(6px) scale(0.96);
}
.sidebar-lang-wrap.open .i18n-lang-menu,
.sidebar-lang-wrap .i18n-lang-wrap.open .i18n-lang-menu {
  transform: translateY(0) scale(1);
}

/* Main Content Area */
.main-content {
  margin-left: 270px;
  min-height: 100vh;
  background: var(--background);
  transition: margin-left 0.3s ease;
}

.menu-toggle {
  display: none;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 5px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 10px;
  border-radius: 10px;
  width: 40px;
  height: 40px;
  transition: background 0.2s ease, transform 0.2s ease;
}

.menu-toggle:hover {
  background: rgba(99, 102, 241, 0.08);
}

.menu-toggle:active {
  transform: scale(0.95);
}

.menu-toggle span {
  display: block;
  height: 2px;
  background: var(--text-color);
  border-radius: 2px;
  transition: width 0.25s ease, transform 0.25s ease, opacity 0.25s ease;
}

.menu-toggle span:nth-child(1) { width: 20px; }
.menu-toggle span:nth-child(2) { width: 14px; }
.menu-toggle span:nth-child(3) { width: 20px; }

.menu-toggle:hover span:nth-child(2) {
  width: 20px;
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 15px;
}

/* Topbar-da hamburgerin yanında 1sms logosu */
.topbar-logo {
  display: inline-flex;
  align-items: center;
  margin-left: 4px;
  margin-right: auto;
  padding: 4px 8px;
  border-radius: 8px;
  text-decoration: none;
  transition: background 0.2s;
}
.topbar-logo:hover {
  background: rgba(99, 102, 241, 0.08);
  text-decoration: none;
}
.topbar-logo img {
  height: 32px;
  width: auto;
  display: block;
}
@media (max-width: 768px) {
  .topbar-logo img {
    height: 28px;
  }
}
@media (max-width: 480px) {
  .topbar-logo {
    padding: 3px 6px;
    margin-left: 2px;
  }
  .topbar-logo img {
    height: 24px;
  }
}

/* Topbar user chip — sağ yuxarıda userin adı/avatarı */
.topbar-user-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 14px 5px 5px;
  border-radius: 999px;
  background: rgba(99, 102, 241, 0.08);
  border: 1px solid rgba(99, 102, 241, 0.22);
  color: var(--text-primary, #1a202c);
  text-decoration: none;
  font-size: 0.88em;
  font-weight: 500;
  transition: background 0.2s, border-color 0.2s, transform 0.15s;
  max-width: 220px;
}
.topbar-user-chip:hover {
  background: rgba(99, 102, 241, 0.16);
  border-color: rgba(99, 102, 241, 0.45);
  text-decoration: none;
  color: var(--text-primary, #1a202c);
  transform: translateY(-1px);
}
.topbar-user-chip-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.85em;
  overflow: hidden;
  flex-shrink: 0;
}
.topbar-user-chip-text {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
  min-width: 0;
}
.topbar-user-chip-name {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 160px;
  font-weight: 600;
}
.topbar-user-chip-balance {
  font-size: 0.78em;
  opacity: 0.72;
  font-weight: 500;
  white-space: nowrap;
}
.topbar-user-chip-balance #topbarUserChipBalanceNum {
  font-weight: 700;
  color: #6366f1;
  opacity: 1;
}

@media (max-width: 768px) {
  .topbar-user-chip {
    padding: 3px 12px 3px 3px;
    font-size: 0.78em;
    max-width: 180px;
  }
  .topbar-user-chip-avatar {
    width: 30px;
    height: 30px;
    font-size: 0.82em;
  }
  .topbar-user-chip-name {
    max-width: 120px;
  }
  .topbar-user-chip-balance {
    font-size: 0.82em;
  }
}

/* Topbar Notification Bell */
.topbar-notification {
  position: relative;
}

.notification-bell-btn {
  position: relative;
  background: var(--bell-bg);
  border: none;
  width: 45px;
  height: 45px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  box-shadow: none;
  color: var(--bell-color);
}

.notification-bell-btn:hover {
  transform: scale(1.08);
  background: var(--bell-hover);
  box-shadow: none;
}

.notification-bell-btn:active {
  transform: scale(0.95);
}

/* === Topbar bell — bütün səhifələrdə user chip-dən qabaq === */
.topbar-bell-btn {
  position: relative;
  background: rgba(99, 102, 241, 0.1);
  border: 0;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: #4f46e5;
  transition: all .15s ease;
  margin-right: 8px;
  flex-shrink: 0;
}
.topbar-bell-btn:hover { background: rgba(99, 102, 241, 0.18); transform: scale(1.05); }
.topbar-bell-btn:active { transform: scale(0.95); }
.topbar-bell-count {
  position: absolute;
  top: -2px;
  right: -2px;
  background: linear-gradient(135deg, #ef4444, #dc2626);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 6px rgba(239, 68, 68, 0.4);
  border: 2px solid #fff;
  line-height: 1;
}
body.dark-theme .topbar-bell-btn { background: rgba(255, 255, 255, 0.08); color: #c7d2fe; }
body.dark-theme .topbar-bell-btn:hover { background: rgba(255, 255, 255, 0.14); }
body.dark-theme .topbar-bell-count { border-color: #1e1e2e; }

.bell-icon {
  font-size: 1.3em;
  animation: bellSwing 3s infinite ease-in-out;
  color: var(--bell-color);
}

.bell-icon svg {
  stroke: var(--bell-color);
}

@keyframes bellSwing {
  0%, 100% { transform: rotate(0deg); }
  5%, 15% { transform: rotate(-15deg); }
  10%, 20% { transform: rotate(15deg); }
  25% { transform: rotate(0deg); }
}

.notification-pulse {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.05);
  animation: pulseRing 2s infinite;
  pointer-events: none;
}

@keyframes pulseRing {
  0% {
    transform: scale(1);
    opacity: 0.5;
  }
  100% {
    transform: scale(1.5);
    opacity: 0;
  }
}

.notification-count {
  position: absolute;
  top: -4px;
  right: -4px;
  background: linear-gradient(135deg, #FF3B30, #FF6B6B);
  color: white;
  font-size: 0.7em;
  font-weight: 800;
  padding: 4px 7px;
  border-radius: 12px;
  min-width: 20px;
  text-align: center;
  box-shadow: 0 3px 8px rgba(255, 59, 48, 0.4), 
              0 0 0 3px rgba(255, 255, 255, 0.3);
  animation: gentlePulse 3s infinite;
  letter-spacing: 0.5px;
}

@keyframes gentlePulse {
  0%, 100% { 
    transform: scale(1); 
    box-shadow: 0 3px 8px rgba(255, 59, 48, 0.4), 
                0 0 0 3px rgba(255, 255, 255, 0.3);
  }
  50% { 
    transform: scale(1.08); 
    box-shadow: 0 4px 12px rgba(255, 59, 48, 0.6), 
                0 0 0 4px rgba(255, 255, 255, 0.4);
  }
}

/* Topbar Logout Button */
.topbar-logout-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
  border: none;
  padding: 10px 16px;
  border-radius: 22px;
  color: white;
  font-weight: 600;
  font-size: 0.9em;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 3px 10px rgba(245, 87, 108, 0.3);
}

.topbar-logout-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(245, 87, 108, 0.5);
}

.topbar-logout-btn:active {
  transform: translateY(0);
}

.logout-icon {
  font-size: 1.1em;
}

.logout-text {
  font-size: 0.95em;
}

/* Support Button */
.topbar-support-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  background: linear-gradient(135deg, #4a90e2, #357abd);
  border: none;
  padding: 10px 16px;
  border-radius: 22px;
  color: white;
  font-weight: 600;
  font-size: 0.9em;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 3px 10px rgba(74, 144, 226, 0.3);
  text-decoration: none;
}

.topbar-support-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(74, 144, 226, 0.5);
  text-decoration: none;
  color: white;
}

.topbar-support-btn:active {
  transform: translateY(0);
}

.support-icon {
  font-size: 1.1em;
}

.support-text {
  font-size: 0.95em;
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 15px;
}

/* ===============================================
   NOTIFICATION PANEL STYLES
   =============================================== */

/* ===== NOTIFICATION DROPDOWN PANEL ===== */

.notification-panel {
  position: fixed;
  top: 95px;
  left: 0;
  width: 270px;
  /* bottom ilə viewport sərhədi məhdudlaşır → footer (Hamısını oxu)
     hər zaman ekranda görsənir, list arasından scroll olur */
  bottom: 10px;
  height: auto;
  background: var(--surface, #ffffff);
  border-radius: 0 14px 14px 0;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.14);
  z-index: 20001;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  max-height: 0;
  opacity: 0;
  transition: max-height 0.25s cubic-bezier(0.25, 0.46, 0.45, 0.94), opacity 0.2s ease;
  pointer-events: none;
  font-size: 0.9em;
}

.notification-panel.active {
  /* bottom:10px ilə birlikdə hündürlük viewport-da limit olur */
  max-height: calc(100dvh - 105px);
  opacity: 1;
  pointer-events: auto;
}

@media (max-width: 768px) {
  .notification-panel {
    top: 60px;
    left: 10px;
    right: 10px;
    width: auto;
    border-radius: 14px;
  }
  .notification-panel.active { max-height: calc(100dvh - 70px); }
}

/* Header */
.notification-header {
  padding: 14px 16px 10px;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  border-bottom: 1px solid var(--border-color, #e9ecef);
  flex-shrink: 0;
}

.notification-header h3 {
  color: var(--text-color, #1a1a2e);
  margin: 0;
  font-size: 1em;
  font-weight: 700;
}

.notification-inbox-label {
  margin-top: 4px;
  font-size: 0.75em;
  font-weight: 600;
  color: var(--text-light, #777);
  display: flex;
  align-items: center;
  gap: 6px;
}

.notification-inbox-badge {
  background: #ef4444;
  color: #fff;
  font-size: 0.72em;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 8px;
  min-width: 16px;
  text-align: center;
}

.close-panel-btn {
  background: none;
  border: none;
  color: var(--text-muted, #999);
  cursor: pointer;
  padding: 4px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.close-panel-btn:hover {
  background: var(--hover-bg, rgba(0,0,0,0.05));
  color: var(--text-color, #333);
}

/* Notification List */
.notification-list {
  flex: 1;
  overflow-y: auto;
  padding: 4px 8px;
}

.notification-list::-webkit-scrollbar { width: 5px; }
.notification-list::-webkit-scrollbar-track { background: transparent; }
.notification-list::-webkit-scrollbar-thumb { background: var(--border-color, #ddd); border-radius: 4px; }

/* Notification Item */
.notification-item {
  display: flex;
  gap: 10px;
  padding: 10px 10px;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.15s;
  position: relative;
  border-bottom: 1px solid var(--border-color, #f0f0f0);
}

.notification-item:last-child { border-bottom: none; }

.notification-item:hover {
  background: var(--hover-bg, rgba(0,0,0,0.03));
}

.notification-item.unread {
  border-left: 3px solid var(--primary, #4a90e2);
  background: var(--hover-bg, rgba(74,144,226,0.04));
}

.notification-item.unread::before { display: none; }

/* Type icon (avatar-like circle) */
.notification-type {
  width: 32px;
  height: 32px;
  min-width: 32px;
  border-radius: 50%;
  background: var(--primary, #4a90e2);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75em;
  font-weight: 700;
  padding: 0;
  letter-spacing: 0;
  text-transform: none;
}

.notification-type-icon { font-size: 1.1em; }
.notification-type span:not(.notification-type-icon) { display: none; }

/* Content area */
.notification-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex: 1;
  min-width: 0;
}

.notification-content {
  flex: 1;
  min-width: 0;
  margin-bottom: 0;
}

.notification-title {
  font-weight: 600;
  color: var(--text-color, #1a1a2e);
  margin-bottom: 2px;
  font-size: 0.8em;
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.notification-message {
  color: var(--text-light, #777);
  font-size: 0.72em;
  line-height: 1.4;
  word-break: break-word;
  white-space: pre-wrap;
}

.notification-time {
  font-size: 0.65em;
  color: var(--text-muted, #aaa);
  white-space: nowrap;
  flex-shrink: 0;
}

.time-icon { display: none; }

/* Bottom row (time + read dot) */
.notification-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 6px;
}

/* Hide old meta */
.notification-meta { display: none; }

.notif-read-btn {
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  border-radius: 50%;
  transition: background 0.15s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.notif-read-btn:hover {
  background: var(--hover-bg, rgba(0,0,0,0.06));
}

.notification-body {
  flex: 1;
  min-width: 0;
  cursor: pointer;
}

.read-dot, .unread-dot {
  width: 10px; height: 10px; border-radius: 50%; display: block;
  transition: transform 0.15s;
}
.read-dot { background: var(--border-color, #ddd); }
.unread-dot { background: var(--primary, #4a90e2); animation: dotPulse 2s infinite; }

.notif-read-btn:hover .read-dot,
.notif-read-btn:hover .unread-dot {
  transform: scale(1.3);
}

@keyframes dotPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(74,144,226,0.7); }
  50% { box-shadow: 0 0 0 5px rgba(74,144,226,0); }
}

/* Hide old status wrapper */
.notification-status { display: none; }
.notification-top { display: none; }

/* Footer */
.notification-footer {
  padding: 10px 14px;
  border-top: 1px solid var(--border-color, #e9ecef);
  display: flex;
  align-items: center;
  justify-content: flex-start;
  flex-shrink: 0;
}

.mark-all-read-btn {
  background: none;
  border: none;
  color: var(--primary, #4a90e2);
  font-size: 0.75em;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 5px 8px;
  border-radius: 6px;
  transition: background 0.15s;
}

.mark-all-read-btn:hover {
  background: var(--hover-bg, rgba(74,144,226,0.08));
}

.notif-settings-btn {
  background: none;
  border: none;
  color: var(--text-muted, #999);
  font-size: 0.72em;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 5px 8px;
  border-radius: 6px;
  transition: all 0.15s;
  margin-left: auto;
}
.notif-settings-btn svg { width: 12px; height: 12px; }

.notif-settings-btn:hover {
  background: var(--hover-bg, rgba(0,0,0,0.04));
  color: var(--text-color, #333);
}

/* Empty state */
.empty-notifications {
  text-align: center;
  padding: 40px 20px;
  color: var(--text-muted, #aaa);
}

.empty-icon { font-size: 3em; margin-bottom: 10px; opacity: 0.4; }
.empty-text { font-size: 0.95em; margin-bottom: 4px; color: var(--text-light, #777); }
.empty-subtext { font-size: 0.82em; color: var(--text-muted, #aaa); }

/* Overlay - only covers main content, not sidebar */
.notification-overlay {
  position: fixed; top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0, 0, 0, 0.25);
  backdrop-filter: blur(2px);
  z-index: 20000;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}
.notification-overlay.active { opacity: 1; visibility: visible; }

/* ===== DARK THEME OVERRIDES (sidebar default = dark) ===== */
body.dark-theme .notification-panel,
.notification-panel.notif-dark {
  background: #171a30;
  border: 1px solid rgba(255,255,255,0.06);
  box-shadow: 0 8px 30px rgba(0,0,0,0.45);
}
body.dark-theme .notification-header,
.notification-panel.notif-dark .notification-header { border-color: rgba(255,255,255,0.06); }
body.dark-theme .notification-header h3,
.notification-panel.notif-dark .notification-header h3 { color: #d8dce8; }
body.dark-theme .notification-inbox-label,
.notification-panel.notif-dark .notification-inbox-label { color: #868da6; }
body.dark-theme .close-panel-btn,
.notification-panel.notif-dark .close-panel-btn { color: #868da6; }
body.dark-theme .notification-item,
.notification-panel.notif-dark .notification-item { border-color: rgba(255,255,255,0.06); }
body.dark-theme .notification-item:hover,
.notification-panel.notif-dark .notification-item:hover { background: rgba(255,255,255,0.04); }
body.dark-theme .notification-item.unread,
.notification-panel.notif-dark .notification-item.unread { background: rgba(91,156,240,0.08); border-left-color: #5b9cf0; }
body.dark-theme .notification-title,
.notification-panel.notif-dark .notification-title { color: #d8dce8; }
body.dark-theme .notification-message,
.notification-panel.notif-dark .notification-message { color: #868da6; }
body.dark-theme .notification-footer,
.notification-panel.notif-dark .notification-footer { border-color: rgba(255,255,255,0.06); }
body.dark-theme .notification-list::-webkit-scrollbar-thumb,
.notification-panel.notif-dark .notification-list::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.12); }
body.dark-theme .read-dot,
.notification-panel.notif-dark .read-dot { background: #3a3f5c; }
body.dark-theme .notif-read-btn:hover,
.notification-panel.notif-dark .notif-read-btn:hover { background: rgba(255,255,255,0.08); }
body.dark-theme .mark-all-read-btn,
.notification-panel.notif-dark .mark-all-read-btn { color: #5b9cf0; }
body.dark-theme .notif-settings-btn,
.notification-panel.notif-dark .notif-settings-btn { color: #868da6; }

body.dark-theme .notification-header { border-color: rgba(255,255,255,0.06); }
body.dark-theme .notification-item { border-color: rgba(255,255,255,0.06); }
body.dark-theme .notification-item:hover { background: rgba(255,255,255,0.04); }
body.dark-theme .notification-item.unread { background: rgba(91,156,240,0.08); border-left-color: #5b9cf0; }
body.dark-theme .notification-footer { border-color: rgba(255,255,255,0.06); }
body.dark-theme .notification-list::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.12); }
body.dark-theme .read-dot { background: #3a3f5c; }
body.dark-theme .notif-read-btn:hover { background: rgba(255,255,255,0.08); }

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  .notification-panel {
    width: 82vw;
    max-width: 310px;
    border-radius: 0 16px 16px 0;
    height: 80vh;
  }
  .stats-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
}

.user-info {
  font-weight: 500;
  color: var(--text-color);
}

/* Content Wrapper */
.content-wrapper {
  padding: 25px;
  max-width: 1400px;
}

/* Tab System */
.tabs-container {
  background: var(--card-bg);
  border-radius: var(--radius-medium);
  box-shadow: 0 2px 8px var(--shadow);
  overflow: hidden;
  border: 1px solid var(--border-color);
}

.tabs-header {
  display: flex;
  background: var(--tab-bg);
  border-bottom: 2px solid var(--tab-border);
  overflow-x: auto;
}

.tab-button {
  flex: 1;
  padding: 11px 16px;
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  color: var(--text-light);
  font-weight: 500;
  font-size: 0.88em;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
  min-width: 120px;
}

.tab-button:hover {
  background: rgba(74, 144, 226, 0.05);
  color: var(--primary);
}

.tab-button.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
  background: var(--tab-active-bg);
}

.tabs-content {
  padding: 18px;
}

.tab-pane {
  display: none;
  animation: fadeIn 0.3s ease;
}

.tab-pane.active {
  display: block;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Form Styles for SMS Send Page */
.form-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
  margin-bottom: 20px;
}

.form-section {
  background: var(--surface-alt);
  padding: 20px;
  border-radius: var(--radius-medium);
  margin-bottom: 20px;
}

.form-section-title {
  font-size: 1.1em;
  font-weight: 600;
  color: var(--text-color);
  margin-bottom: 15px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--primary);
}

.input-with-button {
  display: flex;
  gap: 10px;
  align-items: flex-end;
  flex-wrap: nowrap;
}

.input-with-button .form-group {
  flex: 1;
  margin-bottom: 0;
  min-width: 0;
}

.input-with-button .btn-add {
  flex-shrink: 0;
}

.btn-add {
  padding: 10px 20px;
  background: var(--primary);
  color: white;
  border: none;
  border-radius: var(--radius-small);
  cursor: pointer;
  font-weight: 500;
  white-space: nowrap;
  transition: background 0.3s ease;
}

.btn-add:hover {
  background: var(--primary-dark);
}

.checkbox-group {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px;
  background: white;
  border-radius: var(--radius-small);
  border: 1px solid #ddd;
}

.checkbox-group input[type="checkbox"] {
  width: 18px;
  height: 18px;
  cursor: pointer;
}

.checkbox-group label {
  margin: 0;
  cursor: pointer;
  font-weight: 500;
}

.datetime-input {
  margin-left: 20px;
  padding: 8px 12px;
  border: 1px solid #ddd;
  border-radius: var(--radius-small);
  font-size: 0.95em;
}

.textarea-counter {
  text-align: right;
  font-size: 0.85em;
  color: var(--text-light);
  margin-top: 5px;
}

/* Phone Number List */
.phone-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
  min-height: 40px;
  padding: 10px;
  background: white;
  border: 1px solid #ddd;
  border-radius: var(--radius-small);
}

.phone-tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 12px;
  background: var(--primary);
  color: white;
  border-radius: 20px;
  font-size: 0.9em;
}

.phone-tag button {
  background: none;
  border: none;
  color: white;
  font-size: 1.2em;
  cursor: pointer;
  padding: 0;
  line-height: 1;
}

/* Action Buttons */
.action-buttons {
  display: flex;
  gap: 15px;
  justify-content: flex-end;
  margin-top: 25px;
  padding-top: 20px;
  border-top: 1px solid #e9ecef;
}

.btn-primary,
.btn-secondary {
  padding: 12px 30px;
  font-size: 1em;
  font-weight: 600;
  border-radius: var(--radius-small);
  cursor: pointer;
  transition: all 0.3s ease;
}

.btn-secondary {
  background: #6c757d;
  color: white;
  border: none;
}

.btn-secondary:hover {
  background: #5a6268;
}

/* Mobile Responsive */
@media (max-width: 768px) {
  .sidebar {
    transform: translateX(-100%);
  }

  .sidebar.active {
    transform: translateX(0);
  }

  /* iOS Safari və Android tap delay-ni ləğv et — sidebar link-lərinə birinci klik dərhal işləsin */
  .sidebar a, .sidebar button, .sidebar .nav-item, .sidebar .submenu-item {
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
  }

  .close-btn {
    display: flex;
  }

  .main-content {
    margin-left: 0;
  }

  .topbar {
    display: flex;
    height: 56px;
    box-shadow: 0 2px 4px var(--shadow);
    border-bottom: 1px solid var(--border-color);
  }

  .menu-toggle {
    display: flex;
  }

  .tabs-header {
    flex-direction: column;
  }

  .tab-button {
    min-width: auto;
    text-align: left;
  }

  .form-row {
    grid-template-columns: 1fr;
  }

  .input-with-button {
    flex-direction: row;
    align-items: flex-end;
    flex-wrap: nowrap;
  }

  .action-buttons {
    flex-direction: column;
  }

  .action-buttons button {
    width: 100%;
  }

  .content-wrapper {
    padding: 15px;
  }

  .tabs-content {
    padding: 15px;
  }

  /* User Info Card - Mobile */
  .user-info-card {
    padding: 10px 15px;
    gap: 10px;
  }

  .user-avatar {
    width: 38px;
    height: 38px;
    font-size: 16px;
  }

  .user-name {
    font-size: 14px;
  }

  .user-balance {
    font-size: 12px;
  }

  .balance-amount {
    font-size: 13px;
  }

  /* Quick Actions - Mobile: 2x2 grid */
  .quick-actions {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }

  .quick-action-btn {
    padding: 12px 10px;
    min-height: 50px;
    font-size: 0.88em;
    justify-content: center;
  }

  /* Carousel - Mobile: oxların və altdakı nöqtələrin yerini boş saxla */
  .carousel-slide {
    padding: 20px 54px 40px;
    min-height: 200px;
  }

  .carousel-slide-content {
    flex-direction: column;
    gap: 12px;
    text-align: center;
  }

  .carousel-icon {
    font-size: 2.2em;
  }

  .carousel-title {
    font-size: 1.1em;
  }

  .carousel-desc {
    font-size: 0.85em;
  }

  .carousel-cta {
    width: 100%;
    justify-content: center;
  }

  .carousel-arrow {
    width: 32px;
    height: 32px;
    min-width: 32px;
    min-height: 32px;
    font-size: 1.2em;
  }

  .carousel-caption {
    display: none;
  }

  /* Stats Grid - Mobile */
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .stats-grid-unused {
    grid-template-columns: 1fr;
  }

  .stat-group-items {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  /* Notification Panel - Mobile (sidebarın eni qədər) */
  .notification-panel {
    width: 82vw;
    max-width: 310px;
    left: 0;
    right: auto;
  }

  /* Topbar Logout & Support - Mobile */
  .logout-text,
  .support-text {
    display: none;
  }

  .topbar-logout-btn {
    padding: 10px;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    justify-content: center;
  }
}

/* Tablet Responsive */
@media (max-width: 1024px) and (min-width: 769px) {
  .quick-actions {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Overlay for mobile menu */
.sidebar-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 9999;
}

/* Sidebar açıq olanda səhifə scroll-u kilidlənir → arxa fonun ağ yer görünmür */
body.sidebar-open {
  overflow: hidden;
  position: fixed;
  width: 100%;
  height: 100%;
}

.sidebar-overlay.active {
  display: block;
}

/* Modal Styles */
.modal {
  display: none;
  position: fixed;
  z-index: 30000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: var(--modal-overlay);
  align-items: center;
  justify-content: center;
}

.modal-content {
  background-color: var(--modal-bg);
  margin: auto;
  padding: 30px;
  border-radius: var(--radius-medium);
  width: 90%;
  max-width: 500px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
  position: relative;
  animation: slideDown 0.3s ease;
}

@keyframes slideDown {
  from {
    transform: translateY(-50px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.modal-content h3 {
  margin-top: 0;
  margin-bottom: 20px;
  color: var(--primary-dark);
}

.modal .close {
  color: #aaa;
  position: absolute;
  top: 15px;
  right: 20px;
  font-size: 28px;
  font-weight: bold;
  cursor: pointer;
  transition: color 0.3s ease;
}

.modal .close:hover,
.modal .close:focus {
  color: #000;
}

@media (max-width: 768px) {
  .sidebar-overlay {
    display: none;
  }

  .sidebar-overlay.active {
    display: block;
  }

  .modal-content {
    width: 95%;
    padding: 20px;
  }
}

/* ========== Global Confirm Modal (modern, sayt konseptinə uyğun) ========== */
.modal-confirm {
  max-width: 380px !important;
  text-align: center;
  padding: 28px 24px !important;
  border-radius: 20px !important;
}

.confirm-icon {
  margin: 0 auto 18px;
  width: 64px;
  height: 64px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(99, 102, 241, 0.12);
  color: #6366f1;
}

.confirm-icon svg {
  width: 30px;
  height: 30px;
  stroke-width: 2;
}

.modal-confirm h3 {
  margin: 0 0 10px 0;
  font-size: 1.2em;
  font-weight: 700;
  color: #1a202c;
}

.modal-confirm p {
  color: #64748b;
  margin: 0 0 22px 0;
  font-size: 0.92em;
  line-height: 1.5;
}

.confirm-actions {
  display: flex;
  gap: 10px;
  justify-content: stretch;
}
.confirm-actions > button {
  flex: 1;
}

.confirm-btn-cancel {
  padding: 12px 20px;
  background: #f1f5f9;
  color: #475569;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  font-weight: 600;
  font-size: 0.92em;
  cursor: pointer;
  transition: background 0.2s, transform 0.15s;
}

.confirm-btn-cancel:hover {
  background: #e2e8f0;
  color: #1e293b;
}
.confirm-btn-cancel:active {
  transform: scale(0.97);
}

.confirm-btn-action {
  padding: 12px 20px;
  background: linear-gradient(135deg, #6366f1, #4f46e5);
  color: #ffffff;
  border: none;
  border-radius: 12px;
  font-weight: 600;
  font-size: 0.92em;
  cursor: pointer;
  transition: box-shadow 0.2s, transform 0.15s;
  box-shadow: 0 4px 14px rgba(99, 102, 241, 0.32);
}

.confirm-btn-action:hover {
  box-shadow: 0 6px 18px rgba(99, 102, 241, 0.42);
}
.confirm-btn-action:active {
  transform: scale(0.97);
}

/* Warning — sarı/narıncı tonları, amma yüngül */
.confirm-btn-action.confirm-warning {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  box-shadow: 0 4px 14px rgba(245, 158, 11, 0.3);
}
.confirm-btn-action.confirm-warning:hover {
  box-shadow: 0 6px 18px rgba(245, 158, 11, 0.4);
}
/* Warning üçün icon konteyner rəngi */
.modal-confirm:has(.confirm-warning) .confirm-icon {
  background: rgba(245, 158, 11, 0.12);
  color: #d97706;
}

.confirm-btn-action.confirm-success {
  background: linear-gradient(135deg, #10b981, #059669);
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.3);
}
.confirm-btn-action.confirm-success:hover {
  box-shadow: 0 6px 18px rgba(16, 185, 129, 0.4);
}
.modal-confirm:has(.confirm-success) .confirm-icon {
  background: rgba(16, 185, 129, 0.12);
  color: #059669;
}

.confirm-btn-action.confirm-danger {
  background: linear-gradient(135deg, #ef4444, #dc2626);
  box-shadow: 0 4px 14px rgba(239, 68, 68, 0.3);
}
.confirm-btn-action.confirm-danger:hover {
  box-shadow: 0 6px 18px rgba(239, 68, 68, 0.4);
}
.modal-confirm:has(.confirm-danger) .confirm-icon {
  background: rgba(239, 68, 68, 0.12);
  color: #dc2626;
}

.confirm-btn-action.confirm-info {
  background: linear-gradient(135deg, #3b82f6, #2563eb);
  box-shadow: 0 4px 14px rgba(59, 130, 246, 0.3);
}
.confirm-btn-action.confirm-info:hover {
  box-shadow: 0 6px 18px rgba(59, 130, 246, 0.4);
}

/* ===== Foundational: prevent horizontal scroll across dashboard pages ===== */
html, body { overflow-x: clip; max-width: 100%; }

/* ===== Tablet and narrow screens (≤ 768px) — welcome & carousel ===== */
@media (max-width: 768px) {
  .welcome-section { padding: 26px 22px; border-radius: 14px; margin-bottom: 20px; }
  .welcome-section h1 { font-size: 1.3em; }
  .welcome-text { font-size: 0.9em; }
  .carousel-banner { border-radius: 14px; }
}

/* ===== Small phones (≤ 600px) ===== */
@media (max-width: 600px) {
  .stats-grid { grid-template-columns: repeat(2, 1fr); gap: 14px; }
  .stat-card { padding: 16px 14px; border-radius: 12px; }
  .stat-card-value { font-size: 22px; }
  .stat-card-label { font-size: 12px; margin-bottom: 10px; }
  .stat-card-icon { width: 36px; height: 36px; margin-bottom: 12px; }

  .content-wrapper { padding: 14px; }
  .tabs-content { padding: 14px; }

  .modal-content { padding: 18px; max-height: 92vh; overflow-y: auto; }
  .modal-content h3 { font-size: 1.05em; }

  .confirm-actions { flex-direction: column; }
  .confirm-btn-cancel, .confirm-btn-action { width: 100%; }
  .modal-confirm { padding: 22px !important; }
  .modal-confirm h3 { font-size: 1.1em; }
  .confirm-icon { width: 56px; height: 56px; margin-bottom: 14px; }
  .confirm-icon svg { width: 26px; height: 26px; }

  .user-avatar { width: 34px; height: 34px; font-size: 14px; }
  .user-name { font-size: 13px; }
  .balance-amount { font-size: 12px; }

  .welcome-section { padding: 22px 18px; }
  .welcome-section h1 { font-size: 1.15em; }
  .welcome-text { font-size: 0.85em; }
  .welcome-section::before, .welcome-section::after { width: 200px; height: 200px; }

  .carousel-slide { padding: 18px 48px 38px; min-height: 180px; }
  .carousel-title { font-size: 1em; }
  .carousel-desc { font-size: 0.8em; }
}

/* ===== Extra-small phones (≤ 480px) ===== */
@media (max-width: 480px) {
  .stats-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .content-wrapper { padding: 12px; }
  .tabs-content { padding: 12px; }

  .modal-content { width: 95%; padding: 16px; border-radius: 12px; }

  /* Inputs at least 16px so iOS doesn't zoom */
  input:not([type="checkbox"]):not([type="radio"]), textarea, select {
    font-size: 16px;
  }

  /* Buttons touch-friendly (carousel oxları istisna — dairə qalmalıdır) */
  button:not(.carousel-arrow), .btn-primary, .btn-secondary, .btn-add { min-height: 40px; }

  .sidebar { width: 82vw; max-width: 310px; }

  .topbar { padding: 0 12px; height: 54px; }
  .menu-toggle { width: 38px; height: 38px; }
  .topbar-logout-btn { width: 36px !important; height: 36px !important; padding: 8px !important; }

  .notification-panel { height: 85vh; }
}

/* ===== Ultra-small phones (≤ 360px) ===== */
@media (max-width: 360px) {
  .content-wrapper { padding: 10px; }
  .tabs-content { padding: 10px; }

  .stat-card { padding: 14px 12px; }
  .stat-card-value { font-size: 20px; }

  .modal-content { padding: 14px; }
  .modal-confirm { padding: 18px !important; }
  .confirm-icon { width: 50px; height: 50px; }
  .confirm-icon svg { width: 24px; height: 24px; }

  .form-row { gap: 12px; margin-bottom: 14px; }
  .form-section { padding: 14px; }

  .sidebar { width: 88vw; }

  .user-info-card { padding: 8px 12px; gap: 8px; }

  .welcome-section { padding: 18px 14px; }
  .welcome-section h1 { font-size: 1.02em; }
  .welcome-text { font-size: 0.8em; }
  .quick-action-btn { padding: 10px 12px; font-size: 0.85em; min-height: 44px; }

  .carousel-arrow { width: 28px; height: 28px; min-width: 28px; min-height: 28px; font-size: 1em; }
}

/* Landscape orientation for short-height phones */
@media (max-height: 480px) and (orientation: landscape) {
  .notification-panel { height: 90vh; }
  .modal-content { max-height: 88vh; overflow-y: auto; }
}

/* ========== SIDEBAR-DA MİNİ LOGO (sol-aşağı, theme toggle-ın solunda) ========== */
.sidebar-mini-logo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 4px 6px;
  border-radius: 8px;
  text-decoration: none;
  transition: background 0.2s, transform 0.15s;
  flex-shrink: 0;
}
.sidebar-mini-logo:hover {
  background: rgba(99, 102, 241, 0.1);
  transform: scale(1.04);
}
.sidebar-mini-logo img {
  height: 22px;
  width: auto;
  display: block;
}
.sidebar-light .sidebar-mini-logo:hover {
  background: rgba(99, 102, 241, 0.06);
}
@media (max-width: 768px) {
  /* Mobil: topbar onsuzda göstərir, sidebar-dakı mini-logonu gizlət */
  .sidebar-mini-logo { display: none; }
}

/* Dashboard quick-actions: Balans düyməsi vurğulansın */
.quick-action-btn.quick-action-balance {
  background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #ec4899 100%);
  color: #fff;
  border-color: transparent;
  box-shadow: 0 3px 10px rgba(99, 102, 241, 0.32);
}
.quick-action-btn.quick-action-balance:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(99, 102, 241, 0.42);
  color: #fff;
}
.quick-action-btn.quick-action-balance svg { stroke: #fff; }
