/* =========================================================
   AUTH PAGE
========================================================= */

.auth-page {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}


/* =========================================================
   HEADER
========================================================= */

.auth-header {
    height: 68px;

    display: flex;
    align-items: center;
    justify-content: space-between;

    padding: 0 max(24px, calc((100vw - 1180px) / 2));

    border-bottom: 1px solid var(--border);
    background: var(--surface);

    position: relative;
    z-index: 2;
}


/* =========================================================
   MAIN
========================================================= */

.auth-main {
    flex: 1;

    display: grid;
    place-items: center;

    padding: 60px 20px;
}


/* =========================================================
   CARD
========================================================= */

.auth-card {
    width: min(430px, 100%);

    padding: 36px;

    border: 1px solid var(--border);
    border-radius: 16px;

    background: var(--surface);
    box-shadow: var(--shadow);
}

.signup-card {
    width: min(450px, 100%);
}


/* =========================================================
   HIDDEN
========================================================= */

.hidden,
[hidden] {
    display: none !important;
}


/* =========================================================
   LOGO
========================================================= */

.auth-logo {
    width: 54px;
    height: 54px;

    margin-bottom: 25px;

    display: grid;
    place-items: center;
}

.auth-logo img {
    width: 54px;
    height: 54px;

    object-fit: contain;
}


/* Light theme logo = black */

body[data-theme="light"] .auth-logo img {
    filter: brightness(0) saturate(100%);
}


/* =========================================================
   HEADING
========================================================= */

.auth-heading {
    margin-bottom: 28px;
}

.auth-heading .section-kicker {
    display: block;
    margin-bottom: 9px;
}

.auth-heading h1 {
    margin: 0;

    font-size: 32px;
    line-height: 1.1;

    letter-spacing: -.045em;
}

.auth-heading p {
    margin: 10px 0 0;

    color: var(--muted);

    font-size: 13px;
    line-height: 1.6;
}


/* =========================================================
   FORM
========================================================= */

#loginForm,
#signupForm {
    display: grid;
    gap: 18px;
}

.form-field {
    display: grid;
    gap: 7px;
}

.form-field label,
.field-label label {
    font-size: 11px;
    font-weight: 700;
}

.field-label {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.forgot-link {
    color: var(--accent);

    font-size: 10px;
    font-weight: 600;
}

.form-field input {
    width: 100%;
    height: 43px;

    padding: 0 12px;

    border: 1px solid var(--border);
    border-radius: 9px;

    outline: none;

    background: var(--surface-2);
    color: var(--text);

    font: inherit;
    font-size: 12px;

    transition:
        border-color .15s ease,
        box-shadow .15s ease,
        background-color .15s ease;
}

.form-field input::placeholder {
    color: var(--muted);
    opacity: .75;
}

.form-field input:focus {
    border-color: var(--accent);

    box-shadow:
        0 0 0 3px color-mix(
            in srgb,
            var(--accent) 12%,
            transparent
        );
}

.field-help {
    color: var(--muted);
    font-size: 10px;
}


/* =========================================================
   CHECKBOXES
========================================================= */

.remember,
.terms {
    display: flex;
    align-items: flex-start;

    gap: 8px;

    color: var(--muted);

    font-size: 10px;
    line-height: 1.5;

    cursor: pointer;
}

.remember input,
.terms input {
    margin-top: 2px;
    accent-color: var(--accent);
}

.terms a {
    color: var(--accent);
    font-weight: 600;
}


/* =========================================================
   SUBMIT
========================================================= */

.auth-submit {
    width: 100%;
    height: 43px;

    border: 0;
    border-radius: 9px;

    background: var(--primary);
    color: var(--bg);

    font-size: 12px;
    font-weight: 700;

    cursor: pointer;

    transition:
        background-color .15s ease,
        transform .15s ease,
        opacity .15s ease;
}

.auth-submit:hover {
    background: var(--primary-hover);
    transform: translateY(-1px);
}

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

.auth-submit:disabled {
    opacity: .6;
    cursor: wait;
    transform: none;
}


/* =========================================================
   MESSAGE
========================================================= */

.auth-message {
    display: none;

    padding: 10px 12px;

    border-radius: 8px;

    font-size: 10px;
    line-height: 1.5;
}

.auth-message.visible {
    display: block;
}

.auth-message.error {
    background: #ef444412;
    border: 1px solid #ef444430;
    color: #ef7777;
}

.auth-message.success {
    background: #22c55e12;
    border: 1px solid #22c55e30;
    color: #55c878;
}


/* =========================================================
   DIVIDER
========================================================= */

.auth-divider {
    display: flex;
    align-items: center;

    gap: 12px;

    margin: 25px 0 20px;

    color: var(--muted);

    font-size: 10px;
}

.auth-divider::before,
.auth-divider::after {
    content: "";

    flex: 1;

    height: 1px;

    background: var(--border);
}


/* =========================================================
   SWITCH
========================================================= */

.auth-switch {
    margin: 0;

    text-align: center;

    color: var(--muted);

    font-size: 11px;
}

.auth-switch a {
    color: var(--accent);
    font-weight: 700;
}


/* =========================================================
   VERIFICATION
========================================================= */

.activation-step,
.verification-step {
    width: 100%;
}


/* =========================================================
   VERIFICATION SECTION
========================================================= */

.verification-section {
    margin-top: 4px;
}

.verification-label {
    display: block;

    margin-bottom: 9px;

    color: var(--text);

    font-size: 11px;
    font-weight: 700;
}


/* =========================================================
   CODE INPUTS
========================================================= */

.verification-code {
    display: grid;

    grid-template-columns:
        repeat(6, minmax(0, 1fr));

    gap: 8px;

    width: 100%;
}

.code-input {
    width: 100%;
    height: 54px;

    box-sizing: border-box;

    padding: 0;

    border: 1px solid var(--border);
    border-radius: 10px;

    outline: none;

    background: var(--surface-2);
    color: var(--text);

    font-family: inherit;
    font-size: 21px;
    font-weight: 800;

    text-align: center;

    transition:
        border-color .15s ease,
        box-shadow .15s ease,
        background-color .15s ease,
        transform .15s ease;
}

.code-input:hover {
    border-color: color-mix(
        in srgb,
        var(--accent) 45%,
        var(--border)
    );
}

.code-input:focus {
    border-color: var(--accent);

    background: var(--surface);

    box-shadow:
        0 0 0 3px color-mix(
            in srgb,
            var(--accent) 12%,
            transparent
        );

    transform: translateY(-1px);
}


/* =========================================================
   VERIFICATION NOTE
========================================================= */

.verification-note,
.verification-hint {
    margin: 12px 0 0;

    color: var(--muted);

    font-size: 10px;
    line-height: 1.6;

    text-align: center;
}

.verification-note strong,
.verification-hint strong {
    color: var(--text);
}


/* =========================================================
   ACTIVATION / VERIFICATION BUTTON
========================================================= */

#activateAccount,
#verifyCode {
    margin-top: 18px;
}


/* =========================================================
   RENEW CODE
========================================================= */

.renew-code {
    display: flex;
    justify-content: center;
    align-items: center;

    gap: 5px;

    margin-top: 20px;

    color: var(--muted);

    font-size: 10px;
    line-height: 1.5;
}

.renew-code button {
    border: 0;
    padding: 0;

    background: transparent;
    color: var(--accent);

    font-family: inherit;
    font-size: 10px;
    font-weight: 700;

    cursor: pointer;

    transition:
        color .15s ease,
        opacity .15s ease;
}

.renew-code button:hover {
    color: var(--text);
    text-decoration: underline;
}

.renew-code button:disabled {
    opacity: .5;
    cursor: wait;
}


/* =========================================================
   BACK TO LOGIN
========================================================= */

.back-button {
    display: block;

    margin: 16px auto 0;

    border: 0;
    padding: 0;

    background: transparent;
    color: var(--muted);

    font-family: inherit;
    font-size: 10px;
    font-weight: 600;

    cursor: pointer;

    transition:
        color .15s ease,
        opacity .15s ease;
}

.back-button:hover {
    color: var(--text);
    text-decoration: underline;
}

.back-button:active {
    opacity: .7;
}


/* =========================================================
   ACTIVATION OPTIONS
========================================================= */

.activation-options {
    display: flex;

    flex-direction: column;
    align-items: center;

    gap: 10px;

    margin-top: 20px;
}

.auth-text-button {
    border: 0;
    padding: 0;

    background: transparent;
    color: var(--muted);

    font-family: inherit;
    font-size: 10px;

    cursor: pointer;

    transition:
        color .15s ease,
        opacity .15s ease;
}

.auth-text-button strong {
    color: var(--accent);
    font-weight: 700;
}

.auth-text-button:hover {
    color: var(--text);
}

.auth-text-button:hover strong {
    text-decoration: underline;
}

.auth-text-button:disabled {
    opacity: .5;
    cursor: wait;
}


/* =========================================================
   ACTIVATION EMAIL
========================================================= */

#activationEmail,
#verificationEmail {
    color: var(--text);

    font-weight: 700;

    word-break: break-word;
}


/* =========================================================
   FOOTER
========================================================= */

.auth-footer {
    width: min(1180px, 100%);

    margin: auto;
    padding: 24px;

    display: flex;
    justify-content: space-between;
    align-items: center;

    color: var(--muted);

    font-size: 10px;
}

.auth-footer a {
    color: var(--muted);
}

.auth-footer a:hover {
    color: var(--text);
}


/* =========================================================
   MOBILE
========================================================= */

@media (max-width: 600px) {

    .auth-header {
        padding: 0 18px;
    }

    .auth-header .theme-switcher {
        transform: scale(.9);
        transform-origin: right center;
    }

    .auth-main {
        padding: 35px 18px;
    }

    .auth-card {
        padding: 28px 22px;
        border-radius: 13px;
    }

    .auth-heading h1 {
        font-size: 28px;
    }

    .auth-footer {
        padding: 20px 18px;
    }
}


@media (max-width: 480px) {

    .verification-code {
        gap: 6px;
    }

    .code-input {
        height: 50px;
        border-radius: 9px;
        font-size: 19px;
    }

}