.ecommerce-analysis-settings { margin-top: 20px; padding: 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--panel); color: var(--text); }
.ecommerce-analysis-settings summary { cursor: pointer; font-weight: 600; }
.ecommerce-analysis-settings summary:focus-visible { outline: 2px solid var(--blue); outline-offset: 4px; }
.ecommerce-analysis-settings iframe { display: block; width: 100%; height: 1200px; margin-top: 16px; border: 0; }
.bma-shell, .bma-dialog {
    --bma-sidebar: var(--bg);
    --bma-green: #00835c;
    --bma-green-bg: #ecfdf5;
    --bma-green-line: #8de6bb;
    --bma-amber: #aa6500;
    --bma-amber-bg: #fffbeb;
    --bma-amber-line: #ffc566;
    color: var(--text);
    font-family: Arial, "Microsoft YaHei", "PingFang SC", sans-serif;
    font-size: 13px;
    line-height: 1.5;
}
.bma-shell *, .bma-dialog * { box-sizing: border-box; }
.bma-shell h1, .bma-shell h2, .bma-shell h3, .bma-shell p, .bma-dialog h2, .bma-dialog p { margin: 0; }
.bma-shell button, .bma-dialog button, .bma-dialog input, .bma-dialog select { font-family: inherit; }
.bma-shell button, .bma-dialog button { cursor: pointer; }
.bma-shell button:disabled, .bma-dialog button:disabled { cursor: not-allowed; opacity: .5; }
.bma-shell .bma-icon, .bma-dialog .bma-icon { width: 15px; height: 15px; flex: 0 0 auto; display: inline-block; vertical-align: middle; }
.bma-shell .bma-policy-banner > .bma-icon { margin-top: 1px; }
.bma-shell .bma-empty-pool > .bma-icon { width: 32px; height: 32px; color: var(--blue); }
.bma-shell .bma-workspace-footnote .bma-icon { margin-right: 8px; }
.bma-shell button:focus-visible, .bma-dialog button:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; }
.bma-dialog input:focus-visible, .bma-dialog select:focus-visible { outline: 2px solid var(--blue); outline-offset: 1px; }
.bma-configuration { min-height: 760px; border: 1px solid var(--line); border-radius: 12px; background: var(--panel); overflow: hidden; }
.bma-page-head { min-height: 90px; padding: 22px 24px 18px; display: flex; align-items: center; justify-content: space-between; gap: 24px; border-bottom: 1px solid var(--line); }
.bma-page-head h1 { font-size: 18px; font-weight: 750; line-height: 1.3; color: var(--text); }
.bma-page-head p { margin-top: 6px; color: var(--muted); font-size: 13px; line-height: 1.55; }
.bma-count-badge { flex-shrink: 0; padding: 9px 14px; border-radius: 999px; background: var(--blue-soft); color: var(--blue); font-size: 11px; font-weight: 700; }
.bma-status-section { padding: 18px 24px; border-bottom: 1px solid var(--line); }
.bma-policy-banner { display: flex; align-items: flex-start; gap: 11px; min-height: 70px; padding: 14px 16px; border: 1px solid var(--bma-green-line); border-radius: 10px; background: var(--bma-green-bg); color: var(--bma-green); }
.bma-banner-symbol { font-size: 20px; line-height: 20px; }
.bma-policy-banner strong { display: block; font-size: 13px; line-height: 18px; }
.bma-policy-banner p { margin-top: 4px; font-size: 12px; line-height: 1.55; }
.bma-management-layout { display: grid; grid-template-columns: 270px minmax(0, 1fr); min-height: 590px; }
.bma-provider-side { padding: 18px; border-right: 1px solid var(--line); background: var(--bma-sidebar); }
.bma-side-heading { display: flex; justify-content: space-between; gap: 10px; align-items: center; margin-bottom: 12px; }
.bma-side-heading strong { font-size: 12px; }
.bma-side-heading > span { font-size: 11px; color: var(--muted); }
.bma-provider-list { display: grid; gap: 8px; }
.bma-provider-card { width: 100%; min-height: 66px; display: flex; align-items: center; justify-content: space-between; padding: 11px 12px; gap: 10px; border: 1px solid var(--line); border-radius: 9px; color: var(--text); background: var(--panel); text-align: left; }
.bma-provider-card strong { display: block; font-size: 13px; font-weight: 750; }
.bma-provider-card small { display: block; margin-top: 4px; font-size: 11px; color: var(--muted); }
.bma-provider-card > span { display: grid; place-items: center; width: 26px; height: 26px; flex: 0 0 auto; border-radius: 50%; font-size: 11px; font-weight: 700; color: var(--muted); background: var(--bg); }
.bma-provider-card.is-active { border-color: var(--blue); background: var(--blue-soft); box-shadow: inset 3px 0 0 var(--blue); }
.bma-provider-card.is-active > span { color: white; background: #2f7df6; }
.bma-side-note { margin: 16px 2px 0 !important; color: var(--muted); font-size: 11px; line-height: 1.8; }
.bma-management-main { min-width: 0; padding: 22px 24px 28px; }
.bma-workspace-head { display: flex; align-items: center; justify-content: space-between; gap: 18px; }
.bma-protocol { display: block; color: var(--blue); font-size: 11px; font-weight: 750; letter-spacing: 1.8px; text-transform: uppercase; }
.bma-workspace-head h2 { margin-top: 6px; font-size: 20px; line-height: 26px; font-weight: 750; color: var(--text); }
.bma-workspace-head p { margin-top: 5px; color: var(--muted); font-size: 13px; line-height: 1.55; }
.bma-head-actions { display: flex; gap: 7px; flex-wrap: wrap; justify-content: flex-end; }
.bma-button { min-height: 34px; display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 7px 11px; border: 1px solid var(--line); border-radius: 7px; background: var(--panel); color: var(--text); font-size: 12px; line-height: 17px; font-weight: 600; white-space: nowrap; transition: background .12s, border-color .12s; }
.bma-button:hover:not(:disabled) { border-color: var(--blue); background: var(--blue-soft); }
.bma-button.is-primary { border-color: #2f7df6; background: #2f7df6; color: #fff; }
.bma-button.is-primary:hover:not(:disabled) { background: #216ae3; }
.bma-button.is-small { min-height: 31px; font-size: 11px; padding: 5px 8px; gap: 5px; }
.bma-button.is-danger { color: var(--danger); }
.bma-button.is-danger-solid { color: white; background: #e74747; border-color: #e74747; }
.bma-button.is-icon { padding: 5px; min-width: 28px; min-height: 28px; font-size: 20px; border: 0; color: var(--muted); }
.bma-pool-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; gap: 14px; margin-top: 44px; }
.bma-api-pool { min-width: 0; border: 1px solid var(--line); border-radius: 14px; padding: 14px; background: var(--panel); box-shadow: var(--shadow); }
.bma-pool-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.bma-pool-head > div:first-child > span { color: var(--muted); font-size: 11px; }
.bma-pool-head h3 { margin-top: 3px; font-size: 16px; line-height: 25px; font-weight: 750; color: var(--text); }
.bma-pool-actions { display: flex; gap: 6px; }
.bma-pool-actions .bma-button { font-weight: 700; min-height: 36px; }
.bma-pool-summary { margin-top: 5px !important; color: var(--muted); font-size: 11px; line-height: 18px; }
.bma-pool-alert { margin-top: 12px !important; min-height: 37px; padding: 9px 11px; border: 1px solid var(--bma-amber-line); border-radius: 8px; background: var(--bma-amber-bg); color: var(--bma-amber); font-size: 11px; line-height: 17px; }
.bma-api-list { display: grid; gap: 10px; margin-top: 12px; }
.bma-empty-pool { min-height: 150px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; padding: 22px 12px; border: 1px dashed var(--line); border-radius: 10px; background: var(--panel); text-align: center; }
.bma-key-symbol { color: var(--blue); font-size: 34px; line-height: 34px; }
.bma-empty-pool strong { margin-top: 2px; font-size: 16px; }
.bma-empty-pool p { color: var(--muted); font-size: 13px; line-height: 1.6; }
.bma-api-card { display: grid; grid-template-columns: minmax(150px, 1fr) 70px auto; gap: 12px; align-items: center; padding: 16px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel); }
.bma-api-card.is-disabled { opacity: .75; background: var(--bg); }
.bma-api-identity { display: flex; align-items: center; gap: 10px; min-width: 0; }
.bma-status-dot { width: 9px; height: 9px; flex: 0 0 auto; border-radius: 50%; background: var(--muted); box-shadow: 0 0 0 4px var(--bg); }
.bma-status-dot.is-active { background: #13a86b; box-shadow: 0 0 0 4px var(--bma-green-bg); }
.bma-api-identity > div { display: grid; gap: 4px; min-width: 0; }
.bma-api-identity strong { font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bma-api-identity small { font-size: 10px; color: var(--muted); }
.bma-model-summary { padding: 0; border: 0; background: transparent; color: var(--muted); font-size: 10px; line-height: 15px; text-align: left; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.bma-model-summary:hover { color: var(--blue); text-decoration: underline; }
.bma-bound-count { padding: 0 8px; border-left: 1px solid var(--line); text-align: center; }
.bma-bound-count strong { display: block; font-size: 22px; line-height: 26px; }
.bma-bound-count span { display: block; margin-top: 3px; color: var(--muted); font-size: 10px; white-space: nowrap; }
.bma-api-actions { display: grid; gap: 6px; justify-items: end; }
.bma-api-actions > div { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 5px; }
.bma-workspace-footnote { color: var(--muted); margin-top: 22px !important; font-size: 11px; line-height: 1.8; }
.bma-stage-section { display: flex; flex-wrap: wrap; align-items: center; gap: 18px; margin-top: 28px; }
.bma-stage-section p { color: var(--muted); font-size: 11px; }
.bma-stage-tabs { display: flex; gap: 4px; border: 1px solid var(--line); border-radius: 8px; padding: 3px; }
.bma-stage-tabs button { border: 0; border-radius: 5px; background: transparent; color: var(--muted); padding: 7px 16px; font-size: 12px; }
.bma-stage-tabs button.is-selected { background: var(--blue-soft); color: var(--blue); font-weight: 700; }
.bma-stage-section + .bma-pool-grid { margin-top: 26px; }
.bma-dialog { width: min(550px, calc(100vw - 32px)); max-height: min(90vh, 850px); padding: 0; border: 1px solid var(--line); border-radius: 14px; background: var(--panel); box-shadow: 0 24px 80px rgba(0, 0, 0, .16); }
.bma-dialog.is-wide { width: min(650px, calc(100vw - 32px)); }
.bma-dialog::backdrop { background: rgba(18, 30, 49, .36); }
.bma-dialog-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; padding: 23px 24px 19px; border-bottom: 1px solid var(--line); }
.bma-dialog-head h2 { font-size: 18px; line-height: 24px; color: var(--text); }
.bma-dialog-head p { margin-top: 6px; color: var(--muted); font-size: 12px; line-height: 1.6; }
.bma-dialog-body { display: grid; gap: 18px; padding: 22px 24px; }
.bma-dialog-note { color: var(--muted); background: var(--bg); border: 1px solid var(--line); border-radius: 8px; padding: 12px 13px; font-size: 12px; line-height: 1.75; }
.bma-field { display: grid; gap: 7px; font-size: 12px; font-weight: 600; }
.bma-field input, .bma-field select, .bma-alias-field input, .bma-user-search { width: 100%; min-width: 0; min-height: 40px; border: 1px solid var(--line); border-radius: 7px; background: var(--panel); color: var(--text); padding: 9px 11px; font-size: 13px; font-weight: 400; }
.bma-field input[readonly] { background: var(--bg); color: var(--muted); }
.bma-field small { color: var(--muted); font-size: 11px; font-weight: 400; line-height: 1.6; }
.bma-dialog-footer { display: flex; justify-content: flex-end; gap: 9px; padding: 16px 24px; border-top: 1px solid var(--line); position: sticky; bottom: 0; background: var(--panel); }
.bma-dialog-footer .bma-button { min-height: 38px; padding-inline: 16px; }
.bma-dialog-status { align-self: center; margin-right: auto; color: var(--muted); font-size: 12px; }
.bma-form-error, .bma-message.is-error { color: var(--danger); font-size: 12px; line-height: 1.7; }
.bma-form-error:empty { display: none; }
.bma-message { padding-top: 10px; overflow-wrap: anywhere; }
.bma-message.is-success { color: var(--bma-green); }
.bma-form-info, .bma-loading { color: var(--muted); font-size: 12px; line-height: 1.75; }
.bma-loading { padding-top: 20px; }
.bma-model-table { border: 1px solid var(--line); border-radius: 9px; overflow: hidden; }
.bma-model-row { display: grid; grid-template-columns: minmax(0, 1fr) 180px; align-items: center; gap: 16px; padding: 16px; }
.bma-model-row + .bma-model-row { border-top: 1px solid var(--line); }
.bma-dialog input[type="checkbox"] { accent-color: #2f7df6; width: 16px; height: 16px; flex-shrink: 0; }
.bma-model-toggle { display: flex; gap: 10px; align-items: flex-start; font-size: 13px; }
.bma-model-toggle input { margin: 1px 0 0; }
.bma-model-toggle > span { display: grid; gap: 5px; }
.bma-model-toggle code { font-size: 11px; color: var(--muted); overflow-wrap: anywhere; }
.bma-alias-field { display: grid; gap: 6px; color: var(--muted); font-size: 10px; }
.bma-alias-field input { font-size: 12px; min-height: 34px; padding: 6px 9px; }
.bma-selection-head { display: flex; justify-content: space-between; align-items: center; gap: 16px; font-size: 12px; color: var(--muted); }
.bma-selection-head > div { display: flex; gap: 8px; }
.bma-selection-head .bma-button { border: 0; padding: 0; background: transparent; min-height: 26px; font-size: 12px; color: var(--blue); }
.bma-user-list { border: 1px solid var(--line); border-radius: 8px; overflow: hidden; max-height: 360px; overflow-y: auto; }
.bma-user-row { display: flex; align-items: center; gap: 11px; padding: 13px 15px; cursor: pointer; }
.bma-user-row + .bma-user-row { border-top: 1px solid var(--line); }
.bma-user-row:hover { background: var(--bg); }
.bma-user-row > span:not(.bma-avatar) { display: grid; gap: 5px; min-width: 0; overflow-wrap: anywhere; }
.bma-user-row strong { font-size: 13px; }
.bma-user-row small { font-size: 11px; color: var(--muted); }
.bma-user-row em { margin-left: auto; color: var(--muted); font-style: normal; font-size: 11px; flex-shrink: 0; }
.bma-avatar { width: 33px; height: 33px; flex: 0 0 auto; display: grid; place-items: center; border-radius: 9px; color: var(--blue); background: var(--blue-soft); font-size: 12px; }
.bma-confirm-copy { font-size: 14px; line-height: 1.9; }
.bma-dialog-empty { display: grid; justify-items: center; gap: 12px; padding: 28px 12px; text-align: center; color: var(--muted); }
.bma-dialog-empty strong { color: var(--text); font-size: 15px; }
.bma-dialog-empty p { font-size: 12px; }
.bma-activate-kinds { display: flex; gap: 14px; flex-wrap: wrap; margin: 0; padding: 12px; border: 1px solid var(--line); border-radius: 7px; }
.bma-activate-kinds legend { padding: 0 5px; color: var(--muted); font-size: 12px; }
.bma-activate-kinds label { display: inline-flex; align-items: center; gap: 6px; }
.bma-legacy-list { display: grid; gap: 10px; }
.bma-legacy-list article { padding: 12px; border: 1px solid var(--line); border-radius: 8px; overflow-wrap: anywhere; }
.bma-legacy-list p, .bma-legacy-list small { color: var(--muted); font-size: 12px; }
@media (prefers-color-scheme: dark) {
    .bma-shell, .bma-dialog { --bma-green: #65d8b0; --bma-green-bg: #152e2a; --bma-green-line: #2d6757; --bma-amber: #f0bf70; --bma-amber-bg: #30291d; --bma-amber-line: #745c35; color-scheme: dark; }
}
:root[data-theme="dark"] .bma-shell, :root[data-theme="dark"] .bma-dialog { --bma-green: #65d8b0; --bma-green-bg: #152e2a; --bma-green-line: #2d6757; --bma-amber: #f0bf70; --bma-amber-bg: #30291d; --bma-amber-line: #745c35; color-scheme: dark; }
:root[data-theme="light"] .bma-shell, :root[data-theme="light"] .bma-dialog { --bma-green: #00835c; --bma-green-bg: #ecfdf5; --bma-green-line: #8de6bb; --bma-amber: #aa6500; --bma-amber-bg: #fffbeb; --bma-amber-line: #ffc566; color-scheme: light; }
@media (max-width: 1400px) {
    .bma-api-card { grid-template-columns: minmax(120px, 1fr) 60px; }
    .bma-api-actions { grid-column: 1 / -1; display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 7px; }
    .bma-pool-head { flex-wrap: wrap; }
}
@media (max-width: 1200px) {
    .bma-management-layout { grid-template-columns: 210px minmax(0, 1fr); }
    .bma-pool-grid { grid-template-columns: 1fr; gap: 18px; margin-top: 28px; }
    .bma-api-card { grid-template-columns: minmax(150px, 1fr) 70px auto; }
    .bma-api-actions { grid-column: auto; display: grid; }
}
@media (max-width: 760px) {
    .bma-page-head { padding: 18px 16px; gap: 12px; align-items: flex-start; }
    .bma-page-head h1 { font-size: 17px; }
    .bma-page-head p { font-size: 12px; line-height: 1.8; }
    .bma-count-badge { padding: 7px 10px; font-size: 10px; }
    .bma-status-section { padding: 14px 16px; }
    .bma-policy-banner { padding: 12px; }
    .bma-policy-banner p { font-size: 11px; }
    .bma-management-layout { grid-template-columns: 1fr; }
    .bma-provider-side { border-right: 0; border-bottom: 1px solid var(--line); padding: 16px; }
    .bma-provider-list { grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); }
    .bma-side-note { display: none; }
    .bma-management-main { padding: 18px 16px 22px; }
    .bma-workspace-head { align-items: flex-start; gap: 10px; flex-wrap: wrap; }
    .bma-workspace-head h2 { font-size: 19px; }
    .bma-workspace-head p { font-size: 12px; }
    .bma-pool-head { gap: 9px; }
    .bma-pool-head h3 { font-size: 15px; }
    .bma-pool-head > div:first-child > span { font-size: 10px; }
    .bma-pool-actions .bma-button { min-height: 34px; font-size: 11px; padding: 6px 9px; }
    .bma-api-card { grid-template-columns: minmax(0, 1fr) 62px; }
    .bma-api-actions { grid-column: 1 / -1; display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px; }
    .bma-pool-grid { margin-top: 25px; }
    .bma-stage-tabs { width: 100%; }
    .bma-stage-tabs button { flex: 1; padding-inline: 10px; }
    .bma-dialog-head { padding: 20px 18px 16px; }
    .bma-dialog-body { padding: 18px; }
    .bma-dialog-footer { padding: 14px 18px; }
    .bma-model-row { grid-template-columns: 1fr; gap: 12px; padding: 14px; }
    .bma-alias-field { padding-left: 25px; }
    .bma-user-row { gap: 8px; padding: 12px; }
    .bma-user-row em { font-size: 10px; }
}
@media (prefers-reduced-motion: reduce) { .bma-shell *, .bma-dialog * { transition: none !important; } }
