/* Users/commerce content only; the approved B navigation is unchanged. */
.commerce-panel { padding:20px; }
/* The shared page header owns the gap, just as it does on home. */
.b-main #page > .page-head + .commerce-panel { margin-top:0; }
.commerce-panel .panel-head { margin-bottom:18px; border:0; padding:0; }
.commerce-panel > .table-scroll { border:0; border-radius:0; }
.commerce-panel .tag.blue,.commerce-detail .tag.blue { color:var(--blue); background:#eaf1ff; }
.commerce-panel .panel-subtitle,.commerce-purchase .panel-subtitle,.commerce-detail .panel-subtitle { color:var(--muted); }
.commerce-panel .panel-head > .panel-subtitle { margin-right:auto; }
.commerce-filters { display:flex; flex-wrap:wrap; align-items:center; gap:12px; margin-bottom:24px; }
.commerce-filters input { width:360px; max-width:100%; }
.commerce-filters select { width:156px; max-width:100%; }
.commerce-table { width:100%; min-width:860px; border-collapse:collapse; font-size:12px; color:var(--body); }
.commerce-table th { padding:12px; background:#f5f7fb; color:var(--muted); font-weight:600; text-align:left; white-space:nowrap; }
.commerce-table th:first-child { border-radius:7px 0 0 7px; }
.commerce-table th:last-child { border-radius:0 7px 7px 0; }
.commerce-table td { padding:15px 12px; border-bottom:1px solid var(--line); vertical-align:middle; }
.commerce-table td:first-child { min-width:160px; }
.commerce-table td:last-child { white-space:nowrap; }
.commerce-table strong { font-weight:600; }
.commerce-table small { display:block; margin-top:5px; color:var(--muted); font-size:11px; }
.commerce-order-number { color:var(--body); font-weight:400; }
.commerce-note { margin:22px 0 0; color:var(--muted); line-height:1.8; font-size:12px; }
.commerce-purchase { display:flex; align-items:center; gap:22px; padding:20px; }
.commerce-purchase h2 { margin:0; font-size:14px; }
.commerce-purchase .commerce-switch-label { margin-left:auto; }
.commerce-switch-label { display:inline-flex; gap:10px; align-items:center; font-size:12px; color:var(--muted); }
.commerce-switch { appearance:none; display:inline-block; position:relative; width:35px; height:20px; flex:none; margin:0; background:#d5dde8; border:0; border-radius:12px; cursor:pointer; transition:background .15s; }
.commerce-switch::after { content:""; position:absolute; width:14px; height:14px; left:3px; top:3px; border-radius:50%; background:white; transition:transform .15s; }
.commerce-switch:checked { background:var(--blue); }
.commerce-switch:checked::after { transform:translateX(15px); }
.commerce-switch:focus-visible { outline:2px solid var(--blue); outline-offset:3px; }
.commerce-rules > .panel-head { margin-bottom:8px; }
.commerce-rule-group { display:grid; grid-template-columns:240px minmax(0,550px); gap:24px; padding:24px 0; border-bottom:1px solid var(--line); }
.commerce-rule-title { position:relative; }
.commerce-rule-title .commerce-switch-label { margin-top:10px; }
.commerce-rule-fields { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:24px; }
.b-main .commerce-rule-fields .form-row { display:flex; flex-direction:column; align-items:stretch; gap:8px; margin:0; }
.commerce-rule-fields .form-row > label { color:var(--muted); font-size:12px; }
.commerce-rules .b-context-note { margin:24px 0 0; }
.commerce-backdrop { padding:0; place-items:stretch end; }
body:has(.commerce-backdrop) > .toast { z-index:30; }
.modal-panel.commerce-drawer { display:flex; flex-direction:column; align-self:end; width:min(550px,100vw); height:calc(100dvh - 60px); max-height:calc(100dvh - 60px); border-radius:0; overflow:hidden; }
.commerce-drawer .modal-head { flex:none; padding:24px; }
.commerce-drawer-body { min-height:0; flex:1; overflow-y:auto; padding:24px; }
.commerce-drawer-body.commerce-editor-body { display:flex; padding:0; overflow:hidden; }
.commerce-editor-shell { display:flex; flex-direction:column; flex:1; min-height:0; min-width:0; }
.commerce-editor-fields { flex:1; min-height:0; overflow-y:auto; padding:24px; }
.commerce-drawer .modal-actions { position:static; flex:none; flex-wrap:wrap; padding:18px 24px; }
.commerce-drawer-body > article { padding:0; box-shadow:none; border:0; margin:0; }
.commerce-drawer-body .panel-head { margin-bottom:20px; }
.commerce-drawer-body .panel-head:has(.commerce-switch) { padding:0; border:0; }
.commerce-drawer-body .checkbox-field { display:flex; align-items:center; gap:10px; }
.commerce-drawer-body .commerce-readonly-id { padding-top:20px; border-top:1px solid var(--line); }
.commerce-drawer-body .form-row { display:flex; flex-direction:column; align-items:stretch; gap:8px; margin:18px 0; }
.commerce-drawer-body .form-row > label { font-size:12px; color:var(--muted); }
.b-main .commerce-drawer-body .two-col { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:16px; }
.commerce-drawer-body .two-col .form-row { margin:0 0 16px; }
.commerce-drawer-body .field-control { width:100%; min-width:0; }
.commerce-detail h3 { font-size:15px; margin:28px 0 18px; }
.commerce-detail dl { margin:0; padding-bottom:24px; border-bottom:1px solid var(--line); }
.commerce-detail dl > div { display:grid; grid-template-columns:96px minmax(0,1fr); gap:12px; margin:18px 0; font-size:12px; }
.commerce-detail dt { color:var(--muted); }
.commerce-detail dd { margin:0; overflow-wrap:anywhere; }
.commerce-batch { background:#f5f8fd; border-radius:10px; padding:16px; margin:18px 0; display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:16px; }
.commerce-batch > div { display:flex; flex-direction:column; gap:8px; min-width:0; }
.commerce-batch span,.commerce-batch small,.commerce-batch p { font-size:11px; color:var(--muted); }
.commerce-batch strong { font-size:15px; overflow-wrap:anywhere; }
.commerce-batch p { grid-column:1 / -1; margin:0; overflow-wrap:anywhere; }
@media(max-width:1050px) { .commerce-rule-group { grid-template-columns:180px minmax(0,1fr); } }
@media(max-width:760px) { .commerce-panel,.commerce-purchase { padding:16px; } .commerce-purchase { flex-wrap:wrap; } .commerce-purchase > div { width:100%; } .commerce-purchase .commerce-switch-label { margin-left:0; margin-right:auto; } .commerce-rule-group { grid-template-columns:1fr; gap:16px; } .commerce-filters { gap:8px; } .commerce-filters input { width:100%; } }
