﻿:root {
    --bg: #f6f8fc;
    --panel: #ffffff;
    --panel-2: #f7f9ff;
    --text: #1f2328;
    --muted: #6b7280;
    --error: #c53a3a;
    --accent: #2563eb;
    --accent-2: #1d4ed8;
    --border: #e5e7eb;
    --focus: 2px solid #8ab4f8;
    --radius: 12px;
    --radius-sm: 8px;
    --shadow: 0 8px 24px rgba(16,24,40,0.08);
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html, body {
    height: 100%;
}

body {
    margin: 0;
    color: var(--text);
    background: radial-gradient(1200px 800px at 80% -20%, rgba(79,140,255,0.25), transparent 60%), radial-gradient(900px 600px at -10% 110%, rgba(79,140,255,0.18), transparent 60%), var(--bg);
    line-height: 1.5;
}

a {
    text-decoration: none;
    color: var(--text);
}

.login-page {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 24px;
}

.login-card {
    width: 100%;
    max-width: 440px;
    background: linear-gradient(180deg, var(--panel), var(--panel-2));
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 28px;
}

.login-header {
    text-align: center;
    margin-bottom: 40px;
}

.login-logo {
    margin-bottom: 30px;
/*    padding: 20px;
    filter: drop-shadow(0 4px 10px rgba(79,140,255,0.25));*/
}

.login-logo img {
    width: 120px;
}

.login-title {
    font-size: 1.5rem;
    margin: 4px 0 2px;
}

.login-subtitle {
    color: var(--muted);
    margin: 0;
}

.form-field {
    margin-top: 16px;
}

.field-submit {
    margin-bottom: 20px;
}
.form-label {
    display: block;
/*    font-weight: 600;*/
    margin-bottom: 6px;
}

.error-message {
    color: #c53a3a;
}

.form-input {
    width: 100%;
    padding: 12px 14px;
    background: transparent;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text);
    transition: border-color .15s ease, box-shadow .15s ease, background .15s ease;
}

    .form-input:focus {
        outline: none;
        box-shadow: 0 0 0 3px rgba(79,140,255,0.25);
        border-color: var(--accent);
    }

.form-help {
    margin-top: 6px;
    color: var(--muted);
    font-size: 0.85rem;
}

.form-error {
    margin-top: 6px;
    color: var(--error);
    font-size: 0.9rem;
    min-height: 1.2em; /* preserves layout when hidden */
}

/*hide default password reveal icon input password field */
input[type="password"]::-ms-reveal,
input[type="password"]::-ms-clear {
    display: none;
}

input[type="password"]::-webkit-textfield-decoration-container {
    visibility: hidden;
}

input[type="password"]::-webkit-credentials-auto-fill-button {
    display: none !important;
}

.password-wrap {
    position: relative;
    display: flex;
    align-items: center;
}

.password-wrap .form-input {
    padding-right: 44px;
}

.password-toggle {
    position: absolute;
    right: 6px;
    top: 50%;
    transform: translateY(-50%);
    height: 34px;
    width: 34px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: linear-gradient(180deg, rgba(255,255,255,0.04), rgba(0,0,0,0.05));
    display: grid;
    place-items: center;
    cursor: pointer;
    color: var(--muted);
}

    .password-toggle:hover {
        border-color: var(--accent);
        color: var(--accent);
    }

.icon-eye {
    height: 18px;
    width: 18px;
    fill: currentColor;
}

.form-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 14px;
}

.forgot-password a {
    display: inline-block;
    float: right;
}

.remember {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

.checkbox {
    accent-color: var(--accent);
    width: 18px;
    height: 18px;
}

.link-muted {
    color: var(--muted);
    text-decoration: none;
    border-bottom: 1px dashed transparent;
}

    .link-muted:hover {
        color: var(--text);
        border-bottom-color: var(--muted);
    }

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    gap: 10px;
    padding: 12px 16px;
    margin-top: 18px;
    font-weight: 700;
    border-radius: var(--radius-sm);
    border: 1px solid transparent;
    cursor: pointer;
    transition: transform .02s ease, box-shadow .15s ease, background .15s ease;
}

.btn-primary {
    background: linear-gradient(180deg, var(--accent), var(--accent-2));
    color: white;
    box-shadow: 0 8px 18px rgba(79,140,255,0.28);
}

    .btn-primary:hover {
        filter: brightness(1.02);
    }

.btn:active {
    transform: translateY(1px);
}

.btn[disabled] {
    opacity: 0.7;
    cursor: not-allowed;
}

.field-authenticator-btn {
    text-align: center;
    margin: 20px 0 50px;
}

.button-as-link {
    background: none;
    border: none;
    padding: 0;
    font: inherit;
    cursor: pointer;
    color: var(--muted);
}


.mfa-option.button-as-link {
    background: none;
    border: none;
    display: inline-block;
    margin: 0;
    padding: 4px 12px;
}


#mfa-authenticator-help .login-header {
    margin-bottom: 20px
}

#mfa-authenticator-help p,
#mfa-authenticator-help ul li {
    color: var(--muted);
}

.help-link i {
    font-size: 12px;
}

.help-link i,
.help-link a {
    color: var(--muted);
}

.auth-logos {
    text-align: center;
    margin-bottom: 20px;
}

.auth-logos img {
    height: 40px;
    margin-right: 5px;
}

/*.btn,
.btn:hover,
.btn:active {
    transform: none;
}
*/
.btn-link {
    text-decoration: none;
    font-weight: 600;
    border: 1px solid #0a58ca;
}

    .btn.btn-link:hover,
    .btn.btn-link:active {
        border: 1px solid #0a58ca;
    }

.btn-spinner {
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255,255,255,0.5);
    border-top-color: white;
    border-radius: 50%;
    display: none;
    vertical-align: middle;
    animation: spin .9s linear infinite;
}

.btn.is-loading {
    pointer-events: none;
    opacity: 0.8;
}

.btn.is-loading .btn-spinner {
    display: inline-block;
    
}

.btn.loading .btn-text {
    opacity: 0.85;
}

.pw-rule {
    color: #888;
    font-size: 0.9rem;
}

.pw-valid {
    color: #0a923d; 
}

.pw-invalid {
    color: #888;
}

/* === MFA === */
.mfa-option {
    padding: 18px;
    border-radius: var(--radius-sm);
    border: 1px solid rgba(200, 225, 255, 0.5);
    background: linear-gradient( 180deg, rgba(79,140,255,0.03) 0%, rgba(240, 250, 255, 0.22) 50%, rgba(79,140,255,0.03) 100% );
    display: flex;
    align-items: center;
    gap: 14px;
    cursor: pointer;
    transition: background .2s ease, border-color .2s ease, transform .1s ease;
    margin: 12px 0;
}

.mfa-option .mfa-title {
    font-size: 16px;
    font-weight: 600;
    color: #6B7280;
}

.mfa-option i {
    font-size: 1.6rem;
    color: var(--accent);
}

.mfa-option:hover {
    border-color: rgba(200, 225, 255, 0.7);        
    background: linear-gradient( 180deg, rgba(79,140,255,0.05) 0%, rgba(240, 250, 255, 0.22) 50%, rgba(79,140,255,0.05) 100% );
        
}

.login-card {
    min-height: 520px;
    overflow: hidden;
    position: relative;
}

.logout-link {
    position: absolute;
    bottom: 20px;
    right: 20px;
}

.logout-link a {
    color: #6b7280    
}

.remind-later {
    margin-bottom: 30px;
}

.mfa-section {
    display: none;
}

.qr-container {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background-color: #ffffff;
    border-radius: 6px;
    box-shadow: 0 4px 10px rgba(16, 24, 40, 0.08);
}

    .qr-container img {
        width: 220px;
        height: 220px;
        image-rendering: pixelated; 
    }


.mfa-timer {
    margin-top: 15px;

}

.mfa-timer p {
    text-align: center;
    color: var(--muted);
}

/*terms page*/
.terms-card {
    max-width: 980px;
}

.terms-card p,
.terms-card ul li {
    color: var(--muted);
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.login-footer {
    margin-top: 20px;
    text-align: center;
}

.footer-text {
    color: var(--muted);
    font-size: 0.9rem;
}

.form-alert {
    text-align: center;
}

.alert {
    text-align: left;
    margin-bottom: 0;
}

.alert-success,
.alert-danger {
    padding: 0px 8px 1px;
    display: inline-block;
    margin-top: 10px;
    border-radius: 2px;
    border: none;
}


/* Small screens */
@media (max-width: 420px) {
    .login-card {
        padding: 22px;
    }

    .login-title {
        font-size: 1.35rem;
    }
}
