html, body {
    margin: 0;
    padding: 0;
    min-height: 100%;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: #1f2937;
}

body {
    min-height: 100vh;
    background: linear-gradient(135deg, rgba(0, 90, 158, 0.20), rgba(255, 255, 255, 0.08)), url('/images/Background.jpg') center center / cover no-repeat;
}

.auth-shell,
.twofactor-shell {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 32px 20px;
    box-sizing: border-box;
}

.auth-card,
.twofactor-card {
    position: relative;
    width: 100%;
    max-width: 520px;
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid rgba(255, 255, 255, 0.55);
    border-radius: 28px;
    box-shadow: 0 30px 80px rgba(0, 35, 80, 0.28);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    overflow: hidden;
    padding: 0 34px 34px 34px;
}

.twofactor-card-wide {
    max-width: 620px;
}

.auth-topbar,
.twofactor-topbar {
    height: 7px;
    margin: 0 -34px 28px -34px;
    background: linear-gradient(90deg, #ff6600, #0a84ff, #005a9e);
}

.auth-header,
.twofactor-header {
    text-align: center;
    margin-bottom: 24px;
}

.auth-badge,
.twofactor-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 14px;
    margin-bottom: 16px;
    border-radius: 999px;
    background: linear-gradient(135deg, rgba(10, 132, 255, 0.12), rgba(255, 102, 0, 0.12));
    color: #005a9e;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.2px;
}

.auth-header h1,
.twofactor-header h1 {
    margin: 0 0 10px 0;
    font-size: 34px;
    line-height: 1.1;
    font-weight: 800;
    color: #0f172a;
}

.auth-header p,
.twofactor-header p {
    margin: 0;
    font-size: 15px;
    line-height: 1.6;
    color: #475569;
}

.auth-form,
.twofactor-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.auth-field,
.twofactor-field {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

    .auth-field label,
    .twofactor-field label {
        font-size: 14px;
        font-weight: 700;
        color: #0f172a;
    }

.auth-input,
.twofactor-input {
    width: 100%;
    min-height: 58px;
    padding: 0 16px;
    border-radius: 16px;
    border: 1px solid #d7deea;
    background: rgba(248, 250, 252, 0.95);
    font-size: 18px;
    color: #0f172a;
    box-sizing: border-box;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease, background 0.2s ease;
}

    .auth-input:focus,
    .twofactor-input:focus {
        outline: none;
        border-color: #0a84ff;
        background: #ffffff;
        box-shadow: 0 0 0 5px rgba(10, 132, 255, 0.14);
        transform: translateY(-1px);
    }

    .twofactor-input[readonly] {
        background: #eef4fa;
        color: #334155;
        font-weight: 600;
    }

.auth-button,
.twofactor-button {
    width: 100%;
    min-height: 58px;
    border: none;
    border-radius: 16px;
    background: linear-gradient(135deg, #005a9e, #0a84ff);
    color: #ffffff;
    font-size: 17px;
    font-weight: 800;
    letter-spacing: 0.2px;
    cursor: pointer;
    box-shadow: 0 18px 35px rgba(0, 90, 158, 0.28);
    transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
}

    .auth-button:hover,
    .twofactor-button:hover {
        transform: translateY(-2px);
        box-shadow: 0 22px 40px rgba(0, 90, 158, 0.34);
        filter: brightness(1.03);
    }

    .auth-button:active,
    .twofactor-button:active {
        transform: translateY(0);
    }

.auth-alert,
.twofactor-alert {
    margin-bottom: 20px;
    padding: 16px 18px;
    border-radius: 16px;
    background: linear-gradient(135deg, #fff1f2, #fff7ed);
    border: 1px solid #fecdd3;
    color: #b42318;
    font-size: 14px;
    line-height: 1.5;
}

.auth-validation,
.twofactor-validation {
    display: none;
    font-size: 13px;
    color: #dc2626;
    min-height: 18px;
}

.was-validated .auth-input:invalid ~ .auth-validation {
    display: block;
}

.was-validated .auth-input:invalid {
    border-color: #dc2626;
    box-shadow: 0 0 0 4px rgba(220, 38, 38, 0.10);
}

.auth-footer {
    margin-top: 22px;
    text-align: center;
    font-size: 14px;
    color: #475569;
}

    .auth-footer a {
        color: #005a9e;
        font-weight: 700;
        text-decoration: none;
        margin-left: 4px;
    }

        .auth-footer a:hover {
            text-decoration: underline;
        }

.auth-honeypot {
    position: absolute;
    left: -9999px;
}

.twofactor-qr-wrap {
    display: flex;
    justify-content: center;
    margin-bottom: 24px;
}

.twofactor-qr {
    width: 220px;
    max-width: 100%;
    padding: 14px;
    border-radius: 24px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    box-shadow: 0 20px 40px rgba(15, 23, 42, 0.14);
    box-sizing: border-box;
}

@media (max-width: 768px) {
    .auth-shell,
    .twofactor-shell {
        padding: 20px 14px;
    }

    .auth-card,
    .twofactor-card,
    .twofactor-card-wide {
        max-width: 100%;
        border-radius: 22px;
        padding: 0 20px 24px 20px;
    }

    .auth-topbar,
    .twofactor-topbar {
        margin: 0 -20px 22px -20px;
    }

    .auth-header h1,
    .twofactor-header h1 {
        font-size: 26px;
    }

    .auth-header p,
    .twofactor-header p {
        font-size: 14px;
    }

    .auth-input,
    .auth-button,
    .twofactor-input,
    .twofactor-button {
        min-height: 52px;
        font-size: 16px;
        border-radius: 14px;
    }

    .twofactor-qr {
        width: 190px;
        border-radius: 18px;
    }
}
.auth-field .field-validation-error {
    display: block;
    font-size: 13px;
    color: #dc2626;
    min-height: 18px;
}

.auth-field .field-validation-valid {
    display: block;
    min-height: 18px;
}