@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;600;700&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', sans-serif;
}

body {
    background-color: #f8f9fa; /* Fondo gris muy claro */
    color: #333;
    display: flex;
    height: 100vh;
    overflow: hidden;
}

/* Sidebar */
.sidebar {
    width: 240px;
    background-color: #fff;
    border-right: 1px solid #eef0f3;
    display: flex;
    flex-direction: column;
    padding: 20px 0;
}

.sidebar .logo {
    font-size: 24px;
    font-weight: 700;
    padding: 0 30px;
    margin-bottom: 40px;
    display: flex;
    align-items: center;
    gap: 10px;
    color: #2c3e50;
}

.menu-item {
    padding: 15px 30px;
    text-decoration: none;
    color: #6c757d;
    display: flex;
    align-items: center;
    gap: 15px;
    font-weight: 600;
    font-size: 15px;
    transition: all 0.3s;
}

.menu-item:hover, .menu-item.active {
    color: #4a6ee0; /* Azul vibrante */
    background-color: #f4f6fd;
    border-right: 3px solid #4a6ee0;
}

.menu-item i {
    font-size: 18px;
    width: 20px;
    text-align: center;
}

/* Main Content Area */
.main-wrapper {
    flex: 1;
    display: flex;
    flex-direction: column;
}

/* Topbar */
.topbar {
    height: 70px;
    background-color: #fff;
    border-bottom: 1px solid #eef0f3;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 40px;
}

.search-bar {
    display: flex;
    align-items: center;
    background-color: #f8f9fa;
    border: 1px solid #eef0f3;
    border-radius: 20px;
    padding: 8px 15px;
    width: 300px;
}

.search-bar input {
    border: none;
    background: transparent;
    outline: none;
    margin-left: 10px;
    width: 100%;
    color: #333;
}

.user-actions {
    display: flex;
    align-items: center;
    gap: 20px;
}

.presupuesto-badge {
    color: #4a6ee0;
    font-weight: 600;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.user-avatar {
    width: 35px;
    height: 35px;
    background-color: #f1f3f5;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-weight: 600;
    color: #555;
    border: 1px solid #dee2e6;
}

/* Content & SPA Screens */
.content {
    padding: 40px;
    flex: 1;
    overflow-y: auto;
}

.pantalla {
    background-color: #fff;
    border-radius: 12px;
    border: 1px solid #eef0f3;
    padding: 40px;
    max-width: 600px;
    margin: 0 auto;
    box-shadow: 0 4px 10px rgba(0,0,0,0.02);
}

.oculto {
    display: none !important;
}

/* Typography & Forms in Cards */
h1, h2 {
    color: #2c3e50;
    margin-bottom: 15px;
}

p {
    color: #6c757d;
    margin-bottom: 25px;
    line-height: 1.5;
}

.form-group {
    text-align: left;
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
    font-size: 14px;
}

.form-group input, .form-group select {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ced4da;
    border-radius: 8px;
    font-size: 15px;
    outline: none;
    transition: border-color 0.3s;
}

.form-group input:focus {
    border-color: #4a6ee0;
}

.btn-primary {
    background-color: #4a6ee0;
    color: #fff;
    border: none;
    padding: 12px 25px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    width: 100%;
    font-size: 15px;
    transition: background-color 0.3s;
}

.btn-primary:hover {
    background-color: #3b5bce;
}

.btn-grupo-container {
    display: flex;
    gap: 15px;
}

.btn-outline {
    flex: 1;
    background-color: transparent;
    border: 1px solid #ced4da;
    color: #6c757d;
    padding: 10px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s;
}

.btn-outline.active {
    border-color: #4a6ee0;
    color: #4a6ee0;
    background-color: #f4f6fd;
}








/* --- Diseño Carta Fotocard (Esquinas Redondeadas) --- */
.mercado-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 30px;
    margin-top: 20px;
}

/* 1. Quitamos el padding superior de la tarjeta (ahora es 0 arriba) */
.idol-card {
    position: relative;
    width: 220px;
    height: 350px;
    border-radius: 18px; 
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0 10px 15px 10px; /* <-- Modificado: 0 arriba, 10 a los lados, 15 abajo */
    box-shadow: 0 10px 25px rgba(0,0,0,0.15);
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    overflow: hidden; 
    isolation: isolate;
}

.idol-card:hover {
    transform: translateY(-8px) scale(1.03);
    box-shadow: 0 15px 35px rgba(0,0,0,0.3);
}

/* Tipos de Carta Dinámicos */
.card-bronce { 
    background: linear-gradient(145deg, #cd7f32, #8b5a2b); 
    border: 2px solid #e69c5a;
    color: #fff; 
}
.card-oro { 
    background: linear-gradient(145deg, #ffd700, #b8860b); 
    border: 2px solid #ffeb73;
    color: #1a1a1a; 
}
.card-diamante { 
    background: linear-gradient(145deg, #00bfff, #005c99); 
    border: 2px solid #80dfff;
    color: #fff; 
}
.card-leyenda { 
    background: linear-gradient(145deg, #1a1a1a, #000000); 
    border: 2px solid #ffd700;
    color: #ffd700; 
}

/* Top Section (OVR & Posición) */
.card-top {
    width: 100%;
    display: flex;
    justify-content: flex-end;
    padding-right: 15px;
    position: absolute;
    top: 15px;
    z-index: 2;
}

.card-rating {
    text-align: center;
    line-height: 1;
}

.card-rating .ovr {
    font-size: 32px;
    font-weight: 800;
}

.card-rating .pos {
    font-size: 13px;
    font-weight: 800;
    border-top: 2px solid currentColor;
    padding-top: 3px;
    margin-top: 3px;
}

/* 1. Hacemos la imagen mucho más alta y bajamos el difuminado */
.idol-foto-dls {
    width: 80%; 
    height: 220px; /* <-- Aumentado de 190px a 220px para fotos verticales */
    object-fit: cover;
    object-position: top center; 
    margin-top: 0; 
    /* El difuminado ahora empieza al 75% de la imagen (más abajo) */
    mask-image: linear-gradient(to bottom, black 75%, transparent 100%);
    -webkit-mask-image: linear-gradient(to bottom, black 75%, transparent 100%);
    z-index: 1;
}

/* 2. Bajamos el bloque de información usando el espacio vacío */
.card-info {
    width: 100%;
    text-align: center;
    border-top: 1px solid rgba(255,255,255,0.2);
    padding-top: 5px;
    margin-top: -5px; /* <-- Antes era -15px (lo que lo subía mucho), ahora baja */
    z-index: 2;
}

/* Para que la línea divisoria se vea en la carta dorada */
.card-oro .card-info { border-top: 1px solid rgba(0,0,0,0.1); }

/* 3. Ajustamos un poco los márgenes del texto para que encaje perfecto */
.card-name {
    font-size: 19px;
    font-weight: 800;
    text-transform: uppercase;
    margin-bottom: 5px; /* <-- Reducido para dar espacio */
    letter-spacing: 1px;
}

.card-stats {
    display: flex;
    justify-content: space-around;
    width: 100%;
    font-size: 13px;
    font-weight: 700;
    margin-bottom: 10px; /* <-- Reducido para que el botón no quede tan aplastado */
}

.stat-col {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.stat-col span:first-child {
    font-size: 9px;
    opacity: 0.8;
}

/* Botón adaptado a cada carta */
.btn-fichar {
    margin-top: auto;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(5px);
    color: inherit; /* Hereda el color de la carta (blanco, negro o dorado) */
    border: 1px solid rgba(255, 255, 255, 0.4);
    padding: 10px;
    border-radius: 10px;
    cursor: pointer;
    font-weight: 800;
    font-size: 14px;
    width: 90%;
    transition: 0.3s;
    z-index: 3;
}

.btn-fichar:hover {
    background: rgba(255, 255, 255, 0.4);
}

.card-oro .btn-fichar { border-color: rgba(0,0,0,0.2); }
.card-oro .btn-fichar:hover { background: rgba(0,0,0,0.1); }
.card-leyenda .btn-fichar { border-color: #ffd700; background: rgba(255,215,0,0.1); }
.card-leyenda .btn-fichar:hover { background: rgba(255,215,0,0.3); }



/* Estilo para la bandera en la esquina superior */
.flag-icon {
    width: 20px;
    height: auto;
    margin-top: 6px;
    border-radius: 2px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.4);
    display: block;
    margin-left: auto;
    margin-right: auto;
}


.btn-fichado {
    margin-top: auto;
    background: rgba(40, 167, 69, 0.8) !important; /* Verde de éxito */
    color: white !important;
    border: none;
    padding: 10px;
    border-radius: 10px;
    font-weight: 800;
    font-size: 14px;
    width: 90%;
    cursor: not-allowed;
    z-index: 3;
}






/* --- Celdas de Alineación (Mi Grupo) --- */
.alineacion-wrapper {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
    justify-content: center;
    margin-top: 20px;
}

.slot-celda {
    width: 220px;
    height: 350px;
    border: 3px dashed #cbd5e1;
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    position: relative;
    background: rgba(255, 255, 255, 0.4);
    transition: 0.3s;
}

.slot-celda:hover {
    background: rgba(255, 255, 255, 0.9);
    border-color: #4a6ee0;
}

.slot-celda i.fa-plus {
    font-size: 50px;
    color: #a0aec0;
    transition: 0.3s;
}

.slot-celda:hover i.fa-plus {
    color: #4a6ee0;
    transform: scale(1.2);
}

/* Estilo especial para la celda del Líder */
.slot-lider {
    border-color: #ff9f43 !important;
    box-shadow: 0 0 20px rgba(255, 159, 67, 0.15);
}

.lbl-lider {
    position: absolute;
    top: -15px;
    background: #ff9f43;
    color: white;
    padding: 5px 20px;
    border-radius: 20px;
    font-weight: 800;
    font-size: 13px;
    letter-spacing: 1px;
    z-index: 10;
    box-shadow: 0 4px 10px rgba(255, 159, 67, 0.4);
}

/* --- Sidebar Derecho (Gestión de Roster) --- */
.sidebar-right {
    position: fixed;
    right: -400px; /* Oculto por defecto */
    top: 0;
    width: 350px;
    height: 100vh;
    background: #f8f9fa;
    box-shadow: -5px 0 25px rgba(0,0,0,0.15);
    transition: right 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    z-index: 1000;
    display: flex;
    flex-direction: column;
}

.sidebar-right.open {
    right: 0;
}

.sr-header {
    padding: 25px 20px;
    background: #1e293b;
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.sr-header h3 { margin: 0; font-size: 18px; }
.sr-close { background: none; border: none; color: white; font-size: 20px; cursor: pointer; }

.sr-content {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

/* Mini tarjetas en el Sidebar */
.roster-item {
    display: flex;
    background: #fff;
    border-radius: 12px;
    padding: 12px;
    border: 1px solid #eef0f3;
    align-items: center;
    gap: 15px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.02);
}

.roster-foto { 
    width: 55px; 
    height: 55px; 
    border-radius: 10px; 
    object-fit: cover; 
}

.roster-info { flex: 1; }
.roster-info h4 { margin: 0 0 5px; font-size: 15px; color: #2c3e50; }
.roster-info span { font-size: 12px; color: #4a6ee0; font-weight: 800; background: #f4f6fd; padding: 3px 8px; border-radius: 5px; }

.roster-actions { display: flex; flex-direction: column; gap: 6px; }

.btn-asignar { background: #4a6ee0; color: white; border: none; border-radius: 6px; padding: 6px 12px; font-size: 11px; cursor: pointer; font-weight: bold;}
.btn-quitar { background: #ff9f43; color: white; border: none; border-radius: 6px; padding: 6px 12px; font-size: 11px; cursor: pointer; font-weight: bold;}
.btn-despedir-sm { background: #e3342f; color: white; border: none; border-radius: 6px; padding: 6px 12px; font-size: 11px; cursor: pointer; font-weight: bold;}

.btn-despedir-mercado { background: rgba(227, 52, 47, 0.8) !important; border-color: rgba(227, 52, 47, 0.5) !important; color: white !important;}



/* --- Ajustes para Topbar y Mobile --- */
.left-topbar {
    display: flex;
    align-items: center;
    gap: 15px;
}

.btn-menu-mobile, .btn-close-mobile {
    display: none;
    background: none;
    border: none;
    font-size: 24px;
    color: #2c3e50;
    cursor: pointer;
}

.btn-close-mobile {
    margin-left: auto;
}

/* Transiciones preparadas para el Sidebar Derecho */
.sidebar-right {
    transition: right 0.3s ease, bottom 0.3s ease;
}

/* --- MEDIA QUERIES (Modo Responsivo) --- */
@media (max-width: 768px) {
    /* Sidebar Principal Izquierdo (Oculto por defecto) */
    .sidebar {
        position: fixed;
        left: -260px;
        top: 0;
        height: 100vh;
        z-index: 2000;
        transition: left 0.3s ease;
        box-shadow: 5px 0 15px rgba(0,0,0,0.2);
    }
    
    .sidebar.active {
        left: 0;
    }

    /* Mostrar botones de menú */
    .btn-menu-mobile, .btn-close-mobile {
        display: block;
    }

    /* Ajustes generales de pantalla */
    .topbar { padding: 0 15px; }
    .search-bar { width: 150px; }
    .content { padding: 20px 10px; }
    
    .mercado-grid, .alineacion-wrapper {
        justify-content: center;
        gap: 15px;
    }

    /* --- SIDEBAR DERECHO (Desliza desde Abajo) --- */
    .sidebar-right {
        top: auto !important; /* Anulamos el top de PC */
        bottom: -100%;        /* Lo escondemos abajo */
        right: 0 !important;
        width: 100%;
        height: 75vh;         /* Ocupa el 75% de la pantalla */
        border-radius: 25px 25px 0 0;
        box-shadow: 0 -10px 25px rgba(0,0,0,0.2);
    }

    .sidebar-right.open {
        bottom: 0;            /* Sube al activarse */
        right: 0;
    }
}

/* --- Carta Simplificada (Para Mi Grupo) --- */
.card-info-simple {
    display: flex;
    justify-content: space-around;
    align-items: center;
    width: 100%;
    border-top: 1px solid rgba(255,255,255,0.2);
    padding-top: 8px;
    margin-top: 5px;
}
.info-simple-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    font-weight: 800;
    font-size: 16px;
}
.info-simple-item span {
    font-size: 9px;
    opacity: 0.8;
    font-weight: normal;
}
.slot-foto {
    height: 220px; /* ¡AQUÍ ESTABA EL ERROR! Lo igualamos a la altura del mercado */
    margin-top: 0; /* Lo pegamos arriba igual que en el mercado */
    mask-image: linear-gradient(to bottom, black 95%, transparent 100%) !important;
    -webkit-mask-image: linear-gradient(to bottom, black 95%, transparent 100%) !important;
}

/* --- Modal Overlay --- */
.modal-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.8); z-index: 3000;
    display: flex; justify-content: center; align-items: center;
    opacity: 0; pointer-events: none; transition: opacity 0.3s ease;
}
.modal-overlay.active { opacity: 1; pointer-events: auto; }
.modal-content {
    display: flex; flex-direction: column; align-items: center; gap: 15px;
    position: relative;
    transform: scale(0.8); transition: transform 0.3s ease;
}
.modal-overlay.active .modal-content { transform: scale(1); }
.btn-cerrar-modal {
    position: absolute; top: -15px; right: -15px;
    background: #e3342f; color: white; border: none;
    width: 35px; height: 35px; border-radius: 50%;
    cursor: pointer; font-weight: bold; z-index: 10; font-size: 16px;
}
.btn-vender-modal {
    background: #e3342f; color: white; border: none; padding: 12px 20px;
    border-radius: 10px; font-weight: 800; cursor: pointer; width: 100%; font-size: 15px;
}
.btn-vender-modal:hover { background: #cc2a25; }

/* --- 2 COLUMNAS RESPONSIVAS EN MÓVIL --- */
@media (max-width: 768px) {
    .mercado-grid, .alineacion-wrapper {
        display: grid;
        grid-template-columns: repeat(2, 1fr); /* Fuerza 2 columnas */
        gap: 15px;
        padding: 5px;
    }
    
    .idol-card, .slot-celda {
        width: 100%;
        height: auto;
        /* Magia: Fuerza la proporción a rectángulo vertical (ancho 2, alto 3.4) siempre */
        aspect-ratio: 2 / 3.4; 
        min-height: unset; /* Quitamos el alto fijo que las hacía cuadradas */
        padding: 10px 5px;
    }

    .idol-foto-dls { 
        width: 85%; 
        height: auto;
        aspect-ratio: 3 / 3.8; 
        margin: 0 auto; 
        mask-image: linear-gradient(to bottom, black 95%, transparent 100%);
        -webkit-mask-image: linear-gradient(to bottom, black 95%, transparent 100%);
    } 
    
    .slot-foto { 
        width: 85%;
        height: auto;
        aspect-ratio: 3 / 3.8;
        margin: 5px auto 0; 
        /* Forzamos el mismo corte limpio en móviles */
        mask-image: linear-gradient(to bottom, black 98%, transparent 100%) !important;
        -webkit-mask-image: linear-gradient(to bottom, black 98%, transparent 100%) !important;
    }

    /* Achicamos las letras en móvil para que entren */
    .card-name { font-size: 14px; margin-bottom: 3px; }
    .card-stats { font-size: 9px; margin-bottom: 5px;}
    .stat-col span:first-child { font-size: 7px; }
    .card-rating .ovr { font-size: 20px; }
    .card-rating .pos { font-size: 10px; }
    .btn-fichar { font-size: 11px; padding: 6px; }
    .info-simple-item { font-size: 13px; }
}


/* --- Corrección de Tarjeta en el Modal --- */
#modal-carta-content .idol-card {
    width: 280px; /* Ancho fijo para que no se aplaste */
    height: auto;
    min-height: 440px; /* Más alta para acomodar las 2 columnas */
    padding-bottom: 25px;
    margin: 0;
}

#modal-carta-content .idol-foto-dls {
    height: 250px; 
    /* Bajamos el degradado casi al final (92%) para mostrar la mayor cantidad de foto posible */
    mask-image: linear-gradient(to bottom, black 92%, transparent 100%);
    -webkit-mask-image: linear-gradient(to bottom, black 92%, transparent 100%);
}

/* Transformamos las estadísticas en 2 columnas */
#modal-carta-content .card-stats {
    display: grid;
    grid-template-columns: 1fr 1fr; /* 2 columnas exactas */
    gap: 10px 15px;
    padding: 0 15px;
    margin-top: 15px;
}

/* Estilo de "caja" para cada estadística */
#modal-carta-content .stat-col {
    display: flex;
    flex-direction: row; /* Nombre a la izquierda, valor a la derecha */
    justify-content: space-between;
    align-items: center;
    background: rgba(255, 255, 255, 0.15);
    padding: 6px 12px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

#modal-carta-content .stat-col span:first-child {
    font-size: 11px;
    opacity: 0.9;
    font-weight: normal;
}

#modal-carta-content .stat-col span:last-child {
    font-size: 16px;
    font-weight: 900;
}

/* Ajustar el ancho del botón para que coincida con la nueva tarjeta */
.btn-vender-modal {
    width: 280px;
    margin-top: 10px;
}

/* --- Capa del Mosaico de Fondo --- */
.idol-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 65%; /* Ocupa desde el borde superior hasta chocar antes del nombre */
    background-image: url('../mosaico.png'); /* '../' porque salimos de la carpeta css/ hacia la raíz */
    background-size: cover;
    background-position: top center;
    z-index: -1; /* Lo mandamos al fondo, detrás de la foto */
    opacity: 0.4; /* Le damos transparencia para que se mezcle con el color Bronce/Oro/Diamante */
    
    /* Le aplicamos un difuminado abajo para que no tenga un corte recto y se funda con la carta */
    mask-image: linear-gradient(to bottom, black 75%, transparent 100%);
    -webkit-mask-image: linear-gradient(to bottom, black 75%, transparent 100%);
    pointer-events: none; /* Evita que el fondo interfiera con los clics */
}

/* Ajuste de altura del mosaico exclusivo para la tarjeta gigante del Modal */
#modal-carta-content .idol-card::before {
    height: 60%;
}

/* Ajuste de altura del mosaico para las tarjetas de Móvil */
@media (max-width: 768px) {
    .idol-card::before {
        height: 55%;
    }
}

/* Botón de Entrenamiento */
.btn-entrenar-modal {
    background: #10b981; /* Verde esmeralda */
    color: white; 
    border: none; 
    padding: 12px 10px;
    border-radius: 10px; 
    font-weight: 800; 
    cursor: pointer; 
    width: 60%; 
    font-size: 14px;
    transition: 0.3s;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    line-height: 1.2;
}

.btn-entrenar-modal:hover { 
    background: #059669; 
}

.btn-entrenar-modal span {
    font-size: 11px;
    opacity: 0.9;
    font-weight: 600;
}




/* --- Botones del Modal (Estilo Pastilla) --- */
.modal-botones-container {
    display: flex;
    gap: 12px;
    width: 280px; /* Exactamente el mismo ancho de la tarjeta */
    margin-top: 10px;
    justify-content: space-between;
}

.btn-entrenar-modal, .btn-vender-modal {
    flex: 1; /* Ambos miden 50% menos el gap */
    border-radius: 25px !important; /* Estilo Pastilla Redondeada */
    border: none;
    padding: 12px 10px;
    font-weight: 800;
    font-size: 14px;
    cursor: pointer;
    transition: 0.3s;
    color: white;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    line-height: 1.2;
}

.btn-entrenar-modal { background: #10b981; } /* Verde Esmeralda */
.btn-entrenar-modal:hover { background: #059669; }

.btn-vender-modal { background: #e3342f; } /* Rojo */
.btn-vender-modal:hover { background: #cc2a25; }

.btn-entrenar-modal span { font-size: 11px; opacity: 0.9; font-weight: 600; }

/* --- Custom Dialog (Alerts y Confirms Profesionales) --- */
#custom-dialog {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.6); z-index: 9999;
    display: flex; justify-content: center; align-items: center;
    opacity: 0; pointer-events: none; transition: opacity 0.3s ease;
}
#custom-dialog.active { opacity: 1; pointer-events: auto; backdrop-filter: blur(3px); }

.dialog-box {
    background: white; width: 90%; max-width: 350px;
    border-radius: 20px; padding: 25px; text-align: center;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    transform: scale(0.8); transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
#custom-dialog.active .dialog-box { transform: scale(1); }

.dialog-msg { margin-bottom: 20px; font-size: 15px; color: #2c3e50; font-weight: 600; line-height: 1.5; }
.dialog-btns { display: flex; gap: 10px; justify-content: center; }

.btn-dialog {
    padding: 12px 20px; border-radius: 20px; border: none; font-weight: bold; cursor: pointer; flex: 1; transition: 0.2s; font-size: 14px;
}
.btn-dialog-ok { background: #4a6ee0; color: white; }
.btn-dialog-ok:hover { background: #3b5bce; }
.btn-dialog-cancel { background: #f8f9fa; color: #6c757d; border: 1px solid #ced4da; }
.btn-dialog-cancel:hover { background: #e2e6ea; }

/* En Celulares el diálogo sube desde abajo (Bottom Sheet) */
@media (max-width: 768px) {
    #custom-dialog { align-items: flex-end; }
    .dialog-box {
        max-width: 100%; border-radius: 25px 25px 0 0; padding-bottom: 35px;
        transform: translateY(100%);
    }
    #custom-dialog.active .dialog-box { transform: translateY(0); }
}


/* --- Cabecera de Mi Grupo y Controles Tycoon --- */
.header-mi-grupo {
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    margin-bottom: 20px; 
    background: #fff; 
    padding: 20px; 
    border-radius: 12px;
    flex-wrap: wrap; /* Para que en móviles se adapte bien */
    gap: 15px;
}

.grupo-controles {
    display: flex; 
    align-items: center; 
    gap: 15px;
    flex-wrap: wrap;
}

.ingresos-badge {
    background: #f4f6fd; 
    color: #4a6ee0; 
    padding: 8px 18px; 
    border-radius: 20px; 
    font-weight: 800; 
    font-size: 14px; 
    border: 1px solid #dce4f9;
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-activar-estilo {
    width: auto !important; 
    padding: 10px 25px !important; 
    border-radius: 25px !important;
}

.btn-hiatus {
    background-color: #ff9f43 !important;
    box-shadow: 0 4px 10px rgba(255, 159, 67, 0.3);
}
.btn-hiatus:hover {
    background-color: #e68a2e !important;
}



/* --- Botón Descargar (Circular) --- */
.btn-descargar-img {
    background-color: #f8f9fa;
    color: #4a6ee0;
    border: 1px solid #dce4f9;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 18px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
}

.btn-descargar-img:hover {
    background-color: #4a6ee0;
    color: white;
    transform: scale(1.1);
    box-shadow: 0 6px 12px rgba(74, 110, 224, 0.3);
}