/* =====================================================
   NIKE REPOSICIÓN — DESIGN SYSTEM v4 PREMIUM
   Glassmorphism · Gradientes · Micro-animaciones
   ===================================================== */

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   VARIABLES EXPANDIDAS
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
:root {
  /* Gradientes Nike */
  --gradient-nike: linear-gradient(135deg, #E11D2C 0%, #FF6B00 100%);
  --gradient-nike-vertical: linear-gradient(180deg, #E11D2C 0%, #FF6B00 100%);
  --gradient-glow: radial-gradient(circle at 50% 0%, rgba(225,29,44,0.15), transparent 70%);
  
  /* Glassmorphism */
  --glass-bg: rgba(30, 30, 30, 0.7);
  --glass-border: rgba(255, 255, 255, 0.08);
  --glass-blur: blur(12px);
  
  /* Sombras en capas */
  --shadow-sm: 0 2px 8px rgba(0,0,0,0.3);
  --shadow-md: 0 4px 16px rgba(0,0,0,0.4), 0 2px 4px rgba(0,0,0,0.2);
  --shadow-lg: 0 8px 32px rgba(0,0,0,0.5), 0 4px 8px rgba(0,0,0,0.3);
  --shadow-glow-red: 0 0 20px rgba(225,29,44,0.3), 0 0 40px rgba(225,29,44,0.1);
  --shadow-glow-orange: 0 0 20px rgba(255,107,0,0.3);
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   NOISE TEXTURE — Profundidad sutil
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.03'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 9998;
  opacity: 0.5;
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   TOPBAR PREMIUM — Glass effect + Red glow
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
.topbar {
  background: rgba(14, 14, 14, 0.85) !important;
  backdrop-filter: saturate(180%) blur(20px) !important;
  -webkit-backdrop-filter: saturate(180%) blur(20px) !important;
  border-bottom: 1px solid rgba(255,255,255,0.06) !important;
  box-shadow: 
    0 1px 0 #E11D2C,
    0 8px 32px rgba(0,0,0,0.8),
    0 -20px 60px rgba(225,29,44,0.08) inset !important;
}

/* Swoosh pulse */
.swoosh-btn img {
  transition: filter 0.3s cubic-bezier(0.4, 0, 0.2, 1), transform 0.2s !important;
  filter: drop-shadow(0 0 8px rgba(255,255,255,0.3));
}
.swoosh-btn:hover img {
  transform: scale(1.05) !important;
  filter: drop-shadow(0 0 12px rgba(225,29,44,0.8)) !important;
}
.swoosh-btn:active img {
  transform: scale(0.92) !important;
  filter: brightness(0) saturate(100%) invert(27%) sepia(90%) saturate(4000%) hue-rotate(340deg) brightness(90%);
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   CARDS — Glassmorphism + Glow borders
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
.card {
  background: var(--glass-bg) !important;
  backdrop-filter: var(--glass-blur) !important;
  -webkit-backdrop-filter: var(--glass-blur) !important;
  border: 1px solid var(--glass-border) !important;
  border-radius: 16px !important;
  box-shadow: var(--shadow-md) !important;
  position: relative;
  overflow: hidden;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), 
              box-shadow 0.3s cubic-bezier(0.4, 0, 0.2, 1),
              border-color 0.3s !important;
}

/* Top glow accent */
.card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--gradient-nike);
  opacity: 0.6;
  box-shadow: 0 0 16px rgba(225,29,44,0.5);
  pointer-events: none;
}

.card:hover {
  transform: translateY(-2px) !important;
  box-shadow: 
    var(--shadow-lg),
    var(--shadow-glow-red) !important;
  border-color: rgba(225,29,44,0.3) !important;
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   NAV CARDS (Bodega home grid)
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
.nav-card {
  background: var(--glass-bg) !important;
  backdrop-filter: var(--glass-blur) !important;
  -webkit-backdrop-filter: var(--glass-blur) !important;
  border: 1px solid rgba(255,255,255,0.06) !important;
  border-radius: 16px !important;
  box-shadow: var(--shadow-sm) !important;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
  position: relative;
  overflow: hidden;
}

/* Gradient overlay on hover */
.nav-card::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 0%, rgba(225,29,44,0.08), transparent 70%);
  opacity: 0;
  transition: opacity 0.3s;
  pointer-events: none;
}

.nav-card:hover {
  transform: translateY(-4px) scale(1.02) !important;
  box-shadow: 
    0 12px 40px rgba(0,0,0,0.6),
    0 0 30px rgba(225,29,44,0.2) !important;
  border-color: rgba(255,255,255,0.12) !important;
}

.nav-card:hover::after {
  opacity: 1;
}

.nav-card:active {
  transform: translateY(-2px) scale(1) !important;
}

/* Icon glow */
.nav-card-icon i {
  filter: drop-shadow(0 2px 8px currentColor);
  transition: filter 0.3s;
}

.nav-card:hover .nav-card-icon i {
  filter: drop-shadow(0 4px 16px currentColor);
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   STAT CARDS — Premium depth
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
.stat, .stat-card {
  background: var(--glass-bg) !important;
  backdrop-filter: var(--glass-blur) !important;
  -webkit-backdrop-filter: var(--glass-blur) !important;
  border: 1px solid rgba(255,255,255,0.06) !important;
  border-radius: 12px !important;
  box-shadow: var(--shadow-sm) !important;
  position: relative;
  overflow: hidden;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

.stat::before, .stat-card::before {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--gradient-nike);
  opacity: 0.5;
  box-shadow: 0 -2px 12px rgba(225,29,44,0.4);
  transition: opacity 0.3s, box-shadow 0.3s;
  pointer-events: none;
}

.stat:hover, .stat-card:hover {
  transform: translateY(-2px) !important;
  box-shadow: var(--shadow-md) !important;
  border-color: rgba(255,255,255,0.1) !important;
}

.stat:hover::before, .stat-card:hover::before {
  opacity: 1;
  box-shadow: 0 -2px 20px rgba(225,29,44,0.6);
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   BUTTONS — Gradient fills + Hover glow
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */

/* Primary button */
.btn-primary, .btn-login {
  background: var(--gradient-nike) !important;
  border: none !important;
  border-radius: 10px !important;
  box-shadow: 
    0 4px 16px rgba(225,29,44,0.4),
    0 2px 4px rgba(0,0,0,0.3) !important;
  position: relative;
  overflow: hidden;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

.btn-primary::before, .btn-login::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.2) 0%, transparent 60%);
  opacity: 0;
  transition: opacity 0.3s;
  pointer-events: none;
}

.btn-primary:hover, .btn-login:hover {
  transform: translateY(-2px) !important;
  box-shadow: 
    0 8px 24px rgba(225,29,44,0.5),
    0 4px 8px rgba(0,0,0,0.4) !important;
}

.btn-primary:hover::before, .btn-login:hover::before {
  opacity: 1;
}

.btn-primary:active, .btn-login:active {
  transform: translateY(0) scale(0.98) !important;
}

/* Secondary buttons */
.btn-secondary, .logout-btn, .tb-btn {
  background: rgba(255,255,255,0.05) !important;
  border: 1px solid rgba(255,255,255,0.1) !important;
  backdrop-filter: blur(8px) !important;
  -webkit-backdrop-filter: blur(8px) !important;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

.btn-secondary:hover, .logout-btn:hover, .tb-btn:hover {
  background: rgba(255,255,255,0.08) !important;
  border-color: rgba(255,255,255,0.2) !important;
  transform: translateY(-1px) !important;
  box-shadow: 0 4px 12px rgba(0,0,0,0.3) !important;
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   BADGES — Glow effects
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
.badge, .tb-badge, .nav-badge, .badge-count {
  border-radius: 6px !important;
  box-shadow: 
    0 2px 8px rgba(0,0,0,0.4),
    0 0 16px currentColor !important;
  border: 1px solid rgba(255,255,255,0.2) !important;
  font-weight: 900 !important;
  letter-spacing: 0.08em !important;
}

/* Status badges */
.sp-pendiente, .badge-status-pendiente {
  background: rgba(255,107,0,0.15) !important;
  color: #FF6B00 !important;
  border: 1px solid rgba(255,107,0,0.3) !important;
  box-shadow: 0 0 16px rgba(255,107,0,0.3) !important;
}

.sp-en_proceso, .badge-status-en_proceso {
  background: rgba(59,130,246,0.15) !important;
  color: #60a5fa !important;
  border: 1px solid rgba(59,130,246,0.3) !important;
  box-shadow: 0 0 16px rgba(59,130,246,0.3) !important;
}

.sp-listo, .badge-status-listo {
  background: rgba(34,197,94,0.15) !important;
  color: #22c55e !important;
  border: 1px solid rgba(34,197,94,0.3) !important;
  box-shadow: 0 0 16px rgba(34,197,94,0.3) !important;
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   SIZE GRID — Interactive glow
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
.size-item {
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1) !important;
  cursor: pointer;
  position: relative;
  background: rgba(30,30,30,0.6) !important;
  backdrop-filter: blur(8px) !important;
  -webkit-backdrop-filter: blur(8px) !important;
}

.size-item::before {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  padding: 1px;
  background: var(--gradient-nike);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0;
  transition: opacity 0.2s;
  pointer-events: none;
}

.size-item:not(.no-bin):hover {
  border-color: transparent !important;
  background: rgba(225,29,44,0.1) !important;
  transform: translateY(-2px) scale(1.03) !important;
  box-shadow: 
    0 4px 16px rgba(225,29,44,0.3),
    0 0 24px rgba(225,29,44,0.15) !important;
}

.size-item:not(.no-bin):hover::before {
  opacity: 1;
}

.size-item:not(.no-bin):active {
  transform: translateY(0) scale(1) !important;
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   TABS — Smooth transitions
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
.tab, .fb {
  border-radius: 8px !important;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1) !important;
  position: relative;
  background: rgba(255,255,255,0.03) !important;
}

.tab.active, .fb.active {
  background: var(--gradient-nike) !important;
  color: #fff !important;
  border: none !important;
  box-shadow: 
    0 4px 12px rgba(225,29,44,0.4),
    0 0 20px rgba(225,29,44,0.2) !important;
  font-weight: 900 !important;
}

.tab:not(.active):hover, .fb:not(.active):hover {
  background: rgba(255,255,255,0.06) !important;
  border-color: rgba(255,255,255,0.15) !important;
  transform: translateY(-1px) !important;
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   ORDER CARDS — Enhanced depth
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
.oc {
  background: var(--glass-bg) !important;
  backdrop-filter: var(--glass-blur) !important;
  -webkit-backdrop-filter: var(--glass-blur) !important;
  border: 1px solid rgba(255,255,255,0.06) !important;
  border-radius: 12px !important;
  box-shadow: var(--shadow-sm) !important;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
  position: relative;
  overflow: hidden;
}

.oc::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: var(--gradient-nike-vertical);
  opacity: 0;
  transition: opacity 0.3s;
  pointer-events: none;
}

.oc:hover {
  border-color: rgba(255,255,255,0.12) !important;
  background: rgba(30,30,30,0.8) !important;
  transform: translateX(4px) !important;
  box-shadow: var(--shadow-md) !important;
}

.oc:hover::before {
  opacity: 1;
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   PROGRESS BARS — Gradient fill
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
.prog-fill, .progress-fill {
  background: var(--gradient-nike) !important;
  box-shadow: 
    0 0 16px rgba(225,29,44,0.5),
    0 2px 8px rgba(0,0,0,0.3) !important;
  transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   INPUTS & FORMS — Glass styling
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
input, select, textarea {
  background: rgba(30,30,30,0.6) !important;
  backdrop-filter: blur(8px) !important;
  -webkit-backdrop-filter: blur(8px) !important;
  border: 1px solid rgba(255,255,255,0.08) !important;
  border-radius: 10px !important;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

input:focus, select:focus, textarea:focus {
  outline: none !important;
  border-color: rgba(225,29,44,0.5) !important;
  background: rgba(30,30,30,0.8) !important;
  box-shadow: 
    0 0 0 3px rgba(225,29,44,0.15),
    0 4px 16px rgba(225,29,44,0.2) !important;
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   SCROLLBAR — Themed
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: rgba(10,10,10,0.5);
}

::-webkit-scrollbar-thumb {
  background: rgba(225,29,44,0.4);
  border-radius: 3px;
  transition: background 0.3s;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(225,29,44,0.7);
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   ANIMATIONS — Entrance effects
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

@keyframes scaleIn {
  from {
    opacity: 0;
    transform: scale(0.95);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* Apply entrance animations */
.card, .nav-card, .stat, .stat-card {
  animation: fadeUp 0.4s cubic-bezier(0.4, 0, 0.2, 1) both;
}

.card:nth-child(1) { animation-delay: 0.05s; }
.card:nth-child(2) { animation-delay: 0.1s; }
.card:nth-child(3) { animation-delay: 0.15s; }
.card:nth-child(4) { animation-delay: 0.2s; }

.nav-card:nth-child(1) { animation-delay: 0.05s; }
.nav-card:nth-child(2) { animation-delay: 0.1s; }
.nav-card:nth-child(3) { animation-delay: 0.15s; }
.nav-card:nth-child(4) { animation-delay: 0.2s; }
.nav-card:nth-child(5) { animation-delay: 0.25s; }
.nav-card:nth-child(6) { animation-delay: 0.3s; }
.nav-card:nth-child(7) { animation-delay: 0.35s; }

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   SPECIFIC PAGE ENHANCEMENTS
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */

/* Login card */
.login-card, .card[style*="max-width:420px"] {
  animation: scaleIn 0.5s cubic-bezier(0.4, 0, 0.2, 1) both !important;
}

/* Excel upload card */
.excel-card {
  border-top: 3px solid transparent !important;
  border-image: var(--gradient-nike) 1 !important;
  border-image-slice: 1 0 0 0 !important;
  box-shadow: 
    var(--shadow-md),
    0 -20px 40px rgba(34,197,94,0.05) inset !important;
}

/* Rank podium */
#rankContent > div,
#miniRankContent > div {
  animation: fadeUp 0.3s ease-out both;
}

/* Changelog entries */
#changelogContent > div {
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

#changelogContent > div:hover {
  background: rgba(30,30,30,0.8) !important;
  transform: translateX(4px) !important;
  border-left-color: rgba(225,29,44,0.6) !important;
}

/* Table rows */
.it tr, .user-table tr {
  transition: background 0.2s;
}

.it tr:hover td,
.user-table tr:hover td {
  background: rgba(255,255,255,0.03) !important;
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   TOAST NOTIFICATIONS
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
#_toast, .toast {
  background: rgba(26, 26, 26, 0.95) !important;
  color: #ffffff !important;
  backdrop-filter: var(--glass-blur) !important;
  -webkit-backdrop-filter: var(--glass-blur) !important;
  border: 1px solid rgba(255,255,255,0.15) !important;
  border-left: 4px solid #E11D2C !important;
  border-radius: 12px !important;
  box-shadow: 
    0 8px 32px rgba(0,0,0,0.6),
    0 0 30px rgba(225,29,44,0.3) !important;
  font-family: 'Barlow Condensed', sans-serif !important;
  font-weight: 900 !important;
  letter-spacing: 0.08em !important;
  font-size: 14px !important;
  padding: 12px 20px !important;
  min-width: 280px !important;
  max-width: 400px !important;
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   SELECTION & FOCUS
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
::selection {
  background: rgba(225,29,44,0.4);
  color: #fff;
}

input[type="checkbox"] {
  accent-color: #E11D2C;
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   MOBILE OPTIMIZATIONS
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
@media (max-width: 768px) {
  .card, .nav-card, .stat, .stat-card, .oc {
    animation-delay: 0s !important;
  }
  
  /* Reduce blur on mobile for performance */
  .card, .nav-card, .stat, .stat-card {
    backdrop-filter: blur(8px) !important;
    -webkit-backdrop-filter: blur(8px) !important;
  }
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   ACCESSIBILITY
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
