/* Screen density only. Preserve print layouts, content, permissions and disclosure state. */
@media screen {
.erp-compact table td>input:not([type=checkbox]):not([type=radio]):not([type=hidden]),.erp-compact table td>select:not(.handling-choice),.erp-compact table td>.v11-date-wrap{width:100%!important;min-width:0!important;max-width:none!important;box-sizing:border-box}
.erp-compact table td>.v11-date-wrap input{width:100%!important;min-width:0!important;box-sizing:border-box}
.erp-compact .v11-date-toggle[hidden]{display:none!important}
.erp-compact .erp-needs-attention{outline:2px solid #d97706!important;outline-offset:1px;background:#fffbeb!important}
.erp-compact .handling-summary{white-space:normal;line-height:1.35}
#erp-action-feedback{position:fixed;bottom:24px;left:50%;transform:translateX(-50%);z-index:30000;background:#ecfdf5;padding:9px 16px;border:1px solid #6ee7b7;border-radius:6px;max-width:80vw;font-size:13px}
#erp-action-feedback.error{background:#fff1f0;border-color:#fda29b;color:#b42318}
body.erp-compact{font-size:12px;line-height:1.4}
.erp-compact .topbar{min-height:42px;padding:4px 12px;gap:9px}
.erp-compact .brand-mark{min-width:30px;height:28px;padding:0 6px}
.erp-compact .brand-name{font-size:16px}
.erp-compact .edition{font-size:10px;padding:2px 5px}
.erp-compact .main-nav a{min-width:82px;padding:7px 12px 6px;font-size:12px}
.erp-compact .main-nav .admin-link{min-width:82px}
.erp-compact .page{padding:8px;min-height:calc(100vh - 78px)}
.erp-compact :is(.page-heading,.page-title-row){gap:8px;margin-bottom:6px;flex-wrap:wrap}
.erp-compact :is(.page-heading,.page-title-row) h1{font-size:18px;line-height:1.4;margin:0}
.erp-compact :is(.page-heading,.page-title-row) p{font-size:11px;margin:2px 0 0}
.erp-compact :is(.btn,.btn-compact,.tab){min-height:26px;padding:3px 7px;font-size:12px;line-height:18px;gap:4px}
.erp-compact .btn.small{min-height:22px;padding:1px 5px;font-size:11px;line-height:18px}
.erp-compact :is(input:not([type=checkbox]):not([type=radio]):not([type=hidden]),select){min-height:26px;height:26px;padding:2px 5px;font-size:12px;line-height:18px}
.erp-compact :is(.form-grid,.mapping-grid,.quick-grid,.package-grid,.partner-grid,.operation-form,.manifest-edit-form,.project-status-form) :is(input:not([type=checkbox]):not([type=radio]):not([type=hidden]),select){min-height:26px;height:26px;padding:2px 5px;font-size:12px}
.erp-compact input[type=file]{height:auto;min-height:26px;max-width:100%}
.erp-compact :is(input[type=checkbox],input[type=radio]){width:14px!important;min-width:14px!important;height:14px!important;min-height:14px!important;margin:0 3px 0 0;padding:0;vertical-align:middle;flex:none}
.erp-compact textarea{min-height:54px;padding:5px 7px;font-size:12px;line-height:1.45;resize:vertical}
.erp-compact .paste-area{height:110px;min-height:110px;padding:7px;font-family:monospace}
.erp-compact .panel>h2{font-size:14px;margin:7px 0 5px}
.erp-compact .panel>h3{font-size:13px;margin:7px 0 4px}
.erp-compact .panel>p{margin:5px 0;font-size:12px}
.erp-compact :is(#paste-panel,#single-panel){padding:7px}
.erp-compact :is(.toolbar,.compact-filter,.inventory-search-toolbar){padding:5px 6px;gap:5px;margin-bottom:6px}
.erp-compact .toolbar+.toolbar{margin-top:5px}
.erp-compact .compact-filter :is(input:not([type=checkbox]),select){min-width:100px;height:26px}
.erp-compact .compact-filter input[name=q]{min-width:180px}
.erp-compact .online-compact .online-filters input[type=checkbox]{min-width:14px!important}
.erp-compact :is(.button-row,.inline-form,.v11-actions,.partner-toolbar,.expense-inline,.page-heading-actions){gap:5px}
.erp-compact :is(.partner-toolbar,.expense-inline){margin:5px 0}
.erp-compact .section-title{min-height:30px;padding:4px 7px;gap:7px;flex-wrap:wrap}
.erp-compact .section-title h2{font-size:13px;line-height:20px}
.erp-compact :is(.compact-panel,.detail-body,.manifest-files,.manifest-working-panel,.raw-snapshot-panel){padding:7px}
.erp-compact :is(.form-grid,.mapping-grid,.quick-grid,.package-grid,.partner-grid,.split-grid,.stack,.inventory-filter-grid){gap:6px}
.erp-compact :is(.field,.form-grid label,.mapping-grid label,.operation-form label){gap:3px;font-size:12px}
.erp-compact .operation-form label{margin:4px 0}
.erp-compact .operation-form h2{margin:8px 0 4px;font-size:14px}
.erp-compact :is(.dialog-head,.dialog-actions){padding:7px 10px;gap:6px}
.erp-compact .dialog-head h2{font-size:15px}
.erp-compact .dialog-body{padding:8px 10px}
.erp-compact :is(.detail-list,.manifest-summary-grid){gap:5px}
.erp-compact table{font-size:12px;line-height:18px}
.erp-compact :is(th,td){height:26px;padding:2px 5px;font-size:12px;line-height:18px;vertical-align:middle}
.erp-compact :is(.v11-table,.compact-data,.partner-table,.manifest-items-table) :is(th,td){height:26px;padding:1px 5px;font-size:12px;line-height:18px}
.erp-compact table .btn{min-height:22px;padding:1px 5px;font-size:11px;line-height:18px}
.erp-compact td .toolbar{padding:0!important;margin:0!important;gap:4px}
.erp-compact .project-table tbody tr{height:26px}
.erp-compact .contact-stack{gap:1px;line-height:17px}
.erp-compact .table-files a,.erp-compact .table-files span{padding:2px 5px;font-size:11px;line-height:18px}
.erp-compact .project-filters{margin-bottom:7px;gap:6px}
.erp-compact table :is(input:not([type=checkbox]):not([type=radio]):not([type=hidden]),select){min-height:22px;height:22px;padding:0 3px;font-size:12px}
.erp-compact :is(.badge,.deal-badge,.payment-status){padding:0 5px;font-size:11px;line-height:18px}
.erp-compact :is(.pager,.manifest-pagination){padding:4px 0 0;margin-top:4px;gap:5px;font-size:11px}
.erp-compact :is(.status-tabs,.detail-tabs,.view-tabs){gap:4px;margin:4px 0 6px}
.erp-compact :is(.status-tabs,.detail-tabs,.view-tabs,.source-tabs nav) a{padding:5px 8px;font-size:12px}
.erp-compact :is(.metrics,.metric-grid){gap:6px;margin-bottom:6px}
.erp-compact .metric{min-height:68px;padding:7px 9px;box-shadow:none}
.erp-compact .metric .label{font-size:12px}
.erp-compact .metric .value{font-size:20px;margin-top:2px}
.erp-compact .metric .sub{font-size:11px;margin-top:1px}
.erp-compact .metric-grid>div{padding:7px 9px}
.erp-compact .metric-grid b{font-size:18px;margin-top:2px}
.erp-compact .ledger-list{gap:4px}
.erp-compact .ledger-card>summary{padding:5px 8px;gap:6px;font-size:12px;min-height:28px}
.erp-compact .composition-list{padding:4px 8px}
.erp-compact .composition-row{padding:4px 0}
.erp-compact .composition-row>div:first-child{gap:5px}
.erp-compact :is(.split-status,.notice-box,.preview-summary){padding:5px 7px;margin:5px 0;font-size:12px;gap:8px}
.erp-compact :is(.file-card,.sheet-card,.manifest-file){padding:6px 8px;margin-bottom:5px;gap:4px}
.erp-compact .manifest-summary-grid>div{padding:6px 8px;gap:3px}
.erp-compact :is(.xianyu-grid,.website-project-list){gap:7px}
.erp-compact :is(.xianyu-card,.website-project-card){padding:9px;box-shadow:none}
.erp-compact .xianyu-meta{margin:6px 0;padding:5px 7px;gap:12px}
.erp-compact :is(.xianyu-edit-form,.xianyu-image-form,.project-status-form,.project-details){gap:6px;margin-top:6px}
.erp-compact .project-card-head{padding-bottom:6px;gap:8px}
.erp-compact .project-card-head strong{font-size:14px}
.erp-compact :is(.project-details div,.project-files,.project-status-form,.project-history li){padding:6px 8px}
.erp-compact :is(.project-badges,.project-overview){gap:5px}
.erp-compact .project-overview{margin-bottom:7px}
.erp-compact .project-overview a{padding:4px 7px}
.erp-compact :is(.inventory-log-row,.search-result){padding:5px 7px;gap:5px}
.erp-compact .hero-search{gap:5px;margin-bottom:7px}
.erp-compact .hero-search input{font-size:13px;padding:4px 7px;min-height:30px;height:30px}
.erp-compact .alert{padding:5px 8px;margin-bottom:6px}
.erp-compact .empty{height:auto;padding:18px 10px!important}
.erp-compact .site-footer{padding:6px;font-size:11px}
.erp-compact .login-card{padding:18px}
.erp-compact .login-brand h1{font-size:18px;margin:6px 0}
.erp-compact .login-form{gap:8px}
.erp-compact .drawer-panel{padding:0 10px 12px}
.erp-compact .drawer-header{margin:0 -10px;padding:8px 10px}
.erp-compact :is(.drawer-contact,.drawer-project-facts){gap:6px;margin:8px 0}
.erp-compact .drawer-section{margin-top:8px}
.erp-compact :is(.btn,input,select,textarea,summary):focus-visible{outline:2px solid #1976d2;outline-offset:1px}
/* Paper preview stays life-size; only its screen toolbar is compact. */
.print-toolbar{padding:5px 10px!important;gap:5px!important;font-size:12px}
.print-toolbar :is(a,button){padding:3px 7px!important;font-size:12px;line-height:18px}
}
@media screen and (max-width:720px){
.erp-compact .topbar{flex-wrap:wrap;gap:5px}
.erp-compact .main-nav a{min-width:72px;padding:6px 9px}
.erp-compact :is(.metrics,.metric-grid){grid-template-columns:repeat(2,minmax(0,1fr))}
.erp-compact .split-grid{grid-template-columns:minmax(0,1fr)}
.erp-compact .search-input{min-width:0;max-width:100%}
.erp-compact .hero-search input{min-width:0}
}
.erp-compact .work-table input[name$="_unit_price"]{appearance:textfield;-moz-appearance:textfield}
.erp-compact .work-table input[name$="_unit_price"]::-webkit-inner-spin-button,.erp-compact .work-table input[name$="_unit_price"]::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}
