/* Screen-only spacing pilot. Existing theme colors and business components remain unchanged. */
@media screen {
 .fi-sidebar{padding:16px 12px 28px;overflow-y:auto;overscroll-behavior-y:contain;scrollbar-gutter:stable;scrollbar-width:thin}
 .fi-sidebar .fi-top{gap:4px}
 .fi-sidebar .fi-item{min-height:44px;padding:10px 12px;gap:12px;line-height:1.45;border-radius:9px}
 .fi-sidebar .fi-item svg{flex:0 0 18px;width:18px;height:18px}
 .fi-sidebar .fi-item span{min-width:0;overflow-wrap:break-word}
 .fi-sidebar .fi-group{margin-top:18px;padding-top:14px}
 body[data-rbe-shell="filament"] .fi-sidebar .fi-group-h{padding:0 12px;margin-bottom:8px;line-height:1.5}
 .fi-sidebar .fi-group-items{gap:4px}
 .fi-collapsed .fi-sidebar .fi-item{padding:10px 6px}
 .fi-app .projects-page{min-width:0}
 .fi-app .projects-page .fx-page-head{margin-bottom:24px}
 .fi-app .projects-page .fx-page-row{gap:16px;align-items:center}
 .fi-app .projects-page .fx-sub{margin-top:8px;line-height:1.6}
 .fi-app .projects-page .fx-tabs{gap:6px;padding:6px;margin-bottom:16px;max-width:100%;flex-wrap:wrap}
 .fi-app .projects-page .fx-tabs button{padding:9px 14px;min-height:40px;line-height:1.4}
 .fi-app .projects-page .fx-table{border-radius:14px}
 .fi-app .projects-page .fx-table-bar{padding:16px;gap:12px;flex-wrap:wrap}
 .fi-app .projects-page :is(.fx-table-tools,.fx-table-filters){gap:12px;flex-wrap:wrap;min-width:0}
 .fi-app .projects-page .fx-searchbox{min-height:40px;min-width:180px;flex:1}
 .fi-app .projects-page .fx-table-scroll{overflow:auto;max-height:65vh;max-height:65dvh;scrollbar-gutter:stable}
 body[data-rbe-shell="filament"] .projects-page .projects-list .fx-table :is(th,td){padding:14px 16px;vertical-align:middle;line-height:1.5}
 .fi-app .projects-page .projects-list .fx-table thead th{position:sticky;top:0;z-index:2}
 .fi-app .projects-page .fx-cell-title{line-height:1.5}
 .fi-app .projects-page .fx-cell-sub{margin-top:5px;line-height:1.5}
 .fi-app .projects-page .fx-cell-flex{gap:8px;flex-wrap:wrap}
 .fi-app .projects-page .fx-table-foot{padding:16px;gap:16px;flex-wrap:wrap}
 .fi-app .projects-page .fx-pager{gap:10px;flex-wrap:wrap}
 .fi-app .projects-page .projects-extras{margin-top:24px}
 body[data-rbe-shell="filament"][data-rbe-page="projects"] .sheet>.box{padding:24px;max-height:90dvh;overflow-y:auto;border-radius:16px}
 body[data-rbe-shell="filament"][data-rbe-page="projects"] .sheet label.f{margin-bottom:18px}
 body[data-rbe-shell="filament"][data-rbe-page="projects"] .sheet label.f>span{margin-bottom:8px;line-height:1.5}
 body[data-rbe-shell="filament"][data-rbe-page="projects"] .sheet .row{gap:16px}
 @media(max-width:767px){
  .fi-app .projects-page .fx-page-row{align-items:stretch;flex-wrap:wrap}
  .fi-app .projects-page .fx-table-bar{padding:12px;gap:10px}
  .fi-app .projects-page .fx-searchbox{min-width:0;width:100%}
  body[data-rbe-shell="filament"][data-rbe-page="projects"] .sheet>.box{padding:18px}
  body[data-rbe-shell="filament"][data-rbe-page="projects"] .sheet .row{flex-direction:column;gap:0}
 }
}

/* Shared workspace spacing, screen only. No palette, permission or behavior changes. */
@media screen {
 body[data-rbe-shell="filament"] .fi-content :is(.panel,.wh-panel,.wh-editor):not(.panel .panel){padding:24px;margin-bottom:20px}
 .fi-app .fi-content :is(.fx-page-head,.wh-head,.tools-head,.wp-head,.tugas-head,.report-hero,.bill-head,.sk-hero,.spk-hero,.ap-hero,.hub-header){gap:16px;margin-bottom:20px}
 .fi-app .fi-content :is(.wh-filters,.wh-inventory-filters,.bom-filters,.shop-filters,.wf-filters,.rb-filters,.tugas-toolbar,.wp-toolbar,.owner-general-filters,.fx-table-tools,.fx-table-filters){gap:12px;flex-wrap:wrap;min-width:0}
 .fi-app .fi-content :is(.wh-actions,.wf-actions,.shop-actions,.project-team-actions,.rb-row-actions,.journal-card-tools,.tracking-actions,.hi-actions,.pt-actions){gap:10px;flex-wrap:wrap}
 .fi-app .fi-content :is(.import-tabs,.wf-tabs,.wh-subtabs,.tugas-tabs,.project-workspace-nav){gap:8px;row-gap:10px;margin-bottom:16px}
 .fi-app .fi-content :is(.wh-pagination,.rb-pagination,.fx-table-foot,.tugas-footer){gap:12px;flex-wrap:wrap;padding-top:16px;padding-bottom:16px}
 .fi-app .fi-content :is(.fx-table-scroll,.journal-table-scroll,.wp-table-wrap,.furn-overview-scroll){overflow:auto;max-width:100%;scrollbar-gutter:stable}
 /* Ordinary data tables only: exclude calendar, financial document and presentation tables. */
 body[data-rbe-shell="filament"] .fi-content :is(.wh-panel,.wh-editor,.qc-page,.estimate-page,.bom,.vendor-page,.tracking-page,.billing,.sk-list,.ap-page,.journal-table-scroll) table:not(.wp-calendar) :is(th,td):not(.sk-paper *,.bill-paper *,.bill-document *,.report-pdf-dialog *,.pt-scroll *,.wp-calendar *,.projects-page *){padding:12px 16px;line-height:1.5;vertical-align:middle}
 .fi-app .fi-content :is(.wh-form,.wp-form-grid,.wp-editor-fields,.hi-edit){gap:16px}
 body[data-rbe-shell="filament"] .fi-content label.f:not(.sk-paper *,.bill-paper *,.bill-document *,.report-pdf-dialog *){margin-bottom:16px;min-width:0}
 body[data-rbe-shell="filament"] .fi-content label.f>span{margin-bottom:7px;line-height:1.5}
 .fi-app .fi-content :is(.wh-form,.wp-editor-fields,.hi-edit) label{line-height:1.5}
 .fi-app .fi-content :is(.wh-form,.wp-editor-fields,.hi-edit) :is(input:not([type=checkbox]):not([type=radio]):not([type=range]):not([type=hidden]),select){min-height:40px;max-width:100%;box-sizing:border-box}
 .fi-app .fi-content :is(.wh-form,.wp-editor-fields,.hi-edit) textarea{min-height:96px;line-height:1.6;max-width:100%;box-sizing:border-box}
 .fi-app .fi-content :is(.wh-hint,.tools-history,.wf-help,.fx-cell-sub,.tugas-meta){line-height:1.55}
 body[data-rbe-shell="filament"] .sheet>.box:not(.report-pdf-dialog){padding:24px;max-height:90dvh;overflow-y:auto}
 body[data-rbe-shell="filament"] .sheet>.box:not(.report-pdf-dialog) label.f{margin-bottom:16px}
 body[data-rbe-shell="filament"] .sheet>.box:not(.report-pdf-dialog) .row{gap:16px}
 @media(max-width:767px){
  body[data-rbe-shell="filament"] .fi-content :is(.panel,.wh-panel,.wh-editor):not(.panel .panel){padding:16px;margin-bottom:16px}
  .fi-app .fi-content :is(.wh-filters,.wh-inventory-filters,.bom-filters,.shop-filters,.wf-filters,.rb-filters,.tugas-toolbar,.wp-toolbar){gap:10px}
  body[data-rbe-shell="filament"] .sheet>.box:not(.report-pdf-dialog){padding:18px}
 }
}

/* Workspace width audit 2026-11-02: screen containers only. */
/* Screen-only workspace sizing. Keep the current Claude theme, sidebar and paper layouts. */
@media screen {
 body .fi-app .fi-main { padding-left:20px; padding-right:20px; }
 .fi-app .fi-content { width:100%; min-width:0; }
 .fi-app .fi-content :is(.workspace-page,.test-flow,.bom-spec,.share-manager,.dd-page,.reports-page,.estimate-page,.import-workspace,.estimator-workspace,.wp,.hi,.wh,.warehouse,.qc-page,.tools-page,.wh-loans,.deadstock-page,.ap-page,.spk-page,.sk-page,.finance-workspace,.billing,.tracking-page,.vendor-page,.handover-page,.wf,.projects-page,.presentation-page) {
  box-sizing:border-box; width:100%; max-width:none; min-width:0; margin-left:0; margin-right:0;
 }
 .fi-app .fi-content > main:not(.rpt) {box-sizing:border-box;width:100%;max-width:none;margin-left:0;margin-right:0;padding-left:0;padding-right:0;}
 .fi-app .fi-content .account-page {box-sizing:border-box;width:100%;max-width:none;margin-left:0;margin-right:0;}
 .fi-app .fi-content .account-page form {max-width:640px;}
 .fi-app .fi-content .test-flow .flow-steps {grid-template-columns:repeat(4,minmax(0,1fr));}
 .fi-app .fi-content .test-flow .flow-project select {max-width:none;min-width:0;}
 @media(max-width:1200px) {.fi-app .fi-content .test-flow .flow-steps {grid-template-columns:repeat(2,minmax(0,1fr));}}
 @media(max-width:650px) {.fi-app .fi-content .test-flow .flow-steps {grid-template-columns:minmax(0,1fr);}}
 /* Remove only redundant outer inset; leave form/card spacing and letter previews alone. */
 .fi-app .fi-content :is(.spk-page,.sk-page,.handover-page) { padding-left:0; padding-right:0; }
 .fi-app .fi-content :is(.report-browser,.rb-navigation,.rb-filters,.project-workspace-nav) { box-sizing:border-box;max-width:100%;min-width:0; }
 .fi-app .fi-content :is(.fx-table-scroll,.ds-table-wrap,.ap-table,.estimate-table-wrap,.sk-table-wrap,.spk-table,.bom-table-wrap) { max-width:100%;min-width:0;overflow-x:auto; }
 @media(max-width:1023px) { body .fi-app .fi-main {padding-left:16px;padding-right:16px;} }
 @media(max-width:600px) { body .fi-app .fi-main {padding-left:12px;padding-right:12px;} }
}

@media screen {
 .fi-app .fi-content > :is(div,section)[style*="max-width"] {box-sizing:border-box;width:100%;max-width:none!important;margin-left:0!important;margin-right:0!important;}
 .fi-app .fi-content > section.panel[style*="max-width"] form {max-width:640px;}
}
