/* ========================================
   ADMIN PANEL STYLES
   Estilos para el panel de administración
   ======================================== */

.admin-body {
  background: #0a0a0a;
  min-height: 100vh;
}

/* Login Screen */
.login-screen {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  background: #000000;
  position: relative;
}

.btn-visit-store-top {
  position: absolute;
  top: 24px;
  left: 24px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 20px;
  background: #ffffff;
  color: #000000;
  color: #000000;
  text-decoration: none;
  border-radius: 12px;
  font-size: 1rem;
  font-weight: 700;
  transition: all 0.3s ease;
  border: 2px solid rgba(0, 0, 0, 0.1);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  z-index: 100;
}

.btn-visit-store-top:hover {
  background: #f5f5f5;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.store-logo-animated {
  display: flex;
  align-items: center;
  justify-content: center;
}

.tridot-dots-small {
  display: flex;
  gap: 3px;
}

.tridot-dots-small .tridot-dot {
  width: 6px;
  height: 6px;
  background: #000000;
  border-radius: 50%;
}

@keyframes dotBounce {
  0%, 80%, 100% {
    transform: scale(1);
    opacity: 1;
  }
  40% {
    transform: scale(1.3);
    opacity: 0.7;
  }
}

.login-container {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid #1a1a1a;
  border-radius: 16px;
  padding: 48px;
  max-width: 400px;
  width: 100%;
  text-align: center;
}

.login-header {
  margin-bottom: 32px;
}

.login-header .tridot-dots {
  display: flex;
  gap: 6px;
  justify-content: center;
  margin-bottom: 16px;
}

.login-header h1 {
  font-size: 2rem;
  margin: 16px 0 8px;
  color: #ffffff;
}

.login-header p {
  color: #9b9b9b;
}

.login-form .form-group {
  margin-bottom: 20px;
  text-align: left;
}

.login-form label {
  display: block;
  color: #ffffff;
  margin-bottom: 8px;
  font-weight: 600;
}

.login-form input {
  width: 100%;
  padding: 12px 16px;
  background: #0a0a0a;
  border: 1px solid #1a1a1a;
  border-radius: 8px;
  color: #ffffff;
  font-size: 14px;
}

.login-form input:focus {
  outline: none;
  border-color: #ffffff;
}

.login-hint {
  margin-top: 16px;
  font-size: 13px;
  color: #666666;
  display: none !important;
}

/* Admin Dashboard Layout */
.admin-dashboard {
  display: flex;
  min-height: 100vh;
}

/* Sidebar */
.admin-sidebar {
  width: 260px;
  background: #000000;
  border-right: 1px solid #1a1a1a;
  display: flex;
  flex-direction: column;
  position: fixed;
  height: 100vh;
  left: 0;
  top: 0;
}

.sidebar-header {
  padding: 32px 24px;
  border-bottom: 1px solid #1a1a1a;
  text-align: center;
}

.logo-with-dots {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-bottom: 8px;
}

.logo-with-dots h2 {
  margin: 0;
}

.sidebar-header .tridot-dots {
  display: flex;
  gap: 6px;
  justify-content: center;
  margin-bottom: 12px;
}

.sidebar-header h2 {
  font-size: 1.5rem;
  margin: 0;
  color: #ffffff;
}

.btn-visit-store {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 16px;
  padding: 10px 16px;
  background: linear-gradient(135deg, #ffffff 0%, #e0e0e0 100%);
  color: #000000;
  text-decoration: none;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 600;
  transition: all 0.3s ease;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.btn-visit-store:hover {
  background: linear-gradient(135deg, #e0e0e0 0%, #ffffff 100%);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(255, 255, 255, 0.2);
}

.store-icon {
  font-size: 16px;
}

.sidebar-nav {
  flex: 1;
  padding: 16px 0;
  overflow-y: auto;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 24px;
  color: #9b9b9b;
  text-decoration: none;
  transition: all 0.3s ease;
  border-left: 3px solid transparent;
}

.nav-item:hover {
  background: rgba(255, 255, 255, 0.05);
  color: #ffffff;
}

.nav-item.active {
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
  border-left-color: #ffffff;
}

.nav-icon {
  font-size: 20px;
}

.sidebar-footer {
  padding: 16px;
  border-top: 1px solid #1a1a1a;
}

/* Main Content */
.admin-main {
  margin-left: 260px;
  flex: 1;
  padding: 0;
  background: #0a0a0a;
}

.admin-header {
  background: #000000;
  border-bottom: 1px solid #1a1a1a;
  padding: 20px 32px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: sticky;
  top: 0;
  z-index: 100;
}

.admin-header h1 {
  font-size: 1.75rem;
  margin: 0;
  color: #ffffff;
}

.admin-user {
  color: #9b9b9b;
  font-size: 14px;
}

/* Admin Sections */
.admin-section {
  display: none;
  padding: 32px;
  animation: fadeIn 0.3s ease;
}

.admin-section.active {
  display: block;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

.stat-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid #1a1a1a;
  border-radius: 12px;
  padding: 24px;
  display: flex;
  gap: 16px;
  align-items: center;
  transition: all 0.3s ease;
}

.stat-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(255, 255, 255, 0.08);
  border-color: #333333;
}

.stat-icon {
  font-size: 40px;
}

.stat-info {
  flex: 1;
}

.stat-info h3 {
  font-size: 14px;
  color: #9b9b9b;
  margin: 0 0 8px 0;
  font-weight: 500;
  text-transform: uppercase;
}

.stat-value {
  font-size: 2rem;
  color: #ffffff;
  font-weight: 700;
  margin: 0;
}

.stat-change {
  font-size: 13px;
  color: #666666;
}

.stat-change.positive {
  color: #4ade80;
}

.stat-change.negative {
  color: #ef4444;
}

/* Charts */
.charts-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
  gap: 24px;
  margin-bottom: 32px;
}

.chart-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid #1a1a1a;
  border-radius: 12px;
  padding: 24px;
}

.chart-card.full-width {
  grid-column: 1 / -1;
}

.chart-card h3 {
  margin: 0 0 20px 0;
  color: #ffffff;
  font-size: 1.1rem;
}

.chart-wrapper {
  position: relative;
  height: 250px;
  width: 100%;
}

.chart-wrapper canvas {
  max-height: 100%;
}

/* Tables */
.admin-table {
  width: 100%;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid #1a1a1a;
  border-radius: 12px;
  border-collapse: collapse;
  overflow: hidden;
}

.admin-table thead {
  background: rgba(255, 255, 255, 0.05);
}

.admin-table th {
  padding: 16px;
  text-align: left;
  color: #ffffff;
  font-weight: 600;
  font-size: 13px;
  text-transform: uppercase;
  border-bottom: 1px solid #1a1a1a;
}

.admin-table td {
  padding: 16px;
  color: #9b9b9b;
  border-bottom: 1px solid #1a1a1a;
}

.admin-table tbody tr:hover {
  background: rgba(255, 255, 255, 0.05);
}

.admin-table tbody tr:last-child td {
  border-bottom: none;
}

.status-badge {
  padding: 4px 12px;
  border-radius: 16px;
  font-size: 12px;
  font-weight: 600;
}

.status-pending {
  background: rgba(251, 191, 36, 0.2);
  color: #fbbf24;
}

.status-processing {
  background: rgba(59, 130, 246, 0.2);
  color: #3b82f6;
}

.status-shipped {
  background: rgba(139, 92, 246, 0.2);
  color: #8b5cf6;
}

.status-delivered {
  background: rgba(34, 197, 94, 0.2);
  color: #22c55e;
}

/* Recent Orders */
.recent-orders {
  margin-top: 32px;
}

.recent-orders h3 {
  margin-bottom: 16px;
  color: #ffffff;
  font-size: 1.3rem;
}

/* Section Header */
.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
}

.section-header h2 {
  margin: 0;
  color: #ffffff;
  font-size: 1.5rem;
}

/* Products Grid Admin */
.products-grid,
.products-grid-admin {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 24px;
}

.product-card-admin,
.admin-product-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid #1a1a1a;
  border-radius: 12px;
  padding: 20px;
  transition: all 0.3s ease;
}

.product-card-admin:hover,
.admin-product-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(255, 255, 255, 0.08);
  border-color: #3a3a3a;
}

.product-card-admin img,
.admin-product-card img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: 16px;
}

.product-header {
  margin-bottom: 12px;
}

.product-card-admin h3,
.admin-product-card h4 {
  color: #ffffff;
  margin: 0 0 12px 0;
  font-size: 1.1rem;
  font-weight: 600;
}

.product-card-admin .price {
  color: #3b82f6;
  font-size: 1.5rem;
  font-weight: 700;
  margin: 12px 0;
}

.product-card-admin .description {
  color: #9b9b9b;
  font-size: 14px;
  margin: 12px 0;
  line-height: 1.5;
}

.product-badges {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 8px;
}

.badge-status,
.badge-stock {
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.badge-available {
  background: rgba(34, 197, 94, 0.2);
  color: #22c55e;
  border: 1px solid rgba(34, 197, 94, 0.3);
}

.badge-unavailable {
  background: rgba(239, 68, 68, 0.2);
  color: #ef4444;
  border: 1px solid rgba(239, 68, 68, 0.3);
}

.badge-stock {
  background: rgba(59, 130, 246, 0.2);
  color: #3b82f6;
  border: 1px solid rgba(59, 130, 246, 0.3);
}

.badge-low-stock {
  background: rgba(251, 191, 36, 0.2);
  color: #fbbf24;
  border: 1px solid rgba(251, 191, 36, 0.3);
  animation: pulse-warning 2s ease-in-out infinite;
}

@keyframes pulse-warning {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.7;
  }
}

/* Enhanced Product Card Styles */
.product-admin-image-wrapper {
    position: relative;
    width: 100%;
    height: 200px;
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 15px;
}

.product-admin-image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.product-admin-tags {
    position: absolute;
    top: 10px;
    right: 10px;
    display: flex;
    gap: 5px;
    flex-direction: column;
}

.product-admin-tags span {
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    padding: 5px 8px;
    border-radius: 8px;
    font-size: 16px;
}

.tag-nuevo { border: 1px solid #22C55E; }
.tag-oferta { border: 1px solid #EF4444; }
.tag-popular { border: 1px solid #FBBF24; }
.tag-limitado { border: 1px solid #EC4899; }
.tag-envioGratis { border: 1px solid #3B82F6; }

.product-category {
    display: inline-block;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
    margin-bottom: 10px;
}

.price-with-discount {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.price-old {
    color: #999;
    text-decoration: line-through;
    font-size: 16px;
}

.discount-badge {
    background: linear-gradient(135deg, #EF4444 0%, #DC2626 100%);
    color: white;
    padding: 4px 8px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: bold;
}

.product-colors-mini {
    display: flex;
    gap: 6px;
    align-items: center;
    margin: 12px 0;
}

.color-dot {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.color-more {
    font-size: 12px;
    color: #999;
    margin-left: 4px;
}

.product-admin-actions {
    display: flex;
    gap: 10px;
    margin-top: 15px;
}

.btn-view {
    flex: 1;
    padding: 10px;
    background: linear-gradient(135deg, #3B82F6 0%, #2563EB 100%);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn-view:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(59, 130, 246, 0.4);
}

.btn-edit {
    flex: 1;
    padding: 10px;
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.btn-edit:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(245, 158, 11, 0.4);
}

/* Product Detail Admin Modal */
.product-detail-admin-modal {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    border-radius: 24px;
    max-width: 1400px;
    max-height: 90vh;
    width: 95%;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.product-detail-content {
    overflow-y: auto;
    padding: 30px;
    max-height: calc(90vh - 80px);
}

.product-detail-content::-webkit-scrollbar {
    width: 8px;
}

.product-detail-content::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 4px;
}

.product-detail-content::-webkit-scrollbar-thumb {
    background: rgba(59, 130, 246, 0.5);
    border-radius: 4px;
}

.detail-section {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 24px;
    margin-bottom: 20px;
}

.detail-section h3 {
    color: #3B82F6;
    margin-bottom: 20px;
    font-size: 20px;
    font-weight: 600;
}

.detail-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px;
}

.detail-item {
    padding: 10px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 8px;
}

.detail-item.full-width {
    grid-column: 1 / -1;
}

.detail-item strong {
    color: #3B82F6;
    display: block;
    margin-bottom: 5px;
}

.detail-images {
    display: grid;
    gap: 15px;
}

.main-image {
    width: 100%;
    max-height: 400px;
    object-fit: contain;
    border-radius: 12px;
    background: rgba(0, 0, 0, 0.3);
}

.additional-images {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 10px;
}

.additional-images img {
    width: 100%;
    height: 150px;
    object-fit: cover;
    border-radius: 8px;
}

.colors-display {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.color-display-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.color-box-large {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.sizes-display {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.size-badge {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 8px 16px;
    border-radius: 8px;
    font-weight: 600;
}

.tags-display {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.tag-badge {
    padding: 8px 16px;
    border-radius: 20px;
    font-weight: 500;
    color: white;
}

.tag-badge.tag-nuevo {
    background: linear-gradient(135deg, #22C55E 0%, #16A34A 100%);
}

.tag-badge.tag-oferta {
    background: linear-gradient(135deg, #EF4444 0%, #DC2626 100%);
}

.tag-badge.tag-popular {
    background: linear-gradient(135deg, #FBBF24 0%, #F59E0B 100%);
}

.tag-badge.tag-limitado {
    background: linear-gradient(135deg, #EC4899 0%, #DB2777 100%);
}

.tag-badge.tag-envioGratis {
    background: linear-gradient(135deg, #3B82F6 0%, #2563EB 100%);
}

.features-list {
    list-style: none;
    padding: 0;
}

.features-list li {
    padding: 10px;
    background: rgba(255, 255, 255, 0.03);
    border-left: 3px solid #3B82F6;
    margin-bottom: 8px;
    border-radius: 4px;
}

.features-list li:before {
    content: "✓ ";
    color: #22C55E;
    font-weight: bold;
    margin-right: 8px;
}

.admin-product-card p {
  color: #9b9b9b;
  font-size: 14px;
  margin: 4px 0;
}

.product-actions {
  display: flex;
  gap: 8px;
  margin-top: 12px;
}

.btn-small {
  padding: 6px 12px;
  font-size: 13px;
  border-radius: 6px;
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
}

.btn-edit {
  background: rgba(59, 130, 246, 0.2);
  color: #3b82f6;
}

.btn-delete {
  background: rgba(239, 68, 68, 0.2);
  color: #ef4444;
}

/* Filters */
.filters {
  margin-bottom: 24px;
}

.filter-select {
  padding: 10px 16px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid #1a1a1a;
  border-radius: 8px;
  color: #ffffff;
  font-size: 14px;
  min-width: 200px;
}

/* Analytics */
.analytics-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
  gap: 24px;
}

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

.visitor-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid #1a1a1a;
  border-radius: 12px;
  padding: 24px;
  text-align: center;
}

.visitor-card h3 {
  color: #9b9b9b;
  font-size: 14px;
  margin: 0 0 12px 0;
  text-transform: uppercase;
}

.big-number {
  font-size: 3rem;
  color: #ffffff;
  font-weight: 700;
  margin: 0;
}

.activity-log {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid #1a1a1a;
  border-radius: 12px;
  padding: 24px;
}

.activity-log h3 {
  margin: 0 0 16px 0;
  color: #ffffff;
}

.activity-item {
  padding: 12px 0;
  border-bottom: 1px solid #1a1a1a;
  color: #9b9b9b;
  font-size: 14px;
}

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

/* Settings */
.settings-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
  gap: 24px;
}

.settings-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid #1a1a1a;
  border-radius: 12px;
  padding: 24px;
}

/* ========================================
   MODERN BUTTON STYLES
   ======================================== */

/* Primary Button */
.btn-primary,
button[type="submit"] {
  background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
  color: #ffffff;
  border: none;
  border-radius: 10px;
  padding: 14px 32px;
  font-weight: 600;
  font-size: 15px;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
  box-shadow: 0 4px 14px rgba(59, 130, 246, 0.25);
}

.btn-primary::before,
button[type="submit"]::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: left 0.5s ease;
}

.btn-primary:hover::before,
button[type="submit"]:hover::before {
  left: 100%;
}

.btn-primary:hover,
button[type="submit"]:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(59, 130, 246, 0.4);
}

.btn-primary:active,
button[type="submit"]:active {
  transform: translateY(0);
}

/* Full Width Button */
.btn-full {
  width: 100%;
}

/* Secondary Button */
.btn-secondary {
  background: rgba(255, 255, 255, 0.05);
  color: #ffffff;
  border: 1px solid #3a3a3a;
  border-radius: 10px;
  padding: 14px 32px;
  font-weight: 600;
  font-size: 15px;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: #ffffff;
  transform: translateY(-2px);
  box-shadow: 0 4px 14px rgba(255, 255, 255, 0.1);
}

/* Danger Button */
.btn-danger {
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
  color: #ffffff;
  border: none;
  border-radius: 8px;
  padding: 10px 20px;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 2px 8px rgba(239, 68, 68, 0.3);
}

.btn-danger:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 14px rgba(239, 68, 68, 0.5);
}

/* View Button */
.btn-view {
  background: rgba(59, 130, 246, 0.1);
  color: #3b82f6;
  border: 1px solid rgba(59, 130, 246, 0.3);
  border-radius: 8px;
  padding: 8px 16px;
  font-weight: 600;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-view:hover {
  background: rgba(59, 130, 246, 0.2);
  border-color: #3b82f6;
  transform: translateY(-2px);
  box-shadow: 0 2px 8px rgba(59, 130, 246, 0.3);
}

/* Success Button */
.btn-success {
  background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
  color: #ffffff;
  border: none;
  border-radius: 10px;
  padding: 14px 32px;
  font-weight: 600;
  font-size: 15px;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 4px 14px rgba(34, 197, 94, 0.25);
}

.btn-success:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(34, 197, 94, 0.4);
}

/* Icon Buttons */
.btn-icon {
  background: rgba(255, 255, 255, 0.05);
  color: #ffffff;
  border: 1px solid #3a3a3a;
  border-radius: 8px;
  width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-icon:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: #ffffff;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(255, 255, 255, 0.15);
}

/* Button Group */
.btn-group {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

/* Loading State */
.btn-loading {
  pointer-events: none;
  opacity: 0.7;
  position: relative;
}

.btn-loading::after {
  content: '';
  position: absolute;
  width: 16px;
  height: 16px;
  border: 2px solid #ffffff;
  border-top-color: transparent;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Disabled State */
button:disabled,
.btn-disabled {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
}

.settings-card h3 {
  margin: 0 0 20px 0;
  color: #ffffff;
}

.form-control {
  width: 100%;
  padding: 10px 14px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid #1a1a1a;
  border-radius: 8px;
  color: #ffffff;
  font-size: 14px;
}

.toggle-group {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.toggle-label {
  display: flex;
  align-items: center;
  gap: 12px;
  color: #ffffff;
  cursor: pointer;
}

.toggle-label input[type="checkbox"] {
  width: 20px;
  height: 20px;
}

/* Modal */
.modal {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.8);
  z-index: 1000;
  align-items: center;
  justify-content: center;
}

.modal.active {
  display: flex;
}

.modal-content {
  background: #0a0a0a;
  border: 1px solid #1a1a1a;
  border-radius: 16px;
  max-width: 600px;
  width: 90%;
  max-height: 90vh;
  overflow-y: auto;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 24px;
  border-bottom: 1px solid #1a1a1a;
}

.modal-header h2 {
  margin: 0;
  color: #ffffff;
  font-size: 1.5rem;
}

.modal-close {
  background: none;
  border: none;
  color: #9b9b9b;
  font-size: 28px;
  cursor: pointer;
  padding: 0;
  width: 32px;
  height: 32px;
}

.modal-close:hover {
  color: #ffffff;
}

.modal-content form {
  padding: 24px;
}

.modal-content form input,
.modal-content form textarea,
.modal-content form select {
  width: 100%;
  padding: 12px 16px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid #3a3a3a;
  border-radius: 8px;
  color: #ffffff;
  font-size: 14px;
  margin-bottom: 16px;
  transition: all 0.3s ease;
}

/* ========================================
   TOGGLE SWITCH - ASISTENTE IA
   ======================================== */

.toggle-switch {
  position: relative;
  display: inline-block;
  width: 60px;
  height: 34px;
}

.toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.toggle-slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(255, 255, 255, 0.2);
  transition: 0.4s;
  border-radius: 34px;
}

.toggle-slider:before {
  position: absolute;
  content: "";
  height: 26px;
  width: 26px;
  left: 4px;
  bottom: 4px;
  background-color: white;
  transition: 0.4s;
  border-radius: 50%;
}

.toggle-switch input:checked + .toggle-slider {
  background-color: #22c55e;
}

.toggle-switch input:checked + .toggle-slider:before {
  transform: translateX(26px);
}

/* AI Loader Animation */
@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.ai-loader {
  animation: spin 1s linear infinite;
}

/* AI Image Upload Zone Hover */
.image-upload-zone:hover {
  background: rgba(102, 126, 234, 0.1) !important;
  border-color: rgba(102, 126, 234, 0.5) !important;
}

.modal-content form input:focus,
.modal-content form textarea:focus,
.modal-content form select:focus {
  outline: none;
  border-color: #3b82f6;
  background: rgba(255, 255, 255, 0.08);
}

.modal-content form textarea {
  min-height: 100px;
  resize: vertical;
  font-family: inherit;
}

.modal-large {
  max-width: 1400px;
  max-height: 95vh;
}

.form-sections {
  display: grid;
  gap: 24px;
  max-height: 70vh;
  overflow-y: auto;
  padding: 24px;
  padding-right: 16px;
}

.form-sections::-webkit-scrollbar {
  width: 8px;
}

.form-sections::-webkit-scrollbar-track {
  background: #0a0a0a;
}

.form-sections::-webkit-scrollbar-thumb {
  background: #3a3a3a;
  border-radius: 4px;
}

.form-section {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid #1a1a1a;
  border-radius: 12px;
  padding: 24px;
}

.form-section h3 {
  color: #ffffff;
  font-size: 1.1rem;
  margin: 0 0 20px 0;
  padding-bottom: 12px;
  border-bottom: 1px solid #1a1a1a;
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  color: #ffffff;
  font-weight: 600;
  margin-bottom: 8px;
  font-size: 14px;
}

.form-group small {
  display: block;
  color: #666666;
  font-size: 12px;
  margin-top: 4px;
}

.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 12px 16px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid #3a3a3a;
  border-radius: 8px;
  color: #ffffff;
  font-size: 14px;
  transition: all 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  outline: none;
  border-color: #3b82f6;
  background: rgba(255, 255, 255, 0.08);
}

#additionalImagesContainer {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 12px;
}

.btn-small {
  padding: 8px 16px;
  font-size: 13px;
}

/* Color Selector */
.color-selector-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 12px;
}

.color-option {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid #3a3a3a;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.color-option:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: #3b82f6;
}

.color-option input[type="checkbox"] {
  width: 18px;
  height: 18px;
  margin: 0;
  cursor: pointer;
  accent-color: #3b82f6;
}

.color-box {
  width: 30px;
  height: 30px;
  border-radius: 6px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.color-option span:last-child {
  color: #ffffff;
  font-size: 13px;
  font-weight: 500;
}

/* Sizes Selector */
.sizes-selector {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.size-option {
  position: relative;
  cursor: pointer;
}

.size-option input[type="checkbox"] {
  position: absolute;
  opacity: 0;
}

.size-option span {
  display: inline-block;
  padding: 10px 20px;
  background: rgba(255, 255, 255, 0.05);
  border: 2px solid #3a3a3a;
  border-radius: 8px;
  color: #ffffff;
  font-weight: 600;
  font-size: 14px;
  transition: all 0.3s ease;
}

.size-option input[type="checkbox"]:checked + span {
  background: rgba(59, 130, 246, 0.2);
  border-color: #3b82f6;
  color: #3b82f6;
}

.size-option:hover span {
  border-color: #3b82f6;
  background: rgba(255, 255, 255, 0.08);
}

/* Tags Selector */
.tags-selector {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.tag-option {
  position: relative;
  cursor: pointer;
}

.tag-option input[type="checkbox"] {
  position: absolute;
  opacity: 0;
}

.tag-option span {
  display: inline-block;
  padding: 8px 16px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid #3a3a3a;
  border-radius: 20px;
  color: #9b9b9b;
  font-size: 13px;
  font-weight: 500;
  transition: all 0.3s ease;
}

.tag-option input[type="checkbox"]:checked + span {
  background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
  border-color: #3b82f6;
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(59, 130, 246, 0.4);
}

.tag-option:hover span {
  border-color: #3b82f6;
  background: rgba(255, 255, 255, 0.08);
}

.form-group-inline {
  margin-bottom: 16px;
}

.checkbox-label {
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  color: #ffffff;
  font-size: 14px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid #3a3a3a;
  border-radius: 8px;
  transition: all 0.3s ease;
}

.checkbox-label:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: #3b82f6;
}

.checkbox-label input[type="checkbox"] {
  width: 20px;
  height: 20px;
  margin: 0;
  cursor: pointer;
  accent-color: #3b82f6;
}

.checkbox-label span {
  flex: 1;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.modal-actions {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  margin-top: 24px;
}

/* Responsive */
@media screen and (max-width: 1024px) {
  .admin-sidebar {
    transform: translateX(-100%);
    transition: transform 0.3s ease;
  }
  
  .admin-sidebar.mobile-open {
    transform: translateX(0);
  }
  
  .admin-main {
    margin-left: 0;
  }
  
  .stats-cards,
  .charts-container,
  .analytics-container {
    grid-template-columns: 1fr;
  }
}

/* Category Specific Fields */
#categorySpecificFields {
  animation: fadeInDown 0.3s ease;
}

#categorySpecificFields h3 {
  color: #3B82F6;
  margin-bottom: 20px;
  font-size: 18px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
}

#categoryFieldsContainer .form-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
}

#categoryFieldsContainer .form-group {
  margin-bottom: 0;
}

#categoryFieldsContainer input,
#categoryFieldsContainer select {
  background: rgba(59, 130, 246, 0.05);
  border: 1px solid rgba(59, 130, 246, 0.2);
}

#categoryFieldsContainer input:focus,
#categoryFieldsContainer select:focus {
  background: rgba(59, 130, 246, 0.1);
  border-color: rgba(59, 130, 246, 0.5);
}

/* Image Upload System */
.image-upload-section {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 20px;
}

/* Video Upload System */
.video-upload-section {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 20px;
  margin-top: 20px;
}

.video-upload-section h4 {
  color: #3B82F6;
  margin-bottom: 15px;
  font-size: 16px;
  font-weight: 600;
}

.tab-btn-video {
  padding: 12px 24px;
  background: transparent;
  border: none;
  color: #999;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  transition: all 0.3s ease;
  border-bottom: 3px solid transparent;
  margin-bottom: -2px;
}

.tab-btn-video:hover {
  color: #fff;
}

.tab-btn-video.active {
  color: #EC4899;
  border-bottom-color: #EC4899;
}

.video-drop-zone {
  position: relative;
  border: 2px dashed rgba(236, 72, 153, 0.3);
  border-radius: 12px;
  padding: 40px 20px;
  text-align: center;
  background: rgba(236, 72, 153, 0.05);
  transition: all 0.3s ease;
  cursor: pointer;
}

.video-drop-zone:hover {
  border-color: rgba(236, 72, 153, 0.6);
  background: rgba(236, 72, 153, 0.1);
}

.video-drop-zone.dragover {
  border-color: #EC4899;
  background: rgba(236, 72, 153, 0.2);
  transform: scale(1.02);
}

.video-preview {
  position: relative;
  background: rgba(0, 0, 0, 0.3);
  border-radius: 8px;
  padding: 10px;
}

.video-preview video {
  width: 100%;
  max-height: 400px;
  border-radius: 8px;
  background: #000;
}

.video-info {
  margin-top: 10px;
  text-align: center;
}

.video-name {
  color: #EC4899;
  font-size: 14px;
  font-weight: 500;
  margin-bottom: 4px;
}

.video-size {
  color: #999;
  font-size: 12px;
}

.upload-tabs {
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
  border-bottom: 2px solid rgba(255, 255, 255, 0.1);
}

.tab-btn {
  padding: 12px 24px;
  background: transparent;
  border: none;
  color: #999;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  transition: all 0.3s ease;
  border-bottom: 3px solid transparent;
  margin-bottom: -2px;
}

.tab-btn:hover {
  color: #fff;
}

.tab-btn.active {
  color: #3B82F6;
  border-bottom-color: #3B82F6;
}

.upload-mode {
  display: none;
}

.upload-mode.active {
  display: block;
  animation: fadeIn 0.3s ease;
}

.image-drop-zone {
  position: relative;
  border: 2px dashed rgba(59, 130, 246, 0.3);
  border-radius: 12px;
  padding: 40px 20px;
  text-align: center;
  background: rgba(59, 130, 246, 0.05);
  transition: all 0.3s ease;
  cursor: pointer;
}

.image-drop-zone:hover {
  border-color: rgba(59, 130, 246, 0.6);
  background: rgba(59, 130, 246, 0.1);
}

.image-drop-zone.dragover {
  border-color: #3B82F6;
  background: rgba(59, 130, 246, 0.2);
  transform: scale(1.02);
}

.drop-zone-content {
  pointer-events: none;
}

.upload-icon {
  font-size: 48px;
  margin-bottom: 12px;
}

.drop-text {
  color: #fff;
  font-size: 16px;
  font-weight: 500;
  margin: 8px 0;
}

.drop-subtext {
  color: #999;
  font-size: 14px;
  margin: 8px 0;
}

.btn-browse {
  padding: 10px 24px;
  background: linear-gradient(135deg, #3B82F6 0%, #2563EB 100%);
  color: white;
  border: none;
  border-radius: 8px;
  font-weight: 500;
  cursor: pointer;
  margin: 12px 0;
  transition: all 0.3s ease;
  pointer-events: auto;
}

.btn-browse:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 20px rgba(59, 130, 246, 0.4);
}

.image-preview {
  position: relative;
  background: rgba(0, 0, 0, 0.3);
  border-radius: 8px;
  padding: 10px;
}

.image-preview img {
  max-width: 100%;
  max-height: 300px;
  border-radius: 8px;
  object-fit: contain;
}

.btn-remove-image {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 32px;
  height: 32px;
  background: rgba(239, 68, 68, 0.9);
  color: white;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  font-size: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  z-index: 10;
}

.btn-remove-image:hover {
  background: #EF4444;
  transform: scale(1.1);
}

.image-name {
  color: #3B82F6;
  font-size: 13px;
  margin-top: 8px;
  font-weight: 500;
}

.additional-images-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 15px;
  margin-top: 15px;
}

.additional-image-item {
  position: relative;
  background: rgba(0, 0, 0, 0.3);
  border-radius: 8px;
  padding: 8px;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.additional-image-item img {
  width: 100%;
  height: 120px;
  object-fit: cover;
  border-radius: 6px;
}

.additional-image-item .btn-remove-image {
  top: 12px;
  right: 12px;
  width: 24px;
  height: 24px;
  font-size: 14px;
}

.additional-image-item .image-name {
  font-size: 11px;
  margin-top: 6px;
  text-align: center;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

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

@media screen and (max-width: 768px) {
  .admin-header {
    padding: 16px;
  }
  
  .admin-section {
    padding: 16px;
  }
  
  .login-container {
    padding: 32px 24px;
  }
  
  #categoryFieldsContainer .form-row {
    grid-template-columns: 1fr;
  }
  
  .upload-tabs {
    flex-direction: column;
    gap: 5px;
  }
  
  .tab-btn {
    width: 100%;
    text-align: center;
  }
  
  .image-drop-zone {
    padding: 30px 15px;
  }
  
  .upload-icon {
    font-size: 36px;
  }
  
  .drop-text {
    font-size: 14px;
  }
  
  .additional-images-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .video-drop-zone {
    padding: 30px 15px;
  }
  
  .video-preview video {
    max-height: 250px;
  }
}

/* ========================================
   OCR Y PROCESAMIENTO DE IMÁGENES
   ======================================== */

.image-upload-container {
  transition: all 0.3s ease;
}

.image-upload-container:hover {
  border-color: rgba(59, 130, 246, 0.5);
  background: rgba(59, 130, 246, 0.08);
}

#imagePreviewContainer {
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

#imagePreview {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  transition: transform 0.3s ease;
}

#imagePreview:hover {
  transform: scale(1.02);
}

.formatted-description {
  animation: highlight 0.5s ease;
}

@keyframes highlight {
  0% {
    background: rgba(34, 197, 94, 0.3);
    transform: scale(1.02);
  }
  100% {
    background: rgba(34, 197, 94, 0.1);
    transform: scale(1);
  }
}

#ocrProgress {
  animation: fadeIn 0.3s ease;
}

#ocrProgress p {
  font-weight: 600;
  font-size: 14px;
}

/* Estilo para textarea cuando tiene contenido formateado */
textarea.formatted-description {
  background: rgba(34, 197, 94, 0.05) !important;
  border-color: rgba(34, 197, 94, 0.3) !important;
}

/* ========================================
   USERS SECTION STYLES
   ======================================== */

.users-table {
  width: 100%;
  border-collapse: collapse;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 12px;
  overflow: hidden;
}

.users-table thead {
  background: rgba(59, 130, 246, 0.1);
}

.users-table th {
  padding: 16px;
  text-align: left;
  color: #3b82f6;
  font-weight: 700;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-bottom: 2px solid rgba(59, 130, 246, 0.3);
}

.users-table td {
  padding: 14px 16px;
  color: #e5e5e5;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.users-table tbody tr {
  transition: all 0.3s ease;
}

.users-table tbody tr:hover {
  background: rgba(59, 130, 246, 0.05);
}

.status-active {
  background: rgba(34, 197, 94, 0.2);
  color: #22c55e;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 600;
}

.status-inactive {
  background: rgba(239, 68, 68, 0.2);
  color: #ef4444;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 600;
}

.btn-edit {
  padding: 6px 12px;
  background: rgba(251, 191, 36, 0.2);
  color: #fbbf24;
  border: 1px solid rgba(251, 191, 36, 0.3);
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.9rem;
  transition: all 0.3s ease;
  margin-left: 4px;
}

.btn-edit:hover {
  background: rgba(251, 191, 36, 0.3);
  transform: translateY(-2px);
}

.users-stats {
  margin-bottom: 30px;
}

.stat-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 20px;
  text-align: center;
}

.stat-card h4 {
  color: #9b9b9b;
  font-size: 0.9rem;
  margin-bottom: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.stat-number {
  font-size: 2rem;
  font-weight: 700;
  color: #3b82f6;
  margin: 0;
}

/* ========================================
   IMPORT TABS STYLES
   ======================================== */

.import-tab {
  padding: 12px 24px;
  background: transparent;
  border: none;
  color: #9b9b9b;
  font-weight: 600;
  cursor: pointer;
  border-bottom: 3px solid transparent;
  transition: all 0.3s ease;
  font-size: 1rem;
}

.import-tab:hover {
  color: #ffffff;
}

.import-tab.active {
  border-bottom-color: currentColor;
}

.url-loader,
.ai-loader {
  border: 4px solid rgba(102, 126, 234, 0.1);
  border-top-color: #667eea;
  border-radius: 50%;
  width: 60px;
  height: 60px;
  animation: spin 1s linear infinite;
  margin: 0 auto 20px;
}

.url-loader {
  border-color: rgba(16, 185, 129, 0.1);
  border-top-color: #10b981;
}
