* {
    box-sizing: border-box;
}

html {
    min-height: 100%;
    background: #eef2f7;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
    color: #172033;
}

body {
    margin: 0;
    line-height: 1.65;
}

a {
    color: #d96500;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

.auth-body {
    background:
        radial-gradient(
            circle at 50% 38%,
            #252a30 0%,
            #171a1f 42%,
            #0d0f12 72%,
            #08090b 100%
        );
    min-height: 100vh;
    padding: 54px 18px;
}

.auth-card {
    position: relative;
    max-width: 500px;
    margin: 0 auto;
    padding: 42px 42px 38px;
    overflow: hidden;
    background: rgba(255, 255, 255, .96);
    border: 1px solid #dfe4ec;
    border-radius: 18px;
    box-shadow:
        0 24px 70px rgba(15, 23, 42, .10),
        0 4px 16px rgba(15, 23, 42, .04);
}

.auth-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 15%;
    right: 15%;
    height: 2px;
    background: linear-gradient(90deg, transparent, #ff7a00, #ffae00, #ff7a00, transparent);
    box-shadow: 0 0 16px rgba(255, 122, 0, .35);
}

.auth-brand {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-width: 0;
    margin: 0 0 36px;
}

.auth-brand .brand-full {
    display: block;
    width: min(100%, 365px);
    height: auto;
    max-width: 365px;
    object-fit: contain;
}

.auth-brand .brand-icon {
    display: none;
}

.auth-card h1 {
    margin: 0 0 9px;
    color: #172033;
    font-size: 29px;
    line-height: 1.2;
    letter-spacing: -.8px;
}

.auth-card h2 {
    margin: 25px 0 10px;
    font-size: 17px;
}

.auth-card p,
.setup-steps {
    color: #697386;
    font-size: 13px;
}

.auth-card label {
    display: block;
    margin: 20px 0 8px;
    color: #273449;
    font-size: 12px;
    font-weight: 650;
}

.auth-card input:not([type=hidden]):not([type=checkbox]) {
    width: 100%;
    border: 1px solid #ccd4df;
    border-radius: 8px;
    padding: 12px 13px;
    margin-top: 7px;
    color: #182235;
    background: #fff;
    font-size: 14px;
    transition: border-color .18s ease, box-shadow .18s ease;
}

.auth-card input:not([type=hidden]):not([type=checkbox]):hover {
    border-color: #aeb8c6;
}

.auth-card input:not([type=hidden]):not([type=checkbox]):focus {
    outline: none;
    border-color: #ff8a00;
    box-shadow:
        0 0 0 3px rgba(255, 138, 0, .14),
        0 0 18px rgba(255, 138, 0, .08);
}

.auth-button {
    width: 100%;
    border: 1px solid #e96800;
    border-radius: 8px;
    margin-top: 24px;
    padding: 13px;
    color: #fff;
    background:
        linear-gradient(135deg, #222b38 0%, #151c27 46%, #d95f00 47%, #ff8a00 100%);
    box-shadow: 0 8px 22px rgba(217, 95, 0, .16);
    font-weight: 700;
    cursor: pointer;
    transition: transform .16s ease, box-shadow .16s ease, filter .16s ease;
}

.auth-button:hover {
    background:
        linear-gradient(135deg, #222b38 0%, #151c27 43%, #e56800 44%, #ff9a18 100%);
    transform: translateY(-1px);
    box-shadow: 0 11px 26px rgba(217, 95, 0, .23);
}

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

.auth-note {
    color: #7b8492 !important;
    font-size: 11px !important;
    margin-top: 22px;
}

.auth-link {
    display: block;
    margin-top: 22px;
    font-size: 12px;
}

.auth-error {
    border: 1px solid #f0cece;
    border-radius: 6px;
    margin-bottom: 20px;
    padding: 12px;
    background: #fff5f4;
    color: #a23939;
    font-size: 12px;
}

.auth-success {
    margin: 18px 0;
    border: 1px solid #d0e8d7;
    border-radius: 6px;
    padding: 12px;
    background: #eff8f2;
    color: #35714c;
    font-size: 12px;
}

.otp-input {
    letter-spacing: .16em;
}

.totp-qr {
    display: block;
    max-width: 100%;
    height: auto;
    margin: 20px auto;
}

.setup-key {
    display: block;
    overflow-wrap: anywhere;
    padding: 13px;
    border-radius: 6px;
    background: #f3f6fc;
    font-size: 13px;
    letter-spacing: .08em;
}

.recovery-codes {
    list-style: none;
    padding: 15px;
    border: 1px solid #e1e7f1;
    border-radius: 7px;
    background: #f5f7fc;
    font-size: 11px;
    line-height: 2.1;
    overflow-wrap: anywhere;
}

.check-label {
    display: flex !important;
    align-items: center;
    gap: 9px;
}

.logout-form {
    margin-top: 25px;
    padding-top: 15px;
    border-top: 1px solid #edf0f5;
    text-align: center;
}

.text-button {
    border: 0;
    padding: 3px 0;
    background: none;
    color: #72809a;
    font-size: 10px;
    cursor: pointer;
}

.auth-footer {
    margin: 24px auto;
    color: #9aa3b1;
    font-size: 10px;
    text-align: center;
    letter-spacing: .02em;
}

@media (max-width: 540px) {
    .auth-body {
        padding: 24px 12px;
    }

    .auth-card {
        padding: 32px 24px;
        border-radius: 14px;
    }

    .auth-brand {
        margin-bottom: 30px;
    }

    .auth-brand .brand-full {
        width: min(100%, 310px);
        height: auto;
    }

    .auth-card h1 {
        font-size: 26px;
    }
}

/* SmellsWiki animated circuit background */

.auth-body {
    position: relative;
    overflow: hidden;
}

.auth-circuit {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;

    background-image: url("/assets/auth-circuit.svg");
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;

    opacity: 0.7;
}

.auth-card {
    position: relative;
    z-index: 1;
}