/* v0.10.24: common spacing, compact controls and internal page layout. */
:root{--sa-panel-padding:16px;--sa-field-gap:16px;--sa-label-gap:8px;--sa-control-height:44px}
.shared-layout .workspace>.hero,.sa-tools-workspace>.tools-hero{display:none!important}
.shared-layout .workspace,.sa-tools-workspace{box-sizing:border-box;min-width:0;padding-inline:var(--sa-panel-padding)!important}
.shared-layout .workspace>.panel,.shared-layout .workspace .master-list,.sa-tools-workspace .card,.sa-settings-card{box-sizing:border-box;padding:var(--sa-panel-padding)!important;min-width:0}
/* Product field grid is the baseline. Remove stacking margins from labels in grid forms. */
:is(.master-editor-form,.sa-modal-body form,.modal .panel form,.product-fields,.password-shell form){align-content:start;row-gap:var(--sa-field-gap)}
:is(.master-editor-form,.sa-modal-body form,.modal .panel form,.product-fields,.password-shell form) label:not(:has(input[type=checkbox],input[type=radio])){display:grid;gap:var(--sa-label-gap);margin:0!important;min-width:0;align-content:start;font-size:14px;line-height:1.35}
:is(.master-editor-form,.sa-modal-body form,.modal .panel form,.product-fields,.password-shell form) :is(.field,.pf-grid,.grid){margin:0!important;row-gap:var(--sa-field-gap);align-items:start;min-width:0}
:is(.master-editor-form,.sa-modal-body form,.modal .panel form,.product-fields,.password-shell form) :is(input:not([type=checkbox],[type=radio],[type=hidden],[type=file]),select){box-sizing:border-box;min-width:0;min-height:var(--sa-control-height);font-size:14px;border-radius:10px;margin:0!important}
:is(.master-editor-form,.sa-modal-body form,.modal .panel form,.product-fields,.password-shell form) textarea{box-sizing:border-box;min-width:0;font-size:14px;margin:0!important}
.sa-master-modal .sa-modal-body{padding:20px!important}.sa-master-modal .master-editor-form{gap:var(--sa-field-gap)!important;grid-auto-rows:max-content!important;align-content:start!important}
/* Pagination: label and controls must remain on the same baseline. */
:is(.sa-master-pager,.sa-pagination){display:flex!important;align-items:center!important;justify-content:flex-end;flex-wrap:wrap;gap:8px!important;padding:12px 0 0!important;margin:12px 0 0!important;min-width:0;border-top:1px solid #503c52;color:#c7b6d0;font-size:12px}
:is(.sa-master-pager,.sa-pagination)>span:first-child{margin-right:auto;white-space:normal}
:is(.sa-master-pager,.sa-pagination) .sa-page-size{display:inline-flex!important;flex-direction:row!important;align-items:center!important;justify-content:flex-start!important;gap:7px!important;margin:0!important;padding:0!important;white-space:nowrap;width:auto!important;min-width:0!important;flex:0 0 auto!important}
:is(.sa-master-pager,.sa-pagination) select{width:70px!important;min-width:0!important;height:34px!important;min-height:34px!important;padding:0 8px!important;margin:0!important;box-sizing:border-box;font-size:13px;border-radius:8px}
:is(.sa-master-pager,.sa-pagination)>button{display:inline-grid!important;place-items:center;flex:0 0 34px;width:34px!important;height:34px!important;min-width:34px!important;min-height:34px!important;margin:0!important;padding:0!important;border-radius:8px!important;background:#392c40!important;border:1px solid #65485c!important;color:#f4cc85!important;box-shadow:none!important}
:is(.sa-master-pager,.sa-pagination)>button:not(:disabled):hover{background:#6d3148!important;box-shadow:0 0 10px #c96b7f44!important}
:is(.sa-master-pager,.sa-pagination)>button:disabled{opacity:.4;cursor:default}.sa-page-count{display:inline-flex;align-items:center;justify-content:center;min-width:46px;height:34px;white-space:nowrap;color:#f4cc85;font-variant-numeric:tabular-nums}.sa-master-pager svg,.sa-pagination svg{width:16px;height:16px}
/* Refresh is an action, not a tab. */
.sa-refresh-toolbar,.sa-floor-heading{display:flex;align-items:center;justify-content:flex-end;gap:10px;margin-bottom:12px;min-width:0}.sa-floor-heading>.floor-heading{margin-right:auto}.sa-refresh-icon{display:inline-grid!important;place-items:center!important;width:36px!important;height:36px!important;min-height:36px!important;min-width:36px!important;flex:0 0 36px!important;padding:0!important;border-radius:9px!important;background:#34283d!important;border:1px solid #735166!important;color:#ffd184!important;box-shadow:none!important}.sa-refresh-icon svg{width:19px;height:19px}.sa-refresh-icon:hover:not(:disabled){background:#532d43!important;box-shadow:0 0 12px #c36a8050!important}.sa-refresh-icon:disabled svg,.sa-refreshing svg{animation:sa-refresh-spin .9s linear infinite}@keyframes sa-refresh-spin{to{transform:rotate(360deg)}}.supplier-picker-head>.sa-refresh-icon{margin-left:auto}
/* Validation overlay does not occupy a grid row. */
.sa-validation-message{position:fixed!important;z-index:2147483000!important;width:max-content!important;max-width:min(300px,calc(100vw - 16px))!important;margin:0!important;pointer-events:none;box-sizing:border-box}.sa-validation-message.sa-tip-above::before{top:auto;bottom:-5px;transform:rotate(225deg)}
/* Settings and password alignment. */
.sa-settings-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px;align-items:start}.sa-settings-card{display:grid;gap:16px;margin:0!important}.sa-settings-head{display:flex;gap:12px;align-items:center;padding-bottom:14px;border-bottom:1px solid #544053}.sa-settings-head h2{color:#ffd184;font-size:18px;margin:0}.sa-settings-head p{margin:4px 0 0}.sa-settings-icon{width:44px;height:44px;display:grid;place-items:center;flex:none;background:#573044;border:1px solid #835064;border-radius:11px;color:#ffd184}.sa-settings-icon svg{width:24px;height:24px}.sa-settings-card .sa-settings-info{display:grid;grid-template-columns:minmax(80px,1fr) 2fr;gap:0 16px;margin:0}.sa-settings-info dt,.sa-settings-info dd{padding:12px 0;border-bottom:1px solid #49384c}.sa-setting-switch{display:flex;align-items:center;gap:12px;position:relative;cursor:pointer}.sa-setting-switch>span:first-child{flex:1;min-width:0}.sa-setting-switch small{display:block;margin-top:4px;color:#bdaac6}.sa-setting-switch input{position:absolute;right:0;opacity:0;width:44px;height:26px;cursor:pointer}.sa-switch-track{display:block;width:44px;height:26px;flex:none;border-radius:20px;background:#57475e;border:1px solid #78596c;position:relative;pointer-events:none}.sa-switch-track::after{content:'';position:absolute;top:4px;left:4px;width:16px;height:16px;background:#f9edf4;border-radius:50%;transition:transform .18s}.sa-setting-switch input:checked+.sa-switch-track{background:#a03753}.sa-setting-switch input:checked+.sa-switch-track::after{transform:translateX(18px)}.sa-setting-switch input:focus-visible+.sa-switch-track{outline:2px solid #ffd184;outline-offset:3px}.sa-settings-version{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-top:16px}.sa-settings-version p{margin:5px 0 0}.sa-settings-version>span{color:#ffd184;background:#382c40;padding:7px 12px;border-radius:8px;white-space:nowrap}
body.password-page:not(.shared-password){display:flex!important;min-height:100dvh;flex-direction:column;align-items:center;justify-content:safe center;padding:16px!important;box-sizing:border-box}body.password-page:not(.shared-password)>.password-shell{width:min(100%,520px);margin:auto!important;padding:0!important}.password-page.shared-password .shared-main{display:flex!important;flex-direction:column;min-height:100dvh;box-sizing:border-box}.password-page.shared-password .shared-main>.password-shell,html.sa-embedded .password-page .shared-main>.password-shell{width:min(calc(100% - 32px),520px)!important;margin:auto!important;padding:16px 0!important;box-sizing:border-box}.password-page.shared-password .shared-main>.shared-bottom{flex:none}html.sa-embedded .password-page .shared-main{min-height:100dvh!important}
@media(max-width:767px){:root{--sa-panel-padding:12px;--sa-field-gap:14px}.sa-master-modal .sa-modal-body{padding:16px!important}.sa-settings-grid{grid-template-columns:1fr}.sa-master-pager>span:first-child,.sa-pagination>span:first-child{flex-basis:100%}.sa-master-pager,.sa-pagination{justify-content:flex-start!important;gap:6px!important}.sa-settings-head h2{font-size:16px}.sa-refresh-toolbar{flex-wrap:wrap}.sa-floor-heading{align-items:flex-start}}
@media(prefers-reduced-motion:reduce){.sa-refresh-icon svg,.sa-refreshing svg{animation:none!important}.sa-switch-track::after{transition:none}}
/* End animation without a transformed containing block for fixed tooltips. */
@keyframes sa-popup-enter{from{opacity:0;transform:translateY(9px) scale(.98)}to{opacity:1;transform:none}}
.sa-validation-message{animation:sa-popup-fade .18s ease-out!important;transform:none!important}
.sa-hover-tip{animation:sa-popup-fade .18s ease-out!important;transform:none!important}
/* Other internal forms use the same label and field spacing, excluding compact table entry rows. */
:is(.pf-form,.detail-form,.prod-recipe) {row-gap:var(--sa-field-gap)}
:is(.pf-form,.detail-form,.prod-recipe) > label:not(:has(input[type=checkbox],input[type=radio])){display:grid;gap:var(--sa-label-gap);margin:0!important;align-content:start;font-size:14px;line-height:1.35}
:is(.pf-form,.detail-form,.prod-recipe) > label > :is(input:not([type=checkbox],[type=radio],[type=hidden],[type=file]),select){min-height:var(--sa-control-height);box-sizing:border-box;margin:0!important;border-radius:10px;font-size:14px}
/* v0.10.25: editable values left aligned; report cells and totals untouched. */
html body :is(input:not([type=checkbox],[type=radio],[type=hidden],[type=range],[type=file],[type=color],[type=button],[type=submit],[type=reset]),select,textarea,.currency-ui){text-align:left!important}
/* v0.10.26 consistent native select chevron inset */
select:not([multiple]):not([size]),select[size="1"]{appearance:none!important;-webkit-appearance:none!important;background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='m3 6 5 5 5-5' fill='none' stroke='%23f6cc76' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E")!important;background-repeat:no-repeat!important;background-position:right 18px center!important;background-size:14px 14px!important;padding-right:44px!important}
.sa-page-size select,.sa-master-pager select{background-position:right 10px center!important;padding-right:28px!important}
.sa-debt-summary{display:flex;align-items:end;gap:16px;flex-wrap:wrap;padding:16px;margin:0 0 16px;background:#302436;border:1px solid #604153;border-radius:10px}.sa-debt-summary>div{flex:1;min-width:160px}.sa-debt-summary strong{display:block;color:#ffd184;font-size:22px}.sa-debt-summary label{min-width:140px}.sa-debt-value{text-align:right;white-space:nowrap;font-variant-numeric:tabular-nums}
/* Navigation actions share the same button treatment across modules. */
a.sa-action{box-sizing:border-box;display:inline-flex;align-items:center;justify-content:center;gap:8px;min-height:44px;padding:10px 16px;border:1px solid #785265;border-radius:10px;background:#392535;color:#ffd184;font:600 14px/1.4 'Segoe UI',Arial,sans-serif;text-decoration:none;vertical-align:middle;cursor:pointer}
a.sa-action:hover{background:#543044;border-color:#b06b80;color:#ffe0a3;text-decoration:none}
a.sa-action:focus-visible{outline:2px solid #ffd184;outline-offset:3px}
