/* ============================================================
   PUMAS DEV LAB · Sistema Editorial Deportivo
   Fondo oscuro · acento oro · tipografía Barlow Condensed
   ============================================================ */

/* ---------- Variables del sistema editorial ---------- */
:root {
    --oro:           #DCCC9C;
    --fondo:         #141414;
    --panel:         #1D1D1D;
    --piel:          #F2F2F2;
    --gris:          #A5A5A5;

    /* Compatibilidad con el sistema anterior */
    --primary:       #DCCC9C;
    --secondary:     #A5A5A5;
    --dark:          #141414;
    --dark-card:     #1D1D1D;
    --light:         #F2F2F2;
    --gray:          #A5A5A5;
    --linea:         #333333;
    --alerta:        #DCCC9C;
    --degradado:     none;

    /* Tokens de superficie */
    --vidrio:        #1D1D1D;
    --vidrio-fuerte: #141414;
    --borde:         #333333;
    --borde-medio:   #444444;
    --borde-fuerte:  #555555;
    --sombra:        0 26px 50px rgba(0, 0, 0, 0.70);
    --brillo:        0 26px 50px rgba(0,0,0,.7);
    --radio:         0px;
    --radio-sm:      0px;
    --radio-xs:      0px;
    --ease:          cubic-bezier(0.2, 0.8, 0.2, 1);
    --ease-rebote:   cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* ---------- Fondo editorial con franja diagonal ---------- */
body {
    background-color: #141414;
    background-image: linear-gradient(
        19deg,
        #141414 0%,
        #141414 22%,
        #1A1A1A 22%,
        #1A1A1A 78%,
        #141414 78%
    );
    background-attachment: fixed;
    background-size: 300vw 300vw;
    background-position: center center;
    color: #F2F2F2;
}

/* Barra dorada 12px en el borde superior derecho */
body::after {
    content: '';
    position: fixed;
    top: 0;
    right: 0;
    width: 12px;
    height: 100%;
    background: #DCCC9C;
    z-index: 9000;
    pointer-events: none;
}

::selection { background: rgba(255,255,255,0.20); color: #000; }

* { scrollbar-width: thin; scrollbar-color: rgba(255,255,255,0.10) transparent; }
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.08); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,0.18); }

:focus-visible { outline: 1.5px solid rgba(255,255,255,0.60); outline-offset: 2px; }

/* ---------- Tipografía global → Inter ---------- */
body, button, input, select, textarea {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}
h1, h2, h3, h4, h5, h6 {
    font-family: 'Inter', sans-serif;
    font-weight: 700;
    letter-spacing: -0.02em;
}

/* ---------- Links ---------- */
a {
    color: rgba(255, 255, 255, 0.65);
    text-decoration: none;
    transition: color 0.2s;
}
a:hover { color: #ffffff; }
a:visited { color: rgba(255, 255, 255, 0.50); }

/* ---------- Inputs globales: forzar dark en todos los contextos ---------- */
:root { color-scheme: dark; }

input:not([type="color"]):not([type="range"]):not([type="checkbox"]):not([type="radio"]),
select,
textarea {
    background-color: rgba(255, 255, 255, 0.04) !important;
    color: #ffffff !important;
    border-color: rgba(255, 255, 255, 0.10) !important;
}
input:not([type="color"]):not([type="range"]):not([type="checkbox"]):not([type="radio"]):focus,
select:focus,
textarea:focus {
    background-color: rgba(255, 255, 255, 0.07) !important;
    border-color: rgba(255, 255, 255, 0.35) !important;
    outline: none;
}
/* Remove native select appearance so background-color applies */
select {
    -webkit-appearance: none !important;
    appearance: none !important;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='rgba(255,255,255,0.4)' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E") !important;
    background-repeat: no-repeat !important;
    background-position: right 10px center !important;
    padding-right: 28px !important;
}
/* File input button */
input[type="file"]::file-selector-button {
    background: rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.75);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 6px;
    padding: 4px 12px;
    font-family: 'Inter', sans-serif;
    font-size: 0.82rem;
    cursor: pointer;
    transition: background 0.2s;
    margin-right: 8px;
}
input[type="file"]::file-selector-button:hover {
    background: rgba(255, 255, 255, 0.14);
}
/* Placeholder text */
::placeholder { color: rgba(255, 255, 255, 0.28) !important; }

/* ---------- Kickers / etiquetas de sección ---------- */
.tb-kicker {
    display: inline-flex; align-items: center; gap: 5px;
    font-family: 'Inter', sans-serif !important;
    font-size: 12px; letter-spacing: 4px; text-transform: uppercase;
    font-weight: 700;
    color: #DCCC9C;
    background: none;
    border: none;
    padding: 0;
    margin-bottom: 10px;
}
.chip-activa {
    display: inline-flex; align-items: center;
    font-family: 'Barlow Condensed', sans-serif;
    font-weight: 800;
    font-size: 0.7rem; letter-spacing: 2px; text-transform: uppercase;
    color: #141414; background: #DCCC9C; border: none;
    padding: 3px 10px;
}

/* ---------- Superficies / cards ---------- */
.card-box, .tool-container, .pagina-informe, .caja-acceso, .repisa-card {
    background: #1D1D1D;
    border: 1px solid rgba(255,255,255,.12);
    border-radius: 0;
    box-shadow: 0 26px 50px rgba(0,0,0,.7);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    transition: border-color 0.25s, box-shadow 0.25s;
}
.card-box:hover, .repisa-card:hover {
    border-color: rgba(255,255,255,.18);
    box-shadow: 0 26px 50px rgba(0,0,0,.7);
    transform: none;
}
.tool-container { padding: 28px; }
.grafica, .kpi { border-color: #333; background: rgba(255,255,255,0.02); }

/* Sin línea de luz */
.card-box::before, .tool-container::before, .pagina-informe::before { display: none; }

/* ---------- Títulos ---------- */
.section-title {
    border-bottom: none; position: relative; padding-bottom: 12px;
    font-family: 'Barlow Condensed', sans-serif !important;
    font-weight: 800 !important;
    font-size: clamp(1.8rem, 4vw, 2.8rem);
    text-transform: uppercase !important;
    letter-spacing: -1px;
    line-height: 0.9;
    color: #F2F2F2;
    text-shadow: none;
    background: none; -webkit-background-clip: unset; background-clip: unset;
}
.section-title::after { display: none; }
.card-titulo {
    font-family: 'Inter', sans-serif !important;
    font-weight: 700 !important;
    letter-spacing: 3px; color: #DCCC9C;
    font-size: 0.72rem; text-transform: uppercase;
}

/* ---------- Botones ---------- */
.btn-generar, .btn-sec, .btn-volver, .sub-btn-group button, .sb-boton, .sb-colapsar, .tb-herr, .tb-icono, .tb-logo {
    border-radius: 0 !important;
    transition: background 0.2s, color 0.2s, border-color 0.2s;
}

/* CTA principal: outline oro → fondo oro en hover */
.btn-generar {
    position: relative; overflow: hidden;
    background: transparent !important;
    color: #F2F2F2 !important;
    border: 1px solid rgba(220,204,156,0.60) !important;
    letter-spacing: 2px; font-weight: 700;
    box-shadow: none !important;
}
.btn-generar::after { display: none; }
.btn-generar:hover {
    background: #DCCC9C !important;
    color: #141414 !important;
    border-color: #DCCC9C !important;
    box-shadow: none !important;
    transform: none;
}
.btn-generar:disabled { opacity: 0.35 !important; cursor: not-allowed; }

/* Secundario */
.btn-sec {
    border-color: #444 !important;
    background: rgba(255,255,255,0.03) !important;
    color: rgba(255,255,255,0.55) !important;
}
.btn-sec:hover:not(:disabled) {
    background: rgba(255,255,255,0.07) !important;
    border-color: #555 !important;
    color: #fff !important;
}
.btn-peligro { border-color: rgba(220,80,80,0.35) !important; background: rgba(220,80,80,0.04) !important; color: rgba(255,100,100,0.80) !important; }
.btn-peligro:hover:not(:disabled) { background: rgba(220,80,80,0.85) !important; color: #fff !important; border-color: transparent !important; }
.btn-generar:active:not(:disabled), .btn-sec:active:not(:disabled) { transform: none; }
.btn-link { text-decoration: none; border-bottom: 1px solid rgba(255,255,255,0.20); padding: 0 1px; transition: color 0.2s, border-color 0.2s; }
.btn-link:hover { color: #fff; border-bottom-color: rgba(255,255,255,0.55); }

/* ---------- Tab navigation (adm-tabs, etc.) ---------- */
.adm-tabs {
    display: flex;
    align-items: center;
    gap: 2px;
    padding: 4px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid #333;
    border-radius: 0;
    width: fit-content;
    margin-bottom: 24px;
}
.adm-tabs button {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 7px 14px;
    background: transparent !important;
    border: none !important;
    border-radius: 0 !important;
    color: rgba(255, 255, 255, 0.42) !important;
    font-family: 'Inter', sans-serif;
    font-size: 0.78rem;
    font-weight: 500;
    letter-spacing: 0.01em;
    cursor: pointer;
    transition: color 0.18s, background 0.18s;
    white-space: nowrap;
}
.adm-tabs button i {
    font-size: 0.75rem;
    opacity: 0.75;
}
.adm-tabs button:hover:not(.activo) {
    color: rgba(255, 255, 255, 0.78) !important;
    background: rgba(255, 255, 255, 0.05) !important;
}
.adm-tabs button.activo {
    background: rgba(220,204,156,0.08) !important;
    color: #DCCC9C !important;
    font-weight: 600;
    border-bottom: 2px solid #DCCC9C !important;
}
.adm-tabs button.activo i { opacity: 1; }

/* ---------- Tablero sidebar — bloque guardar ---------- */
.tb-fila-botones {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
/* Caja super admin */
#tb-contenido.tb-contenido {
    background: rgba(255, 255, 255, 0.025);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
#tb-contenido h4 {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.65rem !important;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.35) !important;
    font-weight: 500 !important;
    margin: 0 !important;
    border-left: 2px solid rgba(255, 255, 255, 0.20);
    padding-left: 7px;
}
#tb-contenido h4 i { color: rgba(255, 180, 0, 0.55); font-size: 0.65rem; }
#tb-contenido h4 em { color: rgba(255, 255, 255, 0.20); font-style: normal; }
#tb-contenido input[type="text"],
#tb-contenido input:not([type]),
#tb-contenido input[maxlength] {
    width: 100%;
    box-sizing: border-box;
    padding: 7px 10px;
    background: rgba(255,255,255,0.04) !important;
    border: 1px solid rgba(255,255,255,0.09) !important;
    border-radius: 7px !important;
    color: #fff !important;
    font-size: 0.82rem;
}
#tb-contenido input:focus {
    border-color: rgba(255,255,255,0.28) !important;
    background: rgba(255,255,255,0.07) !important;
    outline: none;
}
#tb-contenido label.check {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.78rem;
    color: rgba(255,255,255,0.45);
    cursor: pointer;
}
/* Caja informe del video */
.tb-informe-caja {
    display: flex;
    flex-direction: column;
    gap: 5px;
    padding: 10px 12px;
    background: rgba(255,255,255,0.02);
    border: 1px solid rgba(255,255,255,0.07);
    border-radius: 8px;
    font-size: 0.65rem;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: rgba(255,255,255,0.30);
}
.tb-informe-caja select {
    width: 100%;
    font-size: 0.8rem;
    text-transform: none;
    letter-spacing: 0;
    color: rgba(255,255,255,0.75) !important;
    background: rgba(255,255,255,0.04) !important;
    border: 1px solid rgba(255,255,255,0.10) !important;
    border-radius: 6px !important;
    padding: 6px 28px 6px 10px !important;
}
.tb-informe-caja small.ayuda {
    font-size: 0.72rem;
    letter-spacing: 0;
    text-transform: none;
    color: rgba(255,255,255,0.22);
}

/* ---------- Formularios ---------- */
.form-group input, .form-group select, .form-jugador input, .form-jugador select, .tabla-datos select,
.tabla-input input[type="number"], .ia-celda input[type="number"],
.tb-panel input:not([type]), .tb-panel input[name="nombre"], .tb-panel select, .org-activa select {
    border-radius: var(--radio-sm) !important;
    background: rgba(255,255,255,0.03) !important;
    border: 1px solid var(--borde-medio) !important;
    color: #ffffff !important;
    transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease);
}
.form-group input:focus, .form-group select:focus, .form-jugador input:focus, .form-jugador select:focus,
.tabla-input input:focus, .tb-panel input:focus, .tb-panel select:focus {
    border-color: rgba(255,255,255,0.40) !important;
    background: rgba(255,255,255,0.05) !important;
    box-shadow: 0 0 0 3px rgba(255,255,255,0.05) !important;
    outline: none;
}
.form-group label, .form-jugador label { color: rgba(255,255,255,0.38) !important; letter-spacing: 1.5px; font-size: 0.72rem; }
input[type="color"] { border-radius: var(--radio-xs) !important; }
input[type="range"] { accent-color: #ffffff; }

/* ---------- Tablas ---------- */
.tabla-scroll { border-radius: var(--radio-sm); }
.tabla-datos tbody tr, .tabla-informe tbody tr { transition: background 0.2s; }
.tabla-datos tbody tr:hover, .tabla-informe tbody tr:hover { background: rgba(255,255,255,0.03); }
.tabla-datos th { border-bottom-color: var(--borde-medio); color: rgba(255,255,255,0.32); letter-spacing: 1.5px; font-size: 0.68rem; }

/* ---------- Logos y etiquetas ---------- */
.rol-tag, .igl-tag, .badge-pronto { border-radius: 999px; padding: 2px 10px; }
.logo-mini, .logo-medio, .logo-grande { border-radius: var(--radio-sm); }
.logo-grande { box-shadow: 0 0 0 1px var(--borde-medio); }

/* ---------- Sidebar CORA: negro total ---------- */
.sidebar {
    background: rgba(0, 0, 0, 0.98) !important;
    border-right: 1px solid var(--borde) !important;
    backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px);
}
.sb-marca { border-bottom: 1px solid var(--borde) !important; padding-bottom: 14px; margin-bottom: 6px; }
.sb-marca > i { color: rgba(255,255,255,0.80) !important; animation: latido 3.2s ease-in-out infinite; }
.sb-titulo span { color: rgba(255,255,255,0.18); letter-spacing: 2px; font-size: 0.6rem; font-family: 'Inter', sans-serif; text-transform: uppercase; }

.sb-nav > button {
    border-radius: var(--radio-sm); position: relative;
    color: rgba(255,255,255,0.35) !important;
    border-left: 2px solid transparent !important;
    background: transparent !important;
}
.sb-nav > button i { transition: transform 0.25s var(--ease-rebote); }
.sb-nav > button:hover i { transform: translateX(2px) scale(1.08); }
.sb-nav > button:hover { background: rgba(255,255,255,0.04) !important; color: rgba(255,255,255,0.75) !important; border-left-color: rgba(255,255,255,0.12) !important; }
.sb-nav > button.activo { color: #ffffff !important; background: rgba(255,255,255,0.07) !important; border-left-color: rgba(255,255,255,0.80) !important; }
.sb-nav > button.activo::before {
    content: ''; position: absolute; left: -12px; top: 20%; bottom: 20%; width: 2px;
    background: #ffffff; box-shadow: 0 0 10px rgba(255,255,255,0.40);
    animation: crecerY 0.3s var(--ease) both;
}

.sb-sub.abierto { animation: deslizarAbajo 0.3s var(--ease) both; }
.sb-sub button { border-radius: var(--radio-xs); color: rgba(255,255,255,0.28) !important; transition: color 0.2s, background 0.2s, padding 0.2s; }
.sb-sub button:hover { padding-left: 14px; color: rgba(255,255,255,0.75) !important; }
.sb-pie { border-top: 1px solid var(--borde); }
.sb-boton { color: rgba(255,255,255,0.35) !important; border-color: transparent !important; }
.sb-boton:hover { color: #fff !important; background: rgba(255,255,255,0.05) !important; }
.sb-version { color: rgba(255,255,255,0.12); letter-spacing: 1.5px; font-size: 0.6rem; }

/* ---------- Topbar ---------- */
.topbar {
    background: rgba(0, 0, 0, 0.90) !important;
    border-bottom: 1px solid var(--borde) !important;
    backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
}
.punto.ok { animation: pulso 2.4s ease-out infinite; }
#statusSupabase { color: rgba(255,255,255,0.28); font-size: 0.75rem; letter-spacing: 1px; }

.org-activa { display: flex; align-items: center; gap: 8px; color: #fff; font-weight: 700; min-width: 0; }
.org-activa:empty { display: none; }
.org-activa span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 220px; }
.org-activa select { padding: 7px 30px 7px 10px; color: #fff; font-size: 0.95rem; font-weight: 700; cursor: pointer; max-width: 240px; }
.org-activa-fila { border-color: var(--borde-fuerte) !important; }

/* ---------- Pantalla de acceso ---------- */
.pantalla-acceso {
    position: relative; overflow: hidden;
    background:
        radial-gradient(ellipse 100% 55% at 50% -5%,  rgba(255,255,255,0.055) 0%, transparent 55%),
        radial-gradient(ellipse  60% 50% at 80% 90%, rgba(255,255,255,0.020) 0%, transparent 50%),
        #000000 !important;
}
.pantalla-acceso::before {
    content: ''; position: absolute; width: 700px; height: 700px; border-radius: 50%;
    background: radial-gradient(circle, rgba(255,255,255,0.028), transparent 65%);
    animation: flotar 10s ease-in-out infinite alternate; pointer-events: none;
    top: -20%; left: 50%; transform: translateX(-50%);
}
.caja-acceso {
    padding: 44px 40px;
    animation: aparecer 0.6s var(--ease) both;
    border: 1px solid rgba(255,255,255,0.10) !important;
    box-shadow: 0 0 0 1px rgba(255,255,255,0.04), 0 40px 80px rgba(0,0,0,0.80) !important;
    border-radius: var(--radio) !important;
}
.caja-acceso .logo { font-size: 1rem; letter-spacing: 4px; color: #ffffff !important; text-shadow: none !important; }
.caja-acceso .logo i { color: rgba(255,255,255,0.80) !important; }
.caja-acceso h2 { color: rgba(255,255,255,0.65); font-weight: 400; letter-spacing: 1px; }
.caja-acceso p { color: rgba(255,255,255,0.28); font-size: 0.88rem; }

/* ---------- KPI cards ---------- */
.grid-kpis .card-box i { transition: transform 0.4s var(--ease-rebote); color: rgba(255,255,255,0.55) !important; }
.grid-kpis .card-box:hover i { transform: scale(1.12) rotate(-5deg); color: #fff !important; }
.card-box .kpi-num, .kpi-valor {
    color: #ffffff !important;
    background: none !important; -webkit-background-clip: unset !important; background-clip: unset !important;
    -webkit-text-fill-color: #ffffff !important;
}
.kpi { transition: border-color 0.25s, transform 0.25s var(--ease); }
.kpi:hover { border-color: var(--borde-medio); transform: translateY(-2px); }

/* ---------- Gráficas ---------- */
.barra { background: linear-gradient(90deg, rgba(255,255,255,0.20), rgba(255,255,255,0.75)); box-shadow: none; transform-origin: left; animation: crecerX 0.9s var(--ease) both; }
.barra-pista { background: rgba(255,255,255,0.03); }
.col-barra { background: linear-gradient(0deg, rgba(255,255,255,0.30), rgba(255,255,255,0.80)); transform-origin: bottom; animation: crecerY 0.9s var(--ease) both; }
.stack { overflow: hidden; }
.stack-seg { transform-origin: left; animation: crecerX 0.8s var(--ease) both; }
.sparkline .serie { stroke-dasharray: 2400; stroke-dashoffset: 2400; animation: dibujar 1.6s var(--ease) 0.2s forwards; stroke: rgba(255,255,255,0.75) !important; }
.sparkline circle { animation: aparecer 0.4s var(--ease) both; animation-delay: 0.9s; fill: #ffffff !important; }
.nota { border-radius: 0 var(--radio-sm) var(--radio-sm) 0; background: rgba(255,255,255,0.04); border-left: 2px solid rgba(255,255,255,0.28); }

/* ---------- Toast ---------- */
.toast {
    border-radius: var(--radio); background: rgba(10,10,14,0.96) !important;
    border: 1px solid var(--borde-medio) !important; backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
    animation: toastEntra 0.4s var(--ease-rebote) both, toastSale 0.35s ease-in 3.15s forwards;
    padding-left: 18px;
}
.toast::before { content: ''; position: absolute; left: 0; top: 10px; bottom: 10px; width: 2px; background: rgba(255,255,255,0.50); border-radius: 1px; }
.toast-error::before { background: rgba(220,70,70,0.90); }
.toast-ok::before { background: rgba(255,255,255,0.90); }
.modal { animation: aparecer 0.25s ease both; backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.modal img { animation: zoomEntra 0.35s var(--ease) both; }

/* ---------- Estrategia / tablero ---------- */
.tb-panel { background: rgba(0,0,0,0.96) !important; backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); border-right: 1px solid var(--borde) !important; }
.tb-bloque { border-bottom-color: var(--borde) !important; }
.tb-herr { position: relative; border-color: var(--borde) !important; border-radius: var(--radio-sm); }
.tb-herr i { transition: transform 0.25s var(--ease-rebote); }
.tb-herr:hover i { transform: scale(1.14); }
.tb-herr.activo { background: rgba(255,255,255,0.08) !important; border-color: rgba(255,255,255,0.22) !important; color: #fff !important; }
.tb-herr kbd { position: absolute; top: 2px; right: 3px; font-family: 'Rajdhani', sans-serif; font-size: 0.58rem; color: rgba(255,255,255,0.20); }
.tb-seleccion { display: grid; grid-template-columns: repeat(5, 1fr); gap: 5px; }
.tb-seleccion .btn-sec { justify-content: center; padding: 8px 0; }
.tb-color { border-radius: 50%; transition: transform 0.2s var(--ease-rebote); }
.tb-color:hover { transform: scale(1.25); }
.tb-eq { transition: border-color 0.2s, transform 0.2s var(--ease); }
.tb-eq:hover { transform: translateX(2px); }
.tb-eq img, .tb-eq-ini { border-radius: 50%; }
.tb-flot .btn-sec { border-radius: 50%; backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.tb-pista { backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); animation: aparecer 0.3s var(--ease) both; }
.repisa-card { overflow: hidden; border-radius: var(--radio); }
.repisa-mini img { transition: transform 0.5s var(--ease); }
.repisa-card:hover .repisa-mini img { transform: scale(1.05); }

/* ---------- Informe ---------- */
.forma { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 8px; }
.forma-ficha, .pos-chip {
    display: inline-flex; align-items: center; justify-content: center; min-width: 38px; height: 34px; padding: 0 8px;
    font-family: 'Inter', sans-serif; font-size: 0.75rem; font-weight: 700; font-variant-numeric: tabular-nums;
    background: rgba(255,255,255,0.03); border: 1px solid rgba(255,255,255,0.08); color: rgba(255,255,255,0.55);
    border-radius: var(--radio-xs);
}
.forma-ficha { animation: aparecer 0.4s var(--ease-rebote) both; }
.pos-chip { min-width: 0; height: auto; padding: 2px 8px; border-radius: 999px; }
.f-booyah { background: rgba(255,255,255,0.90) !important; color: #000 !important; border-color: transparent !important; box-shadow: 0 0 14px rgba(255,255,255,0.18); }
.f-top3 { background: rgba(255,255,255,0.08); color: #fff; border-color: rgba(255,255,255,0.18); }
.f-medio { color: rgba(255,255,255,0.65); }
.f-bajo { color: rgba(255,255,255,0.28); }

/* ---------- Entrada de vistas ---------- */
.view-section.active-view { animation: entrarVista 0.5s var(--ease) both; }
.active-view .grid-kpis > *, .active-view .kpi-grid > *, .active-view .lista > *, .active-view .repisa-grid > *,
.active-view .dos-col > *, .active-view .pagina-informe, .active-view .tool-container {
    animation: aparecer 0.5s var(--ease) both;
}
.active-view :is(.grid-kpis, .kpi-grid, .lista, .repisa-grid, .dos-col) > :nth-child(2) { animation-delay: 0.05s; }
.active-view :is(.grid-kpis, .kpi-grid, .lista, .repisa-grid, .dos-col) > :nth-child(3) { animation-delay: 0.10s; }
.active-view :is(.grid-kpis, .kpi-grid, .lista, .repisa-grid, .dos-col) > :nth-child(4) { animation-delay: 0.15s; }
.active-view :is(.grid-kpis, .kpi-grid, .lista, .repisa-grid, .dos-col) > :nth-child(n+5) { animation-delay: 0.20s; }

.revelar { opacity: 0; transform: translateY(16px); transition: opacity 0.6s var(--ease), transform 0.6s var(--ease); }
.revelar.visible { opacity: 1; transform: none; }

/* ---------- Animaciones ---------- */
@keyframes entrarVista  { from { opacity: 0; transform: translateY(8px);             } to { opacity: 1; transform: none; } }
@keyframes aparecer     { from { opacity: 0; transform: translateY(10px) scale(0.985); } to { opacity: 1; transform: none; } }
@keyframes crecerX      { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@keyframes crecerY      { from { transform: scaleY(0); } to { transform: scaleY(1); } }
@keyframes dibujar      { to   { stroke-dashoffset: 0; } }
@keyframes deslizarAbajo { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
@keyframes pulso        { 0% { box-shadow: 0 0 0 0 rgba(255,255,255,0.45); } 70% { box-shadow: 0 0 0 7px rgba(255,255,255,0); } 100% { box-shadow: 0 0 0 0 rgba(255,255,255,0); } }
@keyframes latido       { 0%, 100% { opacity: 0.65; } 50% { opacity: 1; } }
@keyframes flotar       { from { transform: translateX(-50%) translateY(-25%); } to { transform: translateX(-50%) translateY(25%); } }
@keyframes toastEntra   { from { opacity: 0; transform: translate(-50%, 20px) scale(0.95); } to { opacity: 1; transform: translate(-50%, 0); } }
@keyframes toastSale    { to   { opacity: 0; transform: translate(-50%, 12px); } }
@keyframes zoomEntra    { from { opacity: 0; transform: scale(0.93); } to { opacity: 1; transform: none; } }

/* ---------- Responsive ---------- */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; animation-delay: 0s !important; transition-duration: 0.01ms !important; }
    .sparkline .serie { stroke-dashoffset: 0; }
    .revelar { opacity: 1; transform: none; }
}
@media (max-width: 992px) {
    .org-activa select { max-width: 160px; }
    .org-activa span  { max-width: 130px; }
    .card-box:hover, .repisa-card:hover { transform: none; }
}
@media (max-width: 600px) {
    .topbar { gap: 10px; padding: 10px 12px; }
    #statusSupabase { display: none; }
}

/* ---------- Hero Section ---------- */
.hero-section {
    position: relative;
    min-height: 320px;
    display: flex;
    align-items: center;
    overflow: hidden;
    padding: 60px 32px 48px;
    background:
        radial-gradient(ellipse 80% 60% at 50% -10%, rgba(255,255,255,0.055) 0%, transparent 60%),
        #000000;
    border-bottom: 1px solid rgba(255,255,255,0.07);
}
.hero-bg-grid {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255,255,255,0.025) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.025) 1px, transparent 1px);
    background-size: 48px 48px;
    mask-image: radial-gradient(ellipse 100% 100% at 50% 50%, black 20%, transparent 80%);
    -webkit-mask-image: radial-gradient(ellipse 100% 100% at 50% 50%, black 20%, transparent 80%);
    pointer-events: none;
}
.hero-content {
    position: relative;
    z-index: 1;
    max-width: 1400px;
    margin: 0 auto;
    width: 100%;
}
.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 5px 14px;
    margin-bottom: 18px;
    font-size: 0.65rem;
    font-weight: 600;
    letter-spacing: 2.5px;
    text-transform: uppercase;
    color: rgba(255,255,255,0.45);
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.10);
    border-radius: 999px;
}
.hero-badge {
    font-family: 'Inter', sans-serif !important;
    font-weight: 700;
    font-size: 12px;
    letter-spacing: 4px;
    text-transform: uppercase;
    color: #DCCC9C;
    background: none;
    border: none;
    padding: 0;
}
.hero-badge i { font-size: 0.7rem; opacity: 0.8; color: #DCCC9C; }
.hero-title {
    margin: 0 0 10px;
    font-family: 'Barlow Condensed', sans-serif !important;
    font-weight: 800 !important;
    font-size: clamp(3.5rem, 10vw, 7rem);
    letter-spacing: -2px;
    text-transform: uppercase !important;
    color: #F2F2F2;
    line-height: 0.86;
    animation: aparecer 0.6s var(--ease) both;
}
.hero-subtitle {
    margin: 0 0 28px;
    font-size: clamp(0.85rem, 2vw, 1.05rem);
    color: #A5A5A5;
    font-weight: 400;
    letter-spacing: 2px;
    text-transform: uppercase;
    animation: aparecer 0.6s var(--ease) 0.1s both;
}
.hero-stats {
    animation: aparecer 0.6s var(--ease) 0.2s both;
}

/* ============================================================
   SISTEMA EDITORIAL DEPORTIVO — overrides globales
   ============================================================ */

/* Tipografía: Barlow Condensed para títulos */
h1, h2, h3,
.section-title, .inf-titulo, .hero-title,
.tb-cabeza h2, .ms-titulo {
    font-family: 'Barlow Condensed', sans-serif !important;
    font-weight: 800 !important;
    text-transform: uppercase !important;
    letter-spacing: -1px;
    line-height: 0.9;
    font-style: normal;
}
h1 { font-size: clamp(2.5rem, 6vw, 5rem); letter-spacing: -2px; }

/* em en títulos = palabra en oro sin cursiva */
h1 em, h2 em, h3 em, .section-title em, .hero-title em {
    font-style: normal !important;
    color: #DCCC9C !important;
}

/* Texto corrido */
body, button, input, select, textarea, p, li, td, th, label, small {
    font-family: 'Inter', -apple-system, sans-serif !important;
    line-height: 1.45;
}

/* Eliminar redondeos de todos los elementos de UI */
button, input:not([type="color"]), select, textarea,
.btn-sec, .btn-generar, .btn-volver,
.sidebar, .topbar, .caja-acceso,
.toast, .modal .modal-content,
.adm-tabs, .adm-tabs button,
.ms-tab, .ms-zona-fase, .ms-st-equipo,
.tb-bloque, .tb-herr, .tb-icono, .tb-logo,
.tb-rival input, .tb-eq,
.repisa-card, .repisa-mini,
.estudio-card, .estudio-shelf, .estudio-prompt,
.formh-puesto, .formh-habilidad,
.mca-input-tools, .mca-map-card, .mca-analysis,
.cal-monedas-dialog, .canva-editor,
.sb-colapsar, .sb-boton,
.ms-drop, .nota,
.kpi, .grafica,
.tabla-datos, .tabla-informe,
.pagina-informe, .inf-seccion,
.form-group input, .form-group select,
.adm-hoja-caja, .adm-chips button,
.tb-recorte-caja, .dropdown-menu {
    border-radius: 0 !important;
}

/* Restaurar redondeo solo para lo circular */
.punto, .ms-jug-dot, .ms-controles > .btn-sec,
.mca-pin, .mca-logo-input, .mca-own-star,
.mca-cuadrante-letra, .ms-eq-logo,
.tb-eq img, .tb-eq-ini,
.logo-mini, .logo-medio, .logo-grande {
    border-radius: 50% !important;
}

/* Sidebar: panel oscuro */
.sidebar, .tb-panel, .ms-panel {
    background: #1D1D1D !important;
    border-color: #333 !important;
}

/* Topbar: plano sin blur */
.topbar {
    background: rgba(20,20,20,.96) !important;
    border-bottom: 1px solid #333 !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
}

/* Nav activo: filete oro */
.sb-nav > button.activo {
    border-left: 2px solid #DCCC9C !important;
    color: #F2F2F2 !important;
    background: rgba(220,204,156,.07) !important;
}

/* Kickers / sección labels */
.sb-titulo,
.repisa-tipo {
    font-family: 'Inter', sans-serif !important;
    font-weight: 700 !important;
    font-size: 11px !important;
    letter-spacing: 4px !important;
    text-transform: uppercase !important;
    color: #DCCC9C !important;
}

/* Bloque h3 del tablero: filete oro */
.tb-bloque h3 {
    border-left: 2px solid #DCCC9C !important;
    color: rgba(255,255,255,.35) !important;
}

/* Chips y badges */
.igl-tag, .chip-activa, .adm-chips button[data-p].activo,
.ms-tab.activo, .est-pestanas button.activo {
    background: #DCCC9C !important;
    color: #141414 !important;
    font-family: 'Barlow Condensed', sans-serif !important;
    font-weight: 800 !important;
    border: none !important;
}

/* Ítems de lista con filete oro */
.sub-btn-group button {
    border-left: 4px solid #DCCC9C !important;
    background: rgba(255,255,255,.035) !important;
    border-radius: 0 !important;
}

/* Notas: borde superior oro */
.nota {
    border-top: 3px solid #DCCC9C !important;
    border-left: none !important;
}
.nota-bien { border-top-color: var(--ok) !important; }
.nota-info { border-top-color: #A5A5A5 !important; }

/* Barra del informe */
.inf-cabecera { border-bottom: 2px solid #DCCC9C !important; }
.inf-marca { color: #DCCC9C !important; }

/* Barras de gráficas */
.barra, .col-barra { background: #DCCC9C !important; border-radius: 0 !important; }
.sparkline .serie { stroke: #DCCC9C !important; }
.sparkline circle { fill: #DCCC9C !important; }
.tb-barra b { background: #DCCC9C !important; }

/* Footer editorial */
footer {
    border-top: 2px solid #333 !important;
    color: #A5A5A5 !important;
    font-size: 15px !important;
    background: transparent !important;
    backdrop-filter: none !important;
}
footer strong, footer a, footer .creador a { color: #F2F2F2 !important; }

/* Toast sin glassmorphism */
.toast {
    background: #1D1D1D !important;
    border: 1px solid #444 !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    border-radius: 0 !important;
}

/* Login */
.caja-acceso { background: #1D1D1D !important; border-color: #333 !important; }
.caja-acceso .logo { color: #DCCC9C !important; }

/* Informe cabecera */
.pagina-informe { background: #1D1D1D !important; }

/* Select option */
select option { background: #1D1D1D; color: #F2F2F2; }

/* Pantalla de acceso: fondo oscuro */
.pantalla-acceso { background: #141414; }

/* Org / kpi chip de bienvenida */
.org-activa { color: #DCCC9C !important; }

/* hero-bg-grid: sin gradiente */
.hero-bg-grid { display: none; }

/* hero-section: fondo plano */
.hero-section {
    background: #141414 !important;
    border-bottom: 1px solid #333 !important;
}

/* hero-badge */
.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-family: 'Inter', sans-serif !important;
    font-weight: 700 !important;
    font-size: 12px !important;
    letter-spacing: 4px !important;
    text-transform: uppercase !important;
    color: #DCCC9C !important;
    background: none !important;
    border: none !important;
    padding: 0 !important;
}

/* Repisa cards */
.repisa-card {
    background: #1D1D1D !important;
    border: 1px solid rgba(255,255,255,.12) !important;
    box-shadow: 0 26px 50px rgba(0,0,0,.7) !important;
}

/* Ms-drop: zona de carga */
.ms-drop {
    background: #1D1D1D !important;
    border: 1px solid #444 !important;
    box-shadow: none !important;
    border-radius: 0 !important;
}
.ms-drop::before { border-color: #555 !important; border-radius: 0 !important; }

/* Tabla datos */
.tabla-datos th { border-bottom: 1px solid #333 !important; color: #A5A5A5 !important; }
.tabla-datos td { border-bottom: 1px solid #333 !important; }

/* KPI valores en oro */
.kpi-valor { color: #F2F2F2 !important; -webkit-text-fill-color: #F2F2F2 !important; }

/* Formulario de acceso: filete oro */
.caja-acceso { border-left: 4px solid #DCCC9C !important; }

/* Formh aviso: filete oro */
.formh-aviso { border-left-color: #DCCC9C !important; }
.formh-pet-desc b { color: #DCCC9C !important; }
.formh-ficha summary { color: #DCCC9C !important; }
.formh-picker-btn:hover, .formh-picker-btn.is-filled { border-color: #DCCC9C !important; }

/* Eliminar efectos de glassmorphism / blur restantes */
.card-box, .tool-container, .pagina-informe,
.caja-acceso, .repisa-card, .mca-input-tools, .mca-map-card,
.mca-analysis, .mca-shelf, .mca-repisa-publica {
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
}

/* Ms controles sin blur */
.ms-controles { backdrop-filter: none !important; }

/* Pantalla activa de estadísticas */
.est-pestanas button {
    border-radius: 0 !important;
}
.est-pestanas button[data-v].activo,
.est-pestanas button.activo {
    background: rgba(220,204,156,.12) !important;
    border-color: #DCCC9C !important;
    color: #DCCC9C !important;
}

/* Ms-tab activo */
.ms-tab.activo {
    color: #141414 !important;
    background: #DCCC9C !important;
    border-color: #DCCC9C !important;
}

/* Colores de roles: acento gold */
.rol-ceo { color: #DCCC9C !important; }
.rol-coach { color: #DCCC9C !important; }
.rol-analista { color: #A5A5A5 !important; }

/* ---------- Print ---------- */
@media print {
    *, *::before, *::after { animation: none !important; transition: none !important; }
    body { background: #fff !important; color: #000 !important; }
    body::after { display: none !important; }
    .card-box, .tool-container, .pagina-informe { backdrop-filter: none; box-shadow: none; background: #fff !important; border-color: #ddd !important; }
    .card-box::before, .tool-container::before, .pagina-informe::before { display: none; }
    .barra, .col-barra { background: #333 !important; }
    .kpi-valor { color: #111 !important; -webkit-text-fill-color: #111 !important; }
    .sparkline .serie { stroke-dashoffset: 0; stroke: #333 !important; }
    .revelar { opacity: 1; transform: none; }
    #vista-informe, #vista-informe * { color: #000 !important; text-shadow: none !important; }
    #vista-informe .pagina-informe, #vista-informe .kpi, #vista-informe .grafica { background: #fff !important; border-color: #ccc !important; box-shadow: none !important; }
    #vista-informe .tabla-informe tr { background: #fff !important; }
}
