/* Auth pages — login, signup, password setup, password reset.
 * Dark-blue full-page background to match the sidebar (var(--bg))
 * and the existing checkout iframe. Cards use thin white-ish borders and
 * subtle gradients, mirroring .pricing-card from checkout_embed.html so
 * the whole portal-entry experience looks consistent. */

.auth-page {
    min-height: 100vh;
    background: rgb(9, 13, 86);
    padding: 60px 20px;
    color: #fff;
    margin: -20px;
}

.auth-page-inner {
    max-width: 460px;
    margin: 0 auto;
}

.auth-card {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.10) 0%, rgba(255, 255, 255, 0.03) 100%);
    border: 1px solid rgba(255, 255, 255, 0.20);
    border-radius: 12px;
    padding: 40px 32px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.30);
}

.auth-card__logo {
    text-align: center;
    margin-bottom: 24px;
}

.auth-card__logo img {
    max-width: 180px;
    height: auto;
}

.auth-card h1,
.auth-card h2 {
    color: #fff;
    text-align: center;
    margin: 0 0 12px 0;
    font-size: 1.6rem;
    font-weight: 700;
}

.auth-card__lead {
    text-align: center;
    color: rgba(255, 255, 255, 0.75);
    margin: 0 0 28px 0;
    line-height: 1.5;
    font-size: 0.95rem;
}

.auth-card__email-display {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 6px;
    padding: 10px 14px;
    margin-bottom: 20px;
    color: rgba(255, 255, 255, 0.85);
    font-size: 0.9rem;
}

.auth-form .form-group {
    margin-bottom: 18px;
}

.auth-form label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.80);
    margin-bottom: 8px;
    letter-spacing: 0.3px;
}

.auth-form input[type="email"],
.auth-form input[type="password"],
.auth-form input[type="text"] {
    width: 100%;
    padding: 12px 14px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.20);
    border-radius: 6px;
    color: #fff;
    font-size: 0.95rem;
    box-sizing: border-box;
}

.auth-form input[type="email"]:focus,
.auth-form input[type="password"]:focus,
.auth-form input[type="text"]:focus {
    outline: none;
    border-color: rgba(255, 255, 255, 0.50);
    background: rgba(255, 255, 255, 0.10);
}

.auth-form input::placeholder {
    color: rgba(255, 255, 255, 0.40);
}

.auth-form .checkbox-container {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 16px 0 22px 0;
}

.auth-form .checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    color: rgba(255, 255, 255, 0.85);
    font-size: 0.9rem;
    cursor: pointer;
}

.auth-form .checkbox-help-text {
    display: block;
    color: rgba(255, 255, 255, 0.55);
    font-size: 0.8rem;
    margin-top: 4px;
}

.auth-google-icon {
    display: inline-flex;
    align-items: center;
}

.auth-google-form {
    margin: 0;
}

.auth-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    color: rgba(255, 255, 255, 0.45);
    font-size: 0.85rem;
    margin: 22px 0;
}

.auth-divider::before,
.auth-divider::after {
    content: "";
    flex: 1;
    height: 1px;
    background: rgba(255, 255, 255, 0.20);
}

.auth-alt {
    text-align: center;
    color: rgba(255, 255, 255, 0.70);
    font-size: 0.9rem;
    margin-top: 24px;
}

.auth-alt a {
    color: #FF3C8D;
    text-decoration: none;
    font-weight: 600;
}

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

.auth-link {
    display: inline-block;
    margin-top: 14px;
    color: rgba(255, 255, 255, 0.65);
    font-size: 0.85rem;
    text-decoration: none;
}

.auth-link:hover {
    color: #fff;
    text-decoration: underline;
}

.auth-error {
    background: rgba(255, 60, 141, 0.15);
    border: 1px solid rgba(255, 60, 141, 0.40);
    color: #ffd6e6;
    padding: 12px 14px;
    border-radius: 6px;
    margin-bottom: 18px;
    font-size: 0.9rem;
}

.auth-confirmation {
    background: rgba(255, 60, 141, 0.10);
    border: 1px solid rgba(255, 60, 141, 0.35);
    color: rgba(255, 255, 255, 0.90);
    padding: 18px 20px;
    border-radius: 8px;
    line-height: 1.55;
    font-size: 0.95rem;
    text-align: center;
}

.auth-referral {
    text-align: center;
    margin-bottom: 24px;
    color: rgba(255, 255, 255, 0.85);
}

.auth-referral h2 {
    color: #FF3C8D;
    font-size: 1.4rem;
    margin: 0 0 8px 0;
}

.auth-referral p {
    color: rgba(255, 255, 255, 0.75);
    margin: 0;
    font-size: 0.95rem;
    line-height: 1.5;
}

/* Hide messages container on auth pages — auth pages render their own
 * inline error/confirmation surfaces and the global toast stack from
 * base.html duplicates them. */
.auth-page-active .messages-container {
    display: none;
}

/* ---------------------------------------------------------------------------
 * Auth shell (relocated from the base_auth.html inline <style> when main.css
 * was dissolved). tokens.css -> portal.css -> auth.css is the full cascade,
 * so this must be self-sufficiently dark. main.css previously supplied
 * ``body { margin: 0 }`` — portal.css sets body bg/color but NOT margin, so
 * it is preserved here to stop the shell shifting 8px.
 * ------------------------------------------------------------------------- */

/* Brand-pink button context: the converted primary CTAs inherit portal.css's
 * .tn-btn--primary gradient, which defaults to FI turquoise. Re-point the
 * per-context button tokens to the brand pink gradient on the shell. */
.auth-shell {
    --btn-from: var(--accent);
    --btn-to: var(--accent-2);
    --btn-glow: var(--shadow-glow);
    --btn-text: var(--accent-cta-text);
}

/* Full-width CTAs: the old .auth-btn was display:block;width:100%; .tn-btn is
 * inline-flex, so restore the full-bleed width for the stacked auth buttons.
 * (link_google_confirm stacks two .tn-btn siblings under .auth-form.) */
.auth-form .tn-btn,
.auth-google-form .tn-btn,
.auth-card > .tn-btn {
    width: 100%;
}

/* Auth pages: dark-blue full-bleed background, no sidebar chrome. */
body { background-color: var(--bg); margin: 0; }
.auth-shell { min-height: 100vh; display: flex; flex-direction: column; }
.auth-shell__header {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    padding: 16px 24px;
    background: transparent;
}
.auth-shell__lang { display: flex; gap: 8px; }
.auth-shell__lang img { height: 22px; width: auto; }
.auth-shell__main {
    flex: 1;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 40px 20px;
}
.auth-shell__footer {
    text-align: center;
    color: rgba(255, 255, 255, 0.55);
    font-size: 0.78rem;
    padding: 18px;
}
.auth-shell__footer a {
    color: rgba(255, 255, 255, 0.75);
    text-decoration: none;
    margin: 0 8px;
}
.auth-shell__footer a:hover { color: #fff; }

/* Inline messages block — rendered above the auth card. Without this,
 * messages added during the auth flow (logout, expired link, etc.) pile up
 * in the session until the user lands on base.html (dashboard), which dumps
 * them all at once. */
.auth-shell__messages {
    max-width: 460px;
    margin: 0 auto 20px;
}
.auth-message {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.20);
    border-radius: 8px;
    color: #fff;
    padding: 12px 16px;
    margin-bottom: 10px;
    font-size: 0.92rem;
    line-height: 1.4;
}
.auth-message--success {
    /* Lighter foreground so saturated brand-pink on faint pink background
       stays readable on dark blue. */
    background: rgba(255, 60, 141, 0.14);
    border-color: rgba(255, 60, 141, 0.45);
    color: var(--danger-text);
}
.auth-message--error,
.auth-message--warning {
    background: rgba(255, 60, 141, 0.12);
    border-color: var(--danger-border);
    color: var(--danger-text);
}
.auth-message--info {
    background: var(--info-bg);
    border-color: var(--info-border);
    color: var(--info-text);
}

/* Signup honeypot (anti-bot). Kept in the layout flow but pushed fully
   offscreen so a fill-everything bot still populates it while a real user
   never sees it. NOT `display:none`/`type=hidden` — some bots skip those. */
.signup-hp {
    position: absolute;
    left: -9999px;
    top: auto;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

/* Cloudflare Turnstile widget: give it breathing room above the CTA and
   reserve height to avoid layout shift while the challenge loads. */
.cf-turnstile {
    margin: 4px 0 20px;
    min-height: 65px;
}
