/* =============================================
   UNBAN.LIVE - Cabinet Styles
   ============================================= */

/* Cabinet Layout */
.cabinet-page {
  display: flex;
  min-height: 100vh;
  background: var(--bg-main);
}

/* ================================
   SIDEBAR
   ================================ */

.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  width: 260px;
  height: 100vh;
  background: var(--bg-card);
  border-right: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  z-index: 100;
  transition: transform var(--transition-base);
}

.sidebar-header {
  padding: 24px;
  border-bottom: 1px solid var(--border-light);
}

.sidebar-header .logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--text-primary);
  text-decoration: none;
}

.sidebar-header .logo-icon {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--gradient-primary);
  border-radius: var(--radius-sm);
}

.sidebar-header .logo-icon svg {
  width: 20px;
  height: 20px;
  color: white;
}

.sidebar-header .logo-text {
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Sidebar Navigation */
.sidebar-nav {
  flex: 1;
  padding: 16px 12px;
  overflow-y: auto;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  color: var(--text-secondary);
  text-decoration: none;
  border-radius: var(--radius-md);
  margin-bottom: 4px;
  transition: all var(--transition-fast);
  font-weight: 500;
  font-size: 0.9375rem;
}

.nav-item svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

.nav-item:hover {
  color: var(--text-primary);
  background: rgba(139, 92, 246, 0.1);
}

.nav-item.active {
  color: var(--text-primary);
  background: var(--gradient-primary);
}

.nav-item.active svg {
  color: white;
}

/* Sidebar Footer */
.sidebar-footer {
  padding: 16px 12px;
  border-top: 1px solid var(--border-light);
}

.logout-btn {
  width: 100%;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-muted);
}

.logout-btn:hover {
  color: var(--error);
  background: rgba(239, 68, 68, 0.1);
}

/* ================================
   MAIN CONTENT
   ================================ */

.main-content {
  flex: 1;
  margin-left: 260px;
  min-height: 100vh;
  position: relative;
}

/* Top Bar */
.topbar {
  position: sticky;
  top: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 32px;
  background: rgba(15, 15, 26, 0.8);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-light);
  z-index: 50;
}

.topbar-title h1 {
  font-size: 1.5rem;
  font-weight: 700;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

.user-menu {
  display: flex;
  align-items: center;
  gap: 12px;
}

.user-avatar {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--gradient-primary);
  border-radius: 50%;
  font-weight: 600;
  font-size: 1rem;
}

.user-email {
  font-size: 0.875rem;
  color: var(--text-secondary);
}

/* Notifications Bell */
.notifications-btn {
  position: relative;
  width: 44px;
  height: 44px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-fast);
}

.notifications-btn:hover {
  border-color: var(--primary);
  background: var(--bg-card-hover);
}

.notifications-btn svg {
  width: 20px;
  height: 20px;
  color: var(--text-secondary);
  transition: color var(--transition-fast);
}

.notifications-btn:hover svg {
  color: var(--primary-light);
}

.notifications-badge {
  position: absolute;
  top: 6px;
  right: 6px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  background: var(--error);
  border-radius: 9px;
  font-size: 0.6875rem;
  font-weight: 700;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: pulse-badge 2s infinite;
}

@keyframes pulse-badge {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.1); }
}

/* Notifications Dropdown */
.notifications-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 360px;
  max-height: 480px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all var(--transition-fast);
  z-index: 100;
}

.notifications-dropdown.active {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.notifications-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-light);
}

.notifications-header h3 {
  font-size: 1rem;
  font-weight: 600;
}

.mark-read-btn {
  background: none;
  border: none;
  color: var(--primary-light);
  font-size: 0.8125rem;
  cursor: pointer;
  padding: 0;
}

.mark-read-btn:hover {
  text-decoration: underline;
}

.notifications-list {
  max-height: 360px;
  overflow-y: auto;
}

.notification-item {
  display: flex;
  gap: 12px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-light);
  cursor: pointer;
  transition: background var(--transition-fast);
}

.notification-item:hover {
  background: var(--bg-card-hover);
}

.notification-item.unread {
  background: rgba(139, 92, 246, 0.05);
}

.notification-item.unread::before {
  content: '';
  position: absolute;
  left: 8px;
  top: 50%;
  transform: translateY(-50%);
  width: 6px;
  height: 6px;
  background: var(--primary);
  border-radius: 50%;
}

.notification-icon {
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.125rem;
}

.notification-icon.order {
  background: rgba(139, 92, 246, 0.15);
}

.notification-icon.deposit {
  background: rgba(16, 185, 129, 0.15);
}

.notification-icon.system {
  background: rgba(59, 130, 246, 0.15);
}

.notification-icon.promo {
  background: rgba(245, 158, 11, 0.15);
}

.notification-content {
  flex: 1;
  min-width: 0;
}

.notification-content p {
  font-size: 0.875rem;
  color: var(--text-primary);
  margin-bottom: 4px;
  line-height: 1.4;
}

.notification-content span {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.notifications-empty {
  padding: 40px 20px;
  text-align: center;
}

.notifications-empty svg {
  width: 48px;
  height: 48px;
  color: var(--text-muted);
  margin-bottom: 12px;
  opacity: 0.5;
}

.notifications-empty p {
  color: var(--text-muted);
  font-size: 0.875rem;
}

.notifications-footer {
  padding: 12px 20px;
  border-top: 1px solid var(--border-light);
  text-align: center;
}

.notifications-footer a {
  color: var(--primary-light);
  font-size: 0.875rem;
  text-decoration: none;
}

.notifications-footer a:hover {
  text-decoration: underline;
}

/* Theme Toggle in Cabinet */
.cabinet-theme-toggle {
  width: 44px;
  height: 44px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-fast);
  position: relative;
}

.cabinet-theme-toggle:hover {
  border-color: var(--primary);
  background: var(--bg-card-hover);
}

.cabinet-theme-toggle svg {
  width: 20px;
  height: 20px;
  color: var(--text-secondary);
  transition: all var(--transition-fast);
  position: absolute;
}

.cabinet-theme-toggle:hover svg {
  color: var(--primary-light);
}

.cabinet-theme-toggle .icon-sun {
  opacity: 1;
  transform: rotate(0deg);
}

.cabinet-theme-toggle .icon-moon {
  opacity: 0;
  transform: rotate(-90deg);
}

[data-theme="light"] .cabinet-theme-toggle .icon-sun {
  opacity: 0;
  transform: rotate(90deg);
}

[data-theme="light"] .cabinet-theme-toggle .icon-moon {
  opacity: 1;
  transform: rotate(0deg);
}

/* Light theme cabinet adjustments */
[data-theme="light"] .topbar {
  background: rgba(255, 255, 255, 0.9);
}

[data-theme="light"] .sidebar {
  background: var(--bg-card);
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 8px;
  background: none;
  border: none;
  cursor: pointer;
}

.mobile-menu-toggle span {
  width: 24px;
  height: 2px;
  background: var(--text-primary);
  transition: all var(--transition-fast);
}

/* ================================
   DASHBOARD CONTENT
   ================================ */

.dashboard-content {
  padding: 32px;
}

/* Balance Card */
.balance-card {
  background: var(--gradient-primary);
  border-radius: var(--radius-xl);
  padding: 32px;
  margin-bottom: 32px;
  position: relative;
  overflow: hidden;
}

.balance-card::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 300px;
  height: 300px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
}

.balance-card::after {
  content: '';
  position: absolute;
  bottom: -30%;
  left: -10%;
  width: 200px;
  height: 200px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 50%;
}

.balance-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 24px;
  position: relative;
  z-index: 1;
}

.balance-label {
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.8);
  margin-bottom: 8px;
}

.balance-amount {
  font-size: 3rem;
  font-weight: 800;
  color: white;
}

.balance-currency {
  font-size: 1.5rem;
  font-weight: 600;
  opacity: 0.8;
}

.balance-actions {
  position: relative;
  z-index: 1;
}

.balance-actions .btn {
  background: rgba(255, 255, 255, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: white;
}

.balance-actions .btn:hover {
  background: rgba(255, 255, 255, 0.3);
}

/* Stats Grid */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
  margin-bottom: 32px;
}

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 24px;
  display: flex;
  align-items: flex-start;
  gap: 16px;
  transition: all var(--transition-base);
}

.stat-card:hover {
  border-color: var(--primary);
  transform: translateY(-2px);
}

.stat-icon {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-md);
  flex-shrink: 0;
}

.stat-icon svg {
  width: 24px;
  height: 24px;
}

.stat-icon.purple {
  background: rgba(139, 92, 246, 0.15);
  color: var(--primary-light);
}

.stat-icon.pink {
  background: rgba(236, 72, 153, 0.15);
  color: var(--secondary-light);
}

.stat-icon.cyan {
  background: rgba(6, 182, 212, 0.15);
  color: var(--accent-light);
}

.stat-icon.green {
  background: rgba(16, 185, 129, 0.15);
  color: var(--success-light);
}

.stat-info {
  flex: 1;
}

.stat-label {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.stat-value {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-primary);
}

/* Quick Actions */
.quick-actions {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
  margin-bottom: 32px;
}

.action-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 24px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  text-decoration: none;
  transition: all var(--transition-base);
}

.action-card:hover {
  border-color: var(--primary);
  transform: translateY(-2px);
  box-shadow: var(--shadow-glow);
}

.action-icon {
  width: 56px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--gradient-primary);
  border-radius: var(--radius-md);
  flex-shrink: 0;
}

.action-icon svg {
  width: 28px;
  height: 28px;
  color: white;
}

.action-info h3 {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.action-info p {
  font-size: 0.875rem;
  color: var(--text-muted);
}

/* Orders Section */
.section-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid var(--border-light);
}

.section-header h2 {
  font-size: 1.125rem;
  font-weight: 600;
}

.section-header .btn {
  padding: 8px 16px;
  font-size: 0.875rem;
}

/* Orders List */
.orders-list {
  padding: 0;
}

.order-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px 24px;
  border-bottom: 1px solid var(--border-light);
  transition: background var(--transition-fast);
}

.order-item:last-child {
  border-bottom: none;
}

.order-item:hover {
  background: rgba(139, 92, 246, 0.05);
}

.order-platform {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-md);
  font-size: 1.5rem;
  flex-shrink: 0;
}

.order-platform.tiktok { background: linear-gradient(135deg, #25F4EE, #FE2C55); }
.order-platform.instagram { background: linear-gradient(135deg, #833AB4, #FD1D1D, #F77737); }
.order-platform.facebook { background: #1877F2; }
.order-platform.snapchat { background: #FFFC00; }
.order-platform.twitter { background: #000; }
.order-platform.youtube { background: #FF0000; }
.order-platform.bundle { background: var(--gradient-primary); }

.order-info {
  flex: 1;
}

.order-title {
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 2px;
}

.order-date {
  font-size: 0.8125rem;
  color: var(--text-muted);
}

.order-status {
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.order-status.pending {
  background: rgba(245, 158, 11, 0.15);
  color: var(--warning);
}

.order-status.processing {
  background: rgba(139, 92, 246, 0.15);
  color: var(--primary-light);
}

.order-status.verified {
  background: rgba(16, 185, 129, 0.15);
  color: var(--success);
}

/* Empty State */
.empty-state {
  padding: 60px 24px;
  text-align: center;
}

.empty-icon {
  font-size: 4rem;
  margin-bottom: 16px;
  opacity: 0.5;
}

.empty-state h3 {
  font-size: 1.125rem;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.empty-state p {
  font-size: 0.9375rem;
  color: var(--text-muted);
  margin-bottom: 24px;
}

/* ================================
   MOBILE OVERLAY
   ================================ */

.sidebar-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 99;
}

.sidebar-overlay.active {
  display: block;
}

/* ================================
   RESPONSIVE
   ================================ */

@media (max-width: 1024px) {
  .sidebar {
    transform: translateX(-100%);
  }
  
  .sidebar.open {
    transform: translateX(0);
  }
  
  .main-content {
    margin-left: 0;
  }
  
  .mobile-menu-toggle {
    display: flex;
  }
  
  .sidebar-overlay.active {
    display: block;
  }
}

@media (max-width: 768px) {
  .topbar {
    padding: 16px 20px;
  }
  
  .dashboard-content {
    padding: 20px;
  }
  
  .balance-card {
    padding: 24px;
  }
  
  .balance-amount {
    font-size: 2.25rem;
  }
  
  .balance-header {
    flex-direction: column;
    gap: 16px;
  }
  
  .user-email {
    display: none;
  }
  
  .stats-grid {
    grid-template-columns: 1fr 1fr;
  }
  
  .quick-actions {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .stats-grid {
    grid-template-columns: 1fr;
  }
  
  .stat-card {
    padding: 16px;
  }
  
  .stat-value {
    font-size: 1.25rem;
  }
}
