/**
 * Layout y estilos compartidos entre login.php y olvido_pass.php
 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    min-height: 100vh;
    display: flex;
    background-color: #f1f5f9;
}

.login-container {
    display: flex;
    width: 100%;
    min-height: 100vh;
}

.branding-panel {
    flex: 1;
    background: linear-gradient(rgba(35, 142, 142, 0.50), rgba(26, 107, 107, 0.50)), url('../../login/Images/Imagen%20DocSpeed%20Fondo%20Login.jpg') center center / cover no-repeat;
    backdrop-filter: blur(2px);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 60px;
    color: white;
    position: relative;
    overflow: hidden;
    box-shadow: 4px 0 15px rgba(0, 0, 0, 0.1);
}

.branding-panel::before {
    content: '';
    position: absolute;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 1px, transparent 1px);
    background-size: 50px 50px;
    opacity: 0.15;
    animation: moveGrid 20s linear infinite;
}

@keyframes moveGrid {
    0% {
        transform: translate(0, 0);
    }
    100% {
        transform: translate(50px, 50px);
    }
}

.branding-content {
    position: relative;
    z-index: 1;
    text-align: center;
    width: 100%;
}

.branding-logo {
    width: 220px;
    height: 220px;
    background-color: white;
    border-radius: 50%;
    padding: 30px;
    object-fit: contain;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 1), 0 0 40px rgba(0, 0, 0, 0.8), inset 0 0 0 1px rgba(0,0,0,0.5);
    margin-bottom: 25px;
}

.branding-panel h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 10px;
    text-shadow: 2px 2px 0 #000, -1px -1px 0 #000, 1px -1px 0 #000, -1px 1px 0 #000, 1px 1px 0 #000, 0 5px 15px rgba(0,0,0,1), 0 0 30px rgba(0,0,0,1);
}

.tagline {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 30px;
    text-align: center;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
    text-shadow: 1px 1px 0 #000, -1px -1px 0 #000, 1px -1px 0 #000, -1px 1px 0 #000, 1px 1px 0 #000, 0 4px 10px rgba(0,0,0,1), 0 0 25px rgba(0,0,0,1);
}

.branding-panel p {
    font-size: 1.1rem;
    opacity: 1;
    max-width: 400px;
    line-height: 1.6;
    text-shadow: 1px 1px 0 #000, -1px -1px 0 #000, 1px -1px 0 #000, -1px 1px 0 #000, 1px 1px 0 #000, 0 4px 10px rgba(0,0,0,1);
}

.features-list {
    margin-top: 20px;
    text-align: left;
    display: inline-block;
}

.feature-item {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
    font-size: 1rem;
    font-weight: 600;
    text-shadow: 1px 1px 0 #000, -1px -1px 0 #000, 1px -1px 0 #000, -1px 1px 0 #000, 1px 1px 0 #000, 0 4px 10px rgba(0,0,0,1), 0 0 20px rgba(0,0,0,1);
}

.feature-item i {
    margin-right: 15px;
    font-size: 1.2rem;
    color: #4ade80;
    text-shadow: 1px 1px 0 #000, -1px -1px 0 #000, 1px -1px 0 #000, -1px 1px 0 #000, 1px 1px 0 #000, 0 4px 10px rgba(0,0,0,1), 0 0 20px rgba(0,0,0,1);
}

.form-panel {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 40px;
    background: white;
    position: relative;
}

.login-box {
    width: 100%;
    max-width: 420px;
    animation: slideUp 0.6s ease-out;
    padding-bottom: 20px;
}

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

.login-header {
    margin-bottom: 40px;
    text-align: center;
}

.login-header h2 {
    color: #1e293b;
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 10px;
}

.login-header p {
    color: #64748b;
    font-size: 0.95rem;
}

.form-group {
    margin-bottom: 24px;
    position: relative;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #334155;
    font-weight: 500;
    font-size: 0.9rem;
}

.input-wrapper {
    position: relative;
}

.input-wrapper i {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
    font-size: 1.1rem;
    transition: color 0.3s;
}

.form-control {
    width: 100%;
    padding: 14px 16px 14px 48px;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    font-size: 1rem;
    font-family: 'Inter', sans-serif;
    transition: all 0.3s;
    background: #f8fafc;
}

.form-control:focus {
    outline: none;
    border-color: #238e8e;
    background: white;
    box-shadow: 0 0 0 4px rgba(35, 142, 142, 0.1);
}

.form-control:focus + i {
    color: #238e8e;
}

.form-options {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 24px;
    font-size: 0.9rem;
}

.remember-me {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    color: #475569;
}

.remember-me input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: #238e8e;
}

.forgot-password {
    color: #238e8e;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s;
}

.forgot-password:hover {
    color: #1a6b6b;
    text-decoration: underline;
}

.btn-login {
    width: 100%;
    padding: 14px;
    background: #1e655c;
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 4px 15px rgba(30, 101, 92, 0.2);
    position: relative;
    overflow: hidden;
}

.btn-login:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(35, 142, 142, 0.4);
}

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

.btn-login.loading {
    color: transparent;
}

.btn-login.loading::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    top: 50%;
    left: 50%;
    margin-left: -10px;
    margin-top: -10px;
    border: 2px solid #ffffff;
    border-radius: 50%;
    border-top-color: transparent;
    animation: spinner 0.8s linear infinite;
}

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

.divider {
    margin: 30px 0;
    text-align: center;
    position: relative;
}

.divider::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    width: 45%;
    height: 1px;
    background: #e2e8f0;
}

.divider::after {
    content: '';
    position: absolute;
    right: 0;
    top: 50%;
    width: 45%;
    height: 1px;
    background: #e2e8f0;
}

.divider span {
    background: white;
    padding: 0 15px;
    color: #94a3b8;
    font-size: 0.85rem;
}

.allsped-link {
    text-align: center;
    margin-top: 30px;
    margin-bottom: 15px;
    padding-top: 30px;
    border-top: 1px solid #e2e8f0;
}

.allsped-link a {
    color: #238e8e;
    text-decoration: none;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s;
}

.allsped-link a:hover {
    color: #1a6b6b;
    transform: translateX(5px);
}

.footer-copyright {
    text-align: center;
    color: #94a3b8;
    font-size: 0.85rem;
    margin-top: 10px;
}

@media (max-width: 968px) {
    .login-container {
        flex-direction: column;
    }

    .branding-panel {
        flex: none;
        padding: 50px 20px;
    }

    .branding-logo {
        width: 150px;
        height: 150px;
        padding: 20px;
        margin-bottom: 15px;
    }

    .branding-panel h1 {
        font-size: 2rem;
    }

    .tagline {
        font-size: 1rem;
        margin-bottom: 15px;
    }

    .branding-panel p,
    .features-list {
        display: none;
    }

    .form-panel {
        padding: 40px 20px;
        flex: 1;
        border-radius: 40px 40px 0 0;
        margin-top: -40px;
        z-index: 10;
        box-shadow: 0 -15px 30px rgba(0, 0, 0, 0.15);
    }
}

@media (max-width: 480px) {
    .login-header h2 {
        font-size: 1.5rem;
    }

    .form-options {
        flex-direction: column;
        gap: 15px;
        align-items: flex-start;
    }
    
    .form-options .forgot-password {
        margin-top: 10px;
    }
}

/* Alertas en página (login) */
.alert {
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 20px;
    display: none;
    align-items: center;
    gap: 10px;
    font-size: 0.9rem;
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.alert-error {
    background: #fee2e2;
    color: #dc2626;
    border: 1px solid #fecaca;
}

.alert-success {
    background: #d1fae5;
    color: #059669;
    border: 1px solid #a7f3d0;
}

.alert.show {
    display: flex;
}
