/* Modal overlay */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(5px);
}

.modal-agregar-fondos-content {
    background: linear-gradient(135deg, #1a1a1a 0%, #2a2a2a 100%);
    border-radius: 16px;
    width: 95%;
    max-width: 500px;
    max-height: 95vh;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5);
    border: 1px solid #444;
    overflow: hidden;
}

.modal-agregar-fondos-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px;
    border-bottom: 1px solid #333;
    background: linear-gradient(135deg, #2a2a2a 0%, #1a1a1a 100%);
}

.modal-agregar-fondos-header h3 {
    margin: 0;
    color: #fff;
    font-size: 1.1rem;
    font-weight: 600;
}

.modal-agregar-fondos-close {
    color: #999;
    font-size: 32px;
    cursor: pointer;
    transition: all 0.15s ease;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.modal-agregar-fondos-close:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.1);
}

.modal-agregar-fondos-body {
    padding: 24px;
    max-height: calc(90vh - 80px);
    overflow-y: auto;
}

/* Versiones desktop/mobile */
.agregar-fondos-desktop-version {
    display: block;
}

.agregar-fondos-mobile-version {
    display: none;
}

@media (max-width: 768px) {
    .agregar-fondos-desktop-version {
        display: none;
    }

    .agregar-fondos-mobile-version {
        display: block;
    }

    .modal-agregar-fondos-content {
        width: 95%;
        max-width: 95%;
        padding: 0;
    }

    .modal-agregar-fondos-header {
        padding: 20px;
        border-bottom: 1px solid #333;
    }

    .modal-agregar-fondos-body {
        padding: 0;
    }
}

/* Formulario desktop */
.agregar-fondos-form-group {
    margin-bottom: 20px;
}

.agregar-fondos-form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #fff;
}

.fondo-nombre-display {
    padding: 12px;
    background: #333;
    border: 1px solid #555;
    border-radius: 8px;
    font-weight: 600;
    color: #fff;
    margin-top: 5px;
}

.agregar-fondos-input {
    width: 100%;
    padding: 12px;
    background: #333;
    border: 1px solid #555;
    border-radius: 8px;
    color: #fff;
    font-size: 16px;
    transition: all 0.3s ease;
}

.agregar-fondos-input:focus {
    outline: none;
    border-color: #4ade80;
    box-shadow: 0 0 0 2px rgba(74, 222, 128, 0.2);
}

.agregar-fondos-form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 24px;
}

.agregar-fondos-btn-primary {
    background: linear-gradient(135deg, #4ade80 0%, #22c55e 100%);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.agregar-fondos-btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(74, 222, 128, 0.3);
}

.agregar-fondos-btn-secondary {
    background: #6b7280;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.agregar-fondos-btn-secondary:hover {
    background: #4b5563;
}

/* ===========================================
   ESTILOS MOBILE - DISEÑO PROPIO
   =========================================== */

/* Indicador de pasos */
.agregar-fondos-steps-indicator {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: linear-gradient(135deg, #1a1a1a 0%, #2a2a2a 100%);
    border-bottom: 1px solid #333;
}

.agregar-fondos-step-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    position: relative;
}

.agregar-fondos-step-item.active .step-circle {
    background: linear-gradient(135deg, #4ade80 0%, #22c55e 100%);
    color: #000;
    border-color: #4ade80;
}

.agregar-fondos-step-item.completed .step-circle {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    border-color: #10b981;
}

.step-circle {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #333;
    border: 2px solid #555;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 14px;
    color: #ccc;
    transition: all 0.3s ease;
}

.step-label {
    font-size: 12px;
    color: #ccc;
    font-weight: 500;
    text-align: center;
}

.agregar-fondos-step-item.active .step-label {
    color: #4ade80;
}

.agregar-fondos-step-item.completed .step-label {
    color: #10b981;
}

.step-connector {
    width: 40px;
    height: 2px;
    background: #333;
    margin: 0 8px;
}

.agregar-fondos-step-item.completed + .step-connector {
    background: linear-gradient(90deg, #10b981 0%, #059669 100%);
}

/* Contenido de pasos */
.agregar-fondos-step-content {
    min-height: 350px;
    padding: 20px;
}

.agregar-fondos-step-section {
    display: none;
}

.agregar-fondos-step-section.active {
    display: block;
    animation: fadeInUp 0.3s ease;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.agregar-fondos-step-header {
    text-align: center;
    margin-bottom: 30px;
}

.agregar-fondos-step-title {
    font-size: 1.2rem;
    color: #fff;
    margin: 0 0 8px 0;
    font-weight: 600;
}

.agregar-fondos-step-subtitle {
    font-size: 0.9rem;
    color: #ccc;
    margin: 0;
    line-height: 1.4;
}

/* Paso 1: Confirmación de fondo */
.agregar-fondos-fondo-confirmacion {
    margin-top: 20px;
}

.fondo-confirmacion-card {
    background: linear-gradient(135deg, #2a2a2a 0%, #333 100%);
    border: 2px solid #444;
    border-radius: 12px;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 16px;
}

.fondo-confirmacion-icon {
    font-size: 2rem;
}

.fondo-confirmacion-info {
    flex: 1;
}

.fondo-confirmacion-name {
    font-size: 1.1rem;
    color: #fff;
    font-weight: 600;
    margin-bottom: 4px;
}

.fondo-confirmacion-saldo {
    font-size: 0.9rem;
    color: #ccc;
}

/* Paso 2: Formulario mobile */
.agregar-fondos-mobile-form {
    margin-top: 20px;
}

.agregar-fondos-mobile-form-group {
    margin-bottom: 24px;
}

.agregar-fondos-mobile-label {
    display: block;
    font-size: 1rem;
    color: #fff;
    margin-bottom: 12px;
    font-weight: 500;
}

.agregar-fondos-mobile-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.agregar-fondos-mobile-currency {
    position: absolute;
    left: 16px;
    color: #4ade80;
    font-weight: 600;
    font-size: 1.1rem;
    z-index: 1;
}

.agregar-fondos-mobile-input {
    flex: 1;
    padding: 14px 16px 14px 32px;
    background: #333;
    border: 2px solid #555;
    border-radius: 10px;
    color: #fff;
    font-size: 16px;
    transition: all 0.3s ease;
    width: 100%;
}

.agregar-fondos-mobile-input:focus {
    outline: none;
    border-color: #4ade80;
    box-shadow: 0 0 0 3px rgba(74, 222, 128, 0.2);
}

.agregar-fondos-mobile-help {
    display: block;
    font-size: 0.8rem;
    color: #ccc;
    margin-top: 8px;
    font-style: italic;
}

/* Paso 3: Confirmación final */
.agregar-fondos-confirmacion-final {
    margin-top: 20px;
}

.confirmacion-resumen {
    background: linear-gradient(135deg, #2a2a2a 0%, #333 100%);
    border-radius: 12px;
    padding: 20px;
    border: 1px solid #444;
}

.confirmacion-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid #444;
}

.confirmacion-item:last-child {
    border-bottom: none;
}

.confirmacion-label {
    font-size: 0.9rem;
    color: #ccc;
}

.confirmacion-value {
    font-size: 1rem;
    color: #fff;
    font-weight: 600;
}

/* Navegación de pasos */
.agregar-fondos-mobile-navigation {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    background: linear-gradient(135deg, #1a1a1a 0%, #2a2a2a 100%);
    border-top: 1px solid #333;
}

.agregar-fondos-nav-btn {
    padding: 12px 20px;
    border: none;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    background: linear-gradient(135deg, #4ade80 0%, #22c55e 100%);
    color: #000;
}

.agregar-fondos-nav-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(74, 222, 128, 0.3);
}

.agregar-fondos-nav-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.agregar-fondos-nav-prev {
    background: #555;
    color: #fff;
}

.agregar-fondos-nav-prev:hover {
    background: #666;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.agregar-fondos-nav-spacer {
    flex: 1;
}

/* Responsive adicional */
@media (max-width: 480px) {
    .modal-agregar-fondos-content {
        width: 100%;
        max-height: 100vh;
        border-radius: 0;
    }

    .modal-agregar-fondos-header {
        padding: 16px;
    }

    .modal-agregar-fondos-header h3 {
        font-size: 1.1rem;
    }

    .agregar-fondos-step-content {
        padding: 16px;
    }

    .fondo-confirmacion-card {
        padding: 16px;
        flex-direction: column;
        text-align: center;
        gap: 12px;
    }

    .confirmacion-resumen {
        padding: 16px;
    }

    .agregar-fondos-mobile-navigation {
        padding: 16px;
    }

    .agregar-fondos-nav-btn {
        padding: 12px 16px;
        font-size: 0.85rem;
    }
}
