/* HUIDI Docs Community Local RC16.26 — Runtime Composition Repair + Management Density */
body.workspace-r4{--ws-sidebar:188px}
body.workspace-r4 .workspace-r3-flowline[hidden]{display:none!important}
body.workspace-r4 .workspace-r2-backup[hidden]{display:none!important}
body.workspace-r4 .workspace-r3-create>summary{background:rgba(0,122,255,.1);color:var(--brand);box-shadow:none;border:1px solid rgba(0,122,255,.08);font-weight:680}
body.workspace-r4 .workspace-r3-create>summary:hover{background:rgba(0,122,255,.14)}
body.workspace-r4 .workspace-nav-group-title{padding-top:6px}
body.workspace-r4 .workspace-r2-more>summary small{max-width:108px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
body.workspace-r4 .section-head{min-height:48px;margin-bottom:7px}
body.workspace-r4 .section-head h3{font-size:18px;letter-spacing:-.018em}
body.workspace-r4 .section-head p{max-width:660px;font-size:10.5px;line-height:1.4}
body.workspace-r4 .workspace-r1-summary{margin-bottom:6px}
body.workspace-r4 .filterbar{margin-bottom:6px}

/* Mail: no giant empty canvas. */
body.workspace-r4 #view-mail .table-wrap{min-height:0}
body.workspace-r4 #view-mail .empty-rich{min-height:180px;padding:26px 24px}
body.workspace-r4 #view-mail .empty-rich p{max-width:500px}

/* Terms: compact management list instead of isolated cards. */
body.workspace-r4 #templateCards.workspace-r4-template-list{display:grid;grid-template-columns:1fr;gap:1px;border-radius:12px;overflow:hidden;background:var(--line);box-shadow:var(--shadow)}
body.workspace-r4 #templateCards.workspace-r4-template-list>.data-card{display:grid;grid-template-columns:minmax(180px,.8fr) minmax(300px,2fr) auto;align-items:center;gap:14px;margin:0!important;padding:11px 13px;border-radius:0!important;box-shadow:none!important;background:var(--panel)}
body.workspace-r4 #templateCards.workspace-r4-template-list>.data-card h4{margin:0;font-size:12px}
body.workspace-r4 #templateCards.workspace-r4-template-list>.data-card p{margin:0;color:var(--muted);font-size:10px;line-height:1.45}
body.workspace-r4 #templateCards.workspace-r4-template-list>.data-card .row-actions{margin-top:0!important}

/* Catalog: data first; onboarding instructions only when actually empty. */
body.workspace-r4 #view-catalog .catalog-local-grid{grid-template-columns:minmax(0,1.45fr) minmax(280px,.55fr);gap:8px}
body.workspace-r4 #view-catalog .catalog-local-grid>.panel{min-height:0;padding:13px}
body.workspace-r4 #view-catalog.workspace-r4-catalog-empty .catalog-local-grid{grid-template-columns:1fr}
body.workspace-r4 #view-catalog.workspace-r4-catalog-empty .catalog-local-grid>.panel:nth-child(2){display:none}
body.workspace-r4 #view-catalog.workspace-r4-catalog-empty #catalogProductPreview .empty-rich{min-height:180px;padding:24px}
body.workspace-r4 #view-catalog.workspace-r4-catalog-ready .catalog-local-grid>.panel:nth-child(2){opacity:.88}
body.workspace-r4 #view-catalog.workspace-r4-catalog-ready .next-card{min-height:42px;padding:7px 8px}

/* Documents: readable at 30 / 300 / 3000 records. */
body.workspace-r4 #view-documents table{min-width:900px}
body.workspace-r4 #view-documents th:nth-child(1){width:16%}
body.workspace-r4 #view-documents th:nth-child(2){width:18%}
body.workspace-r4 #view-documents th:nth-child(3){width:18%}
body.workspace-r4 #view-documents th:nth-child(4){width:13%}
body.workspace-r4 #view-documents th:nth-child(5){width:15%}
body.workspace-r4 #view-documents th:nth-child(6){width:20%}
body.workspace-r4 #view-documents td{vertical-align:middle}
body.workspace-r4 #view-documents .helper{margin-top:2px;max-width:220px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
body.workspace-r4 .workspace-r4-doc-actions{justify-content:flex-end}
body.workspace-r4 .workspace-r4-done{display:inline-flex;align-items:center;min-height:29px;padding:0 8px;border-radius:8px;background:rgba(52,199,89,.09);color:var(--success);font-size:9.5px;font-weight:650}

/* Product dialog: smaller media block, one advanced section at a time, structured carton entry. */
body.workspace-r4 .workspace-r3-product-modal{width:min(860px,calc(100vw - 34px))}
body.workspace-r4 .workspace-r3-product-modal .image-editor{grid-template-columns:72px minmax(0,1fr);padding:8px!important;gap:9px}
body.workspace-r4 .workspace-r3-product-modal .image-preview{width:72px;height:72px;border-radius:10px;font-size:9px;line-height:1.3}
body.workspace-r4 .workspace-r3-product-modal .image-editor .helper{font-size:8.5px}
body.workspace-r4 .workspace-r3-product-modal .workspace-r3-basic-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px 10px}
body.workspace-r4 .workspace-r3-product-modal .workspace-r3-form-section{margin-top:8px}
body.workspace-r4 .workspace-r3-product-modal .workspace-r3-form-section>summary{min-height:42px;padding:8px 11px}
body.workspace-r4 .workspace-r3-product-modal .workspace-r3-advanced-grid{gap:8px 10px;padding:10px}
body.workspace-r4 .workspace-r4-carton-source{display:none!important}
body.workspace-r4 .workspace-r4-dims{display:grid;grid-template-columns:1fr auto 1fr auto 1fr;align-items:center;gap:5px}
body.workspace-r4 .workspace-r4-dims span{color:var(--muted);font-size:11px}
body.workspace-r4 .workspace-r4-dims .input{text-align:center;padding-left:6px;padding-right:6px}
body.workspace-r4 .workspace-r4-pack .workspace-r3-advanced-grid{grid-template-columns:repeat(3,minmax(0,1fr))}
body.workspace-r4 .workspace-r4-pack [data-f="shipping_marks"]{min-height:36px}
body.workspace-r4 .workspace-r4-pack .field:has([data-f="shipping_marks"]),body.workspace-r4 .workspace-r4-pack .field:has([data-f="dimensions"]){grid-column:1/-1}

/* Feishu entry must be visually equal to other management sources after runtime recovery. */
body.workspace-r4 .nav-btn.workspace-r4-recovered{animation:none}
body.workspace-r4 #view-feishu .feishu-data-hero{gap:8px}
body.workspace-r4 #view-feishu .feishu-data-card,body.workspace-r4 #view-feishu .feishu-data-panel{border-radius:12px;box-shadow:var(--shadow)}

@media(max-width:1180px){body.workspace-r4{--ws-sidebar:180px}body.workspace-r4 .workspace-r4-pack .workspace-r3-advanced-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:760px){body.workspace-r4 #templateCards.workspace-r4-template-list>.data-card{grid-template-columns:1fr}body.workspace-r4 #view-catalog .catalog-local-grid{grid-template-columns:1fr}body.workspace-r4 .workspace-r4-pack .workspace-r3-advanced-grid{grid-template-columns:1fr}}
