/* ===================================
   V2 IMPROVEMENTS - UX/UI Enhancements
   =================================== */

/* Optimización de Touch Global */
html,
body {
  -webkit-tap-highlight-color: transparent;
}

/* Evitar retrasos de 300ms en interacción */
a,
button,
.quick-card,
.nav-item,
.submenu-item {
  touch-action: manipulation;
}

/* Version Badge */
.version-badge {
  display: inline-block;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 4px 12px;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 600;
  margin-left: 8px;
  box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

.version-tag {
  background: var(--primary);
  color: white;
  padding: 2px 8px;
  border-radius: 8px;
  font-size: 0.7rem;
  font-weight: 600;
  margin-left: auto;
}

/* ===================================
   SIDEBAR V2 - ELIMINADO
   =================================== */

/* SIDEBAR ELIMINADO - ESPACIO LIBERADO */
/* ===================================
   SETTINGS & FORM COMPONENTS
   =================================== */

.switch-modern {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
}

.switch-modern input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider-modern {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #334155;
  transition: .4s;
  border-radius: 34px;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.slider-modern:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 2px;
  bottom: 2px;
  background-color: white;
  transition: .4s;
  border-radius: 50%;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

input:checked+.slider-modern {
  background: linear-gradient(135deg, var(--success-color) 0%, #059669 100%);
}

input:focus+.slider-modern {
  box-shadow: 0 0 1px var(--success-color);
}

input:checked+.slider-modern:before {
  transform: translateX(20px);
}

.summary-divider {
  height: 1px;
  background: linear-gradient(to right, transparent, rgba(255, 255, 255, 0.1), transparent);
  width: 100%;
}

.card-header-lean .card-title i {
  color: var(--primary-light);
  margin-right: 8px;
}

/* Hide sections for non-admin */
.nav-section.admin-only {
  display: none;
}

body[data-user-role="TENANT_ADMIN"] .nav-section.admin-only {
  display: block;
}

/* ===================================
   BREADCRUMBS - OCULTO COMPLETAMENTE
   =================================== */
.breadcrumbs {
  display: none !important;
}

.breadcrumbs i {
  color: var(--primary);
}

.breadcrumbs span {
  font-weight: 500;
  color: #1e293b;
}

.breadcrumb-separator {
  color: #cbd5e1;
  margin: 0 4px;
}

/* ===================================
   DASHBOARD WIDGETS (Mejoras)
   =================================== */
.widget-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
  margin-bottom: 24px;
}

.widget-card {
  background: white;
  border-radius: 12px;
  padding: 20px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  transition: all 0.2s ease;
}

.widget-card:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  transform: translateY(-2px);
}

.widget-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.widget-title {
  font-size: 0.9rem;
  font-weight: 600;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.widget-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
}

.widget-icon.primary {
  background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
  color: white;
}

.widget-icon.success {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: white;
}

.widget-icon.warning {
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  color: white;
}

.widget-icon.danger {
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
  color: white;
}

.widget-value {
  font-size: 2rem;
  font-weight: 700;
  color: #1e293b;
  margin-bottom: 4px;
}

.widget-label {
  font-size: 0.85rem;
  color: #64748b;
}

.widget-footer {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid #e2e8f0;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  color: #64748b;
}

.widget-trend {
  display: flex;
  align-items: center;
  gap: 4px;
  font-weight: 600;
}

.widget-trend.up {
  color: #10b981;
}

.widget-trend.down {
  color: #ef4444;
}

/* ===================================
   ALERTS & NOTIFICATIONS WIDGET
   =================================== */
.alerts-widget {
  background: white;
  border-radius: 12px;
  padding: 20px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  margin-bottom: 24px;
}

.alert-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  background: #fef3c7;
  border-left: 4px solid #f59e0b;
  border-radius: 8px;
  margin-bottom: 12px;
}

.alert-item.error {
  background: #fee2e2;
  border-left-color: #ef4444;
}

.alert-item.success {
  background: #d1fae5;
  border-left-color: #10b981;
}

.alert-icon {
  font-size: 1.2rem;
  color: #f59e0b;
}

.alert-item.error .alert-icon {
  color: #ef4444;
}

.alert-item.success .alert-icon {
  color: #10b981;
}

.alert-content {
  flex: 1;
}

.alert-title {
  font-weight: 600;
  font-size: 0.9rem;
  color: #1e293b;
  margin-bottom: 2px;
}

.alert-message {
  font-size: 0.85rem;
  color: #64748b;
}

.alert-action {
  padding: 6px 12px;
  background: white;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.alert-action:hover {
  background: #f9fafb;
  border-color: var(--primary);
  color: var(--primary);
}

/* ===================================
   RESPONSIVE ADJUSTMENTS V2
   =================================== */
@media (max-width: 768px) {
  .breadcrumbs {
    padding: 12px 16px;
    font-size: 0.85rem;
  }

  .widget-value {
    font-size: 1.5rem;
  }

  .alerts-widget {
    padding: 16px;
  }
}

/* ===================================
   DARK MODE SUPPORT (Preparado)
   =================================== */
@media (prefers-color-scheme: dark) {

  .widget-card,
  .alerts-widget,
  .quick-actions-bar {
    opacity: 1;
  }
}

/* ===================================
   HOME PAGE - ACCESOS RÁPIDOS
   =================================== */

/* Modo fullscreen para home (sin sidebar) */
.home-fullscreen .main-content {
  margin: 0 !important;
  width: 100% !important;
  padding: 0 !important;
  pointer-events: auto !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
  height: auto !important;
  min-height: 100vh !important;
}

@media (min-width: 1024px) {
  .home-fullscreen .main-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin: 0 auto !important;
  }
}

.home-fullscreen .tenant-header,
body.pos-active .tenant-header,
body.pos-active #quick-actions-bar,
body.pos-active #breadcrumbs {
  display: none !important;
}

/* En mobile el header SIEMPRE es visible — es el único acceso al logout */
@media (max-width: 768px) {
  .home-fullscreen .tenant-header {
    display: flex !important;
  }
}

.home-fullscreen {
  overflow-y: auto !important;
  overflow-x: hidden !important;
  height: auto !important;
}

.home-fullscreen .breadcrumbs {
  display: none !important;
}

/* Ocultar breadcrumbs en home page */
.home-page~.breadcrumbs,
.home-page+.breadcrumbs {
  display: none !important;
}

.home-page {
  padding: 24px;
  max-width: 1400px;
  margin: 0 auto;
  min-height: 100vh;
  background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
  position: relative;
  z-index: 5;
  pointer-events: auto !important;
  display: block;
}

.home-header {
  margin-bottom: 32px;
}

.home-header-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
}

.home-header h1 {
  font-size: 2.5rem;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 8px;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.home-subtitle {
  font-size: 1.2rem;
  color: #94a3b8;
  font-weight: 500;
}

.home-date {
  font-size: 0.95rem;
  color: #64748b;
  margin-top: 4px;
}

.home-header-actions {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: flex-end;
}

/* Main Content Layout - FULL WIDTH */
.app-container {
  display: block !important;
  width: 100%;
  min-height: 100vh;
}

.main-content {
  margin: 0 !important;
  width: 100% !important;
  min-height: 100vh;
  padding: 0;
  background: #0f172a;
  transition: none !important;
}

@media (min-width: 1024px) {
  .main-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    /* Centrar contenido en desktop */
    margin: 0 auto !important;
  }

  #page-container,
  .tenant-header,
  .breadcrumbs {
    width: 100% !important;
    max-width: 1400px !important;
    margin-left: auto !important;
    margin-right: auto !important;
  }

  .tenant-header {
    max-width: 100% !important;
    display: flex;
    justify-content: center;
  }

  .tenant-header>div {
    width: 100%;
    max-width: 1400px;
    display: flex;
    justify-content: space-between;
    align-items: center;
  }
}

/* ===================================
   TENANT HEADER - NEW MINIMALIST NAV
   =================================== */
.tenant-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 2rem;
  background: rgba(30, 41, 59, 0.8);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.header-left h1 {
  font-size: 1.4rem;
  color: var(--primary-light);
  margin: 0;
  display: flex;
  align-items: center;
  gap: 10px;
}

.header-nav-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0.6rem 1.2rem;
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
  color: white;
  text-decoration: none;
  border-radius: 12px;
  font-weight: 600;
  font-size: 0.95rem;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

.header-nav-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 15px rgba(37, 99, 235, 0.4);
  filter: brightness(1.1);
}

.user-profile-mini {
  display: flex;
  align-items: center;
  gap: 20px;
}

#tenant-name-header {
  color: var(--text-secondary);
  font-weight: 500;
  font-size: 0.95rem;
  opacity: 0.9;
}

.header-logout-btn {
  background: rgba(239, 68, 68, 0.1);
  color: #ef4444;
  border: 1px solid rgba(239, 68, 68, 0.2);
  padding: 0.5rem 1rem;
  border-radius: 10px;
  font-size: 0.9rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.header-logout-btn:hover {
  background: #ef4444;
  color: white;
  box-shadow: 0 4px 12px rgba(239, 68, 68, 0.2);
}

/* Breadcrumbs Refinement */
.breadcrumbs {
  padding: 1.5rem 2rem 0.5rem;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.9rem;
}

.breadcrumb-link {
  color: var(--primary-light);
  text-decoration: none;
  font-weight: 500;
}

.breadcrumb-link:hover {
  text-decoration: underline;
}

.breadcrumb-sep {
  color: var(--text-muted);
  font-size: 0.75rem;
}

.breadcrumb-current {
  color: var(--text-secondary);
}

/* Responsive Overrides */
@media (max-width: 768px) {
  .tenant-header {
    padding: 0.75rem 1rem;
  }

  .header-left h1 span,
  .header-nav-btn span,
  .header-logout-btn span,
  #tenant-name-header {
    display: none;
  }

  .header-nav-btn,
  .header-logout-btn {
    padding: 0.6rem;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    justify-content: center;
  }
}

.home-action-btn {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 8px !important;
  padding: 10px 18px !important;
  background: rgba(255, 255, 255, 0.05) !important;
  backdrop-filter: blur(8px) !important;
  -webkit-backdrop-filter: blur(8px) !important;
  color: #f1f5f9 !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  border-radius: 12px !important;
  font-size: 0.85rem !important;
  font-weight: 600 !important;
  cursor: pointer !important;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1) !important;
  white-space: nowrap !important;
  width: auto !important;
  height: auto !important;
  text-decoration: none !important;
  pointer-events: auto !important;
  touch-action: manipulation !important;
}

.home-action-btn:hover {
  background: rgba(255, 255, 255, 0.1) !important;
  transform: translateY(-2px) !important;
  border-color: rgba(255, 255, 255, 0.2) !important;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1) !important;
}

.home-action-btn i {
  font-size: 1rem !important;
  opacity: 0.8 !important;
}

/* Dashboard Button */
.home-action-btn[data-page="dashboard"] {
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.2) 0%, rgba(37, 99, 235, 0.2) 100%) !important;
  border-color: rgba(59, 130, 246, 0.3) !important;
  color: #60a5fa !important;
}

/* Logout Button */
.home-action-btn.logout-btn {
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.15) 0%, rgba(220, 38, 38, 0.1) 100%) !important;
  border-color: rgba(239, 68, 68, 0.2) !important;
  color: #f87171 !important;
}

/* Grid de Cards de Acceso Rápido */
.quick-access-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
  margin-bottom: 24px;
}

@media (min-width: 768px) {
  .quick-access-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1200px) {
  .quick-access-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.quick-card {
  background: #1e293b;
  border-radius: 16px;
  padding: 24px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
  cursor: pointer;
  transition: all 0.3s ease;
  border: 2px solid #334155;
  position: relative;
  overflow: visible;
  min-height: 160px;
  display: flex;
  flex-direction: column;
  pointer-events: auto !important;
  touch-action: manipulation !important;
  user-select: auto !important;
  -webkit-user-select: auto !important;
  z-index: 10;
}

.quick-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.4);
  border-color: #3b82f6;
}

.quick-card-primary {
  background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
  color: white;
  border-color: #2563eb;
}

@media (min-width: 768px) {
  .quick-card-primary {
    grid-column: span 2;
  }
}

.quick-card-primary:hover {
  border-color: #60a5fa;
  box-shadow: 0 12px 40px rgba(59, 130, 246, 0.4);
}

.quick-card-primary .quick-card-icon {
  background: rgba(255, 255, 255, 0.2);
}

.quick-card-primary h3,
.quick-card-primary p {
  color: white;
}

.quick-card-section {
  grid-column: span 1;
}

.quick-card-info {
  background: linear-gradient(135deg, #ec4899 0%, #db2777 100%);
  color: white;
  border-color: #db2777;
}

.quick-card-info:hover {
  border-color: #f472b6;
  box-shadow: 0 12px 40px rgba(236, 72, 153, 0.4);
}

.quick-card-info .quick-card-icon {
  background: rgba(255, 255, 255, 0.2);
}

.quick-card-info h3,
.quick-card-info p,
.quick-card-info .stat-label,
.quick-card-info .stat-value {
  color: white;
}

.quick-card-icon {
  width: 64px;
  height: 64px;
  border-radius: 16px;
  background: linear-gradient(135deg, #475569 0%, #334155 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
  font-size: 28px;
  color: white;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  flex-shrink: 0;
}

.quick-card-content {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.quick-card-content h3 {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 6px;
  color: #f1f5f9;
  line-height: 1.3;
}

.quick-card-content p {
  font-size: 0.9rem;
  color: #94a3b8;
  margin-bottom: 12px;
  line-height: 1.5;
}

.quick-card-badge {
  display: inline-block;
  padding: 8px 14px;
  border-radius: 24px;
  font-size: 0.9rem;
  font-weight: 700;
}

.quick-card-badge.success {
  background: rgba(34, 197, 94, 0.2);
  color: #4ade80;
  border: 1px solid rgba(74, 222, 128, 0.3);
}

.quick-card-primary .quick-card-badge.success {
  background: rgba(255, 255, 255, 0.3);
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.4);
}

.quick-card-badge.warning {
  background: rgba(251, 146, 60, 0.2);
  color: #fb923c;
  border: 1px solid rgba(251, 146, 60, 0.3);
}

/* Submenú en Cards - Tema Oscuro */
.quick-card-submenu {
  margin-top: 20px;
  display: grid;
  gap: 10px;
}

.submenu-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px;
  background: #0f172a;
  border: 1px solid #334155;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 0.95rem;
  font-weight: 500;
  color: #e2e8f0;
  text-align: left;
  min-height: 48px;
}

.submenu-item:hover {
  background: #1e293b;
  border-color: #3b82f6;
  color: #60a5fa;
  transform: translateX(6px);
}

.submenu-item i {
  font-size: 1.1rem;
  width: 24px;
  text-align: center;
  color: #3b82f6;
}

/* Quick Stats - Tema Oscuro */
.quick-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-top: 16px;
}

.quick-stat {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 12px;
  background: rgba(15, 23, 42, 0.5);
  border-radius: 8px;
  border: 1px solid rgba(51, 65, 85, 0.5);
}

.stat-label {
  font-size: 0.8rem;
  text-transform: uppercase;
  color: #94a3b8;
  font-weight: 600;
  letter-spacing: 0.5px;
}

.stat-value {
  font-size: 1.6rem;
  font-weight: 700;
  color: #f1f5f9;
}

.quick-stat.highlight-sales {
  border-color: rgba(51, 65, 85, 0.5);
}

.quick-stat.highlight-sales .stat-value {
  color: #f1f5f9;
}

.empty-stat {
  opacity: 0.3;
  border-style: dashed !important;
}

/* New Stats Layout V2 */
.quick-stats-v2 {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 16px;
}

.stats-column-main {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.stats-grid-secondary {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.quick-stat.highlight-sales {
  background: rgba(30, 41, 59, 0.7);
  border-color: rgba(59, 130, 246, 0.4);
  box-shadow: 0 4px 15px rgba(59, 130, 246, 0.1);
}

.quick-stat.highlight-sales .stat-value {
  color: #60a5fa;
  font-size: 1.8rem;
}

.quick-stat.sub-stat {
  padding: 8px 12px;
  background: rgba(15, 23, 42, 0.4);
}

.quick-stat.sub-stat .stat-value {
  font-size: 1.2rem;
}

/* Quick Shortcuts - Tema Oscuro */
.quick-shortcuts {
  background: #1e293b;
  border-radius: 20px;
  padding: 28px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
  border: 2px solid #334155;
}

.quick-shortcuts h3 {
  font-size: 1.15rem;
  font-weight: 700;
  color: #f1f5f9;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.quick-shortcuts h3 i {
  color: #3b82f6;
}

.shortcuts-row {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

.shortcut-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 22px;
  background: #0f172a;
  border: 2px solid #334155;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.3s ease;
  font-weight: 600;
  color: #e2e8f0;
}

.shortcut-btn:hover {
  background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
  border-color: #3b82f6;
  color: white;
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(59, 130, 246, 0.4);
}

.shortcut-btn i {
  font-size: 1.2rem;
  color: #3b82f6;
  transition: color 0.3s ease;
}

.shortcut-btn:hover i {
  color: white;
}

/* Responsive - Home Page */
@media (max-width: 1024px) {
  .quick-access-grid {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  }

  .quick-card-primary {
    grid-column: span 1;
  }

  .home-header-content {
    flex-direction: column;
    text-align: center;
  }

  .home-header-actions {
    width: 100%;
    justify-content: center;
  }
}

@media (max-width: 768px) {
  .home-page {
    padding: 16px;
  }

  .home-header h1 {
    font-size: 1.75rem;
  }

  .home-subtitle {
    font-size: 0.95rem;
  }

  .home-date {
    font-size: 0.85rem;
  }

  .home-header-actions {
    flex-direction: column;
    width: 100%;
    gap: 8px;
  }

  .home-action-btn {
    width: 100% !important;
    justify-content: center;
    padding: 12px 20px;
  }

  .quick-access-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .quick-card {
    padding: 20px;
    min-height: 140px;
  }

  .quick-card-icon {
    width: 56px;
    height: 56px;
    font-size: 24px;
  }

  .quick-card-content h3 {
    font-size: 1.1rem;
  }

  .quick-card-content p {
    font-size: 0.85rem;
  }

  .quick-stats {
    grid-template-columns: 1fr;
    gap: 12px;
  }
}

@media (max-width: 480px) {
  .home-page {
    padding: 12px;
  }

  .home-header h1 {
    font-size: 1.5rem;
  }

  .home-header-content {
    gap: 16px;
  }

  .header-action-btn {
    padding: 10px 16px;
    font-size: 0.9rem;
  }

  .header-action-btn span {
    font-size: 0.85rem;
  }

  .quick-card {
    padding: 16px;
    min-height: 120px;
  }

  .quick-card-icon {
    width: 48px;
    height: 48px;
    font-size: 20px;
    margin-bottom: 12px;
  }

  .quick-card-content h3 {
    font-size: 1rem;
  }

  .quick-card-content p {
    font-size: 0.8rem;
  }

  .submenu-item {
    padding: 12px;
    font-size: 0.85rem;
    min-height: 44px;
  }

  .quick-stat {
    padding: 8px;
  }

  .stat-label {
    font-size: 0.7rem;
  }

  .stat-value {
    font-size: 1.3rem;
  }
}

/* ===================================
   V2 PREMIUM UI ENHANCEMENTS
   =================================== */

/* Glassmorphism utility */
.glass-panel {
  background: rgba(30, 41, 59, 0.7);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.05);
  box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.3);
}

/* Page Header Enhancements */
.page-header-lean {
  margin-bottom: var(--spacing-xl);
  padding-bottom: var(--spacing-md);
  border-bottom: 2px solid rgba(255, 255, 255, 0.03);
}

.header-titles h1 {
  font-size: 2.2rem;
  font-weight: 800;
  background: linear-gradient(135deg, #fff 0%, #94a3b8 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 4px;
}

/* Settings Tabs Navigation */
.settings-tabs-container {
  margin-bottom: var(--spacing-lg);
  position: relative;
}

.settings-tabs {
  display: flex;
  gap: 8px;
  background: rgba(15, 23, 42, 0.5);
  padding: 6px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.05);
  overflow-x: auto;
  scrollbar-width: none;
}

.settings-tabs::-webkit-scrollbar {
  display: none;
}

.settings-tab-btn {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 20px;
  background: transparent;
  border: none;
  color: #94a3b8 !important;
  font-weight: 600 !important;
  font-size: 0.9rem !important;
  border-radius: 10px !important;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  white-space: nowrap;
}

.settings-tab-btn i {
  font-size: 1.1rem;
  transition: transform 0.3s ease;
}

.settings-tab-btn:hover {
  color: white !important;
  background: rgba(255, 255, 255, 0.05) !important;
}

.settings-tab-btn:hover i {
  transform: translateY(-2px);
}

.settings-tab-btn.active {
  color: white !important;
  background: var(--primary-color) !important;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3) !important;
}

/* Premium Forms & Inputs */
.form-group-lean label,
.form-group label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: #94a3b8;
  margin-bottom: 8px;
  padding-left: 2px;
}

.input-lean,
.form-input,
select.form-input,
select {
  width: 100%;
  background: rgba(15, 23, 42, 0.6) !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  color: white !important;
  padding: 12px 16px !important;
  border-radius: 12px !important;
  font-size: 0.95rem !important;
  transition: all 0.3s ease !important;
  outline: none !important;
}

.input-lean:focus,
.form-input:focus,
select:focus {
  background: rgba(15, 23, 42, 0.8) !important;
  border-color: var(--primary-light) !important;
  box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.15) !important;
}

/* Premium Buttons */
.btn-primary-lean,
.btn-primary {
  background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%) !important;
  color: white !important;
  font-weight: 600 !important;
  border: none !important;
  padding: 12px 24px !important;
  border-radius: 12px !important;
  cursor: pointer !important;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 8px !important;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.2) !important;
}

.btn-primary-lean:hover,
.btn-primary:hover {
  transform: translateY(-2px) !important;
  box-shadow: 0 8px 20px rgba(37, 99, 235, 0.4) !important;
  filter: brightness(1.1) !important;
}

.btn-primary-lean:active,
.btn-primary:active {
  transform: translateY(0) !important;
}

/* Tables Redesign */
.table-container-lean,
.table-container {
  background: rgba(15, 23, 42, 0.3);
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.05);
  margin-bottom: var(--spacing-lg);
}

table {
  width: 100%;
  border-collapse: collapse;
}

th {
  background: rgba(30, 41, 59, 0.5) !important;
  color: #94a3b8 !important;
  font-weight: 600 !important;
  font-size: 0.75rem !important;
  text-transform: uppercase !important;
  letter-spacing: 0.05em !important;
  padding: 16px 20px !important;
  text-align: left !important;
  border-bottom: 2px solid rgba(255, 255, 255, 0.05) !important;
}

td {
  padding: 16px 20px !important;
  color: #cbd5e1 !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.03) !important;
  font-size: 0.95rem !important;
}

tr:last-child td {
  border-bottom: none !important;
}

tr:hover td {
  background: rgba(255, 255, 255, 0.02) !important;
}

/* Action Buttons in tables */
.btn-icon-lean,
.btn-sm.btn-primary,
.btn-sm.btn-danger,
.btn-sm.btn-info,
.btn-sm.btn-success {
  padding: 8px 12px !important;
  border-radius: 10px !important;
  font-size: 0.85rem !important;
  cursor: pointer !important;
  transition: all 0.2s ease !important;
  border: none !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 4px !important;
}

.btn-icon-lean:hover,
.btn-sm:hover {
  transform: scale(1.05) translateY(-1px) !important;
}

/* Cards V2 */
.card-lean,
.card {
  background: rgba(30, 41, 59, 0.4) !important;
  border-radius: 20px !important;
  border: 1px solid rgba(255, 255, 255, 0.06) !important;
  backdrop-filter: blur(10px) !important;
  -webkit-backdrop-filter: blur(10px) !important;
  overflow: hidden !important;
  margin-bottom: var(--spacing-lg);
}

.card-header-lean,
.card-header {
  padding: 20px 24px !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05) !important;
  background: rgba(255, 255, 255, 0.01) !important;
}

.card-title {
  font-size: 1.25rem !important;
  font-weight: 700 !important;
  color: white !important;
  margin: 0 !important;
}

.card-body-lean,
.card-body {
  padding: 24px !important;
}

/* Filter Section Styling */
.filter-bar-premium {
  display: flex !important;
  gap: 16px !important;
  padding: 24px !important;
  background: rgba(30, 41, 59, 0.2) !important;
  border-radius: 20px !important;
  border: 1px solid rgba(255, 255, 255, 0.05) !important;
  margin-bottom: 24px !important;
}

/* Empty State Styling */
.empty-state-lean,
.empty-state {
  padding: 48px 24px !important;
  text-align: center !important;
}

.empty-state i,
.empty-state-icon {
  font-size: 3rem !important;
  color: #475569 !important;
  margin-bottom: 16px !important;
  display: block !important;
}

/* Specific Tab Fixes */
.user-details-lean .detail-row {
  display: flex !important;
  justify-content: space-between !important;
  padding: 12px 0 !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05) !important;
}

.user-details-lean .detail-row:last-child {
  border-bottom: none !important;
}

.user-details-lean span:first-child {
  color: var(--text-muted) !important;
  font-weight: 500 !important;
}

.badge-role {
  background: rgba(59, 130, 246, 0.2) !important;
  color: #60a5fa !important;
  padding: 4px 12px !important;
  border-radius: 20px !important;
  font-size: 0.75rem !important;
  font-weight: 700 !important;
  text-transform: uppercase !important;
}

/* Skeleton Loading Premium */
.skeleton-loader {
  background: linear-gradient(90deg,
      rgba(255, 255, 255, 0.02) 25%,
      rgba(255, 255, 255, 0.05) 50%,
      rgba(255, 255, 255, 0.02) 75%) !important;
  background-size: 200% 100% !important;
  animation: skel-loading 1.5s infinite !important;
  border-radius: 12px !important;
}

@keyframes skel-loading {
  0% {
    background-position: 200% 0;
  }

  100% {
    background-position: -200% 0;
  }
}

/* Mobile Fixes */
@media (max-width: 768px) {
  .settings-tabs {
    padding-bottom: 12px;
  }

  .btn-primary-lean,
  .btn-primary {
    width: 100% !important;
    justify-content: center !important;
  }
}