        /* ===== TIPOGRAFÃAS HELVETICA ===== */

        body {
            background-color: #0b0b0b;
            color: #ffffff;
            font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
            margin: 0;
            /* Mobile: espacio abajo para el nav fijo */
            padding-bottom: 72px;
        }

        /* Desktop: espacio arriba = header (60px) + nav (64px) */
        @media (min-width: 768px) {
            body {
                padding-bottom: 0;
                padding-top: 124px;
            }
        }

        /* ===== LOGIN SCREEN ===== */
        .login-screen {
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            display: flex;
            justify-content: center;
            align-items: center;
            z-index: 10000;
            background: #0b0b0b;
            background-size: 300% 300%;
            animation: loginBgShift 12s ease infinite;
            overflow: hidden;
        }

        .login-screen::before {
            content: '';
            position: absolute;
            top: -50%;
            left: -50%;
            width: 200%;
            height: 200%;
            background: radial-gradient(circle at 30% 40%, rgba(204, 255, 0, 0.05) 0%, transparent 50%),
                radial-gradient(circle at 70% 60%, rgba(204, 255, 0, 0.03) 0%, transparent 50%);
            animation: loginOrbFloat 20s ease-in-out infinite alternate;
            pointer-events: none;
        }

        @keyframes loginBgShift {

            0%,
            100% {
                background-position: 0% 50%;
            }

            50% {
                background-position: 100% 50%;
            }
        }

        @keyframes loginOrbFloat {
            0% {
                transform: translate(0, 0) rotate(0deg);
            }

            100% {
                transform: translate(3%, -3%) rotate(15deg);
            }
        }

        .login-card {
            position: relative;
            background: rgba(20, 25, 35, 0.85);
            backdrop-filter: blur(24px);
            -webkit-backdrop-filter: blur(24px);
            border: 1px solid rgba(255, 255, 255, 0.08);
            padding: 40px 32px 32px;
            border-radius: 20px;
            width: 90%;
            max-width: 400px;
            text-align: center;
            box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.03) inset;
            animation: loginCardIn 0.5s ease-out;
        }

        @keyframes loginCardIn {
            from {
                opacity: 0;
                transform: translateY(30px) scale(0.96);
            }

            to {
                opacity: 1;
                transform: translateY(0) scale(1);
            }
        }

        /* Brand */
        .login-brand {
            margin-bottom: 28px;
        }

        .login-logo-icon {
            font-size: 2.8em;
            margin-bottom: 8px;
            filter: drop-shadow(0 0 12px rgba(204, 255, 0, 0.4));
            animation: loginBallBounce 2s ease-in-out infinite;
        }

        @keyframes loginBallBounce {

            0%,
            100% {
                transform: translateY(0);
            }

            50% {
                transform: translateY(-6px);
            }
        }

        .login-title {
            font-family: 'Oswald', sans-serif;
            font-weight: 700;
            font-size: 2.2em;
            text-transform: uppercase;
            letter-spacing: 1px;
            color: #ffffff;
            margin: 0 0 6px 0;
        }

        .login-subtitle {
            font-family: 'Inter', sans-serif;
            font-weight: 400;
            font-size: 0.9em;
            color: rgba(255, 255, 255, 0.45);
            margin: 0;
        }

        /* Google Button */
        .login-btn-google {
            display: flex;
            align-items: center;
            justify-content: center;
            width: 100%;
            padding: 13px 16px;
            background: #ffffff;
            color: #333;
            border: none;
            border-radius: 10px;
            font-family: 'Arial', sans-serif;
            font-weight: 600;
            font-size: 0.95em;
            cursor: pointer;
            transition: all 0.25s ease;
            box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
        }

        .login-btn-google:hover {
            background: #f1f1f1;
            transform: translateY(-1px);
            box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
        }

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

        /* Separator */
        .login-separator {
            display: flex;
            align-items: center;
            margin: 22px 0 18px;
            gap: 12px;
        }

        .login-separator::before,
        .login-separator::after {
            content: '';
            flex: 1;
            height: 1px;
            background: rgba(255, 255, 255, 0.1);
        }

        .login-separator span {
            font-family: 'Arial', sans-serif;
            font-weight: 300;
            font-size: 0.75em;
            color: rgba(255, 255, 255, 0.35);
            text-transform: uppercase;
            letter-spacing: 0.1em;
            white-space: nowrap;
        }

        /* Form */
        .login-form {
            display: flex;
            flex-direction: column;
            gap: 12px;
        }

        .login-input {
            width: 100%;
            padding: 13px 16px;
            background: rgba(255, 255, 255, 0.06);
            border: 1px solid rgba(255, 255, 255, 0.1);
            border-radius: 10px;
            color: #fff;
            font-family: 'Arial', sans-serif;
            font-size: 0.95em;
            box-sizing: border-box;
            transition: border-color 0.2s, background 0.2s;
            outline: none;
        }

        .login-input::placeholder {
            color: rgba(255, 255, 255, 0.3);
        }

        .login-input:focus {
            border-color: #ccff00;
            background: rgba(255, 255, 255, 0.09);
        }

        /* Primary CTA */
        .login-btn-primary {
            width: 100%;
            padding: 13px;
            background: #ccff00;
            color: #0b0b0b;
            border: none;
            border-radius: 10px;
            font-family: 'Arial', sans-serif;
            font-weight: 700;
            font-size: 1em;
            letter-spacing: 0.03em;
            cursor: pointer;
            transition: all 0.25s ease;
            margin-top: 4px;
            box-shadow: 0 4px 16px rgba(204, 255, 0, 0.2);
        }

        .login-btn-primary:hover {
            transform: translateY(-1px);
            box-shadow: 0 6px 24px rgba(204, 255, 0, 0.4);
        }

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

        /* Register mode button */
        .login-btn-primary.register-mode {
            background: #ffffff;
            color: #0b0b0b;
            box-shadow: 0 4px 16px rgba(255, 255, 255, 0.2);
        }

        .login-btn-primary.register-mode:hover {
            box-shadow: 0 6px 24px rgba(255, 255, 255, 0.3);
        }

        /* Toggle text */
        .login-toggle-text {
            font-family: 'Arial', sans-serif;
            font-size: 0.82em;
            color: rgba(255, 255, 255, 0.4);
            margin: 4px 0 0;
        }

        .login-toggle-text a {
            color: #3498db;
            text-decoration: none;
            font-weight: 600;
            margin-left: 4px;
            transition: color 0.2s;
        }

        .login-toggle-text a:hover {
            color: #5dade2;
        }

        /* Message */
        .login-message {
            font-family: 'Arial', sans-serif;
            font-size: 0.85em;
            min-height: 20px;
            margin-top: 12px;
            margin-bottom: 0;
            transition: color 0.2s;
        }

        .login-message.error {
            color: #e74c3c;
        }

        .login-message.success {
            color: #ccff00;
        }

        /* ===== AUTH METHOD SELECTOR ===== */
        .auth-method-selector {
            display: flex;
            flex-direction: column;
            gap: 10px;
            margin-top: 2px;
        }

        .auth-method-btn {
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 10px;
            width: 100%;
            padding: 13px 16px;
            border: 1px solid rgba(255, 255, 255, 0.12);
            border-radius: 10px;
            font-family: 'Arial', sans-serif;
            font-weight: 600;
            font-size: 0.9em;
            cursor: pointer;
            transition: all 0.25s ease;
            letter-spacing: 0.01em;
        }

        .auth-method-password {
            background: rgba(39, 174, 96, 0.12);
            color: #27ae60;
            border-color: rgba(39, 174, 96, 0.25);
        }

        .auth-method-password:hover {
            background: rgba(39, 174, 96, 0.22);
            border-color: rgba(39, 174, 96, 0.5);
            transform: translateY(-1px);
            box-shadow: 0 4px 12px rgba(39, 174, 96, 0.2);
        }

        .auth-method-otp {
            background: rgba(52, 152, 219, 0.1);
            color: #3498db;
            border-color: rgba(52, 152, 219, 0.2);
        }

        .auth-method-otp:hover {
            background: rgba(52, 152, 219, 0.2);
            border-color: rgba(52, 152, 219, 0.45);
            transform: translateY(-1px);
            box-shadow: 0 4px 12px rgba(52, 152, 219, 0.2);
        }

        .auth-method-btn i {
            font-size: 0.95em;
            opacity: 0.85;
        }

        /* Auth sub-sections slide-in */
        .auth-section {
            animation: authSectionIn 0.35s ease-out;
        }

        @keyframes authSectionIn {
            from {
                opacity: 0;
                transform: translateY(12px);
            }

            to {
                opacity: 1;
                transform: translateY(0);
            }
        }

        /* OTP info text */
        .auth-otp-info {
            font-family: 'Arial', sans-serif;
            font-size: 0.82em;
            color: rgba(52, 152, 219, 0.85);
            background: rgba(52, 152, 219, 0.08);
            border: 1px solid rgba(52, 152, 219, 0.15);
            border-radius: 8px;
            padding: 12px 14px;
            margin: 0 0 10px 0;
            line-height: 1.5;
            text-align: left;
        }

        .auth-otp-info i {
            margin-right: 6px;
        }

        /* OTP input special styling */
        .otp-input {
            text-align: center;
            font-size: 1.4em !important;
            letter-spacing: 0.35em;
            font-weight: 700;
            font-family: 'Courier New', monospace;
        }

        /* OTP button variant */
        .login-btn-otp {
            background: linear-gradient(135deg, #3498db, #2980b9);
            box-shadow: 0 4px 16px rgba(52, 152, 219, 0.3);
        }

        .login-btn-otp:hover {
            box-shadow: 0 6px 24px rgba(52, 152, 219, 0.45);
        }

        /* Back/change method button */
        .auth-back-btn {
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 6px;
            width: 100%;
            padding: 10px;
            background: transparent;
            border: none;
            color: rgba(255, 255, 255, 0.35);
            font-family: 'Arial', sans-serif;
            font-size: 0.8em;
            cursor: pointer;
            transition: color 0.2s;
            margin-top: 2px;
        }

        .auth-back-btn:hover {
            color: rgba(255, 255, 255, 0.65);
        }

        .auth-back-btn i {
            font-size: 0.85em;
        }

        /* Email confirmation warning */
        .login-message.warning {
            color: #f39c12;
            background: rgba(243, 156, 18, 0.08);
            border: 1px solid rgba(243, 156, 18, 0.15);
            border-radius: 8px;
            padding: 10px 14px;
            font-size: 0.82em;
            line-height: 1.5;
            text-align: left;
        }

        /* Screen-reader only (accessible labels for password managers) */
        .sr-only {
            position: absolute;
            width: 1px;
            height: 1px;
            padding: 0;
            margin: -1px;
            overflow: hidden;
            clip: rect(0, 0, 0, 0);
            white-space: nowrap;
            border: 0;
        }

        /* --- UTILIDADES --- */
        .tarjeta-jugador {
            background: #141414;
            border-radius: 4px;
            padding: 15px;
            box-shadow: none;
            text-align: center;
            transition: transform 0.2s, border-color 0.2s;
            position: relative;
            color: white;
            border: 1px solid rgba(255, 255, 255, 0.05);
        }

        .tarjeta-jugador:hover {
            transform: translateY(-3px);
            border-color: #ccff00;
        }

        .jugador-nombre {
            font-weight: bold;
            color: #ecf0f1;
            margin-bottom: 5px;
        }

        .jugador-posicion {
            font-size: 0.8em;
            color: #bdc3c7;
            text-transform: uppercase;
            letter-spacing: 1px;
        }

        .jugador-precio {
            display: block;
            margin-top: 10px;
            font-weight: bold;
            color: #f1c40f;
        }

        .btn-fichar {
            width: 100%;
            padding: 8px;
            margin-top: 10px;
            border: none;
            border-radius: 6px;
            background: rgba(204, 255, 0, 0.1);
            color: #ccff00;
            border: 1px solid rgba(204, 255, 0, 0.3);
            font-weight: bold;
            cursor: pointer;
            transition: all 0.2s;
        }

        .btn-fichar:hover {
            background: #ccff00;
            color: #0b0b0b;
        }

        /* --- MODALES GENERALES --- */
        .modal-overlay {
            display: none;
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: rgba(0, 0, 0, 0.85);
            z-index: 9000;
            justify-content: center;
            align-items: center;
            backdrop-filter: blur(5px);
        }

        .modal-content {
            background: #111111;
            color: white;
            padding: 30px;
            border-radius: 6px;
            width: 90%;
            max-width: 450px;
            text-align: center;
            position: relative;
            box-shadow: 0 20px 40px rgba(0, 0, 0, 0.8);
            animation: fadeIn 0.3s ease-out forwards;
            border: 1px solid rgba(255, 255, 255, 0.1);
        }

        .cerrar-x {
            position: absolute;
            top: 15px;
            right: 20px;
            cursor: pointer;
            font-size: 1.5em;
            color: #999;
        }

        .cerrar-x:hover {
            color: #e74c3c;
        }

        @keyframes fadeIn {
            from {
                opacity: 0;
                transform: translateY(-20px);
            }

            to {
                opacity: 1;
                transform: translateY(0);
            }
        }

        /* ========================================================================= */
        /* --- CLASIFICACIÓN / RANKING (ESTÉTICA ATHLETIC EDITORIAL DARK PRO) ---     */
        /* ========================================================================= */

        /* Cabecera Editorial */
        .ranking-header-bar {
            display: flex;
            justify-content: space-between;
            align-items: flex-end;
            margin-bottom: 16px;
            gap: 12px;
            flex-wrap: wrap;
        }

        .ranking-title-group {
            display: flex;
            flex-direction: column;
            gap: 2px;
        }

        .ranking-section-kicker {
            font-family: 'Space Grotesk', -apple-system, sans-serif;
            font-size: 0.68rem;
            font-weight: 700;
            letter-spacing: 0.12em;
            text-transform: uppercase;
            color: rgba(255, 255, 255, 0.45);
        }

        .ranking-section-title {
            font-family: 'Anton', 'Space Grotesk', -apple-system, sans-serif;
            font-size: 1.85rem;
            font-weight: 900;
            letter-spacing: 0.03em;
            text-transform: uppercase;
            color: #FFFFFF;
            margin: 0;
            line-height: 1;
        }

        /* Selector de Jornada — Píldora Deportiva Editorial */
        .ranking-filter-pill,
        .ranking-filter-wrapper {
            position: relative;
            display: inline-flex;
            align-items: center;
        }

        .ranking-filter-icon {
            position: absolute;
            left: 12px;
            font-size: 0.72rem;
            color: var(--neon, #ccff00);
            pointer-events: none;
            z-index: 2;
        }

        .ranking-filter-chevron {
            position: absolute;
            right: 12px;
            font-size: 0.62rem;
            color: rgba(255, 255, 255, 0.45);
            pointer-events: none;
            z-index: 2;
        }

        .ranking-filtro-select {
            appearance: none;
            -webkit-appearance: none;
            padding: 8px 30px 8px 32px;
            border-radius: 20px;
            border: 1px solid rgba(255, 255, 255, 0.12);
            background: #18181b;
            font-family: 'Space Grotesk', sans-serif;
            font-weight: 700;
            font-size: 0.78rem;
            letter-spacing: 0.03em;
            color: #ffffff;
            cursor: pointer;
            outline: none;
            box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35);
            transition: all 0.2s ease;
        }

        .ranking-filtro-select:hover,
        .ranking-filtro-select:focus {
            border-color: rgba(204, 255, 0, 0.5);
            background: #202024;
            box-shadow: 0 0 12px rgba(204, 255, 0, 0.15);
        }

        /* ==========================================================================
           LISTADO EDITORIAL DE CLASIFICACIÓN (Card-based, No Podium, No Childish Effects)
           ========================================================================== */
        .ranking-list {
            display: flex;
            flex-direction: column;
            gap: 8px;
            width: 100%;
            margin-top: 10px;
        }

        .ranking-card {
            background: #141416;
            border: 1px solid rgba(255, 255, 255, 0.07);
            border-radius: 12px;
            padding: 12px 16px;
            display: flex;
            align-items: center;
            gap: 14px;
            cursor: pointer;
            position: relative;
            transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.2s, background 0.2s, box-shadow 0.2s;
            box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
            animation: fadeInCard 0.3s cubic-bezier(0.16, 1, 0.3, 1) both;
        }

        @keyframes fadeInCard {
            from {
                opacity: 0;
                transform: translateY(6px);
            }
            to {
                opacity: 1;
                transform: translateY(0);
            }
        }

        .ranking-card:hover {
            transform: translateY(-2px);
            border-color: rgba(255, 255, 255, 0.18);
            background: #19191d;
            box-shadow: 0 6px 18px rgba(0, 0, 0, 0.55);
        }

        /* Tarjeta del propio usuario (sutil y profesional, sin brillos estridentes) */
        .ranking-card.is-self {
            background: linear-gradient(90deg, rgba(204, 255, 0, 0.04) 0%, #141416 100%);
            border-color: rgba(204, 255, 0, 0.35);
            border-left: 3px solid var(--neon, #ccff00);
        }

        .ranking-card.is-self:hover {
            border-color: rgba(204, 255, 0, 0.55);
            background: linear-gradient(90deg, rgba(204, 255, 0, 0.07) 0%, #19191d 100%);
        }

        /* 1. Posición: Número sencillo, pequeño, a la izquierda y desnudo */
        .ranking-card-pos {
            font-family: 'Space Grotesk', sans-serif;
            font-size: 0.95rem;
            font-weight: 700;
            color: rgba(255, 255, 255, 0.42);
            width: 22px;
            min-width: 22px;
            text-align: center;
            flex-shrink: 0;
            line-height: 1;
        }

        .ranking-card-pos.pos-top {
            color: #ffffff;
            font-weight: 800;
        }

        /* 2. Avatar de perfil grande y elegante */
        .ranking-card-avatar-wrap {
            position: relative;
            flex-shrink: 0;
            width: 48px;
            height: 48px;
        }

        .ranking-card-avatar {
            width: 48px;
            height: 48px;
            border-radius: 50%;
            object-fit: cover;
            display: block;
            border: 1.5px solid rgba(255, 255, 255, 0.12);
            background: #1c1c1f;
        }

        .ranking-card.is-self .ranking-card-avatar {
            border-color: var(--neon, #ccff00);
        }

        .ranking-card-crown {
            position: absolute;
            top: -5px;
            right: -3px;
            color: #ffd700;
            font-size: 0.72rem;
            filter: drop-shadow(0 0 4px rgba(255, 215, 0, 0.5));
        }

        /* 3. Información: Nombre arriba y valor de plantilla debajo */
        .ranking-card-info {
            flex: 1;
            min-width: 0;
            display: flex;
            flex-direction: column;
            justify-content: center;
            gap: 3px;
        }

        .ranking-card-name-row {
            display: flex;
            align-items: center;
            gap: 7px;
            min-width: 0;
        }

        .ranking-card-name {
            font-family: 'Space Grotesk', sans-serif;
            font-weight: 700;
            font-size: 1.05rem;
            color: #ffffff;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
            letter-spacing: -0.2px;
            line-height: 1.25;
            transition: color 0.15s ease;
        }

        .ranking-card:hover .ranking-card-name {
            color: var(--neon, #ccff00);
        }

        .ranking-card-tag-you {
            font-family: 'Space Grotesk', sans-serif;
            font-size: 0.55rem;
            font-weight: 800;
            letter-spacing: 0.08em;
            color: #0b0b0d;
            background: var(--neon, #ccff00);
            padding: 2px 5px;
            border-radius: 4px;
            line-height: 1;
            flex-shrink: 0;
        }

        .ranking-card-val-row {
            display: inline-flex;
            align-items: center;
            gap: 6px;
            font-family: 'Inter', sans-serif;
            font-size: 0.78rem;
            color: rgba(255, 255, 255, 0.52);
            line-height: 1;
        }

        .ranking-shield-icon {
            color: var(--neon, #ccff00);
            font-size: 0.72rem;
            display: inline-flex;
            align-items: center;
            opacity: 0.85;
        }

        .ranking-val-amount {
            font-weight: 600;
            color: rgba(255, 255, 255, 0.72);
            letter-spacing: 0.01em;
        }

        /* 4. Derecha: Puntuación con exponente TRJP */
        .ranking-card-right {
            display: flex;
            align-items: center;
            gap: 12px;
            flex-shrink: 0;
            text-align: right;
        }

        .ranking-points-block {
            display: flex;
            align-items: flex-start;
            justify-content: flex-end;
            line-height: 1;
        }

        .ranking-pts-num {
            font-family: 'Anton', 'Space Grotesk', sans-serif;
            font-weight: 900;
            font-size: 1.55rem;
            color: #ffffff;
            line-height: 1;
            letter-spacing: 0.02em;
        }

        .ranking-pts-exp {
            font-family: 'Space Grotesk', sans-serif;
            font-weight: 800;
            font-size: 0.62rem;
            color: var(--neon, #ccff00);
            margin-left: 2px;
            line-height: 1;
            top: -0.55em;
            position: relative;
        }

        .ranking-loading-state,
        .ranking-empty-state {
            padding: 40px 20px;
            text-align: center;
            color: rgba(255, 255, 255, 0.45);
            font-family: 'Space Grotesk', sans-serif;
            font-size: 0.9rem;
            background: #141416;
            border: 1px solid rgba(255, 255, 255, 0.06);
            border-radius: 12px;
        }

        /* ==========================================================================
           MODAL ONBOARDING NOMBRE DE EQUIPO / USUARIO (UNIFIED & BULLETPROOF)
           ========================================================================== */
        #modal-onboarding-nombre {
            display: none;
            position: fixed;
            inset: 0;
            z-index: 100000 !important;
            background: rgba(0, 0, 0, 0.92) !important;
            backdrop-filter: blur(10px);
            -webkit-backdrop-filter: blur(10px);
            align-items: center;
            justify-content: center;
            padding: 20px;
            box-sizing: border-box;
            pointer-events: all !important;
        }

        .onboarding-card {
            background: #121215;
            border: 1px solid rgba(255, 255, 255, 0.09);
            border-radius: 18px;
            padding: 36px 28px;
            max-width: 380px;
            width: 100%;
            text-align: center;
            box-shadow: 0 20px 50px rgba(0, 0, 0, 0.85);
            display: flex;
            flex-direction: column;
            align-items: center;
            box-sizing: border-box;
            animation: fadeInModal 0.25s cubic-bezier(0.16, 1, 0.3, 1);
        }

        .onboarding-icon-wrap {
            width: 58px;
            height: 58px;
            background: rgba(255, 255, 255, 0.04);
            border: 1px solid rgba(255, 255, 255, 0.08);
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            margin-bottom: 20px;
            color: var(--neon, #ccff00);
            font-size: 1.5rem;
        }

        .onboarding-title {
            color: #ffffff;
            font-family: 'Space Grotesk', sans-serif;
            font-size: 1.35rem;
            font-weight: 800;
            letter-spacing: -0.3px;
            margin: 0 0 8px 0;
            text-transform: uppercase;
        }

        .onboarding-desc {
            color: rgba(255, 255, 255, 0.55);
            font-family: 'Inter', sans-serif;
            font-size: 0.85rem;
            line-height: 1.5;
            margin: 0 0 24px 0;
        }

        .onboarding-input-wrap {
            position: relative;
            width: 100%;
            margin-bottom: 8px;
        }

        .onboarding-input {
            width: 100%;
            padding: 14px 16px;
            background: #1c1c20;
            border: 1px solid rgba(255, 255, 255, 0.12);
            border-radius: 10px;
            color: #ffffff;
            font-family: 'Space Grotesk', sans-serif;
            font-size: 1rem;
            font-weight: 600;
            box-sizing: border-box;
            outline: none;
            text-align: center;
            transition: border-color 0.2s, box-shadow 0.2s;
        }

        .onboarding-input:focus {
            border-color: var(--neon, #ccff00);
            box-shadow: 0 0 14px rgba(204, 255, 0, 0.2);
            background: #222228;
        }

        .onboarding-error-msg {
            color: #ef4444;
            font-family: 'Inter', sans-serif;
            font-size: 0.78rem;
            min-height: 20px;
            margin: 6px 0 16px 0;
            line-height: 1.3;
        }

        .onboarding-btn {
            width: 100%;
            padding: 14px;
            background: var(--neon, #ccff00);
            color: #0b0b0d;
            border: none;
            border-radius: 10px;
            font-family: 'Space Grotesk', sans-serif;
            font-size: 0.95rem;
            font-weight: 800;
            letter-spacing: 0.04em;
            text-transform: uppercase;
            cursor: pointer;
            transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
            box-shadow: 0 4px 16px rgba(204, 255, 0, 0.25);
        }

        .onboarding-btn:hover {
            background: #ddff33;
            transform: translateY(-1px);
            box-shadow: 0 6px 20px rgba(204, 255, 0, 0.35);
        }

        .onboarding-btn:disabled {
            background: #333336;
            color: #77777a;
            cursor: not-allowed;
            box-shadow: none;
            transform: none;
        }

        .menu-fila-wrapper {
            position: relative;
            display: flex;
            align-items: center;
            justify-content: flex-end;
        }

        .btn-menu-fila {
            background: transparent !important;
            border: none !important;
            outline: none !important;
            color: rgba(255, 255, 255, 0.45);
            font-size: 0.85rem;
            cursor: pointer;
            padding: 4px 6px;
            transition: color 0.15s ease;
        }

        .btn-menu-fila:hover {
            color: #FFFFFF;
        }

        .menu-fila-dropdown {
            display: none;
            position: absolute;
            right: 0;
            top: calc(100% + 4px);
            background: rgba(18, 18, 22, 0.96) !important;
            backdrop-filter: blur(20px) !important;
            -webkit-backdrop-filter: blur(20px) !important;
            border: 1px solid rgba(255, 255, 255, 0.12) !important;
            border-radius: 8px !important;
            box-shadow: 0 10px 30px rgba(0, 0, 0, 0.8) !important;
            z-index: 100;
            min-width: 140px;
            overflow: hidden;
            animation: fadeSlideIn 0.15s ease;
        }

        .menu-fila-item {
            padding: 10px 14px;
            cursor: pointer;
            font-family: 'Space Grotesk', sans-serif;
            font-weight: 700;
            font-size: 0.74rem;
            letter-spacing: 0.04em;
            text-transform: uppercase;
            color: rgba(255, 255, 255, 0.85);
            display: flex;
            align-items: center;
            gap: 8px;
            transition: background 0.15s;
        }

        .menu-fila-item:hover {
            background: rgba(255, 255, 255, 0.08);
        }

        .menu-fila-item.danger {
            color: #EF4444 !important;
        }

        .menu-fila-item.danger:hover {
            background: rgba(239, 68, 68, 0.12) !important;
        }

        /* --- TEAM & MARKET SECTIONS (TABS) --- */
        .team-tabs-container,
        .market-tabs-nav {
            display: flex;
            gap: 20px;
            margin-bottom: 20px;
            border-bottom: 1px solid rgba(255, 255, 255, 0.1);
            padding-bottom: 0;
            overflow-x: auto;
        }

        .team-tab-btn,
        .market-tab-btn {
            background: transparent;
            color: #7f8c8d;
            border: none;
            padding: 10px 0;
            font-size: 1.05em;
            font-weight: 600;
            font-family: 'Inter', sans-serif;
            text-transform: uppercase;
            letter-spacing: 0.5px;
            cursor: pointer;
            border-bottom: 2px solid transparent;
            transition: all 0.2s;
            white-space: nowrap;
        }

        .team-tab-btn:hover,
        .market-tab-btn:hover {
            color: #ffffff;
        }

        .team-tab-btn.active,
        .market-tab-btn.active {
            color: #ffffff;
            border-bottom: 2px solid #ffffff;
        }

        /* Updated Pitch Styles */
        .campo-futbol {
            background: #111111;
            background-image:
                repeating-linear-gradient(0deg, transparent, transparent 49px, rgba(255, 255, 255, 0.05) 50px),
                repeating-linear-gradient(90deg, transparent, transparent 49px, rgba(255, 255, 255, 0.05) 50px);
            border: 1px solid rgba(255, 255, 255, 0.1);
            box-shadow: none;
            border-radius: 4px;
        }

        /* ===== LIGAS â€” ESTILO EDITORIAL ===== */

        /* ==========================================================================
           SECCIÓN MIS LIGAS - ATHLETIC EDITORIAL DARK PRO
           Alineado con el Sistema Central de Diseño de Torrija League
           ========================================================================== */

        /* Cabecera de sección */
        .ligas-section-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 24px 0 16px 0;
            border-bottom: 1px solid rgba(255, 255, 255, 0.08);
            margin-bottom: 14px;
        }

        .ligas-title-group {
            display: flex;
            flex-direction: column;
            gap: 2px;
        }

        .ligas-section-kicker {
            display: inline-flex;
            align-items: center;
            gap: 6px;
            font-family: 'Space Grotesk', -apple-system, sans-serif;
            font-size: 0.62rem;
            font-weight: 700;
            letter-spacing: 0.12em;
            text-transform: uppercase;
            color: #CCFF00;
            line-height: 1;
        }

        .ligas-section-kicker::before {
            content: "";
            width: 6px;
            height: 6px;
            border-radius: 50%;
            background: #CCFF00;
            box-shadow: 0 0 8px rgba(204, 255, 0, 0.7);
            display: inline-block;
        }

        .ligas-section-title {
            font-family: 'Moderniz', 'Anton', 'Space Grotesk', sans-serif;
            font-weight: 900;
            font-size: 1.55rem;
            letter-spacing: 0.02em;
            color: #ffffff;
            margin: 0;
            text-transform: uppercase;
            line-height: 1.1;
        }

        .ligas-section-count {
            display: inline-flex;
            align-items: center;
            background: #141416;
            border: 1px solid rgba(255, 255, 255, 0.10);
            border-radius: 20px;
            padding: 5px 12px;
            font-family: 'Space Grotesk', sans-serif;
            font-weight: 700;
            font-size: 0.68rem;
            letter-spacing: 0.06em;
            color: #9CA3AF;
            text-transform: uppercase;
        }

        /* Lista de ligas */
        .ligas-list {
            list-style: none;
            margin: 0;
            padding: 0;
            display: flex;
            flex-direction: column;
            gap: 10px;
        }

        /* Tarjeta de Liga - Formato Atlético Editorial Dark Pro */
        .card-liga {
            background: #141416;
            border: 1px solid rgba(255, 255, 255, 0.08);
            border-radius: 8px;
            margin: 0;
            padding: 14px 16px;
            display: flex;
            align-items: center;
            cursor: pointer;
            position: relative;
            overflow: visible !important;
            z-index: 10;
            color: white;
            transition: transform 0.18s cubic-bezier(0.16, 1, 0.3, 1), 
                        background 0.18s ease, 
                        border-color 0.18s ease, 
                        box-shadow 0.18s ease;
            box-shadow: 0 4px 16px rgba(0, 0, 0, 0.45);
        }

        .card-liga:hover {
            background: #18181B;
            border-color: rgba(255, 255, 255, 0.18);
            transform: translateY(-1px);
            box-shadow: 0 6px 20px rgba(0, 0, 0, 0.55);
        }

        .card-liga:active {
            transform: scale(0.985);
        }

        /* Estado Activo: Acento Neón Volt sutil sin botón */
        .card-liga.active-league {
            background: linear-gradient(90deg, rgba(204, 255, 0, 0.06) 0%, #141416 100%) !important;
            border: 1px solid rgba(204, 255, 0, 0.40) !important;
            border-left: 3px solid #CCFF00 !important;
            box-shadow: 0 4px 22px rgba(0, 0, 0, 0.6), 0 0 14px rgba(204, 255, 0, 0.10) !important;
        }

        /* Cuerpo principal de la tarjeta */
        .card-liga-body {
            display: flex;
            align-items: center;
            justify-content: space-between;
            width: 100%;
            gap: 16px;
            padding-right: 24px; /* Espacio para que el texto no coincida con los 3 puntos */
            min-width: 0;
        }

        .card-liga-left {
            display: flex;
            flex-direction: column;
            gap: 4px;
            min-width: 0;
            flex: 1;
        }

        /* 1. Título de la liga: NUNCA se corta con puntos suspensivos */
        .card-liga-nombre {
            font-family: 'Space Grotesk', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
            font-weight: 800;
            font-size: 1.05rem;
            color: #ffffff;
            white-space: normal !important;
            overflow: visible !important;
            text-overflow: unset !important;
            word-break: break-word !important;
            overflow-wrap: break-word !important;
            letter-spacing: 0.01em;
            line-height: 1.25;
            display: block;
        }

        /* 3 & 8. Fila meta: posición 6/15 y puntos totales a la derecha */
        .card-liga-meta-row {
            display: flex;
            align-items: center;
            gap: 6px;
            font-family: 'Space Grotesk', sans-serif;
            font-size: 0.78rem;
            font-weight: 700;
            line-height: 1.2;
        }

        .card-liga-meta-rank {
            color: #FFFFFF;
            letter-spacing: 0.03em;
        }

        .card-liga-meta-dot {
            color: rgba(255, 255, 255, 0.25);
            font-size: 0.70rem;
        }

        .card-liga-meta-pts {
            color: rgba(255, 255, 255, 0.65);
            letter-spacing: 0.03em;
        }

        /* 7. Presupuesto del usuario a la derecha */
        .card-liga-right {
            display: flex;
            align-items: center;
            flex-shrink: 0;
        }

        .card-liga-budget-block {
            display: flex;
            flex-direction: column;
            align-items: flex-end;
            text-align: right;
            gap: 2px;
        }

        .card-liga-budget-label {
            font-family: 'Space Grotesk', sans-serif;
            font-weight: 700;
            font-size: 0.58rem;
            letter-spacing: 0.08em;
            text-transform: uppercase;
            color: rgba(255, 255, 255, 0.40);
            line-height: 1;
        }

        .card-liga-budget-val {
            font-family: 'Space Grotesk', sans-serif;
            font-weight: 800;
            font-size: 1.05rem;
            color: #ffffff;
            letter-spacing: -0.01em;
            line-height: 1.1;
            white-space: nowrap;
        }

        /* 5. 3 puntos verticales en la esquina superior derecha sin círculo */
        .menu-liga-wrapper {
            position: absolute;
            top: 10px;
            right: 8px;
            z-index: 25;
        }

        .menu-liga-btn {
            background: transparent !important;
            border: none !important;
            border-radius: 0 !important;
            box-shadow: none !important;
            outline: none !important;
            padding: 4px 8px;
            font-size: 0.90rem;
            cursor: pointer;
            color: rgba(255, 255, 255, 0.45);
            display: flex;
            align-items: center;
            justify-content: center;
            width: auto !important;
            height: auto !important;
            transition: color 0.15s ease;
        }

        .menu-liga-btn:hover {
            color: #ffffff !important;
            background: transparent !important;
            border: none !important;
            transform: none !important;
        }

        /* 9. Animación Creativa Ascendente (Rise & Fade) para Crear/Unirse */
        #view-nueva-liga.active,
        #view-crear-liga.active,
        #view-unirse-liga.active {
            animation: modalRiseUp 0.32s cubic-bezier(0.16, 1, 0.3, 1) both;
        }

        @keyframes modalRiseUp {
            from {
                opacity: 0;
                transform: translateY(28px) scale(0.985);
            }
            to {
                opacity: 1;
                transform: translateY(0) scale(1);
            }
        }

        /* Dropdown menú liga — dark frosted glass */
        .menu-liga-dropdown {
            display: none;
            position: absolute;
            top: calc(100% + 6px);
            right: 0;
            background: rgba(18, 18, 22, 0.96) !important;
            backdrop-filter: blur(20px) !important;
            -webkit-backdrop-filter: blur(20px) !important;
            border: 1px solid rgba(255, 255, 255, 0.12) !important;
            border-radius: 10px !important;
            box-shadow: 0 10px 32px rgba(0, 0, 0, 0.75) !important;
            z-index: 9999 !important;
            width: 200px;
            overflow: hidden;
            animation: fadeSlideIn 0.18s cubic-bezier(0.16, 1, 0.3, 1);
        }

        .menu-liga-item {
            padding: 12px 16px;
            cursor: pointer;
            font-family: 'Space Grotesk', sans-serif;
            font-weight: 700;
            font-size: 0.76rem;
            letter-spacing: 0.04em;
            text-transform: uppercase;
            color: rgba(255, 255, 255, 0.82);
            transition: background 0.15s, color 0.15s;
            text-align: left;
            border-bottom: 1px solid rgba(255, 255, 255, 0.05);
            display: flex;
            align-items: center;
            gap: 8px;
        }

        .menu-liga-item:last-child {
            border-bottom: none;
        }

        .menu-liga-item:hover {
            background: rgba(255, 255, 255, 0.08);
            color: #ffffff;
        }

        .menu-liga-item.danger {
            color: #EF4444;
        }

        .menu-liga-item.danger:hover {
            background: rgba(239, 68, 68, 0.12);
            color: #EF4444;
        }

        /* Botón nueva liga — Master CTA Píldora Blanco Alto Impacto */
        .btn-nueva-liga {
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 10px;
            width: 100%;
            margin-top: 24px;
            padding: 14px 24px;
            background: #ffffff;
            color: #000000;
            border: none;
            border-radius: 24px;
            font-family: 'Space Grotesk', sans-serif;
            font-weight: 800;
            font-size: 0.82rem;
            letter-spacing: 0.08em;
            text-transform: uppercase;
            cursor: pointer;
            box-shadow: 0 4px 16px rgba(0, 0, 0, 0.5);
            transition: transform 0.2s cubic-bezier(0.25, 1, 0.5, 1), 
                        background 0.2s ease, 
                        box-shadow 0.2s ease;
        }

        .btn-nueva-liga:hover {
            background: #F3F4F6;
            transform: translateY(-1px);
            box-shadow: 0 6px 20px rgba(0, 0, 0, 0.6);
        }

        .btn-nueva-liga:active {
            transform: scale(0.98);
        }

        .btn-nueva-liga-icon {
            font-size: 1.15em;
            font-weight: 900;
            line-height: 1;
            transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        }

        .btn-nueva-liga.is-open .btn-nueva-liga-icon {
            transform: rotate(45deg);
        }

        /* Botones de acción de liga (Crear / Unirse) */
        .btn-liga-accion-gold {
            display: flex;
            align-items: center;
            justify-content: space-between;
            width: 100%;
            padding: 14px 18px;
            background: #18181B;
            color: #FFFFFF;
            border: 1px solid rgba(255, 255, 255, 0.10);
            border-radius: 8px;
            font-family: 'Space Grotesk', sans-serif;
            font-weight: 700;
            font-size: 0.85rem;
            letter-spacing: 0.03em;
            cursor: pointer;
            transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
            text-align: left;
            box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
            box-sizing: border-box;
        }

        .btn-liga-accion-gold:hover {
            border-color: #CCFF00;
            background: #202024;
            color: #FFFFFF;
            box-shadow: 0 4px 18px rgba(0, 0, 0, 0.5), 0 0 12px rgba(204, 255, 0, 0.18);
            transform: translateY(-1px);
        }

        .btn-liga-accion-gold:active {
            transform: scale(0.98);
        }

        @keyframes fadeSlideIn {
            from {
                opacity: 0;
                transform: translateY(-8px);
            }

            to {
                opacity: 1;
                transform: translateY(0);
            }
        }


        /* --- CAMPO DE FÃšTBOL (CSS PURO) --- */
        .campo-futbol {
            width: 100%;
            max-width: 500px;
            height: 600px;
            margin: 0 auto;
            background: #4CAF50;
            background-image:
                linear-gradient(white 2px, transparent 2px),
                linear-gradient(90deg, white 2px, transparent 2px),
                radial-gradient(circle, white 2px, transparent 3px);
            background-size: 100% 50%, 50% 100%, 100% 100%;
            background-repeat: no-repeat;
            background-position: center;
            border: 5px solid white;
            border-radius: 15px;
            position: relative;
            box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
        }

        .formacion-7 {
            display: grid;
            grid-template-rows: 1fr 1fr 1fr 1fr;
            height: 100%;
            padding: 20px;
            box-sizing: border-box;
            justify-items: center;
            align-items: center;
        }

        /* FICHAS ALINEACIÃ“N */
        .ficha-campo {
            width: 70px;
            text-align: center;
            cursor: pointer;
            transition: transform 0.2s;
        }

        .ficha-campo:hover {
            transform: scale(1.1);
        }


        .ficha-foto {
            width: 45px;
            /* Enforce uniform size */
            height: 45px;
            border-radius: 50%;
            border: 2px solid white;
            box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
            object-fit: cover !important;
            /* CRITICAL: Prevent stretching */
            background: white;
            display: block;
            margin: 0 auto;
        }

        /* --- NEW LINEUP CARD STYLES --- */
        .ficha-campo-new {
            width: 72px;
            display: flex;
            flex-direction: column;
            align-items: center;
            cursor: pointer;
            position: relative;
            transition: transform 0.2s;
        }

        .ficha-campo-new:hover {
            transform: scale(1.05);
            z-index: 10;
        }

        .card-top {
            width: 100%;
            height: 35px;
            /* Colored strip */
            border-top-left-radius: 6px;
            border-top-right-radius: 6px;
            position: relative;
            margin-bottom: 22px;
            /* Space for image hanging down */
            box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
        }

        .card-img-container {
            width: 46px;
            height: 46px;
            border-radius: 50%;
            border: 2px solid white;
            background: #fff;
            overflow: hidden;
            position: absolute;
            bottom: -23px;
            /* Hangs half out */
            left: 50%;
            transform: translateX(-50%);
            z-index: 2;
            box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
        }

        .card-img-container img {
            width: 100%;
            height: 100%;
            object-fit: cover !important;
        }

        .card-bottom {
            background: rgba(0, 0, 0, 0.85);
            /* Darker backdrop for text */
            color: #ecf0f1;
            padding: 4px 6px;
            border-radius: 4px;
            font-size: 0.7em;
            font-weight: 700;
            width: 95%;
            text-align: center;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
            box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
            border: 1px solid #444;
            z-index: 1;
            /* Below image? No, image is z-index 2 */
        }

        /* --- SQUAD LIST AVATAR --- */
        .avatar-list {
            width: 40px;
            height: 40px;
            border-radius: 50%;
            object-fit: cover;
            border: 2px solid rgba(255, 255, 255, 0.1);
        }

        .player-row-list {
            display: grid;
            grid-template-columns: 2fr 1fr 0.5fr 1fr;
            align-items: center;
            background: rgba(255, 255, 255, 0.05);
            padding: 10px;
            margin-bottom: 5px;
            border-radius: 8px;
            border: 1px solid rgba(255, 255, 255, 0.05);
        }

        .col-player {
            display: flex;
            align-items: center;
            gap: 10px;
        }

        /* --- FULL SCREEN SWAP (OVERLAY) --- */
        #pantalla-cambio-jugador {
            display: none;
            /* Hidden by default */
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background-color: #121212;
            /* Solid background */
            z-index: 10001;
            /* Higher than nav (1000) */
            flex-direction: column;
            animation: slideInUp 0.3s ease-out;
        }

        @keyframes slideInUp {
            from {
                transform: translateY(100%);
                opacity: 0;
            }

            to {
                transform: translateY(0);
                opacity: 1;
            }
        }

        .seleccion-header {
            background: #1e1e1e;
            padding: 15px;
            display: flex;
            align-items: center;
            justify-content: space-between;
            border-bottom: 1px solid #333;
            box-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
        }

        .seleccion-content {
            flex: 1;
            overflow-y: auto;
            padding: 20px;
            padding-bottom: 80px;
            /* Space for bottom nav safety */
        }

        .btn-volver-seleccion {
            background: transparent;
            border: 1px solid #333;
            color: #fff;
            padding: 8px 15px;
            border-radius: 20px;
            cursor: pointer;
            font-weight: bold;
        }

        .btn-vaciar-seleccion {
            background: #e74c3c;
            color: white;
            border: none;
            padding: 8px 15px;
            border-radius: 5px;
            font-weight: bold;
            cursor: pointer;
        }

        .outgoing-player-card {
            background: linear-gradient(135deg, #2c3e50, #000);
            padding: 20px;
            border-radius: 12px;
            display: flex;
            align-items: center;
            gap: 15px;
            border: 2px solid #e74c3c;
            /* Red border for outgoing */
            position: relative;
            margin-bottom: 20px;
        }

        .ficha-nombre {
            background: rgba(0, 0, 0, 0.7);
            color: white;
            font-size: 0.7em;
            padding: 2px 5px;
            border-radius: 4px;
            margin-top: -5px;
            position: relative;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
            max-width: 80px;
        }

        .ficha-banquillo {
            background: #f9f9f9;
            border: 1px solid #ddd;
            padding: 5px;
            border-radius: 5px;
            text-align: center;
            cursor: pointer;
        }

        .ficha-banquillo:hover {
            background: #e8f8f5;
            border-color: #27ae60;
        }

        /* Brazalete de CapitÃ¡n */
        .indicador-capitan {
            position: absolute;
            top: -5px;
            left: -5px;
            background: #f1c40f;
            color: #2c3e50;
            font-weight: bold;
            width: 20px;
            height: 20px;
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            border: 2px solid white;
            font-size: 0.8em;
            z-index: 10;
        }

        /* Icono de LesiÃ³n */
        .indicador-lesion {
            position: absolute;
            top: -5px;
            right: -5px;
            background: white;
            border-radius: 50%;
            width: 20px;
            height: 20px;
            display: flex;
            align-items: center;
            justify-content: center;
            border: 2px solid #e74c3c;
            font-size: 0.8em;
            z-index: 10;
        }

        #modal-admin,
        #btn-admin {
            display: none !important;
            visibility: hidden !important;
            opacity: 0 !important;
        }

        /* --- AJUSTES SECTION --- */
        .dato-fila {
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 10px 0;
            border-bottom: 1px solid #333;
        }

        .label {
            color: #bdc3c7;
            font-weight: 500;
        }

        .valor {
            color: white;
            font-weight: bold;
        }

        /* --- STICKY LEAGUE HEADER --- */
        #league-sticky-header {
            position: sticky;
            top: 60px;
            /* Below Top Nav (approx 60px height) */
            background: rgba(26, 26, 26, 0.95);
            backdrop-filter: blur(5px);
            padding: 10px 20px;
            z-index: 900;
            border-bottom: 1px solid #333;
            text-align: center;
            box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
            font-size: 1.1em;
            font-weight: bold;
            color: #ecf0f1;
            letter-spacing: 1px;
            transition: top 0.3s;
        }

        /* ===================================================
           BARRA FINANCIERA GLOBAL (#market-budget-sticky)
           Full-width sticky footer, siempre encima del bottom-nav
           =================================================== */
        #market-budget-sticky {
            position: fixed;
            bottom: 64px;
            /* altura exacta del .bottom-nav en mÃ³vil */
            left: 0;
            width: 100%;
            box-sizing: border-box;
            z-index: 1999;
            /* Justo debajo del nav (z-index 2000) */

            /* Fondo verde destacable */
            background: linear-gradient(135deg, #1db954 0%, #17a84a 60%, #138f3e 100%);
            border-top: 2px solid rgba(255, 255, 255, 0.2);
            box-shadow: 0 -3px 18px rgba(0, 0, 0, 0.35);

            /* Layout interno */
            padding: 8px 16px 6px;
        }

        /* En desktop el bottom-nav estÃ¡ arriba, la barra va al bottom */
        @media (min-width: 768px) {
            #market-budget-sticky {
                bottom: 0;
                border-top: 2px solid rgba(255, 255, 255, 0.15);
            }
        }

        /* Grid: 3 columnas de igual peso, separadas por líneas */
        .fin-bar-grid {
            display: grid;
            grid-template-columns: 1fr 1fr 1fr;
            align-items: start;
            gap: 0;
            max-width: 900px;
            margin: 0 auto;
        }

        /* Variante columna única — liga Global */
        .fin-bar-grid--single {
            display: flex;
            justify-content: center;
            align-items: center;
            max-width: 900px;
            margin: 0 auto;
        }
        .fin-bar-grid--single .fin-bar-bloque {
            align-items: center;
            text-align: center;
        }
        .fin-bar-grid--single .fin-bar-valor {
            font-size: 1.15em;
        }

        /* Bloque base */
        .fin-bar-bloque {
            display: flex;
            flex-direction: column;
            align-items: flex-start;
            padding: 0 12px;
            gap: 1px;
        }

        /* Bloque central: separadores laterales */
        .fin-bar-bloque--center {
            border-left: 1px solid rgba(0, 0, 0, 0.15);
            border-right: 1px solid rgba(0, 0, 0, 0.15);
            align-items: center;
            text-align: center;
        }

        /* Bloque derecho: alineado a la derecha */
        .fin-bar-bloque--right {
            align-items: flex-end;
            text-align: right;
        }

        /* Etiqueta (label) de cada bloque */
        .fin-bar-label {
            font-size: 0.65em;
            font-weight: 700;
            color: rgba(0, 0, 0, 0.55);
            text-transform: uppercase;
            letter-spacing: 0.07em;
            white-space: nowrap;
        }

        /* Valor numÃ©rico */
        .fin-bar-valor {
            font-size: 1em;
            font-weight: 800;
            color: #000000;
            white-space: nowrap;
            line-height: 1.2;
            transition: color 0.3s;
        }

        /* Pujas: en negativo, tono rojo oscuro */
        .fin-bar-valor--pujas {
            color: #7a1a00;
        }

        /* Saldo positivo (default) */
        .fin-bar-valor--saldo {
            color: #000000;
        }

        /* Saldo negativo (clase aplicada por JS) */
        .fin-bar-valor--saldo.negativo {
            color: #8b0000;
        }

        /* Aviso de penalizaciÃ³n (oculto por defecto, JS lo muestra) */
        .fin-bar-aviso {
            display: block;
            font-size: 0.62em;
            font-weight: 700;
            color: #8b0000;
            background: rgba(139, 0, 0, 0.1);
            border: 1px solid rgba(139, 0, 0, 0.25);
            border-radius: 4px;
            padding: 2px 5px;
            margin-top: 2px;
            white-space: normal;
            max-width: 140px;
            line-height: 1.3;
        }

        /* ===== MAIN HEADER ===== */
        #main-header {
            background: #111111;
            padding: 10px 20px;
            display: grid;
            grid-template-columns: 1fr auto 1fr;
            align-items: center;
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            z-index: 1000;
            box-shadow: 0 1px 0 rgba(255, 255, 255, 0.06);
            height: 60px;
            box-sizing: border-box;
        }

        #titulo-liga-activa {
            font-family: 'Arial', sans-serif;
            font-weight: 700;
            font-size: 0.82em;
            color: white;
            letter-spacing: 0.12em;
            text-transform: uppercase;
        }

        #btn-hamburger {
            background: transparent;
            border: none;
            color: white;
            font-size: 1.5em;
            cursor: pointer;
            padding: 6px 10px;
            border-radius: 6px;
            transition: background 0.2s;
        }

        #btn-hamburger:hover {
            background: rgba(255, 255, 255, 0.1);
        }

        /* ===== SIDEBAR OVERLAY (fondo oscuro, debajo del header) ===== */
        #sidebar-overlay {
            display: none;
            position: fixed;
            top: 60px;
            /* Debajo de la barra superior */
            left: 0;
            width: 100%;
            height: calc(100% - 60px);
            background: rgba(0, 0, 0, 0);
            z-index: 9998;
            transition: background 0.35s ease;
        }

        #sidebar-overlay.is-open {
            display: block;
            background: rgba(0, 0, 0, 0.6);
        }

        /* ===== SIDEBAR â€” BASE (MÃ“VIL: baja desde el header, full-width) ===== */
        #menu-lateral {
            position: fixed;
            z-index: 9999;
            background: #181824;
            display: flex;
            flex-direction: column;
            top: 60px;
            /* Arranca justo debajo del header */
            left: 0;
            width: 100%;
            height: calc(100vh - 60px);
            /* Empieza oculto encima (fuera de la vista, detrÃ¡s del header) */
            transform: translateY(-110%);
            transition: transform 0.38s cubic-bezier(0.4, 0, 0.2, 1);
            box-shadow: 0 8px 30px rgba(0, 0, 0, 0.5);
        }

        #menu-lateral.is-open {
            transform: translateY(0);
        }

        /* ===== DESKTOP: entra desde la derecha, ancho parcial ===== */
        @media (min-width: 768px) {
            #menu-lateral {
                top: 60px;
                left: auto;
                right: 0;
                /* Desde la derecha */
                width: 300px;
                height: calc(100vh - 60px);
                transform: translateX(100%);
                /* Empieza fuera a la derecha */
                transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
                box-shadow: -6px 0 24px rgba(0, 0, 0, 0.55);
            }

            #menu-lateral.is-open {
                transform: translateX(0);
                /* Entra desde la derecha */
            }
        }

        /* ===== SIDEBAR INTERNOS ===== */
        .sidebar-topbar {
            display: flex;
            align-items: center;
            justify-content: space-between;
            padding: 18px 20px;
            border-bottom: 1px solid rgba(255, 255, 255, 0.08);
            flex-shrink: 0;
        }

        .sidebar-title {
            font-family: 'Outfit', 'Segoe UI', sans-serif;
            font-size: 1.2em;
            font-weight: 700;
            color: white;
            letter-spacing: 0.5px;
        }

        .sidebar-close-btn {
            background: none;
            border: none;
            color: rgba(255, 255, 255, 0.7);
            font-size: 1.8em;
            cursor: pointer;
            line-height: 1;
            padding: 0 4px;
            transition: color 0.2s;
        }

        .sidebar-close-btn:hover {
            color: white;
        }

        .sidebar-items {
            padding: 20px;
            display: flex;
            flex-direction: column;
            gap: 8px;
            flex: 1;
            overflow-y: auto;
        }

        .sidebar-item {
            background: rgba(255, 255, 255, 0.05);
            border: none;
            color: white;
            padding: 14px 16px;
            border-radius: 10px;
            font-size: 1em;
            font-weight: 600;
            text-align: left;
            cursor: pointer;
            display: flex;
            gap: 14px;
            align-items: center;
            transition: background 0.2s, transform 0.15s;
        }

        .sidebar-item:hover {
            background: rgba(255, 255, 255, 0.1);
            transform: translateX(4px);
        }

        .sidebar-item-icon {
            font-size: 1.1em;
            width: 20px;
            text-align: center;
        }

        .sidebar-item-danger {
            background: rgba(231, 76, 60, 0.08);
            color: #e74c3c;
        }

        .sidebar-item-danger:hover {
            background: rgba(231, 76, 60, 0.18);
        }

        .sidebar-divider {
            border: none;
            border-top: 1px solid rgba(255, 255, 255, 0.08);
            margin: 4px 0;
        }

        .sidebar-footer {
            padding: 16px 20px;
            color: rgba(255, 255, 255, 0.3);
            font-size: 0.8em;
            text-align: center;
            border-top: 1px solid rgba(255, 255, 255, 0.06);
            flex-shrink: 0;
        }

        /* --- PLANTILLA ACCIONES DROPDOWN --- */
        .acciones-wrapper {
            position: relative;
            display: inline-block;
        }

        .btn-acciones {
            background: #34495e;
            color: white;
            border: none;
            padding: 5px 10px;
            border-radius: 5px;
            cursor: pointer;
            font-weight: bold;
            font-size: 0.85em;
            transition: background 0.2s;
        }

        .btn-acciones:hover {
            background: #4a6580;
        }

        .acciones-dropdown {
            position: absolute;
            bottom: 100%;
            right: 0;
            background: #2c3e50;
            border: 1px solid #4a6580;
            border-radius: 8px;
            box-shadow: 0 -4px 15px rgba(0, 0, 0, 0.5);
            z-index: 9999;
            min-width: 180px;
            overflow: hidden;
            margin-bottom: 5px;
            animation: fadeIn 0.15s ease-out;
        }

        .acciones-item {
            padding: 10px 14px;
            cursor: pointer;
            font-size: 0.9em;
            color: #ecf0f1;
            transition: background 0.2s;
            white-space: nowrap;
        }

        .acciones-item:hover {
            background: rgba(255, 255, 255, 0.1);
        }

        .acciones-item-danger {
            color: #e74c3c;
            border-top: 1px solid rgba(255, 255, 255, 0.1);
        }

        .acciones-item-danger:hover {
            background: rgba(231, 76, 60, 0.15);
        }

        .btn-quitar-mercado {
            background: #c0392b;
            color: white;
            border: none;
            padding: 5px 10px;
            border-radius: 5px;
            cursor: pointer;
            font-weight: bold;
            font-size: 0.85em;
            transition: background 0.2s;
        }

        .btn-quitar-mercado:hover {
            background: #e74c3c;
        }




        /* ============================================================
   FICHA JUGADOR — NUEVO DISEÑO (fp-*)
   ============================================================ */

        /* Pantalla principal */
        #pantalla-ficha-jugador {
            position: fixed;
            inset: 0;
            background: #000000;
            z-index: 10000;
            display: flex;
            flex-direction: column;
            overflow: hidden;
            font-family: 'Inter', sans-serif;
        }

        /* ── Top bar ── */
        .fp-topbar {
            display: flex;
            align-items: center;
            justify-content: space-between;
            padding: 12px 20px;
            background: #000000;
            border-bottom: 1px solid #1c1c1e;
            flex-shrink: 0;
            min-height: 52px;
        }

        .fp-btn-back {
            background: none;
            border: none;
            color: rgba(255, 255, 255, 0.7);
            font-size: 1.1rem;
            cursor: pointer;
            width: 36px;
            height: 36px;
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            transition: all 0.2s ease;
        }

        .fp-btn-back:hover,
        .fp-btn-back:active {
            background: rgba(255, 255, 255, 0.08);
            color: #fff;
        }

        .fp-topbar-title {
            font-family: 'Space Grotesk', sans-serif;
            font-size: 0.95rem;
            font-weight: 700;
            color: #fff;
            text-transform: uppercase;
            letter-spacing: 1px;
            text-align: center;
        }

        .fp-topbar-right {
            width: 36px; /* Balance spacing */
        }

        /* === Loader === */
        .fp-loading {
            flex: 1;
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            color: rgba(255, 255, 255, 0.4);
            gap: 16px;
            background: #000000;
        }

        .fp-spinner {
            width: 40px;
            height: 40px;
            border: 3px solid rgba(255, 255, 255, 0.1);
            border-top-color: #ffffff;
            border-radius: 50%;
            animation: fpSpin 0.75s linear infinite;
        }

        @keyframes fpSpin {
            to {
                transform: rotate(360deg);
            }
        }

        /* === Scroll body === */
        .fp-scroll {
            flex: 1;
            overflow-y: auto;
            padding-bottom: 40px;
            background: #000000;
            scroll-behavior: smooth;
        }

        /* === Hero Card (FUT inspired, cinematic edge-to-edge layout) === */
        .fp-hero-card {
            display: grid;
            grid-template-columns: 130px 1fr;
            grid-template-rows: auto auto;
            grid-template-areas: 
                "photo info"
                "photo stats";
            background: #0d0d0e;
            border: 1px solid #1c1c1e;
            border-radius: 14px;
            margin: 20px;
            padding: 0;
            overflow: hidden;
            min-height: 180px;
            position: relative;
        }

        @media (max-width: 480px) {
            .fp-hero-card {
                grid-template-columns: 110px 1fr;
                margin: 14px 16px;
            }
        }

        /* Foto Left Wrap */
        .fp-hero-left {
            grid-area: photo;
            width: 100%;
            height: 100%;
            position: relative;
        }

        .fp-foto-wrap {
            width: 100%;
            height: 100%;
            position: relative;
            background: #141416;
        }

        /* Gradient mask inside the wrap to fade the right and bottom of the card */
        .fp-foto-wrap::after {
            content: '';
            position: absolute;
            inset: 0;
            background: linear-gradient(to right, rgba(13, 13, 14, 0) 50%, rgba(13, 13, 14, 1) 98%),
                        linear-gradient(to top, rgba(13, 13, 14, 1) 0%, rgba(13, 13, 14, 0) 40%);
            pointer-events: none;
            z-index: 2;
        }

        .fp-foto {
            width: 100%;
            height: 100%;
            object-fit: cover;
            object-position: top center;
            border: none !important;
            display: block;
        }

        .fp-foto[src*="sin-foto.png"] {
            filter: grayscale(1) brightness(0.6) contrast(1.1);
            opacity: 0.4;
        }

        /* Club Badge floating on card */
        .fp-escudo-hero {
            position: absolute;
            top: 10px;
            left: 10px;
            width: 30px;
            height: 30px;
            object-fit: contain;
            z-index: 10;
            background: rgba(0, 0, 0, 0.6);
            border-radius: 6px;
            padding: 4px;
            border: 1px solid rgba(255, 255, 255, 0.1);
        }

        /* Tendency Badge floating on card */
        .fp-tendencia {
            position: absolute;
            top: 10px;
            right: 10px;
            z-index: 10;
            width: 26px;
            height: 26px;
            display: flex;
            align-items: center;
            justify-content: center;
            border-radius: 6px;
            background: rgba(0, 0, 0, 0.6);
            border: 1px solid rgba(255, 255, 255, 0.08);
            font-size: 0.8rem;
            font-weight: bold;
            margin: 0 !important;
        }

        .fp-tend-up {
            color: #30d158;
        }

        .fp-tend-down {
            color: #ff453a;
        }

        .fp-tend-neutral {
            color: rgba(255, 255, 255, 0.3);
        }

        /* Info central right */
        .fp-hero-info {
            grid-area: info;
            display: flex;
            flex-direction: column;
            justify-content: center;
            gap: 6px;
            padding: 16px 16px 6px 16px;
            min-width: 0;
        }

        .fp-hero-name-row {
            display: flex;
            flex-direction: row;
            align-items: center;
            gap: 8px;
            flex-wrap: wrap;
        }

        .fp-pos-badge {
            background: #1c1c1e !important;
            border: 1px solid #2c2c2e !important;
            color: #8e8e93 !important;
            font-family: 'Space Grotesk', sans-serif;
            font-size: 0.65rem;
            font-weight: 700;
            padding: 2px 6px;
            border-radius: 4px;
            text-transform: uppercase;
            letter-spacing: 0.5px;
        }

        .fp-nombre {
            font-family: 'Space Grotesk', sans-serif;
            font-size: 1.25rem;
            font-weight: 700;
            color: #ffffff;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
            line-height: 1.2;
            max-width: 100%;
        }

        /* Estado */
        .fp-estado {
            font-size: 0.7rem;
            font-weight: 600;
            display: inline-flex;
            align-items: center;
            gap: 5px;
            padding: 2px 8px;
            border-radius: 4px;
            width: fit-content;
            text-transform: uppercase;
            letter-spacing: 0.3px;
        }

        .fp-estado--ok {
            background: rgba(48, 209, 88, 0.05) !important;
            color: #30d158 !important;
            border: 1px solid rgba(48, 209, 88, 0.15) !important;
        }

        .fp-estado--bad {
            background: rgba(255, 69, 58, 0.05) !important;
            color: #ff453a !important;
            border: 1px solid rgba(255, 69, 58, 0.15) !important;
        }

        .fp-dot-ok {
            display: inline-block;
            width: 6px;
            height: 6px;
            border-radius: 50%;
            background: #30d158;
        }

        /* Valor */
        .fp-valor {
            font-family: 'Space Grotesk', sans-serif;
            font-size: 1.35rem;
            font-weight: 750;
            color: #ffffff;
            margin-top: 2px;
        }

        /* Scoreboard Stats row */
        .fp-hero-stats {
            grid-area: stats;
            display: flex;
            gap: 10px;
            padding: 0 16px 16px 16px;
            align-items: center;
        }

        .fp-stat-item {
            display: flex;
            flex-direction: column;
            align-items: flex-start;
            gap: 1px;
            background: #121214;
            border: 1px solid #1c1c1e;
            padding: 6px 12px;
            border-radius: 8px;
            min-width: 72px;
        }

        .fp-stat-label {
            font-size: 0.58rem;
            font-weight: 600;
            color: #8e8e93;
            text-transform: uppercase;
            letter-spacing: 0.5px;
        }

        .fp-stat-value {
            font-family: 'Space Grotesk', sans-serif;
            font-size: 1.05rem;
            font-weight: 700;
            color: #ffffff;
        }

        /* === Buttons Row === */
        .fp-btn-row {
            display: flex;
            gap: 12px;
            padding: 0 20px;
            margin-top: 4px;
        }

        .fp-btn-secondary,
        .fp-btn-primary {
            flex: 1;
            padding: 11px 16px;
            border: none;
            border-radius: 8px;
            font-size: 0.85rem;
            font-weight: 600;
            cursor: pointer;
            transition: all 0.2s ease;
            letter-spacing: 0.3px;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            gap: 8px;
        }

        .fp-btn-secondary {
            background: #121214;
            border: 1px solid #2c2c2e;
            color: #ffffff;
        }

        .fp-btn-secondary:hover,
        .fp-btn-secondary:active {
            background: #1c1c1e;
            border-color: #3a3a3c;
        }

        .fp-btn-primary {
            background: #ffffff !important;
            color: #000000 !important;
            border: 1px solid #ffffff !important;
            box-shadow: none !important;
        }

        .fp-btn-primary:hover,
        .fp-btn-primary:active {
            background: #e5e5ea !important;
            border-color: #e5e5ea !important;
        }

        .fp-btn-secondary:active,
        .fp-btn-primary:active {
            transform: scale(0.97);
        }

        .fp-acciones-wrap {
            flex: 1;
        }

        /* === External web Link === */
        .fp-web-link-row {
            display: flex;
            justify-content: center;
            margin-top: 12px;
            padding: 0 20px;
        }

        .fp-web-link {
            display: inline-flex;
            align-items: center;
            gap: 6px;
            padding: 4px 10px;
            background: transparent !important;
            border: none !important;
            color: #8e8e93 !important;
            font-size: 0.78rem;
            font-weight: 600;
            text-decoration: none;
            letter-spacing: 0.3px;
            transition: color 0.2s ease;
            cursor: pointer;
        }

        .fp-web-link:hover,
        .fp-web-link:active {
            color: #ffffff !important;
            background: transparent !important;
            border: none !important;
            box-shadow: none !important;
        }

        /* === Secciones generales === */
        .fp-section {
            padding: 0 20px;
            margin-top: 24px;
        }

        .fp-section-title {
            font-family: 'Space Grotesk', sans-serif;
            font-size: 0.8rem;
            font-weight: 700;
            color: #8e8e93;
            margin: 0 0 12px 0;
            text-align: left;
            letter-spacing: 1.5px;
            text-transform: uppercase;
        }

        .fp-empty-msg {
            text-align: center;
            color: rgba(255, 255, 255, 0.4);
            font-size: 0.9rem;
            padding: 20px 0;
            font-style: italic;
        }

        /* === Grid jornadas === */
        .fp-jornadas-grid {
            display: grid;
            grid-template-columns: repeat(5, 1fr);
            gap: 8px;
        }

        @media (min-width: 768px) {
            .fp-jornadas-grid {
                grid-template-columns: repeat(10, 1fr);
            }
        }

        .fp-jornada-box {
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            gap: 4px;
            padding: 12px 6px;
            border-radius: 8px;
            cursor: pointer;
            transition: all 0.2s ease;
            background: #121214;
            border: 1px solid #1c1c1e;
            user-select: none;
        }

        .fp-jornada-box:hover {
            background: #1c1c1e;
            border-color: #2c2c2e;
        }

        /* Thicker green/red border for points indicator */
        .fp-j-pos {
            background: #121214;
            border-color: #1c1c1e;
        }

        .fp-j-pos:hover {
            border-color: #2c2c2e;
        }

        .fp-j-neg {
            background: #121214;
            border-color: #1c1c1e;
        }

        .fp-j-neg:hover {
            border-color: #2c2c2e;
        }

        .fp-j-neu {
            background: #121214;
            border-color: #1c1c1e;
        }

        .fp-jornada-box.fp-j-selected {
            border-color: #ffffff !important;
            background: #1c1c1e !important;
            box-shadow: none !important;
            transform: none !important;
        }

        .fp-j-num {
            font-size: 0.65rem;
            color: #8e8e93;
            font-weight: 600;
            letter-spacing: 0.5px;
        }

        .fp-j-pts {
            font-family: 'Space Grotesk', sans-serif;
            font-size: 1.1rem;
            font-weight: 700;
            color: #fff;
        }

        .fp-j-pos .fp-j-pts {
            color: #30d158;
        }

        .fp-j-neg .fp-j-pts {
            color: #ff453a;
        }

        .fp-j-pending {
            opacity: 0.2;
            cursor: default;
            pointer-events: none;
            background: #0d0d0e;
            border-color: #121214;
        }

        .fp-j-pending .fp-j-pts {
            color: #8e8e93;
        }

        /* === Gráfico valor histórico === */
        .fp-chart-canvas-wrap {
            position: relative;
            padding: 8px 0 4px 0;
            height: 200px;
        }

        .fp-chart-canvas-wrap canvas {
            width: 100% !important;
            height: 100% !important;
        }

        .fp-section-valor-btn-row {
            display: flex;
            align-items: center;
            justify-content: space-between;
            margin-bottom: 4px;
        }

        /* === Detalle jornada table === */
        .fp-section-detalle-wrap {
            margin-top: 8px;
        }

        .fp-jornada-detalle-header {
            display: flex;
            align-items: center;
            justify-content: space-between;
            padding-bottom: 12px;
            border-bottom: 1px solid rgba(255, 255, 255, 0.06);
            margin-bottom: 14px;
        }

        .fp-stats-table {
            border-radius: 8px;
            overflow: hidden;
            border: 1px solid #1c1c1e;
            background: #0d0d0e;
            box-shadow: none;
        }

        .fp-stats-thead {
            display: grid;
            grid-template-columns: 1fr 2fr 1fr;
            padding: 12px 18px;
            background: #121214;
            border-bottom: 1px solid #1c1c1e;
        }

        .fp-stats-thead span {
            font-size: 0.65rem;
            font-weight: 600;
            color: #8e8e93;
            text-transform: uppercase;
            letter-spacing: 0.5px;
        }

        .fp-stats-thead span:nth-child(2) {
            text-align: center;
        }

        .fp-stats-thead span:nth-child(3) {
            text-align: right;
        }

        .fp-stats-row {
            display: grid;
            grid-template-columns: 1fr 2fr 1fr;
            padding: 14px 18px;
            border-bottom: 1px solid #1c1c1e;
            align-items: center;
        }

        .fp-stats-row span {
            font-size: 0.88rem;
            color: rgba(255, 255, 255, 0.9);
        }

        .fp-stats-row span:first-child {
            color: #8e8e93;
            font-size: 0.85rem;
            font-weight: 500;
        }

        .fp-stats-row span:nth-child(2) {
            font-weight: 500;
            color: #ffffff;
            text-align: center;
        }

        .fp-stats-row span:last-child {
            font-family: 'Space Grotesk', sans-serif;
            font-weight: 600;
            color: #ffffff;
            text-align: right;
        }

        .fp-stats-row:nth-child(odd) {
            background: transparent;
        }

        .fp-stats-empty {
            color: #8e8e93;
            font-style: normal;
        }

        .fp-stats-valor-row {
            border-top: 1px solid #1c1c1e;
            background: transparent;
        }

        /* Clean ticket table total footer */
        .fp-stats-total-row {
            display: grid;
            grid-template-columns: 1fr 2fr 1fr;
            padding: 14px 18px;
            background: #121214 !important;
            border-top: 1px solid #1c1c1e !important;
            align-items: center;
        }

        .fp-stats-total-row span:first-child {
            font-size: 0.8rem;
            font-weight: 700;
            color: #ffffff;
            text-transform: uppercase;
            letter-spacing: 0.5px;
            grid-column: 1 / span 2;
        }

        .fp-stats-total-row span:last-child {
            font-family: 'Space Grotesk', sans-serif;
            font-size: 1.25rem;
            font-weight: 700;
            color: #ffffff;
            text-align: right;
            grid-column: 3;
        }

        .fp-val-up {
            color: #30d158 !important;
        }

        .fp-val-down {
            color: #ff453a !important;
        }

        .fp-val-neu {
            color: #8e8e93 !important;
        }

        /* === Glass dropdown actions === */
        .acciones-dropdown {
            position: absolute;
            bottom: 100%;
            right: 0;
            background: rgba(13, 18, 31, 0.95);
            border: 1px solid rgba(255, 255, 255, 0.08);
            border-radius: 12px;
            box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
            backdrop-filter: blur(16px);
            -webkit-backdrop-filter: blur(16px);
            z-index: 9999;
            min-width: 190px;
            overflow: hidden;
            margin-bottom: 8px;
            animation: fpDropdownIn 0.2s cubic-bezier(0.4, 0, 0.2, 1);
        }

        @keyframes fpDropdownIn {
            from {
                opacity: 0;
                transform: translateY(8px) scale(0.95);
            }
            to {
                opacity: 1;
                transform: translateY(0) scale(1);
            }
        }

        .acciones-item {
            padding: 12px 16px;
            cursor: pointer;
            font-size: 0.85rem;
            font-weight: 600;
            color: rgba(255, 255, 255, 0.85);
            transition: all 0.2s ease;
            white-space: nowrap;
            border-bottom: 1px solid rgba(255, 255, 255, 0.04);
            text-align: left;
        }

        .acciones-item:last-child {
            border-bottom: none;
        }

        .acciones-item:hover {
            background: rgba(255, 255, 255, 0.06);
            color: #fff;
        }

        .acciones-item-danger {
            color: #ff6b6b;
        }

        .acciones-item-danger:hover {
            background: rgba(231, 76, 60, 0.1);
            color: #ff8f8f;
        }

        /* ==========================================
           === MERCADO MODERN REDESIGN (Onefootball) ===
           ========================================== */

        .market-grid {
            display: flex;
            flex-direction: column;
            gap: 12px;
            margin-top: 15px;
        }

        .market-loading {
            grid-column: 1 / -1;
            color: #8e8e93;
            text-align: center;
            padding: 30px;
            font-size: 0.95em;
            font-family: 'Inter', sans-serif;
        }

        .tarjeta-jugador {
            background: #0d0d0e !important;
            border: 1px solid #1c1c1e !important;
            border-radius: 6px !important;
            transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1), border-color 0.25s ease !important;
            box-shadow: none !important;
            padding: 15px !important;
            display: flex !important;
            flex-direction: column !important;
            align-items: center !important;
            text-align: center !important;
        }
        
        .tarjeta-jugador:hover {
            transform: translateY(-4px) !important;
            border-color: #ffffff !important;
        }

        .tarjeta-jugador-photo-container {
            position: relative;
            width: 84px;
            height: 84px;
            margin: 0 auto 12px;
            cursor: pointer;
        }

        .tarjeta-jugador-photo {
            width: 100%;
            height: 100%;
            object-fit: cover;
            border-radius: 8px;
            background: #1c1c1e;
        }

        .badge-escudo-tarjeta {
            position: absolute;
            bottom: -4px;
            right: -4px;
            width: 24px;
            height: 24px;
            border-radius: 50%;
            background: #000;
            border: 1px solid #1c1c1e;
            padding: 2px;
            object-fit: contain;
            z-index: 2;
        }

        .jugador-nombre {
            font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif !important;
            font-size: 0.9em !important;
            font-weight: 600 !important;
            color: #ffffff !important;
            text-transform: none !important;
            letter-spacing: normal !important;
            margin-bottom: 6px !important;
            white-space: normal !important;
            overflow: visible !important;
            line-height: 1.3 !important;
            text-align: center;
        }

        .jugador-posicion-container {
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 6px;
            margin-bottom: 10px;
        }

        .badge-pos {
            font-size: 0.68em;
            font-weight: 800;
            padding: 2px 6px;
            border-radius: 4px;
            text-transform: uppercase;
            font-family: 'Inter', sans-serif;
            display: inline-block;
        }
        .badge-pos.por { background: rgba(39, 174, 96, 0.15); color: #2ecc71; border: 1px solid rgba(39, 174, 96, 0.3); }
        .badge-pos.def { background: rgba(52, 152, 219, 0.15); color: #3498db; border: 1px solid rgba(52, 152, 219, 0.3); }
        .badge-pos.med { background: rgba(241, 196, 15, 0.15); color: #f1c40f; border: 1px solid rgba(241, 196, 15, 0.3); }
        .badge-pos.del { background: rgba(231, 76, 60, 0.15); color: #e74c3c; border: 1px solid rgba(231, 76, 60, 0.3); }

        .jugador-equipo-nombre {
            font-size: 0.72em;
            color: #8e8e93;
            font-weight: 500;
            text-transform: uppercase;
        }

        .tarjeta-jugador-stats-box {
            background: #121214;
            border: 1px solid #1c1c1e;
            padding: 6px 8px;
            border-radius: 6px;
            margin: 10px 0;
            display: flex;
            flex-direction: column;
            align-items: center;
            gap: 2px;
            width: 100%;
            box-sizing: border-box;
        }

        .tarjeta-jugador-points {
            font-family: 'Oswald', sans-serif;
            font-size: 1.05em;
            font-weight: 700;
            color: #ffffff;
        }

        .tarjeta-jugador-stats-text {
            font-size: 0.75em;
            color: #8e8e93;
        }

        .jugador-precio {
            display: block !important;
            margin-top: auto !important;
            margin-bottom: 8px !important;
            font-family: 'Inter', sans-serif !important;
            font-size: 1.15em !important;
            font-weight: 700 !important;
            color: #ffffff !important;
        }

        .tarjeta-jugador-status {
            font-size: 0.72em;
            font-weight: 700;
            text-transform: uppercase;
            padding: 4px 8px;
            border-radius: 4px;
            margin-top: 8px;
            text-align: center;
            letter-spacing: 0.5px;
            width: 100%;
            box-sizing: border-box;
        }
        .tarjeta-jugador-status.status-free-agent {
            background: rgba(255, 255, 255, 0.05);
            color: #8e8e93;
            border: 1px solid #1c1c1e;
        }
        .tarjeta-jugador-status.status-supermarket {
            background: rgba(39, 174, 96, 0.1);
            color: #2ecc71;
            border: 1px solid rgba(39, 174, 96, 0.25);
        }

        .tarjeta-jugador-sale-details {
            background: rgba(255, 255, 255, 0.02);
            border: 1px solid #1c1c1e;
            border-radius: 6px;
            padding: 6px 10px;
            margin-top: 8px;
            font-size: 0.75em;
            text-align: left;
            display: flex;
            flex-direction: column;
            gap: 3px;
            color: #8e8e93;
            width: 100%;
            box-sizing: border-box;
        }
        .tarjeta-jugador-sale-details b {
            color: #ffffff;
        }
        .tarjeta-jugador-sale-details .sale-clausula {
            color: #ff6b6b;
        }

        .tarjeta-jugador-extra,
        .tarjeta-jugador-button {
            width: 100%;
            box-sizing: border-box;
        }

        /* Fichar/Pujar/Ofertar Button Modernization */
        .btn-fichar {
            background: #ffffff !important;
            color: #000000 !important;
            border: none !important;
            font-family: 'Oswald', sans-serif !important;
            font-size: 0.9em !important;
            text-transform: uppercase !important;
            letter-spacing: 0.5px !important;
            border-radius: 4px !important;
            padding: 8px 12px !important;
            font-weight: 700 !important;
            cursor: pointer !important;
            transition: background-color 0.2s ease, opacity 0.2s ease !important;
            width: 100% !important;
            margin-top: 10px !important;
        }
        .btn-fichar:hover {
            background: #e2e2e2 !important;
        }
        .btn-fichar-remove {
            background: #e74c3c !important;
            color: #ffffff !important;
        }
        .btn-fichar-remove:hover {
            background: #c0392b !important;
        }
        .btn-fichar-bid {
            background: #3498db !important;
            color: #ffffff !important;
        }
        .btn-fichar-bid:hover {
            background: #2980b9 !important;
        }
        .btn-fichar-offer {
            background: #27ae60 !important;
            color: #ffffff !important;
        }
        .btn-fichar-offer:hover {
            background: #219a52 !important;
        }

        /* Sub-pestañas: Mis Operaciones & Historial */
        .market-section-title {
            font-family: 'Oswald', sans-serif;
            font-size: 1.1em;
            font-weight: 700;
            text-transform: uppercase;
            letter-spacing: 0.5px;
            margin: 25px 0 12px 0;
            padding-bottom: 8px;
            border-bottom: 1px solid #1c1c1e;
        }
        .market-section-title.buy-title {
            color: #3498db;
        }
        .market-section-title.sell-title {
            color: #e67e22;
        }

        .market-subsection-header {
            font-family: 'Oswald', sans-serif;
            font-size: 0.88em;
            font-weight: 700;
            text-transform: uppercase;
            letter-spacing: 0.8px;
            margin: 20px 0 10px 0;
        }
        .market-subsection-header.received-offers-header {
            color: #2ecc71;
        }
        .market-subsection-header.on-sale-header-title {
            color: #e67e22;
        }

        /* Sub-pestañas: Mis Operaciones & Historial */
        .market-section-title {
            font-family: 'Oswald', sans-serif !important;
            font-size: 0.85em !important;
            font-weight: 700 !important;
            text-transform: uppercase !important;
            letter-spacing: 1px !important;
            color: #8e8e93 !important;
            margin: 24px 0 12px 0 !important;
            display: flex;
            align-items: center;
            gap: 6px;
            border-bottom: 1px solid #1c1c1e;
            padding-bottom: 8px;
        }

        .market-operations-list {
            margin-bottom: 30px;
        }

        /* Operation Card Fila Horizontal */
        .market-operation-card {
            background: #0d0d0e;
            border: 1px solid #1c1c1e;
            padding: 12px 16px;
            margin-bottom: 12px;
            border-radius: 8px;
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 14px;
            transition: transform 0.2s ease, border-color 0.2s ease;
        }
        .market-operation-card[onclick] {
            cursor: pointer;
        }
        .market-operation-card[onclick]:hover {
            transform: translateY(-2px);
            border-color: #ffffff;
        }

        .operation-photo-container {
            position: relative;
            flex-shrink: 0;
        }

        .operation-photo {
            width: 52px;
            height: 52px;
            border-radius: 8px;
            object-fit: cover;
            background: #1c1c1e;
            border: 1px solid #1c1c1e;
            display: block;
        }

        .operation-pos-badge {
            position: absolute;
            bottom: -4px;
            right: -4px;
            font-size: 0.58em !important;
            padding: 2px 5px !important;
            border-radius: 4px !important;
            white-space: nowrap;
            z-index: 2;
        }

        .operation-info {
            flex: 1;
            min-width: 0;
            display: flex;
            flex-direction: column;
            justify-content: center;
        }

        .operation-player-name {
            font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif !important;
            font-weight: 600 !important;
            color: #ffffff !important;
            font-size: 0.95em !important;
            text-transform: none !important;
            letter-spacing: normal !important;
            white-space: normal !important;
            overflow: visible !important;
            line-height: 1.3 !important;
        }

        .operation-player-title-row {
            display: flex;
            align-items: center;
            gap: 8px;
            flex-wrap: wrap;
        }

        .operation-badge-type {
            font-size: 0.6em;
            background: rgba(52, 152, 219, 0.12);
            color: #3498db;
            border: 1px solid rgba(52, 152, 219, 0.25);
            padding: 1px 5px;
            border-radius: 4px;
            font-weight: 700;
            text-transform: uppercase;
        }

        .operation-player-meta {
            font-size: 0.76em;
            color: #8e8e93;
            margin-top: 4px;
        }

        .operation-highlight-gray {
            color: #ffffff;
            font-weight: 600;
        }

        .operation-status-text {
            font-size: 0.74em;
            margin-top: 4px;
            font-weight: 500;
            color: #8e8e93;
        }
        .operation-status-text.status-pending {
            color: #2ecc71;
        }
        .operation-status-text.status-waiting {
            color: #f1c40f;
        }
        .operation-status-text.status-offer-desc {
            color: #8e8e93;
        }

        .operation-highlight-white {
            color: #ffffff;
            font-weight: 700;
        }
        .operation-highlight-green {
            color: #2ecc71;
            font-weight: 700;
        }
        .operation-highlight-orange {
            color: #f1c40f;
            font-weight: 700;
        }

        .operation-action-container {
            text-align: right;
            flex-shrink: 0;
            display: flex;
            flex-direction: column;
            align-items: flex-end;
            gap: 6px;
        }

        .operation-price {
            font-family: 'Oswald', sans-serif;
            font-size: 1.15em;
            font-weight: 700;
            color: #ffffff;
        }

        .btn-market-cancel {
            background: rgba(255, 71, 87, 0.1) !important;
            color: #ff4757 !important;
            border: 1px solid rgba(255, 71, 87, 0.2) !important;
            padding: 6px 12px !important;
            border-radius: 6px !important;
            cursor: pointer;
            font-size: 0.72em !important;
            font-family: 'Oswald', sans-serif !important;
            font-weight: 700 !important;
            transition: all 0.2s ease !important;
            text-transform: uppercase !important;
            letter-spacing: 0.3px !important;
        }
        .btn-market-cancel:hover {
            background: #ff4757 !important;
            color: #ffffff !important;
            border-color: #ff4757 !important;
        }

        .operation-action-buttons {
            display: flex;
            flex-direction: column;
            gap: 6px;
            flex-shrink: 0;
        }

        .btn-market-accept {
            background: rgba(46, 204, 113, 0.12) !important;
            color: #2ecc71 !important;
            border: 1px solid rgba(46, 204, 113, 0.25) !important;
            padding: 6px 12px;
            border-radius: 6px;
            font-family: 'Oswald', sans-serif;
            font-size: 0.78em;
            font-weight: 700;
            letter-spacing: 0.5px;
            cursor: pointer;
            transition: all 0.2s ease;
            text-transform: uppercase;
        }
        .btn-market-accept:hover {
            background: #2ecc71 !important;
            color: #ffffff !important;
            border-color: #2ecc71 !important;
        }

        .btn-market-reject {
            background: rgba(255, 71, 87, 0.1) !important;
            color: #ff4757 !important;
            border: 1px solid rgba(255, 71, 87, 0.2) !important;
            padding: 6px 12px;
            border-radius: 6px;
            font-family: 'Oswald', sans-serif;
            font-size: 0.78em;
            font-weight: 700;
            letter-spacing: 0.5px;
            cursor: pointer;
            transition: all 0.2s ease;
            text-transform: uppercase;
        }
        .btn-market-reject:hover {
            background: #ff4757 !important;
            color: #ffffff !important;
            border-color: #ff4757 !important;
        }

        /* Mis operaciones: Jugadores en Venta */
        .market-operation-card.on-sale-card {
            display: block;
        }

        .on-sale-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            border-bottom: 1px solid #1c1c1e;
            padding-bottom: 8px;
            margin-bottom: 8px;
        }

        .on-sale-price-box {
            text-align: right;
        }

        .on-sale-price-label {
            font-size: 0.72em;
            color: #8e8e93;
            text-transform: uppercase;
        }

        .on-sale-price-value {
            font-family: 'Oswald', sans-serif;
            font-weight: 700;
            color: #e67e22;
            font-size: 1.05em;
        }

        .on-sale-offers-list {
            display: flex;
            flex-direction: column;
            gap: 4px;
        }

        .market-suboffer-row {
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 6px 10px;
            background: rgba(46, 204, 113, 0.08);
            border: 1px solid rgba(46, 204, 113, 0.15);
            border-radius: 4px;
        }

        .suboffer-comprador {
            font-size: 0.78em;
            color: #ffffff;
        }

        .suboffer-valor {
            font-family: 'Oswald', sans-serif;
            font-weight: 700;
            color: #2ecc71;
            font-size: 0.9em;
        }

        .market-no-offers {
            color: #8e8e93;
            font-size: 0.76em;
            margin: 4px 0 0 0;
            font-style: italic;
        }

        .market-no-operations {
            color: #8e8e93;
            text-align: center;
            padding: 30px;
            font-size: 0.88em;
            font-family: 'Inter', sans-serif;
        }

        /* Historial Personal */
        .market-history-container {
            background: #0d0d0e;
            border: 1px solid #1c1c1e;
            border-radius: 8px;
            padding: 16px;
            max-height: 600px;
            overflow-y: auto;
        }

        .market-history-row {
            display: flex;
            justify-content: space-between;
            align-items: center;
            border-bottom: 1px solid #1c1c1e;
            padding: 12px 0;
            font-size: 0.86em;
            gap: 12px;
        }
        .market-history-row:last-child {
            border-bottom: none;
        }

        .history-text {
            color: rgba(255, 255, 255, 0.9);
            line-height: 1.4;
            font-family: 'Inter', sans-serif;
        }

        .history-date {
            color: #8e8e93;
            font-size: 0.76em;
            white-space: nowrap;
            text-align: right;
            font-family: 'Inter', sans-serif;
        }

        .market-no-history {
            text-align: center;
            color: #8e8e93;
            padding: 30px;
            font-size: 0.88em;
            font-family: 'Inter', sans-serif;
        }

        /* Buscador Mercado Global */
        .market-search-wrapper {
            margin-bottom: 16px;
        }

        .market-search-container {
            position: relative;
            width: 100%;
        }

        .market-search-icon {
            position: absolute;
            left: 14px;
            top: 50%;
            transform: translateY(-50%);
            color: #8e8e93;
            font-size: 0.9em;
        }

        .market-search-input {
            width: 100%;
            padding: 12px 14px 12px 40px;
            box-sizing: border-box;
            border-radius: 6px;
            border: 1px solid #1c1c1e;
            background: #0d0d0e;
            color: #ffffff;
            font-size: 0.95em;
            font-family: 'Inter', sans-serif;
            outline: none;
            transition: border-color 0.2s ease, box-shadow 0.2s ease;
        }
        .market-search-input:focus {
            border-color: #ffffff;
            box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.1);
        }

        .market-no-results {
            grid-column: 1 / -1;
            color: #8e8e93;
            text-align: center;
            padding: 40px 20px;
            font-size: 0.9em;
            font-family: 'Inter', sans-serif;
        }

        .market-global-count {
            grid-column: 1 / -1;
            text-align: center;
            padding: 8px;
            color: #8e8e93;
            font-size: 0.82em;
            border-bottom: 1px solid #1c1c1e;
            margin-bottom: 10px;
            font-family: 'Inter', sans-serif;
            text-transform: uppercase;
            letter-spacing: 0.5px;
        }

        /* Mobile responsive refinements for operations & global names */
        @media (max-width: 480px) {
            .market-operation-card {
                padding: 10px 12px !important;
                gap: 10px !important;
            }
            .operation-photo {
                width: 44px !important;
                height: 44px !important;
                border-radius: 6px !important;
            }
            .operation-player-name {
                font-size: 0.85em !important;
            }
            .operation-price {
                font-size: 1.10em !important;
            }
            .btn-market-cancel {
                padding: 5px 8px !important;
                font-size: 0.68em !important;
            }
            .btn-market-accept,
            .btn-market-reject {
                padding: 5px 8px !important;
                font-size: 0.72em !important;
            }
            .jugador-nombre {
                font-size: 0.82em !important;
            }
        }