.sm-table { min-width:1490px; }
.sm-table th { white-space:nowrap; }
.sm-page .bm-search { width:330px; }
.sm-dialog { width:min(1840px,100%); height:min(960px,calc(100dvh - 40px)); display:flex; flex-direction:column; overflow:hidden; }
.sm-dialog.sm-confirm { width:min(520px,100%); height:auto; }
.sm-dialog > header,.sm-dialog footer { flex-shrink:0; }
.sm-dialog form { display:flex; flex-direction:column; min-height:0; }
.sm-expanded-form { flex:1; }
.sm-form-scroll { overflow-y:auto; padding:12px; background:#f3f5f9; flex:1; min-height:0; }
.sm-form-card { padding:24px 20px 28px; background:#fff; border:1px solid #edf0f5; border-radius:5px; margin-bottom:12px; }
.sm-form-card:last-of-type { margin-bottom:0; }
.sm-form-card h3 { margin:0 0 24px; border-left:2px solid #3978ff; padding-left:9px; font-size:13px; font-weight:600; color:#293c59; }
.sm-fields { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:20px 24px; }
.sm-fields > label,.sm-field { display:flex; align-items:center; gap:8px; min-width:0; }
.sm-fields > label > span,.sm-field > span { flex:0 0 106px; text-align:right; line-height:1.5; color:#5d6b81; }
.sm-fields i { color:#e16b7a; font-style:normal; }
.sm-fields input:not([type=file]):not([type=radio]),.sm-fields textarea,.sm-choice-trigger { width:100%; min-width:0; box-sizing:border-box; height:34px; border:1px solid #cbd7e8; border-radius:4px; padding:7px 10px; background:#fff; color:#40516b; font:inherit; }
.sm-fields input::placeholder,.sm-fields textarea::placeholder { color:#9aaac0; }
.sm-fields input[readonly] { background:#f8f9fc!important; color:#91a0b7!important; }
.sm-fields input:focus-visible,.sm-fields textarea:focus-visible,.sm-choice-trigger:focus-visible { outline:none; border-color:#3978ff!important; box-shadow:0 0 0 2px #3978ff12; }
.sm-span-two { grid-column:span 2; }
.sm-span-all { grid-column:1/-1; }
.sm-notes,.sm-accounts { align-items:flex-start!important; }
.sm-notes > span,.sm-accounts > span { padding-top:9px; }
.sm-fields textarea { height:76px; resize:vertical; }
.sm-choice,.sm-choice-slot { flex:1; min-width:0; position:relative; }
.sm-choice-trigger { display:flex; align-items:center; justify-content:space-between; gap:6px; cursor:pointer; text-align:left; }
.sm-choice-trigger > span { overflow:hidden; white-space:nowrap; text-overflow:ellipsis; }
.sm-choice-trigger svg { width:14px; height:14px; flex:none; fill:none; stroke:#97a6bd; stroke-width:1.5; }
.sm-choice-trigger[aria-expanded=true] { border-color:#3978ff; }
.sm-choice-menu { position:absolute; top:calc(100% + 5px); left:0; z-index:10; width:max(100%,190px); box-sizing:border-box; padding:8px; background:#fff; border:1px solid #e0e7f1; border-radius:5px; box-shadow:0 8px 24px #233b6126; }
.sm-choice-menu [role=listbox] { max-height:160px; overflow-y:auto; margin-top:6px; }
.sm-choice-menu button { width:100%; display:block; border:0; padding:8px; background:transparent; text-align:left; color:#506580; font:inherit; cursor:pointer; border-radius:3px; }
.sm-choice-menu button:hover,.sm-choice-menu button:focus-visible { background:#f2f6ff; }
.sm-choice-menu button[aria-selected=true] { color:#2670f5; background:#edf3ff; }
.sm-warehouse-control { display:flex; flex:1; min-width:0; gap:8px; }
.sm-warehouse-control > div { flex:1; min-width:0; }
.sm-warehouse-add { padding:0 9px; white-space:nowrap; font-size:12px; }
.sm-percentage { display:flex; align-items:center; flex:1; min-width:0; position:relative; }
.sm-percentage input { padding-right:30px!important; }
.sm-percentage > span { position:absolute; right:10px; color:#93a0b5; pointer-events:none; }
.sm-account-wrap { flex:1; min-width:0; overflow-x:auto; border:1px solid #e0e7f1; border-radius:4px; }
.sm-account-wrap table { border-collapse:collapse; table-layout:fixed; width:100%; min-width:840px; }
.sm-account-wrap th,.sm-account-wrap td { padding:9px 8px; text-align:left; border-bottom:1px solid #e7ecf4; font-weight:400; }
.sm-account-wrap th { background:#f7f9fc; color:#435976; white-space:nowrap; }
.sm-account-wrap th:first-child,.sm-account-wrap td:first-child { text-align:center; }
.sm-account-wrap tfoot td { text-align:left!important; padding-left:12px; border-bottom:0; }
.sm-account-wrap input[type=radio] { accent-color:#3978ff; width:14px; height:14px; }
.sm-expanded-form > footer { background:#fff; justify-content:center; }
.sm-expanded-form > footer .pm-button { min-width:96px; }
.sm-attachments .pm-attachment-field { flex:1; min-width:0; }
.sm-warehouse-overlay { position:fixed; inset:0; z-index:1600; background:#15223755; display:flex; align-items:center; justify-content:center; padding:20px; }
.sm-warehouse-dialog { width:min(440px,100%); display:flex; flex-direction:column; overflow:hidden; }
.sm-warehouse-dialog > header { height:62px; flex-shrink:0; padding:0 26px; }
.sm-warehouse-dialog .sm-warehouse-form { padding:28px 26px 18px; overflow-y:auto; }
.sm-warehouse-form > label { margin-bottom:22px; gap:8px; }
.sm-warehouse-form > label > span,.sm-warehouse-property > span { flex:0 0 74px; text-align:right; }
.sm-warehouse-property { display:flex; align-items:center; gap:8px; margin:8px 0 30px; }
.sm-warehouse-property label { margin:0; display:flex; gap:8px; }
.sm-warehouse-property input { width:15px; height:15px; margin:0; padding:0; accent-color:#3978ff; }
.sm-warehouse-count { position:relative; min-width:0; flex:1; }
.sm-warehouse-count input { padding-right:54px; }
.sm-warehouse-count small { position:absolute; right:10px; bottom:10px; color:#93a0b5; pointer-events:none; }
.sm-warehouse-form .sm-warehouse-notes { align-items:flex-start; margin-bottom:0; }
.sm-warehouse-notes > span { padding-top:9px; }
.sm-warehouse-notes textarea { height:56px; min-height:56px; padding-bottom:22px; resize:vertical; display:block; }
.sm-warehouse-form input::placeholder,.sm-warehouse-form textarea::placeholder { color:#9ca8ba; }
.sm-warehouse-dialog footer { border-top:0; padding:20px 26px; gap:12px; }
@media(max-width:1400px) { .sm-fields { grid-template-columns:repeat(2,minmax(0,1fr)); } .sm-finance-spacer { display:none; } }
@media(max-width:700px) { .sm-dialog { height:calc(100dvh - 24px); } .sm-form-scroll { padding:8px; } .sm-form-card { padding:20px 12px; } .sm-fields { grid-template-columns:minmax(0,1fr); gap:16px; } .sm-span-two { grid-column:1/-1; } .sm-fields > label > span,.sm-field > span { flex-basis:80px; } .sm-page .bm-search { width:0; } .sm-accounts { display:block; } .sm-accounts > span { display:block; text-align:left; padding:0 0 10px; } }

.sm-attachments .pm-attachment-upload input { display:none; }

.sm-fields > .sm-credit-code > span { flex-basis:124px; white-space:nowrap; }
.sm-fields > .sm-credit-code > input { flex:1; max-width:none; }
.sm-address-controls { display:flex; flex:1; gap:20px; min-width:0; }
.sm-region-choice { width:135px; flex-shrink:0; }
.sm-address-controls > input { flex:1; }
.sm-address-card { padding-bottom:40px; }
.sm-address-card .sm-choice-menu { top:auto; bottom:calc(100% + 5px); }
@media(max-width:700px) { .sm-address-controls { flex-wrap:wrap; gap:10px; } .sm-region-choice { width:calc(50% - 5px); } .sm-address-controls > input { flex-basis:100%; } }

.sm-table td.sm-pinned { z-index:1; background:#fff; }
.sm-table th.sm-pinned { z-index:2; background:#f6f8fb; }
.sm-table tbody tr:hover td.sm-pinned { background:#fafcff; }

.sm-table .sm-actions-fixed { position:sticky; right:0; z-index:3; background:#fff; box-shadow:-5px 0 8px -7px #536783; }
.sm-table th.sm-actions-fixed { z-index:4; background:#f6f8fb; }
.sm-table tbody tr:hover td.sm-actions-fixed { background:#fafcff; }
