.close-button {
    position: absolute;
    top: 25px;
    right: 25px;
    background: none;
    border: 1px solid var(--color-grey-25);
    border-radius: 20px;
    font-size: 24px;
    padding: 4px 12px;
    color: var(--color-grey-73);
    cursor: pointer;
}

    .close-button:hover {
        background: var(--color-grey-12);
    }


/* Main panel wrapper — fills the right column vertically */
.login-panel {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
    justify-content: stretch;
    align-items: stretch;
}

.login-panel > * {
    flex: 1;
    min-height: 0;
}


/* Wrapper for standalone @@page login-style screens (not inside LoginPanel) */
.auth-page {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: stretch;
    min-height: 100dvh;
    padding: 40px;
    background: var(--color-black);
    box-sizing: border-box;
}

.auth-page > .auth-shell {
    flex: 1;
}


/* ===== Shared login-shell utilities (used by secondary login pages) ===== */

.auth-shell {
    background: var(--color-grey-10);
    border-radius: 24px;
    padding: 40px;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.03);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 40px;
    width: 100%;
    height: 100%;
    box-sizing: border-box;
}

.auth-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-align: center;
    width: 320px;
    max-width: 100%;
}

.auth-title {
    margin: 0;
    font-family: Inter, sans-serif;
    font-weight: 600;
    font-size: 30px;
    line-height: 38px;
    color: #F9F9F9;
    text-align: center;
}

.auth-subtitle {
    margin: 0;
    font-family: Inter, sans-serif;
    font-weight: 400;
    font-size: 14px;
    line-height: 20px;
    color: #808080;
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 32px;
    width: 320px;
    max-width: 100%;
    margin: 0;
}

.auth-fields {
    display: flex;
    flex-direction: column;
    gap: 20px;
    width: 100%;
}

.auth-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
    width: 100%;
}

.auth-label {
    font-family: Inter, sans-serif;
    font-weight: 500;
    font-size: 14px;
    line-height: 20px;
    color: #B3B3B3;
}

.auth-input-wrap {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
}

.auth-input {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid #5D5D5D;
    border-radius: 8px;
    background: transparent;
    color: #F9F9F9;
    font-family: Inter, sans-serif;
    font-weight: 400;
    font-size: 16px;
    line-height: 24px;
    box-shadow: 0 1px 2px 0 rgba(10, 13, 18, 0.05);
    box-sizing: border-box;
    outline: none;
    transition: border-color 0.15s ease;
}

.auth-input.has-toggle {
    padding-right: 42px;
}

.auth-input::placeholder {
    color: #808080;
}

.auth-input:focus {
    border-color: #A1BA03;
}

.auth-input-toggle {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 4px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    opacity: 0.7;
    transition: opacity 0.15s ease;
}

.auth-input-toggle:hover,
.auth-input-toggle.on {
    opacity: 1;
}

.auth-input-toggle-icon {
    width: 16px;
    height: 16px;
    display: block;
}

.auth-mismatch {
    font-family: Inter, sans-serif;
    font-size: 12px;
    line-height: 18px;
    color: #F97066;
    margin-top: 2px;
}

.auth-pw-rules {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 2px;
}

.auth-pw-rule {
    font-family: Inter, sans-serif;
    font-size: 12px;
    line-height: 18px;
    color: #F97066;
    transition: color 0.15s ease;
}

.auth-pw-rule::before {
    content: "✕ ";
}

.auth-pw-rule.ok {
    color: #A1BA03;
}

.auth-pw-rule.ok::before {
    content: "✓ ";
}

.auth-toggle-row {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    user-select: none;
}

.auth-toggle-input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
    pointer-events: none;
}

.auth-toggle-track {
    position: relative;
    display: inline-block;
    width: 36px;
    height: 20px;
    background: #383838;
    border-radius: 12px;
    padding: 2px;
    box-sizing: border-box;
    transition: background 0.15s ease;
    flex-shrink: 0;
}

.auth-toggle-knob {
    position: absolute;
    top: 2px;
    left: 2px;
    width: 16px;
    height: 16px;
    background: #FFFFFF;
    border-radius: 50%;
    box-shadow: 0 1px 2px 0 rgba(10, 13, 18, 0.15), 0 1px 3px 0 rgba(10, 13, 18, 0.10);
    transition: transform 0.15s ease;
}

.auth-toggle-input:checked + .auth-toggle-track {
    background: #7E9202;
}

.auth-toggle-input:checked + .auth-toggle-track .auth-toggle-knob {
    transform: translateX(16px);
}

.auth-toggle-input:focus-visible + .auth-toggle-track {
    outline: 2px solid #A1BA03;
    outline-offset: 2px;
}

.auth-toggle-label {
    font-family: Inter, sans-serif;
    font-weight: 500;
    font-size: 14px;
    line-height: 20px;
    color: #B3B3B3;
}

.auth-submit {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 12px 20px;
    border-radius: 8px;
    border: 1px solid #A1BA03;
    background: #7E9202;
    box-shadow: 0 1px 2px 0 rgba(10, 13, 18, 0.05);
    cursor: pointer;
    color: #1A1A1A;
    font-family: Inter, sans-serif;
    font-weight: 600;
    font-size: 16px;
    line-height: 24px;
    transition: background 0.15s ease, border-color 0.15s ease;
}

.auth-submit:hover:not(:disabled) {
    background: #8FA30A;
    border-color: #B2CB14;
}

.auth-submit:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.auth-submit.is-loading {
    opacity: 0.8;
    cursor: progress;
}

.auth-spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(26, 26, 26, 0.25);
    border-top-color: #1A1A1A;
    border-radius: 50%;
    animation: auth-spin 0.7s linear infinite;
    margin-right: 8px;
    vertical-align: -3px;
}

@keyframes auth-spin {
    to { transform: rotate(360deg); }
}

.auth-links {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
}

.auth-links.center {
    justify-content: center;
}

.auth-link {
    font-family: Inter, sans-serif;
    font-weight: 400;
    font-size: 14px;
    line-height: 20px;
    color: #7E9202;
    text-decoration: underline;
    text-underline-offset: 2px;
    cursor: pointer;
    background: transparent;
    border: none;
    padding: 0;
}

.auth-link:hover {
    color: #A1BA03;
}

.auth-back {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 18px;
    border-radius: 8px;
    border: none;
    background: transparent;
    cursor: pointer;
    color: #B3B3B3;
    font-family: Inter, sans-serif;
    font-weight: 600;
    font-size: 16px;
    line-height: 24px;
    transition: background 0.15s ease, color 0.15s ease;
}

.auth-back:hover {
    background: rgba(255, 255, 255, 0.04);
    color: #F9F9F9;
}

.auth-back-icon {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    display: block;
}

.auth-back-label {
    white-space: nowrap;
}

/* OAuth provider button group (LoginPicker) */
.auth-oauth-group {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 20px;
    width: 260px;
    max-width: 100%;
}

.auth-oauth-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin: 0;
}

.auth-oauth-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 12px 20px;
    border-radius: 8px;
    border: 1px solid #4D4D4D;
    background: transparent;
    cursor: pointer;
    overflow: hidden;
    font-family: Inter, sans-serif;
    font-weight: 600;
    font-size: 16px;
    line-height: 24px;
    color: #C3E203;
    white-space: nowrap;
    transition: background 0.15s ease, border-color 0.15s ease;
}

.auth-oauth-btn:hover {
    background: rgba(255, 255, 255, 0.04);
    border-color: #666666;
}

.auth-oauth-btn:active {
    background: rgba(255, 255, 255, 0.06);
}

.auth-oauth-icon {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    display: block;
}

.auth-or {
    margin: 0;
    text-align: center;
    font-family: Inter, sans-serif;
    font-weight: 500;
    font-size: 16px;
    line-height: 24px;
    color: #808080;
}

.auth-terms {
    margin: 0;
    text-align: center;
    font-family: Inter, sans-serif;
    font-weight: 400;
    font-size: 12px;
    line-height: 18px;
    color: #808080;
    width: 320px;
    max-width: 100%;
}

.auth-legal-link {
    color: #7E9202;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.auth-legal-link:hover {
    color: #A1BA03;
}

/* Trailing help icon inside an input (use .auth-input.has-toggle to reserve padding) */
.auth-input-help {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    width: 16px;
    height: 16px;
    pointer-events: none;
    opacity: 0.7;
}

/* Fix the title at a stable position */
.login-title {
    margin-top: 0;
    margin-bottom: 40px;
    /* Reserve space so it does not move */
    min-height: 100px; /* You can tweak this number */
    text-align: center; /* centers multi-line text */
    /*display: flex;*/
    align-items: center;
    justify-content: center;
}

.divider {
    display: flex;
    align-items: center;
    text-align: center;
    color: var(--color-grey-47);
    font-size: 0.9rem;
    margin: 20px 0;
    width: 100%;
    max-width: 320px; /* align width with buttons */
    margin-left: auto;
    margin-right: auto;
}

    .divider::before,
    .divider::after {
        content: "";
        flex: 1;
        border-bottom: 1px solid var(--color-grey-18);
        margin: 0 12px;
    }

    .divider span {
        display: inline-block;
        padding: 0 4px;
        text-transform: uppercase;
        letter-spacing: 1px;
        color: var(--color-grey-67);
    }

.login-terms {
    margin-top: 10px;
    display: block;
    text-align: center;
    opacity: 0.6;
    font-size: 0.8rem;
}




/* Wrapper to keep buttons centered and stacked nicely */
.oauth-buttons {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 25px;
    margin-bottom: 10px;
}

/* Base style for all OAuth buttons (Google, MS, Apple, Email) */
.oauth-button {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 20px;
    width: 100%;
    max-width: 320px;
    padding: 12px 18px;
    border-radius: 12px;
    border: 1px solid var(--color-grey-87);
    background: var(--color-grey-90);
    color: var(--color-grey-12);
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    outline: none;
    text-decoration: none; /* for <a> */

    transition: background 0.16s ease, box-shadow 0.16s ease, transform 0.08s ease, border-color 0.16s ease;
}

    .oauth-button:hover {
        background: var(--color-grey-95);
        border-color: var(--color-grey-80);
        transform: translateY(-1px);
        box-shadow: 0 6px 20px rgba(var(--color-black-rgb), 0.12);
    }

    .oauth-button:active {
        transform: translateY(0);
        box-shadow: 0 3px 10px rgba(var(--color-black-rgb), 0.08);
    }

    .oauth-button:disabled {
        opacity: 0.4;
        cursor: not-allowed;
        transform: none !important;
        box-shadow: none !important;
    }

/* Icon container — NO circle, no background */
.oauth-icon {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    background: none;
    border-radius: 0;
    padding: 0;
}

/* SVG size for all providers */
.oauth-svg,
.google-g {
    width: 20px;
    height: 20px;
}

/* Label text inside buttons */
.oauth-label {
    white-space: nowrap;
    color: var(--color-grey-25);
}

/* Optional: keep buttons full width on very small screens */
@media (max-width: 480px) {
    .oauth-button {
        max-width: 100%;
    }
}

.legal-link {
    color: var(--color-grey-60);
    text-decoration: underline;
    text-underline-offset: 3px;
    transition: color 0.15s ease;
}

    .legal-link:hover {
        color: var(--color-grey-80);
    }




/* Container for the email login view */
.email-login-form {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-top: 10px;
}

/* Inner form aligned to same width as buttons */
.email-form-inner {
    width: 100%;
    max-width: 320px; /* same as .oauth-button */
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* Each field wrapper */
.email-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

    /* Label styling */
    .email-field label {
        font-size: 0.9rem;
        color: var(--color-grey-87);
        letter-spacing: 0.7px;
    }

.email-input-field {
    width: 100%;
    max-width: 320px;
    /*padding: 12px 18px;*/
    padding: 12px 48px 12px 18px; /* extra right padding for the toggle */
    border-radius: 12px;
    background: var(--color-black); /* black background */
    border: 1px solid var(--color-grey-93); /* subtle border */
    color: var(--color-white); /* light text */
    font-size: 1.1rem;
    font-weight: 500;
    box-sizing: border-box;
    transition: border-color .15s ease, background .15s ease;
}

    .email-input-field::placeholder {
        color: var(--color-grey-53);
    }

    /* Focus effect */
    .email-input-field:focus {
        outline: none;
        border-color: var(--color-grey-60);
        background: var(--color-grey-07); /* subtle active effect */
    }


.password-row {
    width: 100%;
    max-width: 320px;
    margin: 0 auto 16px auto;
}

/* Wrap input + toggle button */
.password-wrapper {
    position: relative;
}

/* Toggle button inside the input, on the right */
.password-toggle {
    position: absolute;
    top: 50%;
    right: 12px;
    transform: translateY(-50%);
    border: none;
    background: transparent;
    color: var(--color-grey-47);
    font-size: 0.9rem;
    cursor: pointer;
    padding: 0;
}

    .password-toggle:hover {
        color: var(--color-grey-25);
    }

/* Remember me row */
.email-remember-row {
    display: flex;
    align-items: center;
    justify-content: flex-start;
}

.remember-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    color: var(--color-grey-67);
}

.remember-checkbox {
    width: 16px;
    height: 16px;
}

/* Submit button reuses .oauth-button; this just tweaks spacing if needed */
.email-submit-button {
    justify-content: center; /* center text inside button */
}

.oauth-button.email-submit-button:not(:disabled) {
    background: var(--color-grey-93);
    border-color: var(--color-grey-73);
    color: var(--color-grey-12);
}

/* Links under email form */
.email-links {
    display: flex;
    justify-content: space-between;
    margin-top: 8px;
    font-size: 0.85rem;
    cursor: pointer;
}

    .email-links span {
        color: var(--color-grey-73);
        text-decoration: underline;
        text-underline-offset: 3px;
    }

    .email-links span:hover {
        color: var(--color-white);
    }

/* Back link under the form */
.back-link {
    margin-top: 16px;
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--color-grey-73);
    cursor: pointer;
}

    .back-link span:hover {
        color: var(--color-white);
    }



/* ----- Modern Black Checkbox ----- */
/* Row alignment */
.email-remember-row {
    width: 100%;
    max-width: 320px;
    margin: 10px auto 20px auto;
}

/* Label holds checkbox + text */
.remember-label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    color: var(--color-grey-80);
    font-size: 0.95rem;
}

/* Remove browser default checkbox */
.remember-checkbox {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    width: 20px;
    height: 20px;
    border: 1px solid var(--color-grey-35);
    background: var(--color-black); /* black background */
    border-radius: 4px;
    cursor: pointer;
    position: relative;
    transition: all 0.15s ease;
}

    /* Focus outline */
    .remember-checkbox:focus {
        outline: 2px solid var(--color-grey-40);
    }

    /* Checked state — white checkmark */
    .remember-checkbox:checked {
        background: var(--color-grey-07);
        border-color: var(--color-grey-60);
    }

        /* Add a checkmark using a pseudo-element */
        .remember-checkbox:checked::after {
            content: "";
            position: absolute;
            top: 2px;
            left: 6px;
            width: 5px;
            height: 10px;
            border: solid var(--color-white); /* white checkmark */
            border-width: 0 2px 2px 0;
            transform: rotate(45deg);
        }


.recovery-text {
    margin: 0 auto; /* centers the entire block */
    text-align: center;
    font-size: 1.1rem; /* or 1rem if you want bigger */
    line-height: 1.4;
    color: var(--color-grey-87); /* soft grey like other helper text */
    max-width: 320px;
}
