/* ===============================
   MODALES MODERNOS - LOGIN
   =============================== */

/* Reset para modales modernos */
.modal-modern {
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

/* Container del modal */
.modal-modern .modal-dialog {
    max-width: 480px;
    margin: 1.75rem auto;
    position: relative;
}

/* Contenido principal */
.modal-modern .modal-content {
    border: none;
    border-radius: 20px;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.15);
    background: #ffffff;
    overflow: hidden;
    position: relative;
}

/* Header moderno */
.modal-modern .modal-header {
    border-bottom: none;
    padding: 2rem 2rem 1rem 2rem;
    background: linear-gradient(135deg, #01ace4 0%, #0d8dc4 100%);
    color: white;
    text-align: center;
    position: relative;
}

.modal-modern .modal-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1000 100"><path d="M0,0 C150,100 350,0 500,50 C650,100 850,0 1000,50 L1000,0 Z" fill="rgba(255,255,255,0.1)"/></svg>') no-repeat;
    background-size: cover;
}

.modal-modern .modal-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    position: relative;
    z-index: 2;
}

.modal-modern .modal-title img,
.modal-modern .modal-title .modal-logo {
    width: 50px;
    height: 50px;
}

/* Botón cerrar moderno */
.modal-modern .close {
    position: absolute;
    top: 20px;
    right: 20px;
    color: white;
    opacity: 0.8;
    font-size: 1.8rem;
    font-weight: 300;
    border: none;
    background: rgba(255, 255, 255, 0.2);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 3;
}

.modal-modern .close:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
    opacity: 1;
}

/* Body del modal */
.modal-modern .modal-body {
    padding: 2rem;
    background: #ffffff;
}

/* Formularios modernos */
.modal-modern .form-group {
    margin-bottom: 1.5rem;
    position: relative;
}

.modal-modern .form-group label {
    font-weight: 600;
    color: #334155;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    display: block;
}

.modal-modern .form-control,
.modal-modern input[type='text'],
.modal-modern input[type='password'],
.modal-modern input[type='email'] {
    width: 100% !important;
    padding: 0.75rem 1rem !important;
    font-family: "Source", "Source Sans Pro", sans-serif !important;
    font-size: 1rem !important;
    color: #334155 !important;
    background: #ffffff !important;
    border: 2px solid #e2e8f0 !important;
    border-top: 2px solid #e2e8f0 !important;
    border-bottom: 2px solid #e2e8f0 !important;
    border-left: 2px solid #e2e8f0 !important;
    border-right: 2px solid #e2e8f0 !important;
    border-radius: 8px !important;
    transition: all 0.3s ease !important;
    margin-left: 0 !important;
    display: block !important;
    text-align: left !important;
}

.modal-modern .form-control:focus,
.modal-modern input[type='text']:focus,
.modal-modern input[type='password']:focus,
.modal-modern input[type='email']:focus {
    outline: none !important;
    border-color: #0ea5e9 !important;
    border: 2px solid #0ea5e9 !important;
    border-top: 2px solid #0ea5e9 !important;
    border-bottom: 2px solid #0ea5e9 !important;
    border-left: 2px solid #0ea5e9 !important;
    border-right: 2px solid #0ea5e9 !important;
    background: #f0f9ff !important;
    box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.1) !important;
}

.modal-modern .form-control::placeholder,
.modal-modern input[type='text']::placeholder,
.modal-modern input[type='password']::placeholder,
.modal-modern input[type='email']::placeholder {
    color: #94a3b8 !important;
}

/* Botones modernos */
.modal-modern .btn {
    padding: 0.8rem 2rem;
    border-radius: 12px;
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.modal-modern .btn-primary {
    background: linear-gradient(135deg, #01ace4 0%, #0d8dc4 100%);
    color: white;
    box-shadow: 0 5px 15px rgba(1, 172, 228, 0.3);
    margin-left: 0 !important;
    border: none !important;
    border-top: none !important;
    border-right: none !important;
    border-bottom: none !important;
    border-left: none !important;
}

.modal-modern .btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(1, 172, 228, 0.4);
    background: linear-gradient(135deg, #0d8dc4 0%, #01ace4 100%);
}

.modal-modern .btn-secondary {
    background: #f8f9fa;
    color: #6c757d;
    border: 2px solid #e9ecef;
}

.modal-modern .btn-secondary:hover {
    background: #e9ecef;
    color: #495057;
    transform: translateY(-1px);
}

/* Texto informativo */
.modal-modern .info-text {
    background: #f8f9fa;
    border-left: 4px solid #01ace4;
    padding: 1rem;
    margin: 1.5rem 0;
    border-radius: 8px;
    font-size: 0.85rem;
    color: #6c757d;
    line-height: 1.5;
}

/* Separadores modernos */
.modal-modern hr {
    border: none;
    height: 1px;
    background: linear-gradient(90deg, transparent 0%, #e9ecef 50%, transparent 100%);
    margin: 2rem 0;
}

/* Enlaces modernos */
.modal-modern a {
    color: #01ace4;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.modal-modern a:hover {
    color: #0d8dc4;
    text-decoration: none;
    transform: translateX(3px);
}

.modal-modern a::after {
    content: '→';
    transition: transform 0.3s ease;
}

.modal-modern a:hover::after {
    transform: translateX(3px);
}

/* Elementos requeridos */
.modal-modern .required-note {
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    color: #856404;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    font-size: 0.85rem;
    margin: 1rem 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.modal-modern .required-note::before {
    content: '⚠️';
    font-size: 1rem;
}

/* Footer del modal */
.modal-modern .modal-footer {
    border-top: none;
    padding: 1rem 2rem 2rem;
    background: #ffffff;
    text-align: center;
}

/* Animaciones de entrada */
.modal-modern.fade .modal-dialog {
    transform: translate(0, -50px);
    transition: all 0.3s ease;
}

.modal-modern.show .modal-dialog {
    transform: translate(0, 0);
}

/* Responsive */
@media (max-width: 768px) {
    .modal-modern .modal-dialog {
        margin: 1rem;
        max-width: calc(100% - 2rem);
    }
    
    .modal-modern .modal-header,
    .modal-modern .modal-body,
    .modal-modern .modal-footer {
        padding: 1.5rem;
    }
    
    .modal-modern .modal-title {
        font-size: 1.3rem;
    }
}

/* Estados de carga */
.modal-modern .btn.loading {
    position: relative;
    color: transparent;
}

.modal-modern .btn.loading::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    top: 50%;
    left: 50%;
    margin-left: -10px;
    margin-top: -10px;
    border: 2px solid transparent;
    border-top: 2px solid currentColor;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}