/* ==========================================================================
   ATLETI PUJAS - DISEÑO Y SISTEMA VISUAL OFICIAL
   Tema: Club Atlético de Madrid (Rojiblanco & Navy Blue Premium)
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&family=Montserrat:wght@600;700;800;900&display=swap');

:root {
  /* Paleta Oficial Club Atlético de Madrid */
  --atleti-red: #CB3524;
  --atleti-red-dark: #9E1B10;
  --atleti-red-light: #E63928;
  --atleti-red-glow: rgba(203, 53, 36, 0.35);
  
  --atleti-blue: #0F3375;
  --atleti-blue-dark: #0B1B3D;
  
  --navy-bg: #070D14;
  --navy-surface: #0E1724;
  --navy-surface-hover: #152234;
  --navy-card: #111D2D;
  --navy-border: #1B2F49;
  --navy-border-focus: #CB3524;
  
  --text-main: #FFFFFF;
  --text-secondary: #CBD5E1;
  --text-muted: #8295AA;
  
  --gold-accent: #E5A823;
  --gold-gold-dark: #B8861B;
  --gold-bg: rgba(229, 168, 35, 0.14);
  
  --green-success: #10B981;
  --green-bg: rgba(16, 185, 129, 0.15);
  --yellow-pending: #F59E0B;
  --yellow-bg: rgba(245, 158, 11, 0.15);
  --red-danger: #EF4444;
  --red-bg: rgba(239, 68, 68, 0.15);

  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-heading: 'Montserrat', sans-serif;

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-xl: 22px;

  --shadow-card: 0 10px 30px -5px rgba(0, 0, 0, 0.6), 0 0 0 1px var(--navy-border);
  --shadow-hover: 0 16px 36px -4px rgba(203, 53, 36, 0.25), 0 0 0 1px rgba(203, 53, 36, 0.6);
  --shadow-glow: 0 0 25px var(--atleti-red-glow);

  --transition-fast: 0.18s ease;
  --transition-normal: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Reset & Base */
*, *::before, *::after {
  box-sizing: border-box;
  max-width: 100%;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  color-scheme: dark;
  overflow-x: hidden;
  max-width: 100%;
}

body {
  font-family: var(--font-body);
  background-color: var(--navy-bg);
  color: var(--text-main);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  max-width: 100%;
  position: relative;
  background-image: 
    radial-gradient(circle at 15% 0%, rgba(203, 53, 36, 0.12) 0%, transparent 45%),
    radial-gradient(circle at 85% 100%, rgba(15, 51, 117, 0.18) 0%, transparent 55%),
    linear-gradient(180deg, rgba(7, 13, 20, 0.95) 0%, #070D14 100%);
  background-attachment: fixed;
}

/* Franja Distintiva Rojiblanca en la parte superior */
body::before {
  content: '';
  display: block;
  height: 5px;
  width: 100%;
  max-width: 100vw;
  position: sticky;
  top: 0;
  z-index: 1001;
  background: repeating-linear-gradient(
    90deg,
    #CB3524 0px,
    #CB3524 24px,
    #FFFFFF 24px,
    #FFFFFF 48px,
    #0F3375 48px,
    #0F3375 72px,
    #FFFFFF 72px,
    #FFFFFF 96px
  );
}

a {
  color: inherit;
  text-decoration: none;
  transition: color var(--transition-fast);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* Tipografía */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.2;
  color: var(--text-main);
}

/* Contenedores */
.container {
  width: 100%;
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.container-narrow {
  max-width: 860px;
}

/* ==========================================================================
   CABECERA & NAVBAR
   ========================================================================== */
.navbar {
  background-color: rgba(14, 23, 36, 0.95);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--navy-border);
  position: sticky;
  top: 5px;
  z-index: 1000;
  height: 74px;
  display: flex;
  align-items: center;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
}

.nav-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text-main);
}

.nav-brand .brand-badge {
  background: var(--atleti-red);
  color: #fff;
  padding: 0.25rem 0.55rem;
  border-radius: var(--radius-sm);
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  list-style: none;
}

.nav-link {
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--text-secondary);
  padding: 0.5rem 0.75rem;
  border-radius: var(--radius-sm);
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  transition: all var(--transition-fast);
}

.nav-link:hover, .nav-link.active {
  color: #fff;
  background: var(--navy-surface-hover);
}

.nav-link.admin-tag {
  color: var(--gold-accent);
  background: var(--gold-bg);
  border: 1px solid rgba(229, 168, 35, 0.3);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

/* ==========================================================================
   BOTONES
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.88rem;
  letter-spacing: 0.01em;
  padding: 0.7rem 1.3rem;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  cursor: pointer;
  transition: all var(--transition-normal);
  text-align: center;
  white-space: nowrap;
}

.btn-primary {
  background: var(--atleti-red);
  color: #fff;
  box-shadow: 0 4px 14px rgba(203, 53, 36, 0.35);
}

.btn-primary:hover {
  background: var(--atleti-red-light);
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(203, 53, 36, 0.5);
}

.btn-primary:active {
  transform: translateY(0);
}

.btn-secondary {
  background: var(--navy-surface);
  color: var(--text-main);
  border-color: var(--navy-border);
}

.btn-secondary:hover {
  background: var(--navy-surface-hover);
  border-color: var(--text-muted);
}

.btn-success {
  background: var(--green-success);
  color: #fff;
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.3);
}

.btn-success:hover {
  background: #0ea372;
}

.btn-gold {
  background: var(--gold-accent);
  color: #0A1118;
  font-weight: 800;
}

.btn-gold:hover {
  background: #f0b435;
}

.btn-sm {
  padding: 0.45rem 0.85rem;
  font-size: 0.8rem;
  border-radius: var(--radius-sm);
}

.btn-lg {
  padding: 0.95rem 1.85rem;
  font-size: 1rem;
  border-radius: var(--radius-md);
}

.btn-block {
  width: 100%;
}

/* ==========================================================================
   HERO / BANNER PRINCIPAL
   ========================================================================== */
.hero-banner {
  padding: 3.5rem 0 2.5rem;
  background: linear-gradient(180deg, rgba(16, 27, 39, 0.8) 0%, rgba(10, 17, 24, 0) 100%);
  border-bottom: 1px solid var(--navy-border);
  position: relative;
  overflow: hidden;
}

.hero-banner::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 50%;
  height: 100%;
  background: radial-gradient(circle, rgba(203, 53, 36, 0.15) 0%, transparent 70%);
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 1;
}

.hero-badge-strip {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  background: var(--navy-surface);
  border: 1px solid var(--navy-border);
  padding: 0.4rem 0.9rem;
  border-radius: 9999px;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 1.2rem;
}

.hero-badge-strip .pulse-dot {
  width: 8px;
  height: 8px;
  background: var(--green-success);
  border-radius: 50%;
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.25);
  animation: pulseAnimation 2s infinite;
}

@keyframes pulseAnimation {
  0% { transform: scale(0.95); opacity: 1; }
  50% { transform: scale(1.3); opacity: 0.7; }
  100% { transform: scale(0.95); opacity: 1; }
}

.hero-title {
  font-size: clamp(2rem, 4vw, 3.2rem);
  font-weight: 900;
  margin-bottom: 0.9rem;
  text-transform: uppercase;
}

.hero-title span {
  color: var(--atleti-red);
}

.hero-subtitle {
  font-size: 1.12rem;
  color: var(--text-secondary);
  max-width: 680px;
  margin-bottom: 1.5rem;
}

/* ==========================================================================
   CARDS DE PARTIDOS / SUBASTAS
   ========================================================================== */
.match-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: 1.75rem;
  margin: 2rem 0 3.5rem;
}

.match-card {
  background: var(--navy-card);
  border: 1px solid var(--navy-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  transition: all var(--transition-normal);
  display: flex;
  flex-direction: column;
  position: relative;
}

.match-card:hover {
  transform: translateY(-4px);
  border-color: rgba(203, 53, 36, 0.45);
  box-shadow: var(--shadow-hover);
}

.match-card-header {
  padding: 1.2rem 1.4rem;
  background: var(--navy-surface);
  border-bottom: 1px solid var(--navy-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.comp-badge {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.25rem 0.65rem;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-secondary);
}

.comp-badge.laliga { color: #FF4B44; background: rgba(255, 75, 68, 0.12); }
.comp-badge.champions { color: #00D2FF; background: rgba(0, 210, 255, 0.12); }
.comp-badge.copa { color: #FFB300; background: rgba(255, 179, 0, 0.12); }

.status-tag {
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.25rem 0.65rem;
  border-radius: var(--radius-sm);
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.status-tag.activa {
  background: var(--green-bg);
  color: var(--green-success);
}

.status-tag.cerrada {
  background: rgba(148, 163, 184, 0.12);
  color: var(--text-muted);
}

.match-card-body {
  padding: 1.5rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.match-teams {
  display: flex;
  align-items: center;
  justify-content: space-around;
  margin-bottom: 1.4rem;
  text-align: center;
}

.team-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.6rem;
  width: 40%;
}

.team-logo {
  width: 58px;
  height: 58px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.team-logo img, .team-logo svg {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.team-name {
  font-family: var(--font-heading);
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-main);
  line-height: 1.2;
}

.match-vs {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  font-weight: 900;
  color: var(--atleti-red);
  opacity: 0.85;
}

.match-date-row {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  background: rgba(0, 0, 0, 0.25);
  padding: 0.6rem 0.9rem;
  border-radius: var(--radius-sm);
  font-size: 0.84rem;
  color: var(--text-secondary);
  margin-bottom: 1.2rem;
}

.pack-indicator {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: linear-gradient(90deg, rgba(203, 53, 36, 0.12) 0%, rgba(16, 27, 39, 0.4) 100%);
  border-left: 3px solid var(--atleti-red);
  padding: 0.65rem 0.9rem;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  margin-bottom: 1.4rem;
  font-size: 0.82rem;
}

.pack-indicator strong {
  color: #fff;
  font-weight: 700;
}

/* Temporizador Countdown */
.countdown-box {
  background: var(--navy-surface);
  border: 1px solid var(--navy-border);
  border-radius: var(--radius-md);
  padding: 0.9rem 1rem;
  margin-bottom: 1.4rem;
  text-align: center;
}

.countdown-label {
  font-size: 0.72rem;
  text-transform: uppercase;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  margin-bottom: 0.45rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
}

.countdown-digits {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-heading);
  font-variant-numeric: tabular-nums;
}

.countdown-unit {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.countdown-val {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--text-main);
  background: rgba(0, 0, 0, 0.35);
  padding: 0.2rem 0.45rem;
  border-radius: var(--radius-sm);
  min-width: 36px;
}

.countdown-sub {
  font-size: 0.62rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  margin-top: 0.2rem;
}

.countdown-sep {
  font-weight: 800;
  font-size: 1.1rem;
  color: var(--atleti-red);
  margin-top: -0.8rem;
}

/* Precios y Puja */
.price-bid-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-top: auto;
  padding-top: 1rem;
  border-top: 1px solid var(--navy-border);
}

.price-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 600;
}

.price-amount {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 900;
  color: var(--text-main);
  font-variant-numeric: tabular-nums;
}

.price-amount.top-bid {
  color: var(--gold-accent);
}

/* ==========================================================================
   PÁGINA DE DETALLE & SALA DE SUBASTA
   ========================================================================== */
.auction-layout {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 2rem;
  margin: 2.5rem 0 4rem;
}

@media (max-width: 960px) {
  .auction-layout {
    grid-template-columns: 1fr;
  }
}

.auction-panel {
  background: var(--navy-card);
  border: 1px solid var(--navy-border);
  border-radius: var(--radius-lg);
  padding: 2rem;
  box-shadow: var(--shadow-card);
}

.seats-badge-card {
  background: var(--navy-surface);
  border: 1px solid var(--navy-border);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  margin: 1.5rem 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  text-align: center;
}

@media (max-width: 600px) {
  .seats-badge-card {
    grid-template-columns: repeat(2, 1fr);
  }
}

.seat-meta-item .meta-label {
  font-size: 0.72rem;
  text-transform: uppercase;
  color: var(--text-muted);
  font-weight: 700;
}

.seat-meta-item .meta-value {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--text-main);
  margin-top: 0.2rem;
}

.bid-action-box {
  background: linear-gradient(180deg, var(--navy-surface) 0%, rgba(16, 27, 39, 0.4) 100%);
  border: 2px solid var(--atleti-red);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  box-shadow: 0 0 30px var(--atleti-red-glow);
}

.quick-bids-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
  margin: 1rem 0;
}

.btn-quick-bid {
  background: var(--navy-surface-hover);
  border: 1px solid var(--navy-border);
  color: #fff;
  padding: 0.75rem;
  border-radius: var(--radius-md);
  font-weight: 800;
  cursor: pointer;
  transition: all var(--transition-fast);
  font-family: var(--font-heading);
}

.btn-quick-bid:hover {
  background: var(--atleti-red);
  border-color: var(--atleti-red);
  transform: translateY(-2px);
}

/* Historial de Pujas */
.bids-history-list {
  list-style: none;
  max-height: 380px;
  overflow-y: auto;
  padding-right: 0.5rem;
}

.bid-history-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--navy-border);
  transition: background var(--transition-fast);
}

.bid-history-item:first-child {
  background: rgba(229, 168, 35, 0.08);
  border-radius: var(--radius-sm);
  border-left: 3px solid var(--gold-accent);
}

.bid-history-user {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 600;
  font-size: 0.9rem;
}

.bid-history-user .winner-badge {
  background: var(--gold-accent);
  color: #000;
  font-size: 0.68rem;
  font-weight: 900;
  padding: 0.15rem 0.45rem;
  border-radius: 4px;
}

.bid-history-amount {
  font-family: var(--font-heading);
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--text-main);
}

/* ==========================================================================
   PASES DIGITALES & 3 CÓDIGOS QR (ESTILO TARJETA VIP ABONADO ATLETI)
   ========================================================================== */
.qr-container-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
  gap: 1.75rem;
  margin: 2rem 0;
}

.qr-ticket-card {
  background: #FFFFFF;
  color: #0A1118;
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.7);
  position: relative;
  overflow: hidden;
  text-align: center;
  border: 2px solid #E2E8F0;
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}

.qr-ticket-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 45px rgba(203, 53, 36, 0.25);
  border-color: var(--atleti-red);
}

.qr-ticket-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 8px;
  background: repeating-linear-gradient(
    90deg, 
    #CB3524 0px, 
    #CB3524 20px, 
    #FFFFFF 20px, 
    #FFFFFF 40px,
    #0F3375 40px,
    #0F3375 60px
  );
}

.qr-ticket-header {
  margin-bottom: 1.25rem;
}

.qr-ticket-header h4 {
  color: #0A1118;
  font-size: 1.2rem;
  font-weight: 900;
  margin: 0.2rem 0;
}

.qr-ticket-header p {
  color: #64748B;
  font-size: 0.82rem;
  font-weight: 700;
}

.qr-canvas-wrapper {
  background: #f8fafc;
  padding: 1.1rem;
  border-radius: var(--radius-md);
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 1.25rem;
  border: 1px solid #E2E8F0;
  box-shadow: inset 0 2px 6px rgba(0,0,0,0.04);
}

.qr-canvas-wrapper canvas, .qr-canvas-wrapper img {
  max-width: 180px;
  max-height: 180px;
}

.qr-ticket-footer {
  font-size: 0.84rem;
  font-weight: 700;
  color: #1E293B;
  border-top: 2px dashed #CBD5E1;
  padding-top: 0.95rem;
  background: rgba(248, 250, 252, 0.6);
  margin-inline: -1.75rem;
  margin-bottom: -0.5rem;
  padding-inline: 1.75rem;
}

/* ==========================================================================
   FORMULARIOS & INPUTS
   ========================================================================== */
.form-group {
  margin-bottom: 1.25rem;
}

.form-label {
  display: block;
  font-size: 0.84rem;
  font-weight: 700;
  color: var(--text-secondary);
  margin-bottom: 0.45rem;
}

.form-control {
  width: 100%;
  background: var(--navy-surface);
  border: 1px solid var(--navy-border);
  color: #fff;
  font-family: var(--font-body);
  font-size: 0.95rem;
  padding: 0.75rem 1rem;
  border-radius: var(--radius-md);
  transition: all var(--transition-fast);
}

.form-control:focus {
  outline: none;
  border-color: var(--atleti-red);
  box-shadow: 0 0 0 3px var(--atleti-red-glow);
  background: var(--navy-surface-hover);
}

.form-control::placeholder {
  color: var(--text-muted);
}

/* ==========================================================================
   TABLAS & PANELES ADMIN
   ========================================================================== */
.admin-card {
  background: var(--navy-card);
  border: 1px solid var(--navy-border);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  box-shadow: var(--shadow-card);
  margin-bottom: 2rem;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.25rem;
  margin-bottom: 2rem;
}

.stat-box {
  background: var(--navy-surface);
  border: 1px solid var(--navy-border);
  border-radius: var(--radius-md);
  padding: 1.4rem;
}

.stat-box .stat-label {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-muted);
}

.stat-box .stat-number {
  font-family: var(--font-heading);
  font-size: 1.85rem;
  font-weight: 900;
  color: var(--text-main);
  margin-top: 0.35rem;
}

.stat-box .stat-number.gold { color: var(--gold-accent); }
.stat-box .stat-number.green { color: var(--green-success); }
.stat-box .stat-number.red { color: var(--atleti-red); }

.table-responsive {
  width: 100%;
  overflow-x: auto;
}

.custom-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.9rem;
}

.custom-table th {
  background: var(--navy-surface);
  padding: 0.9rem 1rem;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-secondary);
  border-bottom: 1px solid var(--navy-border);
}

.custom-table td {
  padding: 1rem;
  border-bottom: 1px solid var(--navy-border);
  color: var(--text-secondary);
}

.custom-table tr:hover td {
  background: var(--navy-surface-hover);
  color: #fff;
}

/* ==========================================================================
   ALERTAS & FLASH MESSAGES
   ========================================================================== */
.alert {
  padding: 1rem 1.25rem;
  border-radius: var(--radius-md);
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.alert-success {
  background: var(--green-bg);
  border: 1px solid rgba(16, 185, 129, 0.4);
  color: #6EE7B7;
}

.alert-danger {
  background: var(--red-bg);
  border: 1px solid rgba(239, 68, 68, 0.4);
  color: #FCA5A5;
}

.alert-warning {
  background: var(--yellow-bg);
  border: 1px solid rgba(245, 158, 11, 0.4);
  color: #FDE68A;
}

/* Footer */
.footer {
  margin-top: auto;
  background: var(--navy-surface);
  border-top: 1px solid var(--navy-border);
  padding: 2.5rem 0;
  color: var(--text-muted);
  font-size: 0.85rem;
}

.footer-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1.5rem;
}

/* ==========================================================================
   OPTIMIZACIONES MÓVILES & ELIMINACIÓN DE DESPLAZAMIENTO LATERAL
   ========================================================================== */
@media (max-width: 860px) {
  .navbar {
    height: auto;
    padding: 0.6rem 0;
    top: 5px;
  }

  .nav-container {
    flex-direction: column;
    align-items: stretch;
    gap: 0.6rem;
  }

  .nav-brand {
    justify-content: space-between;
    width: 100%;
    font-size: 1.1rem;
  }

  .nav-links {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    gap: 0.4rem;
    padding-bottom: 0.25rem;
    scrollbar-width: none;
    width: 100%;
  }

  .nav-links::-webkit-scrollbar {
    display: none;
  }

  .nav-link {
    font-size: 0.82rem;
    padding: 0.35rem 0.65rem;
    white-space: nowrap;
    flex-shrink: 0;
    background: rgba(255,255,255,0.04);
    border-radius: var(--radius-sm);
  }

  .nav-actions {
    width: 100%;
    justify-content: stretch;
  }

  .nav-actions .btn {
    flex: 1;
  }
}

@media (max-width: 768px) {
  .container {
    padding: 0 0.85rem;
    max-width: 100%;
  }

  .hero-banner {
    padding: 1.5rem 0 2rem;
  }

  .hero-title {
    font-size: 1.85rem !important;
    line-height: 1.25 !important;
  }

  .hero-subtitle {
    font-size: 0.9rem !important;
  }

  .admin-card {
    padding: 1.15rem 0.9rem !important;
    border-radius: var(--radius-md);
  }

  .match-grid {
    grid-template-columns: 1fr !important;
    gap: 1.25rem;
  }

  .match-teams {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 0.4rem !important;
  }

  .team-box {
    width: 42% !important;
    min-width: 0 !important;
    padding: 0.25rem !important;
  }

  .team-logo {
    width: 52px !important;
    height: 52px !important;
    margin: 0 auto 0.35rem !important;
  }

  .team-name {
    font-size: 0.9rem !important;
    word-break: break-word;
  }

  .match-vs {
    font-size: 1.1rem !important;
    padding: 0 0.2rem !important;
  }

  .seats-badge-card {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 0.5rem !important;
    padding: 0.75rem !important;
  }

  .seat-meta-item .meta-value {
    font-size: 0.92rem !important;
  }

  .countdown-digits {
    gap: 0.3rem !important;
  }

  .countdown-val {
    font-size: 1.05rem !important;
    min-width: 30px !important;
    padding: 0.15rem 0.35rem !important;
  }

  .countdown-unit {
    min-width: 0 !important;
  }

  .quick-bids-grid {
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 0.35rem !important;
  }

  .btn-quick-bid {
    padding: 0.5rem 0.2rem !important;
    font-size: 0.82rem !important;
  }

  .qr-container-grid {
    grid-template-columns: 1fr !important;
    gap: 1.25rem !important;
  }

  .qr-ticket-card {
    padding: 1.25rem 0.85rem !important;
  }

  .qr-canvas-wrapper canvas, .qr-canvas-wrapper img {
    max-width: 150px !important;
    max-height: 150px !important;
  }

  .price-bid-row {
    flex-direction: column;
    align-items: stretch;
    gap: 0.75rem;
    text-align: center;
  }

  .price-bid-row .btn {
    width: 100%;
  }

  /* Evitar desbordamiento en formularios divididos en 2 columnas */
  form div[style*="grid-template-columns: 1fr 1fr"],
  div[style*="grid-template-columns: 1fr 1fr"],
  div[style*="grid-template-columns: 1fr 1fr 1fr"] {
    grid-template-columns: 1fr !important;
    gap: 0.75rem !important;
  }

  div[style*="min-width: 320px"],
  div[style*="min-width: 300px"],
  div[style*="min-width: 280px"] {
    min-width: 0 !important;
    width: 100% !important;
  }
}

