/* Login Page Specific Enhancements */

/* Subtle elevation and focus for auth content container */
.auth-content {
    border: 1px solid #e5e7eb;
    box-shadow: 0 8px 28px -6px rgba(0,0,0,0.08), 0 4px 12px -4px rgba(0,0,0,0.06);
    border-radius: 1rem;
}

/* Improve spacing at top of form */
.auth-form-modern {
    margin-top: 0.5rem;
}

/* Password visibility toggle button */
.password-toggle-btn {
    position: absolute;
    top: 50%;
    right: 0.85rem;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    padding: 0.25rem;
    color: #6b7280;
    cursor: pointer;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 0.375rem;
    transition: background 0.15s ease, color 0.15s ease;
}

.password-toggle-btn:hover, .password-toggle-btn:focus {
    background: #f1f5f9;
    color: #374151;
    outline: none;
}

.password-toggle-btn:focus {
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.3);
}

/* Accessible focus styles using :focus-visible for keyboard users */
.form-control-modern:focus-visible,
.password-toggle-btn:focus-visible,
.btn-modern:focus-visible,
.auth-link:focus-visible,
.form-check-input:focus-visible {
    outline: 3px solid rgba(79, 70, 229, 0.55);
    outline-offset: 2px;
}

/* Strengthen auth link contrast on dark backgrounds if any future theme change */
.auth-link {
    font-weight: 600;
}

/* High contrast mode support */
@media (forced-colors: active) {
    .password-toggle-btn, .form-control-modern, .btn-modern, .auth-link { forced-color-adjust: none; }
    .password-toggle-btn { border: 1px solid ButtonText; }
}

/* Respect prefers-reduced-motion: limit transitions */
@media (prefers-reduced-motion: reduce) {
    .form-control-modern,
    .btn-modern,
    .password-toggle-btn,
    .auth-link {
        transition: none !important;
        animation: none !important;
    }
}

/* Ensure input has room for toggle icon */
#password.form-control-modern {
    padding-right: 2.5rem;
}

/* Slightly improve contrast of form labels when floating */
.form-control-modern:focus ~ .form-label-modern,
.form-control-modern:not(:placeholder-shown) ~ .form-label-modern {
    font-weight: 600;
}

/* Responsive refinement for very small screens */
@media (max-width: 420px) {
    .auth-content { padding: 2rem 1.25rem; }
}
