.bd-auth-wrapper {
    direction: rtl;
    padding: 28px 16px 44px;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 88vh;
    background:
        radial-gradient(ellipse at 15% 20%, rgba(37, 99, 235, 0.14), transparent 50%),
        radial-gradient(ellipse at 85% 10%, rgba(15, 118, 110, 0.13), transparent 48%),
        radial-gradient(ellipse at 50% 80%, rgba(99, 102, 241, 0.08), transparent 60%),
        linear-gradient(160deg, var(--bd-bg-start, #eef4ff) 0%, var(--bd-bg-end, #f4f8ff) 55%, #ffffff 100%);
}

.bd-auth-shell {
    width: min(1020px, 100%);
    display: grid;
    grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.2fr);
    gap: 20px;
    align-items: stretch;
}

.bd-auth-brand {
    position: relative;
    overflow: hidden;
    padding: 28px 26px;
    border-radius: 24px;
    color: #fff;
    background:
        linear-gradient(155deg, rgba(7, 20, 34, 0.94), rgba(15, 53, 80, 0.92)),
        linear-gradient(135deg, var(--bd-primary, #0f766e), var(--bd-secondary, #2563eb));
    box-shadow: 0 28px 60px rgba(15, 23, 42, 0.18);
    border: 1px solid rgba(255, 255, 255, 0.12);
}

.bd-auth-brand::after {
    content: "";
    position: absolute;
    inset: auto -20% -30% auto;
    width: 220px;
    height: 220px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.16), transparent 68%);
    pointer-events: none;
}

.bd-auth-brand-badge {
    display: inline-flex;
    padding: 6px 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.18);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.4px;
}

.bd-auth-brand-title {
    margin: 16px 0 10px;
    font-size: clamp(1.35rem, 2.2vw, 1.75rem);
    line-height: 1.55;
    color: #fff;
}

.bd-auth-brand-copy {
    margin: 0;
    color: rgba(255, 255, 255, 0.86);
    font-size: 14px;
    line-height: 1.95;
}

.bd-auth-brand-list {
    list-style: none;
    margin: 22px 0 0;
    padding: 0;
    display: grid;
    gap: 12px;
}

.bd-auth-brand-list li {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    color: rgba(255, 255, 255, 0.92);
    font-size: 13px;
    line-height: 1.8;
}

.bd-auth-brand-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.14);
    flex-shrink: 0;
}

.bd-auth-brand-icon svg {
    width: 12px;
    height: 12px;
    display: block;
}

.bd-auth-card {
    width: 100%;
    background: rgba(255, 255, 255, 0.96);
    border-radius: 26px;
    box-shadow: 0 28px 70px rgba(18, 32, 64, 0.13), 0 4px 16px rgba(18, 32, 64, 0.06);
    padding: 32px 30px 28px;
    border: 1px solid rgba(220, 230, 245, 0.98);
    font-family: inherit;
    position: relative;
    overflow: hidden;
}

.bd-auth-card::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    left: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--bd-primary, #0f766e), var(--bd-secondary, #2563eb));
    border-radius: 26px 26px 0 0;
}

.bd-auth-header {
    text-align: center;
    margin-bottom: 20px;
}

.bd-auth-title {
    margin: 16px 0 6px;
    font-size: clamp(1.2rem, 2vw, 1.45rem);
    color: #0f172a;
    line-height: 1.45;
}

.bd-auth-subtitle {
    margin: 0;
    color: #64748b;
    font-size: 14px;
    line-height: 1.8;
}

.bd-auth-tabs {
    display: flex;
    gap: 6px;
    background: rgba(241, 245, 249, 0.95);
    padding: 5px;
    border-radius: 16px;
    justify-content: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    border: 1px solid rgba(226, 232, 240, 0.9);
    box-shadow: inset 0 1px 3px rgba(0,0,0,0.04);
}

.bd-auth-tab {
    border: none;
    background: transparent;
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    color: #64748b;
    border-radius: 12px;
    transition: all 0.22s cubic-bezier(0.22, 1, 0.36, 1);
    letter-spacing: 0.01em;
    min-height: 40px;
}

.bd-auth-tab.is-active {
    background: linear-gradient(135deg, var(--bd-primary, #0f766e), var(--bd-secondary, #2563eb));
    color: #fff;
    box-shadow: 0 8px 20px rgba(15, 118, 110, 0.26), 0 2px 6px rgba(15, 118, 110, 0.14);
}

.bd-auth-body {
    display: grid;
    gap: 18px;
}

.bd-auth-panel {
    display: none;
    animation: bdFadeIn 0.35s ease;
}

.bd-auth-panel.is-active {
    display: grid;
    gap: 14px;
}

.bd-auth-field {
    display: grid;
    gap: 8px;
}

.bd-auth-panel label,
.bd-auth-field label {
    font-weight: 700;
    font-size: 13px;
    color: #334155;
}

.bd-auth-input-wrap {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0 14px;
    border: 1.5px solid #dbe3ef;
    border-radius: 14px;
    background: #f8fafc;
    transition: border-color 0.22s ease, box-shadow 0.22s ease, background 0.22s ease;
    min-height: 50px;
}

.bd-auth-input-wrap:focus-within {
    border-color: rgba(15, 118, 110, 0.6);
    background: #fff;
    box-shadow: 0 0 0 4px rgba(15, 118, 110, 0.1), 0 2px 8px rgba(15, 118, 110, 0.08);
}

.bd-auth-input-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    opacity: 0.8;
    flex-shrink: 0;
}

.bd-auth-input-icon svg {
    width: 18px;
    height: 18px;
    display: block;
}

.bd-auth-panel input,
.bd-auth-passkey-row input {
    width: 100%;
    border: none;
    background: transparent;
    border-radius: 0;
    padding: 13px 0;
    font-size: 15px;
    color: #0f172a;
    letter-spacing: 0.01em;
}

.bd-auth-panel input[type="tel"],
.bd-auth-panel input[name*="phone"] {
    direction: ltr;
    text-align: right;
    font-size: 15px;
    letter-spacing: 0.03em;
}

.bd-auth-panel input:focus,
.bd-auth-passkey-row input:focus {
    outline: none;
    box-shadow: none;
}

.bd-auth-panel input::placeholder {
    color: #94a3b8;
    font-size: 13px;
}

.bd-auth-btn {
    border: none;
    border-radius: 14px;
    padding: 13px 18px;
    font-size: 14px;
    font-weight: 700;
    background: linear-gradient(135deg, var(--bd-primary, #0f766e), var(--bd-secondary, #2563eb));
    color: #fff;
    cursor: pointer;
    transition: transform 0.22s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.22s ease, filter 0.15s ease;
    min-height: 50px;
    letter-spacing: 0.02em;
    position: relative;
    overflow: hidden;
}

.bd-auth-btn::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(255, 255, 255, 0);
    transition: background 0.15s ease;
}

.bd-auth-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 16px 32px rgba(15, 118, 110, 0.28), 0 4px 10px rgba(15, 118, 110, 0.16);
    filter: brightness(1.04);
}

.bd-auth-btn:active {
    transform: translateY(0);
    filter: brightness(0.97);
}

.bd-auth-secondary {
    background: #fff;
    border: 1px solid rgba(15, 118, 110, 0.35);
    color: var(--bd-primary, #0f766e);
    box-shadow: none;
}

.bd-auth-otp {
    border: 1px dashed #cbd5e1;
    border-radius: 16px;
    padding: 14px;
    background: #f8fafc;
}

.bd-auth-otp-row {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}

.bd-auth-otp-row input {
    flex: 1;
    min-width: 200px;
    border: 1px solid #dbe3ef;
    border-radius: 12px;
    padding: 10px 12px;
    background: #fff;
}

.bd-auth-passkey {
    margin-top: 10px;
    padding: 18px;
    border-radius: 18px;
    background: linear-gradient(145deg, rgba(236, 253, 248, 0.96), rgba(235, 244, 255, 0.96));
    border: 1px solid rgba(153, 246, 228, 0.5);
    box-shadow: inset 0 1px 3px rgba(15, 118, 110, 0.06);
}

.bd-auth-passkey-head h4 {
    margin: 0 0 6px;
    font-size: 14px;
    font-weight: 700;
    color: #0f172a;
    display: flex;
    align-items: center;
    gap: 6px;
}

.bd-auth-passkey-head p {
    margin: 0 0 14px;
    font-size: 12.5px;
    color: #64748b;
    line-height: 1.8;
}

.bd-auth-passkey-row {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: center;
    padding: 0 12px;
    border: 1px solid #dbe3ef;
    border-radius: 14px;
    background: #fff;
}

.bd-auth-passkey-row input {
    flex: 1;
    min-width: 200px;
}

.bd-auth-passkey-btn {
    flex-shrink: 0;
}

.bd-auth-footer {
    margin-top: 18px;
    text-align: center;
}

.bd-auth-hint {
    color: #94a3b8;
    font-size: 12px;
    margin-top: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
}

.bd-auth-hint-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 14px;
    height: 14px;
    flex-shrink: 0;
}

.bd-auth-hint-icon svg {
    width: 14px;
    height: 14px;
    display: block;
}

.bd-auth-alert {
    min-height: 22px;
    font-size: 13px;
    color: #be123c;
    margin-bottom: 6px;
}

.bd-auth-alert[aria-live],
.bd-profile-alert[aria-live] {
    border-radius: 10px;
    padding: 8px 12px;
    transition: background 0.2s ease, color 0.2s ease;
}

.bd-auth-alert[aria-live]:not(:empty),
.bd-profile-alert[aria-live]:not(:empty) {
    background: var(--bd-ui-danger-soft, rgba(214, 69, 104, 0.12));
    border: 1px solid rgba(214, 69, 104, 0.18);
}

.bd-auth-alert[aria-live].is-success,
.bd-profile-alert[aria-live].is-success {
    color: var(--bd-ui-success, #1da97c);
    background: var(--bd-ui-success-soft, rgba(29, 169, 124, 0.13));
    border-color: rgba(29, 169, 124, 0.2);
}

.bd-auth-alert.is-success {
    color: #0f766e;
}

.bd-auth-captcha {
    margin: 4px 0 14px;
    padding: 14px 14px 12px;
    border-radius: 16px;
    border: 1px solid rgba(15, 118, 110, 0.18);
    background:
        linear-gradient(145deg, rgba(15, 118, 110, 0.06), rgba(37, 99, 235, 0.05)),
        #ffffff;
    box-shadow: 0 8px 22px rgba(15, 23, 42, 0.05);
    transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.bd-auth-captcha.is-verified {
    border-color: rgba(15, 118, 110, 0.45);
    box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.12);
}

.bd-auth-captcha.is-error {
    border-color: rgba(220, 38, 38, 0.45);
}

.bd-auth-captcha.is-error-shake {
    animation: bd-auth-captcha-shake 0.45s ease;
}

@keyframes bd-auth-captcha-shake {
    0%, 100% { transform: translateX(0); }
    20% { transform: translateX(-4px); }
    40% { transform: translateX(4px); }
    60% { transform: translateX(-3px); }
    80% { transform: translateX(3px); }
}

.bd-auth-captcha-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 10px;
}

.bd-auth-captcha-label {
    font-size: 12px;
    font-weight: 800;
    color: #0f766e;
    letter-spacing: 0.2px;
}

.bd-auth-captcha-refresh {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border: 0;
    border-radius: 10px;
    background: rgba(15, 118, 110, 0.1);
    color: #0f766e;
    cursor: pointer;
    transition: background 0.15s ease, transform 0.15s ease;
}

.bd-auth-captcha-refresh:hover {
    background: rgba(15, 118, 110, 0.18);
    transform: rotate(-18deg);
}

.bd-auth-captcha-body {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(88px, 0.7fr);
    gap: 10px;
    align-items: stretch;
}

.bd-auth-captcha-question {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 10px 12px;
    border-radius: 12px;
    background:
        repeating-linear-gradient(
            -12deg,
            rgba(15, 23, 42, 0.03),
            rgba(15, 23, 42, 0.03) 8px,
            rgba(15, 23, 42, 0.01) 8px,
            rgba(15, 23, 42, 0.01) 16px
        ),
        #f8fafc;
    border: 1px dashed rgba(100, 116, 139, 0.35);
    font-size: 1.15rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    color: #0f172a;
    user-select: none;
}

.bd-auth-captcha-input-wrap {
    display: flex;
}

.bd-auth-captcha-input {
    width: 100%;
    min-height: 48px;
    border: 1px solid rgba(148, 163, 184, 0.7);
    border-radius: 12px;
    padding: 10px 12px;
    text-align: center;
    font-size: 1.1rem;
    font-weight: 700;
    background: #fff;
    color: #0f172a;
    outline: none;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.bd-auth-captcha-input:focus {
    border-color: #0f766e;
    box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.15);
}

.bd-auth-captcha-hint {
    margin: 10px 0 0;
    font-size: 11px;
    line-height: 1.7;
    color: #64748b;
}

@media (max-width: 520px) {
    .bd-auth-captcha-body {
        grid-template-columns: 1fr;
    }
}

.bd-auth-message {
    direction: rtl;
    text-align: center;
    padding: 18px;
    background: #fff7e8;
    border: 1px solid #ffd7a5;
    border-radius: 12px;
    font-family: inherit;
}

.bd-auth-gate-wrapper {
    direction: rtl;
    display: flex;
    justify-content: center;
    padding: 28px 16px 44px;
    min-height: 50vh;
    background:
        radial-gradient(ellipse at 15% 20%, rgba(42, 109, 246, 0.1), transparent 50%),
        radial-gradient(ellipse at 85% 10%, rgba(29, 169, 124, 0.08), transparent 48%),
        linear-gradient(160deg, var(--bd-bg-start, #eef4ff) 0%, var(--bd-bg-end, #f4f8ff) 55%, #ffffff 100%);
}

.bd-auth-gate {
    width: min(480px, 100%);
    text-align: center;
    padding: 32px 28px 28px;
    border-radius: var(--bd-ui-radius-lg, 22px);
    border: 1px solid var(--bd-ui-border, rgba(255, 255, 255, 0.78));
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.94), rgba(244, 248, 255, 0.88));
    box-shadow: var(--bd-ui-shadow, 0 24px 60px rgba(22, 40, 72, 0.14));
}

.bd-auth-gate-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 64px;
    height: 64px;
    margin: 0 auto 16px;
    border-radius: 999px;
    color: var(--bd-ui-primary, #2a6df6);
    background: var(--bd-ui-primary-soft, rgba(42, 109, 246, 0.12));
    border: 1px solid rgba(42, 109, 246, 0.16);
}

.bd-auth-gate-icon svg {
    display: block;
    width: 32px;
    height: 32px;
}

.bd-auth-gate-title {
    margin: 0 0 10px;
    font-size: clamp(1.15rem, 2vw, 1.35rem);
    line-height: 1.55;
    color: var(--bd-ui-title, #102944);
}

.bd-auth-gate-message {
    margin: 0 0 20px;
    font-size: 14px;
    line-height: 1.9;
    color: var(--bd-ui-text-soft, #5f7593);
}

.bd-auth-gate-message a {
    color: var(--bd-ui-primary, #2a6df6);
    font-weight: 700;
    text-decoration: none;
}

.bd-auth-gate-message a:hover {
    text-decoration: underline;
}

.bd-auth-gate-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    min-width: 160px;
    padding: 0 22px;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--bd-ui-primary, #2a6df6), var(--bd-ui-primary-strong, #1c57cb));
    color: #fff;
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
    box-shadow: 0 14px 28px rgba(42, 109, 246, 0.22);
    transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.bd-auth-gate-btn:hover {
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 18px 34px rgba(42, 109, 246, 0.28);
}

.bd-auth-gate-btn:focus-visible {
    outline: none;
    box-shadow: var(--bd-ui-shadow-focus, 0 0 0 4px rgba(42, 109, 246, 0.14));
}

/* Document scroll: the panel grows with content so the page scrollbar
   moves the sidebar and cards together. Nested overflow:auto on cards
   is reserved for the mobile drawer and modals. */
html:has(body.bd-profile-app) {
    overflow-x: hidden;
}

body.bd-profile-app {
    display: flex;
    flex-direction: column;
    margin: 0;
    min-height: 100vh;
    min-height: 100dvh;
    overflow-x: hidden;
}

body.bd-profile-app .site-header,
body.bd-profile-app header.site-header,
body.bd-profile-app #masthead,
body.bd-profile-app .site-footer,
body.bd-profile-app #colophon,
body.bd-profile-app footer.site-footer,
body.bd-profile-app .elementor-location-header,
body.bd-profile-app .elementor-location-footer,
body.bd-profile-app .entry-header,
body.bd-profile-app .page-header,
body.bd-profile-app .bd-theme-breadcrumbs,
body.bd-profile-app .bd-theme-mobile-drawer {
    display: none !important;
}

body.bd-profile-app.admin-bar {
    min-height: calc(100vh - var(--wp-admin--admin-bar--height, 32px));
    min-height: calc(100dvh - var(--wp-admin--admin-bar--height, 32px));
}

@media (max-width: 782px) {
    body.bd-profile-app.admin-bar {
        min-height: calc(100vh - var(--wp-admin--admin-bar--height, 46px));
        min-height: calc(100dvh - var(--wp-admin--admin-bar--height, 46px));
    }
}

body.bd-profile-app #page,
body.bd-profile-app .site,
body.bd-profile-app #content,
body.bd-profile-app .site-content,
body.bd-profile-app #primary,
body.bd-profile-app .content-area,
body.bd-profile-app .site-main,
body.bd-profile-app .inside-article,
body.bd-profile-app .entry-content,
body.bd-profile-app .bd-theme-content,
body.bd-profile-app .bd-theme-content__inner,
body.bd-profile-app .bd-theme-article {
    display: flex;
    flex-direction: column;
    flex: 1 0 auto;
    width: 100%;
    max-width: 100%;
    height: auto;
    margin: 0;
    padding: 0;
    overflow: visible;
    background: transparent;
    border: none;
    box-shadow: none;
    border-radius: 0;
}

.bd-profile-wrapper {
    --bd-glass-bg: linear-gradient(135deg, rgba(255, 255, 255, 0.68), rgba(255, 255, 255, 0.45));
    --bd-glass-border: rgba(255, 255, 255, 0.56);
    --bd-surface-border: rgba(122, 140, 186, 0.24);
    --bd-shadow-soft: 0 18px 44px rgba(22, 30, 58, 0.14);
    --bd-shadow-subtle: 0 10px 24px rgba(22, 30, 58, 0.1);
    --bd-text-primary: #19233f;
    --bd-text-secondary: #4e5c80;
    --bd-accent: #226b5d;
    --bd-sidebar-width: 292px;
    --bd-profile-chrome: 0px;
    direction: rtl;
    padding: 0;
    display: flex;
    flex-direction: column;
    justify-content: stretch;
    flex: 1 0 auto;
    min-width: 0;
    height: auto;
    width: 100%;
    max-width: 100%;
    overflow: visible;
    background:
        radial-gradient(circle at 12% 14%, rgba(130, 97, 255, 0.2), transparent 48%),
        radial-gradient(circle at 86% 8%, rgba(35, 184, 123, 0.2), transparent 42%),
        linear-gradient(160deg, var(--bd-bg-start, #f3f6ff) 0%, var(--bd-bg-end, #fdf2f8) 60%, #edf2ff 100%);
    font-size: clamp(13px, 1.3vw, 16px);
}

.bd-profile-wrapper[dir="ltr"] {
    direction: ltr;
}

.bd-profile-appbar {
    flex: 0 0 auto;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 12px;
    padding: 10px 16px 0;
}

.bd-profile-appbar .bd-lang-switcher {
    margin: 0;
}

.bd-profile-layout {
    display: grid;
    grid-template-columns: minmax(0, var(--bd-sidebar-width)) minmax(0, 1fr);
    grid-template-areas: "sidebar main";
    gap: 16px;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    align-items: start;
    flex: 1 0 auto;
    padding: 12px 16px 16px;
    overflow: visible;
}

.bd-profile-sidebar {
    grid-area: sidebar;
    width: 100%;
    max-width: 100%;
    flex-shrink: 0;
    position: sticky;
    top: 12px;
    align-self: start;
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding: 18px;
    border-radius: 22px;
    background: linear-gradient(165deg, rgba(255, 255, 255, 0.82), rgba(248, 251, 255, 0.66));
    border: 1px solid var(--bd-glass-border);
    box-shadow: var(--bd-shadow-soft);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    height: auto;
    min-width: 0;
    overflow: visible;
}

.bd-profile-main {
    grid-area: main;
    min-width: 0;
    height: auto;
    display: flex;
    flex-direction: column;
    overflow: visible;
}

.bd-profile-sidebar-user {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 12px;
    align-items: center;
    padding: 12px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.72);
    border: 1px solid rgba(223, 231, 246, 0.92);
    min-width: 0;
}

.bd-profile-sidebar-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    font-weight: 700;
    color: #17345f;
    background: linear-gradient(145deg, rgba(230, 242, 255, 0.95), rgba(235, 255, 248, 0.9));
    border: 2px solid rgba(255, 255, 255, 0.78);
    box-shadow: 0 8px 18px rgba(22, 30, 58, 0.12);
}

.bd-profile-sidebar-user-meta {
    display: grid;
    gap: 4px;
    min-width: 0;
}

.bd-profile-sidebar-user-meta strong {
    color: var(--bd-text-primary);
    font-size: 0.92rem;
    line-height: 1.45;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.bd-profile-sidebar-user-meta span {
    color: var(--bd-text-secondary);
    font-size: 0.74rem;
    line-height: 1.45;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    direction: ltr;
    unicode-bidi: plaintext;
}

.bd-profile-sidebar-user-meta .bd-account-kind-badge {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    max-width: 100%;
    padding: 2px 8px;
    border-radius: 999px;
    background: #ecfdf5;
    color: #047857;
    font-size: 0.68rem;
    font-weight: 700;
    line-height: 1.4;
    direction: rtl;
    unicode-bidi: isolate;
    white-space: nowrap;
}

.bd-profile-sidebar-close {
    display: none;
    width: 34px;
    height: 34px;
    border: none;
    border-radius: 999px;
    background: rgba(241, 245, 249, 0.95);
    color: #475569;
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
}

.bd-profile-sidebar-nav {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    width: 100%;
    min-width: 0;
}

.bd-profile-sidebar-item {
    border: 1px solid rgba(190, 203, 229, 0.55);
    background: rgba(255, 255, 255, 0.62);
    color: var(--bd-text-primary);
    border-radius: 14px;
    padding: 11px 12px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: flex-start;
    gap: 11px;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    align-self: stretch;
    text-align: start;
    white-space: normal;
    font-family: inherit;
    appearance: none;
    -webkit-appearance: none;
}

.bd-profile-sidebar-item-icon {
    width: 34px;
    height: 34px;
    border-radius: 11px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(241, 245, 249, 0.95);
    color: #2a5a87;
    flex: 0 0 34px;
    overflow: hidden;
}

.bd-profile-sidebar-item-icon svg {
    width: 18px;
    height: 18px;
    max-width: 18px;
    max-height: 18px;
    display: block;
    flex-shrink: 0;
}

.bd-profile-sidebar-item-copy {
    display: grid;
    gap: 2px;
    min-width: 0;
    flex: 1 1 auto;
    text-align: start;
}

.bd-profile-sidebar-item-label {
    font-size: 0.84rem;
    line-height: 1.35;
    overflow-wrap: anywhere;
}

.bd-profile-sidebar-item-hint {
    font-size: 0.72rem;
    font-weight: 500;
    color: var(--bd-text-secondary);
    line-height: 1.4;
    overflow-wrap: anywhere;
}

.bd-profile-sidebar-item:hover {
    border-color: rgba(34, 107, 93, 0.35);
    background: rgba(255, 255, 255, 0.88);
    transform: translateX(-2px);
}

.bd-profile-sidebar-item.is-active {
    background: linear-gradient(135deg, rgba(34, 107, 93, 0.14), rgba(47, 125, 137, 0.08));
    color: var(--bd-text-primary);
    border-color: rgba(34, 107, 93, 0.42);
    box-shadow: inset -3px 0 0 #226b5d;
}

.bd-profile-wrapper[dir="ltr"] .bd-profile-sidebar-item:hover {
    transform: translateX(2px);
}

.bd-profile-wrapper[dir="ltr"] .bd-profile-sidebar-item.is-active {
    box-shadow: inset 3px 0 0 #226b5d;
}

.bd-profile-sidebar-item.is-active .bd-profile-sidebar-item-icon {
    background: linear-gradient(135deg, #226b5d, #2f7d89);
    color: #fff;
}

.bd-profile-sidebar-item.is-active .bd-profile-sidebar-item-hint {
    color: #3f6f66;
}

.bd-profile-sidebar-user,
.bd-profile-sidebar-divider,
.bd-profile-sidebar-logout {
    flex-shrink: 0;
}

.bd-profile-sidebar,
.bd-profile-sidebar * {
    box-sizing: border-box;
}

.bd-profile-sidebar button,
.bd-profile-sidebar a {
    font-family: inherit;
    line-height: inherit;
}

.bd-profile-sidebar-divider {
    height: 1px;
    background: linear-gradient(to left, transparent, rgba(190, 203, 229, 0.85), transparent);
}

.bd-profile-sidebar-links {
    display: grid;
    gap: 8px;
    flex: 1 1 auto;
    min-height: 0;
    min-width: 0;
    align-content: start;
}

.bd-profile-sidebar-links-title {
    font-size: 0.72rem;
    font-weight: 700;
    color: #64748b;
    padding: 0 6px 2px;
}

.bd-profile-sidebar-link,
.bd-profile-sidebar-logout {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 14px;
    text-decoration: none;
    color: var(--bd-text-primary);
    font-size: 0.82rem;
    font-weight: 600;
    line-height: 1.35;
    border: 1px solid transparent;
    min-width: 0;
    transition: background-color 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.bd-profile-sidebar-link span:last-child,
.bd-profile-sidebar-logout span:last-child {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.bd-profile-sidebar-link:hover,
.bd-profile-sidebar-logout:hover {
    background: rgba(255, 255, 255, 0.82);
    border-color: rgba(190, 203, 229, 0.75);
    transform: translateY(-1px);
}

.bd-profile-sidebar-link.is-app {
    color: #1d4ed8;
}

.bd-profile-sidebar-link.is-guide {
    color: #0f5e50;
}

.bd-profile-sidebar-link.is-leitner {
    color: #5b21b6;
}

.bd-profile-sidebar-link.is-chatbot {
    color: #0f4e85;
}

.bd-profile-sidebar-link.is-chatroom {
    color: #a63a63;
}

.bd-profile-sidebar-logout {
    margin-top: auto;
    color: #ffffff;
    background: linear-gradient(135deg, #cc3a2e, #a92218);
    border-color: rgba(180, 35, 24, 0.44);
    justify-content: center;
}

.bd-profile-sidebar-logout:hover {
    background: linear-gradient(135deg, #bc3228, #931c14);
    border-color: rgba(143, 27, 18, 0.7);
    color: #fff;
}

.bd-profile-sidebar-backdrop {
    display: none;
}

.bd-profile-mobile-bar,
.bd-profile-mobile-nav {
    display: none;
}

.bd-profile-tab-icon {
    width: 18px;
    height: 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #2a5a87;
    flex-shrink: 0;
}

.bd-profile-tab-icon svg {
    width: 100%;
    height: 100%;
    display: block;
}

@media (min-width: 961px) {
    .bd-profile-sidebar-close {
        display: none !important;
    }

    .bd-profile-mobile-bar,
    .bd-profile-mobile-nav {
        display: none !important;
    }

    .bd-profile-card:not(:has([data-profile-home])) .bd-profile-header {
        display: flex !important;
    }

    .bd-profile-card:has([data-profile-home]) .bd-profile-header,
    .bd-profile-card:has([data-profile-home]) .bd-profile-mobile-nav {
        display: none !important;
    }
}

.bd-profile-card {
    width: 100%;
    background: var(--bd-glass-bg);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-radius: 24px;
    box-shadow: var(--bd-shadow-soft);
    padding: 18px;
    font-family: inherit;
    border: 1px solid var(--bd-glass-border);
    display: flex;
    flex-direction: column;
    gap: 12px;
    flex: 1 0 auto;
    min-width: 0;
    height: auto;
    overflow: visible;
}

.bd-profile-home {
    flex: 1 0 auto;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
    overflow: visible;
}

.bd-profile-home-hero {
    flex: 0 0 auto;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
    width: 100%;
    margin: 0;
    padding: 12px 14px;
    border: 1px solid rgba(223, 231, 246, 0.95);
    border-radius: 18px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.92), rgba(240, 248, 255, 0.78));
    box-shadow: var(--bd-shadow-subtle);
    color: inherit;
    font-family: inherit;
    text-align: inherit;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.bd-profile-home-hero:hover,
.bd-profile-home-hero:focus-visible {
    transform: translateY(-1px);
    border-color: rgba(34, 107, 93, 0.35);
    box-shadow: 0 14px 28px rgba(22, 30, 58, 0.12);
    outline: none;
}

.bd-profile-home-hero-avatar {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    font-weight: 800;
    color: #17345f;
    background: linear-gradient(145deg, rgba(230, 242, 255, 0.95), rgba(235, 255, 248, 0.9));
    border: 2px solid rgba(255, 255, 255, 0.86);
}

.bd-profile-home-hero-copy {
    display: grid;
    gap: 2px;
    min-width: 0;
}

.bd-profile-home-hero-copy strong {
    color: var(--bd-text-primary);
    font-size: 1rem;
    line-height: 1.4;
}

.bd-profile-home-hero-copy small {
    color: var(--bd-text-secondary);
    font-size: 0.75rem;
    line-height: 1.45;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    direction: ltr;
    unicode-bidi: plaintext;
}

.bd-profile-home-hero-go {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: #226b5d;
    font-size: 0.78rem;
    font-weight: 700;
}

.bd-profile-hub {
    flex: 0 0 auto;
    min-width: 0;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    grid-auto-rows: minmax(158px, auto);
    align-content: start;
    gap: 12px;
    overflow: visible;
}

@media (min-width: 1280px) {
    .bd-profile-hub {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

.bd-profile-home:not([data-home-view="hub"]) .bd-profile-hub,
.bd-profile-home:not([data-home-view="hub"]) .bd-profile-home-hero {
    display: none;
}

.bd-profile-home[data-home-view="hub"] .bd-profile-home-screens {
    display: none;
}

.bd-profile-hub-tile {
    position: relative;
    display: grid;
    grid-template-rows: auto auto 1fr auto;
    align-content: start;
    gap: 6px;
    min-height: 0;
    min-width: 0;
    width: 100%;
    margin: 0;
    padding: 16px;
    padding-inline-end: 36px;
    border: 1px solid rgba(255, 255, 255, 0.78);
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.78);
    box-shadow: var(--bd-shadow-subtle);
    color: inherit;
    font-family: inherit;
    text-align: right;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    overflow: hidden;
    isolation: isolate;
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.bd-profile-wrapper[dir="ltr"] .bd-profile-hub-tile {
    text-align: left;
}

.bd-profile-hub-tile:hover,
.bd-profile-hub-tile:focus-visible {
    transform: translateY(-3px);
    border-color: rgba(34, 107, 93, 0.28);
    box-shadow: 0 16px 32px rgba(22, 30, 58, 0.14);
    outline: none;
}

.bd-profile-hub-tile:active {
    transform: scale(0.985);
}

.bd-profile-hub-tile-icon {
    width: 42px;
    height: 42px;
    border-radius: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    background: linear-gradient(135deg, #226b5d, #2f7d89);
}

.bd-profile-hub-tile-icon svg {
    width: 22px;
    height: 22px;
    display: block;
}

.bd-profile-hub-tile.is-learning {
    background: linear-gradient(145deg, rgba(230, 245, 255, 0.96), rgba(255, 255, 255, 0.78));
}

.bd-profile-hub-tile.is-learning .bd-profile-hub-tile-icon {
    background: linear-gradient(135deg, #1d4e89, #2f7d89);
}

.bd-profile-hub-tile.is-focus {
    background: linear-gradient(145deg, rgba(247, 239, 255, 0.96), rgba(255, 255, 255, 0.78));
}

.bd-profile-hub-tile.is-focus .bd-profile-hub-tile-icon {
    background: linear-gradient(135deg, #6d28d9, #4f46e5);
}

.bd-profile-hub-tile.is-behavior {
    background: linear-gradient(145deg, rgba(235, 255, 245, 0.96), rgba(255, 255, 255, 0.78));
}

.bd-profile-hub-tile.is-behavior .bd-profile-hub-tile-icon {
    background: linear-gradient(135deg, #0f766e, #226b5d);
}

.bd-profile-hub-tile.is-coach {
    background: linear-gradient(145deg, rgba(236, 244, 255, 0.96), rgba(255, 255, 255, 0.78));
}

.bd-profile-hub-tile.is-coach .bd-profile-hub-tile-icon {
    background: linear-gradient(135deg, #2563eb, #1d4e89);
}

.bd-profile-hub-tile.is-path {
    background: linear-gradient(145deg, rgba(255, 247, 237, 0.96), rgba(255, 255, 255, 0.78));
}

.bd-profile-hub-tile.is-path .bd-profile-hub-tile-icon {
    background: linear-gradient(135deg, #c2410c, #ea580c);
}

.bd-profile-hub-tile.is-membership {
    background: linear-gradient(145deg, rgba(236, 253, 245, 0.96), rgba(255, 255, 255, 0.78));
}

.bd-profile-hub-tile.is-membership .bd-profile-hub-tile-icon {
    background: linear-gradient(135deg, #047857, #0f766e);
}

.bd-profile-hub-tile.is-account {
    background: linear-gradient(145deg, rgba(239, 246, 255, 0.96), rgba(255, 255, 255, 0.78));
}

.bd-profile-hub-tile.is-account .bd-profile-hub-tile-icon {
    background: linear-gradient(135deg, #1d4e89, #2563eb);
}

.bd-profile-hub-tile.is-settings {
    background: linear-gradient(145deg, rgba(241, 245, 249, 0.96), rgba(255, 255, 255, 0.78));
}

.bd-profile-hub-tile.is-settings .bd-profile-hub-tile-icon {
    background: linear-gradient(135deg, #334155, #475569);
}

.bd-profile-hub-tile.is-security {
    background: linear-gradient(145deg, rgba(255, 247, 237, 0.96), rgba(255, 255, 255, 0.78));
}

.bd-profile-hub-tile.is-security .bd-profile-hub-tile-icon {
    background: linear-gradient(135deg, #c2410c, #b45309);
}

.bd-profile-hub-tile.is-affiliate {
    background: linear-gradient(145deg, rgba(245, 243, 255, 0.96), rgba(255, 255, 255, 0.78));
}

.bd-profile-hub-tile.is-affiliate .bd-profile-hub-tile-icon {
    background: linear-gradient(135deg, #6d28d9, #7c3aed);
}

.bd-profile-hub-tile-kicker {
    color: var(--bd-text-secondary);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.01em;
}

.bd-profile-hub-tile-value {
    color: var(--bd-text-primary);
    font-size: clamp(0.95rem, 1.4vw, 1.12rem);
    line-height: 1.45;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.bd-profile-hub-tile-hint {
    color: #4b5f86;
    font-size: 0.75rem;
    line-height: 1.55;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.bd-profile-hub-tile-go {
    position: absolute;
    left: 12px;
    top: 14px;
    color: #64748b;
}

.bd-profile-wrapper[dir="ltr"] .bd-profile-hub-tile-go {
    left: auto;
    right: 12px;
}

.bd-profile-wrapper[dir="ltr"] .bd-profile-hub-tile-go svg,
.bd-profile-wrapper[dir="ltr"] .bd-profile-home-hero-go svg,
.bd-profile-wrapper[dir="ltr"] .bd-profile-home-back-icon svg {
    transform: scaleX(-1);
}

.bd-profile-home-screens {
    flex: 1 0 auto;
    display: flex;
    flex-direction: column;
    overflow: visible;
}

.bd-profile-home-screen[hidden] {
    display: none !important;
}

.bd-profile-home-screen:not([hidden]) {
    flex: 1 0 auto;
    display: flex;
    flex-direction: column;
    overflow: visible;
    animation: bdProfileScreenIn 0.22s ease;
}

@keyframes bdProfileScreenIn {
    from {
        opacity: 0;
        transform: translateY(8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.bd-profile-home-screen-head {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0 2px 10px;
}

.bd-profile-home-screen-head.is-panel {
    position: sticky;
    top: -2px;
    z-index: 3;
    margin: 0 0 8px;
    padding: 4px 2px 12px;
    background: linear-gradient(180deg, rgba(252, 253, 255, 0.98) 65%, rgba(252, 253, 255, 0.72));
}

.bd-profile-home-back {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin: 0;
    padding: 8px 12px;
    border: 1px solid rgba(190, 203, 229, 0.8);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.88);
    color: var(--bd-text-primary);
    font-family: inherit;
    font-size: 0.8rem;
    font-weight: 700;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
}

.bd-profile-home-back:hover,
.bd-profile-home-back:focus-visible {
    border-color: rgba(34, 107, 93, 0.4);
    outline: none;
}

.bd-profile-home-back-icon,
.bd-profile-home-back-icon svg {
    width: 18px;
    height: 18px;
    display: block;
}

.bd-profile-home-screen-title {
    margin: 0;
    color: var(--bd-text-primary);
    font-size: 1.05rem;
    line-height: 1.4;
}

.bd-profile-home-screen-body {
    flex: 1 0 auto;
    display: grid;
    align-content: start;
    gap: 12px;
    overflow: visible;
    padding-bottom: 4px;
}

.bd-profile-home-screen-body .bd-profile-adaptive-path {
    margin: 0;
}

.bd-profile-home-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.bd-profile-membership-snap {
    position: relative;
    display: grid;
    gap: 8px;
    padding: 22px 20px 18px;
    border-radius: 20px;
    background: linear-gradient(145deg, rgba(236, 253, 245, 0.96), rgba(255, 255, 255, 0.84));
    border: 1px solid rgba(167, 221, 198, 0.92);
    box-shadow: var(--bd-shadow-subtle);
}

.bd-profile-membership-snap.is-inactive {
    background: linear-gradient(145deg, rgba(255, 246, 246, 0.96), rgba(255, 255, 255, 0.84));
    border-color: rgba(245, 196, 205, 0.92);
}

.bd-profile-membership-snap span {
    color: var(--bd-text-secondary);
    font-size: 0.75rem;
    font-weight: 700;
}

.bd-profile-membership-snap strong {
    color: var(--bd-text-primary);
    font-size: 1.15rem;
    line-height: 1.5;
}

.bd-profile-membership-snap small {
    color: #4b5f86;
    line-height: 1.7;
}

.bd-profile-membership-snap .bd-account-row,
.bd-account-card .bd-account-row {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 8px;
}

.bd-profile-membership-snap .bd-account-row span,
.bd-account-card .bd-account-row span {
    flex: 0 1 auto;
}

.bd-profile-membership-snap .bd-account-row strong,
.bd-account-card .bd-account-row strong {
    flex: 0 0 auto;
    margin: 0;
    text-align: start;
}

.bd-profile-membership-snap-badge {
    position: absolute;
    top: 16px;
    left: 16px;
    padding: 4px 10px;
    border-radius: 999px;
    background: #dff3ed;
    color: #1b6b58;
    font-size: 0.72rem;
    font-style: normal;
    font-weight: 800;
}

.bd-profile-membership-snap.is-inactive .bd-profile-membership-snap-badge {
    background: #ffe9e9;
    color: #b13a3a;
}

.bd-profile-wrapper[dir="ltr"] .bd-profile-membership-snap-badge {
    left: auto;
    right: 16px;
}

.bd-profile-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
}

.bd-profile-header-content {
    flex: 1;
    display: grid;
    gap: 8px;
}

.bd-nav-icon {
    width: 17px;
    height: 17px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.bd-profile-nav-btn {
    text-decoration: none;
    background: rgba(255, 255, 255, 0.64);
    border: 1px solid rgba(255, 255, 255, 0.66);
    color: var(--bd-text-primary);
    padding: 8px 14px;
    border-radius: 999px;
    font-weight: 600;
    box-shadow: var(--bd-shadow-subtle);
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease, background-color 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    white-space: normal;
    word-break: break-word;
    font-size: clamp(0.72rem, 1vw, 0.84rem);
    line-height: 1.45;
    cursor: pointer;
}

.bd-profile-nav-btn:hover {
    transform: translateY(-2px);
    border-color: rgba(30, 126, 108, 0.45);
    box-shadow: 0 14px 28px rgba(22, 30, 58, 0.18);
}

.bd-profile-header h2 {
    margin: 0 0 6px;
    color: var(--bd-text-primary);
    font-size: clamp(1.2rem, 2vw, 1.56rem);
    line-height: 1.35;
    overflow-wrap: anywhere;
}

.bd-profile-header p {
    margin: 0;
    color: var(--bd-text-secondary);
    font-size: clamp(0.8rem, 1.25vw, 0.9rem);
    line-height: 1.5;
    overflow-wrap: anywhere;
}

.bd-profile-avatar {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    overflow: hidden;
    border: 2px solid rgba(255, 255, 255, 0.7);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 26px;
    font-weight: 700;
    color: #17345f;
    background: linear-gradient(145deg, rgba(230, 242, 255, 0.95), rgba(235, 255, 248, 0.9));
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.52), 0 14px 30px rgba(22, 30, 58, 0.14);
}

.bd-profile-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 180px), 1fr));
    gap: 12px;
}

.bd-profile-grid-item {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 12px;
    border-radius: 14px;
    border: 1px solid var(--bd-surface-border);
    background: rgba(255, 255, 255, 0.56);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    min-width: 0;
}

.bd-profile-grid-item > div {
    min-width: 0;
    overflow: hidden;
}

.bd-profile-grid-icon,
.bd-section-title-icon,
.bd-plan-group-icon,
.bd-plan-meta-icon {
    width: 18px;
    height: 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #2a5a87;
}

.bd-section-title-icon,
.bd-plan-group-icon {
    width: 20px;
    height: 20px;
    color: #23695c;
}

.bd-nav-icon svg,
.bd-profile-grid-icon svg,
.bd-section-title-icon svg,
.bd-plan-group-icon svg,
.bd-plan-meta-icon svg {
    width: 100%;
    height: 100%;
    display: block;
}

.bd-profile-grid span {
    display: block;
    color: var(--bd-text-secondary);
    font-size: 13px;
}

.bd-profile-grid strong {
    display: block;
    margin-top: 4px;
    font-size: clamp(0.84rem, 1.3vw, 0.96rem);
    color: var(--bd-text-primary);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.bd-profile-smart-strip {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.bd-profile-smart-card {
    padding: 16px;
    border-radius: 18px;
    border: 1px solid rgba(255,255,255,0.72);
    background: rgba(255,255,255,0.72);
    box-shadow: var(--bd-shadow-subtle);
    display: grid;
    gap: 6px;
}

.bd-profile-smart-card span,
.bd-profile-insight-label {
    font-size: 12px;
    color: var(--bd-text-secondary);
}

.bd-profile-smart-card strong,
.bd-profile-behavior-card strong {
    color: var(--bd-text-primary);
    font-size: clamp(0.95rem, 1.5vw, 1.08rem);
    line-height: 1.6;
}

.bd-profile-smart-card small,
.bd-profile-behavior-card small {
    color: #4b5f86;
    line-height: 1.8;
}

.bd-profile-smart-card.is-score {
    background: linear-gradient(135deg, rgba(230,245,255,0.92), rgba(255,255,255,0.72));
}

.bd-profile-smart-card.is-behavior {
    background: linear-gradient(135deg, rgba(235,255,245,0.92), rgba(255,255,255,0.72));
}

.bd-profile-smart-card.is-streak {
    background: linear-gradient(135deg, rgba(247,239,255,0.92), rgba(255,255,255,0.72));
}

.bd-profile-panels {
    flex: 1 0 auto;
    display: flex;
    flex-direction: column;
    overflow: visible;
}

.bd-profile-panel[hidden],
.bd-profile-panel:not(.is-active) {
    display: none !important;
    flex: 0 0 0 !important;
    height: 0 !important;
    min-height: 0 !important;
    overflow: hidden !important;
}

.bd-profile-panel.is-active {
    flex: 1 0 auto;
    display: flex;
    flex-direction: column;
    overflow: visible;
}

/* Legacy [bd_account_info] card is redundant with the dashboard membership tile
   and must not steal half the viewport under the hub. */
body.bd-profile-app .bd-account-card,
.bd-profile-wrapper ~ .bd-account-card,
.bd-profile-wrapper .bd-account-card,
.bd-profile-app .bd-account-card {
    display: none !important;
}

.bd-profile-panel.is-active:not([data-profile-panel="overview"]) {
    gap: 18px;
}

.bd-profile-insight-grid,
.bd-profile-behavior-grid {
    margin-top: 14px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 12px;
}

.bd-profile-insight-card,
.bd-profile-behavior-card {
    padding: 14px;
    border-radius: 16px;
    background: rgba(255,255,255,0.78);
    border: 1px solid rgba(223, 231, 246, 0.9);
    box-shadow: var(--bd-shadow-subtle);
    display: grid;
    gap: 8px;
}

.bd-profile-insight-card p {
    margin: 0;
    color: var(--bd-text-secondary);
    line-height: 1.9;
    font-size: 13px;
}

.bd-profile-chip-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.bd-profile-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    padding: 6px 11px;
    font-size: 12px;
    font-weight: 700;
}

.bd-profile-chip.is-positive {
    background: rgba(222, 247, 231, 0.95);
    color: #156f46;
}

.bd-profile-chip.is-warning {
    background: rgba(255, 242, 223, 0.96);
    color: #a35f10;
}

.bd-profile-insight-notes,
.bd-profile-recommendations {
    display: grid;
    gap: 10px;
    margin-top: 14px;
}

.bd-profile-adaptive-path {
    margin: 18px 0 8px;
    padding: 18px 18px 16px;
    border-radius: 18px;
    background: linear-gradient(145deg, rgba(236, 244, 255, 0.95), rgba(248, 251, 255, 0.92));
    border: 1px solid rgba(196, 214, 242, 0.9);
    box-shadow: var(--bd-shadow-subtle, 0 8px 24px rgba(36, 64, 110, 0.06));
}

.bd-profile-adaptive-path-head h3 {
    margin: 0 0 4px;
    font-size: 1.15rem;
    color: #1d3557;
}

.bd-profile-adaptive-path-sub {
    margin: 0 0 12px;
    color: #5a6f92;
    font-size: 13px;
    line-height: 1.7;
}

.bd-profile-adaptive-session {
    margin: 0 0 10px;
    padding: 8px 12px;
    border: 1px solid #d5dfee;
    border-radius: 12px;
    background: #ffffff;
    color: #1f4b82;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.7;
}

.bd-profile-adaptive-path-meta {
    margin: 0 0 10px;
    font-size: 12px;
    color: #3d5a80;
    font-weight: 600;
}

.bd-profile-adaptive-path-why {
    margin: 0 0 12px;
    padding: 10px 12px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.72);
    border: 1px solid rgba(210, 222, 240, 0.95);
    color: #42557d;
    font-size: 13px;
    line-height: 1.85;
}

.bd-profile-adaptive-path-cards {
    display: grid;
    gap: 10px;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

.bd-profile-adaptive-card {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    padding: 12px 14px;
    border-radius: 14px;
    text-decoration: none;
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid rgba(205, 218, 238, 0.95);
    color: inherit;
    transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.bd-profile-adaptive-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 22px rgba(40, 70, 120, 0.1);
}

.bd-profile-adaptive-card-pri {
    flex: 0 0 auto;
    width: 28px;
    height: 28px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #1d4e89;
    color: #fff;
    font-size: 12px;
    font-weight: 700;
}

.bd-profile-adaptive-card-body {
    display: grid;
    gap: 4px;
    min-width: 0;
}

.bd-profile-adaptive-card-body strong {
    color: #1d3557;
    font-size: 14px;
    line-height: 1.5;
}

.bd-profile-adaptive-card-body small {
    color: #6b7f9e;
    font-size: 11px;
    text-transform: lowercase;
}

.bd-profile-adaptive-path-loading,
.bd-profile-adaptive-path-empty {
    padding: 12px;
    color: #5a6f92;
    font-size: 13px;
}

.bd-profile-insight-note,
.bd-profile-recommendation-item {
    padding: 12px 14px;
    border-radius: 14px;
    background: rgba(245, 248, 255, 0.9);
    border: 1px solid rgba(220, 227, 244, 0.92);
    color: #42557d;
    line-height: 1.9;
    font-size: 13px;
}

.bd-profile-gamification {
    padding: 20px;
    border-radius: 18px;
    background: var(--bd-glass-bg);
    border: 1px solid var(--bd-surface-border);
    box-shadow: var(--bd-shadow-subtle);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.bd-profile-gamification-grid {
    margin-top: 14px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 12px;
}

.bd-profile-stat-card {
    background: rgba(255, 255, 255, 0.72);
    border: 1px solid rgba(255, 255, 255, 0.7);
    border-radius: 14px;
    padding: 12px;
    display: grid;
    gap: 4px;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.4);
}

.bd-profile-stat-card span {
    font-size: 12px;
    color: var(--bd-text-secondary);
}

.bd-profile-stat-card strong {
    font-size: clamp(1rem, 1.9vw, 1.1rem);
    color: var(--bd-text-primary);
    overflow-wrap: anywhere;
}

.bd-profile-stat-card small {
    font-size: 12px;
    color: var(--bd-text-secondary);
}

.bd-profile-streak-note {
    margin-top: 12px;
    font-size: 13px;
    color: #244f82;
    background: rgba(230, 242, 255, 0.82);
    border: 1px solid rgba(166, 201, 243, 0.62);
    border-radius: 12px;
    padding: 10px 12px;
}

.bd-profile-activity-log {
    margin-top: 14px;
    background: rgba(255, 255, 255, 0.68);
    border: 1px solid rgba(255, 255, 255, 0.68);
    border-radius: 14px;
    padding: 14px;
}

.bd-profile-activity-log h4 {
    margin: 0 0 10px;
    font-size: 14px;
    color: var(--bd-text-primary);
}

.bd-profile-activity-log ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 10px;
}

.bd-profile-activity-log li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: 12px;
    background: rgba(245, 249, 255, 0.7);
    border: 1px solid rgba(220, 229, 245, 0.7);
}

.bd-profile-activity-log li strong {
    display: block;
    color: var(--bd-text-primary);
    font-size: clamp(0.82rem, 1.2vw, 0.9rem);
    overflow-wrap: anywhere;
}

.bd-profile-activity-log li span {
    color: var(--bd-text-secondary);
    font-size: 12px;
}

.bd-profile-activity-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.bd-profile-activity-meta span {
    background: rgba(223, 245, 236, 0.85);
    color: #16604f;
    border-radius: 999px;
    padding: 4px 8px;
    font-size: 11px;
}

.bd-profile-section {
    margin-top: 2px;
    padding: 20px;
    border-radius: 18px;
    background: var(--bd-glass-bg);
    border: 1px solid var(--bd-surface-border);
    box-shadow: var(--bd-shadow-subtle);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.bd-profile-section h3,
.bd-profile-form h3,
.bd-profile-verify h3,
.bd-profile-passkeys h3 {
    margin: 0;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: clamp(1rem, 1.6vw, 1.14rem);
    color: var(--bd-text-primary);
    line-height: 1.4;
    overflow-wrap: anywhere;
}

.bd-profile-form {
    background: var(--bd-glass-bg);
    padding: 18px;
    border-radius: 18px;
    border: 1px solid var(--bd-surface-border);
    box-shadow: var(--bd-shadow-subtle);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.bd-profile-form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 14px;
    margin-bottom: 14px;
}

.bd-profile-form label {
    display: grid;
    gap: 6px;
    font-size: clamp(0.75rem, 1.1vw, 0.84rem);
    color: var(--bd-text-secondary);
}

.bd-profile-form input {
    border: 1px solid rgba(191, 205, 230, 0.7);
    border-radius: 12px;
    padding: 10px 12px;
    font-size: clamp(0.78rem, 1.2vw, 0.9rem);
    background: rgba(255, 255, 255, 0.82);
}

.bd-profile-alert {
    margin-top: 10px;
    font-size: 13px;
    color: #bf1650;
}

.bd-profile-alert.is-success {
    color: #157d65;
}

.bd-profile-alert.is-error {
    color: #bf1650;
}

.bd-profile-divider {
    margin: 18px 0;
    height: 1px;
    background: rgba(187, 199, 224, 0.65);
}

.bd-profile-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.bd-profile-secondary {
    background: rgba(255, 255, 255, 0.72);
    border: 1px solid rgba(188, 202, 227, 0.84);
    color: #2b3558;
}

.bd-profile-verify {
    background: var(--bd-glass-bg);
    border-radius: 18px;
    border: 1px solid var(--bd-surface-border);
    padding: 18px;
    box-shadow: var(--bd-shadow-subtle);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.bd-profile-passkeys {
    background: var(--bd-glass-bg);
    border-radius: 18px;
    border: 1px solid var(--bd-surface-border);
    padding: 18px;
    box-shadow: var(--bd-shadow-subtle);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.bd-profile-plans {
    margin-top: 4px;
    padding: 22px;
    border-radius: 20px;
    background: var(--bd-glass-bg);
    border: 1px solid var(--bd-surface-border);
    box-shadow: var(--bd-shadow-subtle);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.bd-profile-plans-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    flex-wrap: wrap;
}

.bd-profile-plans-header h3 {
    margin: 0;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--bd-text-primary);
}

.bd-profile-plans-header p {
    margin: 0;
    color: var(--bd-text-secondary);
    font-size: clamp(0.76rem, 1.15vw, 0.84rem);
    line-height: 1.55;
    overflow-wrap: anywhere;
}

.bd-profile-empty {
    margin-top: 14px;
    background: rgba(255, 247, 232, 0.82);
    border: 1px solid rgba(255, 205, 137, 0.85);
    color: #905100;
    padding: 12px 14px;
    border-radius: 12px;
    font-size: 13px;
}

.bd-profile-empty p {
    margin: 0 0 12px;
    line-height: 1.7;
}

.bd-profile-empty .bd-auth-btn {
    display: inline-block;
    width: auto;
    min-width: 160px;
}

.bd-plan-group {
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px dashed rgba(115, 134, 177, 0.35);
}

.bd-plan-group:first-of-type {
    margin-top: 16px;
    padding-top: 0;
    border-top: none;
}

.bd-plan-group h4 {
    margin: 0 0 12px;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-size: clamp(0.82rem, 1.2vw, 0.92rem);
    color: var(--bd-text-primary);
    letter-spacing: 0.3px;
    line-height: 1.45;
    overflow-wrap: anywhere;
}

.bd-plan-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 360px), 1fr));
    gap: 18px;
    align-items: stretch;
}

.bd-plan-grid:empty {
    display: none;
}

.bd-plan-card {
    position: relative;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.78);
    border-radius: 18px;
    border: 1px solid rgba(255, 255, 255, 0.76);
    padding: 18px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    box-shadow: var(--bd-shadow-subtle);
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}

.bd-plan-card::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    left: 0;
    height: 4px;
    background: linear-gradient(90deg, rgba(31, 143, 122, 0.9), rgba(70, 109, 196, 0.82));
    opacity: 0.6;
}

.bd-plan-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 24px 44px rgba(18, 32, 64, 0.2);
}

.bd-plan-card.is-active {
    border-color: rgba(31, 143, 122, 0.45);
    box-shadow: 0 20px 38px rgba(31, 143, 122, 0.2);
}

.bd-plan-card.is-expiring {
    border-color: rgba(243, 156, 18, 0.45);
    box-shadow: 0 20px 38px rgba(243, 156, 18, 0.18);
}

.bd-plan-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
}

.bd-plan-badge {
    padding: 5px 12px;
    border-radius: 999px;
    background: linear-gradient(135deg, #1f8f7a, #146858);
    color: #fff;
    font-size: 11px;
    font-weight: 600;
}

.bd-plan-status {
    padding: 5px 12px;
    border-radius: 999px;
    background: rgba(223, 245, 236, 0.86);
    color: #1b6b58;
    font-size: 11px;
    font-weight: 600;
}

.bd-plan-status.is-expiring {
    background: rgba(255, 241, 219, 0.92);
    color: #a45b00;
}

.bd-plan-status.is-expired {
    background: rgba(255, 226, 226, 0.9);
    color: #a22b2b;
}

.bd-plan-card h5 {
    margin: 0;
    font-size: clamp(1rem, 1.6vw, 1.18rem);
    font-weight: 800;
    color: var(--bd-text-primary);
    line-height: 1.4;
    overflow-wrap: anywhere;
}

.bd-plan-card h5,
.bd-plan-card p {
    text-align: right;
}

.bd-plan-card p {
    margin: 0;
    color: var(--bd-text-secondary);
    font-size: clamp(0.76rem, 1.15vw, 0.84rem);
    line-height: 1.6;
    overflow-wrap: anywhere;
}

.bd-plan-heading {
    display: grid;
    gap: 6px;
}

.bd-plan-features {
    margin: 0;
    padding: 0;
    list-style: none;
    display: grid;
    gap: 8px;
}

.bd-plan-features li {
    margin: 0;
    color: var(--bd-text-secondary);
    font-size: 13px;
    line-height: 1.65;
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.bd-plan-feature-icon {
    flex: 0 0 auto;
    width: 22px;
    height: 22px;
    margin-top: 1px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(31, 143, 122, 0.12);
    color: #157a68;
}

.bd-plan-feature-icon svg {
    display: block;
}

.bd-plan-body {
    display: grid;
    gap: 14px;
    flex: 1;
}

.bd-plan-footer {
    display: grid;
    gap: 10px;
    margin-top: auto;
}

.bd-plan-commerce {
    display: grid;
    gap: 12px;
    margin-top: 2px;
    padding: 16px 16px 14px;
    border-radius: 16px;
    background: linear-gradient(180deg, rgba(248, 251, 255, 0.96) 0%, rgba(241, 247, 255, 0.88) 100%);
    border: 1px solid rgba(220, 231, 248, 0.95);
}

.bd-plan-commerce.is-campaign {
    background: linear-gradient(180deg, rgba(244, 251, 247, 0.98) 0%, rgba(239, 248, 244, 0.9) 100%);
    border-color: rgba(31, 143, 122, 0.22);
}

.bd-plan-commerce-main {
    display: grid;
    gap: 10px;
}

.bd-plan-commerce-price {
    min-width: 0;
}

.bd-plan-commerce-amount {
    display: block;
    font-size: clamp(1.15rem, 1.9vw, 1.42rem);
    font-weight: 800;
    color: var(--bd-text-primary);
    letter-spacing: -0.02em;
    font-feature-settings: "tnum";
}

.bd-plan-commerce .bd-campaign-price {
    width: 100%;
    justify-items: start;
}

.bd-profile-wrapper[dir="ltr"] .bd-plan-card h5,
.bd-profile-wrapper[dir="ltr"] .bd-plan-card p {
    text-align: left;
}

.bd-plan-commerce .bd-campaign-price__new strong {
    font-size: clamp(1.12rem, 1.8vw, 1.36rem);
}

.bd-plan-commerce-facts {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.bd-plan-fact {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 30px;
    padding: 4px 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.82);
    border: 1px solid rgba(226, 234, 248, 0.95);
    color: #466184;
    font-size: 12px;
    font-weight: 600;
    font-feature-settings: "tnum";
}

.bd-plan-fact.is-mode {
    color: #157a68;
    background: rgba(31, 143, 122, 0.08);
    border-color: rgba(31, 143, 122, 0.18);
}

.bd-plan-validity {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

.bd-plan-chip {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 3px 10px;
    border-radius: 999px;
    background: rgba(31, 143, 122, 0.1);
    color: #146858;
    font-size: 12px;
    font-weight: 700;
    font-feature-settings: "tnum";
}

.bd-plan-validity.is-urgent .bd-plan-chip {
    background: rgba(243, 156, 18, 0.14);
    color: #a45b00;
}

.bd-plan-validity.is-expired .bd-plan-chip,
.bd-plan-validity-msg {
    color: #466184;
    font-size: 12.5px;
    line-height: 1.7;
}

.bd-plan-validity.is-expired .bd-plan-validity-msg {
    color: #a22b2b;
}

.bd-plan-validity.is-urgent .bd-plan-validity-msg {
    color: #a45b00;
}

.bd-plan-validity-note {
    flex: 1 1 100%;
    color: #64748b;
    font-size: 11.5px;
    line-height: 1.7;
}

.bd-plan-card .bd-payment-plan__teaser {
    margin-top: 0;
}

.bd-plan-meta span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: clamp(0.71rem, 1.05vw, 0.78rem);
    color: var(--bd-text-secondary);
}

.bd-plan-meta strong {
    display: block;
    margin-top: 4px;
    font-size: clamp(0.74rem, 1.12vw, 0.82rem);
    color: var(--bd-text-primary);
    overflow-wrap: anywhere;
}

.bd-plan-cta {
    margin-top: 0;
    display: grid;
    gap: 10px;
}

.bd-plan-price {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0;
    font-size: clamp(0.76rem, 1.1vw, 0.84rem);
    color: var(--bd-text-primary);
}

.bd-plan-price strong {
    white-space: nowrap;
}

.bd-plan-price span,
.bd-plan-price strong {
    font-feature-settings: "tnum";
}

.bd-plan-price span {
    color: var(--bd-text-secondary);
}

.bd-plan-coupon {
    display: grid;
    gap: 6px;
    margin-bottom: 10px;
}

.bd-plan-coupon-input::placeholder {
    color: #98a1b3;
}

.bd-plan-coupon-input {
    border: 1px solid rgba(191, 205, 230, 0.84);
    border-radius: 12px;
    padding: 10px 12px;
    font-size: clamp(0.74rem, 1.08vw, 0.82rem);
    background: rgba(255, 255, 255, 0.9);
}

.bd-plan-coupon-input:focus {
    outline: none;
    border-color: rgba(31, 143, 122, 0.7);
    box-shadow: 0 0 0 3px rgba(31, 143, 122, 0.18);
}

.bd-plan-discount {
    font-size: clamp(0.7rem, 1.02vw, 0.76rem);
    color: var(--bd-text-secondary);
    min-height: 18px;
    overflow-wrap: anywhere;
}

.bd-plan-discount.is-error {
    color: #a22b2b;
}

.bd-plan-discount.is-success {
    color: #1b6b58;
}

.bd-plan-remaining {
    font-size: clamp(0.7rem, 1.02vw, 0.76rem);
    color: var(--bd-text-secondary);
    padding: 10px 12px;
    border-radius: 12px;
    background: rgba(244, 248, 255, 0.85);
    line-height: 1.6;
    border: 1px solid rgba(225, 234, 248, 0.8);
    overflow-wrap: anywhere;
}

.bd-plan-remaining.is-expiring {
    background: rgba(255, 247, 232, 0.86);
    color: #a45b00;
}

.bd-plan-remaining.is-expired {
    background: rgba(255, 226, 226, 0.86);
    color: #a22b2b;
}

.bd-plan-note {
    font-size: clamp(0.7rem, 1.02vw, 0.76rem);
    color: var(--bd-text-secondary);
    background: rgba(243, 244, 249, 0.75);
    border-radius: 12px;
    padding: 10px 12px;
    line-height: 1.8;
    overflow-wrap: anywhere;
}

.bd-plan-actions {
    display: grid;
    gap: 10px;
    margin-top: auto;
}

.bd-plan-intro-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  text-decoration: none;
}

.bd-plan-intro-link.bd-auth-btn.bd-profile-secondary,
.bd-plan-actions .bd-plan-intro-link {
  color: #1d57ca !important;
  background: linear-gradient(
    180deg,
    rgba(42, 109, 246, 0.12) 0%,
    rgba(42, 109, 246, 0.05) 100%
  ) !important;
  border: 1.5px solid rgba(42, 109, 246, 0.28) !important;
  box-shadow: 0 10px 24px rgba(42, 109, 246, 0.12) !important;
  min-height: 50px;
  font-weight: 800 !important;
}

.bd-plan-intro-link.bd-auth-btn.bd-profile-secondary:hover,
.bd-plan-actions .bd-plan-intro-link:hover {
  transform: translateY(-2px);
  border-color: rgba(42, 109, 246, 0.42) !important;
  box-shadow: 0 14px 28px rgba(42, 109, 246, 0.16) !important;
  filter: none;
}

.bd-plan-intro-link .bd-course-intro-link__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 999px;
  background: linear-gradient(135deg, #2a6df6, #1d57ca);
  color: #ffffff;
  font-size: 13px;
  font-weight: 800;
  line-height: 1;
  box-shadow: 0 6px 14px rgba(42, 109, 246, 0.28);
  flex-shrink: 0;
}

.bd-plan-intro-link .bd-course-intro-link__icon svg {
  display: block;
}

.bd-plan-intro-link::after {
  display: none !important;
}

@media (min-width: 961px) {
    .bd-plan-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 22px;
        align-items: stretch;
    }

    .bd-plan-card {
        min-height: 100%;
        padding: 22px 22px 18px;
        border-radius: 22px;
        gap: 16px;
        background: #ffffff;
        border: 1px solid rgba(226, 234, 248, 0.98);
        box-shadow: 0 16px 36px rgba(18, 32, 64, 0.08);
    }

    .bd-plan-card:hover {
        transform: translateY(-3px);
        box-shadow: 0 22px 44px rgba(18, 32, 64, 0.12);
    }

    .bd-plan-body {
        gap: 16px;
    }

    .bd-plan-heading h5 {
        font-size: 1.18rem;
    }

    .bd-plan-features {
        gap: 9px;
    }

    .bd-plan-commerce {
        margin-top: auto;
        padding: 18px;
    }

    .bd-plan-commerce-main {
        grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
        align-items: end;
        gap: 14px;
    }

    .bd-plan-actions {
        display: grid;
        grid-template-columns: 1fr;
        gap: 10px;
        padding-top: 4px;
    }

    .bd-plan-actions .bd-plan-intro-link {
        min-height: 48px;
        order: 2;
    }

    .bd-plan-actions .bd-plan-cta,
    .bd-plan-actions .bd-payment-plan {
        order: 1;
    }

    .bd-plan-card.is-active .bd-plan-intro-link.bd-auth-btn.bd-profile-secondary,
    .bd-plan-card.is-active .bd-plan-actions .bd-plan-intro-link {
        color: #ffffff !important;
        background: linear-gradient(135deg, #2a6df6, #1d57ca) !important;
        border-color: transparent !important;
        box-shadow: 0 14px 28px rgba(42, 109, 246, 0.28) !important;
        order: 1;
    }

    .bd-plan-card.is-active .bd-plan-intro-link .bd-course-intro-link__icon {
        background: rgba(255, 255, 255, 0.18);
        color: #ffffff;
        box-shadow: none;
    }
}

.bd-plan-membership-note,
.bd-plan-compare-note,
.bd-plan-warning {
    min-height: 0;
}

.bd-plan-membership-note {
    padding: 12px 14px;
    border-radius: 14px;
    background: rgba(244, 248, 255, 0.9);
    border: 1px solid rgba(220, 231, 248, 0.9);
    color: #466184;
    line-height: 1.9;
}

.bd-plan-card {
    align-items: stretch;
}

.bd-plan-warning {
    margin-top: 10px;
    font-size: clamp(0.7rem, 1.02vw, 0.76rem);
    color: #9f5b00;
    background: rgba(255, 243, 221, 0.9);
    border-radius: 12px;
    padding: 10px 12px;
    border: 1px solid rgba(255, 225, 181, 0.85);
    overflow-wrap: anywhere;
}

.bd-profile-passkey-form {
    display: grid;
    gap: 12px;
    margin: 12px 0;
}

.bd-profile-passkey-form label {
    display: grid;
    gap: 6px;
    font-size: 13px;
    color: var(--bd-text-secondary);
}

.bd-profile-passkey-form input {
    border: 1px solid rgba(191, 205, 230, 0.84);
    border-radius: 12px;
    padding: 10px 12px;
    font-size: 14px;
    background: rgba(255, 255, 255, 0.9);
}

.bd-profile-passkey-list ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    gap: 10px;
}

.bd-profile-passkey-list li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    background: rgba(248, 250, 255, 0.78);
    border-radius: 12px;
    padding: 12px 14px;
    border: 1px solid rgba(218, 228, 246, 0.82);
}

.bd-profile-passkey-list li span {
    display: block;
    color: var(--bd-text-secondary);
    font-size: clamp(0.7rem, 1.02vw, 0.76rem);
    margin-top: 4px;
    overflow-wrap: anywhere;
}

.bd-profile-record-grid {
    margin-top: 14px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 14px;
}

.bd-profile-record-card {
    background: rgba(255, 255, 255, 0.76);
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.76);
    box-shadow: var(--bd-shadow-subtle);
    padding: 14px;
    display: grid;
    gap: 8px;
}

.bd-profile-record-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.bd-profile-record-top h4 {
    margin: 0;
    font-size: clamp(0.84rem, 1.3vw, 0.94rem);
    color: var(--bd-text-primary);
    line-height: 1.45;
    overflow-wrap: anywhere;
}

.bd-profile-record-card p {
    margin: 0;
    color: var(--bd-text-secondary);
    font-size: clamp(0.74rem, 1.08vw, 0.82rem);
    overflow-wrap: anywhere;
}

.bd-profile-record-meta {
    display: grid;
    gap: 6px;
}

.bd-profile-record-meta span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #3f527c;
    font-size: clamp(0.7rem, 1.02vw, 0.76rem);
    overflow-wrap: anywhere;
}

.bd-profile-book-license-note {
    margin: 14px 0 0;
    font-size: clamp(0.78rem, 1.05vw, 0.84rem);
    color: #3f527c;
    line-height: 1.7;
}

.bd-profile-book-license-note a {
    color: #1f8f7a;
    text-decoration: none;
    font-weight: 600;
}

.bd-profile-book-license-note a:hover,
.bd-profile-book-license-note a:focus-visible {
    text-decoration: underline;
}

.bd-gift-discount-section .bd-profile-verify-hint {
    margin: 0 0 16px;
}

.bd-gift-discount-card.is-shareable {
    border-color: #b8e6dc;
    background: linear-gradient(180deg, #f7fffc 0%, #ffffff 100%);
}

.bd-gift-discount-code-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin: 12px 0 10px;
}

.bd-gift-discount-code {
    display: inline-flex;
    align-items: center;
    min-height: 40px;
    padding: 8px 12px;
    border-radius: 10px;
    border: 1px dashed #7ec7b6;
    background: #ffffff;
    color: #145a4d;
    font-size: clamp(0.82rem, 1.1vw, 0.92rem);
    font-weight: 700;
    letter-spacing: 0.04em;
}

.bd-gift-discount-copy {
    min-height: 40px;
    padding-inline: 14px;
}
.bd-profile-book-license-note a:focus {
    color: #187a68;
    text-decoration: underline;
}

.bd-profile-verify-grid {
    display: grid;
    gap: 16px;
    margin-top: 12px;
}

.bd-profile-verify-hint {
    margin: 8px 0 0;
    color: var(--bd-text-secondary);
    font-size: clamp(0.74rem, 1.08vw, 0.82rem);
    line-height: 1.55;
    overflow-wrap: anywhere;
}

.bd-profile-verify-requirement {
    margin: 10px 0 0;
    padding: 10px 12px;
    border-radius: 12px;
    background: rgba(255, 243, 221, 0.9);
    color: #9f5b00;
    border: 1px solid rgba(255, 225, 181, 0.9);
    font-size: clamp(0.7rem, 1.02vw, 0.76rem);
    line-height: 1.55;
    overflow-wrap: anywhere;
}

.bd-profile-verify-requirement.is-ready {
    background: rgba(223, 245, 236, 0.9);
    color: #157d65;
    border-color: rgba(184, 235, 218, 0.9);
}

.bd-profile-verify-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    font-size: 13px;
    color: var(--bd-text-secondary);
}

.bd-profile-status {
    padding: 4px 10px;
    border-radius: 12px;
    font-size: clamp(0.7rem, 1.02vw, 0.76rem);
    background: rgba(241, 243, 249, 0.8);
}

.bd-profile-status.is-success {
    background: rgba(223, 245, 236, 0.85);
    color: #157d65;
}

.bd-profile-status.is-pending {
    background: rgba(255, 240, 240, 0.9);
    color: #c0392b;
}

.bd-profile-verify-row {
    display: grid;
    grid-template-columns: minmax(140px, 1fr) minmax(160px, 1fr) minmax(140px, 1fr);
    gap: 12px;
    align-items: center;
}

.bd-profile-verify-row .bd-auth-btn {
    justify-self: stretch;
}

.bd-profile-verify-row input {
    border: 1px solid rgba(191, 205, 230, 0.84);
    border-radius: 12px;
    padding: 10px 12px;
    font-size: clamp(0.76rem, 1.12vw, 0.84rem);
    background: rgba(255, 255, 255, 0.9);
}

.bd-profile-verify-done {
    margin: 0;
    font-size: clamp(0.7rem, 1.02vw, 0.76rem);
    color: #157d65;
    background: rgba(223, 245, 236, 0.88);
    border: 1px solid rgba(184, 235, 218, 0.92);
    border-radius: 12px;
    padding: 10px 12px;
    overflow-wrap: anywhere;
}

body.bd-modal-open {
    overflow: hidden;
}

.bd-verify-modal {
    position: fixed;
    inset: 0;
    z-index: 999999;
    display: none;
    align-items: flex-start;
    justify-content: center;
    padding: 18px 10px;
    overflow-y: auto;
}

.bd-verify-modal.is-open {
    display: flex;
}

.bd-verify-modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(17, 24, 39, 0.55);
    opacity: 0;
    transition: opacity 0.24s ease;
}

.bd-verify-modal-card {
    position: relative;
    width: min(100%, 520px);
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-radius: 16px;
    border: 1px solid rgba(226, 234, 247, 0.85);
    box-shadow: 0 20px 45px rgba(15, 23, 42, 0.25);
    padding: 20px;
    z-index: 1;
    max-height: calc(100vh - 36px);
    overflow: auto;
    opacity: 0;
    transform: translateY(-8px) scale(0.985);
    transition: transform 0.28s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.28s ease;
}

.bd-verify-modal.is-open .bd-verify-modal-backdrop {
    opacity: 1;
}

.bd-verify-modal.is-open .bd-verify-modal-card {
    opacity: 1;
    transform: translateY(0) scale(1);
    animation: bdVerifyModalEnter 0.28s cubic-bezier(0.22, 1, 0.36, 1);
}

.bd-verify-modal-card h3 {
    margin: 0 0 8px;
    font-size: clamp(0.95rem, 1.55vw, 1.08rem);
    line-height: 1.45;
    overflow-wrap: anywhere;
}

.bd-verify-modal-card p {
    margin: 0;
    color: var(--bd-text-secondary);
    font-size: clamp(0.74rem, 1.08vw, 0.82rem);
    line-height: 1.55;
    overflow-wrap: anywhere;
}

.bd-verify-modal-list {
    margin: 14px 0 0;
    padding-right: 18px;
    color: var(--bd-text-primary);
    font-size: clamp(0.74rem, 1.08vw, 0.82rem);
    line-height: 1.55;
    overflow-wrap: anywhere;
}

.bd-verify-modal-actions {
    margin-top: 16px;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

@media (max-width: 960px) {
    .bd-profile-wrapper {
        padding: 0;
    }

    .bd-profile-appbar {
        padding: 8px 10px 0;
    }

    .bd-profile-hub {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        grid-template-rows: none;
        grid-auto-rows: minmax(140px, auto);
        gap: 8px;
    }

    .bd-profile-hub-tile {
        padding: 12px;
        padding-inline-end: 32px;
        border-radius: 16px;
    }

    .bd-profile-hub-tile-icon {
        width: 36px;
        height: 36px;
        border-radius: 12px;
    }

    .bd-profile-home-hero {
        padding: 10px 12px;
        border-radius: 16px;
    }

    .bd-profile-home-hero-go span:first-child {
        display: none;
    }

    .bd-profile-layout {
        display: flex;
        flex-direction: column;
        gap: 10px;
        padding: 8px 10px 12px;
        overflow: visible;
    }

    .bd-profile-sidebar {
        position: fixed;
        top: 0;
        right: 0;
        left: auto;
        width: min(320px, 88vw);
        height: 100vh; /* fallback — see the note on .bd-profile-sidebar */
        height: 100dvh;
        max-height: none;
        z-index: 1300;
        border-radius: 0;
        transform: translateX(100%);
        transition: transform 0.28s cubic-bezier(0.22, 1, 0.36, 1);
        box-shadow: -12px 0 40px rgba(15, 23, 42, 0.18);
        overflow-x: hidden;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }

    .bd-profile-layout.is-sidebar-open .bd-profile-sidebar {
        transform: translateX(0);
    }

    .bd-profile-sidebar-nav,
    .bd-profile-sidebar-item {
        width: 100%;
        max-width: 100%;
    }

    .bd-profile-sidebar-close {
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    .bd-profile-sidebar-backdrop {
        display: block;
        position: fixed;
        inset: 0;
        z-index: 1290;
        background: rgba(15, 23, 42, 0.45);
        opacity: 0;
        pointer-events: none;
        transition: opacity 0.24s ease;
    }

    .bd-profile-layout.is-sidebar-open .bd-profile-sidebar-backdrop {
        opacity: 1;
        pointer-events: auto;
    }

    body.bd-profile-sidebar-open {
        overflow: hidden;
    }

    .bd-profile-mobile-bar {
        display: flex;
        align-items: center;
        gap: 12px;
        padding: 12px 14px;
        border-radius: 18px;
        background: rgba(255, 255, 255, 0.92);
        border: 1px solid rgba(223, 231, 246, 0.92);
        box-shadow: var(--bd-shadow-subtle);
        flex-shrink: 0;
        position: sticky;
        top: 8px;
        z-index: 8;
    }

    .bd-profile-menu-toggle {
        width: 42px;
        height: 42px;
        border: 1px solid rgba(190, 203, 229, 0.85);
        border-radius: 12px;
        background: rgba(255, 255, 255, 0.92);
        display: inline-flex;
        align-items: center;
        justify-content: center;
        cursor: pointer;
        padding: 0;
        flex-shrink: 0;
    }

    .bd-profile-menu-toggle span {
        display: block;
        width: 16px;
        height: 1.7px;
        background: #334155;
        position: relative;
    }

    .bd-profile-menu-toggle span::before,
    .bd-profile-menu-toggle span::after {
        content: "";
        position: absolute;
        left: 0;
        right: 0;
        height: 1.7px;
        background: #334155;
    }

    .bd-profile-menu-toggle span::before {
        top: -5px;
    }

    .bd-profile-menu-toggle span::after {
        top: 5px;
    }

    .bd-profile-mobile-title {
        flex: 1;
        min-width: 0;
        display: grid;
        gap: 2px;
    }

    .bd-profile-mobile-title strong {
        color: var(--bd-text-primary);
        font-size: 0.95rem;
        line-height: 1.35;
    }

    .bd-profile-mobile-title span {
        color: var(--bd-text-secondary);
        font-size: 0.72rem;
        line-height: 1.35;
    }

    .bd-profile-mobile-avatar {
        width: 40px;
        height: 40px;
        border-radius: 50%;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        font-size: 16px;
        font-weight: 700;
        color: #17345f;
        background: linear-gradient(145deg, rgba(230, 242, 255, 0.95), rgba(235, 255, 248, 0.9));
        border: 2px solid rgba(255, 255, 255, 0.78);
        flex-shrink: 0;
    }

    .bd-profile-mobile-nav {
        display: none;
    }

    .bd-profile-mobile-nav::-webkit-scrollbar {
        display: none;
    }

    .bd-profile-mobile-tab {
        flex: 0 0 auto;
        display: inline-flex;
        align-items: center;
        gap: 7px;
        padding: 9px 12px;
        border-radius: 999px;
        border: 1px solid rgba(190, 203, 229, 0.85);
        background: rgba(255, 255, 255, 0.82);
        color: var(--bd-text-primary);
        font-size: 0.76rem;
        font-weight: 700;
        white-space: nowrap;
        cursor: pointer;
        transition: all 0.2s ease;
    }

    .bd-profile-mobile-tab .bd-profile-tab-icon {
        width: 26px;
        height: 26px;
        border-radius: 8px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        background: rgba(241, 245, 249, 0.95);
        color: #2a5a87;
        flex-shrink: 0;
    }

    .bd-profile-mobile-tab .bd-profile-tab-icon svg {
        width: 14px;
        height: 14px;
    }

    .bd-profile-mobile-tab.is-active {
        background: linear-gradient(135deg, #226b5d, #2f7d89);
        color: #fff;
        border-color: transparent;
        box-shadow: 0 10px 22px rgba(34, 107, 93, 0.22);
    }

    .bd-profile-mobile-tab.is-active .bd-profile-tab-icon {
        background: rgba(255, 255, 255, 0.18);
        color: #fff;
    }

    .bd-profile-header {
        display: none;
    }
}

@media (max-height: 760px) {
    .bd-profile-hub-tile-hint {
        display: none;
    }

    .bd-profile-home-hero-copy small {
        display: none;
    }

    .bd-profile-hub-tile {
        padding: 12px;
        padding-inline-end: 32px;
        gap: 4px;
    }

    .bd-profile-card {
        padding: 12px;
        gap: 8px;
    }
}

@media (max-width: 720px) {
    .bd-profile-verify-row {
        grid-template-columns: 1fr;
    }

    .bd-plan-meta {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .bd-profile-record-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    .bd-profile-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .bd-plan-meta {
        grid-template-columns: 1fr;
    }

    .bd-profile-activity-log li {
        flex-direction: column;
        align-items: flex-start;
    }

    .bd-profile-card {
        padding: 18px;
        border-radius: 20px;
        gap: 16px;
    }

    .bd-profile-section,
    .bd-profile-plans,
    .bd-profile-gamification,
    .bd-profile-form,
    .bd-profile-verify,
    .bd-profile-passkeys {
        padding: 15px;
    }
}

@media (max-width: 480px) {
    .bd-profile-wrapper {
        padding: 0;
        font-size: 13px;
    }

    .bd-profile-card {
        padding: 12px;
        border-radius: 16px;
        gap: 12px;
    }

    .bd-profile-header,
    .bd-profile-header-top {
        gap: 8px;
    }

    .bd-profile-mobile-bar {
        padding: 10px 12px;
        gap: 10px;
    }

    .bd-profile-mobile-tab {
        padding: 8px 10px;
        font-size: 0.72rem;
    }

    .bd-profile-avatar {
        width: 56px;
        height: 56px;
        font-size: 21px;
    }

    .bd-profile-grid,
    .bd-profile-smart-strip,
    .bd-profile-gamification-grid,
    .bd-plan-grid,
    .bd-profile-record-grid,
    .bd-profile-insight-grid,
    .bd-profile-behavior-grid {
        gap: 8px;
    }

    .bd-profile-grid-item,
    .bd-profile-stat-card,
    .bd-plan-card,
    .bd-profile-record-card,
    .bd-profile-activity-log,
    .bd-plan-meta {
        padding: 10px;
    }

    .bd-profile-section,
    .bd-profile-plans,
    .bd-profile-gamification,
    .bd-profile-form,
    .bd-profile-verify,
    .bd-profile-passkeys {
        padding: 12px;
        border-radius: 14px;
    }

    .bd-profile-nav {
        gap: 6px;
    }

    .bd-profile-nav-btn,
    .bd-auth-btn,
    .bd-profile-secondary,
    .bd-profile-verify-row .bd-auth-btn,
    .bd-verify-modal-actions .bd-auth-btn,
    .bd-profile-sidebar-link,
    .bd-profile-sidebar-logout {
        width: 100%;
        justify-content: center;
        min-height: 40px;
        padding: 9px 10px;
        font-size: 12px;
        line-height: 1.35;
    }

    .bd-profile-actions,
    .bd-verify-modal-actions,
    .bd-auth-otp-row,
    .bd-profile-verify-row {
        gap: 8px;
    }

    .bd-plan-price,
    .bd-plan-meta,
    .bd-profile-record-top {
        gap: 6px;
    }

    .bd-plan-meta {
        grid-template-columns: 1fr;
    }

    .bd-verify-modal-card {
        width: 100%;
        max-height: calc(100vh - 16px);
        padding: 12px;
        border-radius: 14px;
    }

    .bd-verify-modal.is-open .bd-verify-modal-card {
        animation-duration: 0.24s;
    }

    .bd-verify-modal {
        padding: 8px;
    }

    .bd-verify-modal-actions {
        display: grid;
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .bd-verify-modal-actions .bd-auth-btn {
        width: 100%;
        min-height: 38px;
        padding: 8px 10px;
    }

    .bd-verify-modal-list {
        margin-top: 8px;
        padding-right: 12px;
    }
}

@media (max-width: 360px) {
    .bd-profile-wrapper {
        padding: 0;
        font-size: 12px;
    }

    .bd-profile-card {
        padding: 10px;
        gap: 10px;
        border-radius: 14px;
    }

    .bd-profile-header h2 {
        font-size: 1rem;
    }

    .bd-profile-header p,
    .bd-profile-nav-btn,
    .bd-plan-card p,
    .bd-profile-record-card p,
    .bd-verify-modal-card p,
    .bd-verify-modal-list {
        font-size: 11px;
    }

    .bd-profile-nav {
        gap: 4px;
    }

    .bd-profile-nav-btn,
    .bd-auth-btn,
    .bd-profile-secondary {
        min-height: 36px;
        padding: 7px 8px;
    }

    .bd-profile-grid-item,
    .bd-profile-stat-card,
    .bd-plan-card,
    .bd-profile-record-card,
    .bd-profile-activity-log,
    .bd-plan-meta,
    .bd-profile-section,
    .bd-profile-plans,
    .bd-profile-gamification,
    .bd-profile-form,
    .bd-profile-verify,
    .bd-profile-passkeys,
    .bd-profile-smart-card,
    .bd-profile-insight-card,
    .bd-profile-behavior-card {
        padding: 9px;
    }

    .bd-profile-record-top {
        align-items: flex-start;
        flex-direction: column;
    }

    .bd-profile-record-top h4,
    .bd-plan-card h5 {
        font-size: 13px;
    }

    .bd-verify-modal {
        padding: 6px;
    }

    .bd-verify-modal-card {
        border-radius: 12px;
        padding: 10px;
        max-height: calc(100vh - 12px);
    }

    .bd-verify-modal-card h3 {
        font-size: 14px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .bd-verify-modal-backdrop,
    .bd-verify-modal-card {
        transition: none;
    }

    .bd-verify-modal.is-open .bd-verify-modal-card {
        animation: none;
    }
}

@keyframes bdVerifyModalEnter {
    from {
        opacity: 0;
        transform: translateY(-10px) scale(0.98);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes bdFadeIn {
    from { opacity: 0; transform: translateY(6px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ─── OTP slide-down reveal ─── */
.bd-auth-otp {
    overflow: hidden;
    transition: max-height 0.32s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.28s ease;
}
.bd-auth-otp.is-visible {
    animation: bdOtpReveal 0.32s cubic-bezier(0.22, 1, 0.36, 1);
}
@keyframes bdOtpReveal {
    from { opacity: 0; transform: translateY(-8px) scale(0.99); }
    to   { opacity: 1; transform: translateY(0)   scale(1);    }
}

/* ─── Button loading state ─── */
.bd-auth-btn.is-loading {
    pointer-events: none;
    opacity: 0.82;
    position: relative;
}
.bd-auth-btn.is-loading::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: inherit;
    z-index: 1;
}
.bd-auth-btn.is-loading::after {
    content: '';
    position: absolute;
    inset: 50% 50%;
    width: 18px;
    height: 18px;
    margin: -9px 0 0 -9px;
    border: 2.5px solid rgba(255,255,255,0.35);
    border-top-color: #fff;
    border-radius: 50%;
    animation: bdSpin 0.72s linear infinite;
    z-index: 2;
}
@keyframes bdSpin {
    to { transform: rotate(360deg); }
}

/* ─── Shake animation on error ─── */
@keyframes bdShake {
    0%, 100% { transform: translateX(0); }
    15%  { transform: translateX(-7px); }
    30%  { transform: translateX(6px); }
    45%  { transform: translateX(-5px); }
    60%  { transform: translateX(4px); }
    75%  { transform: translateX(-3px); }
    90%  { transform: translateX(2px); }
}
.bd-auth-input-wrap.is-error-shake,
.bd-auth-control-field.is-error-shake,
.bd-auth-phone-field.is-error-shake {
    animation: bdShake 0.42s ease;
    border-color: rgba(214, 69, 104, 0.7) !important;
}

/* ─── OTP timer + resend row ─── */
.bd-auth-otp-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-top: 10px;
    flex-wrap: wrap;
}
.bd-auth-otp-timer {
    font-size: 12px;
    color: #64748b;
    display: flex;
    align-items: center;
    gap: 5px;
}
.bd-auth-otp-timer-count {
    font-weight: 700;
    color: var(--bd-primary, #0f766e);
    font-variant-numeric: tabular-nums;
    min-width: 26px;
    display: inline-block;
}
.bd-auth-otp-resend {
    border: none;
    background: transparent;
    color: var(--bd-primary, #0f766e);
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 8px;
    font-family: inherit;
    transition: background 0.15s ease, color 0.15s ease;
    display: none;
}
.bd-auth-otp-resend:hover {
    background: rgba(15, 118, 110, 0.1);
}
.bd-auth-otp-resend.is-visible {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}
.bd-auth-otp-resend.is-loading {
    pointer-events: none;
    opacity: 0.6;
}

.bd-auth-otp-verify {
    width: 100%;
    margin-top: 14px;
}

.bd-auth-otp-verify:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

.bd-auth-otp-verify.is-ready:not(:disabled) {
    opacity: 1;
}

/* ─── Password visibility toggle ─── */
.bd-auth-pw-toggle {
    border: none;
    background: transparent;
    cursor: pointer;
    padding: 4px;
    color: #94a3b8;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    flex-shrink: 0;
    transition: color 0.15s ease;
}
.bd-auth-pw-toggle:hover {
    color: #475569;
}
.bd-auth-pw-toggle svg {
    width: 18px;
    height: 18px;
    display: block;
}

/* ─── Passkey section hidden until JS confirms support ─── */
.bd-auth-passkey {
    display: none;
}
.bd-auth-passkey.is-supported {
    display: block;
    animation: bdFadeIn 0.3s ease;
}

/* ─── Input success highlight ─── */
.bd-auth-input-wrap.is-success {
    border-color: rgba(29, 169, 124, 0.6);
    background: rgba(240, 253, 247, 0.85);
}

/* ─── OTP digit inputs (6-box layout) ─── */
.bd-auth-otp-digits {
    display: flex;
    gap: 8px;
    direction: ltr;
    margin-bottom: 2px;
}
.bd-auth-otp-digit {
    flex: 1;
    height: 52px;
    border: 1.5px solid #d5dee9;
    border-radius: 12px;
    background: #fff;
    text-align: center;
    font-size: 20px;
    font-weight: 700;
    color: #0f172a;
    caret-color: var(--bd-primary, #0f766e);
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
    width: 100%;
    min-width: 0;
    -webkit-appearance: none;
    appearance: none;
}
.bd-auth-otp-digit:focus {
    outline: none;
    border-color: rgba(15, 118, 110, 0.6);
    background: #fff;
    box-shadow: 0 0 0 4px rgba(15, 118, 110, 0.1);
}
.bd-auth-otp-digit.is-filled {
    border-color: rgba(15, 118, 110, 0.45);
    background: rgba(240, 253, 247, 0.85);
}
.bd-auth-otp-digit.is-error {
    border-color: rgba(214, 69, 104, 0.7);
    background: rgba(255, 241, 244, 0.85);
    animation: bdShake 0.42s ease;
}
@media (max-width: 360px) {
    .bd-auth-otp-digit {
        height: 42px;
        font-size: 18px;
        border-radius: 10px;
    }
    .bd-auth-otp-digits {
        gap: 5px;
    }
}

@media (max-width: 780px) {
    .bd-auth-shell {
        grid-template-columns: 1fr;
    }

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

@media (max-width: 640px) {
    .bd-auth-wrapper {
        padding: 18px 10px 32px;
        min-height: auto;
    }

    .bd-auth-card {
        padding: 26px 20px 22px;
        border-radius: 22px;
    }

    .bd-auth-card::before {
        border-radius: 22px 22px 0 0;
    }

    .bd-auth-tabs {
        margin-bottom: 16px;
    }

    .bd-auth-otp-row {
        flex-direction: column;
        align-items: stretch;
    }

    .bd-auth-passkey-row {
        flex-direction: column;
        align-items: stretch;
        padding: 12px;
    }

    .bd-auth-passkey-btn {
        width: 100%;
    }

    .bd-auth-input-wrap {
        min-height: 48px;
    }

    .bd-auth-btn {
        min-height: 48px;
    }
}

@media (max-width: 400px) {
    .bd-auth-card {
        padding: 22px 16px 18px;
    }

    .bd-auth-tab {
        padding: 9px 14px;
        font-size: 13px;
    }
}




/* Leitner panel styles moved to bahndeutsch-leitner-core/assets/css/leitner-panel.css (Phase 6). */


.bd-profile-dashboard-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(280px, 0.8fr);
    gap: 18px;
}

.bd-profile-ai-brief,
.bd-profile-ai-summary-card,
.bd-profile-focus-item,
.bd-profile-risk-flag {
    border-radius: 18px;
}

.bd-profile-ai-brief {
    display: grid;
    gap: 14px;
    padding: 18px;
    background: linear-gradient(145deg, rgba(255,255,255,0.92), rgba(238,245,255,0.82));
    border: 1px solid rgba(207, 222, 247, 0.96);
    box-shadow: var(--bd-ui-shadow-soft);
}

.bd-profile-ai-summary-cards {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

.bd-profile-ai-summary-card {
    padding: 14px;
    display: grid;
    gap: 4px;
    background: rgba(255,255,255,0.82);
    border: 1px solid rgba(206, 220, 242, 0.88);
}

.bd-profile-ai-summary-card span,
.bd-profile-risk-flag,
.bd-profile-focus-item {
    color: var(--bd-text-secondary);
    font-size: 12px;
}

.bd-profile-ai-summary-card strong,
.bd-profile-coach-note {
    color: var(--bd-text-primary);
}

.bd-profile-coach-note {
    padding: 14px 16px;
    border-radius: 16px;
    background: rgba(240, 246, 255, 0.92);
    border: 1px solid rgba(190, 210, 241, 0.9);
    line-height: 2;
    font-weight: 700;
}

.bd-profile-focus-plan,
.bd-profile-risk-flags {
    display: grid;
    gap: 8px;
}

.bd-profile-focus-item,
.bd-profile-risk-flag {
    padding: 12px 14px;
    background: rgba(255,255,255,0.76);
    border: 1px solid rgba(210, 222, 244, 0.88);
    line-height: 1.95;
}

.bd-profile-risk-flag {
    background: rgba(255, 245, 245, 0.9);
    border-color: rgba(245, 196, 205, 0.92);
    color: #a94462;
}

@media (max-width: 960px) {
    .bd-profile-dashboard-grid,
    .bd-profile-ai-summary-cards {
        grid-template-columns: 1fr;
    }
}

.bd-membership-summary-strip {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    margin-top: 18px;
}

.bd-membership-summary-card,
.bd-membership-guidance-card,
.bd-plan-compare-note {
    border-radius: 18px;
    border: 1px solid rgba(208, 222, 244, 0.9);
    background: linear-gradient(145deg, rgba(255,255,255,0.92), rgba(241,247,255,0.82));
    box-shadow: var(--bd-ui-shadow-soft);
}

.bd-membership-summary-card {
    display: grid;
    gap: 6px;
    padding: 16px;
}

.bd-membership-summary-card span,
.bd-membership-guidance-card span,
.bd-plan-decision-hint,
.bd-plan-compare-note {
    color: var(--bd-text-secondary);
    font-size: 12px;
}

.bd-membership-summary-card strong,
.bd-membership-guidance-card strong {
    color: var(--bd-text-primary);
    font-size: clamp(0.92rem, 1.35vw, 1.02rem);
}

.bd-membership-summary-card small {
    color: #4d6082;
    line-height: 1.8;
}

.bd-membership-summary-card.is-primary {
    background: linear-gradient(145deg, rgba(233, 244, 255, 0.98), rgba(222, 238, 255, 0.9));
    border-color: rgba(174, 204, 244, 0.95);
}

.bd-membership-summary-card.is-warning {
    background: linear-gradient(145deg, rgba(255, 246, 230, 0.98), rgba(255, 238, 211, 0.92));
    border-color: rgba(245, 205, 139, 0.95);
}

.bd-membership-summary-card.is-ai {
    background: linear-gradient(145deg, rgba(243, 239, 255, 0.98), rgba(232, 238, 255, 0.92));
    border-color: rgba(197, 188, 248, 0.9);
}

.bd-membership-guidance-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin-top: 14px;
}

.bd-membership-guidance-card {
    display: grid;
    gap: 8px;
    padding: 16px;
}

.bd-membership-guidance-card p {
    margin: 0;
    line-height: 1.9;
}

.bd-plan-card.is-recommended {
    border-color: rgba(106, 91, 236, 0.42);
    box-shadow: 0 22px 38px rgba(94, 81, 215, 0.16);
}

.bd-plan-card.is-best-value {
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.9), rgba(241, 250, 244, 0.82));
}

.bd-plan-card.is-recommended::before {
    background: linear-gradient(90deg, rgba(104, 89, 232, 0.95), rgba(68, 141, 255, 0.88));
    opacity: 1;
}

.bd-plan-badge-stack {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.bd-plan-badge.is-recommended {
    background: linear-gradient(135deg, #6d28d9, #4f46e5);
}

.bd-plan-badge.is-neutral {
    background: linear-gradient(135deg, #0f766e, #0f9f8f);
}

.bd-plan-decision-hint {
    margin: 0;
    padding: 0;
    border: 0;
    background: none;
    color: var(--bd-text-secondary);
    font-size: 13px;
    line-height: 1.7;
}

.bd-plan-membership-note.is-urgent {
    background: rgba(255, 241, 219, 0.92);
    border-color: rgba(244, 199, 122, 0.92);
    color: #a45b00;
}

.bd-plan-compare-note {
    padding: 11px 12px;
    line-height: 1.75;
}

@media (max-width: 960px) {
    .bd-membership-summary-strip,
    .bd-membership-guidance-grid {
        grid-template-columns: 1fr;
    }
}

/* ═══════════════════════════════════════════
   Auth Wizard (stepped login / register)
   ═══════════════════════════════════════════ */

.bd-auth-wizard {
    --bd-wiz-ink: #0f2742;
    --bd-wiz-soft: #5b7290;
    --bd-wiz-line: rgba(126, 150, 186, 0.22);
    --bd-wiz-glass: rgba(255, 255, 255, 0.72);
}

.bd-auth-wizard .bd-auth-header {
    text-align: right;
    margin-bottom: 22px;
}

.bd-auth-wizard .bd-auth-title {
    margin: 6px 0 8px;
    font-size: clamp(1.35rem, 2.4vw, 1.7rem);
    letter-spacing: -0.02em;
    color: var(--bd-wiz-ink);
}

.bd-auth-wizard .bd-auth-subtitle {
    max-width: 34ch;
    margin: 0;
    color: var(--bd-wiz-soft);
    line-height: 1.85;
}

.bd-auth-eyebrow {
    margin: 0;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 10px;
    border-radius: 999px;
    background: rgba(15, 118, 110, 0.08);
    border: 1px solid rgba(15, 118, 110, 0.14);
    color: var(--bd-primary, #0f766e);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.04em;
}

.bd-auth-path {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 14px;
}

.bd-auth-path span {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 999px;
    background: rgba(241, 245, 249, 0.95);
    border: 1px solid var(--bd-wiz-line);
    color: #334155;
    font-size: 12px;
    font-weight: 700;
}

.bd-auth-path i {
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: #94a3b8;
}

.bd-auth-wizard-chrome {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 12px;
    margin-bottom: 18px;
}

.bd-auth-back {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    border: 1px solid var(--bd-wiz-line);
    background: rgba(255, 255, 255, 0.9);
    color: #334155;
    border-radius: 999px;
    padding: 8px 12px 8px 10px;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.18s ease, transform 0.18s ease, border-color 0.18s ease;
}

.bd-auth-back[hidden] {
    display: none !important;
}

.bd-auth-progress {
    display: grid;
    gap: 8px;
    min-width: 0;
}

.bd-auth-progress-track {
    height: 6px;
    border-radius: 999px;
    background: rgba(226, 232, 240, 0.95);
    overflow: hidden;
}

.bd-auth-progress-bar {
    height: 100%;
    width: 25%;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--bd-primary, #0f766e), var(--bd-secondary, #2563eb));
    box-shadow: 0 0 12px rgba(15, 118, 110, 0.28);
    transition: width 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}

.bd-auth-progress-dots {
    display: flex;
    gap: 6px;
    justify-content: center;
}

.bd-auth-progress-dots span {
    width: 7px;
    height: 7px;
    border-radius: 999px;
    background: #cbd5e1;
    transition: width 0.25s ease, background 0.25s ease;
}

.bd-auth-progress-dots span.is-active {
    width: 18px;
    background: var(--bd-primary, #0f766e);
}

.bd-auth-progress-dots span.is-done {
    background: rgba(15, 118, 110, 0.45);
}

.bd-auth-progress-dots span[hidden] {
    display: none !important;
}

.bd-auth-step-count {
    margin: 0;
    color: #64748b;
    font-size: 11px;
    font-weight: 700;
    white-space: nowrap;
}

.bd-auth-step {
    display: none;
}

.bd-auth-step.is-active {
    display: grid;
    gap: 14px;
}

.bd-auth-step.is-enter {
    animation: bdAuthStepIn 0.42s cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes bdAuthStepIn {
    from {
        opacity: 0;
        transform: translateY(14px) scale(0.985);
        filter: blur(2px);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
        filter: blur(0);
    }
}

.bd-auth-choice-grid {
    display: grid;
    gap: 12px;
}

.bd-auth-choice {
    position: relative;
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 14px;
    width: 100%;
    text-align: right;
    padding: 16px 16px 16px 14px;
    border-radius: 18px;
    border: 1px solid rgba(203, 213, 225, 0.95);
    background:
        linear-gradient(145deg, rgba(255, 255, 255, 0.98), rgba(248, 250, 252, 0.94));
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.05);
    cursor: pointer;
    color: inherit;
    transition: transform 0.22s cubic-bezier(0.22, 1, 0.36, 1), border-color 0.22s ease, box-shadow 0.22s ease, background 0.22s ease;
    overflow: hidden;
}

.bd-auth-choice::before {
    content: "";
    position: absolute;
    inset: 0 auto 0 0;
    width: 3px;
    background: linear-gradient(180deg, var(--bd-primary, #0f766e), var(--bd-secondary, #2563eb));
    opacity: 0;
    transition: opacity 0.2s ease;
}

.bd-auth-choice:hover,
.bd-auth-choice:focus-visible {
    outline: none;
    transform: translateY(-2px);
    border-color: rgba(15, 118, 110, 0.38);
    box-shadow: 0 16px 36px rgba(15, 118, 110, 0.12), 0 4px 12px rgba(15, 23, 42, 0.06);
    background: #fff;
}

.bd-auth-choice:hover::before,
.bd-auth-choice:focus-visible::before {
    opacity: 1;
}

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

.bd-auth-choice-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 46px;
    height: 46px;
    border-radius: 14px;
    background: rgba(15, 118, 110, 0.1);
    color: var(--bd-primary, #0f766e);
    flex-shrink: 0;
}

.bd-auth-choice-icon.is-accent {
    background: rgba(37, 99, 235, 0.1);
    color: #2563eb;
}

.bd-auth-choice-icon.is-blue {
    background: rgba(14, 165, 233, 0.12);
    color: #0284c7;
}

.bd-auth-choice-icon.is-violet {
    background: rgba(15, 118, 110, 0.12);
    color: #0f766e;
}

.bd-auth-choice-icon svg {
    width: 22px;
    height: 22px;
    display: block;
}

.bd-auth-choice-copy {
    display: grid;
    gap: 4px;
    min-width: 0;
}

.bd-auth-choice-copy strong {
    font-size: 15px;
    font-weight: 800;
    color: var(--bd-wiz-ink);
}

.bd-auth-choice-copy small {
    font-size: 12.5px;
    color: var(--bd-wiz-soft);
    line-height: 1.7;
}

.bd-auth-choice-arrow {
    display: inline-flex;
    color: #94a3b8;
    transition: transform 0.2s ease, color 0.2s ease;
}

.bd-auth-choice:hover .bd-auth-choice-arrow {
    color: var(--bd-primary, #0f766e);
    transform: translateX(3px);
}

.bd-auth-back:hover {
    background: #f8fafc;
    border-color: rgba(15, 118, 110, 0.35);
    transform: translateX(-2px);
}

.bd-auth-form-panel {
    display: grid;
    gap: 14px;
}

.bd-auth-form-panel[hidden],
.bd-auth-otp-stage[hidden],
.bd-auth-choice[hidden] {
    display: none !important;
}

.bd-auth-otp-stage {
    display: grid;
    gap: 12px;
}

.bd-auth-wizard .bd-auth-otp {
    border: 1px solid rgba(203, 213, 225, 0.95);
    border-style: solid;
    background:
        linear-gradient(160deg, rgba(240, 253, 247, 0.55), rgba(239, 246, 255, 0.7)),
        #fff;
    padding: 18px 16px;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.bd-auth-wizard .bd-auth-passkey {
    display: grid;
    gap: 14px;
    margin: 0;
    padding: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
}

.bd-auth-wizard .bd-auth-passkey-head h4 {
    margin: 0 0 4px;
}

.bd-auth-wizard .bd-auth-passkey-head p {
    margin: 0;
}

@media (max-width: 640px) {
    .bd-auth-wizard-chrome {
        grid-template-columns: auto 1fr;
        grid-template-areas:
            "back count"
            "progress progress";
        gap: 10px;
    }

    .bd-auth-back { grid-area: back; }
    .bd-auth-step-count { grid-area: count; justify-self: end; }
    .bd-auth-progress { grid-area: progress; }

    .bd-auth-choice {
        padding: 14px 12px;
        gap: 12px;
        border-radius: 16px;
    }

    .bd-auth-choice-icon {
        width: 42px;
        height: 42px;
        border-radius: 12px;
    }

    .bd-auth-wizard .bd-auth-header {
        margin-bottom: 16px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .bd-auth-step.is-enter,
    .bd-auth-choice,
    .bd-auth-progress-bar,
    .bd-auth-back {
        animation: none !important;
        transition: none !important;
    }
}

/* ─── Professional identity fields ─── */
.bd-auth-sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.bd-auth-identity-stack {
    display: grid;
    gap: 12px;
}

.bd-auth-identity {
    display: grid;
    gap: 12px;
    padding: 16px;
    border-radius: 18px;
    border: 1px solid rgba(203, 213, 225, 0.95);
    background:
        linear-gradient(160deg, rgba(255, 255, 255, 0.98), rgba(248, 250, 252, 0.92));
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.04);
}

.bd-auth-identity-head {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 12px;
    align-items: start;
}

.bd-auth-identity-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: rgba(15, 118, 110, 0.1);
    color: var(--bd-primary, #0f766e);
    flex-shrink: 0;
}

.bd-auth-identity-badge.is-blue {
    background: rgba(14, 165, 233, 0.12);
    color: #0284c7;
}

.bd-auth-identity-badge svg {
    width: 18px;
    height: 18px;
    display: block;
}

.bd-auth-identity-head strong {
    display: block;
    font-size: 14px;
    font-weight: 800;
    color: #0f2742;
    margin-bottom: 2px;
}

.bd-auth-identity-head small {
    display: block;
    font-size: 12px;
    line-height: 1.7;
    color: #64748b;
}

.bd-auth-input-wrap--hero {
    min-height: 54px;
    border-radius: 14px;
    background: #fff;
    border-color: #d5dee9;
}

.bd-auth-input-wrap--hero input {
    font-size: 15.5px;
    letter-spacing: 0.01em;
}

.bd-auth-control-field,
.bd-auth-phone-field {
    display: grid;
    grid-template-columns: auto 1fr;
    align-items: stretch;
    min-height: 54px;
    border-radius: 14px;
    border: 1.5px solid #d5dee9;
    background: #fff;
    overflow: hidden;
    transition: border-color 0.22s ease, box-shadow 0.22s ease;
}

.bd-auth-control-field:focus-within,
.bd-auth-phone-field:focus-within {
    border-color: rgba(15, 118, 110, 0.6);
    box-shadow: 0 0 0 4px rgba(15, 118, 110, 0.1), 0 2px 8px rgba(15, 118, 110, 0.08);
}

.bd-auth-control-prefix,
.bd-auth-phone-cc {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 52px;
    padding: 0 14px;
    background: rgba(241, 245, 249, 0.95);
    border-inline-end: 1px solid #e2e8f0;
    color: #334155;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.02em;
    direction: ltr;
}

.bd-auth-control-field input,
.bd-auth-phone-field input {
    width: 100%;
    min-width: 0;
    border: 0;
    background: transparent;
    padding: 14px 14px;
    font-size: 16px;
    font-weight: 700;
    color: #0f172a;
    direction: ltr;
    text-align: left;
    letter-spacing: 0.04em;
}

.bd-auth-control-field input:focus,
.bd-auth-phone-field input:focus {
    outline: none;
}

.bd-auth-control-field input::placeholder,
.bd-auth-phone-field input::placeholder {
    color: #94a3b8;
    font-weight: 600;
    letter-spacing: 0.04em;
}

.bd-auth-final-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    padding: 12px 14px;
    border-radius: 14px;
    background: rgba(240, 253, 247, 0.7);
    border: 1px solid rgba(153, 246, 228, 0.55);
    color: #0f766e;
    font-size: 12.5px;
}

.bd-auth-final-meta strong {
    direction: ltr;
    font-weight: 800;
    color: #0f2742;
}

.bd-auth-captcha--final {
    margin: 0;
}

.bd-auth-passkey-enroll {
    margin-top: 2px;
}

.bd-auth-passkey-enroll[hidden] {
    display: none !important;
}

.bd-auth-passkey-enroll-card {
    display: grid;
    grid-template-columns: auto auto 1fr;
    gap: 12px;
    align-items: center;
    padding: 14px;
    border-radius: 16px;
    border: 1px dashed rgba(15, 118, 110, 0.35);
    background: linear-gradient(145deg, rgba(236, 253, 248, 0.9), rgba(239, 246, 255, 0.9));
    cursor: pointer;
}

.bd-auth-passkey-enroll-card input {
    width: 18px;
    height: 18px;
    accent-color: var(--bd-primary, #0f766e);
    margin: 0;
}

.bd-auth-passkey-enroll-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 12px;
    background: rgba(15, 118, 110, 0.12);
    color: var(--bd-primary, #0f766e);
}

.bd-auth-passkey-enroll-icon svg {
    width: 20px;
    height: 20px;
    display: block;
}

.bd-auth-passkey-enroll-copy {
    display: grid;
    gap: 2px;
    min-width: 0;
}

.bd-auth-passkey-enroll-copy strong {
    font-size: 13.5px;
    font-weight: 800;
    color: #0f2742;
}

.bd-auth-passkey-enroll-copy small {
    font-size: 12px;
    line-height: 1.7;
    color: #64748b;
}

.bd-auth-step[data-step="otp"].is-active {
    gap: 12px;
}

@media (max-width: 640px) {
    .bd-auth-identity {
        padding: 14px;
        border-radius: 16px;
    }

    .bd-auth-control-field,
    .bd-auth-phone-field,
    .bd-auth-input-wrap--hero {
        min-height: 50px;
    }
}

.bd-affiliate-panel {
    display: grid;
    gap: 16px;
}

.bd-affiliate-hero {
    display: grid;
    gap: 10px;
    padding: 18px;
    border-radius: 18px;
    background: linear-gradient(145deg, rgba(236, 253, 245, 0.95), rgba(239, 246, 255, 0.9));
    border: 1px solid rgba(167, 243, 208, 0.9);
}

.bd-affiliate-hero h3 {
    margin: 0;
    font-size: clamp(1rem, 1.6vw, 1.15rem);
    color: var(--bd-text-primary);
}

.bd-affiliate-hero p {
    margin: 0;
    color: var(--bd-text-secondary);
    line-height: 1.8;
    font-size: 0.84rem;
}

.bd-affiliate-link-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
    align-items: center;
}

.bd-affiliate-link {
    display: block;
    min-width: 0;
    padding: 12px 14px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.86);
    border: 1px solid rgba(191, 219, 254, 0.9);
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: 0.78rem;
    direction: ltr;
    text-align: left;
    overflow-wrap: anywhere;
    color: #1e3a5f;
}

.bd-affiliate-stats {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 160px), 1fr));
    gap: 12px;
}

.bd-affiliate-stat {
    display: grid;
    gap: 6px;
    padding: 14px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.82);
    border: 1px solid rgba(223, 231, 246, 0.92);
    box-shadow: var(--bd-shadow-subtle);
}

.bd-affiliate-stat span {
    font-size: 0.72rem;
    color: var(--bd-text-secondary);
}

.bd-affiliate-stat strong {
    font-size: 1.05rem;
    color: var(--bd-text-primary);
}

.bd-affiliate-table-wrap {
    overflow-x: auto;
    border-radius: 16px;
    border: 1px solid rgba(223, 231, 246, 0.92);
    background: rgba(255, 255, 255, 0.78);
}

.bd-affiliate-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.8rem;
}

.bd-affiliate-table th,
.bd-affiliate-table td {
    padding: 10px 12px;
    text-align: right;
    border-bottom: 1px solid rgba(226, 232, 240, 0.9);
}

.bd-affiliate-table th {
    background: rgba(248, 250, 252, 0.95);
    color: var(--bd-text-secondary);
    font-weight: 700;
}

.bd-affiliate-table tr:last-child td {
    border-bottom: none;
}

.bd-affiliate-status {
    display: inline-flex;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 0.7rem;
    font-weight: 700;
}

.bd-affiliate-status.is-approved {
    background: rgba(220, 252, 231, 0.95);
    color: #166534;
}

.bd-affiliate-status.is-pending {
    background: rgba(254, 243, 199, 0.95);
    color: #92400e;
}

.bd-affiliate-status.is-paid {
    background: rgba(219, 234, 254, 0.95);
    color: #1d4ed8;
}

.bd-affiliate-status.is-void {
    background: rgba(254, 226, 226, 0.95);
    color: #991b1b;
}

@media (max-width: 640px) {
    .bd-affiliate-link-row {
        grid-template-columns: 1fr;
    }
}
