/* ===== PALETA DE COLORES ===== */
:root {
  --rojo-capi: #E30613;
  --rojo-oscuro: #b1000e;
  --rojo-claro: #ff4444;
  --gris-claro: #d9d9d9;
  --gris-medio: #a8a8a8;
  --gris-oscuro: #5a5a5a;
  --carbon: #1a1a1a;
  --blanco: #fff;
  --verde-success: #28a745;
  --azul-primary: #007bff;
  --amarillo-warning: #ffc107;
  --naranja: #ff6b35;
}

/* ===== RESETEO BÁSICO ===== */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

html, body {
  height: 100%;
}

body {
  font-family: 'Poppins', sans-serif;
  color: var(--blanco);
  overflow-x: hidden;
  background:
    radial-gradient(1400px 900px at -8% -8%, rgba(227, 6, 19, .12), transparent 65%),
    radial-gradient(1100px 700px at 108% 8%, rgba(217, 217, 217, .10), transparent 60%),
    #0d0d0d;
}

/* ===== PARTÍCULAS ===== */
#particles-canvas {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

/* ===== BARRA DE LECTURA ===== */
#scroll-bar {
  position: fixed;
  top: 0;
  left: 0;
  height: 5px;
  width: 0%;
  background: linear-gradient(90deg, var(--rojo-capi), var(--verde-success), var(--rojo-capi));
  background-size: 200% 100%;
  z-index: 1000;
  box-shadow: 0 0 15px rgba(227, 6, 19, .6);
  animation: shimmer-bar 3s linear infinite;
}

@keyframes shimmer-bar {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ===== NAVBAR ===== */
.logo {
  height: 48px;
  filter: drop-shadow(0 2px 8px rgba(227, 6, 19, .5));
}

.navbar.transparent-nav {
  background: transparent;
  transition: background .4s, box-shadow .4s, backdrop-filter .4s;
  z-index: 1001;
}

.navbar.navbar-scrolled {
  background: rgba(13, 13, 13, .90);
  backdrop-filter: blur(12px) saturate(180%);
  box-shadow: 0 8px 24px rgba(0, 0, 0, .6), inset 0 0 0 1px rgba(227, 6, 19, .25);
}

.navbar-brand span {
  font-weight: 700;
  background: linear-gradient(90deg, var(--blanco), var(--gris-claro));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.navbar .nav-link {
  color: var(--blanco) !important;
  margin-left: 12px;
  padding: 8px 16px !important;
  border-radius: 8px;
  transition: all .3s;
}

.navbar .nav-link:hover,
.navbar .nav-link.active {
  color: var(--rojo-capi) !important;
  text-shadow: 0 0 12px rgba(227, 6, 19, .6);
  transform: translateY(-2px);
}

/* ===== HERO ===== */
.hero-progreso {
  position: relative;
  z-index: 1;
  min-height: 40vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding-top: 120px;
  text-shadow: 2px 2px 8px rgba(0, 0, 0, .6);
  background: linear-gradient(135deg, rgba(227, 6, 19, .1) 0%, rgba(13, 13, 13, 0) 100%);
  overflow: hidden;
}

.floating-icons {
  position: absolute;
  width: 100%;
  height: 100%;
  display: flex;
  justify-content: space-around;
  align-items: center;
  pointer-events: none;
}

.icon-float {
  font-size: 5rem;
  opacity: 0.05;
  animation: float-icon 6s ease-in-out infinite;
}

.icon-float:nth-child(1) { animation-delay: 0s; }
.icon-float:nth-child(2) { animation-delay: 0.2s; }
.icon-float:nth-child(3) { animation-delay: 0.4s; }

@keyframes float-icon {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-30px); }
}

.hero-progreso h1 {
  font-size: clamp(2rem, 4vw, 3.5rem);
  margin-bottom: 20px;
  font-weight: 700;
  position: relative;
  z-index: 2;
}

.hero-subtitle {
  font-size: 1.1rem;
  color: var(--gris-claro);
  opacity: .9;
  max-width: 600px;
  margin: 0 auto;
  position: relative;
  z-index: 2;
}

/* ===== GRADIENT SHINE ===== */
.gradient-shine {
  background: linear-gradient(90deg, var(--gris-claro), #fff, var(--gris-medio), #fff, var(--gris-claro));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  background-size: 200% auto;
  animation: shine 6s linear infinite;
}

@keyframes shine {
  0% { background-position: 0% 50%; }
  100% { background-position: 200% 50%; }
}

/* ===== MAIN ===== */
.progreso-main {
  position: relative;
  z-index: 1;
  padding: 60px 0 100px;
}

/* ===== FILTROS ===== */
.filtros-section {
  background: rgba(255, 255, 255, 0.04);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(227, 6, 19, .2);
  padding: 24px;
  border-radius: 18px;
  margin-bottom: 40px;
}

.search-box {
  position: relative;
}

.search-box i {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--gris-medio);
  pointer-events: none;
}

.search-box .form-control {
  padding-left: 40px;
  background: rgba(255, 255, 255, .08);
  border: 1px solid rgba(227, 6, 19, .3);
  color: var(--blanco);
  border-radius: 10px;
  transition: all .3s;
}

.search-box .form-control:focus {
  background: rgba(255, 255, 255, .12);
  border-color: var(--rojo-capi);
  box-shadow: 0 0 0 0.25rem rgba(227, 6, 19, .25);
}

.form-select {
  background: rgba(255, 255, 255, .08);
  border: 1px solid rgba(227, 6, 19, .3);
  color: var(--blanco);
  border-radius: 10px;
  transition: all .3s;
}

.form-select:focus {
  background: rgba(255, 255, 255, .12);
  border-color: var(--rojo-capi);
  box-shadow: 0 0 0 0.25rem rgba(227, 6, 19, .25);
}

.form-select option {
  background: var(--carbon);
  color: var(--blanco);
}

/* ===== ESTADÍSTICAS ===== */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
  margin-bottom: 40px;
}

.stat-card {
  background: rgba(255, 255, 255, .04);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(227, 6, 19, .2);
  padding: 24px;
  border-radius: 18px;
  display: flex;
  align-items: center;
  gap: 16px;
  transition: all .4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.stat-card:hover {
  background: rgba(227, 6, 19, .08);
  border-color: rgba(227, 6, 19, .5);
  box-shadow: 0 20px 50px rgba(0, 0, 0, .4), 0 0 40px rgba(227, 6, 19, .25);
  transform: translateY(-8px);
}

.stat-icon {
  width: 60px;
  height: 60px;
  background: linear-gradient(135deg, var(--rojo-capi), var(--rojo-oscuro));
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  color: var(--blanco);
  flex-shrink: 0;
}

.stat-number {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--rojo-capi);
}

.stat-label {
  font-size: 0.9rem;
  color: var(--gris-medio);
  font-weight: 500;
}

/* ===== TARJETAS ===== */
.pro-card {
  border: 1px solid rgba(227, 6, 19, .2);
  border-radius: 18px;
  background: rgba(255, 255, 255, .04);
  backdrop-filter: blur(10px);
  overflow: hidden;
  transition: all .4s cubic-bezier(0.34, 1.56, 0.64, 1);
  margin-bottom: 24px;
}

.pro-card:hover {
  background: rgba(227, 6, 19, .08);
  border-color: rgba(227, 6, 19, .5);
  box-shadow: 0 20px 50px rgba(0, 0, 0, .4), 0 0 40px rgba(227, 6, 19, .25);
  transform: translateY(-8px);
}

.pro-card.glow-card {
  box-shadow: 0 0 30px rgba(227, 6, 19, .2);
}

.pro-card .card-header {
  background: rgba(227, 6, 19, .08);
  border-bottom: 1px solid rgba(227, 6, 19, .2);
  padding: 20px 24px;
}

.pro-card .card-header h5 {
  color: var(--gris-claro);
  font-weight: 700;
  font-size: 1.2rem;
}

.pro-card .card-body {
  padding: 24px;
}

/* ===== DOT ANIMADO ===== */
.dot-animate {
  display: inline-block;
  width: 12px;
  height: 12px;
  background: var(--verde-success);
  border-radius: 50%;
  box-shadow: 0 0 0 0 rgba(40, 167, 69, .7);
  animation: pulse-dot 2s infinite;
}

@keyframes pulse-dot {
  0% {
    box-shadow: 0 0 0 0 rgba(40, 167, 69, .7);
  }
  70% {
    box-shadow: 0 0 0 15px rgba(40, 167, 69, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(40, 167, 69, 0);
  }
}

/* ===== ETA BADGE ===== */
.eta-badge {
  background: rgba(255, 193, 7, .15);
  border: 1px solid rgba(255, 193, 7, .3);
  padding: 8px 14px;
  border-radius: 8px;
  font-size: 0.9rem;
  color: var(--gris-claro);
  font-weight: 600;
}

/* ===== PROGRESS BAR ===== */
.progress-container {
  position: relative;
  height: 8px;
  background: rgba(255, 255, 255, .08);
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid rgba(227, 6, 19, .2);
}

.progress-bar-animated {
  height: 100%;
  background: linear-gradient(90deg, var(--rojo-capi), var(--naranja), var(--rojo-capi));
  background-size: 200% 100%;
  border-radius: 10px;
  animation: progress-slide 2s ease-in-out forwards;
  box-shadow: 0 0 10px rgba(227, 6, 19, .5);
}

@keyframes progress-slide {
  0% { width: 0%; }
  100% { width: 25%; }
}

/* ===== STEPPER ===== */
.stepper {
  display: flex;
  justify-content: space-between;
  list-style: none;
  position: relative;
  padding: 0;
  margin: 0;
}

.stepper::before {
  content: '';
  position: absolute;
  top: 20px;
  left: 0;
  right: 0;
  height: 3px;
  background: rgba(227, 6, 19, .2);
  z-index: -1;
  border-radius: 10px;
}

.step {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex: 1;
  position: relative;
}

.step-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 50px;
  height: 50px;
  background: rgba(255, 255, 255, .08);
  border: 2px solid rgba(227, 6, 19, .3);
  border-radius: 50%;
  color: var(--gris-claro);
  font-size: 1.4rem;
  margin-bottom: 12px;
  transition: all .3s;
}

.step.active .step-icon {
  background: linear-gradient(135deg, var(--rojo-capi), var(--rojo-oscuro));
  border-color: var(--rojo-capi);
  color: var(--blanco);
  box-shadow: 0 0 25px rgba(227, 6, 19, .6);
  transform: scale(1.2);
  animation: bounce-icon .6s ease-out;
}

@keyframes bounce-icon {
  0% { transform: scale(0.5); }
  50% { transform: scale(1.3); }
  100% { transform: scale(1.2); }
}

.step-label {
  font-size: 0.9rem;
  color: var(--gris-medio);
  font-weight: 600;
  text-align: center;
  transition: all .3s;
  margin-bottom: 4px;
}

.step.active .step-label {
  color: var(--rojo-capi);
  font-weight: 700;
  font-size: 0.95rem;
}

.step-time {
  font-size: 0.75rem;
  color: var(--blanco);
  display: block;
  margin-top: 4px;
}

/* ===== CURRENT ORDER ===== */
.current-order {
  margin-bottom: 50px;
}

/* ===== PEDIDOS LIST ===== */
.pedidos-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 24px;
}

.pedido-card {
  background: rgba(255, 255, 255, .04);
  border: 1px solid rgba(227, 6, 19, .2);
  border-radius: 18px;
  padding: 20px;
  transition: all .4s cubic-bezier(0.34, 1.56, 0.64, 1);
  cursor: pointer;
}

.pedido-card:hover {
  background: rgba(227, 6, 19, .08);
  border-color: rgba(227, 6, 19, .5);
  box-shadow: 0 20px 50px rgba(0, 0, 0, .4), 0 0 40px rgba(227, 6, 19, .25);
  transform: translateY(-8px);
}

.pedido-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(227, 6, 19, .1);
}

.pedido-codigo {
  font-weight: 700;
  color: var(--gris-claro);
}

.pedido-badge {
  font-size: 0.8rem;
  padding: 4px 10px;
  border-radius: 6px;
}

.pedido-info {
  margin-bottom: 12px;
  display: flex;
  justify-content: space-between;
}

.pedido-info small {
  color: var(--gris-medio);
  font-size: 0.85rem;
}

.pedido-info strong {
  color: var(--gris-claro);
  font-weight: 600;
}

.pedido-progress {
  height: 4px;
  background: rgba(255, 255, 255, .08);
  border-radius: 4px;
  overflow: hidden;
  margin-top: 12px;
}

.pedido-progress-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--rojo-capi), var(--naranja));
  border-radius: 4px;
}

/* ===== EMPTY STATE ===== */
.empty-state {
  background: rgba(255, 255, 255, .04);
  border: 2px dashed rgba(227, 6, 19, .2);
  border-radius: 18px;
  padding: 60px 20px;
}

.empty-state i {
  color: rgba(227, 6, 19, .3);
}

/* ===== REVEAL ===== */
.reveal {
  opacity: 0;
  transform: translateY(60px) scale(.97);
  filter: blur(5px);
  transition: all 1s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.reveal.show {
  opacity: 1;
  transform: none;
  filter: none;
}

/* ===== MODAL ===== */
.modal-content {
  border: 1px solid rgba(227, 6, 19, .3);
  box-shadow: 0 20px 50px rgba(0, 0, 0, .6);
}

.modal-header {
  background: rgba(227, 6, 19, .08);
  border-bottom: 1px solid rgba(227, 6, 19, .2);
}

.modal-title {
  color: var(--gris-claro);
  font-weight: 700;
}

.modal-body {
  color: rgba(255, 255, 255, .85);
  padding: 30px 24px;
}

.progress {
  background: rgba(255, 255, 255, .08);
  border: 1px solid rgba(227, 6, 19, .2);
  border-radius: 10px;
  overflow: hidden;
}

.progress-bar {
  background: linear-gradient(90deg, var(--rojo-capi), var(--naranja));
}

/* ===== BOTONES ===== */
.btn-primary {
  background: linear-gradient(135deg, var(--azul-primary), #0056b3);
  border: none;
  color: var(--blanco);
  font-weight: 700;
  padding: 12px 20px;
  border-radius: 12px;
  transition: all .3s;
  box-shadow: 0 5px 15px rgba(0, 123, 255, .3);
}

.btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(0, 123, 255, .5);
}

.btn-outline-light {
  border-color: rgba(227, 6, 19, .5);
  color: var(--gris-claro);
  font-weight: 600;
  transition: all .3s;
}

.btn-outline-light:hover {
  background: rgba(227, 6, 19, .1);
  border-color: var(--rojo-capi);
  color: var(--rojo-capi);
}

/* ===== FOOTER ===== */
.footer {
  background: rgba(0, 0, 0, .92);
  border-top: 2px solid rgba(227, 6, 19, .3);
  box-shadow: 0 -18px 45px rgba(0, 0, 0, .6);
  position: relative;
  z-index: 1;
}

.footer-logo img {
  filter: drop-shadow(0 5px 14px rgba(227, 6, 19, .5));
}

.footer p {
  color: rgba(255, 255, 255, .82);
}

.social-icons a {
  color: var(--gris-claro);
  margin: 0 14px;
  font-size: 1.6rem;
  transition: all .35s;
  display: inline-block;
}

.social-icons a:hover {
  color: var(--rojo-capi);
  transform: translateY(-5px) scale(1.25);
  filter: drop-shadow(0 5px 14px rgba(227, 6, 19, .7));
}

/* ===== BOTÓN ARRIBA ===== */
.btn-arriba {
  position: fixed;
  right: 26px;
  bottom: 28px;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: none;
  cursor: pointer;
  display: none;
  background: linear-gradient(135deg, var(--rojo-capi), var(--rojo-oscuro));
  color: #fff;
  font-size: 28px;
  box-shadow: 0 0 22px rgba(227, 6, 19, .5);
  z-index: 1001;
  transition: all .35s;
  align-items: center;
  justify-content: center;
}

.btn-arriba:hover {
  transform: scale(1.14) translateY(-5px);
  box-shadow: 0 0 40px rgba(227, 6, 19, .8);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 992px) {
  .stats-grid {
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  }

  .pedidos-list {
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  }
}

@media (max-width: 768px) {
  .hero-progreso {
    min-height: 35vh;
    padding-top: 100px;
  }

  .hero-progreso h1 {
    font-size: 1.8rem;
  }

  .floating-icons {
    font-size: 3rem;
  }

  .stats-grid {
    grid-template-columns: 1fr 1fr;
    gap: 16px;
  }

  .stat-card {
    padding: 16px;
  }

  .stat-icon {
    width: 50px;
    height: 50px;
    font-size: 1.5rem;
  }

  .stat-number {
    font-size: 1.4rem;
  }

  .stat-label {
    font-size: 0.8rem;
  }

  .pedidos-list {
    grid-template-columns: 1fr;
  }

  .step-icon {
    width: 40px;
    height: 40px;
    font-size: 1rem;
  }

  .step-label {
    font-size: 0.85rem;
  }
}

@media (max-width: 480px) {
  .hero-progreso {
    min-height: 30vh;
    padding-top: 80px;
  }

  .hero-progreso h1 {
    font-size: 1.4rem;
  }

  .floating-icons {
    font-size: 2rem;
  }

  .stats-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .stat-card {
    padding: 12px;
    gap: 12px;
  }

  .stat-icon {
    width: 45px;
    height: 45px;
    font-size: 1.3rem;
  }

  .stat-number {
    font-size: 1.2rem;
  }

  .filtros-section {
    padding: 16px;
  }

  .pro-card .card-header {
    padding: 14px 12px;
  }

  .pro-card .card-body {
    padding: 14px;
  }

  .step-icon {
    width: 35px;
    height: 35px;
    font-size: 0.85rem;
  }

  .step-label {
    font-size: 0.7rem;
  }

  .step-time {
    font-size: 0.65rem;
  }
  
}
.text-muted-small {
  color: var(--blanco) !important;
}

.text-muted {
  color: var(--blanco) !important;
}

#searchPedidos {
  color: var(--blanco) !important;
}

#searchPedidos::placeholder {
  color: rgba(255, 255, 255, 0.6) !important;
}