/*
 * Hoja de estilos única, sin build step — reemplaza Tailwind + globals.css de la versión
 * Next.js. A propósito usa los MISMOS nombres de clase que el HTML generado por assets/inicio.js
 * y assets/torneo.js (que a su vez son un port 1:1 del markup JSX original), así que el diseño
 * queda idéntico sin tener que inventar una nomenclatura nueva ni correr ningún compilador en el
 * servidor — se sube este archivo tal cual.
 *
 * Paleta: hex exactos del mockup "Bahía Coquimbo" (Principal #0058FF, Secundario #0001FF,
 * Éxito #22C55E, Advertencia #F59E0B, En juego #EF4444, Fondo #0F172A) — copiados 1:1 desde
 * src/app/globals.css del proyecto Next.js. Sitio sin modo claro (siempre oscuro).
 */

:root {
  --background: #0F172A;
  --foreground: #F8FAFC;
  --card: #16213A;
  --card-foreground: #F8FAFC;

  --primary: #0058FF;
  --primary-foreground: #FFFFFF;
  --secondary: #0001FF;
  --secondary-foreground: #FFFFFF;

  --success: #22C55E;
  --success-foreground: #FFFFFF;
  --warning: #F59E0B;
  --warning-foreground: #0F172A;

  --men: #0058FF;
  --men-foreground: #FFFFFF;
  --women: #ec6499;
  --women-foreground: #2a0a14;

  --muted: #1E293B;
  --muted-foreground: #94A3B8;
  --destructive: #EF4444;
  --destructive-foreground: #FFFFFF;
  --border: rgba(255, 255, 255, 0.1);
  --radius: 0.625rem;

  --rose-500: #f43f5e;
  --amber-500: #f59e0b;
  --emerald-500: #10b981;
  --sky-500: #0ea5e9;
  --violet-500: #8b5cf6;
  --fuchsia-500: #d946ef;
  --cyan-500: #06b6d4;
  --orange-500: #f97316;
}

* { box-sizing: border-box; border-color: var(--border); }
html, body { margin: 0; padding: 0; }
body {
  background-color: var(--background);
  color: var(--foreground);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
img { max-width: 100%; display: block; }
table { border-collapse: collapse; }

/* ===== Layout / display ===== */
.flex { display: flex; }
.inline-flex { display: inline-flex; }
.grid { display: grid; }
.hidden { display: none; }
.flex-col { flex-direction: column; }
.flex-wrap { flex-wrap: wrap; }
.flex-1 { flex: 1 1 0%; }
.shrink-0 { flex-shrink: 0; }
.items-center { align-items: center; }
.items-baseline { align-items: baseline; }
.items-start { align-items: flex-start; }
.items-end { align-items: flex-end; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }
.justify-around { justify-content: space-around; }
.grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid-cols-5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.overflow-hidden { overflow: hidden; }
.overflow-x-auto { overflow-x: auto; }
.relative { position: relative; }
.absolute { position: absolute; }
.fixed { position: fixed; }
.sticky { position: sticky; }
.inset-0 { top: 0; right: 0; bottom: 0; left: 0; }
.inset-x-0 { left: 0; right: 0; }
.top-0 { top: 0; }
.top-1\/2 { top: 50%; }
.bottom-0 { bottom: 0; }
.left-3 { left: 0.75rem; }
.-right-0\.5 { right: -0.125rem; }
.-right-6 { right: -1.5rem; }
.-translate-y-1\/2 { transform: translateY(-50%); }
.z-10 { z-index: 10; }
.z-20 { z-index: 20; }
.z-30 { z-index: 30; }
.min-w-0 { min-width: 0; }
.min-w-max { min-width: max-content; }
.max-w-2xl { max-width: 42rem; }
.max-w-6xl { max-width: 72rem; }
.max-w-xs { max-width: 20rem; }
.w-full { width: 100%; }
.w-fit { width: fit-content; }
.h-full { height: 100%; }
.min-h-screen { min-height: 100vh; }
.mx-auto { margin-left: auto; margin-right: auto; }
.-mx-4 { margin-left: -1rem; margin-right: -1rem; }
.mt-1 { margin-top: 0.25rem; }
.mb-3 { margin-bottom: 0.75rem; }
.pointer-events-none { pointer-events: none; }
.object-cover { object-fit: cover; }
.whitespace-nowrap { white-space: nowrap; }

/* ===== Sizing ===== */
.w-1\.5 { width: 0.375rem; } .h-1\.5 { height: 0.375rem; }
.w-2 { width: 0.5rem; } .h-2 { height: 0.5rem; }
.w-3 { width: 0.75rem; } .h-3 { height: 0.75rem; }
.w-3\.5 { width: 0.875rem; } .h-3\.5 { height: 0.875rem; }
.w-4 { width: 1rem; } .h-4 { height: 1rem; }
.w-5 { width: 1.25rem; } .h-5 { height: 1.25rem; }
.w-6 { width: 1.5rem; } .h-6 { height: 1.5rem; }
.w-8 { width: 2rem; } .h-8 { height: 2rem; }
.w-9 { width: 2.25rem; } .h-9 { height: 2.25rem; }
.w-10 { width: 2.5rem; } .h-10 { height: 2.5rem; }
.w-11 { width: 2.75rem; } .h-11 { height: 2.75rem; }
.w-12 { width: 3rem; } .h-12 { height: 3rem; }
.w-16 { width: 4rem; } .h-16 { height: 4rem; }
.w-24 { width: 6rem; }
.w-56 { width: 14rem; }
.h-px { height: 1px; }

/* ===== Spacing: padding / gap ===== */
.p-3 { padding: 0.75rem; } .p-4 { padding: 1rem; }
.px-0\.5 { padding-left: 0.125rem; padding-right: 0.125rem; }
.px-1 { padding-left: 0.25rem; padding-right: 0.25rem; }
.px-1\.5 { padding-left: 0.375rem; padding-right: 0.375rem; }
.px-2 { padding-left: 0.5rem; padding-right: 0.5rem; }
.px-2\.5 { padding-left: 0.625rem; padding-right: 0.625rem; }
.px-3 { padding-left: 0.75rem; padding-right: 0.75rem; }
.px-4 { padding-left: 1rem; padding-right: 1rem; }
.py-0\.5 { padding-top: 0.125rem; padding-bottom: 0.125rem; }
.py-1 { padding-top: 0.25rem; padding-bottom: 0.25rem; }
.py-1\.5 { padding-top: 0.375rem; padding-bottom: 0.375rem; }
.py-2 { padding-top: 0.5rem; padding-bottom: 0.5rem; }
.py-2\.5 { padding-top: 0.625rem; padding-bottom: 0.625rem; }
.py-3 { padding-top: 0.75rem; padding-bottom: 0.75rem; }
.py-6 { padding-top: 1.5rem; padding-bottom: 1.5rem; }
.py-8 { padding-top: 2rem; padding-bottom: 2rem; }
.py-10 { padding-top: 2.5rem; padding-bottom: 2.5rem; }
.py-12 { padding-top: 3rem; padding-bottom: 3rem; }
.py-16 { padding-top: 4rem; padding-bottom: 4rem; }
.pt-2 { padding-top: 0.5rem; } .pt-2\.5 { padding-top: 0.625rem; }
.pb-1 { padding-bottom: 0.25rem; } .pb-1\.5 { padding-bottom: 0.375rem; }
.pb-2 { padding-bottom: 0.5rem; } .pb-8 { padding-bottom: 2rem; } .pb-28 { padding-bottom: 7rem; }
.pl-9 { padding-left: 2.25rem; } .pr-3 { padding-right: 0.75rem; }

.gap-0\.5 { gap: 0.125rem; } .gap-1 { gap: 0.25rem; } .gap-1\.5 { gap: 0.375rem; }
.gap-2 { gap: 0.5rem; } .gap-3 { gap: 0.75rem; } .gap-4 { gap: 1rem; } .gap-6 { gap: 1.5rem; }
.gap-x-2 { column-gap: 0.5rem; } .gap-x-4 { column-gap: 1rem; }
.gap-y-0\.5 { row-gap: 0.125rem; } .gap-y-1\.5 { row-gap: 0.375rem; }

.space-y-1 > * + * { margin-top: 0.25rem; }
.space-y-2 > * + * { margin-top: 0.5rem; }
.space-y-3 > * + * { margin-top: 0.75rem; }
.space-y-4 > * + * { margin-top: 1rem; }
.space-y-5 > * + * { margin-top: 1.25rem; }
.space-y-6 > * + * { margin-top: 1.5rem; }
.space-y-8 > * + * { margin-top: 2rem; }

.divide-y > * + * { border-top-width: 1px; border-top-style: solid; }
.divide-border\/60 > * + * { border-top-color: color-mix(in srgb, var(--border) 60%, transparent); }

/* ===== Typography ===== */
.text-\[10px\] { font-size: 10px; line-height: 1.3; }
.text-\[11px\] { font-size: 11px; line-height: 1.3; }
.text-xs { font-size: 0.75rem; line-height: 1rem; }
.text-sm { font-size: 0.875rem; line-height: 1.25rem; }
.text-base { font-size: 1rem; line-height: 1.5rem; }
.text-lg { font-size: 1.125rem; line-height: 1.75rem; }
.text-xl { font-size: 1.25rem; line-height: 1.75rem; }
.text-2xl { font-size: 1.5rem; line-height: 2rem; }
.font-medium { font-weight: 500; }
.font-semibold { font-weight: 600; }
.font-bold { font-weight: 700; }
.font-black { font-weight: 900; }
.font-mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.uppercase { text-transform: uppercase; }
.capitalize { text-transform: capitalize; }
.italic { font-style: italic; }
.tracking-wide { letter-spacing: 0.025em; }
.leading-tight { line-height: 1.25; }
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.outline-none { outline: none; }

/* ===== Colores de fondo / texto / borde ===== */
.bg-background { background-color: var(--background); }
.bg-card { background-color: var(--card); }
.bg-card\/95 { background-color: color-mix(in srgb, var(--card) 95%, transparent); }
.bg-primary { background-color: var(--primary); }
.bg-primary\/15 { background-color: color-mix(in srgb, var(--primary) 15%, transparent); }
.bg-primary\/20 { background-color: color-mix(in srgb, var(--primary) 20%, transparent); }
.bg-secondary { background-color: var(--secondary); }
.bg-success { background-color: var(--success); }
.bg-warning { background-color: var(--warning); }
.bg-destructive { background-color: var(--destructive); }
.bg-destructive\/10 { background-color: color-mix(in srgb, var(--destructive) 10%, transparent); }
.bg-destructive\/15 { background-color: color-mix(in srgb, var(--destructive) 15%, transparent); }
.bg-men { background-color: var(--men); }
.bg-women { background-color: var(--women); }
.bg-muted { background-color: var(--muted); }
.bg-white { background-color: #fff; }
.bg-white\/20 { background-color: rgba(255,255,255,0.2); }
.bg-black\/50 { background-color: rgba(0,0,0,0.5); }
.bg-rose-500 { background-color: var(--rose-500); }
.bg-amber-500 { background-color: var(--amber-500); }
.bg-emerald-500 { background-color: var(--emerald-500); }
.bg-sky-500 { background-color: var(--sky-500); }
.bg-violet-500 { background-color: var(--violet-500); }
.bg-fuchsia-500 { background-color: var(--fuchsia-500); }
.bg-cyan-500 { background-color: var(--cyan-500); }
.bg-orange-500 { background-color: var(--orange-500); }

.bg-gradient-to-br.from-primary\/25.via-card.to-card {
  background-image: linear-gradient(to bottom right, color-mix(in srgb, var(--primary) 25%, transparent), var(--card), var(--card));
}
.bg-gradient-hero {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
}

.text-foreground { color: var(--foreground); }
.text-muted-foreground { color: var(--muted-foreground); }
.text-primary { color: var(--primary); }
.text-success { color: var(--success); }
.text-warning { color: var(--warning); }
.text-destructive { color: var(--destructive); }
.text-primary-foreground { color: var(--primary-foreground); }
.text-success-foreground { color: var(--success-foreground); }
.text-destructive-foreground { color: var(--destructive-foreground); }
.text-white { color: #fff; }
.text-white\/70 { color: rgba(255,255,255,0.7); }
.text-white\/75 { color: rgba(255,255,255,0.75); }
.text-white\/80 { color: rgba(255,255,255,0.8); }

.border { border-width: 1px; border-style: solid; }
.border-t { border-top-width: 1px; border-top-style: solid; }
.border-b { border-bottom-width: 1px; border-bottom-style: solid; }
.border-4 { border-width: 4px; border-style: solid; }
.border-border { border-color: var(--border); }
.border-border\/60 { border-color: color-mix(in srgb, var(--border) 60%, transparent); }
.border-primary { border-color: var(--primary); }
.border-destructive\/30 { border-color: color-mix(in srgb, var(--destructive) 30%, transparent); }
.border-t-transparent { border-top-color: transparent; }
.border-transparent { border-color: transparent; }

/* ===== Efectos ===== */
.rounded { border-radius: 0.25rem; }
.rounded-md { border-radius: 0.375rem; }
.rounded-lg { border-radius: 0.5rem; }
.rounded-xl { border-radius: 0.75rem; }
.rounded-2xl { border-radius: 1rem; }
.rounded-t-2xl { border-top-left-radius: 1rem; border-top-right-radius: 1rem; }
.rounded-full { border-radius: 9999px; }
.shadow-sm { box-shadow: 0 1px 2px 0 rgba(0,0,0,0.3); }
.shadow-2xs { box-shadow: 0 1px 1px 0 rgba(0,0,0,0.2); }
.shadow-lg { box-shadow: 0 10px 25px -5px rgba(0,0,0,0.4), 0 8px 10px -6px rgba(0,0,0,0.3); }
.ring-1 { box-shadow: 0 0 0 1px var(--ring-color, var(--border)); }
.ring-2 { box-shadow: 0 0 0 2px var(--ring-color, var(--primary)); }
.ring-border { --ring-color: var(--border); }
.ring-card { --ring-color: var(--card); }
.ring-white\/20 { --ring-color: rgba(255,255,255,0.2); }
.opacity-75 { opacity: 0.75; }
.backdrop-blur { backdrop-filter: blur(8px); }

/* ===== Animaciones ===== */
@keyframes bvch-spin { to { transform: rotate(360deg); } }
.animate-spin { animation: bvch-spin 0.7s linear infinite; }
@keyframes bvch-ping { 75%, 100% { transform: scale(2); opacity: 0; } }
.animate-ping { animation: bvch-ping 1s cubic-bezier(0,0,0.2,1) infinite; }
@keyframes bvch-pulse { 50% { opacity: 0.5; } }
.animate-pulse { animation: bvch-pulse 2s cubic-bezier(0.4,0,0.6,1) infinite; }

/* ===== Interacción (hover/focus/placeholder) ===== */
.transition-colors { transition: background-color .15s, color .15s, border-color .15s; }
.hover\:border-primary\/50:hover { border-color: color-mix(in srgb, var(--primary) 50%, transparent); }
.hover\:text-primary:hover { color: var(--primary); }
.hover\:text-foreground:hover { color: var(--foreground); }
.hover\:underline:hover { text-decoration: underline; }
.hover\:bg-destructive:hover { background-color: var(--destructive); }
.hover\:bg-destructive\/20:hover { background-color: color-mix(in srgb, var(--destructive) 20%, transparent); }
.hover\:bg-success:hover { background-color: var(--success); }
.hover\:bg-muted\/60:hover { background-color: color-mix(in srgb, var(--muted) 60%, transparent); }
.hover\:opacity-100:hover { opacity: 1; }
.focus\:ring-2:focus { box-shadow: 0 0 0 2px var(--ring-color, var(--primary)); }
.focus\:ring-primary:focus { --ring-color: var(--primary); }
input.placeholder\:text-muted-foreground::placeholder { color: var(--muted-foreground); }
.last\:border-0:last-child { border-width: 0; }

@supports (backdrop-filter: blur(1px)) {
  .supports-backdrop\:bg-card\/80 { background-color: color-mix(in srgb, var(--card) 80%, transparent); }
}
@media (min-width: 640px) {
  .sm\:block { display: block; }
}

input, select {
  background-color: var(--card);
  color: var(--foreground);
  border: 1px solid var(--border);
  font: inherit;
}

/* ===== Tabla (Grupos / Ranking) ===== */
.bvch-table { width: 100%; font-size: 0.875rem; }
.bvch-table thead tr { font-size: 11px; text-transform: uppercase; letter-spacing: 0.025em; color: var(--muted-foreground); border-bottom: 1px solid var(--border); }
.bvch-table th { text-align: left; font-weight: 700; padding: 0.5rem 0.5rem; }
.bvch-table td { padding: 0.5rem 0.5rem; }
.bvch-table tr:not(:last-child) { border-bottom: 1px solid color-mix(in srgb, var(--border) 60%, transparent); }

/* ===== Scrollbar de las tiras horizontales (fechas/pastillas) sin estorbar el diseño ===== */
.overflow-x-auto::-webkit-scrollbar { height: 0; }
