/* Web uses the accepted Mini BMS layout; transaction and form owners are unchanged. */
.user-bms-view{position:fixed;inset:0;z-index:90;overflow:auto;background:var(--page);}
.user-bms-view [hidden],.user-bms-view[hidden]{display:none!important;}
.bms-management-body{box-sizing:border-box;width:min(100%,568px);margin:auto;padding:calc(12px + env(safe-area-inset-top,0px)) 14px calc(92px + env(safe-area-inset-bottom,0px));}
.bms-management-head{display:flex;align-items:center;justify-content:center;min-height:44px;margin:0;}
.bms-management-head h2{font-size:17px;font-weight:600;margin:0;}
.bms-device{display:flex;align-items:center;justify-content:space-between;gap:8px;flex-wrap:wrap;padding:8px 0 12px;}
.bms-device>span{font-size:12px;color:var(--muted);overflow-wrap:anywhere;}
.bms-permission-state{display:flex;align-items:center;justify-content:space-between;gap:8px;}
.bms-management-body button.bms-text-action{width:auto;min-width:0;min-height:0;margin:0;padding:4px 0;border:0;background:transparent;box-shadow:none;border-radius:0;color:var(--ink);font:inherit;}
.bms-management-body .bms-device .bms-text-action{font-size:16px;font-weight:650;min-width:0;max-width:100%;overflow:hidden;text-overflow:ellipsis;text-align:left;}
.bms-management-body [data-bms-note]{font-size:13px;color:var(--red);padding:8px 0;margin:0;}
.bms-state,.bms-management-body [data-bms-note][data-tone="green"]{color:#16834b;font-size:12px;}
.bms-sections{display:flex;background:#f0f2f5;border-radius:12px;padding:3px;margin:12px 0;}
.bms-management-body button.bms-tab{flex:1;width:auto;min-width:0;min-height:44px;margin:0;border:0;background:transparent;padding:8px 6px;font-size:14px;line-height:24px;border-radius:9px;color:#667085;box-shadow:none;transition:background .16s ease,color .16s ease;}
.bms-management-body button.bms-tab[aria-selected="true"]{background:#fff;color:#171a21;box-shadow:0 1px 4px rgba(0,0,0,.06);}
.bms-groups{width:100%;margin:12px 0;overflow-x:auto;}
.bms-group-row{display:flex;gap:6px;width:max-content;}
.bms-management-body button.bms-chip{flex:none;width:auto;min-width:0;min-height:44px;margin:0;padding:5px 12px;font-size:12px;line-height:24px;background:#f3f5f7;color:#667085;border-radius:999px;border:1px solid transparent;box-shadow:none;}
.bms-management-body button.bms-chip[aria-pressed="true"]{background:#242a34;color:#fff;border-color:#242a34;}
.bms-toolbar{display:flex;align-items:center;justify-content:space-between;min-height:44px;gap:8px;}
.bms-toolbar small{font-size:11px;color:var(--muted);}
.bms-read-summary{display:flex;flex-direction:column;gap:4px;min-width:0;}
.bms-actions{display:flex;align-items:center;gap:8px;flex:none;}
.bms-management-body button.bms-action{position:relative;overflow:hidden;flex:none;width:auto;min-height:44px;margin:0;padding:9px 13px;font-size:13px;line-height:24px;border:0;border-radius:12px;background:#f5f7fa;color:var(--ink);box-sizing:border-box;box-shadow:none;}
.bms-management-body button.bms-action.primary{background:#1478f2;color:#fff;}
.bms-action-ring{position:absolute;inset:0;border-radius:12px;overflow:hidden;pointer-events:none;}
.bms-action-ring .product-switch-orbit{width:180px;height:180px;}
.bms-action-cover{position:absolute;inset:2px;border-radius:10px;background:#f5f7fa;}
.primary .bms-action-cover{background:#1478f2;}
.bms-action-label{position:relative;}
.bms-management-body button.bms-action[aria-busy="true"]{opacity:1;}
.bms-management-body button.bms-action:disabled{opacity:1;background:#edf0f4!important;color:#667085!important;box-shadow:none!important;}
.bms-fields{margin:0;background:transparent;}
.bms-field{display:flex;justify-content:space-between;align-items:center;gap:12px;min-height:54px;padding:8px 0;border-bottom:1px solid #eef0f4;font-size:14px;box-sizing:border-box;}
.bms-field-label{display:flex;flex-direction:column;flex:1;min-width:0;overflow-wrap:anywhere;}
.bms-field-value{display:grid;grid-template-columns:minmax(0,1fr) 32px;align-items:center;column-gap:6px;flex:none;width:146px;font-variant-numeric:tabular-nums;word-break:break-all;}
.bms-management-body .bms-field-value :is(input,select){width:100%;height:38px;min-height:38px;padding:6px 8px;border:1px solid #dfe5ec;border-radius:9px;background:#fff;color:var(--ink);box-sizing:border-box;text-align:right;font:inherit;font-size:14px;line-height:24px;margin:0;box-shadow:none;}
.bms-field.edited .bms-field-value :is(input,select){border-color:#7c8797;}
.bms-management-body .bms-field-value :is(input,select):focus{border-color:#1478f2;outline:none;box-shadow:none;}
.bms-read-value{text-align:right;}
.bms-field-value small{font-size:12px;color:var(--muted);}
.bms-log-search{width:100%;box-sizing:border-box;min-height:48px;margin:6px 0 14px;border:1px solid #dfe5ec;border-radius:12px;padding:0 12px;background:#fff;color:var(--ink);font:inherit;}
.bms-log{padding:14px 0;border-bottom:1px solid #eef0f4;font-size:14px;}
.bms-log-head{display:flex;align-items:flex-start;justify-content:space-between;gap:8px;}
.bms-log-head strong{font-weight:650;}
.bms-log-head small{font-size:10px;text-align:right;flex:none;color:var(--muted);}
.bms-log-fields{margin-top:8px;display:flex;flex-direction:column;gap:5px;font-size:12px;}
.bms-log-fields>div{display:flex;align-items:center;justify-content:space-between;gap:8px;}
.bms-log-fields>div>span:first-child{color:var(--muted);}
.bms-management-body .protected-control-group{margin:0;border:0;padding:0;background:transparent;box-shadow:none;}
.bms-management-body .control-operation-line{font-size:12px;margin:8px 0;padding:0;border:0;background:transparent;}
.bms-management-body .control-switch-list{margin:12px 0;}
:is(body[data-theme="dark"],html[data-theme="dark"]) .bms-sections{background:#1e2530;}
:is(body[data-theme="dark"],html[data-theme="dark"]) .bms-management-body button.bms-tab{color:#a3adbc;}
:is(body[data-theme="dark"],html[data-theme="dark"]) .bms-management-body button.bms-tab[aria-selected="true"]{background:#303949;color:#f3f6fa;}
:is(body[data-theme="dark"],html[data-theme="dark"]) .bms-management-body button.bms-chip{background:#1e2530;color:#a3adbc;}
:is(body[data-theme="dark"],html[data-theme="dark"]) .bms-management-body button.bms-chip[aria-pressed="true"]{background:#e6e9ee;color:#1b2028;border-color:#e6e9ee;}
:is(body[data-theme="dark"],html[data-theme="dark"]) :is(.bms-state,.bms-management-body [data-bms-note][data-tone="green"]){color:#76dba5;}
:is(body[data-theme="dark"],html[data-theme="dark"]) :is(.bms-field,.bms-log){border-color:#242d3b;}
:is(body[data-theme="dark"],html[data-theme="dark"]) .bms-management-body .bms-field-value :is(input,select),:is(body[data-theme="dark"],html[data-theme="dark"]) .bms-log-search{border-color:#354154;background:#141b25;}
:is(body[data-theme="dark"],html[data-theme="dark"]) .bms-field.edited .bms-field-value :is(input,select){border-color:#8d99aa;}
:is(body[data-theme="dark"],html[data-theme="dark"]) .bms-management-body .bms-field-value :is(input,select):focus{border-color:#73bbff;}
:is(body[data-theme="dark"],html[data-theme="dark"]) .bms-management-body button.bms-action,:is(body[data-theme="dark"],html[data-theme="dark"]) .bms-action-cover{background:#0e1218;}
:is(body[data-theme="dark"],html[data-theme="dark"]) .bms-management-body button.bms-action.primary,:is(body[data-theme="dark"],html[data-theme="dark"]) .primary .bms-action-cover{background:#1f65cc;}
:is(body[data-theme="dark"],html[data-theme="dark"]) .bms-management-body button.bms-action:disabled{background:#11151c!important;color:#a3adbc!important;}
body.user-view[data-user-surface="bms"] .phone-shell>:is(.app-header,.content){display:none;}
.user-capsule button[hidden]{display:none;}.user-capsule[data-count="4"].compact{width:208px;}
@media(prefers-reduced-motion:reduce){.bms-management-body button.bms-tab{transition:none;}}

.bms-category{display:flex;align-items:center;justify-content:space-between;width:100%;min-height:48px;margin:0;padding:12px 0;background:transparent;color:inherit;font-size:16px;text-align:left;border:0;border-bottom:1px solid var(--line,#e5e7eb);border-radius:0}
dialog.bms-parameter-dialog{width:calc(100% - 32px);max-width:440px;max-height:calc(100dvh - 32px);padding:16px;border:0;border-radius:16px;box-sizing:border-box;background:#fff;color:var(--ink,#171a21)}
.bms-parameter-dialog::backdrop{background:rgba(0,0,0,.42)}.bms-parameter-header{display:grid;grid-template-columns:44px minmax(0,1fr) 44px;gap:10px;align-items:center;text-align:center;margin-bottom:12px}
.bms-parameter-header button{width:44px;min-width:44px;min-height:44px;margin:0;padding:0;font-size:14px;background:transparent;color:inherit;border:0;box-shadow:none}.bms-parameter-body{max-height:65vh;overflow:auto}
.bms-parameter-row{display:flex;gap:10px;align-items:center;width:100%;min-height:48px;padding:10px 0;margin:0;background:transparent;color:inherit;border:0;border-bottom:1px solid var(--line,#e5e7eb);border-radius:0;text-align:left;font-size:14px;box-shadow:none}
.bms-parameter-row>span:first-child{flex:1;min-width:0;overflow-wrap:anywhere}.bms-parameter-current{margin-left:auto;flex-shrink:0;max-width:50%;text-align:right;overflow-wrap:anywhere;font-variant-numeric:tabular-nums}.bms-edit-label{display:block;margin-bottom:10px;font-size:14px}.bms-edit-control{display:grid;grid-template-columns:minmax(0,1fr) 32px;gap:6px;align-items:center}
.bms-edit-control .bms-edit-input{width:100%;height:44px;min-height:44px;padding:10px 12px;margin:0;border:1px solid var(--line,#dfe5ec);border-radius:9px;box-sizing:border-box;font-size:16px;line-height:24px;background:#fff;color:inherit}
.bms-parameter-body .bms-actions{justify-content:flex-end;flex-wrap:wrap;gap:10px;margin-top:16px}.bms-parameter-body button{min-height:44px}.bms-management-body .bms-parameter-body>button.bms-edit-done{display:block;width:88px;max-width:100%;min-width:0;margin:16px 0 0 auto}

:is(body[data-theme="dark"],html[data-theme="dark"]) dialog.bms-parameter-dialog,:is(body[data-theme="dark"],html[data-theme="dark"]) .bms-edit-control .bms-edit-input{background:#141b25;color:#f3f6fa;border-color:#354154}

.bms-management-body button.bms-category:disabled,.bms-management-body button.bms-parameter-row:disabled{background:transparent;box-shadow:none;color:inherit;opacity:1}
.bms-action-ring .product-switch-orbit.orbit-n1{animation-name:orbit-n1}
.bms-action-ring .product-switch-orbit.orbit-n2{animation-name:orbit-n2}
.bms-action-ring .product-switch-orbit.orbit-n3{animation-name:orbit-n3}
.bms-action-ring .product-switch-orbit.orbit-n4{animation-name:orbit-n4}
.bms-action-ring .product-switch-orbit.orbit-n5{animation-name:orbit-n5}
.bms-action-ring .product-switch-orbit.orbit-n6{animation-name:orbit-n6}
.bms-action-ring .product-switch-orbit.orbit-n7{animation-name:orbit-n7}
.bms-action-ring .product-switch-orbit.orbit-n8{animation-name:orbit-n8}
