/* Logo esquina superior izquierda */
.login-logo-top {
    position: absolute;
    top: 32px;
    left: 32px;
    z-index: 10;
}
.login-logo-top img {
    width: 160px;
    height: auto;
    display: block;
}

/* Centrado del formulario */
.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 90vh;
}

/* Caja del formulario */
.login-box {
    background: rgba(255,255,255,0.92);
    border-radius: 14px;
    box-shadow: 0 4px 32px rgba(2,29,73,0.13);
    padding: 40px 36px 32px 36px;
    width: 370px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* Título */
.login-title {
    font-size: 1.6em;
    color: var(--primary);
    margin-bottom: 24px;
    font-weight: 700;
    letter-spacing: 1px;
}

/* Mensaje de error de credenciales */
.login-error {
    background: #ffe2e2;
    color: var(--danger);
    border: 1px solid var(--danger);
    border-radius: 8px;
    padding: 10px;
    margin-bottom: 18px;
    width: 100%;
    text-align: center;
    font-weight: 600;
}

/* Alerta de errores de validación */
.login-error-alert {
    background: #fde8ee;
    color: var(--accent-dark);
    border: 1.5px solid var(--accent);
    border-radius: 8px;
    padding: 13px 18px;
    margin: 12px 0 20px 0;
    text-align: center;
    font-size: 1.07em;
    font-weight: 500;
    width: 100%;
}
.login-error-alert ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

/* Campos del formulario */
.login-field {
    width: 100%;
    margin-bottom: 18px;
}
.login-field label {
    color: var(--primary);
    font-weight: 500;
    margin-bottom: 4px;
    display: block;
}
.login-field input {
    width: 100%;
    padding: 10px;
    border: 1.5px solid var(--border);
    border-radius: 6px;
    font-size: 1em;
    background: var(--light);
    color: var(--primary);
    transition: border 0.2s;
    margin-top: 2px;
    box-sizing: border-box;
}
.login-field input:focus {
    border: 1.5px solid var(--primary);
    outline: none;
    background: var(--light-bg);
}

/* Wrapper para campo contraseña con toggle */
.password-field-wrapper {
    position: relative;
    width: 100%;
}
.password-field-wrapper input {
    padding-right: 44px;
}
.toggle-password {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    color: var(--cool-grey);
    padding: 4px;
    display: flex;
    align-items: center;
    transition: color 0.2s;
}
.toggle-password:hover {
    color: var(--primary);
}

/* Hint de requisitos de contraseña */
.password-hint {
    font-size: 0.84em;
    color: var(--cool-grey);
    margin-top: -12px;
    margin-bottom: 14px;
    width: 100%;
    line-height: 1.4;
}

/* Botón principal */
.login-btn {
    width: 100%;
    background: var(--accent);
    color: #fff;
    border: none;
    border-radius: 6px;
    padding: 12px 0;
    font-size: 1.1em;
    font-weight: 600;
    cursor: pointer;
    margin-top: 8px;
    transition: background 0.2s;
    text-align: center;
    text-decoration: none;
    display: block;
}
.login-btn:hover {
    background: var(--accent-dark);
    color: #fff;
    text-decoration: none;
}

/* Links secundarios */
.forgot-link {
    text-align: right;
    margin-top: 10px;
    width: 100%;
}
.forgot-link a {
    color: var(--accent);
    text-decoration: none;
    font-size: 0.98em;
}
.forgot-link a:hover {
    color: var(--accent-dark);
    text-decoration: underline;
}

.forgot-link-center {
    text-align: center;
    margin-top: 12px;
    width: 100%;
}
.forgot-link-center a {
    color: var(--accent);
    text-decoration: none;
    font-size: 0.98em;
}
.forgot-link-center a:hover {
    color: var(--accent-dark);
    text-decoration: underline;
}

/* Ícono de confirmación (pantallas de éxito) */
.login-success-icon {
    width: 64px;
    height: 64px;
    background: #e8f9f0;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px auto;
    color: var(--success);
}

/* Mensaje de confirmación */
.login-success-msg {
    text-align: center;
    color: var(--primary);
    line-height: 1.6;
    margin-bottom: 24px;
    font-size: 1em;
}

/* Mensaje de cambio exitoso */
.change-success-msg {
    margin: 24px 0;
    color: var(--success);
    font-size: 1.1em;
    text-align: center;
    font-weight: 500;
}

/* Toast notifications */
#toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
}
.toast {
    background: #333;
    color: #fff;
    padding: 12px 24px;
    margin-bottom: 10px;
    border-radius: 4px;
    opacity: 1;
    transition: opacity 0.4s;
}
.toast-success { background: var(--success); }
.toast-error   { background: var(--danger); }

/* Responsive */
@media (max-width: 600px) {
    .login-logo-top {
        top: 12px;
        left: 12px;
    }
    .login-logo-top img {
        width: 100px;
    }
    .login-box {
        width: 96vw;
        padding: 24px 8px;
    }
}
