/* ==========================================================================
   Auth pages — clean variant (login, register). Loaded after auth.css and only
   active on <body class="auth-body auth-clean">.
   Neutral ink + greys, one accent (brand purple) for focus and links, no images:
   a soft dot pattern on the page and a fine grid on the dark side panel.
   ========================================================================== */
body.auth-clean {
    --a-ink: #0f172a;
    --a-text: #111827;
    --a-muted: #6b7280;
    --a-faint: #9ca3af;
    --a-line: #e5e7eb;
    --a-soft: #f9fafb;
    --a-chip: #f3f4f6;
    --a-accent: #6d28d9;
    --a-ring: rgba(109, 40, 217, .14);

    background-color: #f5f5f6;
    background-image: radial-gradient(rgba(15, 23, 42, .11) 1px, transparent 1.2px);
    background-size: 22px 22px;
    background-position: -11px -11px;
    background-attachment: fixed;
    color: var(--a-text);
    font-feature-settings: "cv11", "ss01";
}
body.auth-clean::before { display: none; }   /* auth.css darkens its old photo background */
.auth-clean .auth-input-wrap:focus-within .auth-input-icon { color: var(--a-ink); }
.auth-clean .auth-plan-card.selected .auth-plan-tag { background: #fff; color: #374151; box-shadow: inset 0 0 0 1px var(--a-line); }
.auth-clean .auth-plan-tag i { color: var(--a-muted); }

/* ── Card ─────────────────────────────────────────────── */
.auth-clean .auth-split {
    max-width: 1040px;
    min-height: 640px;
    border-radius: 20px;
    border: 1px solid var(--a-line);
    box-shadow: 0 1px 2px rgba(15, 23, 42, .04), 0 24px 56px -16px rgba(15, 23, 42, .16);
}
.auth-clean .auth-form-panel { padding: 3rem 3.25rem; }
@media (max-width: 991.98px) {
    .auth-clean .auth-form-panel { padding: 2rem 1.5rem; }
}

/* ── Brand + headings ─────────────────────────────────── */
.auth-clean .auth-brand-row { margin-bottom: 2rem; }
.auth-clean .auth-brand-logo { height: 32px; border-radius: 8px; }
.auth-clean .auth-brand-name { font-family: 'Inter', system-ui, sans-serif; font-size: 1.1rem; font-weight: 700; letter-spacing: -.01em; }
.auth-clean .auth-brand-name span { color: inherit; }
.auth-clean .auth-form-title {
    font-family: 'Inter', system-ui, sans-serif;
    font-size: 1.75rem;
    font-weight: 700;
    letter-spacing: -.025em;
    color: var(--a-ink);
    margin-bottom: .35rem;
}
.auth-clean .auth-form-sub { color: var(--a-muted); font-size: .95rem; margin-bottom: 1.75rem; }

/* ── Fields ───────────────────────────────────────────── */
.auth-clean .auth-field { margin-bottom: 1.1rem; }
.auth-clean .auth-label { font-size: .84rem; font-weight: 600; color: var(--a-text); margin-bottom: .4rem; }
.auth-clean .auth-label a { color: var(--a-muted); font-weight: 500; text-decoration: none; }
.auth-clean .auth-label a:hover { color: var(--a-ink); text-decoration: underline; text-underline-offset: 3px; }
.auth-clean .auth-input {
    height: 46px;
    border: 1px solid var(--a-line);
    border-radius: 10px;
    background: #fff;
    color: var(--a-text);
    font-size: .95rem;
    box-shadow: 0 1px 1px rgba(15, 23, 42, .03);
    transition: border-color .15s ease, box-shadow .15s ease;
}
.auth-clean .auth-input::placeholder { color: var(--a-faint); }
.auth-clean .auth-input:hover { border-color: #d1d5db; }
.auth-clean .auth-input:focus { border-color: var(--a-accent); box-shadow: 0 0 0 4px var(--a-ring); background: #fff; outline: 0; }
.auth-clean .auth-input.is-error { border-color: #dc2626; box-shadow: 0 0 0 4px rgba(220, 38, 38, .1); }
.auth-clean select.auth-input { appearance: auto; }
.auth-clean .auth-input-icon { color: var(--a-faint); }
.auth-clean .auth-input-eye, .auth-clean .pw-toggle-btn { color: var(--a-faint); }
.auth-clean .auth-input-eye:hover, .auth-clean .pw-toggle-btn:hover { color: var(--a-ink); }
.auth-clean .auth-check, .auth-clean .form-check-input { accent-color: var(--a-ink) !important; }
.auth-clean .auth-check-label { color: var(--a-muted); font-size: .88rem; }
.auth-clean .auth-field-error { color: #b91c1c; }

/* ── Buttons ──────────────────────────────────────────── */
.auth-clean .auth-submit-btn,
.auth-clean .btn-step-next {
    height: 48px;
    border: 0;
    border-radius: 10px;
    background: var(--a-ink);
    color: #fff;
    font-family: 'Inter', system-ui, sans-serif;
    font-size: .95rem;
    font-weight: 600;
    letter-spacing: 0;
    box-shadow: 0 1px 2px rgba(15, 23, 42, .2), inset 0 1px 0 rgba(255, 255, 255, .08);
    transition: background .15s ease, transform .05s ease;
}
.auth-clean .auth-submit-btn:hover,
.auth-clean .btn-step-next:hover { background: #1f2937; transform: none; box-shadow: 0 1px 2px rgba(15, 23, 42, .2); }
.auth-clean .auth-submit-btn:active,
.auth-clean .btn-step-next:active { transform: translateY(1px); }
.auth-clean .auth-submit-btn:focus-visible,
.auth-clean .btn-step-next:focus-visible { outline: 0; box-shadow: 0 0 0 4px var(--a-ring); }
.auth-clean .btn-step-back { color: var(--a-muted); background: none; border: 0; font-weight: 500; }
.auth-clean .btn-step-back:hover { color: var(--a-ink); }

/* ── Links under the form ─────────────────────────────── */
.auth-clean .auth-footer-link { color: var(--a-muted); font-size: .88rem; }
.auth-clean .auth-footer-link a { color: var(--a-ink) !important; font-weight: 600; text-decoration: underline; text-decoration-color: var(--a-line); text-underline-offset: 3px; }
.auth-clean .auth-footer-link a:hover { text-decoration-color: var(--a-ink); }
.auth-clean .auth-footer-link.is-minor { font-size: .8rem; margin-top: .4rem; }

/* ── Alerts: quiet, colour only where it carries meaning ─ */
.auth-clean .auth-alert { border-radius: 10px; font-size: .88rem; border: 1px solid var(--a-line); background: var(--a-soft); color: var(--a-text); }
.auth-clean .auth-alert-error { border-color: #fecaca; background: #fef2f2; color: #991b1b; }
.auth-clean .auth-alert-success { border-color: #bbf7d0; background: #f0fdf4; color: #166534; }

/* ── Register: trial badge, steps, plans, business type ─ */
.auth-clean .auth-trial-badge {
    display: inline-flex;
    align-items: center;
    gap: .45rem;
    padding: .3rem .75rem;
    border-radius: 999px;
    background: var(--a-chip);
    color: var(--a-text);
    font-size: .8rem;
    font-weight: 600;
}
.auth-clean .auth-trial-badge i { color: var(--a-ink) !important; }
.auth-clean .step-progress-title { color: var(--a-ink); font-weight: 600; letter-spacing: .02em; }
.auth-clean .step-progress-count { color: var(--a-muted); }
.auth-clean .step-progress-track { background: var(--a-chip); height: 4px; border-radius: 999px; }
.auth-clean .step-progress-fill { background: var(--a-ink); border-radius: 999px; }
.auth-clean .biz-type-section-label { color: var(--a-text); font-weight: 600; }
.auth-clean .biz-type-section-label i { color: var(--a-muted) !important; }

.auth-clean .auth-plan-card,
.auth-clean .biz-type-card {
    border: 1px solid var(--a-line);
    border-radius: 12px;
    background: #fff;
    box-shadow: none;
    transition: border-color .15s ease, background .15s ease;
}
.auth-clean .auth-plan-card:hover,
.auth-clean .biz-type-card:hover { border-color: #cbd5e1; transform: none; }
.auth-clean .auth-plan-card.selected,
.auth-clean .biz-type-card.selected {
    border-color: var(--a-ink);
    background: var(--a-soft);
    box-shadow: 0 0 0 1px var(--a-ink);
}
.auth-clean .auth-plan-radio { border-color: #d1d5db; }
.auth-clean .auth-plan-card.selected .auth-plan-radio { border-color: var(--a-ink); }
.auth-clean .auth-plan-card.selected .auth-plan-radio-dot { background: var(--a-ink); }
.auth-clean .auth-plan-name { color: var(--a-ink); }
.auth-clean .auth-plan-price { color: var(--a-ink); }
.auth-clean .auth-plan-period, .auth-clean .auth-plan-subline { color: var(--a-muted); }
.auth-clean .auth-plan-tag { background: var(--a-chip); color: #374151; border: 0; }
.auth-clean .auth-plan-tag i { color: var(--a-muted); }
.auth-clean .auth-plan-badge { background: var(--a-ink); color: #fff; }
.auth-clean .biz-type-card i { color: var(--a-muted); }
.auth-clean .biz-type-card.selected i { color: var(--a-ink); }
.auth-clean .biz-type-lbl { color: var(--a-text); }

.auth-clean .username-preview-box,
.auth-clean .terms-checkbox-card { background: var(--a-soft); border: 1px solid var(--a-line); border-radius: 10px; color: var(--a-muted); }
.auth-clean .username-preview-box i { color: var(--a-muted); }
.auth-clean .username-highlight { color: var(--a-ink); background: #fff; border: 1px solid var(--a-line); }
.auth-clean .terms-checkbox-card a { color: var(--a-ink) !important; text-decoration: underline; text-underline-offset: 2px; }
.auth-clean .optional-badge { background: var(--a-chip); color: var(--a-muted); }

.auth-clean .trust-bar {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: .4rem 1.1rem;
    padding: 0;
    margin-top: 1.25rem;
    border: 0;
    background: none;
}
.auth-clean .trust-item { color: var(--a-muted); font-size: .8rem; }
.auth-clean .trust-item i { color: var(--a-ink) !important; }

/* ── Side panel: dark, fine grid, no images ───────────── */
.auth-aside {
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 3rem;
    background-color: #0b0f19;
    background-image:
        linear-gradient(rgba(255, 255, 255, .055) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, .055) 1px, transparent 1px);
    background-size: 32px 32px;
    background-position: -1px -1px;
    color: #fff;
}
.auth-aside::before {   /* the grid fades out towards the edges */
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(120% 90% at 20% 15%, transparent 0%, rgba(11, 15, 25, .65) 55%, #0b0f19 85%);
    pointer-events: none;
}
.auth-aside > * { position: relative; }
.auth-aside-brand { display: flex; align-items: center; gap: .6rem; color: #fff; text-decoration: none; font-weight: 700; letter-spacing: -.01em; }
.auth-aside-brand img { height: 30px; border-radius: 7px; }
.auth-aside-kicker { font-size: .75rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: rgba(255, 255, 255, .55); margin-bottom: .9rem; }
.auth-aside-title { color: #fff; font-family: 'Inter', system-ui, sans-serif; font-size: 2rem; line-height: 1.2; font-weight: 600; letter-spacing: -.025em; margin: 0 0 1.5rem; max-width: 22ch; }
.auth-aside-points { list-style: none; margin: 0; padding: 0; display: grid; gap: .8rem; }
.auth-aside-points li { display: flex; gap: .7rem; align-items: flex-start; color: rgba(255, 255, 255, .78); font-size: .93rem; line-height: 1.45; }
.auth-aside-points i {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    margin-top: 1px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, .25);
    font-size: .6rem;
    color: #fff;
}
.auth-aside-foot { font-size: .8rem; color: rgba(255, 255, 255, .45); }
@media (max-width: 991.98px) {
    .auth-aside { display: none; }
}

/* ── Page footer (now on a light page) ────────────────── */
.auth-clean .auth-page-footer { color: var(--a-muted); text-shadow: none; font-size: .78rem; }
.auth-clean .auth-page-footer a { color: var(--a-muted); text-decoration: underline; text-underline-offset: 2px; }
.auth-clean .auth-page-footer a:hover { color: var(--a-ink); }
.auth-clean .auth-footer-sep { color: var(--a-faint); }

@media (prefers-reduced-motion: reduce) {
    .auth-clean * { transition: none !important; }
}
.auth-clean .auth-footer-legal-links a { color: var(--a-muted) !important; }
.auth-clean .auth-footer-legal-links a:hover { color: var(--a-ink) !important; }
html:has(body.auth-clean), body.auth-clean { scrollbar-color: #cbd5e1 transparent; }
body.auth-clean ::-webkit-scrollbar-thumb { background: #cbd5e1; }
.auth-clean .auth-form-panel { scrollbar-color: #d1d5db transparent; scrollbar-width: thin; }

/* ── Compact auth card (templates/accounts/_auth_card_base.html) ── */
.auth-clean .auth-card {
    width: 100%;
    max-width: 440px;
    padding: 2.5rem 2.25rem 2.25rem;
    background: #fff;
    border: 1px solid var(--a-line);
    border-radius: 18px;
    box-shadow: 0 1px 2px rgba(15, 23, 42, .04), 0 24px 56px -16px rgba(15, 23, 42, .16);
}
.auth-clean .auth-card .auth-brand-row { margin-bottom: 1.75rem; }
.auth-clean .auth-card.is-center { text-align: center; }
.auth-clean .auth-card.is-center .auth-brand-row { justify-content: center; }
.auth-clean .auth-card-icon {
    width: 44px;
    height: 44px;
    margin-bottom: 1rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    border: 1px solid var(--a-line);
    background: var(--a-soft);
    color: var(--a-ink);
    font-size: 1rem;
}
.auth-clean .auth-card-icon.is-good { background: #f0fdf4; border-color: #bbf7d0; color: #15803d; }
.auth-clean .auth-card-icon.is-bad { background: #fef2f2; border-color: #fecaca; color: #b91c1c; }
.auth-clean .auth-card .auth-form-title { font-size: 1.45rem; }
.auth-clean .auth-card .auth-form-sub { font-size: .92rem; line-height: 1.55; margin-bottom: 1.5rem; }
.auth-clean a.auth-submit-btn { display: flex; align-items: center; justify-content: center; text-decoration: none; }
.auth-clean a.auth-submit-btn:hover { color: #fff; }
@media (max-width: 480px) {
    .auth-clean .auth-card { padding: 2rem 1.35rem 1.75rem; border-radius: 16px; }
}

/* ── Code entry pages (verify email, 2-step sign-in) ── */
.auth-clean .email-badge {
    display: inline-flex; align-items: center; gap: .45rem;
    padding: .3rem .75rem; border-radius: 999px;
    background: var(--a-chip); color: var(--a-ink); border: 0; font-weight: 600; font-size: .85rem;
}
.auth-clean .email-badge i { color: var(--a-muted); }
.auth-clean .otp-input {
    border: 1px solid var(--a-line); border-radius: 10px; background: #fff; color: var(--a-ink);
    font-weight: 600; font-variant-numeric: tabular-nums; box-shadow: 0 1px 1px rgba(15, 23, 42, .03);
}
.auth-clean .otp-input:focus { border-color: var(--a-accent); box-shadow: 0 0 0 4px var(--a-ring); outline: 0; background: #fff; }
.auth-clean .otp-input.filled, .auth-clean .otp-input:not(:placeholder-shown) { border-color: #cbd5e1; }
.auth-clean .auth-otp-hint, .auth-clean .auth-otp-help { color: var(--a-muted); }
.auth-clean .auth-otp-help a { color: var(--a-ink); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
.auth-clean .auth-otp-help a i { color: #16a34a; }
.auth-clean .btn-resend {
    border: 1px solid var(--a-line); background: #fff; color: var(--a-ink);
    border-radius: 10px; font-weight: 500; box-shadow: none;
}
.auth-clean .btn-resend:hover { background: var(--a-soft); border-color: #d1d5db; color: var(--a-ink); }
.auth-clean .back-link { color: var(--a-muted); }
.auth-clean .back-link:hover { color: var(--a-ink); }
