/* =====================================================
   STAIRCASE LOGIN PAGE STYLES
   ===================================================== */

/* Base Styles */
body.login {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    margin: 0;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

/* Login Wrapper */
.login-wrapper {
    width: 100%;
    max-width: 440px;
    animation: fadeIn 0.1s ease-out;}

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

/* Logo Section */.login-logo-container {
    text-align: center;
    margin-bottom: 40px;
}

.login-logo {
    width: 240px;
    height: auto;
    filter: brightness(0) invert(1);
    margin-bottom: 20px;
}

.login-brand {
    color: white;
    font-size: 40px;
    font-weight: 300;
    letter-spacing: -0.5px;
    margin: 0;
}

/* Mobile Logo adjustments */
@media (max-width: 576px) {
    .login-logo-container {
        margin-bottom: 30px;
    }
    
    .login-logo {
        width: 100px;
        margin-bottom: 10px;
    }    
    .login-brand {
        font-size: 36px;
    }
}

/* Login Box */
.login-box {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.1);
    padding: 40px;
    position: relative;
}

/* Form Styling */
.login-form {
    margin: 0;
}

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

/* Labels */
.form-label {
    display: block;
    color: #6b7280;
    font-size: 12px;
    font-weight: 600;    letter-spacing: 0.5px;
    text-transform: uppercase;
    margin-bottom: 8px;
}

/* Input Fields */
.login-input {
    width: 100%;
    height: 48px;
    padding: 0 16px;
    font-size: 15px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    transition: all 0.2s ease;
    background-color: #fff;
}

.login-input:hover {
    border-color: #d1d5db;
}

.login-input:focus {
    outline: none;
    border-color: #4e7ce0;
    box-shadow: 0 0 0 3px rgba(78, 124, 224, 0.1);
}

.login-input::placeholder {
    color: #9ca3af;
}
/* Password Field */
.password-wrapper {
    position: relative;
}

.password-toggle {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #6b7280;
    cursor: pointer;
    padding: 8px;
    transition: color 0.2s;
}

.password-toggle:hover {
    color: #374151;
}

.password-toggle:focus {
    outline: none;
}

/* Checkbox */
.login-remember {
    margin-bottom: 24px;
}
.custom-checkbox {
    display: flex;
    align-items: center;
    cursor: pointer;
    user-select: none;
    color: #4b5563;
    font-size: 14px;
}

.custom-checkbox input {
    position: absolute;
    opacity: 0;
}

.checkbox-box {
    width: 20px;
    height: 20px;
    border: 2px solid #d1d5db;
    border-radius: 4px;
    margin-right: 10px;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: white;
}

/* Override any Bootstrap or sc-checkbox styles for login page */
.login-box .sc-icheckbox-blue,
.login-box .sc-iradio-blue {
    background-color: #ffffff !important;
    border: 2px solid #d1d5db !important;
    border-radius: 4px !important;
}

.custom-checkbox input:checked ~ .checkbox-box {
    background-color: #4e7ce0;
    border-color: #4e7ce0;
}
.custom-checkbox input:checked ~ .checkbox-box::after {
    content: '';
    display: block;
    width: 5px;
    height: 9px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg) translateY(-1px);
}

.custom-checkbox:hover .checkbox-box {
    border-color: #9ca3af;
}

.checkbox-label {
    font-weight: 500;
}

/* Submit Button */
.login-submit {
    width: 100%;
    height: 48px;
    font-size: 15px;
    font-weight: 600;
    border: none;
    border-radius: 8px;
    background-color: #4e7ce0;
    color: white;
    cursor: pointer;    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.login-submit:hover {
    background-color: #5b87e5;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(78, 124, 224, 0.25);
}

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

.login-submit i {
    font-size: 14px;
    transition: transform 0.2s ease;
}

.login-submit:hover i {
    transform: translateX(2px);
}

/* Forgot Password */
.login-links {
    text-align: center;
    margin-top: 20px;    padding-top: 0;
}

.forgot-password-link {
    color: #6b7280;
    font-size: 14px;
    text-decoration: none;
    transition: color 0.2s;
}

.forgot-password-link:hover {
    color: #4e7ce0;
}

/* Alerts */
.login-alert {
    margin-bottom: 20px;
    padding: 14px 16px;
    border-radius: 6px;
    font-size: 14px;
    text-align: center;
}

.login-alert.alert-warning {
    background-color: #fff3cd;
    color: #856404;
    border: 1px solid #ffeaa7;
}

.login-alert.alert-danger {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.login-alert strong {
    display: block;
    margin-bottom: 4px;
}

.login-alert p {
    margin: 0;
    font-size: 13px;
}

/* Footer - Outside login box */
.login-footer {
    margin-top: 20px;
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid rgba(229, 231, 235, 0.5);
}

.footer-links {
    margin-bottom: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
}

.footer-links a {
    display: inline-block;
    color: #9ca3af;
    font-size: 14px;
    text-decoration: none;
    transition: color 0.2s;
    padding: 0 16px;
    position: relative;
}

.footer-links a:not(:last-child)::after {
    content: '|';
    position: absolute;
    right: 0;
    color: #e5e7eb;
}

.footer-links a:hover {
    color: #d1d5db;
}

.footer-separator {
    display: none;
}

.footer-copyright {
    color: #9ca3af;
    font-size: 13px;
    margin-top: 20px;
    line-height: 1.5;
}

/* Mobile specific adjustments */
@media (max-width: 576px) {
    body.login {
        min-height: auto;
        padding: 15px;
    }
    
    .login-wrapper {
        max-width: 100%;
        margin: 0 auto;
    }
    
    .login-box {
        padding: 30px 20px;
        margin: 0 15px;
    }
    
    .login-links {
        margin-top: 16px;
        padding-top: 0;
    }
    
    .login-footer {
        margin-top: 30px;
        padding: 0 15px;
    }
    
    .footer-links {
        flex-direction: row;
        gap: 0;
    }
    
    .footer-links a {
        font-size: 13px;
        padding: 0 10px;
    }
    
    .footer-links a:not(:last-child)::after {
        content: '|';
        position: absolute;
        right: 0;
        color: #e5e7eb;
    }
    
    .footer-copyright {
        margin-top: 10px;
        font-size: 12px;
    }
}

/* Extra small devices adjustments */
@media (max-width: 400px) {
    .login-wrapper {
        max-width: 100%;
        padding: 0 10px;
    }
    
    .footer-links a {
        font-size: 11px;
        padding: 0 6px;
    }}

/* Password Reset Pages */
.reset-header {
    text-align: center;
    margin-bottom: 30px;
}

.reset-title {
    font-size: 24px;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 10px;
}

.reset-description {
    font-size: 14px;
    color: #6b7280;
    margin: 0;
    line-height: 1.5;
}

.login-back {
    text-align: center;
    margin-top: 20px;
}

.login-back a {
    color: #6b7280;    font-size: 14px;
    text-decoration: none;
    transition: color 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.login-back a:hover {
    color: #4e7ce0;
}

.login-back a::before {
    content: '←';
    font-size: 16px;
}

/* Loading states */
.loading-message {
    text-align: center;
    padding: 40px 0;
    color: #6b7280;
}

.loading-message i {
    font-size: 32px;
    margin-bottom: 16px;
    display: block;
    color: #4e7ce0;
}
.loading-message p {
    margin: 0;
    font-size: 16px;
}

/* Form validation errors */
.form-control.error {
    border-color: #ef4444;
}

label.error {
    color: #ef4444;
    font-size: 12px;
    margin-top: 4px;
    display: block;
}

/* Utility classes */
.sc-login-error {
    display: none;
}

/* Loading state for button */
.login-submit.loading {
    pointer-events: none;
    opacity: 0.7;
}

.login-submit.loading i {    animation: spin 1s linear infinite;
}

/* Prevent iOS zoom */
@media (max-width: 768px) {
    input[type="text"],
    input[type="password"] {
        font-size: 16px !important;
    }
}

/* Autofill Styling */
input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus {
    -webkit-box-shadow: 0 0 0 30px white inset !important;
    -webkit-text-fill-color: #495057 !important;
}

/* Legacy support - will be removed */
div.sc-pw-restore > a {    color: #aac0e3 !important;
}

button.sc-login-btn {
    border: 2px solid #acf5fa;
    background-color: transparent;
}

button.sc-login-btn:hover,
button.sc-login-btn:focus,
button.sc-login-btn:active {
    border: 2px solid #acf5fa;
    background-color: transparent;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

/* End of sc-login.css */

/* =====================================================
   PASSKEY & ACCESS CODE STYLES
   ===================================================== */

/* Passkey Button - Secondary Style (wie Primary, aber grau) */
.btn-secondary-login {
    width: 100%;
    height: 48px;
    font-size: 15px;
    font-weight: 600;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    cursor: pointer;
    background-color: #f3f4f6;
    color: #374151;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.2s ease;
}

.btn-secondary-login:hover {
    background-color: #e5e7eb;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

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

.btn-secondary-login i {
    font-size: 18px;
}

/* Hide when browser doesn't support WebAuthn */
.btn-secondary-login.no-webauthn {
    display: none;
}

/* OR Divider */
.login-divider {
    display: flex;
    align-items: center;
    text-align: center;
    margin: 20px 0;
    color: #6c757d;
}

.login-divider::before,
.login-divider::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid #dee2e6;
}

.login-divider span {
    padding: 0 15px;
    font-size: 13px;
    text-transform: uppercase;
    font-weight: 500;
    letter-spacing: 0.5px;
}

/* End of Passkey Styles */