/* ==========================================================================
   YetkinBulutNet Kurumsal Portal — PNLCS Corporate Client Portal Theme
   Synced with https://yetkinbulut.net design system (v1.4.0)
   Upgrade-safe: lives strictly under themes/yetkinbulut-portal/
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Mono:wght@400;500;600&family=IBM+Plex+Sans:wght@400;500;600;700&display=swap');

:root {
    --yb-ink: #0f172a;
    --yb-ink-2: #334155;
    --yb-muted: #64748b;
    --yb-line: #e2e8f0;
    --yb-line-2: #cbd5e1;
    --yb-bg: #ffffff;
    --yb-soft: #f5f8fd;
    --yb-soft-2: #eaf1fb;
    --yb-brand: var(--theme-primary, #0a5bd6);
    --yb-brand-600: var(--theme-accent-dark, #0747b5);
    --yb-brand-700: var(--theme-primary-dark, #063a94);
    --yb-sky: #1eb0f0;
    --yb-ok: var(--theme-success, #10a36b);
    --yb-ok-soft: #e6f7f0;
    --yb-err: var(--theme-danger, #d63a3a);
    --yb-warn: var(--theme-warning, #d97706);
    --yb-grad: linear-gradient(135deg, #06286b 0%, #0744ab 42%, #0a6ae3 76%, #1eb0f0 100%);
    --yb-ease: cubic-bezier(0.22, 0.8, 0.24, 1);
    --yb-sh-1: 0 1px 2px rgba(15, 23, 42, 0.04), 0 2px 8px rgba(15, 23, 42, 0.04);
    --yb-sh-2: 0 4px 16px -4px rgba(10, 60, 150, 0.12);

    --primary: var(--yb-brand);
    --primary-light: var(--yb-soft-2);
    --primary-dark: var(--yb-brand-700);
    --accent: var(--yb-brand);
    --accent-dark: var(--yb-brand-600);
    --danger: var(--yb-err);
    --warning: var(--yb-warn);
    --success: var(--yb-ok);
    --bg: var(--yb-soft);
    --card: var(--yb-bg);
    --border: var(--yb-line);
    --text: var(--yb-ink);
    --muted: var(--yb-muted);
    --shadow: var(--yb-sh-1);
    --shadow-md: var(--yb-sh-2);
    --radius: 12px;
    --radius-sm: 8px;
}

:root[data-theme="dark"] {
    --yb-ink: #f1f5f9;
    --yb-ink-2: #cbd5e1;
    --yb-muted: #94a3b8;
    --yb-line: #1e2d47;
    --yb-line-2: #273a59;
    --yb-bg: #0f1a2e;
    --yb-soft: #091120;
    --yb-soft-2: #172554;
    --yb-brand: #3b82f6;
    --yb-brand-600: #2563eb;
    --yb-brand-700: #1d4ed8;
    --yb-ok-soft: #052e16;
    --yb-sh-1: 0 1px 2px rgba(0, 0, 0, 0.25), 0 2px 8px rgba(0, 0, 0, 0.2);
    --yb-sh-2: 0 8px 28px -6px rgba(0, 0, 0, 0.45);

    --primary: var(--yb-brand);
    --primary-light: var(--yb-soft-2);
    --primary-dark: var(--yb-brand-700);
    --bg: var(--yb-soft);
    --card: var(--yb-bg);
    --border: var(--yb-line);
    --text: var(--yb-ink);
    --muted: var(--yb-muted);
}

*, *::before, *::after {
    box-sizing: border-box;
}

html {
    -webkit-text-size-adjust: 100%;
    scroll-behavior: smooth;
}

body {
    font-family: 'IBM Plex Sans', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
    color: var(--text);
    background-color: var(--bg);
    margin: 0;
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
    overflow-x: clip;
}

:root[data-theme="dark"] .yb-brand-top a,
:root[data-theme="dark"] .pn-brand {
    background: rgba(255, 255, 255, 0.94);
    padding: 4px 10px;
    border-radius: 8px;
}

h1, h2, h3, h4, .pn-page-title, .pn-welcome-text h2 {
    letter-spacing: -0.02em;
    text-wrap: balance;
}

:focus-visible {
    outline: 2px solid var(--yb-brand);
    outline-offset: 2px;
}

::selection {
    background: #cfe2ff;
    color: #0f172a;
}

.pn-stat-val,
.pn-welcome-credit .credit-val,
.pn-product-price,
.pn-aff-val,
.pn-table td,
.pn-order-row,
.pn-code,
code {
    font-variant-numeric: tabular-nums;
}

.pn-code,
code,
pre {
    font-family: 'IBM Plex Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
}

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

.pn-main > *,
.yb-auth-card,
.yb-stage-anim {
    animation: ybFadeUp 220ms var(--yb-ease) both;
}

@media (prefers-reduced-motion: reduce) {
    .pn-main > *,
    .yb-auth-card,
    .yb-stage-anim {
        animation: none !important;
    }
    * {
        transition-duration: 0.01ms !important;
    }
}

/* ─── SPLIT-SCREEN AUTH LAYOUT (welcome, login, register) ─── */
.yb-split-page {
    min-height: 100vh;
    margin: 0;
    background: #ffffff;
    color: var(--yb-ink);
    font-family: 'IBM Plex Sans', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    align-items: start;
}

:root[data-theme="dark"] .yb-split-page {
    background: #091120;
    color: #f1f5f9;
}

.yb-split-left {
    position: sticky;
    top: 0;
    height: 100vh;
    background: var(--yb-grad);
    color: #ffffff;
    padding: 48px 54px 44px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    overflow: hidden;
    border-right: 1px solid rgba(15, 23, 42, 0.14);
    box-shadow: 8px 0 28px -12px rgba(6, 24, 68, 0.35);
}

.yb-split-bg,
.yb-split-bg-layer {
    position: absolute;
    inset: 0;
    z-index: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center center;
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    transition: opacity 550ms var(--yb-ease), transform 700ms var(--yb-ease);
    transform: scale(1.02);
}

.yb-split-bg-layer {
    opacity: 0;
    pointer-events: none;
}

.yb-split-bg-layer.is-active {
    opacity: 1;
}

.yb-split-scrim {
    position: absolute;
    inset: 0;
    z-index: 1;
    background: linear-gradient(
        180deg,
        rgba(4, 21, 58, 0.86) 0%,
        rgba(6, 36, 94, 0.34) 46%,
        rgba(4, 21, 58, 0.90) 100%
    );
}

.yb-slide-top,
.yb-slide-bottom {
    position: relative;
    z-index: 2;
}

.yb-slide-bottom {
    margin-top: auto;
}

.yb-slide-title {
    font-size: clamp(1.75rem, 2.75vw, 2.35rem);
    font-weight: 700;
    line-height: 1.16;
    letter-spacing: -0.025em;
    max-width: 470px;
    margin: 0;
    text-shadow: 0 2px 18px rgba(4, 16, 48, 0.55);
}

.yb-slide-desc {
    font-size: 15px;
    line-height: 1.65;
    color: rgba(255, 255, 255, 0.94);
    max-width: 450px;
    margin: 0 0 22px;
    text-shadow: 0 1px 12px rgba(4, 16, 48, 0.55);
}

.yb-slide-dots {
    display: flex;
    align-items: center;
    gap: 8px;
}

.yb-slide-dot {
    height: 6px;
    width: 14px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.38);
    border: none;
    padding: 0;
    cursor: pointer;
    transition: width 220ms var(--yb-ease), background-color 220ms var(--yb-ease);
}

.yb-slide-dot.is-active {
    width: 28px;
    background: #ffffff;
}

.yb-split-right {
    background: #ffffff;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 40px 28px;
    position: relative;
    min-height: 100vh;
}

:root[data-theme="dark"] .yb-split-right {
    background: #091120;
}

.yb-auth-box {
    width: 100%;
    max-width: 396px;
    margin: auto 0;
}

.yb-brand-top {
    display: flex;
    justify-content: center;
    margin-bottom: 28px;
}

.yb-auth-heading {
    font-size: 24px;
    font-weight: 700;
    letter-spacing: -0.02em;
    margin: 0 0 4px;
    color: var(--yb-ink);
}

.yb-auth-subtext {
    font-size: 13.5px;
    color: var(--yb-muted);
    margin: 0 0 22px;
}

.yb-email-pill {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 9px;
    padding: 10px 14px;
    font-size: 13.5px;
    margin-bottom: 14px;
}

:root[data-theme="dark"] .yb-email-pill {
    background: #0f1a2e;
    border-color: #1e2d47;
}

.yb-email-pill-text {
    font-weight: 500;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.yb-link-btn {
    background: none;
    border: none;
    padding: 0;
    color: var(--yb-brand);
    font-size: 12.5px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    flex-shrink: 0;
    font-family: inherit;
}

.yb-link-btn:hover {
    text-decoration: underline;
}

.yb-progress-bars {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
}

.yb-progress-seg {
    height: 3px;
    border-radius: 999px;
    background: #e2e8f0;
    transition: background-color 180ms var(--yb-ease);
}

:root[data-theme="dark"] .yb-progress-seg {
    background: #1e2d47;
}

.yb-progress-seg.is-done {
    background: var(--yb-brand);
}

.yb-progress-lbl {
    margin-top: 6px;
    margin-bottom: 18px;
    font-size: 11px;
    font-weight: 500;
    color: var(--yb-muted);
}

.yb-field {
    margin-bottom: 14px;
}

.yb-label {
    display: block;
    font-size: 12.5px;
    font-weight: 600;
    color: var(--yb-ink);
    margin-bottom: 6px;
}

.yb-input {
    width: 100%;
    height: 43px;
    padding: 9px 13px;
    font-size: 14px;
    font-family: inherit;
    color: var(--yb-ink);
    background: #ffffff;
    border: 1px solid #d4ddeb;
    border-radius: 8px;
    outline: none;
    transition: border-color 150ms var(--yb-ease), box-shadow 150ms var(--yb-ease);
}

.yb-input:focus {
    border-color: var(--yb-brand);
    box-shadow: 0 0 0 3px rgba(10, 91, 214, 0.14);
}

.yb-input:disabled,
.yb-select-native:disabled {
    background: #f1f5f9;
    color: #94a3b8;
    cursor: not-allowed;
}

:root[data-theme="dark"] .yb-input {
    background: #0b1526;
    border-color: #273a59;
    color: #f1f5f9;
}

:root[data-theme="dark"] .yb-input:disabled {
    background: #0f1a2e;
    color: #64748b;
}

.yb-pass-wrap {
    position: relative;
}

.yb-pass-wrap .yb-input {
    padding-right: 40px;
}

.yb-pass-toggle {
    position: absolute;
    right: 11px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    padding: 4px;
    color: var(--yb-muted);
    cursor: pointer;
    display: grid;
    place-items: center;
}

.yb-pass-toggle:hover {
    color: var(--yb-brand);
}

.yb-grid-2 {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.yb-segmented {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    background: #f1f5f9;
    padding: 4px;
    border-radius: 9px;
    margin-bottom: 14px;
}

:root[data-theme="dark"] .yb-segmented {
    background: #0f1a2e;
    border: 1px solid #1e2d47;
}

.yb-seg-btn {
    border: none;
    background: transparent;
    padding: 8px 10px;
    border-radius: 7px;
    font-size: 13px;
    font-weight: 600;
    font-family: inherit;
    color: var(--yb-muted);
    cursor: pointer;
    transition: all 150ms var(--yb-ease);
}

.yb-seg-btn.is-active {
    background: #ffffff;
    color: var(--yb-brand);
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.08);
}

:root[data-theme="dark"] .yb-seg-btn.is-active {
    background: #172554;
    color: #ffffff;
}

/* Flag selector button + dropdown menu */
.yb-flag-dd {
    position: relative;
}

.yb-flag-trigger {
    width: 100%;
    height: 43px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 0 11px;
    border: 1px solid #d4ddeb;
    border-radius: 8px;
    background: #ffffff;
    color: var(--yb-ink);
    font-size: 13.5px;
    font-weight: 500;
    font-family: inherit;
    cursor: pointer;
    text-align: left;
}

:root[data-theme="dark"] .yb-flag-trigger {
    background: #0b1526;
    border-color: #273a59;
    color: #f1f5f9;
}

.yb-flag-trigger-left {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
}

.yb-flag-circle {
    width: 20px;
    height: 20px;
    border-radius: 999px;
    overflow: hidden;
    border: 1px solid #e2e8f0;
    background: #f1f5f9;
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.yb-flag-circle img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.yb-flag-menu {
    position: absolute;
    top: calc(100% + 5px);
    left: 0;
    z-index: 40;
    width: 270px;
    max-width: calc(100vw - 48px);
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    box-shadow: 0 12px 32px rgba(15, 23, 42, 0.14);
    overflow: hidden;
}

.yb-flag-menu--full {
    width: 100%;
}

:root[data-theme="dark"] .yb-flag-menu {
    background: #0f1a2e;
    border-color: #273a59;
}

.yb-flag-search {
    padding: 8px;
    border-bottom: 1px solid var(--yb-line);
}

.yb-flag-search input {
    width: 100%;
    height: 32px;
    border: 1px solid var(--yb-line-2);
    border-radius: 6px;
    padding: 4px 10px;
    font-size: 12.5px;
    font-family: inherit;
    background: #f8fafc;
    color: var(--yb-ink);
    outline: none;
}

:root[data-theme="dark"] .yb-flag-search input {
    background: #0b1526;
    color: #f1f5f9;
}

.yb-flag-list {
    max-height: 210px;
    overflow-y: auto;
    padding: 4px;
}

.yb-flag-opt {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 7px 9px;
    border: none;
    background: transparent;
    border-radius: 6px;
    font-size: 12.5px;
    font-family: inherit;
    color: var(--yb-ink);
    cursor: pointer;
    text-align: left;
}

.yb-flag-opt:hover {
    background: #f5f8fd;
}

.yb-flag-opt.is-selected {
    background: #eaf1fb;
    color: var(--yb-brand);
    font-weight: 600;
}

:root[data-theme="dark"] .yb-flag-opt:hover {
    background: #132038;
}

:root[data-theme="dark"] .yb-flag-opt.is-selected {
    background: #172554;
    color: #93c5fd;
}

.yb-primary-btn {
    width: 100%;
    height: 44px;
    border: none;
    border-radius: 8px;
    background: var(--yb-brand);
    color: #ffffff;
    font-size: 14px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: background-color 150ms var(--yb-ease);
}

.yb-primary-btn:hover {
    background: var(--yb-brand-600);
}

.yb-primary-btn:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

.yb-human-card {
    margin: 4px 0 14px;
    min-height: 64px;
    padding: 10px 14px;
    border: 1px solid #d4ddeb;
    border-radius: 8px;
    background: #f8fafc;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    transition: border-color 150ms var(--yb-ease), background-color 150ms var(--yb-ease);
}

.yb-human-card.is-verified {
    border-color: #a7f3d0;
    background: #f0fdf7;
}

.yb-human-btn {
    display: inline-flex;
    align-items: center;
    gap: 11px;
    background: none;
    border: none;
    padding: 0;
    margin: 0;
    cursor: pointer;
    color: var(--yb-ink);
    font-family: inherit;
    font-size: 13.5px;
    font-weight: 600;
    text-align: left;
}

.yb-human-check {
    width: 22px;
    height: 22px;
    border-radius: 5px;
    border: 1.5px solid #cbd5e1;
    background: #ffffff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: border-color 150ms var(--yb-ease), background-color 150ms var(--yb-ease);
}

.yb-human-card.is-verified .yb-human-check {
    border-color: #10a36b;
    background: #10a36b;
    color: #ffffff;
}

.yb-human-spinner {
    width: 14px;
    height: 14px;
    border: 2px solid #cbd5e1;
    border-top-color: var(--yb-brand);
    border-radius: 50%;
    animation: yb-spin 0.65s linear infinite;
}

@keyframes yb-spin {
    to { transform: rotate(360deg); }
}

.yb-human-badge {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    line-height: 1.15;
    user-select: none;
    flex-shrink: 0;
}

.yb-human-badge-title {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 10.5px;
    font-weight: 700;
    color: var(--yb-brand);
}

.yb-human-badge-sub {
    font-size: 9.5px;
    color: var(--yb-muted);
    font-weight: 500;
}

.yb-human-math {
    margin: -6px 0 14px;
    padding: 10px 12px;
    border: 1px solid #d4ddeb;
    border-radius: 8px;
    background: #ffffff;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    font-size: 12.5px;
}

:root[data-theme="dark"] .yb-human-card {
    background: #0b1526;
    border-color: #273a59;
}

:root[data-theme="dark"] .yb-human-card.is-verified {
    background: rgba(16, 163, 107, 0.12);
    border-color: rgba(16, 163, 107, 0.45);
}

:root[data-theme="dark"] .yb-human-check {
    background: #0f1a2e;
    border-color: #3b5278;
}

:root[data-theme="dark"] .yb-human-math {
    background: #0f1a2e;
    border-color: #273a59;
}

.yb-back-btn {
    height: 44px;
    padding: 0 18px;
    border: 1px solid #d4ddeb;
    border-radius: 8px;
    background: #ffffff;
    color: var(--yb-ink-2);
    font-size: 13.5px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    flex-shrink: 0;
}

.yb-back-btn:hover {
    background: #f8fafc;
}

:root[data-theme="dark"] .yb-back-btn {
    background: #0f1a2e;
    border-color: #273a59;
    color: #cbd5e1;
}

.yb-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 20px 0;
    font-size: 12px;
    color: var(--yb-muted);
}

.yb-divider::before,
.yb-divider::after {
    content: "";
    flex: 1;
    height: 1px;
    background: #e5e9f2;
}

:root[data-theme="dark"] .yb-divider::before,
:root[data-theme="dark"] .yb-divider::after {
    background: #1e2d47;
}

.yb-oauth-stack {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.yb-oauth-btn {
    height: 42px;
    width: 100%;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    background: #ffffff;
    color: var(--yb-ink);
    padding: 0 12px;
    font-size: 13.5px;
    font-weight: 500;
    font-family: inherit;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    transition: background-color 140ms var(--yb-ease), border-color 140ms var(--yb-ease);
}

.yb-oauth-btn:hover {
    background: #f8fafc;
    border-color: #cbd5e1;
}

:root[data-theme="dark"] .yb-oauth-btn {
    background: #0f1a2e;
    border-color: #273a59;
    color: #f1f5f9;
}

.yb-oauth-center {
    display: inline-flex;
    align-items: center;
    gap: 9px;
}

.yb-oauth-spacer,
.yb-oauth-badge-slot {
    width: 78px;
    display: flex;
    justify-content: flex-end;
    flex-shrink: 0;
}

.yb-last-used-pill {
    display: inline-block;
    background: #eaf1fb;
    color: #0a5bd6;
    font-size: 10px;
    font-weight: 600;
    padding: 2px 6px;
    border-radius: 4px;
    white-space: nowrap;
}

.yb-login-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 14px;
}

.yb-remember-check {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-size: 12.5px;
    font-weight: 500;
    color: var(--yb-ink-2);
    cursor: pointer;
    user-select: none;
}

.yb-remember-check input {
    width: 15px;
    height: 15px;
    margin: 0;
    accent-color: var(--yb-brand);
    cursor: pointer;
}

.yb-ip-note {
    margin-top: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-size: 11px;
    color: #94a3b8;
    text-align: center;
}

.yb-legal-check {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 11px 12px;
    font-size: 12.5px;
    line-height: 1.5;
    margin-bottom: 10px;
    cursor: pointer;
}

:root[data-theme="dark"] .yb-legal-check {
    border-color: #1e2d47;
}

.yb-legal-check input {
    margin-top: 3px;
    accent-color: var(--yb-brand);
    flex-shrink: 0;
}

.yb-error-banner {
    margin-bottom: 14px;
    padding: 10px 13px;
    border-radius: 8px;
    border: 1px solid #fecaca;
    background: #fef2f2;
    color: #b91c1c;
    font-size: 12.5px;
    font-weight: 500;
}

.yb-modal-backdrop {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: rgba(15, 23, 42, 0.55);
    backdrop-filter: blur(2px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
}

.yb-modal-card {
    width: 100%;
    max-width: 660px;
    max-height: 82vh;
    background: #ffffff;
    color: var(--yb-ink);
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    box-shadow: 0 24px 64px rgba(15, 23, 42, 0.25);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

:root[data-theme="dark"] .yb-modal-card {
    background: #0f1a2e;
    border-color: #273a59;
    color: #f1f5f9;
}

@media (max-width: 960px) {
    .yb-split-page {
        grid-template-columns: minmax(0, 1fr);
    }
    .yb-split-left {
        position: relative;
        top: auto;
        height: auto;
        min-height: 260px;
        padding: 28px 24px;
        border-right: none;
        box-shadow: none;
    }
    .yb-slide-desc {
        margin: 18px 0 16px;
        font-size: 13.5px;
    }
    .yb-split-right {
        min-height: auto;
        padding: 32px 20px 44px;
    }
    .yb-auth-box {
        margin: 0;
    }
}

/* ─── SIDEBAR + STICKY TOPBAR AUTHENTICATED PORTAL SHELL ─── */
.yb-portal-shell {
    display: flex;
    min-height: 100vh;
    width: 100%;
    background: var(--bg);
}

.yb-sidebar {
    width: 256px;
    flex-shrink: 0;
    background: var(--card);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    position: sticky;
    top: 0;
    height: 100vh;
    z-index: 1020;
    transition: transform 220ms var(--yb-ease);
}

.yb-sidebar-head {
    height: 64px;
    padding: 0 20px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    flex-shrink: 0;
}

.yb-sidebar-brand {
    display: inline-flex;
    align-items: center;
    text-decoration: none;
    min-width: 0;
}

.yb-sidebar-brand img {
    height: 30px;
    width: auto;
    max-width: 175px;
    object-fit: contain;
}

.yb-sidebar-close {
    display: none;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: transparent;
    color: var(--muted);
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.yb-sidebar-nav {
    flex: 1;
    overflow-y: auto;
    padding: 14px 12px 20px;
}

.yb-sb-group {
    margin-bottom: 18px;
}

.yb-sb-group:last-child {
    margin-bottom: 0;
}

.yb-sb-label {
    padding: 0 10px 6px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--muted);
}

.yb-sb-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    margin-bottom: 2px;
    border-radius: 8px;
    font-size: 13.5px;
    font-weight: 500;
    color: var(--yb-ink-2);
    text-decoration: none;
    transition: background-color 140ms var(--yb-ease), color 140ms var(--yb-ease);
    white-space: nowrap;
}

.yb-sb-link i {
    font-size: 16px;
    opacity: 0.78;
    width: 18px;
    text-align: center;
    flex-shrink: 0;
}

.yb-sb-link:hover {
    background: var(--yb-soft);
    color: var(--yb-brand);
}

.yb-sb-link.active {
    background: var(--yb-soft-2);
    color: var(--yb-brand);
    font-weight: 600;
}

.yb-sb-link.active i {
    opacity: 1;
    color: var(--yb-brand);
}

.yb-sidebar-foot {
    padding: 12px;
    border-top: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex-shrink: 0;
}

.yb-sidebar-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.5);
    backdrop-filter: blur(2px);
    z-index: 1010;
}

.yb-sidebar-backdrop.open {
    display: block;
}

.yb-shell-main {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.yb-topbar {
    height: 64px;
    background: rgba(255, 255, 255, 0.94);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border);
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    position: sticky;
    top: 0;
    z-index: 900;
}

:root[data-theme="dark"] .yb-topbar {
    background: rgba(15, 26, 46, 0.94) !important;
    border-bottom-color: var(--border) !important;
}

.yb-topbar-left {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.yb-sidebar-toggle {
    display: none;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: var(--card);
    color: var(--text);
    align-items: center;
    justify-content: center;
    cursor: pointer;
    flex-shrink: 0;
}

.yb-crumb {
    display: flex;
    align-items: center;
    gap: 7px;
    font-size: 13px;
    color: var(--muted);
    min-width: 0;
    white-space: nowrap;
}

.yb-crumb-title {
    color: var(--text);
    font-weight: 600;
    overflow: hidden;
    text-overflow: ellipsis;
}

.yb-topbar-right {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.yb-profile-wrap {
    position: relative;
}

.yb-profile-btn {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    height: 38px;
    padding: 3px 10px 3px 4px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 10px;
    color: var(--text);
    font-size: 13px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: border-color 150ms var(--yb-ease), background-color 150ms var(--yb-ease);
    white-space: nowrap;
}

.yb-profile-btn:hover,
.yb-profile-wrap.open .yb-profile-btn {
    border-color: var(--yb-brand);
    background: var(--yb-soft-2);
    color: var(--yb-brand);
}

.yb-profile-avatar {
    width: 28px;
    height: 28px;
    border-radius: 9999px;
    object-fit: cover;
    border: 1px solid var(--border);
    background: var(--yb-soft-2);
    flex-shrink: 0;
}

.yb-profile-name {
    max-width: 150px;
    overflow: hidden;
    text-overflow: ellipsis;
}

.yb-profile-dd {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    width: 256px;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 12px;
    box-shadow: 0 16px 38px rgba(15, 23, 42, 0.14);
    padding: 6px;
    z-index: 1200;
}

.yb-profile-wrap.open .yb-profile-dd {
    display: block;
}

.yb-prof-balance {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 10px 12px;
    margin: 2px 2px 6px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 9px;
}

.yb-prof-balance-lbl {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--muted);
}

.yb-prof-balance-val {
    font-size: 16px;
    font-weight: 700;
    color: var(--yb-brand);
    font-variant-numeric: tabular-nums;
    line-height: 1.25;
}

.yb-balance-plus {
    width: 30px;
    height: 30px;
    border-radius: 8px;
    background: var(--yb-brand);
    color: #ffffff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    font-size: 16px;
    font-weight: 700;
    flex-shrink: 0;
    transition: background-color 140ms var(--yb-ease);
}

.yb-balance-plus:hover {
    background: var(--yb-brand-600);
    color: #ffffff;
}

.yb-prof-link {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 8px 10px;
    border-radius: 7px;
    font-size: 13px;
    font-weight: 500;
    color: var(--text);
    text-decoration: none;
    transition: background-color 120ms, color 120ms;
}

.yb-prof-link i {
    font-size: 15px;
    opacity: 0.78;
    width: 17px;
    text-align: center;
}

.yb-prof-link:hover {
    background: var(--yb-soft-2);
    color: var(--yb-brand);
}

.yb-prof-sep {
    height: 1px;
    background: var(--border);
    margin: 5px 6px;
}

.yb-prof-logout {
    display: flex;
    align-items: center;
    gap: 9px;
    width: 100%;
    padding: 8px 10px;
    border-radius: 7px;
    font-size: 13px;
    font-weight: 600;
    color: var(--yb-err);
    background: none;
    border: none;
    cursor: pointer;
    text-align: left;
    font-family: inherit;
}

.yb-prof-logout:hover {
    background: rgba(214, 58, 58, 0.08);
}

@media (max-width: 1024px) {
    .yb-sidebar {
        position: fixed;
        top: 0;
        left: 0;
        bottom: 0;
        transform: translateX(-100%);
        box-shadow: 12px 0 36px rgba(15, 23, 42, 0.18);
    }
    .yb-sidebar.open {
        transform: translateX(0);
    }
    .yb-sidebar-close,
    .yb-sidebar-toggle {
        display: inline-flex;
    }
    .yb-topbar {
        padding: 0 16px;
    }
}

@media (max-width: 640px) {
    .yb-profile-name {
        display: none;
    }
}

.yb-mainsite-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: 8px 12px;
    font-size: 13px;
    font-weight: 600;
    color: var(--yb-ink-2);
    border: 1px solid var(--yb-line);
    border-radius: 8px;
    background: var(--yb-soft);
    text-decoration: none;
    white-space: nowrap;
}

.yb-mainsite-link:hover {
    border-color: var(--yb-brand);
    color: var(--yb-brand);
    background: var(--yb-soft-2);
}

.pn-main {
    width: 100%;
    max-width: 1240px;
    margin: 0 auto;
    padding: 28px 28px 44px;
    flex: 1;
}

@media (max-width: 768px) {
    .pn-main {
        padding: 18px 16px 32px;
    }
}

.pn-welcome {
    background: var(--yb-bg);
    border: 1px solid var(--yb-line);
    border-radius: 14px;
    box-shadow: var(--yb-sh-1);
    padding: 24px 28px;
    margin-bottom: 22px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
    position: relative;
    overflow: hidden;
}

.pn-welcome::before {
    content: "";
    position: absolute;
    inset: 0 0 auto 0;
    height: 3px;
    background: var(--yb-grad);
}

.pn-welcome-text h2 {
    color: var(--yb-ink);
    font-size: 20px;
    font-weight: 700;
}

.pn-welcome-text p {
    color: var(--yb-muted);
    font-size: 13.5px;
    margin-top: 4px;
}

.pn-welcome-credit {
    background: var(--yb-soft);
    border: 1px solid var(--yb-line);
    border-radius: 10px;
    padding: 12px 18px;
    text-align: right;
}

.pn-welcome-credit .credit-val {
    color: var(--yb-brand);
    font-weight: 700;
}

.pn-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 12px;
    box-shadow: var(--yb-sh-1);
    margin-bottom: 20px;
}

.pn-card-header {
    padding: 16px 24px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.pn-card-title {
    font-size: 14.5px;
    font-weight: 700;
    color: var(--text);
}

.pn-card-body {
    padding: 24px;
}

.btn,
.pn-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    min-height: 38px;
    padding: 8px 16px;
    font-size: 13px;
    font-weight: 600;
    border-radius: 8px;
    text-decoration: none;
    cursor: pointer;
    border: 1px solid transparent;
    white-space: nowrap;
    transition: background-color 150ms var(--yb-ease), border-color 150ms var(--yb-ease), color 150ms var(--yb-ease);
}

.btn-primary,
.pn-btn-primary {
    background: var(--yb-brand);
    color: #ffffff;
}

.btn-primary:hover,
.pn-btn-primary:hover {
    background: var(--yb-brand-600);
    color: #ffffff;
}

.btn-outline,
.btn-default {
    background: var(--card);
    color: var(--yb-ink);
    border: 1px solid var(--yb-line-2);
}

.btn-outline:hover,
.btn-default:hover {
    border-color: var(--yb-brand);
    color: var(--yb-brand);
    background: var(--yb-soft);
}

.btn-sm {
    min-height: 34px;
    padding: 6px 12px;
    font-size: 12.5px;
}

.btn-xs {
    min-height: 28px;
    padding: 4px 10px;
    font-size: 11.5px;
    border-radius: 6px;
}

.pn-table th {
    background: var(--yb-soft);
    color: var(--yb-muted);
    font-size: 11.5px;
    font-weight: 700;
    letter-spacing: 0.04em;
    border-bottom: 1px solid var(--border);
}

.pn-table td {
    padding: 13px 16px;
    font-size: 13.5px;
    border-bottom: 1px solid var(--border);
}

.form-control,
.pn-input {
    min-height: 40px;
    padding: 8px 13px;
    font-size: 13.5px;
    border: 1px solid var(--yb-line-2);
    border-radius: 8px;
    background: var(--card);
    color: var(--text);
}

.form-control:focus,
.pn-input:focus {
    border-color: var(--yb-brand);
    box-shadow: 0 0 0 3px rgba(10, 91, 214, 0.12);
}

.pn-footer {
    background: var(--card);
    border-top: 1px solid var(--border);
    padding: 18px 28px;
    font-size: 12.5px;
    color: var(--muted);
    margin-top: auto;
}

.pn-footer-inner {
    max-width: 1240px;
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px 24px;
}

.pn-footer-links {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 16px;
}

.yb-auth-body {
    font-family: 'IBM Plex Sans', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
    background: var(--yb-soft);
    color: var(--yb-ink);
    min-height: 100vh;
    margin: 0;
    display: flex;
    flex-direction: column;
}

.yb-auth-main-center {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 36px 16px;
}

.yb-auth-card {
    width: 100%;
    max-width: 430px;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 14px;
    box-shadow: var(--yb-sh-2);
    padding: 32px;
}
