/* =========================================================================
   MODERN.CSS - ULTRA-MODERN DECORATIVE AESTHETICS & RESPONSIVENESS
   ========================================================================= */

/* Global overflow protection */
html, body {
  overflow-x: hidden !important;
  max-width: 100vw !important;
  width: 100% !important;
  box-sizing: border-box !important;
}
.app-shell {
  max-width: 100vw !important;
  overflow-x: hidden !important;
  width: 100% !important;
  box-sizing: border-box !important;
}
.main-content {
  min-width: 0 !important;
  max-width: 100% !important;
  overflow-x: hidden !important;
  box-sizing: border-box !important;
}
.content-area {
  min-width: 0 !important;
  max-width: 100% !important;
  overflow-x: hidden !important;
  box-sizing: border-box !important;
}

.mobile-bottom-nav {
  display: none; /* Hidden by default, shown only on mobile via media query */
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 100;
  display: flex;
  align-items: stretch;
  justify-content: space-around;
  height: 64px;
  padding: 0 4px;
  padding-bottom: env(safe-area-inset-bottom, 0px);
  background: var(--card-bg);
  border-top: 1px solid var(--border-color);
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.08);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

[data-theme="dark"] .mobile-bottom-nav {
  background: rgba(12, 12, 15, 0.95);
  border-top-color: rgba(255,255,255,0.06);
  box-shadow: 0 -4px 30px rgba(0, 0, 0, 0.5);
}

.bottom-tab {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  text-decoration: none;
  color: var(--text-muted);
  font-size: 0.6rem;
  font-weight: 600;
  letter-spacing: 0.3px;
  transition: all 200ms ease;
  position: relative;
  padding: 6px 2px;
  -webkit-tap-highlight-color: transparent;
}

.bottom-tab i, .bottom-tab svg {
  width: 22px !important;
  height: 22px !important;
  transition: all 200ms ease;
}

.bottom-tab span {
  display: block;
  line-height: 1;
}

.bottom-tab.active {
  color: var(--accent-1);
}

.bottom-tab.active i, .bottom-tab.active svg {
  stroke: var(--accent-1) !important;
  filter: drop-shadow(0 0 6px var(--accent-1-alpha));
}

.bottom-tab.active::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 24px;
  height: 3px;
  background: linear-gradient(90deg, var(--accent-1), var(--primary));
  border-radius: 0 0 3px 3px;
}

/* On mobile: show bottom tab bar and add bottom padding */
@media (max-width: 768px) {
  .mobile-bottom-nav {
    display: flex !important;
  }
  .content-area {
    padding-bottom: 120px !important;
  }
  /* Hide hamburger menu button since we have bottom nav */
  .header-menu-btn {
    display: none !important;
  }
}

/* =========================================================================
   SECTION 1: MODERN DECORATIVE ELEMENTS & ANIMATIONS
   ========================================================================= */

/* Subtle animated grid background pattern */
.modern-grid-bg {
  position: relative;
  background-color: var(--bg-primary);
}
.modern-grid-bg::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: 
    linear-gradient(to right, var(--border-color) 1px, transparent 1px),
    linear-gradient(to bottom, var(--border-color) 1px, transparent 1px);
  background-size: 30px 30px;
  opacity: 0.05;
  pointer-events: none;
  z-index: 0;
}
[data-theme="dark"] .modern-grid-bg::before {
  opacity: 0.1;
}

/* Animated gradient border accent (top of cards) */
.accent-border-top {
  position: relative;
  overflow: hidden;
}
.accent-border-top::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--accent-1), var(--primary), var(--accent-2));
  border-radius: inherit;
  /* Animated gradient sweep */
  background-size: 200% 100%;
  animation: gradientSweep 3s ease infinite;
}

/* Floating particles / dots decoration for hero sections */
.floating-dots {
  position: relative;
}
.floating-dots::after {
  content: '';
  position: absolute;
  top: 10%; right: 10%;
  width: 150px; height: 150px;
  background-image: radial-gradient(circle, var(--primary) 2px, transparent 2.5px);
  background-size: 20px 20px;
  opacity: 0.2;
  pointer-events: none;
  animation: float 4s ease-in-out infinite;
}

/* Glowing accent line (horizontal rule replacement) */
.glow-divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent-1), var(--primary), var(--accent-2), transparent);
  border: none;
  margin: 24px 0;
  opacity: 0.5;
  animation: pulseGlow 3s infinite alternate;
}

/* Corner accent decoration for cards */
.corner-accent {
  position: relative;
  overflow: hidden;
}
.corner-accent::after {
  content: '';
  position: absolute;
  top: -1px; right: -1px;
  width: 60px; height: 60px;
  background: linear-gradient(135deg, var(--accent-1) 0%, transparent 60%);
  border-radius: 0 var(--radius-2xl) 0 0;
  opacity: 0.15;
  pointer-events: none;
}

/* Keyframes */
@keyframes gradientSweep {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}
@keyframes float {
  0% { transform: translateY(-5px); }
  50% { transform: translateY(5px); }
  100% { transform: translateY(-5px); }
}
@keyframes pulseGlow {
  0% { opacity: 0.3; }
  100% { opacity: 0.8; }
}
@keyframes fadeSlideUp {
  0% {
    opacity: 0;
    transform: translateY(20px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}


/* =========================================================================
   SECTION 2: COMPREHENSIVE MOBILE RESPONSIVE
   ========================================================================= */

/* ============= TABLET (max-width: 1024px) ============= */
@media (max-width: 1024px) {
  .content-area {
    padding: 1.25rem 1rem !important;
  }
  
  /* Dashboard action-grid should stack */
  .action-grid {
    grid-template-columns: 1fr !important;
  }
  
  /* Stats grids */
  .stats-grid-modern {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 16px !important;
  }
}

/* ============= MOBILE (max-width: 768px) ============= */
@media (max-width: 768px) {
  .content-area {
    padding: 1rem 0.75rem !important;
    padding-bottom: 120px !important;
  }
  
  /* App-like header: compact */
  .header {
    height: 52px !important;
    padding: 0 0.75rem !important;
  }
  .header-title {
    font-size: 1.05rem !important;
  }
  .header-breadcrumb {
    display: none !important;
  }
  
  /* Stats grids go single column */
  .stats-grid-modern {
    grid-template-columns: 1fr !important;
    gap: 12px !important;
  }
  
  /* Dashboard welcome banner */
  .welcome-banner {
    padding: 16px 20px !important;
  }
  .welcome-banner h2 {
    font-size: 1.3rem !important;
  }
  
  /* Action grid stacks */
  .action-grid {
    grid-template-columns: 1fr !important;
    gap: 16px !important;
  }
  
  /* Card components */
  .card-header {
    padding: 1rem 1.25rem !important;
    flex-wrap: wrap !important;
    gap: 8px !important;
  }
  .card-body {
    padding: 1rem 1.25rem !important;
  }
  .card-title {
    font-size: 1rem !important;
  }
  
  /* Tables: enable horizontal scrolling and smaller text */
  .table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  table {
    font-size: 0.8rem !important;
  }
  table th, table td {
    padding: 10px 12px !important;
    white-space: nowrap;
  }
  
  /* Form groups in flex layouts */
  form[style*="display:flex"],
  form[style*="display: flex"],
  div[style*="display:flex"][style*="flex-wrap"],
  div[style*="display: flex"][style*="flex-wrap"] {
    flex-direction: column !important;
  }
  form[style*="display:flex"] .form-group,
  form[style*="display: flex"] .form-group {
    min-width: 100% !important;
    width: 100% !important;
  }
  
  /* Stat card padding */
  .stat-card-modern {
    padding: 16px !important;
  }
  .stat-card-modern .stat-value {
    font-size: 1.8rem !important;
  }
  
  /* Glass card padding */
  .glass-card {
    padding: 16px !important;
  }
  
  /* Admin dashboard 2-col grid */
  div[style*="grid-template-columns:1fr 1fr"],
  div[style*="grid-template-columns: 1fr 1fr"] {
    grid-template-columns: 1fr !important;
  }
  
  /* Header adjustments */
  .header {
    padding: 0 1rem !important;
  }
  .header-title {
    font-size: 1rem !important;
  }
  
  /* Buttons full-width on mobile */
  .btn-block {
    width: 100% !important;
  }
  
  /* Affiliate video grid (2 columns on mobile) */
  .affiliate-video-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 10px !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
  }
  .folder-grid {
    grid-template-columns: 1fr !important;
    gap: 12px !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }
  
  /* Brand distribute video grid */
  div[style*="grid-template-columns:repeat(auto-fit,minmax(160px"] {
    grid-template-columns: repeat(2, 1fr) !important;
  }
  
  /* Pricing cards in packages page */
  div[style*="grid-template-columns:repeat(auto-fit,minmax(240px"] {
    grid-template-columns: 1fr !important;
    gap: 16px !important;
  }
  
  /* Stats row in admin/affiliate dashboard */
  div[style*="grid-template-columns:repeat(auto-fit,minmax(200px"],
  div[style*="grid-template-columns:repeat(auto-fit,minmax(180px"] {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 12px !important;
  }
  
  /* Two-column distribute layout */
  div[style*="display:flex"][style*="gap:24px"][style*="flex-wrap"] {
    flex-direction: column !important;
  }
  div[style*="flex:2"], div[style*="flex:1"] {
    flex: none !important;
    width: 100% !important;
    min-width: 100% !important;
  }
}

/* ============= SMALL MOBILE (max-width: 480px) ============= */
@media (max-width: 480px) {
  .content-area {
    padding: 0.75rem 0.5rem !important;
  }
  
  .stats-grid-modern {
    grid-template-columns: 1fr !important;
  }
  
  /* Stats row go single column */
  div[style*="grid-template-columns:repeat(auto-fit,minmax(200px"],
  div[style*="grid-template-columns:repeat(auto-fit,minmax(180px"] {
    grid-template-columns: 1fr !important;
  }
  
  /* Video select grid in distribute */
  div[style*="grid-template-columns:repeat(auto-fit,minmax(160px"] {
    grid-template-columns: 1fr !important;
  }
  
  .welcome-banner h2 {
    font-size: 1.1rem !important;
  }
}


/* =========================================================================
   SECTION 3: ENHANCED CARD AND ELEMENT STYLES
   ========================================================================= */

/* Smooth card entrance animation */
.card {
  animation: fadeSlideUp 0.4s ease both;
}
.stat-card-modern {
  position: relative;
  overflow: hidden;
}

/* Enhanced stat cards with subtle gradient overlay in dark mode */
[data-theme="dark"] .stat-card-modern::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(37, 244, 238, 0.03) 0%, rgba(254, 44, 85, 0.03) 100%);
  border-radius: inherit;
  pointer-events: none;
}

/* Table row hover with left accent in dark mode */
[data-theme="dark"] table tbody tr {
  transition: background 0.2s ease;
}
[data-theme="dark"] table tbody tr:hover {
  background: rgba(37, 244, 238, 0.05) !important;
}

/* Enhanced scrollbar for dark mode */
[data-theme="dark"] ::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
[data-theme="dark"] ::-webkit-scrollbar-track {
  background: var(--bg-primary);
}
[data-theme="dark"] ::-webkit-scrollbar-thumb {
  background: var(--border-color);
  border-radius: 3px;
}
[data-theme="dark"] ::-webkit-scrollbar-thumb:hover {
  background: var(--text-muted);
}

/* Button hover glow effect */
.btn-gradient,
.btn-sba {
  transition: all 0.3s ease;
}
.btn-gradient:hover,
.btn-sba:hover {
  box-shadow: 0 0 20px rgba(5, 150, 105, 0.3), 0 4px 15px rgba(0, 0, 0, 0.2) !important;
  transform: translateY(-1px);
}

/* Links subtle transition */
a {
  transition: color 0.2s ease, opacity 0.2s ease;
}

/* =========================================================================
   SECTION 4: PREMIUM AMBIENT BACKGROUND & EXTRA POLISH
   ========================================================================= */

/* Ambient mesh gradient behind content area */
.content-area.modern-grid-bg {
  position: relative;
  z-index: 1;
}
.content-area.modern-grid-bg::after {
  content: '';
  position: fixed;
  top: 0; right: 0;
  width: 50vw; height: 50vh;
  background: radial-gradient(ellipse at 80% 20%, var(--accent-1-alpha), transparent 70%);
  opacity: 0.25;
  pointer-events: none;
  z-index: -1;
}
[data-theme="dark"] .content-area.modern-grid-bg::after {
  opacity: 0.08;
}

/* Second ambient blob */
.content-area.modern-grid-bg > *:first-child::before {
  content: '';
  position: fixed;
  bottom: 0; left: 20%;
  width: 40vw; height: 40vh;
  background: radial-gradient(ellipse at 20% 80%, var(--accent-2-alpha), transparent 70%);
  opacity: 0.15;
  pointer-events: none;
  z-index: -1;
}
[data-theme="dark"] .content-area.modern-grid-bg > *:first-child::before {
  opacity: 0.06;
}

/* Enhanced table styling */
table {
  width: 100%;
  border-collapse: collapse;
}
table thead tr {
  background: var(--bg-secondary) !important;
}
table th {
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-size: 0.75rem !important;
}
table tbody tr {
  transition: background 0.15s ease;
}
table tbody tr:hover {
  background: var(--bg-secondary) !important;
}
[data-theme="dark"] table thead tr {
  background: rgba(5, 150, 105, 0.06) !important;
}

/* Page section titles */
.section-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.section-title::before {
  content: '';
  width: 4px;
  height: 20px;
  background: linear-gradient(to bottom, var(--accent-1), var(--primary));
  border-radius: 2px;
}

/* Empty state styling */
.empty-state {
  padding: 48px 24px;
  text-align: center;
  background: var(--card-bg);
  border-radius: var(--radius-xl);
  border: 1px dashed var(--border-color);
}

/* Notification dot / pulse */
.notification-dot {
  width: 8px; height: 8px;
  background: var(--accent-2);
  border-radius: 50%;
  animation: pulseGlow 1.5s infinite alternate;
}

/* Sidebar active glow in dark mode */
[data-theme="dark"] .sidebar-nav-item.active {
  background: rgba(5, 150, 105, 0.15) !important;
  box-shadow: 0 0 15px rgba(5, 150, 105, 0.08);
}

/* Card hover lift effect - make it more dramatic in dark mode */
[data-theme="dark"] .card:hover {
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3), 0 0 1px rgba(5, 150, 105, 0.2) !important;
}

/* Stats number odometer-like feel */
.stat-value, .stat-card-modern h3 {
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
}

/* Mobile specific: make pagination touch-friendly */
@media (max-width: 768px) {
  .pagination-wrapper a,
  .pagination-wrapper span {
    min-width: 36px;
    min-height: 36px;
    padding: 6px 10px !important;
    font-size: 0.8rem !important;
  }
  
  /* Image grid goes 2-col on mobile */
  .image-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 10px !important;
  }
  
  /* Video grid goes 2 columns on mobile for sleek vertical cards */
  .video-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 10px !important;
  }
  
  /* Modal responsiveness */
  .modal-content {
    max-width: 95vw !important;
    margin: 1rem !important;
  }
  
  /* Toast position */
  .toast-container {
    left: 0.5rem !important;
    right: 0.5rem !important;
    top: auto !important;
    bottom: 1rem !important;
  }
  .toast {
    min-width: auto !important;
    max-width: 100% !important;
  }
  
  /* Studio layout height auto on mobile */
  .studio-layout {
    height: auto !important;
    min-height: auto !important;
  }
}

/* Tablet specific: image grid 3 cols */
@media (min-width: 769px) and (max-width: 1024px) {
  .image-grid {
    grid-template-columns: repeat(3, 1fr) !important;
  }
}

/* =========================================================================
   SECTION 7: AUTH PAGE PREMIUM AESTHETICS
   ========================================================================= */
body.auth-page {
  background: transparent !important; /* Let ambient background show through */
}

[data-theme="dark"] body.auth-page {
  background: var(--bg-primary) !important;
}

[data-theme="dark"] .auth-card {
  background: rgba(18, 18, 22, 0.65) !important;
  backdrop-filter: blur(24px) !important;
  -webkit-backdrop-filter: blur(24px) !important;
  border: 1px solid rgba(255,255,255,0.06) !important;
  box-shadow: 0 30px 60px rgba(0,0,0,0.4), inset 0 1px 0 rgba(255,255,255,0.05) !important;
}

[data-theme="dark"] .auth-title {
  color: #fff !important;
}

[data-theme="dark"] .auth-subtitle {
  color: var(--text-muted) !important;
}

[data-theme="dark"] .auth-form .form-label {
  color: #e2e8f0 !important;
}

[data-theme="dark"] .auth-form .form-input {
  background: rgba(0,0,0,0.2) !important;
  border-color: rgba(255,255,255,0.1) !important;
  color: #fff !important;
}

[data-theme="dark"] .auth-form .form-input:focus {
  background: rgba(0,0,0,0.4) !important;
  border-color: var(--primary) !important;
  box-shadow: 0 0 0 3px var(--primary-alpha) !important;
}

[data-theme="dark"] .auth-footer {
  border-top-color: rgba(255,255,255,0.06) !important;
}

[data-theme="dark"] .auth-footer p {
  color: var(--text-muted) !important;
}

[data-theme="dark"] .auth-logo-icon {
  box-shadow: 0 0 30px rgba(162, 89, 255, 0.3) !important;
}

/* =========================================================================
   SECTION 8: AFFILIATE MOBILE POLISH
   ========================================================================= */
@media (max-width: 768px) {
  /* Affiliate Videos Grid */
  .affiliate-video-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 12px !important;
  }
  
  .affiliate-video-grid .card-body {
    padding: 10px !important;
  }

  .affiliate-video-grid h4 {
    font-size: 0.85rem !important;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .affiliate-video-grid p {
    font-size: 0.7rem !important;
    margin-bottom: 6px !important;
  }

  .affiliate-video-grid .btn {
    padding: 6px !important;
    font-size: 0.75rem !important;
  }
  
  .affiliate-video-grid .btn i {
    width: 14px !important;
    height: 14px !important;
    margin-right: 4px !important;
  }

  .affiliate-video-grid .video-thumb-player {
    min-height: 120px !important;
    max-height: 160px !important;
  }

  /* Compact Alerts on Mobile */
  .compact-alert {
    padding: 12px 14px !important;
    gap: 10px !important;
    align-items: flex-start !important;
  }
  .compact-alert h4 { font-size: 0.95rem !important; }
  .compact-alert p { font-size: 0.8rem !important; }

  /* Tables on Mobile */
  .mobile-compact-table th, .mobile-compact-table td {
    padding: 10px 12px !important;
    font-size: 0.8rem !important;
    white-space: nowrap;
  }
}

/* =========================================================================
   SECTION 9: PREMIUM REUSABLE COMPONENT CLASSES
   ========================================================================= */

/* ---- Premium Stat Card ---- */
.premium-stat-card {
  padding: 20px;
  border-radius: var(--radius-xl);
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.04);
  background: var(--card-bg);
  transition: transform 0.3s cubic-bezier(0.4,0,0.2,1), box-shadow 0.3s ease;
}
.premium-stat-card:hover { transform: translateY(-3px); }

[data-theme="dark"] .premium-stat-card {
  background: linear-gradient(180deg, rgba(30,30,36,0.6) 0%, rgba(20,20,25,0.8) 100%);
  backdrop-filter: blur(10px);
}

.premium-stat-card .stat-glow {
  position: absolute; top: -20px; right: -20px;
  width: 100px; height: 100px;
  border-radius: 50%;
  filter: blur(50px); opacity: 0.15;
  pointer-events: none;
}

.premium-stat-card .stat-icon-wrap {
  width: 40px; height: 40px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 16px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.1);
}
.premium-stat-card .stat-icon-wrap i,
.premium-stat-card .stat-icon-wrap svg { width: 20px; height: 20px; }

.premium-stat-card .stat-value {
  font-size: 2rem; font-weight: 800; line-height: 1;
  margin-bottom: 6px; color: var(--text-primary);
  position: relative; z-index: 1;
}
.premium-stat-card .stat-label {
  font-size: 0.85rem; font-weight: 500;
  color: var(--text-secondary);
  text-transform: uppercase; letter-spacing: 0.03em;
  position: relative; z-index: 1;
}

.premium-stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 16px; margin-bottom: 24px;
}

/* ---- Premium Table ---- */
.premium-table { width: 100%; border-collapse: collapse; }
.premium-table thead tr {
  border-bottom: 2px solid var(--border-color);
}
[data-theme="dark"] .premium-table thead tr {
  background: rgba(255,255,255,0.02);
  border-bottom-color: rgba(255,255,255,0.06);
}
.premium-table th {
  padding: 14px 18px; font-size: 0.75rem; font-weight: 700;
  color: var(--text-muted); text-transform: uppercase;
  letter-spacing: 0.06em; text-align: left;
}
.premium-table td {
  padding: 14px 18px; font-size: 0.875rem;
  color: var(--text-primary); border-bottom: 1px solid var(--border-light);
  vertical-align: middle;
}
[data-theme="dark"] .premium-table td {
  border-bottom-color: rgba(255,255,255,0.04);
}
.premium-table tbody tr {
  transition: background 150ms ease;
}
.premium-table tbody tr:hover {
  background: var(--primary-alpha);
}
[data-theme="dark"] .premium-table tbody tr:hover {
  background: rgba(255,255,255,0.03);
}
.premium-table .td-name {
  font-weight: 600; color: var(--text-primary);
}
.premium-table .td-sub {
  font-size: 0.75rem; color: var(--text-muted); margin-top: 2px;
}
.premium-table .td-actions {
  display: flex; gap: 6px; flex-wrap: wrap;
}
.premium-table .td-actions .btn { font-size: 0.75rem; padding: 4px 10px; }

/* ---- Premium Alert ---- */
.premium-alert {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 16px 20px; border-radius: var(--radius-lg);
  margin-bottom: 16px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  border-left: 4px solid transparent;
  animation: fadeSlideIn 0.3s ease;
}
.premium-alert--success { background: var(--success-bg); border-left-color: var(--success); }
.premium-alert--danger  { background: var(--danger-bg);  border-left-color: var(--danger); }
.premium-alert--warning { background: var(--warning-bg); border-left-color: var(--warning); }
.premium-alert--info    { background: var(--info-bg);    border-left-color: var(--info); }
.premium-alert i, .premium-alert svg {
  flex-shrink: 0; width: 20px; height: 20px; margin-top: 2px;
}
.premium-alert--success i { color: var(--success); }
.premium-alert--danger i  { color: var(--danger); }
.premium-alert--warning i { color: var(--warning); }
.premium-alert--info i    { color: var(--info); }
.premium-alert p, .premium-alert span {
  font-size: 0.9rem; color: var(--text-primary); font-weight: 500;
  line-height: 1.5; margin: 0;
}

@keyframes fadeSlideIn {
  from { opacity: 0; transform: translateY(-8px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ---- Premium Tab Bar ---- */
.premium-tab-bar {
  display: flex; gap: 4px; padding: 4px;
  background: var(--bg-secondary);
  border-radius: var(--radius-lg); margin-bottom: 20px;
  overflow-x: auto; -webkit-overflow-scrolling: touch;
}
[data-theme="dark"] .premium-tab-bar {
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.04);
}
.premium-tab-bar a, .premium-tab-bar button {
  flex: 1; padding: 10px 16px; border-radius: var(--radius-md);
  font-size: 0.85rem; font-weight: 600;
  color: var(--text-muted); text-decoration: none;
  text-align: center; white-space: nowrap;
  transition: all 200ms ease;
  background: transparent; border: none; cursor: pointer;
}
.premium-tab-bar a:hover, .premium-tab-bar button:hover {
  color: var(--text-primary);
}
.premium-tab-bar a.active, .premium-tab-bar button.active {
  background: var(--card-bg); color: var(--primary);
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}
[data-theme="dark"] .premium-tab-bar a.active,
[data-theme="dark"] .premium-tab-bar button.active {
  background: rgba(5, 150, 105, 0.15);
  color: var(--primary-light);
  box-shadow: 0 0 12px rgba(5, 150, 105, 0.1);
}

/* ---- Premium Badge ---- */
.premium-badge {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 12px; border-radius: var(--radius-full);
  font-size: 0.75rem; font-weight: 700;
  letter-spacing: 0.02em;
}
.premium-badge::before {
  content: ''; width: 6px; height: 6px; border-radius: 50%;
}
.premium-badge--success { background: var(--success-bg); color: var(--success); }
.premium-badge--success::before { background: var(--success); box-shadow: 0 0 6px var(--success); }
.premium-badge--warning { background: var(--warning-bg); color: var(--warning); }
.premium-badge--warning::before { background: var(--warning); box-shadow: 0 0 6px var(--warning); }
.premium-badge--danger  { background: var(--danger-bg);  color: var(--danger); }
.premium-badge--danger::before  { background: var(--danger);  box-shadow: 0 0 6px var(--danger); }
.premium-badge--info    { background: var(--info-bg);    color: var(--info); }
.premium-badge--info::before    { background: var(--info);    box-shadow: 0 0 6px var(--info); }
.premium-badge--muted   { background: var(--gray-200);   color: var(--gray-600); }
.premium-badge--muted::before   { background: var(--gray-400); }

/* ---- Premium Card (glassmorphic) ---- */
.premium-card {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
[data-theme="dark"] .premium-card {
  background: rgba(24, 24, 30, 0.65);
  backdrop-filter: blur(16px);
  border-color: rgba(255,255,255,0.05);
  box-shadow: 0 8px 24px rgba(0,0,0,0.3);
}
.premium-card .card-header {
  padding: 20px 24px 16px;
  display: flex; align-items: center; gap: 12px;
  border-bottom: 1px solid var(--border-light);
}
[data-theme="dark"] .premium-card .card-header {
  border-bottom-color: rgba(255,255,255,0.04);
}
.premium-card .card-header .card-icon {
  width: 36px; height: 36px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.1);
}
.premium-card .card-header .card-icon i,
.premium-card .card-header .card-icon svg { width: 18px; height: 18px; }
.premium-card .card-header h3 {
  font-size: 1.05rem; font-weight: 700; color: var(--text-primary); margin: 0;
}
.premium-card .card-body { padding: 20px 24px; }

/* ---- Premium Form ---- */
.premium-form .form-group { margin-bottom: 18px; }
.premium-form .form-label {
  display: block; margin-bottom: 6px;
  font-size: 0.85rem; font-weight: 600;
  color: var(--text-secondary);
}
.premium-form .form-input,
.premium-form .form-select {
  width: 100%; padding: 10px 14px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  background: var(--bg-secondary);
  color: var(--text-primary);
  font-size: 0.9rem;
  transition: all 200ms ease;
}
[data-theme="dark"] .premium-form .form-input,
[data-theme="dark"] .premium-form .form-select {
  background: rgba(0,0,0,0.2);
  border-color: rgba(255,255,255,0.08);
}
.premium-form .form-input:focus,
.premium-form .form-select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-alpha);
}

/* ---- Premium Action Buttons ---- */
.btn-premium {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 6px 14px; border-radius: var(--radius-md);
  font-size: 0.8rem; font-weight: 600;
  border: 1px solid transparent; cursor: pointer;
  transition: all 200ms ease;
  text-decoration: none;
}
.btn-premium i, .btn-premium svg { width: 14px; height: 14px; }

.btn-premium--success { background: var(--success-bg); color: var(--success); border-color: rgba(16,185,129,0.2); }
.btn-premium--success:hover { background: var(--success); color: white; }
.btn-premium--danger  { background: var(--danger-bg); color: var(--danger); border-color: rgba(239,68,68,0.2); }
.btn-premium--danger:hover { background: var(--danger); color: white; }
.btn-premium--warning { background: var(--warning-bg); color: var(--warning); border-color: rgba(245,158,11,0.2); }
.btn-premium--warning:hover { background: var(--warning); color: white; }
.btn-premium--primary { background: var(--primary-alpha); color: var(--primary); border-color: rgba(5,150,105,0.2); }
.btn-premium--primary:hover { background: var(--primary); color: white; }

/* ---- Premium Pricing Card ---- */
.premium-pricing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px; margin-bottom: 32px;
}
.premium-pricing-card {
  padding: 28px 24px;
  border-radius: var(--radius-xl);
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  position: relative; overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.premium-pricing-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(0,0,0,0.12);
}
[data-theme="dark"] .premium-pricing-card {
  background: rgba(24, 24, 30, 0.65);
  backdrop-filter: blur(10px);
  border-color: rgba(255,255,255,0.05);
}
.premium-pricing-card.popular {
  border-color: var(--primary);
  box-shadow: 0 0 20px var(--primary-alpha);
}
[data-theme="dark"] .premium-pricing-card.popular {
  border-color: var(--primary-light);
  box-shadow: 0 0 30px rgba(5, 150, 105, 0.2);
}
.premium-pricing-card .popular-tag {
  position: absolute; top: 12px; right: -28px;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: white; font-size: 0.65rem; font-weight: 700;
  padding: 4px 32px; transform: rotate(45deg);
  letter-spacing: 0.05em; text-transform: uppercase;
}
.premium-pricing-card .pricing-name {
  font-size: 1.1rem; font-weight: 700; color: var(--text-primary);
  margin-bottom: 4px;
}
.premium-pricing-card .pricing-price {
  font-size: 2rem; font-weight: 800; color: var(--text-primary);
  margin-bottom: 4px; line-height: 1.2;
}
.premium-pricing-card .pricing-price span {
  font-size: 0.85rem; font-weight: 500; color: var(--text-muted);
}
.premium-pricing-card .pricing-desc {
  font-size: 0.85rem; color: var(--text-muted); margin-bottom: 20px;
  line-height: 1.5;
}
.premium-pricing-card .pricing-features {
  list-style: none; padding: 0; margin: 0 0 24px 0;
}
.premium-pricing-card .pricing-features li {
  display: flex; align-items: center; gap: 8px;
  padding: 6px 0; font-size: 0.85rem; color: var(--text-secondary);
}
.premium-pricing-card .pricing-features li i,
.premium-pricing-card .pricing-features li svg {
  width: 16px; height: 16px; color: var(--success); flex-shrink: 0;
}

/* ---- MOBILE RESPONSIVE FOR PREMIUM COMPONENTS ---- */
@media (max-width: 768px) {
  .premium-stat-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }
  .premium-stat-card {
    padding: 14px;
  }
  .premium-stat-card .stat-value { font-size: 1.5rem; }
  .premium-stat-card .stat-label { font-size: 0.7rem; }
  .premium-stat-card .stat-icon-wrap { width: 32px; height: 32px; margin-bottom: 10px; }
  .premium-stat-card .stat-icon-wrap i { width: 16px; height: 16px; }

  .premium-table th { padding: 10px 12px; font-size: 0.7rem; }
  .premium-table td { padding: 10px 12px; font-size: 0.8rem; }
  .premium-table .td-actions { flex-direction: column; gap: 4px; }
  .premium-table .td-actions .btn { width: 100%; text-align: center; }

  .premium-tab-bar { gap: 2px; padding: 3px; }
  .premium-tab-bar a, .premium-tab-bar button {
    padding: 8px 10px; font-size: 0.75rem;
  }

  .premium-card .card-header { padding: 16px 18px 12px; }
  .premium-card .card-body { padding: 16px 18px; }

  .premium-pricing-grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }
  .premium-pricing-card { padding: 20px 18px; }

  .premium-alert { padding: 12px 14px; gap: 10px; }
  .premium-alert p, .premium-alert span { font-size: 0.85rem; }
}
