/* ============================================================
   MyBalls Admin - v5 (formulario rediseñado + todas las clases)
   ============================================================ */

:root {
    --myballs-primary:   #0d7f3e;
    --myballs-primary-dark: #1a5d2e;
    --myballs-primary-light: #e8f5ed;
    --myballs-accent:    #d4a017;
    --myballs-accent-light: #f0c040;
}

/* ============================================================
   FIX GLOBAL: Iconos alineados
   ============================================================ */
iconify-icon {
    display: inline-block;
    vertical-align: middle;
    line-height: 1;
}
h1 iconify-icon, h2 iconify-icon, h3 iconify-icon,
h4 iconify-icon, h5 iconify-icon, h6 iconify-icon,
.card-header iconify-icon {
    vertical-align: -0.15em;
}
.btn iconify-icon, button iconify-icon {
    vertical-align: -0.15em;
}
.badge iconify-icon, small iconify-icon {
    vertical-align: -0.1em;
}

/* ============================================================
   FORMULARIO - LABELS, INPUTS, HINTS
   ============================================================ */
.myballs-form-card {
    border: 1px solid #f1f5f9;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}

.myballs-form-label {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #475569;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 8px;
    letter-spacing: 0.2px;
}
.myballs-form-label iconify-icon {
    color: var(--myballs-primary);
    font-size: 16px;
    opacity: 0.85;
}

.myballs-input {
    border: 1.5px solid #e2e8f0 !important;
    border-radius: 10px !important;
    padding: 12px 14px !important;
    font-size: 14.5px !important;
    transition: border-color 0.15s, box-shadow 0.15s;
    background: #fff;
    min-height: 46px;
}
.myballs-input:hover:not(:focus) {
    border-color: #cbd5e1 !important;
}
.myballs-input:focus {
    border-color: var(--myballs-primary) !important;
    box-shadow: 0 0 0 3px rgba(13, 127, 62, 0.12) !important;
    outline: none;
}
.myballs-input.is-invalid {
    border-color: #dc2626 !important;
}
.myballs-input.is-invalid:focus {
    box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.12) !important;
}

textarea.myballs-input {
    min-height: 80px;
    line-height: 1.5;
}

.myballs-form-hint {
    display: flex;
    align-items: center;
    gap: 5px;
    margin-top: 6px;
    color: #94a3b8;
    font-size: 12px;
}
.myballs-form-hint iconify-icon {
    color: #94a3b8;
    font-size: 14px;
}

.myballs-input-prefix {
    background: #f8fafc !important;
    border: 1.5px solid #e2e8f0 !important;
    border-right: none !important;
    color: #64748b;
    font-weight: 600;
    border-radius: 10px 0 0 10px !important;
}
.input-group .myballs-input {
    border-radius: 0 10px 10px 0 !important;
    border-left: none !important;
}

/* Sub-grupos dentro de cards de formulario */
.myballs-form-group {
    padding: 16px 18px;
    background: #fafbfc;
    border: 1px solid #f1f5f9;
    border-radius: 10px;
}
.myballs-form-group-title {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--myballs-primary);
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 14px;
    margin-top: 0;
}
.myballs-form-group-title iconify-icon {
    font-size: 16px;
}

/* ============================================================
   CP MÁGICO - bloque destacado
   ============================================================ */
.myballs-cp-block {
    background: linear-gradient(135deg, #fffdf5 0%, #fef9e9 100%);
    border: 1.5px solid #f0d875;
    border-radius: 12px;
    padding: 18px 20px;
    position: relative;
}

.myballs-cp-status {
    display: flex;
    align-items: center;
    gap: 5px;
    margin-top: 6px;
    color: #b8860b;
    font-size: 12px;
    font-weight: 500;
}
.myballs-cp-status iconify-icon {
    font-size: 14px;
}
.myballs-cp-status.success {
    color: var(--myballs-primary);
}
.myballs-cp-status.success iconify-icon {
    color: var(--myballs-primary);
}
.myballs-cp-status.error {
    color: #dc2626;
}
.myballs-cp-status.error iconify-icon {
    color: #dc2626;
}

.myballs-cp-info {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    color: #78350f;
    font-size: 13px;
    line-height: 1.5;
}
.myballs-cp-info iconify-icon {
    color: var(--myballs-accent);
    font-size: 20px;
    flex-shrink: 0;
    margin-top: 1px;
}

/* ============================================================
   TIP DORADO (para hints UX)
   ============================================================ */
.myballs-tip {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    background: linear-gradient(135deg, #fffdf5 0%, #fef9e9 100%);
    border: 1.5px solid #f0d875;
    border-radius: 10px;
    padding: 12px 14px;
    color: #78350f;
    font-size: 13px;
    line-height: 1.5;
}
.myballs-tip iconify-icon {
    color: var(--myballs-accent);
    font-size: 18px;
    flex-shrink: 0;
    margin-top: 1px;
}

/* ============================================================
   SWITCH (checkbox bonito)
   ============================================================ */
.myballs-switch {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    background: #fafbfc;
    border: 1.5px solid #e2e8f0;
    border-radius: 10px;
    transition: all 0.15s;
    cursor: pointer;
}
.myballs-switch:hover {
    background: #f0f7f2;
    border-color: var(--myballs-primary-light);
}
.myballs-switch input[type="checkbox"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
    flex-shrink: 0;
    accent-color: var(--myballs-primary);
}
.myballs-switch label {
    cursor: pointer;
    margin: 0;
    font-size: 14px;
    font-weight: 500;
    color: #334155;
    display: flex;
    align-items: center;
    gap: 6px;
}
.myballs-switch input:checked + label {
    color: #0f172a;
    font-weight: 600;
}

/* ============================================================
   AVATAR DIRECTOR (preview en formulario)
   ============================================================ */
.myballs-director-avatar {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: #fff;
    border: 3px solid var(--myballs-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--myballs-primary);
    font-weight: 700;
    font-size: 24px;
    transition: all 0.2s;
}
.myballs-director-avatar.empty {
    border-color: #cbd5e1;
    color: #94a3b8;
    background: #f8fafc;
}

/* ============================================================
   ALERT DE ERROR
   ============================================================ */
.myballs-alert-error {
    background: linear-gradient(135deg, #fff5f5 0%, #fee 100%);
    border: 1.5px solid #fca5a5;
    border-radius: 12px;
    padding: 16px 20px;
}
.myballs-alert-icon {
    color: #dc2626;
    font-size: 28px;
    flex-shrink: 0;
}

/* ============================================================
   ACTION BAR (botones finales)
   ============================================================ */
.myballs-action-bar {
    background: #fff;
    border-top: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 18px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    box-shadow: 0 -2px 8px rgba(0,0,0,0.04);
    margin-bottom: 32px;
    position: sticky;
    bottom: 16px;
    z-index: 1;
}

.myballs-btn-save {
    min-width: 180px;
    padding: 12px 24px !important;
    font-size: 15px !important;
    font-weight: 700 !important;
    box-shadow: 0 4px 14px rgba(13, 127, 62, 0.25);
}
.myballs-btn-save:hover {
    box-shadow: 0 6px 20px rgba(13, 127, 62, 0.35);
    transform: translateY(-1px);
    transition: all 0.2s;
}

/* Variante apilada: en movil los botones van uno encima del otro,
   a ancho completo (aunque el texto sea corto). En escritorio quedan
   lado a lado como la barra normal. */
.myballs-action-bar--stack {
    margin-top: 24px;
}
@media (max-width: 767px) {
    .myballs-action-bar--stack {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }
    .myballs-action-bar--stack > a,
    .myballs-action-bar--stack > button,
    .myballs-action-bar--stack > .d-flex {
        width: 100%;
    }
    .myballs-action-bar--stack > .d-flex {
        flex-direction: column;
        gap: 10px;
    }
    .myballs-action-bar--stack .btn {
        width: 100%;
        justify-content: center;
    }
    .myballs-action-bar--stack .myballs-btn-save {
        min-width: 0;
    }
}

/* ============================================================
   HEADER DEL TORNEO (de versiones anteriores)
   ============================================================ */
.myballs-tournament-header {
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(13, 127, 62, 0.08);
    border: 1px solid #e8f5ed;
    overflow: hidden;
    position: relative;
}
.myballs-tournament-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 6px;
    height: 100%;
    background: linear-gradient(180deg, #0d7f3e 0%, #d4a017 100%);
}
.myballs-tournament-header-body {
    padding: 28px 32px 28px 38px;
    background: linear-gradient(135deg, #ffffff 0%, #f7fcf9 100%);
    position: relative;
}
.myballs-tournament-title {
    color: #1a5d2e;
    font-weight: 800;
    font-size: 28px;
    line-height: 1.2;
    letter-spacing: -0.5px;
    margin: 0;
}
@media (max-width: 768px) {
    .myballs-tournament-header-body {
        padding: 24px 20px 24px 26px;
    }
    .myballs-tournament-title {
        font-size: 22px;
    }
}

/* ============================================================
   DESCRIPCIÓN DEL TORNEO
   ============================================================ */
.myballs-descripcion {
    position: relative;
    padding-left: 44px;
    padding-top: 4px;
}
.myballs-descripcion-icon {
    position: absolute;
    left: 0;
    top: 0;
    color: var(--myballs-primary);
    font-size: 32px;
    opacity: 0.25;
    line-height: 1;
}
.myballs-descripcion-text {
    line-height: 1.75;
    color: #475569;
    font-size: 15px;
    white-space: pre-line;
    margin: 0;
}

/* ============================================================
   INFO-LIST (vista detalle)
   ============================================================ */
.myballs-info-list {
    display: flex;
    flex-direction: column;
}
.myballs-info-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    padding: 14px 24px;
    border-bottom: 1px solid #f1f5f9;
    transition: background 0.15s ease;
}
.myballs-info-row:last-child { border-bottom: none; }
.myballs-info-row:hover { background: #f8fafc; }

.myballs-info-label {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #64748b;
    font-size: 14px;
    font-weight: 500;
    flex-shrink: 0;
}
.myballs-info-label iconify-icon {
    color: var(--myballs-primary);
    font-size: 18px;
    vertical-align: middle;
    opacity: 0.85;
}
.myballs-info-value {
    color: #1e293b;
    font-weight: 600;
    font-size: 14px;
    text-align: right;
    word-break: break-word;
}
.myballs-info-value .badge,
.myballs-info-value .badge-categoria {
    font-weight: 700;
}

@media (max-width: 575px) {
    .myballs-info-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }
    .myballs-info-value {
        text-align: left;
        padding-left: 28px;
    }
}

/* ============================================================
   STATS MINI CARDS
   ============================================================ */
.myballs-stat-mini {
    border-radius: 12px;
    transition: transform 0.2s, box-shadow 0.2s;
}
.myballs-stat-mini:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.08);
}

/* ============================================================
   SIDEBAR
   ============================================================ */
.sidebar .sidebar-menu li a.active,
.sidebar .sidebar-menu li.dropdown.open > a {
    background-color: var(--myballs-primary-light) !important;
    color: var(--myballs-primary) !important;
    font-weight: 600;
}
.sidebar .sidebar-menu li a:hover {
    background-color: var(--myballs-primary-light) !important;
    color: var(--myballs-primary) !important;
}
.sidebar .sidebar-menu li a.active .menu-icon,
.sidebar .sidebar-menu li.dropdown.open > a .menu-icon {
    color: var(--myballs-primary) !important;
}
.sidebar .sidebar-menu-group-title {
    color: var(--myballs-primary-dark) !important;
    font-weight: 700;
    text-transform: uppercase;
    font-size: 11px;
    letter-spacing: 0.8px;
    padding: 16px 24px 8px !important;
    opacity: 0.7;
}
.sidebar .sidebar-submenu li a.active {
    background-color: rgba(13, 127, 62, 0.08) !important;
    color: var(--myballs-primary) !important;
    font-weight: 600;
}
.sidebar .menu-icon {
    vertical-align: middle;
    margin-right: 8px;
}

/* ============================================================
   BOTONES
   ============================================================ */
.btn-myballs-primary {
    background-color: var(--myballs-primary) !important;
    color: #fff !important;
    border: none !important;
    font-weight: 600;
}
.btn-myballs-primary:hover {
    background-color: var(--myballs-primary-dark) !important;
    color: #fff !important;
}
.btn-myballs-accent {
    background-color: var(--myballs-accent) !important;
    color: #fff !important;
    border: none !important;
    font-weight: 600;
}
.btn-myballs-accent:hover {
    background-color: #c89414 !important;
    color: #fff !important;
}
.btn-myballs-outline {
    border: 1.5px solid var(--myballs-primary) !important;
    color: var(--myballs-primary) !important;
    background: transparent !important;
    font-weight: 600;
}
.btn-myballs-outline:hover {
    background-color: var(--myballs-primary) !important;
    color: #fff !important;
}
.btn-myballs-outline:hover iconify-icon {
    color: #fff !important;
}

/* ============================================================
   ENLACES Y FONDOS
   ============================================================ */
.text-myballs { color: var(--myballs-primary) !important; }
a.text-myballs:hover { color: var(--myballs-primary-dark) !important; }
.hover-text-primary:hover { color: var(--myballs-primary) !important; }
.bg-myballs-primary { background-color: var(--myballs-primary) !important; color: #fff; }
.bg-myballs-accent { background-color: var(--myballs-accent) !important; color: #fff; }
.bg-myballs-light { background-color: var(--myballs-primary-light) !important; }

.myballs-gradient {
    background: linear-gradient(135deg, var(--myballs-primary) 0%, var(--myballs-primary-dark) 100%);
    color: #fff;
}

/* GRADIENTES DASHBOARD */
.bg-gradient-start-1 { background: linear-gradient(135deg, #f0f7f2 0%, #e8f5ed 100%) !important; border-color: rgba(13, 127, 62, 0.15) !important; }
.bg-gradient-start-2 { background: linear-gradient(135deg, #fef9e9 0%, #fef3d1 100%) !important; border-color: rgba(212, 160, 23, 0.15) !important; }
.bg-gradient-start-3 { background: linear-gradient(135deg, #f0f5f1 0%, #e6efe9 100%) !important; border-color: rgba(26, 93, 46, 0.15) !important; }
.bg-gradient-start-4 { background: linear-gradient(135deg, #f5f6f7 0%, #eaecef 100%) !important; border-color: rgba(108, 117, 125, 0.15) !important; }
.bg-gradient-start-5 { background: linear-gradient(135deg, #f0f7f2 0%, #d9ecdf 100%) !important; border-color: rgba(13, 127, 62, 0.2) !important; }

.myballs-card-stat {
    border-radius: 16px;
    transition: transform 0.2s, box-shadow 0.2s;
}
.myballs-card-stat:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(13, 127, 62, 0.15);
}
.card { border-radius: 12px; }
.myballs-card-stat .rounded-circle iconify-icon {
    vertical-align: middle;
    margin: 0;
}

/* BADGES DE CATEGORÍAS */
.badge-categoria {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 6px;
    font-weight: 700;
    font-size: 11px;
    letter-spacing: 0.5px;
}
.badge-cat-J30  { background: #fee; color: #c0392b; }
.badge-cat-J60  { background: #fef3e2; color: #d4a017; }
.badge-cat-J100 { background: #e8f5ed; color: #0d7f3e; }
.badge-cat-J200 { background: #e3f2fd; color: #1565c0; }
.badge-cat-J300 { background: #f3e5f5; color: #6a1b9a; }
.badge-cat-J500 { background: #ffe0b2; color: #e65100; }

/* LOGIN */
.auth-left { width: 50%; }
.auth-right { width: 50%; min-height: 100vh; }
@media (max-width: 991px) {
    .auth-right { width: 100%; }
}
.auth-left iconify-icon {
    vertical-align: -0.15em;
}

/* FORMS legacy fallback */
.form-control:focus,
.form-select:focus {
    border-color: var(--myballs-primary);
    box-shadow: 0 0 0 0.2rem rgba(13, 127, 62, 0.15);
}

/* UTILIDADES */
.cursor-pointer { cursor: pointer; }
.shadow-myballs { box-shadow: 0 4px 20px rgba(13, 127, 62, 0.1); }
.min-w-0 { min-width: 0; }
/* ============================================================
   BANDERAS ESTILO ITF (a agregar al final de myballs.css)
   ============================================================ */

/* Bandera completa: imagen arriba + código abajo */
.myballs-pais-flag {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    line-height: 1;
}
.myballs-pais-flag iconify-icon {
    border-radius: 2px;
    overflow: hidden;
    box-shadow: 0 0 0 1px rgba(0,0,0,0.1);
    background: #fff;
}
.myballs-pais-code {
    font-weight: 700;
    color: #64748b;
    letter-spacing: 0.5px;
}

/* Bandera inline (con nombre al lado) */
.myballs-pais-inline {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}
.myballs-pais-inline iconify-icon {
    border-radius: 2px;
    overflow: hidden;
    box-shadow: 0 0 0 1px rgba(0,0,0,0.1);
    background: #fff;
}

/* Bandera "hero" (grande, en headers) */
.myballs-bandera-hero {
    padding: 4px;
    background: #fff;
    border-radius: 6px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}
.myballs-bandera-hero .myballs-pais-flag iconify-icon {
    font-size: 48px !important;
    border-radius: 4px;
}
.myballs-bandera-hero .myballs-pais-code {
    font-size: 12px !important;
    color: #1a5d2e;
}

/* Bandera solo (sin código) */
.myballs-bandera-icon {
    border-radius: 2px;
    overflow: hidden;
    box-shadow: 0 0 0 1px rgba(0,0,0,0.1);
    background: #fff;
    vertical-align: middle;
}

/* Código de país sin bandera (fallback) */
.myballs-pais-code-only {
    display: inline-block;
    padding: 4px 8px;
    background: #f1f5f9;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 700;
    color: #64748b;
    letter-spacing: 0.5px;
}

/* ============================================================
   RANKING
   ============================================================ */
.myballs-ranking {
    display: inline-block;
    padding: 4px 10px;
    background: linear-gradient(135deg, #f0faf3 0%, #e8f5ed 100%);
    border: 1.5px solid #0d7f3e;
    border-radius: 6px;
    color: #0d7f3e;
    font-weight: 700;
    font-size: 13px;
    letter-spacing: 0.3px;
}
.myballs-ranking-empty {
    background: #f8fafc;
    border-color: #cbd5e1;
    color: #94a3b8;
    font-weight: 600;
}

/* Ranking hero (destacado en header del perfil) */
.myballs-ranking-hero {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    background: linear-gradient(135deg, #0d7f3e 0%, #1a5d2e 100%);
    color: #fff;
    padding: 10px 20px;
    border-radius: 10px;
    box-shadow: 0 4px 14px rgba(13, 127, 62, 0.3);
    min-width: 100px;
}
.myballs-ranking-hero-label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 1px;
    opacity: 0.9;
    margin-bottom: 2px;
}
.myballs-ranking-hero-value {
    font-size: 24px;
    font-weight: 800;
    line-height: 1;
}
/* ============================================================
   TARJETAS DE CATEGORÍAS DE TORNEO (CAT.2)
   Agregar al final de /assets/css/myballs.css
   ============================================================ */

.myballs-cat-card {
    border: 1px solid #f1f5f9;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
    transition: transform 0.15s, box-shadow 0.15s;
    position: relative;
    overflow: hidden;
}
.myballs-cat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.08);
}
.myballs-cat-card-border {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
}

.myballs-cat-info-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    padding-top: 8px;
    border-top: 1px dashed #e2e8f0;
}
.myballs-cat-info-grid > div:only-child {
    grid-column: 1 / -1;
}

/* Progreso de inscripciones */
.myballs-cat-card .progress {
    border-radius: 10px;
    overflow: hidden;
}
.myballs-cat-card .progress-bar {
    border-radius: 10px;
    transition: width 0.5s ease;
}
/* ============================================================
   CHECKBOX DE CATEGORÍAS EN FORM DE TORNEO (v2 - mucho más claro)
   ============================================================ */

.myballs-cat-check {
    display: block;
    cursor: pointer;
    margin: 0;
    position: relative;
}
.myballs-cat-check input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

/* Estado por DEFECTO: gris, opaco, fondo gris claro */
.myballs-cat-check-body {
    border: 2px dashed #cbd5e1;
    border-radius: 12px;
    padding: 16px 18px;
    background: #f8fafc;
    transition: all 0.2s;
    position: relative;
    height: 100%;
    opacity: 0.75;
}
.myballs-cat-check-body .myballs-cat-check-name {
    color: #64748b;
}

/* Indicador visual (círculo) arriba a la derecha */
.myballs-cat-check-indicator {
    position: absolute;
    top: 12px;
    right: 12px;
    font-size: 22px;
    line-height: 1;
}
.myballs-cat-check-marked {
    display: none;
    color: var(--cat-color, #0d7f3e);
}
.myballs-cat-check-unmarked {
    display: inline-block;
    color: #cbd5e1;
}

/* Badge del código */
.myballs-cat-check-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 4px;
    font-weight: 700;
    font-size: 11px;
    border: 1px solid;
    opacity: 0.7;
}

/* Texto de estado (etiqueta inferior) */
.myballs-cat-check-status {
    margin-top: 10px;
    padding-top: 8px;
    border-top: 1px dashed #e2e8f0;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.myballs-cat-check-status .status-marked {
    display: none;
    color: var(--cat-color, #0d7f3e);
    align-items: center;
    gap: 4px;
}
.myballs-cat-check-status .status-unmarked {
    display: inline-block;
    color: #94a3b8;
}

/* Hover (cuando NO está marcado): preview */
.myballs-cat-check:hover input:not(:checked) + .myballs-cat-check-body {
    border-color: var(--cat-color, #0d7f3e);
    border-style: solid;
    opacity: 1;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.06);
}
.myballs-cat-check:hover input:not(:checked) + .myballs-cat-check-body .myballs-cat-check-unmarked {
    color: var(--cat-color, #0d7f3e);
}

/* Estado MARCADO: borde sólido grueso, fondo de color, todo visible */
.myballs-cat-check input:checked + .myballs-cat-check-body {
    border: 3px solid var(--cat-color, #0d7f3e);
    border-style: solid;
    background: linear-gradient(135deg, #ffffff 0%, color-mix(in srgb, var(--cat-color, #0d7f3e) 8%, white) 100%);
    box-shadow: 0 4px 16px color-mix(in srgb, var(--cat-color, #0d7f3e) 25%, transparent);
    opacity: 1;
    transform: translateY(-1px);
}
.myballs-cat-check input:checked + .myballs-cat-check-body .myballs-cat-check-marked {
    display: inline-block;
}
.myballs-cat-check input:checked + .myballs-cat-check-body .myballs-cat-check-unmarked {
    display: none;
}
.myballs-cat-check input:checked + .myballs-cat-check-body .myballs-cat-check-name {
    color: #0f172a;
}
.myballs-cat-check input:checked + .myballs-cat-check-body .myballs-cat-check-badge {
    opacity: 1;
    border-width: 2px;
}
.myballs-cat-check input:checked + .myballs-cat-check-body .myballs-cat-check-status .status-marked {
    display: inline-flex;
}
.myballs-cat-check input:checked + .myballs-cat-check-body .myballs-cat-check-status .status-unmarked {
    display: none;
}
.myballs-cat-check input:checked + .myballs-cat-check-body .myballs-cat-check-status {
    border-top-color: var(--cat-color, #0d7f3e);
    border-top-style: solid;
}

/* CONTADOR DE CATEGORÍAS SELECCIONADAS */
.myballs-cat-counter {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 10px 18px;
    background: #f1f5f9;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    font-size: 14px;
    color: #475569;
    font-weight: 500;
    transition: all 0.2s;
}
.myballs-cat-counter iconify-icon {
    font-size: 22px;
    color: #94a3b8;
}
.myballs-cat-counter strong {
    color: #0f172a;
    font-size: 18px;
}
.myballs-cat-counter.has-selection {
    background: linear-gradient(135deg, #f0faf3 0%, #e8f5ed 100%);
    border-color: #0d7f3e;
    color: #0d7f3e;
}
.myballs-cat-counter.has-selection iconify-icon {
    color: #0d7f3e;
}
.myballs-cat-counter.has-selection strong {
    color: #0d7f3e;
}


/* ============================================================
   TABS DE CATEGORÍAS POR GÉNERO Y MODALIDAD (v3)
   ============================================================ */

.myballs-cat-tabs {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 24px;
    padding: 0;
}

.myballs-cat-tab {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    background: #fff;
    border: 1.5px solid #e2e8f0;
    border-radius: 10px;
    color: #64748b;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.15s;
    position: relative;
    text-decoration: none;
}

.myballs-cat-tab:hover:not(.active) {
    color: var(--tab-color, #0d7f3e);
    background: #f0faf3;
    border-color: #0d7f3e60;
}

.myballs-cat-tab:hover:not(.active) iconify-icon {
    color: var(--tab-color, #0d7f3e);
}

.myballs-cat-tab iconify-icon {
    font-size: 18px;
    color: inherit;
    transition: color 0.15s;
}

.myballs-cat-tab.active {
    color: var(--tab-color, #0d7f3e);
    background: #f0faf3;
    border-color: var(--tab-color, #0d7f3e);
    font-weight: 700;
}

.myballs-cat-tab.active iconify-icon {
    color: var(--tab-color, #0d7f3e);
}

.myballs-cat-tab-count {
    background: #e2e8f0;
    color: #64748b;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.3px;
    min-width: 38px;
    text-align: center;
    transition: all 0.15s;
    line-height: 1.3;
}

.myballs-cat-tab.has-selection .myballs-cat-tab-count {
    background: var(--tab-color, #0d7f3e);
    color: #fff;
}

.myballs-cat-tab.active .myballs-cat-tab-count {
    background: #fff;
    color: var(--tab-color, #0d7f3e);
    border: 1px solid var(--tab-color, #0d7f3e);
}

.myballs-cat-tab.active.has-selection .myballs-cat-tab-count {
    background: var(--tab-color, #0d7f3e);
    color: #fff;
    border: 1px solid var(--tab-color, #0d7f3e);
}

/* Paneles */
.myballs-cat-panel {
    display: none;
    animation: fadeInPanel 0.25s ease-out;
}

.myballs-cat-panel.active {
    display: block;
}

@keyframes fadeInPanel {
    from { opacity: 0; transform: translateY(4px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* Responsive: tabs scrollables en mobile */
@media (max-width: 768px) {
    .myballs-cat-tabs {
        flex-wrap: nowrap;
        overflow-x: auto;
        scrollbar-width: thin;
    }
    .myballs-cat-tab {
        flex-shrink: 0;
        padding: 10px 14px;
        font-size: 13px;
    }
    .myballs-cat-tab span:not(.myballs-cat-tab-count) {
        display: none;
    }
}

/* ============================================================
   CAMPOS READONLY (Código y Slug auto-generados)
   ============================================================ */

.myballs-readonly {
    background-color: #f0faf3 !important;
    border-color: #c8e6d2 !important;
    color: #0d7f3e !important;
    font-weight: 600;
    cursor: not-allowed;
    font-family: 'Courier New', monospace;
    letter-spacing: 0.3px;
}
.myballs-readonly:focus {
    background-color: #f0faf3 !important;
    border-color: #0d7f3e !important;
    box-shadow: 0 0 0 0.15rem rgba(13, 127, 62, 0.1) !important;
}
.myballs-form-hint code {
    background: #f1f5f9;
    color: #0d7f3e;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-family: 'Courier New', monospace;
    font-weight: 600;
}

/* ============================================================
   UPLOADER DE FOTO DE JUGADOR
   ============================================================ */

.myballs-foto-uploader {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    text-align: center;
}

.myballs-foto-uploader .myballs-director-avatar {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    border: 3px solid #0d7f3e;
    overflow: hidden;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f0faf3;
    color: #0d7f3e;
    font-weight: 700;
    font-size: 28px;
}
.myballs-foto-uploader .myballs-director-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.myballs-foto-uploader .myballs-director-avatar.empty {
    background: #f0faf3;
    color: #0d7f3e;
}

.myballs-foto-uploader-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: #fff;
    color: #0d7f3e;
    border: 1.5px solid #0d7f3e;
    border-radius: 8px;
    font-weight: 600;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.15s;
    margin: 0;
}
.myballs-foto-uploader-btn:hover {
    background: #0d7f3e;
    color: #fff;
}
.myballs-foto-uploader-btn iconify-icon {
    font-size: 16px;
}

.myballs-foto-remove-check {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: #dc2626;
    cursor: pointer;
    margin: 0;
}
.myballs-foto-remove-check input {
    margin: 0;
}

.myballs-foto-hint {
    font-size: 11px;
    color: #94a3b8;
    margin: 0;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}
.myballs-foto-hint iconify-icon {
    color: #cbd5e1;
}

/* ============================================================
   TARJETA DE PERFIL SIDEBAR (form jugador v3)
   ============================================================ */

.myballs-perfil-card {
    border: 1px solid #e8f5ed;
    box-shadow: 0 4px 12px rgba(13, 127, 62, 0.06);
    position: sticky;
    top: 20px;
}

.myballs-perfil-foto-wrap {
    position: relative;
    width: 180px;
    height: 180px;
    margin: 0 auto 20px;
}

.myballs-perfil-foto {
    width: 180px;
    height: 180px;
    border-radius: 50%;
    border: 4px solid #0d7f3e;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f0faf3;
    color: #0d7f3e;
    font-weight: 700;
    font-size: 56px;
    box-shadow: 0 8px 24px rgba(13, 127, 62, 0.18);
}
.myballs-perfil-foto img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.myballs-perfil-foto.empty {
    background: #f0faf3;
}

.myballs-perfil-foto-camara {
    position: absolute;
    bottom: 8px;
    right: 8px;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: #d4a017;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(212, 160, 23, 0.4);
    border: 3px solid #fff;
    transition: all 0.15s;
    font-size: 18px;
}
.myballs-perfil-foto-camara:hover {
    background: #b8870f;
    transform: scale(1.08);
}

.myballs-perfil-nombre {
    text-align: center;
    color: #1a5d2e;
    font-weight: 700;
    font-size: 20px;
    margin: 0 0 6px;
    min-height: 26px;
}

.myballs-perfil-ipin {
    text-align: center;
    color: #64748b;
    font-size: 13px;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    font-family: 'Courier New', monospace;
}
.myballs-perfil-ipin iconify-icon {
    color: #0d7f3e;
}

.myballs-perfil-pais {
    text-align: center;
    margin-bottom: 20px;
    display: flex;
    justify-content: center;
}

.myballs-perfil-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    padding: 16px 0;
    border-top: 1px solid #e2e8f0;
    border-bottom: 1px solid #e2e8f0;
    margin: 16px 0;
}
.myballs-perfil-stats .stat {
    text-align: center;
}
.myballs-perfil-stats .num {
    font-size: 24px;
    font-weight: 700;
    color: #0d7f3e;
    line-height: 1;
}
.myballs-perfil-stats .lbl {
    font-size: 11px;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 4px;
}

.myballs-perfil-acciones {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin: 16px 0 12px;
}
.myballs-perfil-acciones .btn {
    cursor: pointer;
    margin: 0;
}

.myballs-perfil-hint {
    text-align: center;
    color: #94a3b8;
    font-size: 11px;
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
}

/* ============================================================
   MODAL DE INSCRIPCIÓN POST-CREACIÓN
   ============================================================ */

.myballs-modal-inscribir .modal-content {
    border-radius: 14px;
    overflow: hidden;
    border: none;
}
.myballs-modal-inscribir .modal-header {
    border-bottom: none;
    padding: 22px 28px;
}
.myballs-modal-inscribir code {
    background: rgba(13, 127, 62, 0.08);
    color: #0d7f3e;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 11px;
}

.myballs-modal-categorias {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 12px;
}

.myballs-modal-cat-card {
    cursor: pointer;
    margin: 0;
    display: block;
}
.myballs-modal-cat-card input[type="radio"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}
.myballs-modal-cat-card .cat-body {
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    padding: 14px 16px;
    background: #fff;
    transition: all 0.15s;
}
.myballs-modal-cat-card:hover .cat-body {
    border-color: var(--cat-color, #0d7f3e);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.06);
}
.myballs-modal-cat-card input:checked + .cat-body {
    border-color: var(--cat-color, #0d7f3e);
    background: linear-gradient(135deg, #f0faf3 0%, #fff 100%);
    box-shadow: 0 0 0 3px rgba(13, 127, 62, 0.12);
    transform: translateY(-1px);
}
.cat-codigo {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 4px;
    font-weight: 700;
    font-size: 11px;
    font-family: 'Courier New', monospace;
    border: 1px solid;
    margin-bottom: 8px;
}
.cat-nombre {
    font-weight: 700;
    font-size: 14px;
    color: #1a5d2e;
    margin-bottom: 2px;
}
.cat-meta {
    font-size: 12px;
    color: #64748b;
}

/* ============================================================
   TABS DEL FORM DE JUGADORES (v4)
   ============================================================ */

.myballs-tabs-card {
    border: 1px solid #e8f5ed;
    box-shadow: 0 2px 8px rgba(13, 127, 62, 0.04);
}

.myballs-form-tabs {
    border: none;
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    padding: 0;
    margin: 0;
    background: linear-gradient(to bottom, #fafafa 0%, #fff 100%);
}

.myballs-form-tabs .nav-item {
    flex: 1 1 0;
    min-width: 130px;
    list-style: none;
}

.myballs-form-tabs .nav-link {
    width: 100%;
    height: 100%;
    color: #64748b;
    border: none;
    border-bottom: 3px solid transparent;
    padding: 14px 12px;
    background: transparent;
    border-radius: 0;
    cursor: pointer;
    transition: all 0.15s;
    display: flex;
    align-items: center;
    gap: 10px;
    text-align: left;
}

.myballs-form-tabs .nav-link:hover:not(.active) {
    color: #0d7f3e;
    background: #f0faf3;
}

.myballs-form-tabs .nav-link.active {
    color: #0d7f3e;
    border-bottom-color: #d4a017;
    background: #fff;
}

.myballs-form-tabs .nav-link.tab-completado .myballs-tab-num {
    background: #0d7f3e;
    color: #fff;
}
.myballs-form-tabs .nav-link.tab-completado .myballs-tab-num::after {
    content: '\2713';
    font-size: 14px;
}
.myballs-form-tabs .nav-link.tab-completado .myballs-tab-num span {
    display: none;
}

.myballs-tab-num {
    flex-shrink: 0;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #e2e8f0;
    color: #64748b;
    font-weight: 700;
    font-size: 13px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s;
}
.myballs-form-tabs .nav-link.active .myballs-tab-num {
    background: linear-gradient(135deg, #0d7f3e 0%, #1a5d2e 100%);
    color: #fff;
    box-shadow: 0 2px 6px rgba(13, 127, 62, 0.3);
}

.myballs-tab-content {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
    line-height: 1.2;
}
.myballs-tab-content > span:nth-of-type(1) {
    font-weight: 600;
    font-size: 13px;
}
.myballs-tab-content iconify-icon {
    display: none;
}

.myballs-tab-flag {
    font-size: 9px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 700;
    padding: 1px 6px;
    border-radius: 8px;
}
.myballs-tab-flag.req { background: #fef3c7; color: #92400e; }
.myballs-tab-flag.opt { background: #f1f5f9; color: #64748b; }

.myballs-tab-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    flex-wrap: wrap;
    gap: 12px;
}
.myballs-tab-progreso {
    color: #64748b;
    font-size: 13px;
    font-weight: 600;
}

/* Responsive: en móvil mostrar solo iconos */
@media (max-width: 768px) {
    .myballs-form-tabs .nav-item {
        min-width: 60px;
    }
    .myballs-tab-content > span,
    .myballs-tab-flag {
        display: none !important;
    }
    .myballs-tab-content iconify-icon {
        display: block !important;
        font-size: 20px;
    }
    .myballs-form-tabs .nav-link {
        flex-direction: column;
        padding: 10px 6px;
        text-align: center;
    }
}

/* ============================================================
   CHECKBOXES MÚLTIPLES EN MODAL DE INSCRIPCIÓN
   ============================================================ */
.myballs-modal-cat-card .cat-body {
    position: relative;
}
.myballs-modal-cat-card .cat-check-indicator {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: #e2e8f0;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    transition: all 0.15s;
}
.myballs-modal-cat-card input:checked + .cat-body .cat-check-indicator {
    background: var(--cat-color, #0d7f3e);
    transform: scale(1.1);
}

/* ============================================================
   CARD CATEGORIA YA INSCRITO (deshabilitada)
   ============================================================ */
.myballs-modal-cat-card.ya-inscrito {
    cursor: not-allowed;
    pointer-events: none;
}
.myballs-modal-cat-card.ya-inscrito .cat-body {
    border: 2px solid var(--cat-color, #0d7f3e);
    background: linear-gradient(135deg, #f0faf3 0%, #fff 100%);
    opacity: 0.85;
    position: relative;
}
.myballs-modal-cat-card.ya-inscrito .cat-check-indicator {
    display: none;
}
.myballs-modal-cat-card.ya-inscrito .cat-badge-inscrito {
    position: absolute;
    top: 8px;
    right: 8px;
    background: #0d7f3e;
    color: #fff;
    font-size: 9px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 3px 8px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    gap: 4px;
}
.myballs-modal-cat-card.ya-inscrito .cat-badge-inscrito iconify-icon {
    font-size: 12px;
}
.myballs-modal-cat-card.ya-inscrito:hover .cat-body {
    transform: none;
    box-shadow: none;
}

/* ============================================================
   CARD DE JUGADOR EN FORM DE EDICIÓN DE INSCRIPCIÓN (readonly)
   ============================================================ */
.myballs-insc-jugador-card {
    background: linear-gradient(135deg, #f0faf3 0%, #fafffc 100%);
    border: 1.5px solid #0d7f3e30;
    border-radius: 12px;
    padding: 18px 20px;
    position: relative;
}
.myballs-insc-jugador-card::before {
    content: '🔒';
    display: none;
}

/* ============================================================
   CARD DE TORNEO EN FORM DE EDICIÓN DE INSCRIPCIÓN (readonly)
   ============================================================ */
.myballs-insc-torneo-card {
    background: linear-gradient(135deg, #f0faf3 0%, #fafffc 100%);
    border: 1.5px solid #0d7f3e30;
    border-radius: 12px;
    padding: 18px 20px;
    position: relative;
}
.myballs-insc-torneo-icono {
    width: 56px;
    height: 56px;
    border-radius: 14px;
    background: linear-gradient(135deg, #0d7f3e 0%, #1a5d2e 100%);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    box-shadow: 0 4px 12px rgba(13, 127, 62, 0.25);
}

/* ============================================================
   CARDS DE CATEGORÍA ESTILO "MARCADA / CLIC PARA MARCAR"
   ============================================================ */
.myballs-insc-cat-hint {
    background: #fef9e9;
    border: 1px solid #d4a017;
    border-radius: 10px;
    padding: 10px 14px;
    margin-bottom: 16px;
    display: flex;
    align-items: flex-start;
    gap: 10px;
    color: #92400e;
    font-size: 13px;
}
.myballs-insc-cat-hint iconify-icon {
    color: #d4a017;
    font-size: 18px;
    flex-shrink: 0;
    margin-top: 1px;
}

.myballs-insc-cat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 14px;
}

.myballs-insc-cat-card {
    cursor: pointer;
    margin: 0;
    display: block;
    border: 2px dashed #cbd5e1;
    border-radius: 12px;
    background: #fff;
    transition: all 0.15s;
    overflow: hidden;
    position: relative;
}
.myballs-insc-cat-card input[type="checkbox"],
.myballs-insc-cat-card input[type="radio"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
    width: 0;
    height: 0;
    margin: 0;
}
.myballs-insc-cat-card:hover {
    border-color: var(--cat-color, #0d7f3e);
    border-style: solid;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.06);
}

/* Card MARCADA */
.myballs-insc-cat-card.marcada {
    border-color: var(--cat-color, #0d7f3e);
    border-style: solid;
    background: linear-gradient(135deg, #f0faf3 0%, #fff 100%);
    box-shadow: 0 0 0 3px rgba(13, 127, 62, 0.10);
}

/* Header con código y check */
.myballs-insc-cat-card .cat-card-header {
    padding: 14px 16px 0;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}
.myballs-insc-cat-card .cat-card-codigo {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 4px;
    font-weight: 700;
    font-size: 11px;
    font-family: 'Courier New', monospace;
    border: 1px solid;
}
.myballs-insc-cat-card .cat-card-check {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: #e2e8f0;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    transition: all 0.15s;
}
.myballs-insc-cat-card.marcada .cat-card-check {
    background: var(--cat-color, #0d7f3e);
    transform: scale(1.1);
}

/* Body */
.myballs-insc-cat-card .cat-card-body {
    padding: 8px 16px 14px;
}
.myballs-insc-cat-card .cat-card-nombre {
    font-weight: 700;
    font-size: 15px;
    color: #1a5d2e;
    margin-bottom: 2px;
}
.myballs-insc-cat-card .cat-card-meta {
    font-size: 12px;
    color: #64748b;
}

/* Footer con badge "MARCADA / CLIC PARA MARCAR" */
.myballs-insc-cat-card .cat-card-footer {
    padding: 10px 16px;
    border-top: 1px solid #f1f5f9;
    background: #fafafa;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}
.myballs-insc-cat-card .cat-card-status-marcada,
.myballs-insc-cat-card .cat-card-status-clic {
    display: flex;
    align-items: center;
    gap: 4px;
}
.myballs-insc-cat-card .cat-card-status-marcada {
    color: var(--cat-color, #0d7f3e);
    display: none;
}
.myballs-insc-cat-card .cat-card-status-clic {
    color: #94a3b8;
}
.myballs-insc-cat-card .cat-card-status-marcada iconify-icon {
    font-size: 14px;
}
.myballs-insc-cat-card.marcada .cat-card-status-marcada {
    display: flex;
}
.myballs-insc-cat-card.marcada .cat-card-status-clic {
    display: none;
}
.myballs-insc-cat-card.marcada .cat-card-footer {
    background: var(--cat-color, #0d7f3e);
    background: color-mix(in srgb, var(--cat-color, #0d7f3e) 8%, white);
}

/* ============================================================
   INSCRIPCION: TOTAL SELECCIONADAS BOX
   ============================================================ */
.myballs-insc-total-box {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 18px;
    background: #fff;
    border: 2px solid #0d7f3e;
    border-radius: 10px;
    margin-bottom: 16px;
    color: #0d7f3e;
    font-weight: 500;
}
.myballs-insc-total-box iconify-icon {
    font-size: 22px;
}
.myballs-insc-total-box strong {
    color: #1a5d2e;
    font-size: 18px;
}

/* ============================================================
   INSCRIPCION: TABS DE GÉNERO/MODALIDAD
   ============================================================ */
.myballs-insc-tabs {
    border-bottom: none;
    display: flex;
    flex-wrap: wrap;
    padding: 0;
    margin: 0 0 20px;
    gap: 8px;
    list-style: none;
}
.myballs-insc-tabs .nav-item {
    list-style: none;
}

.myballs-insc-tab-btn {
    background: #fff;
    border: 1.5px solid #e2e8f0;
    border-radius: 10px;
    padding: 10px 16px;
    color: #64748b;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: all 0.15s;
    text-decoration: none;
}
.myballs-insc-tab-btn iconify-icon {
    font-size: 18px;
    color: inherit;
}
.myballs-insc-tab-btn:hover:not(.active) {
    color: #0d7f3e;
    background: #f0faf3;
    border-color: #0d7f3e60;
}
.myballs-insc-tab-btn.active {
    color: #0d7f3e;
    background: #f0faf3;
    border-color: #0d7f3e;
    font-weight: 700;
}
.myballs-insc-tab-btn .tab-badge {
    background: #e2e8f0;
    color: #64748b;
    font-size: 11px;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 12px;
    margin-left: 0;
    line-height: 1.3;
}
.myballs-insc-tab-btn.active .tab-badge {
    background: #fff;
    color: #0d7f3e;
    border: 1px solid #0d7f3e;
}

.myballs-insc-tab-content {
    min-height: 100px;
}
.myballs-insc-tab-panel {
    display: none;
}
.myballs-insc-tab-panel.active {
    display: block;
}

/* ============================================================
   INSCRIPCION: CARDS DE CATEGORIA (rediseño exacto)
   ============================================================ */
.myballs-insc-cat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 14px;
}

.myballs-insc-cat-card {
    cursor: pointer;
    margin: 0;
    display: flex;
    flex-direction: column;
    border: 2px dashed #cbd5e1;
    border-radius: 14px;
    background: #fff;
    transition: all 0.15s;
    overflow: hidden;
    position: relative;
    min-height: 150px;
}
.myballs-insc-cat-card input[type="checkbox"],
.myballs-insc-cat-card input[type="radio"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
    width: 0;
    height: 0;
    margin: 0;
}
.myballs-insc-cat-card:hover:not(.marcada) {
    border-color: var(--cat-color, #0d7f3e);
    border-style: solid;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.06);
}

/* Card MARCADA */
.myballs-insc-cat-card.marcada {
    border-color: var(--cat-color, #0d7f3e);
    border-style: solid;
    background: linear-gradient(135deg, #f0faf3 0%, #fff 100%);
    box-shadow: 0 0 0 3px rgba(13, 127, 62, 0.10);
}

/* Header con código y check */
.myballs-insc-cat-card .cat-card-header {
    padding: 14px 16px 0;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}
.myballs-insc-cat-card .cat-card-codigo {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 4px;
    font-weight: 700;
    font-size: 11px;
    font-family: 'Courier New', monospace;
    border: 1px solid;
}
.myballs-insc-cat-card .cat-card-check {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: #e2e8f0;
    color: #94a3b8;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    transition: all 0.15s;
}
.myballs-insc-cat-card.marcada .cat-card-check {
    background: var(--cat-color, #0d7f3e);
    color: #fff;
    transform: scale(1.1);
}

/* Body */
.myballs-insc-cat-card .cat-card-body {
    padding: 8px 16px 14px;
    flex-grow: 1;
}
.myballs-insc-cat-card .cat-card-nombre {
    font-weight: 700;
    font-size: 15px;
    color: #1a5d2e;
    margin-bottom: 4px;
}
.myballs-insc-cat-card .cat-card-meta {
    font-size: 12px;
    color: #64748b;
}
.myballs-insc-cat-card:not(.marcada) .cat-card-nombre {
    color: #475569;
}

/* Footer con badge */
.myballs-insc-cat-card .cat-card-footer {
    padding: 10px 16px;
    border-top: 1px solid #f1f5f9;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
}
.myballs-insc-cat-card .cat-card-status-marcada,
.myballs-insc-cat-card .cat-card-status-clic {
    display: flex;
    align-items: center;
    gap: 6px;
}
.myballs-insc-cat-card .cat-card-status-marcada {
    color: var(--cat-color, #0d7f3e);
    display: none;
}
.myballs-insc-cat-card .cat-card-status-marcada .dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--cat-color, #0d7f3e);
}
.myballs-insc-cat-card .cat-card-status-clic {
    color: #cbd5e1;
}
.myballs-insc-cat-card.marcada .cat-card-status-marcada {
    display: flex;
}
.myballs-insc-cat-card.marcada .cat-card-status-clic {
    display: none;
}

/* ============================================================
   BUSCADOR PREDICTIVO DE JUGADORES
   ============================================================ */
.myballs-search-jugador { position: relative; }
.myballs-search-jugador .search-input-wrap {
    position: relative;
    display: flex;
    align-items: center;
}
.myballs-search-jugador .search-icono {
    position: absolute;
    left: 14px;
    color: #94a3b8;
    font-size: 20px;
    pointer-events: none;
    z-index: 2;
}
.myballs-search-jugador .search-input {
    width: 100%;
    height: 50px;
    padding: 0 50px 0 44px;
    border: 1.5px solid #e2e8f0;
    border-radius: 10px;
    background: #fff;
    font-size: 15px;
    color: #1a5d2e;
    transition: all 0.15s;
    box-sizing: border-box;
}
.myballs-search-jugador .search-input::placeholder { color: #94a3b8; }
.myballs-search-jugador .search-input:focus {
    outline: none;
    border-color: #0d7f3e;
    box-shadow: 0 0 0 3px rgba(13, 127, 62, 0.10);
}
.myballs-search-jugador .search-spinner {
    position: absolute;
    right: 14px;
    color: #0d7f3e;
    font-size: 20px;
}
.myballs-search-jugador .search-results {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    background: #fff;
    border: 1.5px solid #e2e8f0;
    border-radius: 10px;
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.10);
    max-height: 400px;
    overflow-y: auto;
    z-index: 1050;
    padding: 6px;
}
.myballs-search-jugador .search-result-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.1s;
}
.myballs-search-jugador .search-result-item:hover,
.myballs-search-jugador .search-result-item.active { background: #f0faf3; }
.myballs-search-jugador .search-result-avatar,
.myballs-search-jugador .search-result-avatar-img {
    width: 38px; height: 38px;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-weight: 700; font-size: 13px;
    flex-shrink: 0; object-fit: cover;
    border: 2px solid #fff;
    box-shadow: 0 0 0 1px #e2e8f0;
}
.myballs-search-jugador .search-result-info { flex-grow: 1; min-width: 0; }
.myballs-search-jugador .search-result-nombre {
    font-weight: 600; color: #1a5d2e; font-size: 14px; margin-bottom: 2px;
}
.myballs-search-jugador .search-result-nombre mark {
    background: #fef9e9; color: #b45309; padding: 0 2px; border-radius: 2px;
}
.myballs-search-jugador .search-result-meta {
    display: flex; gap: 8px; align-items: center; font-size: 12px; color: #64748b;
}
.myballs-search-jugador .search-result-meta code {
    background: #f1f5f9; color: #475569; padding: 1px 6px; border-radius: 3px; font-size: 11px;
}
.myballs-search-jugador .search-result-meta code mark { background: #fef9e9; color: #b45309; }
.myballs-search-jugador .search-result-meta .badge-genero {
    font-size: 10px; font-weight: 700; padding: 2px 7px; border-radius: 10px;
}
.myballs-search-jugador .search-result-arrow {
    color: #94a3b8; font-size: 16px; flex-shrink: 0;
}
.myballs-search-jugador .search-result-item:hover .search-result-arrow,
.myballs-search-jugador .search-result-item.active .search-result-arrow { color: #0d7f3e; }
.myballs-search-jugador .search-selected {
    background: linear-gradient(135deg, #f0faf3 0%, #fafffc 100%);
    border: 1.5px solid #0d7f3e30;
    border-radius: 12px;
    padding: 16px 20px;
}
.myballs-search-jugador .search-selected-avatar,
.myballs-search-jugador .search-selected-avatar-img {
    width: 56px; height: 56px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-weight: 700; font-size: 20px;
    flex-shrink: 0; object-fit: cover;
    border: 3px solid #0d7f3e;
}
.myballs-search-jugador .btn-cambiar-jugador {
    background: #fef2f2; color: #dc2626; border: 1.5px solid #fca5a5;
    padding: 6px 12px; border-radius: 8px; font-size: 12px; font-weight: 600;
    cursor: pointer; display: flex; align-items: center; gap: 4px; transition: all 0.15s;
}
.myballs-search-jugador .btn-cambiar-jugador:hover { background: #fee2e2; }
.myballs-search-jugador .btn-cambiar-jugador iconify-icon { font-size: 16px; }
.myballs-search-jugador .search-no-results {
    margin-top: 12px; padding: 16px;
    background: #fef9e9; border: 1px solid #d4a017; border-radius: 10px;
    color: #92400e; text-align: center;
}
.myballs-search-jugador .search-no-results iconify-icon {
    font-size: 32px; color: #d4a017; display: block; margin-bottom: 6px;
}

/* ============================================================
   BADGES CATEGORIA LIMPIOS
   ============================================================ */
.cat-badge-clean {
    display: inline-block;
    padding: 5px 14px;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    font-size: 11px;
    font-weight: 700;
    border: 1px solid;
    letter-spacing: 0.5px;
    line-height: 1.4;
}

/* ============================================================
   TABLA ESTILO /jugadores/ (lista de inscripciones por categoria)
   ============================================================ */
.myballs-table-list thead th {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #64748b;
}
.myballs-table-list tbody tr {
    border-bottom: 1px solid #f1f5f9;
    transition: background 0.1s;
}
.myballs-table-list tbody tr:hover { background: #f8fafc; }
.myballs-table-list tbody tr:last-child { border-bottom: none; }
.insc-cancelada { opacity: 0.55; }
.insc-cancelada a { text-decoration: line-through; }

/* ============================================================
   MYBALLS SIDEBAR OVERRIDES — limpio y definitivo
   ============================================================ */

/* 1. LOGO — tamaño correcto y CENTRADO */
.sidebar-logo {
    justify-content: center !important;
}
.sidebar-logo .light-logo,
.sidebar-logo .dark-logo {
    max-width: 150px !important;
    height: auto !important;
}
.sidebar-logo .logo-icon {
    width: 32px !important;
    height: 32px !important;
}

/* 2. DOTS de submenu — reemplazo de ri-circle-fill sin remixicon */
/* 2. DOTS de submenu — CSS puro via ::before, sin ninguna etiqueta */
.sidebar-submenu li > a::before {
    content: '';
    display: inline-block;
    width: 6px;
    height: 6px;
    min-width: 6px;
    min-height: 6px;
    border-radius: 50%;
    background: #0d7f3e;
    margin-right: 10px;
    vertical-align: middle;
    flex-shrink: 0;
}

/* 3. DROPDOWN ARROW — reemplazo de remixicon \ea6e */
.sidebar-menu li.dropdown > a::after {
    content: '' !important;
    font-family: none !important;
    width: 7px !important;
    height: 7px !important;
    border-right: 2px solid currentColor !important;
    border-bottom: 2px solid currentColor !important;
    transform: translateY(-75%) rotate(45deg) !important;
    font-size: 0 !important;
    transition: transform 0.2s ease !important;
}
.sidebar-menu li.dropdown.open > a::after,
.sidebar-menu li.dropdown.dropdown-open > a::after {
    transform: translateY(-25%) rotate(-135deg) !important;
}
.sidebar.active:hover .sidebar-menu li.dropdown a::after,
.sidebar.active .sidebar-menu li.dropdown a::after {
    content: '' !important;
    font-family: none !important;
}

/* 4. DROPDOWN PARENT — NO cambia de color al expandirse.
   Solo rota la flecha. Así nunca hay dos items "seleccionados" */
.sidebar-menu li.dropdown.open > a,
.sidebar-menu li.dropdown.dropdown-open > a {
    background-color: transparent !important;
    color: inherit !important;
}
.sidebar-menu li.dropdown.open > a:hover,
.sidebar-menu li.dropdown.dropdown-open > a:hover {
    background-color: var(--hover-color, rgba(0,0,0,0.05)) !important;
    color: inherit !important;
}

/* 5. ACTIVE PAGE — verde MyBalls (no azul de Wowdash) */
.sidebar-menu li > a.active-page {
    background-color: #0d7f3e !important;
    color: #fff !important;
}
.sidebar-menu li > a.active-page:hover {
    background-color: #0a6632 !important;
    color: #fff !important;
}
/* Submenu item activo: fondo suave verde */
.sidebar-submenu li > a.active-page {
    background-color: #f0faf3 !important;
    color: #0d7f3e !important;
    font-weight: 700 !important;
}

/* 6. DARK MODE BUTTON — reemplazo de remixicon */
[data-theme-toggle]::after {
    display: none !important;
    content: none !important;
}
[data-theme-toggle] {
    font-size: 1.25rem !important;
}

/* 7. CHIPS DE FILTROS ACTIVOS (global) */
.myballs-chips-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px solid #e2e8f0;
    align-items: center;
}
.myballs-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #0a2540;
    color: #fff !important;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    text-decoration: none !important;
    cursor: pointer;
    border: none;
    transition: background 0.2s;
}
.myballs-chip:hover { background: #be185d; }
.myballs-chip iconify-icon { font-size: 14px; }
.myballs-chip-clear {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: #be185d !important;
    text-decoration: underline;
    font-weight: 600;
    font-size: 12px;
    cursor: pointer;
    background: none;
    border: none;
    padding: 6px 8px;
}

/* DOTS submenu — ::before puro, garantiza circulo perfecto */
.sidebar-submenu li > a::before {
    content: '';
    display: inline-block;
    width: 6px;
    height: 6px;
    min-width: 6px;
    min-height: 6px;
    border-radius: 50%;
    background: #0d7f3e;
    margin-right: 10px;
    vertical-align: middle;
    flex-shrink: 0;
}
/* Segundo item de cada submenu: dorado */
.sidebar-submenu li:nth-child(2) > a::before {
    background: #d4a017;
}
/* Limpiar cualquier .menu-dot residual */
.menu-dot { display: none !important; }

/* ============================================================
   DARK MODE BUTTON — CSS puro, sin JS extra
   app.js ya cambia aria-label="light"/"dark"
   Usamos ::before para mostrar el icono segun aria-label
   ============================================================ */
[data-theme-toggle] {
    font-size: 0 !important;        /* ocultar texto "light"/"dark" */
    color: transparent !important;
}
[data-theme-toggle]::after {
    display: none !important;       /* quitar el remixicon ::after */
    content: none !important;
}
[data-theme-toggle]::before {
    content: '☀';
    font-size: 20px;
    color: #f59e0b;
    font-style: normal;
    font-family: system-ui, sans-serif;
    display: flex;
    align-items: center;
    justify-content: center;
}
[data-theme-toggle][aria-label="dark"]::before {
    content: '🌙';
    font-size: 17px;
    color: #94a3b8;
}

/* ── Swipeable Tabs ── */
.ftab-swipe-area {
    touch-action: pan-y;
    user-select: none;
}
.ftab-panel {
    transition: opacity 0.18s ease;
}
.ftab-panel.ftab-swiping {
    opacity: 0.6;
}
.ftab-nav {
    -webkit-overflow-scrolling: touch;
    scroll-behavior: smooth;
}
/* Indicador de swipe en mobile */
@media (max-width: 768px) {
    .ftab-swipe-hint {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 6px;
        padding: 6px 0;
        font-size: 11px;
        color: #94a3b8;
        letter-spacing: .3px;
    }
    .ftab-swipe-hint iconify-icon {
        font-size: 14px;
    }
}
@media (min-width: 769px) {
    .ftab-swipe-hint { display: none; }
}
