html {
    -webkit-font-smoothing: auto;
    -moz-osx-font-smoothing: auto;
    text-rendering: optimizeLegibility;
}


/* Distribution workspace v2: task-first layout without card stacks */
.dist-head-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.member-distribution-head p {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0;
}

.dist-account-separation {
    display: inline-flex;
    align-items: center;
    margin-left: 10px;
    padding-left: 10px;
    border-left: 1px solid #cbd5e1;
}

.dist-promotion-console {
    display: grid;
    grid-template-columns: minmax(220px, 300px) minmax(360px, 1fr);
    align-items: end;
    gap: 18px;
    min-width: 0;
    padding: 18px 20px;
    border-block: 1px solid #cbd5e1;
    background: #f4f7fb;
}

.dist-promotion-source,
.dist-promotion-link {
    min-width: 0;
}

.dist-promotion-source label,
.dist-promotion-link label {
    display: block;
    margin-bottom: 5px;
    color: #64748b;
    font-size: 11px;
    font-weight: 650;
}

.dist-promotion-source > span {
    display: block;
    margin-top: 5px;
    overflow: hidden;
    color: #64748b;
    font-size: 11px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.dist-promotion-link .input-group,
.dist-promotion-link .form-control {
    min-width: 0;
}

.dist-promotion-link .btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
}

.dist-balance-band {
    display: grid;
    grid-template-columns: minmax(190px, .75fr) minmax(0, 2.25fr);
    margin-bottom: 20px;
    border-bottom: 1px solid #dbe3ee;
    background: rgb(255 255 255 / 72%);
}

.dist-balance-primary {
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 104px;
    padding: 16px 20px;
    border-right: 1px solid #dbe3ee;
}

.dist-balance-primary span,
.dist-balance-metrics span {
    color: #64748b;
    font-size: 11px;
    font-weight: 650;
}

.dist-balance-primary strong {
    margin-top: 2px;
    color: #0f172a;
    font-size: 30px;
    font-variant-numeric: tabular-nums;
    line-height: 1.2;
    letter-spacing: 0;
}

.dist-balance-primary small,
.dist-balance-metrics small {
    margin-top: 3px;
    overflow: hidden;
    color: #94a3b8;
    font-size: 11px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.dist-balance-metrics {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.dist-balance-metrics > div {
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-width: 0;
    min-height: 104px;
    padding: 15px 17px;
    border-right: 1px solid #e8edf3;
}

.dist-balance-metrics > div:last-child {
    border-right: 0;
}

.dist-balance-metrics strong {
    margin-top: 3px;
    color: #172033;
    font-size: 18px;
    font-variant-numeric: tabular-nums;
    line-height: 1.3;
    letter-spacing: 0;
    white-space: nowrap;
}

.dist-primary-tabs button span {
    margin-left: 4px;
    color: #2563eb;
    font-size: 11px;
    font-variant-numeric: tabular-nums;
}

.dist-pane-head > div:first-child {
    min-width: 0;
}

.dist-pane-head h2 {
    margin: 0;
    color: #172033;
    font-size: 15px;
    font-weight: 720;
    letter-spacing: 0;
}

.dist-pane-head > div > span {
    display: block;
    margin-top: 2px;
    color: #64748b;
    font-size: 11px;
}

.distribution-overview-line {
    display: grid;
    grid-template-columns: repeat(4, minmax(120px, 1fr));
    margin-bottom: 18px;
    overflow-x: auto;
    border-block: 1px solid #dbe3ee;
    background: rgb(255 255 255 / 78%);
}

.distribution-overview-line > div {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    min-height: 56px;
    padding: 12px 16px;
    border-right: 1px solid #e2e8f0;
}

.distribution-overview-line > div:last-child {
    border-right: 0;
}

.distribution-overview-line span {
    color: #64748b;
    font-size: 11px;
    font-weight: 620;
    white-space: nowrap;
}

.distribution-overview-line strong {
    color: #172033;
    font-size: 20px;
    font-variant-numeric: tabular-nums;
    letter-spacing: 0;
}

.distribution-overview-line .distribution-overview-risk strong {
    color: #b91c1c;
}

.distribution-workspace {
    grid-template-columns: 184px minmax(0, 1fr);
    column-gap: 24px;
}

.distribution-directory {
    min-height: 660px;
}

.distribution-directory button {
    min-height: 40px;
}

.distribution-stage-filter {
    min-width: 0;
    overflow-x: auto;
}

.distribution-stage-filter > span,
.distribution-rule-member-filter > label {
    flex: 0 0 auto;
    margin: 0 4px 0 0;
    color: #64748b;
    font-size: 11px;
    font-weight: 650;
    white-space: nowrap;
}

.distribution-filter-tabs {
    display: flex;
    align-self: stretch;
    gap: 18px;
}

.distribution-filter-tabs button {
    min-width: 44px;
    padding: 0 1px;
    border: 0;
    border-radius: 0;
    color: #64748b;
    background: transparent;
    font-size: 12px;
    font-weight: 620;
    white-space: nowrap;
}

.distribution-filter-tabs button:hover {
    color: #172033;
}

.distribution-filter-tabs button.active {
    color: #172033;
    box-shadow: inset 0 -2px #2563eb;
}

.distribution-rule-member-filter > .form-select {
    width: min(320px, 100%);
}

.distribution-rule-member-filter > span {
    overflow: hidden;
    color: #64748b;
    font-size: 11px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.distribution-rule-scope {
    display: inline-block;
    padding-left: 7px;
    border-left: 3px solid #2563eb;
    color: #1d4ed8;
    font-size: 11px;
    font-weight: 700;
    line-height: 1.3;
    white-space: nowrap;
}

.distribution-rule-scope.fallback {
    border-left-color: #94a3b8;
    color: #64748b;
}

@media (max-width: 1050px) {
    .dist-promotion-console {
        grid-template-columns: minmax(140px, 180px) minmax(0, 1fr);
    }

    .dist-promotion-link {
        grid-column: 1 / -1;
    }

    .dist-balance-band {
        grid-template-columns: 1fr;
    }

    .dist-balance-primary {
        min-height: 88px;
        border-right: 0;
        border-bottom: 1px solid #dbe3ee;
    }

    .dist-balance-metrics > div {
        min-height: 82px;
    }
}

@media (max-width: 820px) {
    .dist-balance-metrics {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .dist-balance-metrics > div:nth-child(2) {
        border-right: 0;
    }

    .dist-balance-metrics > div:nth-child(n + 3) {
        border-top: 1px solid #e8edf3;
    }

    .distribution-overview-line {
        grid-template-columns: repeat(4, minmax(150px, 1fr));
    }

    .distribution-directory {
        min-height: 0;
    }

    .distribution-filter-tabs {
        gap: 14px;
    }
}

@media (max-width: 560px) {
    .dist-head-actions {
        display: grid;
        grid-template-columns: 1fr 1fr;
        width: 100%;
    }

    .dist-head-actions .btn {
        width: 100%;
    }

    .dist-account-separation {
        width: 100%;
        margin: 3px 0 0;
        padding: 0;
        border-left: 0;
    }

    .dist-promotion-console {
        grid-template-columns: 1fr;
        gap: 13px;
        padding: 15px 0;
        background: transparent;
    }

    .dist-promotion-link {
        grid-column: auto;
    }

    .dist-promotion-link .btn span {
        display: none;
    }

    .dist-balance-primary {
        padding-inline: 0;
    }

    .dist-balance-metrics > div {
        padding-inline: 10px;
    }

    .dist-primary-tabs {
        gap: 18px;
    }

    .distribution-overview-line {
        margin-inline: -14px;
        padding-inline: 14px;
    }

    .distribution-stage-filter {
        align-items: stretch;
        flex-direction: column;
    }

    .distribution-filter-tabs {
        min-height: 38px;
        overflow-x: auto;
    }

    .distribution-rule-member-filter {
        align-items: stretch;
        flex-direction: column;
    }

    .distribution-rule-member-filter > .form-select {
        width: 100%;
    }
}

/* Market workspace */
.market-page-header {
    align-items: flex-end;
    gap: 20px;
    margin-bottom: 18px;
}

.market-page-header .page-title {
    margin-bottom: 4px;
}

.market-header-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 0 0 auto;
}

.market-metrics {
    margin-bottom: 18px;
}

.market-workspace {
    overflow: hidden;
}

.market-pane-intro {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 14px;
}

.market-pane-intro h2 {
    margin: 0 0 4px;
    color: #111827;
    font-size: 17px;
    font-weight: 700;
}

.market-pane-intro p {
    margin: 0;
    color: #64748b;
    font-size: 12px;
}

.market-result-count {
    flex: 0 0 auto;
    padding-top: 3px;
    color: #64748b;
    font-size: 12px;
    white-space: nowrap;
}

.market-filter-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
}

.market-filter-bar .form-select {
    width: 150px;
}

.market-filter-bar .market-product-select {
    width: min(320px, 42%);
}

.market-search-field {
    width: min(320px, 42%);
}

.market-info-strip,
.market-upload-note {
    display: flex;
    align-items: flex-start;
    gap: 9px;
    margin-bottom: 12px;
    padding: 10px 12px;
    border: 1px solid #bfdbfe;
    border-radius: 6px;
    color: #1e40af;
    background: #eff6ff;
    font-size: 12px;
    line-height: 1.55;
}

.market-info-strip i,
.market-upload-note > i {
    flex: 0 0 auto;
    margin-top: 2px;
}

.market-upload-note {
    color: #334155;
    background: #f8fafc;
    border-color: #e2e8f0;
}

.market-upload-note strong,
.market-upload-note span {
    display: block;
}

.market-upload-note span {
    margin-top: 2px;
    color: #64748b;
}

.market-table-wrap {
    overflow: auto;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    background: #fff;
}

.market-table {
    min-width: 840px;
    margin: 0;
}

.market-table thead th {
    height: 42px;
    color: #64748b;
    background: #f8fafc;
    font-size: 11px;
    font-weight: 700;
    white-space: nowrap;
}

.market-table tbody td {
    height: 62px;
    vertical-align: middle;
    font-size: 13px;
}

.market-table tbody tr:hover td {
    background: #f8fafc;
}

.market-actions-col {
    text-align: right;
}

.market-row-actions {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    flex-wrap: wrap;
    gap: 5px;
}

.market-row-actions .btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.market-type-badge,
.market-model-badge,
.market-channel-badge {
    display: inline-flex;
    align-items: center;
    min-height: 22px;
    padding: 2px 7px;
    border: 1px solid #cbd5e1;
    border-radius: 999px;
    color: #334155;
    background: #f8fafc;
    font-size: 11px;
    font-weight: 650;
}

.market-channel-badge.channel-stable {
    border-color: #bbf7d0;
    color: #166534;
    background: #f0fdf4;
}

.market-channel-badge.channel-beta {
    border-color: #fde68a;
    color: #92400e;
    background: #fffbeb;
}

.market-channel-badge.channel-internal {
    border-color: #ddd6fe;
    color: #6d28d9;
    background: #f5f3ff;
}

.market-cover-preview {
    position: relative;
    width: 100%;
    max-width: 180px;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    border: 1px solid #dbe3ee;
    border-radius: 6px;
    background: #f8fafc;
}

.market-cover-preview img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.market-cover-preview span {
    position: absolute;
    right: 6px;
    bottom: 5px;
    left: 6px;
    overflow: hidden;
    color: #475569;
    font-size: 10px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.market-detail-image-editor {
    display: grid;
    grid-template-columns: repeat(auto-fill, 132px);
    gap: 10px;
    align-items: start;
    justify-content: start;
}

.market-detail-image-item {
    position: relative;
    width: 132px;
    height: 92px;
    overflow: hidden;
    border: 1px solid #dbe3ee;
    border-radius: 6px;
    background: #f8fafc;
}

.market-detail-image-item.is-new {
    border-color: #93c5fd;
}

.market-detail-image-item img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.market-detail-image-item .market-detail-image-remove {
    position: absolute;
    top: 6px;
    right: 6px;
    width: 26px;
    height: 26px;
    padding: 0;
    border: 1px solid rgba(148, 163, 184, .55);
}

.market-detail-image-order {
    position: absolute;
    top: 6px;
    left: 6px;
    display: flex;
    align-items: center;
    overflow: hidden;
    border: 1px solid rgba(148, 163, 184, .55);
    border-radius: 4px;
    background: rgba(255, 255, 255, .94);
}

.market-detail-image-order .btn {
    width: 24px;
    height: 24px;
    padding: 0;
    border: 0;
    border-radius: 0;
}

.market-detail-image-order strong {
    min-width: 22px;
    color: #334155;
    font-size: 10px;
    text-align: center;
}

.market-detail-image-item span {
    position: absolute;
    right: 6px;
    bottom: 5px;
    left: 6px;
    overflow: hidden;
    padding: 2px 5px;
    color: #fff;
    font-size: 10px;
    line-height: 1.4;
    text-overflow: ellipsis;
    white-space: nowrap;
    background: rgba(15, 23, 42, .72);
    border-radius: 3px;
}

.market-detail-image-empty {
    grid-column: 1 / -1;
    padding: 18px;
    color: #64748b;
    text-align: center;
    border: 1px dashed #cbd5e1;
    border-radius: 6px;
    background: #f8fafc;
}

.market-form-section {
    margin-bottom: 18px;
    padding-bottom: 4px;
    border-bottom: 1px solid #eef2f7;
}

.market-form-section:last-child {
    margin-bottom: 0;
    border-bottom: 0;
}

.market-form-section-title {
    margin-bottom: 10px;
    color: #334155;
    font-size: 12px;
    font-weight: 750;
}

.market-manifest-editor {
    min-height: 180px;
    resize: vertical;
    tab-size: 2;
}

.market-upload-progress {
    height: 5px;
    margin-top: 8px;
}

.market-modal-kicker {
    margin-bottom: 3px;
    color: #2563eb;
    font-size: 10px;
    font-weight: 750;
    letter-spacing: .08em;
    text-transform: uppercase;
}

@media (max-width: 720px) {
    .market-page-header {
        align-items: flex-start;
        flex-direction: column;
        gap: 12px;
    }

    .market-header-actions {
        width: 100%;
        justify-content: space-between;
    }

    .market-filter-bar {
        align-items: stretch;
        flex-wrap: wrap;
    }

    .market-search-field,
    .market-filter-bar .market-product-select {
        width: 100%;
    }

    .market-filter-bar .form-select {
        flex: 1 1 145px;
        width: auto;
    }

    .market-pane-intro {
        flex-direction: column;
        gap: 4px;
    }
}

@media (max-width: 560px) {
    .market-header-actions .btn {
        flex: 1 1 0;
    }

    .market-table {
        min-width: 760px;
    }

    .market-row-actions {
        justify-content: flex-start;
    }
}

/* Member authentication uses the same restrained dark-green language as the official site. */
.auth-shell:has(> .member-login-shell) {
    padding: 28px;
    background: #edf2ee;
}

.auth-shell:has(> .member-login-shell) > .auth-bg-svg { display: none; }

.auth-shell > .member-login-shell {
    width: min(900px, 100%);
    height: 620px;
    min-height: 620px;
    display: grid;
    grid-template-columns: minmax(340px, .92fr) minmax(400px, 1.08fr);
    border: 1px solid #d7e2da;
    border-radius: 10px;
    background: #f7f9f7;
    box-shadow: 0 24px 70px rgba(24, 35, 31, .16);
}

.member-login-shell .member-login-panel {
    position: relative;
    min-width: 0;
    overflow: hidden;
    justify-content: flex-start;
    padding: 30px;
    color: #f2eee4;
    background: #07130f;
}

.member-login-shell .member-login-panel::before {
    inset: 14px;
    border-color: rgba(183, 237, 201, .13);
    border-radius: 8px;
}

.member-login-field {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.member-login-arc {
    fill: none;
    stroke: #5da978;
    stroke-width: 2;
    stroke-dasharray: 7 13;
}

.member-login-arc-primary { opacity: .36; animation: member-login-line 24s linear infinite; }
.member-login-arc-secondary { opacity: .18; animation: member-login-line 34s linear infinite reverse; }
.member-login-orbit { stroke: #b7edc9; stroke-width: 1; opacity: .1; }
.member-login-nodes circle { fill: #72e39a; opacity: .5; }

@keyframes member-login-line {
    to { stroke-dashoffset: -240; }
}

.member-login-shell .login-brand-lockup {
    position: relative;
    z-index: 2;
    width: fit-content;
    align-items: center;
    gap: 14px;
    text-decoration: none;
}

.member-login-shell .login-brand-logo {
    width: 132px;
    height: auto;
    border: 0;
    border-radius: 0;
    padding: 0;
    background: transparent;
    box-shadow: none;
}

.member-login-shell .login-brand-lockup > span {
    padding-left: 14px;
    border-left: 1px solid rgba(238, 232, 219, .2);
    color: rgba(238, 232, 219, .68);
    font-size: 12px;
    line-height: 1.4;
}

.member-login-intro {
    position: relative;
    z-index: 2;
    max-width: 590px;
    margin-top: 36px;
    padding-top: 0;
}

.member-login-eyebrow,
.member-login-form-eyebrow {
    color: #72e39a;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .14em;
}

.member-login-intro h1 {
    margin: 0;
    color: #fff;
    font-size: 35px;
    font-weight: 760;
    line-height: 1.05;
    letter-spacing: 0;
}

.member-login-intro p {
    max-width: 500px;
    margin: 16px 0 0;
    color: rgba(238, 232, 219, .62);
    font-size: 13px;
    line-height: 1.8;
}

.member-login-status {
    position: relative;
    z-index: 2;
    display: grid;
    max-width: 590px;
    margin-top: 22px;
    border-top: 1px solid rgba(238, 232, 219, .14);
}

.member-login-status > div {
    min-height: 46px;
    display: grid;
    grid-template-columns: 24px minmax(0, 1fr) auto;
    align-items: center;
    gap: 14px;
    border-bottom: 1px solid rgba(238, 232, 219, .14);
}

.member-login-status i { color: #72e39a; font-size: 16px; }
.member-login-status span { min-width: 0; display: grid; gap: 3px; }
.member-login-status strong { color: #f2eee4; font-size: 13px; font-weight: 700; }
.member-login-status small { color: rgba(238, 232, 219, .46); font-size: 11px; }
.member-login-status b { color: rgba(183, 237, 201, .76); font-size: 11px; font-weight: 650; }

.member-login-shell .login-brand-meta {
    position: relative;
    z-index: 2;
    margin-top: auto;
    padding-top: 16px;
    gap: 20px;
}

.member-login-shell .login-brand-meta span {
    position: relative;
    border: 0;
    border-radius: 0;
    padding: 0;
    color: rgba(238, 232, 219, .4);
    background: transparent;
    font-size: 10px;
    letter-spacing: .08em;
}

.member-login-shell .login-brand-meta span + span::before {
    content: "";
    position: absolute;
    top: 50%;
    left: -11px;
    width: 2px;
    height: 2px;
    border-radius: 50%;
    background: #72e39a;
}

.member-login-shell .login-form-panel {
    position: relative;
    min-width: 0;
    align-items: center;
    justify-content: flex-start;
    padding: 52px 46px 40px;
    color: #18231f;
    background: #f7f9f7;
}

.member-login-back {
    position: absolute;
    top: 20px;
    right: 30px;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    color: #65716c;
    font-size: 12px;
    font-weight: 650;
    text-decoration: none;
}

.member-login-back i { color: #087a48; transition: transform .2s ease; }
.member-login-back:hover { color: #18231f; }
.member-login-back:hover i { transform: translate(2px, -2px); }

.member-login-form-wrap { width: min(420px, 100%); }

.member-login-shell .login-form-head {
    align-items: center;
    margin-bottom: 24px;
}

.member-login-shell .member-login-icon {
    width: 42px;
    height: 42px;
    flex: 0 0 42px;
    border: 1px solid #cce8d5;
    border-radius: 7px;
    color: #087a48;
    background: #e9f7ee;
}

.member-login-shell .member-login-form-eyebrow {
    display: block;
    margin-bottom: 7px;
    color: #087a48;
}

.member-login-shell .login-form-head h2 {
    color: #18231f;
    font-size: 26px;
    line-height: 1.15;
    letter-spacing: 0;
}

.member-login-shell .login-form-head p {
    margin-top: 5px;
    color: #65716c;
    font-size: 12px;
    line-height: 1.6;
}

.member-login-shell .member-auth-tabs {
    gap: 0;
    margin-bottom: 18px;
    border-color: #d7e2da;
    border-radius: 7px;
    padding: 3px;
    background: #edf2ee;
}

.member-login-shell .member-auth-tabs button {
    min-height: 39px;
    border-radius: 5px;
    color: #65716c;
    font-size: 13px;
    transition: color .2s ease, background-color .2s ease, box-shadow .2s ease;
}

.member-login-shell .member-auth-tabs button.active {
    color: #087a48;
    background: #fff;
    box-shadow: 0 1px 3px rgba(24, 35, 31, .1);
}

.member-login-shell .login-field { margin-bottom: 14px; }
.member-login-shell .login-field .form-label { margin-bottom: 7px; color: #34413b; font-size: 12px; font-weight: 700; }

.member-login-shell .login-input > i {
    left: 15px;
    color: #718079;
    font-size: 15px;
}

.member-login-shell .login-input .form-control {
    height: 48px;
    border: 1px solid #cbd8cf;
    border-radius: 7px;
    padding-left: 43px;
    color: #18231f;
    background: #fff;
    font-size: 14px;
}

.member-login-shell .login-input .form-control::placeholder { color: #9aa59f; }
.member-login-shell .login-input .form-control:hover { border-color: #9eb4a6; }
.member-login-shell .login-input .form-control:focus {
    border-color: #12b76a;
    box-shadow: 0 0 0 3px rgba(18, 183, 106, .11);
}

.member-login-shell .login-icon-btn {
    right: 8px;
    width: 34px;
    height: 34px;
    border-radius: 5px;
    color: #65716c;
}

.member-login-shell .login-icon-btn:hover { color: #087a48; background: #edf7f0; }

.member-login-shell .member-login-terms {
    align-items: center;
    margin: 0 0 14px;
    color: #65716c;
    font-size: 12px;
}

.member-login-shell .member-login-terms input {
    width: 15px;
    height: 15px;
    margin-top: 0;
    accent-color: #087a48;
}

.member-login-shell .member-login-terms a { color: #087a48; text-underline-offset: 4px; }
.member-login-shell .member-login-terms a:hover { text-decoration: underline; }

.member-login-shell .login-submit {
    height: 50px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    border-color: #087a48;
    border-radius: 7px;
    color: #fff;
    background: #087a48;
    font-size: 13px;
    font-weight: 750;
    transition: background-color .2s ease, transform .2s ease;
}

.member-login-shell .login-submit:hover,
.member-login-shell .login-submit:focus-visible { border-color: #05683e; background: #05683e; transform: translateY(-1px); }
.member-login-shell .login-submit i { transition: transform .2s ease; }
.member-login-shell .login-submit:hover i { transform: translateX(3px); }

.member-login-shell .login-submit.is-loading::before,
.member-login-shell .member-demo-login-submit.is-loading::before {
    content: "";
    width: 14px;
    height: 14px;
    flex: 0 0 14px;
    border: 2px solid currentColor;
    border-right-color: transparent;
    border-radius: 50%;
    animation: login-button-spin .7s linear infinite;
}

.member-login-shell .login-submit.is-loading > i,
.member-login-shell .member-demo-login-submit.is-loading > i { display: none; }

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

.member-login-shell .member-demo-login-submit {
    min-height: 46px;
    border-color: #b9c9be;
    border-radius: 7px;
    color: #34413b;
    background: transparent;
    font-size: 13px;
    font-weight: 700;
}

.member-login-shell .member-demo-login-submit:hover { border-color: #087a48; color: #087a48; background: #edf7f0; }

.member-login-shell .member-recovery-link { color: #65716c; font-size: 12px; }
.member-login-shell .member-recovery-link:hover { color: #087a48; text-decoration: none; }

.platform-login-notice {
    min-height: 42px;
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0 0 22px;
    border-top: 1px solid #dfe7e1;
    border-bottom: 1px solid #dfe7e1;
    color: #65716c;
    font-size: 11px;
}

.platform-login-notice i { color: #087a48; font-size: 15px; }
.platform-login-shell .platform-login-submit { margin-top: 12px; }

.member-login-form-foot {
    position: absolute;
    right: 30px;
    bottom: 14px;
    left: 30px;
    display: flex;
    justify-content: flex-end;
    color: #99a49e;
    font-size: 10px;
}

.member-login-form-foot i { color: #087a48; }

.member-login-panel,
.member-login-form-wrap { animation: member-login-enter .55s cubic-bezier(.22,.7,.25,1) both; }
.member-login-form-wrap { animation-delay: .08s; }

@keyframes member-login-enter {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: none; }
}

#modal-member-password-recovery .modal-content {
    border: 1px solid #d7e2da;
    border-radius: 8px;
    box-shadow: 0 24px 70px rgba(24, 35, 31, .2);
}

#modal-member-password-recovery .modal-header,
#modal-member-password-recovery .modal-footer { border-color: #e3eae5; }

@media (max-width: 980px) {
    .auth-shell > .member-login-shell { grid-template-columns: minmax(320px, .86fr) minmax(390px, 1.14fr); }
    .member-login-shell .member-login-panel { padding: 34px; }
    .member-login-intro h1 { font-size: 36px; }
    .member-login-status > div { grid-template-columns: 22px minmax(0, 1fr); }
    .member-login-status b { display: none; }
    .member-login-shell .login-form-panel { padding-inline: 40px; }
}

@media (max-width: 760px) {
    .auth-shell > .member-login-shell {
        max-width: none;
        height: auto;
        min-height: 0;
        grid-template-columns: 1fr;
        border-radius: 10px;
    }

    .member-login-shell .member-login-panel {
        min-height: 210px;
        padding: 28px 24px 30px;
        justify-content: flex-start;
    }

    .member-login-shell .member-login-panel::before { inset: 10px; }
    .member-login-shell .login-brand-lockup { position: relative; top: auto; left: auto; }
    .member-login-shell .login-brand-logo { width: 112px; height: auto; }
    .member-login-shell .login-brand-lockup > span { font-size: 10px; }
    .member-login-intro { margin-top: 36px; padding-top: 0; }
    .member-login-intro h1 { margin-top: 12px; font-size: 30px; }
    .member-login-intro p { max-width: 360px; margin-top: 14px; font-size: 12px; }
    .member-login-status, .member-login-shell .login-brand-meta { display: none; }

    .member-login-shell .login-form-panel {
        min-height: 540px;
        justify-content: flex-start;
        padding: 68px 22px 56px;
    }

    .member-login-back { top: 24px; right: 22px; }
    .member-login-shell .login-form-head { margin-bottom: 24px; }
    .member-login-shell .login-form-head h2 { font-size: 24px; }
    .member-login-form-foot { right: 22px; bottom: 20px; left: 22px; }
}

@media (max-width: 380px) {
    .member-login-shell .member-login-panel { min-height: 222px; padding: 24px 20px; }
    .member-login-intro { margin-top: 34px; }
    .member-login-intro h1 { font-size: 30px; }
    .member-login-intro p { display: none; }
    .member-login-shell .login-form-panel { padding-inline: 18px; }
    .member-login-form-foot { right: 18px; left: 18px; }
}

@media (prefers-reduced-motion: reduce) {
    .member-login-arc-primary,
    .member-login-arc-secondary,
    .member-login-panel,
    .member-login-form-wrap { animation: none; }
}

/* Distribution member association: account -> eligibility -> strategy -> rule -> commission account. */
.distribution-relation-guide {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0 0 14px;
    padding: 10px 0;
    overflow-x: auto;
    border-bottom: 1px solid #e2e8f0;
    color: #475569;
    font-size: 11px;
    white-space: nowrap;
}

.distribution-relation-guide span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.distribution-relation-guide b {
    display: inline-grid;
    width: 20px;
    height: 20px;
    place-items: center;
    border-radius: 50%;
    color: #fff;
    background: #2563eb;
    font-size: 10px;
}

.distribution-relation-guide i {
    color: #94a3b8;
}

.distribution-member-table th:nth-child(1) { min-width: 190px; }
.distribution-member-table th:nth-child(2) { min-width: 150px; }
.distribution-member-table th:nth-child(3) { min-width: 220px; }
.distribution-member-table th:nth-child(4) { min-width: 160px; }
.distribution-member-table th:last-child { min-width: 220px; }

.distribution-assign-step {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 9px;
}

.distribution-assign-step > span {
    display: inline-grid;
    width: 24px;
    height: 24px;
    flex: 0 0 24px;
    place-items: center;
    border-radius: 50%;
    color: #fff;
    background: #2563eb;
    font-size: 11px;
    font-weight: 700;
}

.distribution-assign-step div,
.distribution-selected-member div,
.distribution-strategy-preview div {
    display: flex;
    min-width: 0;
    flex-direction: column;
}

.distribution-assign-step strong,
.distribution-selected-member strong,
.distribution-strategy-preview strong {
    color: #172033;
    font-size: 13px;
}

.distribution-assign-step small,
.distribution-selected-member span,
.distribution-strategy-preview span {
    color: #64748b;
    font-size: 11px;
}

.distribution-candidate-list {
    max-height: 260px;
    overflow-y: auto;
    border-block: 1px solid #e2e8f0;
}

.distribution-candidate {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    width: 100%;
    padding: 10px 9px;
    border: 0;
    border-bottom: 1px solid #f1f5f9;
    border-radius: 0;
    color: #172033;
    background: #fff;
    text-align: left;
}

.distribution-candidate:last-child {
    border-bottom: 0;
}

.distribution-candidate:hover,
.distribution-candidate.selected {
    background: #eff6ff;
}

.distribution-candidate.unavailable {
    cursor: not-allowed;
    opacity: .58;
}

.distribution-candidate > span {
    display: grid;
    min-width: 0;
}

.distribution-candidate strong,
.distribution-candidate small {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.distribution-candidate small {
    color: #64748b;
    font-size: 11px;
}

.distribution-candidate em {
    flex: 0 0 auto;
    color: #2563eb;
    font-size: 11px;
    font-style: normal;
    font-weight: 650;
}

.distribution-selected-member,
.distribution-strategy-preview {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 0;
    border-bottom: 1px solid #e2e8f0;
}

.distribution-selected-member > i,
.distribution-strategy-preview > i {
    display: inline-grid;
    width: 32px;
    height: 32px;
    flex: 0 0 32px;
    place-items: center;
    border-radius: 6px;
    color: #1d4ed8;
    background: #eff6ff;
}

.distribution-strategy-preview {
    border-bottom: 0;
}

.distribution-payout-link {
    display: block;
    max-width: 220px;
    margin-top: 4px;
    padding: 0;
    overflow: hidden;
    border: 0;
    color: #2563eb;
    background: transparent;
    font-size: 11px;
    text-align: left;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.distribution-payout-link:hover {
    color: #1d4ed8;
    text-decoration: underline;
}

.distribution-payout-list {
    border-block: 1px solid #e2e8f0;
}

.distribution-payout-dialog {
    max-width: 780px;
}

.distribution-payout-dialog .modal-content {
    overflow: hidden;
    border: 1px solid #dbe3ee;
    border-radius: 10px;
    box-shadow: 0 18px 48px rgba(15, 23, 42, .18);
}

.distribution-payout-header {
    align-items: flex-start;
    padding: 18px 20px;
    border-bottom: 1px solid #e2e8f0;
    background: #f8fafc;
}

.distribution-payout-title,
.distribution-payout-member,
.distribution-payout-section-head {
    display: flex;
    align-items: center;
    gap: 12px;
}

.distribution-payout-title > div,
.distribution-payout-member-main,
.distribution-payout-section-head > div,
.distribution-payout-account-main {
    min-width: 0;
}

.distribution-payout-title-icon,
.distribution-payout-member-icon,
.distribution-payout-method-icon {
    display: inline-grid;
    width: 36px;
    height: 36px;
    flex: 0 0 36px;
    place-items: center;
    border-radius: 8px;
}

.distribution-payout-title-icon {
    width: 40px;
    height: 40px;
    flex-basis: 40px;
    color: #1d4ed8;
    background: #dbeafe;
}

.distribution-payout-title h5 {
    margin: 0;
    color: #172033;
    font-size: 16px;
}

.distribution-payout-title span:not(.distribution-payout-title-icon),
.distribution-payout-member-main span,
.distribution-payout-section-head span {
    display: block;
    margin-top: 3px;
    color: #64748b;
    font-size: 12px;
}

.distribution-payout-body {
    padding: 0 20px 20px;
}

.distribution-payout-member {
    margin-bottom: 18px;
    padding: 14px 16px;
    border: 1px solid #dbe3ee;
    border-radius: 8px;
    background: #f8fafc;
}

.distribution-payout-member-icon {
    color: #0f766e;
    background: #ecfdf5;
}

.distribution-payout-member-main {
    flex: 1 1 auto;
}

.distribution-payout-member-main strong {
    color: #172033;
    font-size: 14px;
}

.distribution-payout-member-account {
    flex: 0 0 auto;
    text-align: right;
}

.distribution-payout-member-account small {
    display: block;
    color: #94a3b8;
    font-size: 11px;
}

.distribution-payout-member-account code {
    color: #334155;
    font-size: 12px;
}

.distribution-payout-section-head {
    justify-content: space-between;
    margin-bottom: 10px;
    padding: 0 2px;
}

.distribution-payout-section-head > div {
    flex: 1 1 auto;
}

.distribution-payout-section-head strong {
    color: #172033;
    font-size: 13px;
}

.distribution-payout-section-head > i {
    color: #0f766e;
}

.distribution-payout-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 11px 2px;
    border-bottom: 1px solid #f1f5f9;
}

.distribution-payout-row:last-child {
    border-bottom: 0;
}

.distribution-payout-method-icon.bank {
    color: #1d4ed8;
    background: #eff6ff;
}

.distribution-payout-method-icon.alipay {
    color: #0369a1;
    background: #e0f2fe;
}

.distribution-payout-account-main {
    flex: 1 1 auto;
}

.distribution-payout-account-heading {
    display: flex;
    align-items: center;
    gap: 8px;
}

.distribution-payout-account-main code {
    display: inline-block;
    max-width: 100%;
    margin-top: 5px;
    padding: 5px 8px;
    overflow-wrap: anywhere;
    border: 1px solid #e2e8f0;
    border-radius: 5px;
    color: #172033;
    background: #f8fafc;
    font-size: 13px;
    font-weight: 700;
}

.distribution-payout-status,
.distribution-payout-default {
    display: inline-flex;
    align-items: center;
    padding: 2px 7px;
    border-radius: 999px;
    font-size: 10px;
    font-style: normal;
    font-weight: 700;
}

.distribution-payout-status.pending {
    color: #92400e;
    background: #fef3c7;
}

.distribution-payout-status.active {
    color: #166534;
    background: #dcfce7;
}

.distribution-payout-status.rejected {
    color: #991b1b;
    background: #fee2e2;
}

.distribution-payout-actions {
    display: flex;
    align-items: center;
    flex: 0 0 auto;
    gap: 6px;
}

.distribution-payout-empty {
    display: grid;
    place-items: center;
    gap: 5px;
    padding: 28px 12px;
    color: #64748b;
    text-align: center;
}

.distribution-payout-empty > i {
    margin-bottom: 4px;
    color: #94a3b8;
    font-size: 24px;
}

.distribution-payout-empty strong {
    color: #334155;
    font-size: 13px;
}

.distribution-payout-empty span,
.distribution-payout-notice {
    color: #64748b;
    font-size: 12px;
}

.distribution-payout-notice {
    display: flex;
    align-items: flex-start;
    gap: 7px;
    margin-top: 14px;
    padding: 10px 12px;
    border: 1px solid #dbeafe;
    border-radius: 6px;
    color: #1e40af;
    background: #eff6ff;
}

.distribution-payout-notice i {
    flex: 0 0 auto;
    margin-top: 1px;
}

.distribution-payout-row > i {
    display: inline-grid;
    width: 32px;
    height: 32px;
    flex: 0 0 32px;
    place-items: center;
    border-radius: 6px;
    color: #166534;
    background: #f0fdf4;
}

.distribution-payout-row > div {
    display: flex;
    min-width: 0;
    flex: 1 1 auto;
    flex-direction: column;
}

.distribution-payout-row strong,
.distribution-payout-row span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.distribution-payout-row strong {
    color: #172033;
    font-size: 13px;
}

.distribution-payout-row span {
    color: #64748b;
    font-size: 11px;
}

.distribution-payout-row em {
    flex: 0 0 auto;
    color: #166534;
    font-size: 11px;
    font-style: normal;
    font-weight: 700;
}

@media (max-width: 820px) {
    .distribution-relation-guide {
        margin-inline: -2px;
        padding-inline: 2px;
    }
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", "PingFang SC", Arial, sans-serif;
    color: #1e293b;
}

.auth-shell {
    position: relative;
    display: grid;
    place-items: center;
    padding: 28px;
    overflow: hidden;
    background: #eef3f8;
}

.auth-bg-svg {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    opacity: .72;
}

.auth-bg-grid path {
    stroke: rgba(71, 85, 105, .07);
    stroke-width: 1;
}

.auth-bg-waves path {
    transform-box: fill-box;
    transform-origin: center;
}

.auth-wave-back {
    fill: rgba(147, 197, 253, .18);
    animation: auth-wave-drift 14s ease-in-out infinite;
}

.auth-wave-front {
    fill: rgba(45, 212, 191, .12);
    animation: auth-wave-drift 10s ease-in-out infinite reverse;
}

.auth-shell > .login-shell {
    position: relative;
    z-index: 1;
}

.auth-shell-full {
    display: block;
    padding: 0;
}

.login-shell {
    width: min(920px, 100%);
    min-height: 560px;
    display: grid;
    grid-template-columns: minmax(280px, 1fr) minmax(360px, 420px);
    background: rgba(255, 255, 255, .96);
    border: 1px solid #d8e2ec;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 24px 70px rgba(30, 41, 59, .18);
}

.login-brand-panel {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 42px;
    background:
        linear-gradient(135deg, rgba(94, 234, 212, .16), rgba(96, 165, 250, .12)),
        linear-gradient(160deg, #12343b, #155e75 62%, #334155 140%);
    color: #fff;
}

.login-bg-svg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: .26;
    pointer-events: none;
}

.login-bg-topology path {
    stroke: rgba(255, 255, 255, .30);
    stroke-width: 2;
}

.login-bg-topology rect {
    fill: rgba(255, 255, 255, .08);
    stroke: rgba(255, 255, 255, .30);
    stroke-width: 1;
}

.login-bg-lines path {
    stroke: rgba(255, 255, 255, .34);
    stroke-width: 2;
    stroke-linecap: round;
}

@keyframes auth-wave-drift {
    0%, 100% {
        transform: translate3d(-24px, 0, 0);
    }
    50% {
        transform: translate3d(24px, -10px, 0);
    }
}

.login-bg-topology rect:nth-of-type(2),
.login-bg-topology rect:nth-of-type(4),
.login-bg-topology rect:nth-of-type(7) {
    fill: rgba(94, 234, 212, .14);
}

.login-brand-panel::before {
    content: "";
    position: absolute;
    inset: 22px;
    border: 1px solid rgba(255, 255, 255, .12);
    border-radius: 10px;
    pointer-events: none;
}

.login-brand-lockup {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    gap: 12px;
}

.login-brand-logo {
    width: 48px;
    height: 48px;
    flex: 0 0 auto;
    display: block;
    object-fit: contain;
    border: 2px solid #fff;
    border-radius: 6px;
    padding: 2px;
    background: #050505;
    box-shadow: 0 8px 22px rgba(2, 12, 18, .22);
}

.login-brand-lockup strong,
.login-brand-lockup span {
    display: block;
}

.login-brand-lockup strong {
    color: #fff;
    font-size: 18px;
    line-height: 1.2;
    font-weight: 800;
}

.login-brand-lockup span {
    margin-top: 4px;
    color: rgba(255, 255, 255, .68);
    font-size: 12px;
}

.login-number-board {
    position: relative;
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 12px;
    max-width: 300px;
}

.login-number-tile {
    min-height: 92px;
    display: flex;
    align-items: flex-end;
    gap: 5px;
    padding: 16px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, .16);
    background: rgba(15, 23, 42, .22);
    backdrop-filter: blur(6px);
}

.login-number-main {
    grid-row: span 2;
    min-height: 196px;
}

.login-number-tile strong {
    font-size: 34px;
    line-height: .9;
    font-weight: 800;
    color: #fff;
}

.login-number-main strong {
    font-size: 54px;
}

.login-number-tile span {
    color: rgba(255, 255, 255, .65);
    font-size: 15px;
    font-weight: 700;
}

.login-brand-meta {
    position: relative;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.login-brand-meta span {
    border: 1px solid rgba(255, 255, 255, .18);
    border-radius: 999px;
    color: rgba(255, 255, 255, .76);
    font-size: 12px;
    line-height: 1;
    padding: 8px 10px;
    background: rgba(15, 23, 42, .18);
}

.login-form-panel {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 42px;
}

.login-form-head {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 30px;
}

.login-form-icon {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border-radius: 10px;
    background: #e0f2fe;
    color: #0369a1;
    font-size: 20px;
}

.login-form-head h2 {
    margin: 0;
    font-size: 22px;
    font-weight: 750;
    color: #0f172a;
}

.login-form-head p {
    margin: 4px 0 0;
    font-size: 13px;
    color: #64748b;
}

.login-field {
    margin-bottom: 18px;
}

.login-field .form-label {
    font-size: 13px;
    font-weight: 600;
    color: #334155;
    margin-bottom: 8px;
}

.login-input {
    position: relative;
}

.login-input > i {
    position: absolute;
    left: 13px;
    top: 50%;
    transform: translateY(-50%);
    color: #64748b;
    font-size: 16px;
    pointer-events: none;
}

.login-input .form-control {
    height: 44px;
    border-color: #cbd5e1;
    padding-left: 40px;
    padding-right: 42px;
    border-radius: 8px;
}

.login-input .form-control:focus {
    border-color: #14b8a6;
    box-shadow: 0 0 0 .2rem rgba(20, 184, 166, .14);
}

.login-icon-btn {
    position: absolute;
    right: 6px;
    top: 50%;
    transform: translateY(-50%);
    width: 32px;
    height: 32px;
    border: 0;
    border-radius: 7px;
    background: transparent;
    color: #64748b;
}

.login-icon-btn:hover {
    background: #f1f5f9;
    color: #0f172a;
}

.login-submit {
    height: 44px;
    border-radius: 8px;
    font-weight: 650;
    margin-top: 4px;
}

@media (max-width: 760px) {
    .auth-shell {
        padding: 16px;
    }

    .login-shell {
        min-height: auto;
        grid-template-columns: 1fr;
    }

    .login-brand-panel {
        min-height: 180px;
        padding: 30px;
    }

    .login-number-board {
        max-width: none;
        grid-template-columns: repeat(4, 1fr);
    }

    .login-number-tile,
    .login-number-main {
        min-height: 72px;
        grid-row: auto;
    }

    .login-number-tile strong,
    .login-number-main strong {
        font-size: 26px;
    }

    .login-form-panel {
        padding: 30px;
    }
}

.member-login-icon {
    background: #ecfdf5;
    color: #047857;
}

.member-login-panel {
    background:
        linear-gradient(135deg, rgba(187, 247, 208, .18), rgba(125, 211, 252, .12)),
        linear-gradient(160deg, #134e4a, #166534 68%, #334155 150%);
}

.member-auth-tabs {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
    border: 1px solid #dbe4ee;
    border-radius: 8px;
    background: #f8fafc;
    padding: 4px;
    margin: 0 0 18px;
}

.member-auth-tabs button {
    min-height: 36px;
    border: 0;
    border-radius: 6px;
    background: transparent;
    color: #64748b;
    font-size: 14px;
    font-weight: 750;
}

.member-auth-tabs button.active {
    background: #fff;
    color: #0f766e;
    box-shadow: 0 1px 3px rgba(15, 23, 42, .12);
}

.member-shell {
    position: relative;
    display: block;
    min-width: 0;
    background: #f6f8fb;
    color: #111827;
}

.member-bg-anim {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    overflow: hidden;
}

.member-bg-anim svg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: .9;
    transform-origin: 50% 50%;
}

.member-bg-shark {
    fill: rgba(15, 118, 110, .18);
    stroke: rgba(15, 118, 110, .24);
    stroke-width: 1.4;
    transform-box: fill-box;
    transform-origin: center;
    opacity: var(--shark-opacity, .16);
    animation: member-shark-swim var(--swim-duration, 30s) linear infinite;
    animation-delay: var(--swim-delay, 0s);
}

.member-bg-shark path[fill="none"] {
    stroke: rgba(15, 118, 110, .32);
    stroke-width: 2;
}

@keyframes member-shark-swim {
    from {
        transform: translate3d(var(--swim-start, -640px), 0, 0) rotate(var(--rotate-from, 0deg));
    }
    to {
        transform: translate3d(var(--swim-end, 1480px), var(--swim-lift, 0), 0) rotate(var(--rotate-to, 0deg));
    }
}

@media (prefers-reduced-motion: reduce) {
    .auth-bg-waves path,
    .member-bg-anim svg,
    .member-bg-shark {
        animation: none;
    }
}

.member-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 2;
    width: 248px;
    height: 100vh;
    display: flex;
    flex-direction: column;
    flex: 0 0 auto;
    background: #f8fafc;
    border-right: 1px solid #e2e8f0;
}

.member-sidebar-brand {
    height: 70px;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0 22px;
    border-bottom: 1px solid #e2e8f0;
    color: #141414;
    font-size: 18px;
    font-weight: 800;
}

.member-sidebar-brand i {
    color: #0f766e;
}

.member-sidebar-logo,
.saas-brand-logo {
    width: 32px;
    height: 32px;
    flex: 0 0 auto;
    display: block;
    object-fit: contain;
    border: 2px solid #fff;
    border-radius: 6px;
    padding: 2px;
    background: #050505;
}

.member-sidebar-nav {
    flex: 1;
    overflow-y: auto;
    padding: 18px 12px;
}

.member-sidebar-label {
    color: #94a3b8;
    font-size: 12px;
    font-weight: 700;
    margin: 16px 12px 8px;
}

.member-sidebar-link {
    height: 40px;
    display: flex;
    align-items: center;
    gap: 12px;
    border-radius: 10px;
    padding: 0 14px;
    color: #475569;
    font-size: 14px;
    font-weight: 750;
    text-decoration: none;
}

.member-sidebar-link i {
    width: 22px;
    color: #64748b;
    font-size: 16px;
}

.member-sidebar-link:hover,
.member-sidebar-link.active {
    color: #0f766e;
    background: #e8f5f2;
}

.member-sidebar-link:hover i,
.member-sidebar-link.active i {
    color: #0f766e;
}

.member-sidebar-account {
    padding: 14px 12px 18px;
    border-top: 1px solid #e2e8f0;
}

.member-sidebar-user {
    min-height: 58px;
    padding: 8px 8px 12px;
}

.member-sidebar-user strong,
.member-sidebar-user span {
    display: block;
}

.member-sidebar-user strong {
    color: #191919;
    font-size: 14px;
}

.member-sidebar-user span {
    color: #94a3b8;
    font-size: 12px;
    margin-top: 4px;
}

.member-sidebar-home,
.member-sidebar-logout {
    width: 100%;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 750;
}

.member-sidebar-home {
    border: 0;
    background: #0f766e;
    color: #fff;
    margin-bottom: 10px;
}

.member-sidebar-logout {
    border: 1px solid #cbd5e1;
    background: transparent;
    color: #475569;
}

.member-workspace {
    position: relative;
    min-width: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    margin-left: 248px;
}

.member-topbar {
    height: 58px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 40px;
    background: transparent;
}

.member-topbar-user {
    font-size: 13px;
}

.member-topbar-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    font-weight: 500;
    color: #94a3b8;
}

.member-topbar-title i {
    color: #0f766e;
}

.member-main {
    flex: 1 0 auto;
    padding: 0 40px 40px;
}

.workspace-copyright {
    position: relative;
    z-index: 1;
    min-height: 48px;
    display: flex;
    align-items: center;
    flex: 0 0 auto;
    padding: 0 40px;
    border-top: 1px solid rgba(148, 163, 184, .18);
    color: #94a3b8;
    font-size: 11px;
    line-height: 1.5;
}

.member-dashboard {
    max-width: 1690px;
    margin: 0 auto;
}

.member-page-head {
    margin: 0 0 24px;
}

.member-page-head h1 {
    margin: 0;
    color: #111827;
    font-size: 26px;
    line-height: 1.2;
    font-weight: 850;
}

.member-page-head p {
    margin: 8px 0 0;
    color: #697386;
    font-size: 14px;
}

.member-demo-banner {
    display: flex;
    align-items: center;
    gap: 14px;
    min-height: 46px;
    margin: 0 0 16px;
    padding: 8px 14px;
    border: 1px solid #f2cf66;
    border-left: 4px solid #d99a16;
    border-radius: 6px;
    background: #fff9e8;
    color: #6f4c0b;
}

.member-demo-banner-label {
    display: inline-flex;
    align-items: center;
    flex: 0 0 auto;
    gap: 7px;
    font-size: 13px;
    font-weight: 800;
}

.member-demo-banner p {
    margin: 0;
    color: #775b25;
    font-size: 13px;
    line-height: 1.5;
}

.member-shell .panel,
.member-metric-card,
.member-service-panel {
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    background: rgba(255, 255, 255, .9);
    box-shadow: 0 1px 4px rgba(17, 24, 39, .12);
    backdrop-filter: blur(10px);
}

.member-shell .panel-head {
    min-height: 56px;
    border-bottom: 1px solid #edf2f7;
}

.member-shell .panel-head h2 {
    color: #111827;
    font-size: 18px;
    font-weight: 850;
}

.member-shell .text-primary,
.member-shell .panel-head .text-primary {
    color: #0f766e !important;
}

.member-shell .btn-primary {
    border-color: #0f766e;
    background: #0f766e;
}

.member-shell .btn-primary:hover,
.member-shell .btn-primary:focus {
    border-color: #0d5f59;
    background: #0d5f59;
}

.member-shell .btn-outline-primary {
    color: #0f766e;
    border-color: #0f766e;
}

.member-shell .btn-outline-primary:hover,
.member-shell .btn-outline-primary:focus {
    color: #fff;
    border-color: #0f766e;
    background: #0f766e;
}

.member-shell .btn-outline-success {
    color: #0f766e;
    border-color: #5bb9ad;
}

.member-shell .btn-outline-success:hover,
.member-shell .btn-outline-success:focus {
    color: #fff;
    border-color: #0f766e;
    background: #0f766e;
}

.member-shell .btn-outline-warning {
    color: #a16207;
    border-color: #d6a63b;
}

.member-shell .btn-outline-warning:hover,
.member-shell .btn-outline-warning:focus {
    color: #111827;
    border-color: #f0b429;
    background: #f0b429;
}

.member-shell .btn-outline-secondary {
    color: #475569;
    border-color: #cbd5e1;
}

.member-shell .btn-outline-secondary:hover,
.member-shell .btn-outline-secondary:focus {
    color: #0f172a;
    border-color: #94a3b8;
    background: #e2e8f0;
}

.member-overview {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(320px, .8fr);
    gap: 16px;
    margin-bottom: 16px;
}

.member-service-panel {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 200px;
    padding: 20px;
}

.member-service-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    margin-top: 18px;
}

.member-service-head h2 {
    margin: 0;
    font-size: 22px;
    font-weight: 780;
    color: #0f172a;
}

.member-service-head p {
    margin: 8px 0 0;
    color: #475569;
    font-size: 14px;
    max-width: 460px;
}

.member-service-foot {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-top: 22px;
    color: #64748b;
    font-size: 13px;
}

.member-hero {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: center;
    background: #fff;
    border: 1px solid #dbe4ee;
    border-radius: 10px;
    padding: 24px;
    margin-bottom: 16px;
}

.member-hero h2 {
    margin: 0;
    font-size: 26px;
    font-weight: 780;
    color: #0f172a;
}

.member-service-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 34px;
    padding: 0 12px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 700;
    border: 1px solid #cbd5e1;
    color: #334155;
    background: #f8fafc;
}

.member-service-pill[data-service-status="normal"] {
    color: #3f9b4b;
    background: #f3fbf3;
    border-color: #7fbd7f;
}

.member-service-pill[data-service-status="provisioning"],
.member-service-pill[data-service-status="pending"],
.member-service-pill[data-service-status="pending_review"] {
    color: #0369a1;
    background: #eff6ff;
    border-color: #bfdbfe;
}

.member-service-pill[data-service-status="abnormal"],
.member-service-pill[data-service-status="rejected"] {
    color: #b91c1c;
    background: #fef2f2;
    border-color: #fecaca;
}

.member-service-pill[data-service-status="paused"] {
    color: #a16207;
    background: #fefce8;
    border-color: #fde68a;
}

.member-service-pill[data-service-status="disabled"],
.member-service-pill[data-service-status="destroyed"] {
    color: #475569;
    background: #f1f5f9;
    border-color: #cbd5e1;
}

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

.member-metric-card {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    min-height: 92px;
    padding: 14px;
}

.member-metric-card::after,
.member-info-strip > div::after,
.member-status-card::after {
    content: "";
    position: absolute;
    right: -30px;
    bottom: -36px;
    width: 162px;
    height: 128px;
    z-index: 0;
    pointer-events: none;
    opacity: .38;
    background: url("data:image/svg+xml,%3Csvg width='220' height='170' viewBox='0 0 220 170' xmlns='http://www.w3.org/2000/svg'%3E%3Crect x='50' y='34' width='124' height='72' rx='16' fill='%23ccfbf1'/%3E%3Crect x='82' y='70' width='122' height='72' rx='16' fill='%2399f6e4' fill-opacity='.72'/%3E%3Cpath d='M82 52h76M100 88h82M118 122h60' stroke='%230f766e' stroke-opacity='.24' stroke-width='10' stroke-linecap='round'/%3E%3C/svg%3E") center / contain no-repeat;
}

.member-metric-grid .member-metric-card:nth-child(1)::after {
    background-image: url("data:image/svg+xml,%3Csvg width='220' height='170' viewBox='0 0 220 170' xmlns='http://www.w3.org/2000/svg'%3E%3Crect x='54' y='36' width='118' height='98' rx='18' fill='%2394a3b8' fill-opacity='.16'/%3E%3Crect x='54' y='36' width='118' height='28' rx='18' fill='%2364748b' fill-opacity='.16'/%3E%3Cpath d='M84 30v20M142 30v20M82 84h18M118 84h18M154 84h18M82 112h18M118 112h18' stroke='%23475569' stroke-opacity='.18' stroke-width='10' stroke-linecap='round'/%3E%3C/svg%3E");
}

.member-metric-grid .member-metric-card:nth-child(2)::after {
    background-image: url("data:image/svg+xml,%3Csvg width='220' height='170' viewBox='0 0 220 170' xmlns='http://www.w3.org/2000/svg'%3E%3Crect x='50' y='42' width='120' height='92' rx='20' fill='%2394a3b8' fill-opacity='.16'/%3E%3Cpath d='M78 42c4-22 20-34 42-34s38 12 42 34' stroke='%2364748b' stroke-opacity='.16' stroke-width='12' stroke-linecap='round' fill='none'/%3E%3Cpath d='M84 78h52M84 104h32' stroke='%23475569' stroke-opacity='.18' stroke-width='10' stroke-linecap='round'/%3E%3Ccircle cx='154' cy='108' r='22' fill='%2364748b' fill-opacity='.12'/%3E%3Cpath d='M154 96v24M142 108h24' stroke='%23475569' stroke-opacity='.18' stroke-width='8' stroke-linecap='round'/%3E%3C/svg%3E");
}

.member-metric-grid .member-metric-card:nth-child(3)::after {
    background-image: url("data:image/svg+xml,%3Csvg width='220' height='170' viewBox='0 0 220 170' xmlns='http://www.w3.org/2000/svg'%3E%3Crect x='44' y='40' width='132' height='86' rx='18' fill='%2394a3b8' fill-opacity='.16'/%3E%3Cpath d='M74 76h72M74 102h42' stroke='%23475569' stroke-opacity='.18' stroke-width='10' stroke-linecap='round'/%3E%3Ccircle cx='164' cy='124' r='28' fill='%2364748b' fill-opacity='.13'/%3E%3Cpath d='M164 108v16l14 8' stroke='%23475569' stroke-opacity='.2' stroke-width='9' stroke-linecap='round'/%3E%3C/svg%3E");
}

.member-metric-grid .member-metric-card:nth-child(4)::after {
    background-image: url("data:image/svg+xml,%3Csvg width='220' height='170' viewBox='0 0 220 170' xmlns='http://www.w3.org/2000/svg'%3E%3Crect x='42' y='38' width='136' height='94' rx='18' fill='%2394a3b8' fill-opacity='.16'/%3E%3Crect x='60' y='56' width='100' height='52' rx='10' fill='%2364748b' fill-opacity='.12'/%3E%3Cpath d='M82 136h56M110 108v28M86 78h48' stroke='%23475569' stroke-opacity='.18' stroke-width='10' stroke-linecap='round'/%3E%3Cpath d='M154 78l22 18-22 18' stroke='%23475569' stroke-opacity='.19' stroke-width='10' stroke-linecap='round' stroke-linejoin='round' fill='none'/%3E%3C/svg%3E");
}

.member-metric-grid .member-metric-card:nth-child(5)::after {
    background-image: url("data:image/svg+xml,%3Csvg width='220' height='170' viewBox='0 0 220 170' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M110 30l62 24v46c0 38-24 64-62 78-38-14-62-40-62-78V54l62-24z' fill='%2394a3b8' fill-opacity='.16'/%3E%3Cpath d='M84 96l18 18 38-44' stroke='%23475569' stroke-opacity='.2' stroke-width='13' stroke-linecap='round' stroke-linejoin='round' fill='none'/%3E%3Cpath d='M110 50l38 14v30' stroke='%2364748b' stroke-opacity='.15' stroke-width='10' stroke-linecap='round' fill='none'/%3E%3C/svg%3E");
}

.member-metric-grid .member-metric-card:nth-child(6)::after {
    background-image: url("data:image/svg+xml,%3Csvg width='220' height='170' viewBox='0 0 220 170' xmlns='http://www.w3.org/2000/svg'%3E%3Ccircle cx='104' cy='62' r='30' fill='%2394a3b8' fill-opacity='.16'/%3E%3Cpath d='M50 142c8-34 32-52 62-52s54 18 62 52' fill='%2364748b' fill-opacity='.12'/%3E%3Cpath d='M68 142h92M104 92c18 0 34-12 34-30' stroke='%23475569' stroke-opacity='.17' stroke-width='11' stroke-linecap='round'/%3E%3C/svg%3E");
}

.member-metric-card span {
    position: relative;
    z-index: 1;
    display: block;
    color: #64748b;
    font-size: 12px;
    margin-bottom: 10px;
}

.member-metric-card strong {
    position: relative;
    z-index: 1;
    color: #0f172a;
    font-size: 20px;
    line-height: 1.15;
    overflow-wrap: anywhere;
}

.member-vms-entry-card {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 9px;
}

.member-vms-entry-card strong {
    min-height: 24px;
}

.member-vms-entry-btn {
    position: relative;
    z-index: 1;
    min-height: 42px;
    max-width: 178px;
    border: 1px solid #bfdbfe;
    border-radius: 8px;
    padding: 5px 8px 5px 6px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #1d4ed8;
    background: #eff6ff;
    font: inherit;
    text-align: left;
    line-height: 1;
    box-shadow: 0 1px 0 rgba(255, 255, 255, .72) inset;
    transition: border-color .16s ease, background .16s ease, box-shadow .16s ease;
}

.member-vms-entry-btn:hover,
.member-vms-entry-btn:focus {
    border-color: #93c5fd;
    color: #1d4ed8;
    background: #dbeafe;
    box-shadow: 0 5px 14px rgba(37, 99, 235, .13);
}

.member-vms-entry-btn:disabled {
    color: #94a3b8;
    border-color: #e2e8f0;
    background: #f8fafc;
    box-shadow: none;
    cursor: not-allowed;
}

.member-vms-entry-icon {
    width: 18px;
    height: 18px;
    flex: 0 0 18px;
    display: grid;
    place-items: center;
    color: #2563eb;
    background: transparent;
    font-size: 16px;
}

.member-vms-entry-btn:disabled .member-vms-entry-icon {
    color: #94a3b8;
}

.member-vms-entry-main {
    min-width: 0;
    display: grid;
    gap: 3px;
}

.member-vms-entry-main span {
    margin: 0;
    color: inherit;
    font-size: 12px;
    font-weight: 850;
    line-height: 1.05;
}

.member-vms-entry-main .member-vms-entry-title {
    color: #64748b;
    font-size: 11px;
    font-weight: 750;
}

.member-vms-entry-btn > .bi-arrow-right-short {
    font-size: 16px;
    line-height: 1;
}

.member-section-page {
    padding-top: 4px;
}

.member-info-strip {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 16px;
}

.member-info-strip > div {
    position: relative;
    overflow: hidden;
    min-width: 0;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    background: rgba(255, 255, 255, .9);
    padding: 14px 16px;
    box-shadow: 0 1px 4px rgba(17, 24, 39, .08);
    backdrop-filter: blur(10px);
}

.member-info-strip span {
    position: relative;
    z-index: 1;
    display: block;
    color: #64748b;
    font-size: 12px;
    margin-bottom: 8px;
}

.member-info-strip strong {
    position: relative;
    z-index: 1;
    display: block;
    color: #0f172a;
    font-size: 18px;
    line-height: 1.2;
    overflow-wrap: anywhere;
}

.member-panel-hint {
    color: #64748b;
    font-size: 12px;
}

.member-plan-panel {
    margin-bottom: 16px;
}

.member-plan-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
}

.member-runtime-alert-list {
    display: grid;
    gap: 10px;
    padding: 14px;
}

.member-runtime-alert {
    display: grid;
    grid-template-columns: 36px minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
    min-width: 0;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    background: #fff;
    padding: 12px;
}

.member-runtime-alert.active.danger {
    border-color: #fecaca;
    background: #fff7f7;
}

.member-runtime-alert.active.warning {
    border-color: #fde68a;
    background: #fffdf2;
}

.member-runtime-alert.resolved {
    background: #f8fafc;
}

.member-runtime-alert-icon {
    width: 36px;
    height: 36px;
    display: grid;
    place-items: center;
    border-radius: 8px;
    color: #64748b;
    background: #f1f5f9;
    font-size: 18px;
}

.member-runtime-alert.active.danger .member-runtime-alert-icon {
    color: #b91c1c;
    background: #fee2e2;
}

.member-runtime-alert.active.warning .member-runtime-alert-icon {
    color: #a16207;
    background: #fef3c7;
}

.member-runtime-alert.resolved .member-runtime-alert-icon {
    color: #0f766e;
    background: #ccfbf1;
}

.member-runtime-alert-main {
    min-width: 0;
}

.member-runtime-alert-title {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.member-runtime-alert-title strong {
    color: #0f172a;
    font-size: 14px;
    line-height: 1.25;
}

.member-runtime-alert-title span {
    display: inline-flex;
    align-items: center;
    min-height: 22px;
    border-radius: 999px;
    padding: 0 8px;
    color: #475569;
    background: #f1f5f9;
    font-size: 12px;
    font-weight: 700;
}

.member-runtime-alert.active.danger .member-runtime-alert-title span {
    color: #b91c1c;
    background: #fee2e2;
}

.member-runtime-alert.active.warning .member-runtime-alert-title span {
    color: #a16207;
    background: #fef3c7;
}

.member-runtime-alert p {
    margin: 5px 0 0;
    color: #475569;
    font-size: 13px;
    line-height: 1.45;
    overflow-wrap: anywhere;
}

.member-runtime-alert-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 7px;
    color: #64748b;
    font-size: 12px;
}

.member-plan-row {
    display: grid;
    grid-template-columns: minmax(160px, .8fr) minmax(280px, 1.2fr) auto;
    align-items: center;
    gap: 14px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 14px 16px;
    background: #fff;
    min-width: 0;
}

.member-plan-name {
    font-size: 15px;
    font-weight: 750;
    color: #0f172a;
    margin-bottom: 6px;
}

.member-plan-price {
    font-size: 20px;
    font-weight: 800;
    color: #111827;
    line-height: 1;
}

.member-plan-price span {
    font-size: 12px;
    font-weight: 600;
    color: #64748b;
    margin-left: 2px;
}

.member-plan-specs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 14px;
    color: #475569;
    font-size: 13px;
}

.member-plan-specs span {
    display: flex;
    align-items: center;
    gap: 7px;
    min-width: 0;
}

.member-plan-specs i {
    color: #0f766e;
}

.member-ticket-panel {
    margin-bottom: 16px;
}

.member-ticket-list {
    display: grid;
    gap: 10px;
}

.member-ticket-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 14px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 12px 14px;
    background: #fff;
    min-width: 0;
}

.member-ticket-main {
    min-width: 0;
}

.member-ticket-title {
    color: #0f172a;
    font-weight: 750;
    margin-bottom: 4px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.member-ticket-meta {
    color: #64748b;
    font-size: 12px;
}

.member-ticket-side {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 0 0 auto;
}

.member-account-note {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    background: #f8fafc;
    color: #64748b;
    font-size: 13px;
    line-height: 1.6;
    padding: 12px;
    margin-top: 10px;
}

.member-account-note i {
    color: #0f766e;
    margin-top: 2px;
}

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

.ticket-detail-grid > div {
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    background: #f8fafc;
    padding: 10px 12px;
    min-width: 0;
}

.ticket-detail-grid span {
    display: block;
    color: #64748b;
    font-size: 12px;
    margin-bottom: 5px;
}

.ticket-detail-grid strong {
    color: #0f172a;
    font-size: 14px;
    overflow-wrap: anywhere;
}

.ticket-thread {
    display: grid;
    gap: 10px;
    max-height: 360px;
    overflow-y: auto;
    padding-right: 4px;
}

.ticket-message {
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 12px;
    background: #fff;
}

.ticket-message.platform {
    background: #ecfdf5;
    border-color: #99f6e4;
}

.ticket-message-meta {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    color: #64748b;
    font-size: 12px;
    margin-bottom: 8px;
}

.ticket-message-meta strong {
    color: #0f172a;
}

.ticket-status-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 22px;
    padding: 0 9px;
    border-radius: 999px;
    border: 1px solid transparent;
    font-size: 12px;
    font-weight: 750;
    line-height: 1;
    white-space: nowrap;
}

.ticket-status-open {
    color: #92400e;
    background: #fef3c7;
    border-color: #fde68a;
}

.ticket-status-processing {
    color: #1d4ed8;
    background: #dbeafe;
    border-color: #bfdbfe;
}

.ticket-status-replied {
    color: #166534;
    background: #dcfce7;
    border-color: #bbf7d0;
}

.ticket-status-closed {
    color: #334155;
    background: #f1f5f9;
    border-color: #cbd5e1;
}

.ticket-message-content {
    color: #334155;
    font-size: 14px;
    line-height: 1.55;
    overflow-wrap: anywhere;
}

.ticket-upload-previews {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    min-height: 24px;
}

.ticket-upload-preview {
    position: relative;
    width: 88px;
    min-width: 88px;
    overflow: hidden;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    background: #f8fafc;
}

.ticket-upload-preview img {
    display: block;
    width: 88px;
    height: 68px;
    object-fit: cover;
}

.ticket-upload-preview span {
    display: block;
    padding: 3px 5px;
    overflow: hidden;
    color: #64748b;
    font-size: 10px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ticket-upload-remove {
    position: absolute;
    top: 3px;
    right: 3px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: rgba(15, 23, 42, .72);
    color: #fff;
    cursor: pointer;
}

.ticket-attachment-gallery {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
}

.ticket-attachment-gallery a {
    display: block;
    width: 96px;
    height: 78px;
    overflow: hidden;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    background: #f8fafc;
}

.ticket-attachment-gallery img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.member-purchase-summary {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin-bottom: 16px;
}

.member-purchase-summary > div {
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 12px;
    background: #f8fafc;
}

.member-purchase-summary span {
    display: block;
    color: #64748b;
    font-size: 12px;
    margin-bottom: 6px;
}

.member-purchase-summary strong {
    color: #0f172a;
    font-size: 17px;
}

.member-contact-box {
    border: 1px solid #dbe4ee;
    border-radius: 10px;
    padding: 14px;
}

.member-contact-title {
    font-size: 14px;
    font-weight: 750;
    color: #0f172a;
    margin-bottom: 12px;
}

.member-login-terms {
    display: flex;
    align-items: flex-start;
    gap: 9px;
    color: #475569;
    font-size: 13px;
    line-height: 1.55;
    margin: 0 0 18px;
}

.member-login-terms input {
    flex: 0 0 auto;
    margin-top: 3px;
}

.member-login-terms a {
    color: #0f766e;
    font-weight: 700;
    text-decoration: none;
}

.member-recovery-link {
    border: 0;
    background: transparent;
    color: #64748b;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.5;
    text-decoration: none;
}

.member-recovery-link:hover,
.member-recovery-link:focus-visible {
    color: #334155;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.member-control-panel {
    margin-bottom: 16px;
}

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

.member-control-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    border: 1px solid #dbe4ee;
    border-radius: 10px;
    padding: 16px;
    background: #fbfdff;
}

.member-control-card.running {
    background: #ecfdf5;
    border-color: #bbf7d0;
}

.member-control-card.stopped,
.member-control-card.pending {
    background: #f8fafc;
}

.member-control-card.error {
    background: #fef2f2;
    border-color: #fecaca;
}

.member-control-name {
    color: #0f172a;
    font-size: 15px;
    font-weight: 750;
    margin-bottom: 4px;
}

.member-control-status {
    color: #64748b;
    font-size: 13px;
}

.member-control-actions {
    display: flex;
    align-items: center;
    gap: 6px;
    flex: 0 0 auto;
}

.member-control-actions .btn {
    width: 34px;
    height: 32px;
    padding: 0;
    display: inline-grid;
    place-items: center;
}

.member-control-metric .member-control-card {
    width: 100%;
    min-width: 0;
    display: block;
    border: 0;
    background: transparent;
    padding: 0;
    border-radius: 0;
}

.member-control-metric .member-control-name {
    display: none;
}

.member-control-metric .member-control-status {
    position: absolute;
    top: 14px;
    right: 14px;
    z-index: 2;
    max-width: 100%;
    font-size: 13px;
    line-height: 1.2;
    font-weight: 800;
    color: #0f172a;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.member-control-metric .member-control-actions {
    position: relative;
    z-index: 2;
    width: 100%;
    margin-top: 0;
    gap: 6px;
    justify-content: flex-start;
}

.member-control-metric .member-control-actions .btn {
    width: 30px;
    height: 30px;
    font-size: 13px;
}

#member-service-controls {
    min-width: 0;
}

.member-grid-rich {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
}

.member-account-panel {
    grid-column: 1 / -1;
}

.member-key-row {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
    min-height: 30px;
}

.member-key-row .member-access-key {
    flex: 1;
    min-height: 30px;
    padding: 5px 8px;
    display: inline-flex;
    align-items: center;
    line-height: 1.25;
}

.member-key-row .btn {
    width: 30px;
    height: 30px;
    padding: 0;
    display: inline-grid;
    place-items: center;
    flex: 0 0 auto;
}

.member-open-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    max-width: 100%;
    overflow-wrap: anywhere;
}

.member-open-link-button {
    border: 0;
    padding: 0;
    color: #0f766e;
    background: transparent;
    font: inherit;
    text-align: left;
}

.member-open-link-button:hover,
.member-open-link-button:focus {
    color: #0d5f59;
    text-decoration: underline;
}

.member-open-link-button:disabled {
    color: #94a3b8;
    cursor: not-allowed;
    text-decoration: none;
}

.member-vms-init-modal {
    border: 0;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 24px 80px rgba(15, 23, 42, .22);
}

.member-vms-init-modal .modal-header {
    align-items: flex-start;
    gap: 14px;
    border-bottom-color: #e2e8f0;
    background: #fff;
    padding: 18px 20px;
}

.member-vms-init-modal .modal-title {
    color: #0f172a;
    font-size: 19px;
    font-weight: 850;
}

.member-vms-init-modal .modal-title i {
    color: #0f766e;
}

.member-vms-init-modal .modal-body {
    padding: 18px 20px 20px;
    background: #f8fafc;
}

.member-vms-init-subtitle {
    margin-top: 5px;
    color: #64748b;
    font-size: 13px;
}

.member-vms-init-badge {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 0 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 800;
    white-space: nowrap;
    color: #075985;
    border: 1px solid #bae6fd;
    background: #f0f9ff;
}

.member-vms-init-badge.success {
    color: #166534;
    border-color: #bbf7d0;
    background: #f0fdf4;
}

.member-vms-init-badge.danger {
    color: #991b1b;
    border-color: #fecaca;
    background: #fef2f2;
}

.member-vms-init-shell {
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    background: #fff;
    overflow: hidden;
}

.member-vms-init-stage {
    display: grid;
    grid-template-columns: 54px minmax(0, 1fr);
    gap: 14px;
    align-items: center;
    padding: 18px;
    border-bottom: 1px solid #edf2f7;
}

.member-vms-init-mark {
    width: 54px;
    height: 54px;
    display: grid;
    place-items: center;
    border-radius: 12px;
    color: #0f766e;
    background: #ccfbf1;
    font-size: 24px;
}

.member-vms-init-shell[data-state="success"] .member-vms-init-mark {
    color: #166534;
    background: #dcfce7;
}

.member-vms-init-shell[data-state="failed"] .member-vms-init-mark,
.member-vms-init-shell[data-state="preflight_failed"] .member-vms-init-mark {
    color: #b91c1c;
    background: #fee2e2;
}

.member-vms-init-stage-main {
    min-width: 0;
}

.member-vms-init-kicker {
    color: #64748b;
    font-size: 12px;
    font-weight: 750;
    margin-bottom: 4px;
}

.member-vms-init-stage-main strong {
    display: block;
    color: #0f172a;
    font-size: 22px;
    line-height: 1.15;
    font-weight: 850;
}

.member-vms-init-stage-main p {
    margin: 7px 0 0;
    color: #475569;
    font-size: 13px;
    line-height: 1.45;
}

.member-vms-init-meta {
    display: grid;
    grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr);
    border-bottom: 1px solid #edf2f7;
}

.member-vms-init-meta > div {
    min-width: 0;
    padding: 13px 18px;
}

.member-vms-init-meta > div + div {
    border-left: 1px solid #edf2f7;
}

.member-vms-init-meta span {
    display: block;
    margin-bottom: 5px;
    color: #64748b;
    font-size: 12px;
}

.member-vms-init-meta strong {
    display: block;
    color: #0f172a;
    font-size: 13px;
    line-height: 1.3;
    overflow-wrap: anywhere;
}

.member-vms-init-meter {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 6px;
    padding: 16px 18px 2px;
}

.member-vms-init-meter span {
    height: 6px;
    border-radius: 999px;
    background: #e2e8f0;
}

.member-vms-init-meter span.done {
    background: #16a34a;
}

.member-vms-init-meter span.active {
    background: #0f766e;
}

.member-vms-init-meter span.failed {
    background: #dc2626;
}

.member-vms-init-progress-wrap {
    padding: 14px 18px 18px;
}

.member-vms-init-progress-head {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 11px;
    color: #64748b;
    font-size: 12px;
    font-weight: 750;
}

.member-vms-init-progress-head strong {
    color: #0f766e;
    font-size: 12px;
}

.member-vms-init-progress {
    display: grid;
    gap: 8px;
}

.member-vms-step {
    display: grid;
    grid-template-columns: 34px 30px minmax(0, 1fr);
    gap: 10px;
    align-items: center;
    min-height: 52px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 9px 11px;
    background: #f8fafc;
}

.member-vms-step-index {
    color: #94a3b8;
    font-size: 12px;
    font-weight: 850;
    font-variant-numeric: tabular-nums;
}

.member-vms-step-icon {
    width: 30px;
    height: 30px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    color: #64748b;
    background: #f1f5f9;
}

.member-vms-step-main {
    min-width: 0;
}

.member-vms-step-main strong {
    display: block;
    color: #0f172a;
    font-size: 14px;
    line-height: 1.25;
}

.member-vms-step-main span {
    display: block;
    margin-top: 3px;
    color: #64748b;
    font-size: 12px;
}

.member-vms-step.done {
    border-color: #bbf7d0;
    background: #f7fef9;
}

.member-vms-step.done .member-vms-step-icon {
    color: #166534;
    background: #dcfce7;
}

.member-vms-step.active {
    border-color: #99f6e4;
    background: #f3fffc;
}

.member-vms-step.active .member-vms-step-icon {
    color: #0f766e;
    background: #ccfbf1;
}

.member-vms-step.failed {
    border-color: #fecaca;
    background: #fff7f7;
}

.member-vms-step.failed .member-vms-step-icon {
    color: #b91c1c;
    background: #fee2e2;
}

.member-vms-init-footer {
    gap: 8px;
    border-top-color: #e2e8f0;
    background: #fff;
    padding: 14px 20px;
}

.member-vms-admin-password {
    margin-top: 10px;
    padding: 8px 10px;
    border: 1px solid #bfdbfe;
    border-radius: 8px;
    background: #eff6ff;
    max-width: 100%;
}

.member-vms-admin-password-main {
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: 30px;
}

.member-vms-admin-password span {
    color: #475569;
    font-size: 13px;
    width: auto;
    flex: 0 0 auto;
}

.member-vms-admin-password strong {
    color: #0f172a;
    font-size: 13px;
    flex: 0 0 auto;
}

.member-vms-admin-password code {
    color: #0f172a;
    background: #fff;
    border: 1px solid #dbeafe;
    border-radius: 6px;
    padding: 3px 7px;
    font-size: 13px;
    line-height: 1.45;
    min-width: 0;
    flex: 1 1 auto;
    overflow-wrap: anywhere;
}

.member-vms-admin-password p {
    margin: 4px 0 0;
    color: #1d4ed8;
    font-size: 12px;
}

.member-status-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 16px;
}

.member-status-card {
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    gap: 12px;
    background: rgba(255, 255, 255, .9);
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 16px;
    min-width: 0;
}

.member-status-card span {
    position: relative;
    z-index: 1;
    display: block;
    color: #64748b;
    font-size: 12px;
    margin-bottom: 3px;
}

.member-status-card strong {
    position: relative;
    z-index: 1;
    display: block;
    color: #0f172a;
    font-size: 17px;
    line-height: 1.25;
    overflow-wrap: anywhere;
}

.member-status-icon {
    position: relative;
    z-index: 1;
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    border-radius: 8px;
    background: #eef6ff;
    color: #0369a1;
    font-size: 18px;
}

.member-message {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    background: #fffbeb;
    border: 1px solid #fde68a;
    color: #854d0e;
    border-radius: 10px;
    padding: 12px 14px;
    margin-bottom: 16px;
    font-size: 14px;
}

.member-summary {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: center;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 22px 24px;
    margin-bottom: 16px;
}

.member-summary h2 {
    margin: 0;
    font-size: 24px;
    font-weight: 750;
    color: #0f172a;
}

.member-kicker {
    font-size: 12px;
    color: #64748b;
    margin-bottom: 4px;
}

.member-summary-badges {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.member-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(280px, .9fr);
    gap: 16px;
}

.member-dl {
    display: grid;
    grid-template-columns: 96px minmax(0, 1fr);
    gap: 12px 16px;
    margin: 0;
}

.member-dl dt {
    color: #64748b;
    font-size: 13px;
    font-weight: 600;
}

.member-dl dd {
    margin: 0;
    color: #0f172a;
    font-size: 14px;
    min-width: 0;
    overflow-wrap: anywhere;
}

.member-access-key {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 13px;
    color: #334155;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 12px;
    overflow-wrap: anywhere;
}

.member-term-card {
    display: flex;
    align-items: center;
    min-width: 0;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    background: #fff;
    color: #0f172a;
    text-decoration: none;
}

.member-term-card i {
    color: #0f766e;
    font-size: 18px;
    flex: 0 0 auto;
}

.member-terms-red-dot,
.member-announcement-red-dot {
    display: none;
    width: 8px;
    height: 8px;
    flex: 0 0 auto;
    border-radius: 999px;
    background: #dc2626;
    box-shadow: 0 0 0 3px rgba(220, 38, 38, .12);
}

.member-terms-unread .member-terms-red-dot {
    display: inline-block;
}

.member-announcement-unread .member-announcement-red-dot {
    display: inline-block;
}

.member-sidebar-link .member-terms-red-dot,
.member-sidebar-link .member-announcement-red-dot {
    margin-left: auto;
}

.panel-head h2 .member-terms-red-dot {
    margin-left: 8px;
    vertical-align: middle;
}

.member-term-card:hover {
    border-color: #99f6e4;
    color: #0f766e;
    background: #f0fdfa;
}

.member-terms-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 16px;
}

.member-term-card {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
    min-height: 168px;
    padding: 16px;
}

.member-term-card strong {
    font-size: 16px;
    font-weight: 800;
}

.member-term-card span {
    color: #64748b;
    font-size: 13px;
    line-height: 1.55;
}

.member-terms-stack {
    display: grid;
    gap: 16px;
}

.member-term-detail {
    scroll-margin-top: 24px;
}

.member-term-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    color: #64748b;
    font-size: 12px;
}

.member-term-body {
    color: #334155;
    line-height: 1.75;
}

.member-term-body p {
    margin: 0 0 12px;
}

.member-term-body ol {
    margin: 0;
    padding-left: 20px;
}

.member-term-body li + li {
    margin-top: 8px;
}

.member-terms-accept-strip {
    align-items: center;
}

.member-terms-accept-strip > div {
    flex: 1;
}

@media (max-width: 980px) {
    .saas-sidebar {
        position: static;
        width: 100%;
        height: auto;
        border-right: 0;
        border-bottom: 1px solid #e2e8f0;
    }

    .saas-sidebar nav {
        display: flex;
        gap: 8px;
        overflow-x: auto;
        padding: 10px 12px 14px;
    }

    .saas-nav-label,
    .saas-sidebar-foot {
        display: none;
    }

    .saas-nav-link {
        flex: 0 0 auto;
        margin: 0;
        white-space: nowrap;
    }

    .platform-workspace {
        margin-left: 0;
    }

    .platform-main {
        padding: 0 18px 24px;
    }

    .saas-topbar {
        padding: 0 18px;
    }

    .member-shell {
        display: block;
    }

    .member-sidebar {
        position: static;
        width: 100%;
        height: auto;
        border-right: 0;
        border-bottom: 1px solid #e2e8f0;
    }

    .member-workspace {
        margin-left: 0;
    }

    .member-sidebar-brand {
        height: 62px;
    }

    .member-sidebar-nav {
        display: flex;
        gap: 8px;
        overflow-x: auto;
        padding: 10px 12px 14px;
    }

    .member-sidebar-label,
    .member-sidebar-account {
        display: none;
    }

    .member-sidebar-link {
        flex: 0 0 auto;
        height: 40px;
        border-radius: 999px;
        white-space: nowrap;
    }

    .member-topbar {
        padding: 0 18px;
    }

    .member-main {
        padding: 0 18px 24px;
    }

    .workspace-copyright {
        padding: 0 18px;
    }

    .member-page-head {
        margin-bottom: 20px;
    }

    .member-page-head h1 {
        font-size: 24px;
    }

    .member-page-head p {
        font-size: 14px;
    }

    .member-demo-banner {
        align-items: flex-start;
        flex-direction: column;
        gap: 3px;
    }

    .member-summary {
        align-items: flex-start;
        flex-direction: column;
    }

    .member-hero {
        align-items: flex-start;
        flex-direction: column;
    }

    .member-overview {
        grid-template-columns: 1fr;
    }

    .member-service-head {
        flex-direction: column;
    }

    .member-metric-grid {
        grid-template-columns: 1fr;
    }

    .member-runtime-alert {
        grid-template-columns: 36px minmax(0, 1fr);
        align-items: flex-start;
    }

    .member-runtime-alert .btn {
        grid-column: 1 / -1;
        justify-self: stretch;
    }

    .member-info-strip {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .member-status-grid {
        grid-template-columns: 1fr;
    }

    .member-vms-init-stage,
    .member-vms-init-meta {
        grid-template-columns: 1fr;
    }

    .member-vms-init-meta > div + div {
        border-top: 1px solid #edf2f7;
        border-left: 0;
    }

    .member-vms-init-footer {
        align-items: stretch;
        flex-direction: column;
    }

    .member-vms-init-footer .btn {
        width: 100%;
    }

    .member-vms-admin-password-main {
        align-items: stretch;
        flex-wrap: wrap;
    }

    .member-vms-admin-password code {
        flex-basis: 100%;
    }

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

    .member-plan-row {
        grid-template-columns: 1fr;
    }

    .member-ticket-row,
    .member-ticket-side {
        align-items: flex-start;
        flex-direction: column;
    }

    .ticket-detail-grid {
        grid-template-columns: 1fr;
    }

    .member-control-grid {
        grid-template-columns: 1fr;
    }

    .member-terms-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .member-grid {
        grid-template-columns: 1fr;
    }
}

.platform-shell {
    position: relative;
    min-width: 0;
    background: #f6f8fb;
    color: #111827;
}

.platform-bg-anim {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    overflow: hidden;
}

.platform-bg-anim svg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: .55;
}

.platform-bg-shark {
    fill: rgba(100, 116, 139, .16);
    stroke: rgba(100, 116, 139, .20);
    stroke-width: 1.4;
    transform-box: fill-box;
    transform-origin: center;
    opacity: var(--shark-opacity, .14);
    animation: member-shark-swim var(--swim-duration, 30s) linear infinite;
    animation-delay: var(--swim-delay, 0s);
}

.platform-bg-shark path[fill="none"] {
    stroke: rgba(100, 116, 139, .26);
    stroke-width: 2;
}

/* ─── Sidebar ─── */
.saas-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 2;
    width: 248px;
    height: 100vh;
    display: flex;
    flex-direction: column;
    background: #f8fafc;
    color: #111827;
    border-right: 1px solid #e2e8f0;
    padding: 0;
}

.saas-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    height: 70px;
    padding: 0 22px;
    font-size: 18px;
    font-weight: 800;
    border-bottom: 1px solid #e2e8f0;
    color: #111827;
    letter-spacing: 0;
}

.saas-brand-sub {
    font-size: 10px;
    font-weight: 400;
    color: #94a3b8;
    display: block;
    letter-spacing: 0;
    margin-top: 1px;
}

.saas-nav-label {
    padding: 16px 24px 8px;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0;
    color: #94a3b8;
    text-transform: none;
}

.saas-nav-link {
    height: 40px;
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 0 12px;
    padding: 0 14px;
    border-radius: 10px;
    color: #475569;
    text-decoration: none;
    font-size: 14px;
    font-weight: 750;
    transition: background .12s, color .12s;
}

.saas-nav-link i {
    width: 22px;
    color: #64748b;
    font-size: 16px;
}

.saas-nav-link:hover {
    background: #eff6ff;
    color: #2563eb;
}

.saas-nav-link.active {
    background: #eff6ff;
    color: #2563eb;
    border-right: 0;
    font-weight: 800;
}

.saas-nav-link:hover i,
.saas-nav-link.active i {
    color: #2563eb;
}

.saas-sidebar-foot {
    padding: 14px 12px 18px;
    border-top: 1px solid #e2e8f0;
}

.saas-sidebar-logout {
    width: 100%;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    background: transparent;
    color: #475569;
    font-size: 14px;
    font-weight: 750;
}

.saas-sidebar-logout:hover {
    color: #1d4ed8;
    border-color: #93c5fd;
    background: #eff6ff;
}

.platform-workspace {
    position: relative;
    min-width: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    margin-left: 248px;
}

.platform-main {
    min-height: 0;
    flex: 1 0 auto;
    padding: 0 40px 40px;
    background: transparent;
    overflow-y: auto;
}

/* ─── Topbar ─── */
.saas-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 40px;
    background: transparent;
    border-bottom: 0;
    height: 58px;
    flex-shrink: 0;
}

.platform-topbar-title {
    color: #64748b;
    font-size: 14px;
    font-weight: 550;
    line-height: 1.35;
}

.platform-page-head {
    margin: 0 0 24px;
}

.platform-page-head h1 {
    margin: 0;
    color: #111827;
    font-size: 24px;
    line-height: 1.2;
    font-weight: 850;
}

.platform-page-head p {
    margin: 7px 0 0;
    color: #94a3b8;
    font-size: 14px;
}

.platform-shell .text-primary,
.platform-shell .panel-head .text-primary {
    color: #2563eb !important;
}

.platform-shell .btn-primary {
    border-color: #2563eb;
    background: #2563eb;
}

.platform-shell .btn-primary:hover,
.platform-shell .btn-primary:focus {
    border-color: #1d4ed8;
    background: #1d4ed8;
}

.platform-shell .btn-outline-primary {
    color: #2563eb;
    border-color: #2563eb;
}

.platform-shell .btn-outline-primary:hover,
.platform-shell .btn-outline-primary:focus {
    color: #fff;
    border-color: #2563eb;
    background: #2563eb;
}

.platform-shell .btn-outline-secondary {
    color: #475569;
    border-color: #cbd5e1;
}

.platform-shell .btn-outline-secondary:hover,
.platform-shell .btn-outline-secondary:focus {
    color: #0f172a;
    border-color: #94a3b8;
    background: #e2e8f0;
}

/* ─── Breadcrumb / page header ─── */
.page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}

.page-title {
    font-size: 20px;
    font-weight: 700;
    color: #0f172a;
    margin: 0;
}

.page-desc {
    font-size: 13px;
    color: #64748b;
    margin-top: 2px;
}

/* ─── Stat cards ─── */
.stat-card {
    position: relative;
    overflow: hidden;
    background: rgba(255, 255, 255, .94);
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 18px 20px;
    box-shadow: 0 1px 4px rgba(17, 24, 39, .08);
}

.stat-card .stat-value {
    position: relative;
    z-index: 1;
    font-size: 30px;
    font-weight: 700;
    line-height: 1.1;
    color: #0f172a;
}

.stat-card .stat-label {
    position: relative;
    z-index: 1;
    font-size: 12px;
    color: #64748b;
    margin-top: 4px;
    font-weight: 500;
}

.stat-card .stat-icon {
    position: relative;
    z-index: 1;
    font-size: 22px;
    opacity: .55;
}

.detail-meta-line {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 16px;
    margin-bottom: 12px;
    color: #64748b;
    font-size: 12px;
}

.detail-meta-line span {
    min-width: 0;
}

.detail-stat-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 8px;
}

.detail-stat-grid .stat-card {
    min-height: 74px;
    padding: 10px 12px;
    box-shadow: none;
}

.detail-stat-grid .stat-card .stat-value {
    margin-top: 4px;
    font-size: 18px;
    line-height: 1.2;
    word-break: break-word;
}

.detail-stat-grid .stat-card .stat-label {
    margin-top: 0;
}

@media (max-width: 991.98px) {
    .detail-stat-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

/* ─── Filter bar ─── */
.filter-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    background: rgba(255, 255, 255, .94);
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 12px 16px;
    margin-bottom: 16px;
}

.audit-filter-bar {
    flex-wrap: nowrap;
    overflow-x: auto;
}

.audit-filter-bar > * {
    flex: 0 0 auto;
}

.audit-date-range {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    min-height: 31px;
    padding: 3px 6px;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    background: #fff;
    color: #64748b;
    font-size: 12px;
    white-space: nowrap;
}

.audit-date-range > i {
    color: #64748b;
    font-size: 13px;
}

.audit-date-clear {
    width: 22px;
    height: 22px;
    border: 0;
    border-radius: 4px;
    background: transparent;
    color: #94a3b8;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

.audit-date-clear:hover {
    background: #f1f5f9;
    color: #475569;
}

.audit-date-range label {
    margin: 0;
    color: #475569;
    font-weight: 600;
}

.audit-date-range input {
    width: 84px;
    border: 0;
    outline: none;
    color: #334155;
    font-size: 12px;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    background: transparent;
}

.audit-date-range input::-webkit-calendar-picker-indicator {
    opacity: .72;
    cursor: pointer;
}

.audit-date-picker {
    position: absolute;
    z-index: 1060;
    width: 274px;
    display: none;
    padding: 12px;
    border: 1px solid #dbe4ee;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 18px 42px rgba(15, 23, 42, .16);
}

.audit-date-picker.show {
    display: block;
}

.audit-date-picker-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
}

.audit-date-picker-head strong {
    color: #1e293b;
    font-size: 13px;
}

.audit-date-picker-head button {
    width: 28px;
    height: 28px;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    background: #fff;
    color: #475569;
}

.audit-date-picker-head button:hover {
    background: #f8fafc;
    border-color: #cbd5e1;
}

.audit-date-picker-week,
.audit-date-picker-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 4px;
}

.audit-date-picker-week {
    margin-bottom: 6px;
    color: #94a3b8;
    font-size: 11px;
    text-align: center;
}

.audit-date-picker-grid button {
    height: 30px;
    border: 0;
    border-radius: 6px;
    background: transparent;
    color: #334155;
    font-size: 12px;
}

.audit-date-picker-grid button:not(:disabled):hover {
    background: #eff6ff;
    color: #1d4ed8;
}

.audit-date-picker-grid button.active {
    background: #2563eb;
    color: #fff;
}

.audit-date-picker-time {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid #e2e8f0;
}

.audit-date-picker-time input {
    width: 52px;
    height: 30px;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    text-align: center;
    color: #334155;
}

.audit-date-picker-time button {
    height: 30px;
    margin-left: auto;
    border: 0;
    border-radius: 6px;
    padding: 0 12px;
    background: #2563eb;
    color: #fff;
    font-size: 12px;
}

.saas-pagination {
    display: grid;
    grid-template-columns: minmax(180px, 1fr) auto minmax(180px, 1fr);
    align-items: center;
    column-gap: 12px;
    min-height: 31px;
}

.saas-pagination-summary {
    justify-self: start;
    white-space: nowrap;
}

.saas-pagination-controls {
    justify-self: center;
}

.saas-pagination-spacer {
    justify-self: end;
    min-width: 180px;
}

@media (max-width: 576px) {
    .saas-pagination {
        grid-template-columns: 1fr;
        row-gap: 8px;
    }

    .saas-pagination-summary {
        justify-self: start;
    }

    .saas-pagination-controls {
        justify-self: center;
    }

    .saas-pagination-spacer {
        display: none;
    }
}

.announcement-detail-header {
    align-items: flex-start;
}

.announcement-detail-header .modal-title {
    margin-bottom: 6px;
    color: #111827;
    font-size: 18px;
    font-weight: 700;
    line-height: 1.35;
}

.announcement-detail-meta {
    color: #64748b;
    font-size: 12px;
}

.announcement-detail-content {
    max-height: 62vh;
    overflow-y: auto;
    padding: 4px 2px;
    color: #1f2937;
    font-size: 15px;
    line-height: 1.9;
    white-space: pre-wrap;
    word-break: break-word;
}

/* ─── Panel ─── */
.panel {
    background: rgba(255, 255, 255, .94);
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 18px 20px;
    margin-bottom: 16px;
    box-shadow: 0 1px 4px rgba(17, 24, 39, .08);
}

.panel-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
    padding-bottom: 12px;
    border-bottom: 1px solid #f1f5f9;
}

.panel-head h2 {
    font-size: 15px;
    font-weight: 600;
    margin: 0;
    color: #0f172a;
}

.panel-head .panel-desc {
    font-size: 12px;
    color: #94a3b8;
    margin-top: 1px;
}

/* ─── Table ─── */
.saas-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.saas-table th {
    background: #f8fafc;
    color: #64748b;
    font-weight: 600;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: .5px;
    padding: 9px 12px;
    border-bottom: 2px solid #e2e8f0;
    white-space: nowrap;
}

.saas-table td {
    padding: 11px 12px;
    border-bottom: 1px solid #f1f5f9;
    vertical-align: middle;
}

.saas-table tr:last-child td { border-bottom: 0; }
.saas-table tr:hover td { background: #f8fafc; }

#modal-provision-task .provision-task-dialog .modal-content {
    max-height: min(760px, calc(100vh - 48px));
}

#modal-provision-task .modal-body {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    min-height: 0;
}

#modal-provision-task .provision-task-summary,
#modal-provision-task .alert {
    flex: 0 0 auto;
}

#modal-provision-task .provision-task-log-scroll {
    flex: 1 1 auto;
    min-height: 180px;
    max-height: calc(100vh - 260px);
    overflow: auto;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
}

#modal-provision-task .provision-task-log-scroll .saas-table {
    margin: 0;
}

#modal-provision-task .provision-task-log-scroll .saas-table th {
    position: sticky;
    top: 0;
    z-index: 1;
}

/* ─── Capacity bar ─── */
.cap-bar {
    height: 6px;
    background: #e2e8f0;
    border-radius: 3px;
    overflow: hidden;
    width: 64px;
    display: inline-block;
    vertical-align: middle;
    margin-right: 5px;
}

.cap-bar-fill {
    height: 100%;
    border-radius: 3px;
    background: #10b981;
    transition: width .3s;
}

.cap-bar-fill.warn   { background: #f59e0b; }
.cap-bar-fill.danger { background: #ef4444; }

/* ─── Empty state ─── */
.empty-state {
    padding: 40px 0;
    text-align: center;
    color: #94a3b8;
    font-size: 14px;
}

/* ─── Step flow card ─── */
.step-card {
    display: flex;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 8px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    height: 100%;
}
.step-num {
    width: 22px; height: 22px;
    border-radius: 50%;
    background: #3b82f6;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    margin-top: 1px;
}

/* ─── Misc ─── */
.font-mono     { font-family: ui-monospace, monospace; font-size: 12px; }
.text-code     { font-family: ui-monospace, monospace; font-size: 12px; background: #f1f5f9; padding: 1px 5px; border-radius: 3px; color: #334155; }
.log-pre       { background: #0f172a; color: #e2e8f0; border-radius: 8px; padding: 14px; font-size: 12px; min-height: 80px; max-height: 320px; overflow: auto; white-space: pre-wrap; line-height: 1.6; }
.audit-detail-json { background: #0f172a; color: #e2e8f0; border-radius: 8px; padding: 14px; font-size: 12px; max-height: 520px; overflow: auto; white-space: pre-wrap; line-height: 1.6; }
.row-actions   { white-space: normal; }
.text-truncate-cell { max-width: 160px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.node-release-table,
.node-upgrade-table,
.node-upgrade-batch-table,
.node-version-table { table-layout: fixed; }
.node-release-package-cell { min-width: 0; }
.node-release-file,
.node-release-sha {
    display: block;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.node-release-file { font-weight: 500; color: #334155; }
.node-release-sha { font-family: ui-monospace, monospace; font-size: 11px; color: #94a3b8; }
.node-release-current {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 10px;
}
.node-release-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    min-width: 0;
    padding: 14px 16px;
    border: 1px solid #dbeafe;
    border-radius: 8px;
    background: #f8fbff;
}
.node-release-card-main { min-width: 0; }
.node-release-card-heading {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 3px;
    font-size: 16px;
    font-weight: 700;
}
.node-release-card-package {
    max-width: 100%;
    margin-top: 10px;
    overflow: hidden;
    color: #334155;
    font-size: 12px;
    font-weight: 600;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.node-release-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 6px;
    min-width: 0;
}
.node-release-history summary {
    cursor: pointer;
    color: #475569;
    font-size: 13px;
    font-weight: 600;
    list-style-position: inside;
}
.node-release-history summary::marker { color: #64748b; }
.node-release-history .table-responsive { overflow-x: auto; }
.node-release-history .node-release-actions { justify-content: flex-start; }
.node-upgrade-result {
    max-width: 0;
}
.node-upgrade-result > span {
    display: inline-block;
    max-width: min(100%, 520px);
    overflow: hidden;
    text-overflow: ellipsis;
    vertical-align: middle;
    white-space: nowrap;
}
.node-version-code {
    display: inline-block;
    max-width: 100%;
    font-family: ui-monospace, monospace;
    font-size: 12px;
    overflow: hidden;
    text-overflow: ellipsis;
    vertical-align: middle;
    white-space: nowrap;
}
.node-upgrade-node-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
    max-height: 220px;
    overflow: auto;
}
.node-upgrade-node-list-title {
    color: #64748b;
    font-size: 12px;
    font-weight: 650;
}
.node-upgrade-node-item {
    display: grid;
    grid-template-columns: 46px minmax(0, 1fr) minmax(72px, 110px) 76px;
    align-items: center;
    gap: 8px;
    min-height: 30px;
    padding: 6px 8px;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    background: #fff;
    font-size: 12px;
}
.node-upgrade-node-item strong,
.node-upgrade-node-item em {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.node-upgrade-node-item em {
    color: #475569;
    font-family: ui-monospace, monospace;
    font-style: normal;
}
.node-upgrade-node-item small {
    color: #16a34a;
    font-size: 11px;
    text-align: right;
    white-space: nowrap;
}
.node-upgrade-node-item.is-current {
    background: #f8fafc;
}
.node-upgrade-node-item.is-current small {
    color: #64748b;
}

.ops-task-meta {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 12px 14px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    background: #f8fafc;
}
.ops-task-meta-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 10px 18px;
}
.ops-task-meta-row {
    display: grid;
    grid-template-columns: 64px minmax(0, 1fr);
    align-items: center;
    column-gap: 10px;
    min-width: 0;
}
.ops-task-meta-row > span {
    color: #64748b;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.4;
}
.ops-task-meta-row > strong {
    display: flex;
    align-items: center;
    min-width: 0;
    min-height: 24px;
    color: #0f172a;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.4;
}
.ops-task-endpoint {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

@media (max-width: 575.98px) {
    .ops-task-meta-grid {
        grid-template-columns: 1fr;
    }
}

/* btn-xs (not in Bootstrap 5) */
.btn-xs { padding: 2px 8px; font-size: 11px; border-radius: 4px; line-height: 1.5; }

/* Template market follows the promotion workspace rhythm. */
.market-tabs {
    margin-bottom: 16px;
}

.market-product-cell {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 190px;
}

.market-product-cell img,
.market-product-placeholder {
    width: 52px;
    height: 34px;
    flex: 0 0 52px;
    border: 1px solid #dbe4ee;
    border-radius: 6px;
    object-fit: cover;
    background: #f8fafc;
}

.market-product-placeholder {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #94a3b8;
    font-size: 16px;
}

.market-cover-preview {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #64748b;
    font-size: 12px;
}

.market-cover-preview img {
    width: 96px;
    height: 54px;
    border: 1px solid #dbe4ee;
    border-radius: 6px;
    object-fit: cover;
}

.market-upload-note {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 11px 13px;
    border: 1px solid #dbeafe;
    border-radius: 7px;
    background: #f8fbff;
    color: #475569;
    font-size: 12px;
    line-height: 1.55;
}

.market-upload-note > i {
    color: #2563eb;
    font-size: 18px;
}

.market-upload-note strong,
.market-upload-note span {
    display: block;
}

.market-upload-note strong {
    margin-bottom: 2px;
    color: #1e3a8a;
}

.task-status-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    min-width: 72px;
    height: 24px;
    padding: 0 8px;
    border: 1px solid #cbd5e1;
    border-radius: 4px;
    background: #fff;
    color: #334155;
    font-size: 12px;
    line-height: 1;
    white-space: nowrap;
    flex: 0 0 auto;
}

.task-status-btn:hover { background: #f8fafc; }
.task-status-dot { width: 6px; height: 6px; border-radius: 999px; background: #94a3b8; flex: 0 0 6px; }
.task-status-btn.pending .task-status-dot { background: #94a3b8; }
.task-status-btn.running .task-status-dot { background: #2563eb; }
.task-status-btn.success .task-status-dot { background: #16a34a; }
.task-status-btn.failed .task-status-dot { background: #dc2626; }
.task-status-btn.cancelled .task-status-dot { background: #475569; }
.task-status-btn.success { border-color: #bbf7d0; color: #166534; background: #f0fdf4; }
.task-status-btn.failed { border-color: #fecaca; color: #991b1b; background: #fef2f2; }
.saas-env-badge {
    position: fixed;
    right: 14px;
    bottom: 14px;
    z-index: 1090;
    display: inline-flex;
    align-items: center;
    max-width: min(260px, calc(100vw - 28px));
    min-height: 28px;
    padding: 5px 10px;
    border: 1px solid #f59e0b;
    border-radius: 4px;
    background: #fffbeb;
    color: #92400e;
    font-size: 12px;
    font-weight: 650;
    line-height: 1.2;
    box-shadow: 0 8px 24px rgba(15, 23, 42, .12);
    pointer-events: none;
}

.saas-brand em,
.member-sidebar-brand em {
    display: inline-flex;
    align-items: center;
    min-height: 20px;
    max-width: 96px;
    padding: 2px 6px;
    border: 1px solid #f59e0b;
    border-radius: 4px;
    background: #fffbeb;
    color: #92400e;
    font-size: 11px;
    font-style: normal;
    font-weight: 650;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.task-status-btn.running { border-color: #bfdbfe; color: #1d4ed8; background: #eff6ff; }

.diagnose-status-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 58px;
    height: 24px;
    padding: 0 8px;
    border-radius: 4px;
    border: 1px solid #cbd5e1;
    font-size: 12px;
    line-height: 1;
    white-space: nowrap;
}

.diagnose-status-badge.normal { border-color: #bbf7d0; color: #166534; background: #f0fdf4; }
.diagnose-status-badge.failed { border-color: #fecaca; color: #991b1b; background: #fef2f2; }
.diagnose-status-badge.unknown { border-color: #e2e8f0; color: #64748b; background: #f8fafc; }

.saas-confirm-modal .modal-content {
    border: 0;
    border-radius: 8px;
    box-shadow: 0 18px 50px rgba(15, 23, 42, .18);
}

.saas-confirm-modal .modal-body {
    display: flex;
    gap: 14px;
    align-items: flex-start;
    color: #334155;
    line-height: 1.6;
}

.saas-confirm-icon {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 34px;
    background: #eff6ff;
    color: #2563eb;
}

.saas-confirm-icon.danger {
    background: #fef2f2;
    color: #dc2626;
}

.saas-confirm-message {
    padding-top: 3px;
    word-break: break-word;
    white-space: pre-line;
}

.modal-upgrade-migration {
    z-index: 1085;
}

/* ─── Tag tabs (筛选按钮组) ─── */
.tag-tabs { display: flex; gap: 4px; flex-wrap: wrap; }
.tag-tab {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    border: 1px solid #e2e8f0;
    background: #fff;
    color: #64748b;
    transition: all .12s;
    line-height: 1.5;
}
.tag-tab:hover  { border-color: #93c5fd; color: #2563eb; background: #eff6ff; }
.tag-tab.active { border-color: #3b82f6; color: #2563eb; background: #eff6ff; font-weight: 600; }
.tag-tab.active-success { border-color: #10b981; color: #059669; background: #ecfdf5; font-weight: 600; }
.tag-tab.active-danger  { border-color: #ef4444; color: #dc2626; background: #fef2f2; font-weight: 600; }
.tag-tab.active-warning { border-color: #f59e0b; color: #d97706; background: #fffbeb; font-weight: 600; }

@media (max-width: 991.98px) {
    .platform-shell {
        overflow-x: hidden;
    }

    .saas-sidebar {
        position: sticky;
        top: 0;
        z-index: 1030;
        width: 100%;
        height: auto;
        display: block;
        border-right: 0;
        border-bottom: 1px solid #e2e8f0;
        background: rgba(248, 250, 252, .98);
    }

    .saas-sidebar nav {
        display: flex;
        gap: 8px;
        overflow-x: auto;
        padding: 10px 12px 12px;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: thin;
    }

    .saas-nav-label,
    .saas-sidebar-foot {
        display: none;
    }

    .saas-nav-link {
        flex: 0 0 auto;
        margin: 0;
        white-space: nowrap;
    }

    .platform-workspace {
        margin-left: 0;
        min-height: auto;
    }

    .platform-bg-anim {
        display: none;
    }

    .platform-main {
        min-height: auto;
        padding: 0 14px 22px;
        overflow: visible;
    }

    .saas-topbar {
        height: auto;
        min-height: 50px;
        padding: 10px 14px;
        gap: 10px;
    }

    .platform-topbar-title {
        min-width: 0;
        font-size: 13px;
    }

    .platform-page-head,
    .page-header {
        align-items: flex-start;
        flex-direction: column;
        gap: 10px;
        margin-bottom: 14px;
    }

    .platform-page-head h1,
    .page-title {
        font-size: 21px;
        line-height: 1.25;
    }

    .platform-page-head p,
    .page-desc {
        font-size: 13px;
    }

    .filter-bar {
        align-items: stretch;
        padding: 10px;
        gap: 8px;
        overflow-x: visible;
    }

    .filter-bar > .ms-auto {
        margin-left: 0 !important;
    }

    .filter-bar .form-control,
    .filter-bar .form-select,
    .filter-bar .btn {
        min-height: 34px;
    }

    .filter-bar .form-control,
    .filter-bar .form-select {
        width: auto !important;
        max-width: none !important;
        flex: 1 1 150px;
    }

    .filter-bar > .btn,
    .filter-bar > .d-flex > .btn {
        flex: 0 0 auto;
        white-space: nowrap;
    }

    .filter-bar > .d-flex {
        flex: 1 1 100%;
        flex-wrap: wrap;
        align-items: stretch;
    }

    .tag-tabs {
        flex: 1 1 100%;
        flex-wrap: nowrap;
        overflow-x: auto;
        padding-bottom: 2px;
        scrollbar-width: thin;
    }

    .tag-tab {
        flex: 0 0 auto;
        white-space: nowrap;
    }

    .panel {
        padding: 12px;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .panel-head {
        align-items: flex-start;
        flex-direction: column;
        gap: 8px;
    }

    .panel > .saas-table,
    .table-responsive > .saas-table {
        min-width: 760px;
    }

    .saas-table {
        font-size: 13px;
    }

    .saas-table th,
    .saas-table td {
        padding: 9px 10px;
    }

    .saas-table td {
        max-width: 260px;
        word-break: break-word;
    }

    .saas-table td .btn,
    .saas-table td .btn-xs,
    .saas-table td .task-status-btn,
    .saas-table td .diagnose-status-badge {
        margin: 2px 2px 2px 0;
    }

    .detail-stat-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .modal-dialog {
        width: auto;
        max-width: none;
        margin: 10px;
    }

    .modal-content {
        max-height: calc(100vh - 20px);
    }

    .modal-body {
        overflow: auto;
    }
}

@media (max-width: 575.98px) {
    .saas-sidebar {
        overflow: hidden;
    }

    .saas-brand {
        height: 56px;
        padding: 0 14px;
        font-size: 16px;
    }

    .saas-brand-logo {
        width: 32px;
        height: 32px;
        border-radius: 6px;
    }

    .saas-brand-sub,
    .platform-topbar-title {
        display: none;
    }

    .saas-sidebar nav {
        padding: 8px 10px 10px;
    }

    .saas-nav-link {
        height: 36px;
        padding: 0 11px;
        gap: 7px;
        border-radius: 999px;
        font-size: 13px;
    }

    .saas-nav-link i {
        width: auto;
        font-size: 15px;
    }

    .platform-main {
        padding: 0 10px 18px;
    }

    .filter-bar {
        margin-bottom: 12px;
    }

    .filter-bar .form-control,
    .filter-bar .form-select,
    .filter-bar .btn {
        flex: 1 1 100%;
        width: 100% !important;
    }

    .filter-bar > .btn,
    .filter-bar > .d-flex > .btn {
        justify-content: center;
    }

    .panel {
        margin-left: -2px;
        margin-right: -2px;
        padding: 10px;
    }

    .panel > .saas-table,
    .table-responsive > .saas-table {
        min-width: 680px;
    }

    .detail-stat-grid,
    .request-stat-grid {
        grid-template-columns: 1fr;
    }

    .stat-card {
        padding: 14px;
    }

    .stat-card .stat-value {
        font-size: 24px;
    }

    .dash-card {
        padding: 12px;
    }

    .dash-kpi-value {
        font-size: 25px;
    }

    .modal-header,
    .modal-footer {
        padding: 12px;
    }

    .modal-body {
        padding: 12px;
    }

    .modal-footer {
        align-items: stretch;
        flex-direction: column;
    }

    .modal-footer .btn {
        width: 100%;
        margin: 0;
    }

    .saas-confirm-modal .modal-body {
        gap: 10px;
    }
}

@media (max-width: 760px) {
    .auth-shell:not(.auth-shell-full) {
        min-height: 100svh !important;
        align-items: start;
        place-items: start center;
        padding: 14px;
        overflow-y: auto;
    }

    .auth-bg-svg {
        opacity: .46;
    }

    .auth-bg-waves {
        opacity: .62;
    }

    .login-shell {
        width: 100%;
        max-width: 430px;
        min-height: 0;
        grid-template-columns: 1fr;
        border-radius: 10px;
        box-shadow: 0 14px 40px rgba(30, 41, 59, .14);
    }

    .login-brand-panel {
        min-height: 122px;
        padding: 18px;
        justify-content: center;
    }

    .login-brand-lockup {
        position: absolute;
        top: 18px;
        left: 18px;
        gap: 8px;
    }

    .login-brand-logo {
        width: 34px;
        height: 34px;
        border-radius: 6px;
    }

    .login-brand-lockup strong {
        font-size: 13px;
    }

    .login-brand-lockup span {
        margin-top: 2px;
        font-size: 10px;
    }

    .login-brand-panel::before {
        inset: 10px;
        border-radius: 8px;
    }

    .login-bg-svg {
        opacity: .32;
    }

    .login-number-board {
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: 7px;
        max-width: none;
    }

    .login-number-tile,
    .login-number-main {
        min-height: 54px;
        padding: 9px;
        border-radius: 8px;
        grid-row: auto;
    }

    .login-number-tile strong,
    .login-number-main strong {
        font-size: 21px;
        line-height: 1;
    }

    .login-number-tile span {
        font-size: 11px;
    }

    .login-brand-meta {
        display: none;
    }

    .login-form-panel {
        padding: 22px;
    }

    .login-form-head {
        gap: 10px;
        margin-bottom: 20px;
    }

    .login-form-icon {
        width: 38px;
        height: 38px;
        border-radius: 8px;
        font-size: 18px;
    }

    .login-form-head h2 {
        font-size: 20px;
    }

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

    .login-field .form-label {
        margin-bottom: 6px;
    }

    .login-input .form-control {
        height: 42px;
        font-size: 16px;
    }

    .member-auth-tabs {
        margin-bottom: 14px;
    }

    .member-auth-tabs button {
        min-height: 34px;
    }

    .member-login-terms {
        align-items: flex-start;
        line-height: 1.45;
    }
}

@media (max-width: 380px) {
    .auth-shell:not(.auth-shell-full) {
        padding: 10px;
    }

    .login-brand-panel {
        min-height: 98px;
        padding: 14px;
    }

    .login-number-board {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .login-number-tile,
    .login-number-main {
        min-height: 44px;
    }

    .login-form-panel {
        padding: 18px;
    }
}

/* Distribution settlement */
.member-distribution-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 16px;
}

.member-distribution-head h1 {
    margin: 0;
    color: #172033;
    font-size: 24px;
    font-weight: 750;
    letter-spacing: 0;
}

.member-distribution-head p {
    margin: 4px 0 0;
    color: #64748b;
    font-size: 13px;
}

.dist-account-bar {
    display: grid;
    grid-template-columns: minmax(220px, .8fr) minmax(0, 2.2fr);
    margin-bottom: 12px;
    border-block: 1px solid #dbe3ee;
    background: #fff;
}

.dist-account-primary {
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 104px;
    padding: 16px 20px;
    border-right: 1px solid #dbe3ee;
}

.dist-account-primary span,
.dist-account-metrics span {
    color: #64748b;
    font-size: 12px;
    font-weight: 600;
}

.dist-account-primary strong {
    margin-top: 2px;
    color: #0f172a;
    font-size: 30px;
    font-variant-numeric: tabular-nums;
    line-height: 1.2;
    letter-spacing: 0;
}

.dist-account-primary small,
.dist-account-metrics small {
    margin-top: 3px;
    overflow: hidden;
    color: #94a3b8;
    font-size: 11px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.dist-account-metrics {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.dist-account-metrics > div {
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-width: 0;
    min-height: 104px;
    padding: 15px 17px;
    border-right: 1px solid #e8edf3;
}

.dist-account-metrics > div:last-child {
    border-right: 0;
}

.dist-account-metrics strong {
    margin-top: 3px;
    color: #172033;
    font-size: 18px;
    font-variant-numeric: tabular-nums;
    line-height: 1.3;
    letter-spacing: 0;
    white-space: nowrap;
}

.dist-debt-alert {
    display: flex;
    align-items: center;
    gap: 9px;
    margin: -1px 0 12px;
    padding: 9px 12px;
    border-block: 1px solid #fecaca;
    color: #991b1b;
    background: #fff7f7;
    font-size: 12px;
}

.dist-link-band {
    display: grid;
    grid-template-columns: minmax(150px, auto) minmax(130px, 190px) minmax(260px, 1fr);
    align-items: center;
    gap: 12px;
    min-height: 64px;
    margin-bottom: 16px;
    padding: 10px 0;
    border-bottom: 1px solid #dbe3ee;
}

.dist-link-title span {
    display: block;
    color: #64748b;
    font-size: 11px;
    font-weight: 600;
}

.dist-link-title strong {
    display: block;
    max-width: 260px;
    margin-top: 2px;
    overflow: hidden;
    color: #172033;
    font-size: 13px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.dist-link-band .input-group {
    min-width: 0;
}

.dist-link-band input[readonly] {
    min-width: 0;
    color: #334155;
    background: #f7f9fc;
}

.dist-workspace {
    min-width: 0;
    border-top: 1px solid #dbe3ee;
}

.dist-primary-tabs {
    display: flex;
    gap: 22px;
    overflow-x: auto;
    border-bottom: 1px solid #dbe3ee;
}

.dist-primary-tabs button {
    min-height: 48px;
    padding: 0 1px;
    border: 0;
    border-radius: 0;
    color: #64748b;
    background: transparent;
    font-size: 13px;
    font-weight: 650;
    white-space: nowrap;
}

.dist-primary-tabs button.active {
    color: #172033;
    box-shadow: inset 0 -2px #2563eb;
}

.dist-pane {
    display: none;
    min-width: 0;
}

.dist-pane.active {
    display: block;
}

.dist-pane-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-height: 54px;
    padding: 9px 0;
}

.dist-pane-head > .form-select {
    width: 150px;
}

.dist-segmented,
.distribution-segmented {
    display: inline-flex;
    padding: 2px;
    border: 1px solid #dbe3ee;
    border-radius: 5px;
    background: #f7f9fc;
}

.dist-segmented button,
.distribution-segmented button {
    min-height: 30px;
    padding: 4px 10px;
    border: 0;
    border-radius: 3px;
    color: #64748b;
    background: transparent;
    font-size: 12px;
    font-weight: 600;
}

.dist-segmented button.active,
.distribution-segmented button.active {
    color: #172033;
    background: #fff;
    box-shadow: 0 1px 3px rgb(15 23 42 / 10%);
}

.dist-segmented span {
    margin-left: 3px;
    color: #2563eb;
    font-variant-numeric: tabular-nums;
}

.dist-pane .table-responsive,
.distribution-pane .table-responsive {
    max-height: min(65vh, 720px);
    overflow: auto;
    border-bottom: 1px solid #dbe3ee;
}

.dist-pane .saas-table,
.distribution-pane .saas-table {
    min-width: 820px;
    margin-bottom: 0;
}

.dist-pane .saas-table thead th,
.distribution-pane .saas-table thead th {
    position: sticky;
    top: 0;
    z-index: 2;
    background: #f7f9fc;
    box-shadow: 0 1px #dbe3ee;
}

.dist-pane .saas-table td,
.distribution-pane .saas-table td {
    vertical-align: middle;
}

.dist-method-list {
    display: grid;
    gap: 6px;
}

.dist-method-row {
    display: grid;
    grid-template-columns: 28px minmax(0, 1fr) auto;
    align-items: center;
    gap: 9px;
    padding: 9px 10px;
    border: 1px solid #dbe3ee;
    border-radius: 5px;
}

.dist-method-row > i {
    color: #2563eb;
    font-size: 18px;
}

.dist-method-row strong,
.dist-method-row span {
    display: block;
}

.dist-method-row strong {
    color: #172033;
    font-size: 13px;
}

.dist-method-row span {
    color: #64748b;
    font-size: 11px;
}

.dist-method-row em {
    color: #047857;
    font-size: 11px;
    font-style: normal;
}

.dist-modal-divider {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 18px 0 12px;
    color: #64748b;
    font-size: 11px;
}

.dist-modal-divider::before,
.dist-modal-divider::after {
    flex: 1;
    height: 1px;
    background: #e2e8f0;
    content: "";
}

.dist-withdraw-available {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid #dbe3ee;
}

.dist-withdraw-available span {
    color: #64748b;
    font-size: 12px;
}

.dist-withdraw-available strong {
    color: #172033;
    font-size: 22px;
    font-variant-numeric: tabular-nums;
    letter-spacing: 0;
}

.dist-status,
.distribution-status {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 12px;
    font-weight: 650;
    line-height: 1.3;
    white-space: nowrap;
}

.dist-status::before,
.distribution-status::before {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #94a3b8;
    content: "";
}

.dist-status.pending,
.dist-status.submitted,
.dist-status.reviewing,
.distribution-status.pending,
.distribution-status.submitted,
.distribution-status.reviewing { color: #b45309; }
.dist-status.pending::before,
.dist-status.submitted::before,
.dist-status.reviewing::before,
.distribution-status.pending::before,
.distribution-status.submitted::before,
.distribution-status.reviewing::before { background: #d97706; }
.dist-status.active,
.dist-status.available,
.dist-status.paid,
.dist-status.active,
.distribution-status.active,
.distribution-status.available,
.distribution-status.paid { color: #047857; }
.dist-status.active::before,
.dist-status.available::before,
.dist-status.paid::before,
.distribution-status.active::before,
.distribution-status.available::before,
.distribution-status.paid::before { background: #059669; }
.dist-status.paused,
.dist-status.abnormal,
.distribution-status.paused,
.distribution-status.abnormal { color: #b45309; }
.dist-status.paused::before,
.dist-status.abnormal::before,
.distribution-status.paused::before,
.distribution-status.abnormal::before { background: #d97706; }
.dist-status.stopped,
.dist-status.terminated,
.distribution-status.stopped,
.distribution-status.terminated { color: #b91c1c; }
.dist-status.stopped::before,
.dist-status.terminated::before,
.distribution-status.stopped::before,
.distribution-status.terminated::before { background: #dc2626; }
.dist-status.approved,
.dist-status.paying,
.distribution-status.approved,
.distribution-status.paying { color: #1d4ed8; }
.dist-status.approved::before,
.dist-status.paying::before,
.distribution-status.approved::before,
.distribution-status.paying::before { background: #2563eb; }
.dist-status.cancelled,
.dist-status.rejected,
.dist-status.clawed_back,
.dist-status.revoked,
.distribution-status.cancelled,
.distribution-status.rejected,
.distribution-status.clawed_back,
.distribution-status.revoked,
.distribution-status.terminated { color: #b91c1c; }
.dist-status.cancelled::before,
.dist-status.rejected::before,
.dist-status.clawed_back::before,
.dist-status.revoked::before,
.distribution-status.cancelled::before,
.distribution-status.rejected::before,
.distribution-status.clawed_back::before,
.distribution-status.revoked::before,
.distribution-status.terminated::before { background: #dc2626; }

.dist-status-alert {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 16px;
    padding: 13px 16px;
    border: 1px solid #f1d29b;
    border-radius: 6px;
    color: #854d0e;
    background: #fffbeb;
}

.dist-status-alert > i { margin-top: 2px; }
.dist-status-alert strong,
.dist-status-alert span { display: block; }
.dist-status-alert span { margin-top: 3px; color: #92400e; font-size: 13px; }
.member-distribution-page.is-restricted .dist-promotion-console,
.member-distribution-page.is-restricted .dist-debt-alert,
.member-distribution-page.is-restricted .dist-balance-band,
.member-distribution-page.is-restricted .dist-workspace { display: none; }

.distribution-task-strip {
    display: flex;
    margin-bottom: 16px;
    overflow-x: auto;
    border-block: 1px solid #dbe3ee;
    background: #fff;
}

.distribution-task-strip button {
    display: grid;
    grid-template-columns: auto auto 14px;
    align-items: center;
    gap: 10px;
    min-width: 190px;
    min-height: 58px;
    padding: 10px 16px;
    border: 0;
    border-right: 1px solid #e2e8f0;
    border-radius: 0;
    color: #64748b;
    background: #fff;
    text-align: left;
}

.distribution-task-strip button:hover {
    color: #172033;
    background: #f8fafc;
}

.distribution-task-strip span {
    font-size: 12px;
    white-space: nowrap;
}

.distribution-task-strip strong {
    color: #172033;
    font-size: 19px;
    font-variant-numeric: tabular-nums;
    letter-spacing: 0;
}

.distribution-task-strip i {
    color: #94a3b8;
    font-size: 11px;
}

.distribution-workspace {
    display: grid;
    grid-template-columns: 158px minmax(0, 1fr);
    column-gap: 22px;
    min-width: 0;
    border-top: 1px solid #dbe3ee;
}

.distribution-directory {
    align-self: start;
    min-height: 620px;
    padding: 8px 12px 10px 0;
    border-right: 1px solid #dbe3ee;
}

.distribution-directory-label {
    padding: 12px 10px 5px;
    color: #94a3b8;
    font-size: 10px;
    font-weight: 700;
}

.distribution-directory button {
    display: grid;
    grid-template-columns: 18px minmax(0, 1fr) auto;
    align-items: center;
    gap: 8px;
    width: 100%;
    min-height: 38px;
    padding: 8px 10px;
    border: 0;
    border-radius: 0;
    color: #64748b;
    background: transparent;
    font-size: 13px;
    text-align: left;
}

.distribution-directory button:hover {
    color: #172033;
    background: #f5f7fa;
}

.distribution-directory button.active {
    color: #172033;
    background: #eef2f7;
    box-shadow: inset 3px 0 #2563eb;
}

.distribution-directory button em {
    min-width: 18px;
    padding: 1px 5px;
    border-radius: 9px;
    color: #fff;
    background: #dc2626;
    font-size: 10px;
    font-style: normal;
    line-height: 16px;
    text-align: center;
}

.distribution-directory button em:empty {
    display: none;
}

.distribution-content,
.distribution-pane {
    min-width: 0;
}

.distribution-pane {
    display: none;
}

.distribution-pane.active {
    display: block;
}

.distribution-pane-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    min-height: 65px;
    padding: 10px 0;
    border-bottom: 1px solid #e8edf3;
}

.distribution-pane-title h2 {
    margin: 0;
    color: #172033;
    font-size: 16px;
    font-weight: 750;
    letter-spacing: 0;
}

.distribution-pane-title span {
    display: block;
    margin-top: 3px;
    color: #64748b;
    font-size: 11px;
}

.distribution-filter-row {
    display: flex;
    align-items: center;
    gap: 7px;
    min-height: 54px;
    padding: 9px 0;
}

.distribution-filter-row > .form-select {
    width: 155px;
}

.distribution-filter-row > .input-group {
    width: min(340px, 100%);
}

.distribution-segmented {
    margin: 12px 0;
}

.distribution-row-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    min-width: 118px;
}

.distribution-check-row {
    display: flex;
    flex-wrap: wrap;
    gap: 22px;
    color: #334155;
    font-size: 13px;
}

.distribution-check-row label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.distribution-operation-summary {
    margin-bottom: 14px;
    padding: 10px 12px;
    border-left: 3px solid #2563eb;
    color: #334155;
    background: #f5f8fc;
    font-size: 13px;
}

@media (max-width: 1100px) {
    .dist-account-bar {
        grid-template-columns: 1fr;
    }

    .dist-account-primary {
        min-height: 90px;
        border-right: 0;
        border-bottom: 1px solid #dbe3ee;
    }

    .dist-account-metrics > div {
        min-height: 84px;
    }
}

@media (max-width: 820px) {
    .member-distribution-head {
        align-items: stretch;
    }

    .dist-account-metrics {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .dist-account-metrics > div:nth-child(2) {
        border-right: 0;
    }

    .dist-account-metrics > div:nth-child(n + 3) {
        border-top: 1px solid #e8edf3;
    }

    .dist-link-band {
        grid-template-columns: minmax(0, 1fr) auto;
    }

    .dist-link-band .input-group {
        grid-column: 1 / -1;
    }

    .distribution-workspace {
        display: block;
    }

    .distribution-directory {
        display: flex;
        min-height: 0;
        padding: 0;
        overflow-x: auto;
        border-right: 0;
        border-bottom: 1px solid #dbe3ee;
    }

    .distribution-directory-label {
        display: none;
    }

    .distribution-directory button {
        width: auto;
        min-height: 48px;
        white-space: nowrap;
    }

    .distribution-directory button.active {
        background: transparent;
        box-shadow: inset 0 -2px #2563eb;
    }
}

@media (max-width: 560px) {
    .member-distribution-head {
        flex-direction: column;
    }

    .member-distribution-head .btn {
        width: 100%;
    }

    .dist-link-band {
        grid-template-columns: 1fr;
    }

    .dist-link-band .input-group {
        grid-column: auto;
    }

    .dist-pane-head {
        align-items: stretch;
        flex-direction: column;
    }

    .dist-pane-head > .form-select {
        width: 100%;
    }

    .distribution-task-strip button {
        min-width: 160px;
    }

    .distribution-pane-title {
        align-items: stretch;
        flex-direction: column;
    }
}

/* Keep the v2 distribution layout ahead of legacy settlement selectors. */
.distribution-workspace {
    grid-template-columns: 184px minmax(0, 1fr);
    column-gap: 24px;
}

.distribution-directory {
    min-height: 660px;
}

.distribution-rule-member-filter > .form-select {
    width: min(320px, 100%);
}

@media (max-width: 820px) {
    .distribution-workspace {
        display: block;
    }

    .distribution-directory {
        min-height: 0;
    }
}

@media (max-width: 560px) {
    .distribution-rule-member-filter > .form-select {
        width: 100%;
    }
}

/* Distribution visual finish: horizontal navigation and framed work surfaces */
.member-distribution-head,
.distribution-page-head {
    margin-bottom: 18px;
}

.dist-promotion-console,
.dist-balance-band,
.dist-workspace,
.distribution-overview-line,
.distribution-workspace {
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    background: rgba(255, 255, 255, .94);
    box-shadow: 0 1px 4px rgba(17, 24, 39, .08);
}

.dist-promotion-console {
    margin-bottom: 14px;
    border-block: 1px solid #e2e8f0;
    background: rgba(255, 255, 255, .94);
}

.dist-promotion-console .form-control,
.dist-promotion-console .form-select {
    border-color: #cbd5e1;
    background-color: #fff;
}

.dist-balance-band {
    overflow: hidden;
    margin-bottom: 18px;
    border-bottom: 1px solid #dbe3ee;
}

.dist-balance-primary {
    background: #f8fafc;
}

.dist-balance-metrics > div {
    background: #fff;
}

.dist-debt-alert {
    margin: 0 0 14px;
    border: 1px solid #fecaca;
    border-radius: 6px;
}

.dist-workspace {
    overflow: hidden;
    padding: 0 18px 18px;
    border-top: 1px solid #dbe3ee;
}

.dist-primary-tabs {
    gap: 26px;
    margin: 0 -18px;
    padding: 0 18px;
    background: #f8fafc;
}

.dist-primary-tabs button {
    min-height: 52px;
}

.dist-primary-tabs button:hover {
    color: #172033;
}

.dist-pane-head {
    min-height: 66px;
    padding: 12px 0;
}

.dist-pane .table-responsive,
.distribution-pane .table-responsive {
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    background: #fff;
}

.distribution-overview-line {
    overflow: hidden;
    margin-bottom: 16px;
    border-block: 1px solid #dbe3ee;
}

.distribution-overview-line > div {
    min-height: 66px;
    padding: 14px 18px;
}

.distribution-overview-line > div:first-child {
    border-top: 0;
}

.distribution-overview-line > div:nth-child(2) {
    border-top: 0;
}

.distribution-overview-line > div:nth-child(3) {
    border-top: 0;
}

.distribution-overview-line > div:last-child {
    border-top: 0;
}

.distribution-workspace {
    display: block;
    min-width: 0;
    overflow: hidden;
    border-top: 1px solid #dbe3ee;
}

.distribution-top-tabs {
    display: flex;
    align-items: stretch;
    gap: 24px;
    min-width: 0;
    padding: 0 18px;
    overflow-x: auto;
    border-bottom: 1px solid #dbe3ee;
    background: #f8fafc;
}

.distribution-top-tabs button {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    flex: 0 0 auto;
    min-height: 54px;
    padding: 0 1px;
    border: 0;
    border-radius: 0;
    color: #64748b;
    background: transparent;
    font-size: 13px;
    font-weight: 650;
    white-space: nowrap;
}

.distribution-top-tabs button:hover {
    color: #172033;
}

.distribution-top-tabs button.active {
    color: #1d4ed8;
    box-shadow: inset 0 -3px #2563eb;
}

.distribution-top-tabs button i {
    font-size: 14px;
}

.distribution-top-tabs button em {
    min-width: 18px;
    padding: 1px 5px;
    border-radius: 8px;
    color: #fff;
    background: #dc2626;
    font-size: 10px;
    font-style: normal;
    line-height: 16px;
    text-align: center;
}

.distribution-top-tabs button em:empty {
    display: none;
}

.distribution-content {
    min-width: 0;
    padding: 0 18px 18px;
}

.distribution-pane-title {
    min-height: 68px;
    padding: 13px 0;
}

.distribution-filter-row {
    margin: 0 0 12px;
    padding: 10px 0 12px;
    border: 0;
    border-bottom: 1px solid #f1f5f9;
    border-radius: 0;
    background: transparent;
}

.distribution-filter-tabs button.active {
    color: #1d4ed8;
}

.distribution-row-actions .btn {
    box-shadow: none;
}

@media (max-width: 820px) {
    .distribution-overview-line {
        grid-template-columns: repeat(4, minmax(150px, 1fr));
    }

    .distribution-top-tabs {
        gap: 20px;
        padding-inline: 14px;
    }

    .distribution-content {
        padding: 0 14px 14px;
    }
}

@media (max-width: 560px) {
    .dist-promotion-console {
        margin-bottom: 12px;
        padding: 14px;
        background: #fff;
    }

    .dist-balance-band {
        margin-bottom: 14px;
    }

    .dist-workspace {
        padding: 0 12px 12px;
    }

    .dist-primary-tabs {
        gap: 20px;
        margin-inline: -12px;
        padding-inline: 12px;
    }

    .dist-pane-head {
        min-height: 0;
        padding: 13px 0;
    }

    .distribution-overview-line {
        margin: 0 0 14px;
        padding: 0;
    }

    .distribution-top-tabs {
        gap: 18px;
        padding-inline: 12px;
    }

    .distribution-top-tabs button {
        min-height: 50px;
    }

    .distribution-content {
        padding: 0 12px 12px;
    }

    .distribution-filter-row {
        padding: 10px 0 12px;
    }
}

/* Promotion center uses the platform panel system and horizontal navigation. */
.promotion-metrics,
.promotion-workspace {
    overflow: hidden;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    background: rgba(255, 255, 255, .94);
    box-shadow: 0 1px 4px rgba(17, 24, 39, .08);
}

.promotion-metrics {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    margin-bottom: 16px;
}

.promotion-metric {
    position: relative;
    min-width: 0;
    min-height: 96px;
    padding: 14px 16px;
    border-right: 1px solid #e2e8f0;
}

.promotion-metric:last-child {
    border-right: 0;
}

.promotion-metric .stat-value {
    color: #0f172a;
    font-size: 20px;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    line-height: 1.25;
    letter-spacing: 0;
}

.promotion-metric .stat-label {
    margin-top: 4px;
    color: #64748b;
    font-size: 12px;
    font-weight: 500;
}

.promotion-metric .stat-meta {
    min-height: 17px;
    margin-top: 5px;
    color: #64748b;
    font-size: 11px;
    font-variant-numeric: tabular-nums;
    line-height: 1.5;
}

.promotion-metric .stat-meta span {
    color: #334155;
    font-weight: 600;
}

.promotion-workspace {
    min-width: 0;
}

.promotion-tabs {
    display: flex;
    align-items: stretch;
    gap: 24px;
    min-width: 0;
    min-height: 0;
    padding: 0 18px;
    overflow-x: auto;
    border-right: 0;
    border-bottom: 1px solid #e2e8f0;
    background: #f8fafc;
    scrollbar-width: thin;
}

.promotion-tabs button {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    flex: 0 0 auto;
    min-height: 54px;
    padding: 0 1px;
    border: 0;
    border-radius: 0;
    color: #64748b;
    background: transparent;
    font-size: 13px;
    font-weight: 650;
    text-align: left;
    white-space: nowrap;
}

.promotion-tabs button:hover {
    color: #0f172a;
}

.promotion-tabs button.active {
    color: #1d4ed8;
    background: transparent;
    box-shadow: inset 0 -3px #2563eb;
}

.promotion-pane {
    display: none;
    min-width: 0;
    padding: 16px 20px 20px;
}

.promotion-pane.active {
    display: block;
}

.promotion-pane .filter-bar {
    margin: 0 0 14px;
    padding: 0 0 14px;
    border: 0;
    border-bottom: 1px solid #f1f5f9;
    border-radius: 0;
    background: transparent;
}

.promotion-table-wrap {
    overflow: auto;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    background: #fff;
}

.promotion-table-wrap .saas-table {
    min-width: 920px;
    font-size: 13px;
}

.promotion-table-wrap .saas-table th {
    padding: 8px 10px;
    letter-spacing: 0;
}

.promotion-table-wrap .saas-table td {
    padding: 9px 10px;
    line-height: 1.35;
}

.promotion-table-wrap .saas-table strong,
.promotion-cell-title {
    font-size: inherit;
    font-weight: 600;
}

.promotion-pane[data-promo-pane="analytics"] .saas-table {
    min-width: 1680px;
}

.promotion-advice-reason {
    min-width: 180px;
    max-width: 260px;
    color: #64748b;
    white-space: normal;
}

.promotion-form-grid {
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    gap: 12px;
}

.promotion-field-3 {
    grid-column: span 3;
}

.promotion-field-4 {
    grid-column: span 4;
}

.promotion-field-6 {
    grid-column: span 6;
}

.promotion-field-8 {
    grid-column: span 8;
}

.promotion-field-12 {
    grid-column: span 12;
}

.promotion-asset-cell {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 190px;
}

.promotion-asset-preview {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 48px;
    width: 48px;
    height: 48px;
    overflow: hidden;
    border: 1px solid #dbe3ee;
    border-radius: 6px;
    background: #f8fafc;
}

.promotion-asset-preview img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.promotion-asset-preview-placeholder {
    color: #64748b;
    font-size: 20px;
}

.promotion-asset-url {
    display: inline-block;
    max-width: 250px;
    margin: 4px 6px 0 0;
    vertical-align: middle;
}

.promotion-checks {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    min-height: 38px;
}

.promotion-checks label {
    display: flex;
    align-items: center;
    gap: 5px;
}

.promotion-subtabs {
    display: flex;
    gap: 6px;
    margin-bottom: 14px;
}

.promotion-subtabs button.active {
    color: #2563eb;
    border-color: #3b82f6;
    background: #eff6ff;
}

.promotion-funnel {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    overflow: hidden;
    margin-bottom: 14px;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
}

.promotion-funnel > div {
    padding: 10px;
    border-right: 1px solid #e2e8f0;
    background: #fff;
}

.promotion-funnel > div:last-child {
    border-right: 0;
}

.promotion-funnel strong {
    display: block;
    font-size: 20px;
    font-variant-numeric: tabular-nums;
    letter-spacing: 0;
}

@media (max-width: 1100px) {
    .promotion-metrics {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .promotion-metric:nth-child(3n) {
        border-right: 0;
    }

    .promotion-metric:nth-child(-n + 3) {
        border-bottom: 1px solid #e2e8f0;
    }
}

@media (max-width: 820px) {
    .promotion-tabs {
        gap: 20px;
        padding-inline: 14px;
    }

    .promotion-pane {
        padding: 14px;
    }

    .promotion-funnel {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .promotion-funnel > div {
        border-bottom: 1px solid #e2e8f0;
    }

    .promotion-funnel > div:nth-child(2n) {
        border-right: 0;
    }

    .promotion-funnel > div:nth-last-child(-n + 2) {
        border-bottom: 0;
    }

    .promotion-field-3,
    .promotion-field-4,
    .promotion-field-6,
    .promotion-field-8 {
        grid-column: span 12;
    }
}

@media (max-width: 560px) {
    .promotion-metrics {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        margin-bottom: 12px;
    }

    .promotion-metric,
    .promotion-metric:nth-child(3n) {
        border-right: 1px solid #e2e8f0;
        border-bottom: 1px solid #e2e8f0;
    }

    .promotion-metric:nth-child(2n) {
        border-right: 0;
    }

    .promotion-metric:nth-last-child(-n + 2) {
        border-bottom: 0;
    }

    .promotion-tabs {
        gap: 18px;
        padding-inline: 12px;
    }

    .promotion-tabs button {
        min-height: 50px;
    }

    .promotion-pane {
        padding: 12px;
    }

    .promotion-pane .filter-bar {
        padding-bottom: 12px;
    }
}

/* Keep actions directly below horizontal tabs on one predictable toolbar row. */
.promotion-pane .filter-bar,
.promotion-subtabs,
.distribution-filter-row {
    flex-wrap: nowrap;
    overflow-x: auto;
    scrollbar-width: thin;
    -webkit-overflow-scrolling: touch;
}

.promotion-pane .filter-bar > *,
.promotion-subtabs > *,
.distribution-filter-row > * {
    flex: 0 0 auto;
}

.promotion-pane .filter-bar > .input-group {
    width: 260px !important;
}

.promotion-pane .filter-bar .input-group > .form-control {
    width: 1% !important;
    flex: 1 1 auto;
}

.promotion-pane .filter-bar > .form-control,
.promotion-pane .filter-bar > .form-select {
    width: auto !important;
    min-width: 130px;
    flex: 0 0 auto;
}

.promotion-pane .filter-bar > .input-group + .btn,
.promotion-pane .filter-bar > .form-select + .btn {
    margin-left: auto;
}

.promotion-pane .filter-bar .btn,
.promotion-subtabs .btn,
.distribution-pane-title > .btn,
.distribution-filter-row > .btn,
.dist-pane-head > .btn {
    width: auto !important;
    flex: 0 0 auto;
    white-space: nowrap;
}

.distribution-pane-title > div,
.dist-pane-head > div:first-child {
    min-width: 0;
}

.distribution-filter-tabs {
    flex: 0 0 auto;
    flex-wrap: nowrap;
}

.promotion-pane[data-promo-pane="rewards"] .promotion-subtabs,
.promotion-pane[data-promo-pane="rewards"] .filter-bar {
    display: flex;
    align-items: center;
    flex-wrap: nowrap;
    overflow-x: auto;
    white-space: nowrap;
}

.promotion-pane[data-promo-pane="rewards"] .promotion-subtabs > *,
.promotion-pane[data-promo-pane="rewards"] .filter-bar > * {
    flex: 0 0 auto;
}

.promotion-pane.active[data-promo-pane="rewards"] {
    display: grid;
    grid-template-columns: max-content minmax(0, 1fr);
    column-gap: 10px;
    align-items: start;
}

.promotion-pane[data-promo-pane="rewards"] > [data-reward-pane]:not(.d-none) {
    display: contents;
}

.promotion-pane[data-promo-pane="rewards"] > .promotion-subtabs {
    grid-column: 1;
    grid-row: 1;
    align-self: start;
    margin-bottom: 14px;
}

.promotion-pane[data-promo-pane="rewards"] > [data-reward-pane] > .filter-bar {
    grid-column: 2;
    grid-row: 1;
    align-self: start;
    min-width: 0;
}

.promotion-pane[data-promo-pane="rewards"] > [data-reward-pane] > .filter-bar > .btn {
    margin-left: 0;
}

.promotion-pane[data-promo-pane="rewards"] > [data-reward-pane] > .promotion-table-wrap {
    grid-column: 1 / -1;
    grid-row: 2;
}

.promotion-pane[data-promo-pane="rewards"] > [data-reward-pane] > [id^="promotion-pagination-"] {
    grid-column: 1 / -1;
    grid-row: 3;
}

/* Promotion analytics section heading: compact hierarchy without another card. */
.promotion-section-heading {
    display: flex;
    align-items: center;
    gap: 9px;
    margin: 18px 0 10px;
}

.promotion-section-heading-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 28px;
    width: 28px;
    height: 28px;
    border: 1px solid #bfdbfe;
    border-radius: 5px;
    color: #2563eb;
    background: #eff6ff;
    font-size: 14px;
}

.promotion-section-heading h3 {
    flex: 0 0 auto;
    margin: 0;
    color: #1f2937;
    font-family: inherit;
    font-size: 15px;
    font-weight: 700;
    line-height: 1.4;
    letter-spacing: 0;
}

.promotion-section-heading-line {
    flex: 1 1 auto;
    min-width: 24px;
    height: 1px;
    background: #e2e8f0;
}

/* Keep compact table actions readable without widening icon buttons. */
.row-actions > .btn + .btn {
    margin-left: 6px;
}

.distribution-row-actions {
    gap: 7px;
    flex-wrap: nowrap;
    white-space: nowrap;
}

@media (max-width: 560px) {
    .node-release-current {
        grid-template-columns: 1fr;
    }
    .node-release-card {
        align-items: flex-start;
        flex-direction: column;
        gap: 10px;
    }
    .node-release-card .node-release-actions {
        justify-content: flex-start;
        width: 100%;
    }

    .promotion-pane .filter-bar {
        align-items: center;
        margin-inline: -2px;
        padding-inline: 2px;
    }

    .promotion-pane .filter-bar > .form-control,
    .promotion-pane .filter-bar > .form-select {
        flex: 0 0 auto;
        width: auto !important;
    }

    .promotion-pane .filter-bar > .input-group {
        flex: 0 0 240px;
        width: 240px !important;
    }

    .distribution-pane-title,
    .dist-pane-head {
        align-items: center;
        flex-direction: row;
    }

    .distribution-stage-filter,
    .distribution-rule-member-filter {
        align-items: center;
        flex-direction: row;
    }

    .distribution-rule-member-filter > .form-select {
        width: 260px;
    }

    .dist-pane-head > .form-select {
        width: 150px;
        flex: 0 0 150px;
    }
}

/* Member distribution: complete surface styling for the current page structure. */
.member-distribution-page {
    width: 100%;
    max-width: 1690px;
    margin: 0 auto;
}

.member-distribution-head {
    align-items: center;
    min-height: 58px;
    margin-bottom: 16px;
}

.member-distribution-head > div:first-child {
    min-width: 0;
}

.member-distribution-head h1 {
    font-size: 23px;
    line-height: 1.25;
}

.member-distribution-head p {
    min-width: 0;
    line-height: 1.5;
}

.dist-head-actions {
    flex: 0 0 auto;
}

.dist-head-actions .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-height: 34px;
    white-space: nowrap;
}

.dist-promotion-console {
    grid-template-columns: minmax(220px, 300px) minmax(360px, 1fr);
    align-items: end;
    gap: 18px;
    padding: 16px 18px;
}

.dist-promotion-source,
.dist-promotion-link {
    min-width: 0;
}

.dist-promotion-source .form-select,
.dist-promotion-link .input-group {
    min-height: 34px;
}

.dist-promotion-source > span {
    min-height: 17px;
}

.dist-promotion-source .dist-field-label {
    display: block;
    margin-bottom: 5px;
    color: #64748b;
    font-size: 11px;
    font-weight: 650;
}

.dist-link-options {
    display: flex;
    align-items: center;
    gap: 16px;
    min-width: 0;
    min-height: 34px;
    overflow-x: auto;
    border-bottom: 1px solid #cbd5e1;
    color: #172033;
    white-space: nowrap;
    scrollbar-width: thin;
}

.dist-link-options button {
    align-self: stretch;
    flex: 0 0 auto;
    padding: 0;
    border: 0;
    color: #64748b;
    background: transparent;
    font-size: 13px;
    font-weight: 600;
}

.dist-link-options button:hover,
.dist-link-options button.active {
    color: #1d4ed8;
}

.dist-link-options button.active {
    box-shadow: inset 0 -2px #2563eb;
}

.dist-link-single {
    overflow: hidden;
    color: #172033;
    font-size: 14px;
    font-weight: 650;
    text-overflow: ellipsis;
}

.dist-link-empty {
    color: #94a3b8;
    font-size: 13px;
}

.dist-promotion-link .input-group {
    flex-wrap: nowrap;
}

.dist-promotion-link .form-control {
    color: #334155;
    background: #f8fafc;
}

.dist-balance-band {
    grid-template-columns: minmax(210px, .8fr) minmax(0, 2.2fr);
}

.dist-balance-primary {
    min-height: 106px;
    padding: 17px 20px;
}

.dist-balance-primary strong {
    color: #111827;
    font-size: 29px;
}

.dist-balance-metrics > div {
    min-height: 106px;
    padding: 16px 18px;
}

.dist-balance-metrics strong {
    margin-top: 4px;
    color: #1f2937;
    font-size: 18px;
}

.dist-workspace {
    min-width: 0;
    padding: 0 18px 16px;
}

.dist-primary-tabs {
    min-height: 52px;
    overflow-y: hidden;
    border-bottom: 1px solid #dbe3ee;
    scrollbar-width: thin;
}

.dist-primary-tabs button {
    position: relative;
    display: inline-flex;
    align-items: center;
    flex: 0 0 auto;
    min-height: 52px;
    color: #64748b;
    font-size: 13px;
    font-weight: 650;
    white-space: nowrap;
}

.dist-primary-tabs button.active {
    color: #1d4ed8;
    box-shadow: inset 0 -3px #2563eb;
}

.dist-pane {
    min-width: 0;
}

.dist-pane-head {
    border-bottom: 1px solid #f1f5f9;
}

.dist-pane-head h2 {
    color: #111827;
}

.dist-pane-head > .form-select {
    flex: 0 0 150px;
    min-height: 32px;
}

.dist-pane .table-responsive {
    max-height: min(62vh, 680px);
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    background: #fff;
}

.dist-pane .saas-table {
    margin: 0;
}

.dist-pane .saas-table tbody tr:hover td {
    background: #f8fafc;
}

.dist-pane .saas-pagination {
    margin: 12px 0 0 !important;
    padding-top: 12px;
    border-top: 1px solid #f1f5f9;
}

.dist-method-policy {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin-bottom: 14px;
    padding: 9px 10px;
    border: 1px solid #fde68a;
    border-radius: 6px;
    color: #92400e;
    background: #fffbeb;
    font-size: 12px;
    line-height: 1.5;
}

.dist-method-policy i {
    flex: 0 0 auto;
    margin-top: 1px;
}

.dist-method-row {
    background: #fff;
}

.dist-method-row:hover {
    border-color: #cbd5e1;
    background: #f8fafc;
}

@media (max-width: 1050px) {
    .dist-promotion-console {
        grid-template-columns: minmax(200px, 260px) minmax(0, 1fr);
    }

    .dist-promotion-link {
        grid-column: auto;
    }

    .dist-balance-band {
        grid-template-columns: 1fr;
    }

    .dist-balance-primary {
        border-right: 0;
        border-bottom: 1px solid #e2e8f0;
    }
}

@media (max-width: 720px) {
    .member-distribution-head {
        align-items: flex-start;
        flex-direction: column;
    }

    .dist-head-actions {
        display: flex;
        width: 100%;
        overflow-x: auto;
    }

    .dist-head-actions .btn {
        width: auto;
        flex: 0 0 auto;
    }

    .dist-balance-metrics {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .dist-balance-metrics > div:nth-child(2) {
        border-right: 0;
    }

    .dist-balance-metrics > div:nth-child(n + 3) {
        border-top: 1px solid #e2e8f0;
    }
}

@media (max-width: 560px) {
    .member-distribution-head h1 {
        font-size: 21px;
    }

    .dist-account-separation {
        display: block;
    }

    .dist-promotion-console {
        grid-template-columns: 1fr;
        gap: 12px;
        padding: 14px;
    }

    .dist-promotion-link {
        grid-column: auto;
    }

    .dist-promotion-link .btn span {
        display: inline;
    }

    .dist-balance-primary,
    .dist-balance-metrics > div {
        min-height: 82px;
        padding: 13px 14px;
    }

    .dist-balance-primary strong {
        font-size: 25px;
    }

    .dist-workspace {
        padding: 0 12px 12px;
    }

    .dist-primary-tabs {
        margin-inline: -12px;
        padding-inline: 12px;
    }

    .dist-pane-head > div:first-child > span {
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .dist-pane .saas-pagination {
        overflow-x: auto;
    }
}

/* Application market final overrides. Keep these after shared platform rules. */
.market-page-header {
    align-items: flex-end;
    gap: 20px;
    margin-bottom: 18px;
}

.market-header-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 0 0 auto;
}

.market-metrics {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    margin-bottom: 18px;
}

.market-workspace {
    min-width: 0;
    overflow: hidden;
}

.market-pane-intro {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 14px;
}

.market-pane-intro h2 {
    margin: 0 0 4px;
    color: #111827;
    font-size: 17px;
    font-weight: 700;
}

.market-pane-intro p {
    margin: 0;
    color: #64748b;
    font-size: 12px;
}

.market-result-count {
    flex: 0 0 auto;
    padding-top: 3px;
    color: #64748b;
    font-size: 12px;
    white-space: nowrap;
}

.market-workspace .market-filter-bar {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    min-width: 0;
    overflow: visible;
    padding: 0 0 14px;
    margin: 0 0 14px;
    border: 0;
    border-bottom: 1px solid #f1f5f9;
    background: transparent;
}

.market-workspace .market-filter-bar > * {
    flex: 0 0 auto;
}

.market-workspace .market-search-field {
    width: min(320px, 100%);
}

.market-workspace .market-filter-bar .form-select {
    width: 150px !important;
    min-width: 150px;
}

.market-workspace .market-filter-bar .market-product-select {
    width: min(320px, 100%) !important;
}

.market-workspace .market-filter-bar .btn:last-child {
    margin-left: auto;
}

.market-workspace .promotion-table-wrap {
    max-width: 100%;
}

.market-table {
    min-width: 860px !important;
    margin: 0;
}

.market-table th,
.market-table td {
    vertical-align: middle;
}

.market-table .market-actions-col {
    text-align: right;
    white-space: nowrap;
    background: #f8fafc;
}

.market-table tbody td:last-child {
    background: #fff;
}

.market-table tbody tr:hover td:last-child {
    background: #f8fafc;
}

.market-row-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: nowrap;
    gap: 5px;
}

.market-table-pagination {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding-top: 12px;
    border-top: 1px solid #e2e8f0;
}

.market-table-pagination-pages {
    display: flex;
    gap: 5px;
}

.market-release-detail-head {
    margin-bottom: 18px;
    padding-bottom: 16px;
    border-bottom: 1px solid #e2e8f0;
}

.market-release-detail-title-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    min-width: 0;
}

.market-release-back {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    gap: 6px;
    margin: 0;
    padding: 3px 14px 3px 0;
    border: 0;
    border-right: 1px solid #e2e8f0;
    color: #475569;
    background: transparent;
    font-size: 12px;
    font-weight: 650;
}

.market-release-back:hover,
.market-release-back:focus-visible {
    color: #2563eb;
}

.market-release-detail-heading {
    display: flex;
    flex: 1 1 auto;
    align-items: baseline;
    gap: 10px;
    min-width: 0;
}

.market-release-detail-heading h2,
.market-release-detail-heading span {
    margin: 0;
}

.market-release-detail-heading h2 {
    overflow: hidden;
    color: #172033;
    font-size: 16px;
    font-weight: 650;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.market-release-detail-heading span {
    overflow: hidden;
    color: #64748b;
    font-size: 12px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.market-row-actions .btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    white-space: nowrap;
}

.market-tenant-results {
    max-height: 240px;
    margin-top: 6px;
    overflow-y: auto;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    background: #fff;
}

.market-tenant-result {
    display: block;
    width: 100%;
    padding: 9px 11px;
    border: 0;
    border-bottom: 1px solid #eef2f7;
    color: #1e293b;
    background: #fff;
    text-align: left;
}

.market-tenant-result:last-child {
    border-bottom: 0;
}

.market-tenant-result:hover,
.market-tenant-result:focus-visible {
    background: #f8fafc;
}

.market-tenant-result strong,
.market-tenant-result span {
    display: block;
}

.market-tenant-result strong {
    font-size: 13px;
}

.market-tenant-result span,
.market-tenant-result-empty {
    color: #64748b;
    font-size: 12px;
}

.market-tenant-result span {
    margin-top: 2px;
}

.market-tenant-result-empty {
    padding: 12px;
    text-align: center;
}

.market-product-cell {
    min-width: 220px;
}

.market-product-cell strong {
    display: block;
    max-width: 240px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.market-type-badge,
.market-model-badge,
.market-channel-badge {
    display: inline-flex;
    align-items: center;
    min-height: 22px;
    padding: 2px 7px;
    border: 1px solid #cbd5e1;
    border-radius: 999px;
    color: #334155;
    background: #f8fafc;
    font-size: 11px;
    font-weight: 650;
    white-space: nowrap;
}

.market-product-tags {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 5px;
}

.market-model-badge {
    border-color: #bfdbfe;
    color: #1d4ed8;
    background: #eff6ff;
}

.market-channel-badge.channel-stable {
    border-color: #bbf7d0;
    color: #166534;
    background: #f0fdf4;
}

.market-channel-badge.channel-beta {
    border-color: #fde68a;
    color: #92400e;
    background: #fffbeb;
}

.market-channel-badge.channel-internal {
    border-color: #ddd6fe;
    color: #6d28d9;
    background: #f5f3ff;
}

.market-info-strip,
.market-upload-note {
    display: flex;
    align-items: flex-start;
    gap: 9px;
    margin-bottom: 12px;
    padding: 10px 12px;
    border: 1px solid #bfdbfe;
    border-radius: 6px;
    color: #1e40af;
    background: #eff6ff;
    font-size: 12px;
    line-height: 1.55;
}

.market-upload-note {
    color: #334155;
    background: #f8fafc;
    border-color: #e2e8f0;
}

.market-upload-note strong,
.market-upload-note span {
    display: block;
}

.market-upload-note span {
    margin-top: 2px;
    color: #64748b;
}

.market-cover-preview {
    position: relative;
    display: block;
    width: 100%;
    max-width: 190px;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    border: 1px solid #dbe3ee;
    border-radius: 6px;
    background: #f8fafc;
}

.market-cover-preview img {
    display: block;
    width: 100%;
    height: 100%;
    border: 0;
    object-fit: cover;
}

.market-cover-preview span {
    position: absolute;
    right: 6px;
    bottom: 5px;
    left: 6px;
    overflow: hidden;
    color: #475569;
    font-size: 10px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.market-form-section {
    margin-bottom: 18px;
    padding-bottom: 4px;
    border-bottom: 1px solid #eef2f7;
}

.market-form-section:last-child {
    margin-bottom: 0;
    border-bottom: 0;
}

.market-form-section-title {
    margin-bottom: 10px;
    color: #334155;
    font-size: 12px;
    font-weight: 750;
}

.market-manifest-editor {
    min-height: 180px;
    resize: vertical;
    tab-size: 2;
}

.market-upload-progress {
    height: 5px;
    margin-top: 8px;
}

.market-workspace .promotion-field-2 { grid-column: span 2; }
.market-workspace .promotion-field-5 { grid-column: span 5; }
.market-workspace .promotion-field-7 { grid-column: span 7; }
.market-modal .promotion-field-2 { grid-column: span 2; }
.market-modal .promotion-field-5 { grid-column: span 5; }
.market-modal .promotion-field-7 { grid-column: span 7; }

.market-modal .modal-content {
    overflow: hidden;
    border: 0;
    border-radius: 8px;
    box-shadow: 0 18px 50px rgba(15, 23, 42, .22);
}

.market-modal .modal-header {
    padding: 18px 22px;
    border-bottom: 1px solid #e2e8f0;
}

.market-modal .modal-body {
    padding: 20px 22px;
}

.market-modal .modal-footer {
    gap: 8px;
    padding: 14px 22px;
    border-top: 1px solid #e2e8f0;
    background: #f8fafc;
}

.market-modal .form-label {
    margin-bottom: 6px;
    color: #334155;
    font-size: 12px;
    font-weight: 650;
}

.market-modal .form-control,
.market-modal .form-select {
    min-height: 36px;
}

.market-modal .form-text {
    margin-top: 5px;
    color: #64748b;
    font-size: 11px;
    line-height: 1.45;
}

#modal-market-product .modal-dialog { max-width: 780px; }
#modal-market-release .modal-dialog { max-width: 1080px; }
#modal-market-entitlement .modal-dialog { max-width: 560px; }

@media (max-width: 820px) {
    .market-metrics {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .market-workspace .promotion-field-2,
    .market-workspace .promotion-field-3,
    .market-workspace .promotion-field-4,
    .market-workspace .promotion-field-5,
    .market-workspace .promotion-field-6,
    .market-workspace .promotion-field-7,
    .market-workspace .promotion-field-8 {
        grid-column: span 12;
    }

    .market-modal .modal-body {
        padding: 16px;
    }
}

@media (max-width: 560px) {
    .market-page-header {
        align-items: flex-start;
        flex-direction: column;
        gap: 12px;
    }

    .market-header-actions {
        width: 100%;
    }

    .market-header-actions .btn {
        flex: 1 1 0;
    }

    .market-pane-intro {
        flex-direction: column;
        gap: 4px;
    }

    .market-release-detail-title-row {
        align-items: center;
        flex-direction: row;
        gap: 10px;
    }

    .market-release-back {
        padding-right: 10px;
    }

    .market-release-detail-heading h2 {
        font-size: 15px;
        white-space: nowrap;
    }

    .market-release-detail-heading span {
        display: none;
    }

    .market-table-pagination {
        align-items: flex-start;
        flex-direction: column;
    }

    .market-table-pagination-pages {
        flex-wrap: wrap;
    }

    .market-workspace .market-filter-bar {
        align-items: stretch;
    }

    .market-workspace .market-search-field,
    .market-workspace .market-filter-bar .form-select,
    .market-workspace .market-filter-bar .market-product-select {
        width: 100% !important;
        min-width: 0;
    }

    .market-workspace .market-filter-bar .btn:last-child {
        width: 100%;
        margin-left: 0;
    }

    .market-row-actions {
        justify-content: flex-start;
    }

    .market-modal .modal-dialog {
        margin: 8px;
    }

    .market-modal .modal-header {
        padding: 14px 16px;
    }

    .market-modal .modal-footer {
        padding: 12px 16px;
    }

    .market-modal .modal-footer .btn {
        flex: 1 1 0;
    }
}

/* Application market dialogs: one clear title, grouped fields, and a usable action area. */
.market-modal .modal-content {
    background: #f8fafc;
}

.market-modal .modal-header {
    display: flex;
    align-items: center;
    min-height: 62px;
    background: #fff;
}

.market-modal .modal-title {
    margin: 0;
    color: #172033;
    font-size: 18px;
    font-weight: 700;
    line-height: 1.35;
}

.market-modal .btn-close {
    flex: 0 0 auto;
    margin: 0 0 0 auto;
    padding: 8px;
    border-radius: 4px;
    opacity: .72;
}

.market-modal .btn-close:hover,
.market-modal .btn-close:focus {
    background: #f1f5f9;
    opacity: 1;
}

.market-modal .modal-body {
    background: #f8fafc;
}

.market-modal .market-form-section {
    margin-bottom: 14px;
    padding: 15px 16px 16px;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    background: #fff;
}

.market-modal .market-form-section:last-child {
    margin-bottom: 0;
}

.market-modal .market-form-section-title {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 14px;
    color: #1e293b;
    font-size: 13px;
    font-weight: 700;
}

.market-modal .market-form-section-title::before {
    display: block;
    width: 3px;
    height: 15px;
    border-radius: 2px;
    background: #2563eb;
    content: "";
}

.market-modal .promotion-form-grid {
    row-gap: 14px;
}

.market-product-plan-picker {
    position: relative;
}

.market-product-plan-picker .dropdown-menu {
    max-height: 220px;
    overflow-y: auto;
}

.market-product-plan-options {
    gap: 8px;
}

.market-product-plan-picker .dropdown-menu.show {
    display: grid;
    grid-template-columns: 1fr;
}

.market-product-plan-option {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
    padding: 5px 6px;
    cursor: pointer;
}

.market-product-plan-option:hover { background: #f8fafc; }

.market-product-plan-option input {
    margin-top: 3px;
    accent-color: #2563eb;
    flex: 0 0 auto;
}

.market-product-plan-option span {
    display: flex;
    align-items: baseline;
    min-width: 0;
    gap: 7px;
}

.market-product-plan-option strong,
.market-product-plan-option small {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.market-product-plan-option strong { color: #1e293b; font-size: 12px; }
.market-product-plan-option small { color: #64748b; font-size: 11px; }

.market-modal .form-control,
.market-modal .form-select {
    border-color: #cbd5e1;
    background-color: #fff;
    color: #1e293b;
}

.market-modal .form-control:focus,
.market-modal .form-select:focus {
    border-color: #60a5fa;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, .12);
}

.market-modal .modal-footer {
    background: #fff;
}

.market-modal .modal-footer .btn {
    min-width: 92px;
}

.market-modal .market-upload-note {
    margin-bottom: 14px;
}

.market-release-auto-summary {
    min-height: 34px;
    display: flex;
    align-items: center;
    padding: 7px 10px;
    border: 1px solid #dbe3ee;
    border-radius: 6px;
    background: #f8fafc;
    color: #526174;
    font-size: 12px;
    overflow-wrap: anywhere;
}

#modal-market-release .modal-content,
#modal-market-release .modal-body {
    background: #fff;
}

#modal-market-release .modal-body {
    padding-top: 4px;
    padding-bottom: 6px;
}

#modal-market-release .market-form-section {
    margin: 0;
    padding: 18px 0 20px;
    border: 0;
    border-bottom: 1px solid #e2e8f0;
    border-radius: 0;
    background: transparent;
}

#modal-market-release .market-form-section:last-child {
    border-bottom: 0;
}

@media (max-width: 820px) {
    .market-modal .promotion-field-2,
    .market-modal .promotion-field-3,
    .market-modal .promotion-field-4,
    .market-modal .promotion-field-5,
    .market-modal .promotion-field-6,
    .market-modal .promotion-field-7,
    .market-modal .promotion-field-8 {
        grid-column: span 12;
    }
}

@media (max-width: 560px) {
    .market-modal .modal-title {
        font-size: 16px;
    }

    .market-modal .market-form-section {
        padding: 13px 12px 14px;
    }

    .market-modal .modal-footer .btn {
        min-width: 0;
    }
}
