/* Fluid administration layout. Print documents retain their dedicated styles. */
@media screen {
  .reference-app *, .reference-app *::before, .reference-app *::after { box-sizing: border-box; }
  .reference-app :where(.view,.panel,.inventory-main,.inventory-aside,.inventory-workspace,.commerce-content,.commerce-two-col,.quote-workspace,.quote-layout,.entry-panel,.global-search,.metric-copy) { min-width: 0; }
  .reference-app :where(h1,h2,h3,h4,legend,summary,label,.badge,.form-message,.sync-notice) { overflow-wrap: anywhere; line-height: 1.4; }
  .reference-app .page-heading { height:auto; flex-wrap:wrap; align-items:center; row-gap:16px; }
  .reference-app .page-heading>div:first-child { min-width:0; flex:1 1 320px; max-width:100%; }
  .reference-app .page-heading h2 { font-size:clamp(26px,2.7vw,42px); line-height:1.18; }
  .reference-app .page-motto { max-width:100%; }
  .reference-app :where(.panel-heading,.commerce-card-head,.form-title) { display:flex; flex-wrap:wrap; align-items:center; gap:12px; height:auto; }
  .reference-app :where(.panel-heading,.commerce-card-head)>:first-child { flex:1 1 220px; min-width:0; margin:0; }
  .reference-app :where(.form-actions,.card-actions,.table-actions,.agenda-card-actions,.page-action-bar,.finance-page-actions,.commerce-actions,.production-tier-actions,.commerce-label-buttons) { display:flex; position:static; flex-wrap:wrap; gap:10px; align-items:center; height:auto; min-width:0; }
  .reference-app :where(button,.ghost-link,.download-link) { max-width:100%; white-space:normal; overflow-wrap:anywhere; line-height:1.4; height:auto; }
  .reference-app :where(.form-actions,.card-actions,.table-actions,.agenda-card-actions,.page-action-bar,.finance-page-actions,.commerce-actions,.production-tier-actions) button { flex:0 1 auto; min-height:38px; padding:8px 12px; margin:0; }
  .reference-app :where(input,select,textarea) { min-width:0; max-width:100%; }
  .reference-app textarea { resize:vertical; }
  .reference-app :where(label):has(>input[type=checkbox]) { display:flex; flex-direction:row; align-items:flex-start; gap:9px; margin:10px 0; }
  .reference-app input[type=checkbox] { display:inline-block; flex:0 0 18px; width:18px; height:18px; min-height:18px; margin:2px 0 0; padding:0; }
  .reference-app .product-form { display:grid; grid-template-columns:repeat(auto-fit,minmax(min(100%,260px),1fr)); gap:18px 16px; align-items:end; }
  .reference-app .product-form>label.wide,.reference-app .product-form>label:has(#productImageFile),.reference-app .product-form>.wide,.reference-app .product-form>.form-grid-4,.reference-app .product-form>h3 { grid-column:1/-1; }
  .reference-app :where(.form-grid-2,.form-grid-4,.commerce-fields) { display:grid; grid-template-columns:repeat(auto-fit,minmax(min(100%,185px),1fr)); gap:16px; align-items:end; }
  .reference-app fieldset { min-width:0; max-width:100%; }
  .reference-app fieldset>legend { max-width:100%; padding:0 5px; }
  .reference-app #productCommerceFields>label { margin-top:14px; }
  .reference-app .inventory-toolbar { display:flex; flex-wrap:wrap; align-items:end; gap:16px; }
  .reference-app .inventory-toolbar>label { flex:1 1 240px; min-width:0; }
  .reference-app .inventory-toolbar input { max-width:none; }
  .reference-app .table-scroll { min-width:0; max-width:100%; overflow-x:auto; overscroll-behavior-x:contain; }
  .reference-app .inventory-table { table-layout:auto; min-width:1000px; width:100%; }
  .reference-app .inventory-table th { width:auto; min-width:70px; white-space:normal; line-height:1.45; vertical-align:bottom; }
  .reference-app .inventory-table th:first-child { width:27%; min-width:230px; }
  .reference-app .inventory-table th:last-child { min-width:180px; }
  .reference-app .inventory-table :where(th,td) { padding:12px 10px; }
  .reference-app .inventory-table .product-cell { min-width:0; align-items:flex-start; gap:10px; }
  .reference-app .inventory-table .product-cell img { flex:0 0 44px; width:44px; height:44px; object-fit:cover; }
  .reference-app .inventory-table .product-cell :where(strong,small) { display:block; overflow-wrap:anywhere; line-height:1.5; }
  .reference-app .table-actions { gap:8px; }
  .reference-app .table-actions button { min-width:72px; white-space:nowrap; }
  .reference-app .blasco-search { display:flex; flex-wrap:wrap; gap:12px; align-items:center; }
  .reference-app .blasco-search input { flex:1 1 240px; }
  .reference-app .blasco-search button { flex:0 1 auto; min-height:42px; }
  .reference-app .blasco-results { display:grid; gap:18px; margin-top:16px; }
  .reference-app .blasco-card { display:grid; grid-template-columns:140px minmax(0,1fr); gap:20px; padding:18px; border:1px solid #e5dfd6; border-radius:10px; background:#fffcf8; }
  .reference-app .blasco-card>div { min-width:0; }
  .reference-app .blasco-card>img { width:100%; height:140px; object-fit:contain; border-radius:8px; }
  .reference-app .blasco-card :where(strong,p,dd,small) { overflow-wrap:anywhere; line-height:1.5; }
  .reference-app .blasco-card strong { display:block; font-size:16px; }
  .reference-app .blasco-data { display:grid; grid-template-columns:repeat(auto-fit,minmax(min(100%,160px),1fr)); gap:12px 18px; margin:14px 0; }
  .reference-app .blasco-data>div { min-width:0; }
  .reference-app .blasco-data dt { font-size:11px; line-height:1.5; color:#6d755b; }
  .reference-app .blasco-data dd { margin:3px 0 0; font-size:14px; }
  .reference-app .production-tiers { margin:20px 0; padding:16px; border:1px solid #ded3bd; border-radius:10px; }
  .reference-app .production-tiers p { line-height:1.6; }
  .reference-app .production-tiers table { width:100%; border-collapse:collapse; }
  .reference-app .production-tiers :where(th,td) { padding:10px; text-align:left; }
  .reference-app .production-tiers input { min-width:0; width:100%; }
  .reference-app .production-tiers button { border:1px solid #e4d8c4; border-radius:7px; background:#f5ebdc; color:#635035; }
  .reference-app .product-image-preview { display:flex; align-items:center; flex-wrap:wrap; gap:14px; }
  .reference-app .product-image-preview img { width:100px; max-width:100%; height:100px; object-fit:contain; }
  .reference-app .commerce-two-col { grid-template-columns:repeat(auto-fit,minmax(min(100%,360px),1fr)); }
}
@media screen and (max-width:1280px) {
  .reference-app .inventory-workspace { grid-template-columns:minmax(0,1fr); }
  .reference-app .inventory-aside { display:grid; grid-template-columns:repeat(auto-fit,minmax(min(100%,240px),1fr)); gap:16px; }
}
@media screen and (max-width:760px) {
  .reference-app .topbar { min-height:58px; height:auto; padding-top:10px; padding-bottom:10px; flex-wrap:wrap; }
  .reference-app .topbar .global-search { flex:1 1 200px; }
  .reference-app .topbar-actions { margin-left:auto; flex-wrap:wrap; }
  .reference-app .page-heading { padding-top:22px; padding-bottom:22px; }
  .reference-app .page-heading .page-motto { display:none; }
  .reference-app :where(.form-actions,.card-actions,.agenda-card-actions,.page-action-bar,.finance-page-actions,.production-tier-actions)>button { flex:1 1 150px; min-height:44px; }
  .reference-app .form-grid-4,.reference-app .product-form,.reference-app .commerce-fields { grid-template-columns:minmax(0,1fr); }
  .reference-app :where(input:not([type=checkbox]),select,textarea) { font-size:16px; }
  .reference-app .blasco-card { grid-template-columns:minmax(0,1fr); padding:14px; }
  .reference-app .blasco-card>img { height:180px; }
  .reference-app .inventory-table { min-width:0; table-layout:auto; }
  .reference-app .inventory-table thead { display:none; }
  .reference-app .inventory-table tbody { display:grid; gap:16px; }
  .reference-app .inventory-table tr { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:14px; border:1px solid #e8e0d3; border-radius:10px; padding:16px; background:#fffcf8; }
  .reference-app .inventory-table td { display:block; min-width:0; border:0; padding:0; }
  .reference-app .inventory-table td::before { content:attr(data-label); display:block; font-size:12px; color:#6d755b; margin-bottom:5px; }
  .reference-app .inventory-table td:first-child,.reference-app .inventory-table td:last-child { grid-column:1/-1; }
  .reference-app .inventory-table td:first-child::before { display:none; }
  .reference-app .inventory-table .table-actions button { flex:1 1 100px; min-height:44px; }
  .reference-app .production-tiers { padding:12px; }
  .reference-app .production-tiers thead { display:none; }
  .reference-app .production-tiers tbody { display:grid; gap:16px; }
  .reference-app .production-tiers tr { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; padding:12px; border:1px solid #e5dfd6; border-radius:8px; }
  .reference-app .production-tiers td { padding:0; min-width:0; }
  .reference-app .production-tiers td:first-child,.reference-app .production-tiers td:last-child { grid-column:1/-1; }
  .reference-app .production-tiers td::before { content:attr(data-label); display:block; font-size:12px; line-height:1.5; margin-bottom:5px; }
}
@media screen and (max-width:380px) {
  .reference-app .inventory-metrics { grid-template-columns:1fr; }
  .reference-app .inventory-table tr { grid-template-columns:minmax(0,1fr); }
  .reference-app .production-tiers tr { grid-template-columns:minmax(0,1fr); }
}
@media screen {
  .reference-app .supplier-details .blasco-panel { min-width:0; max-width:100%; padding:12px 0 0; border:0; background:transparent; }
  .reference-app .supplier-details .blasco-panel>* { min-width:0; max-width:100%; }
}
@media screen and (min-width:761px) {
  .reference-app .studio-sidebar { display:flex; flex-direction:column; gap:16px; overflow-y:auto; background:#faf7f1; padding-bottom:24px; }
  .reference-app .studio-sidebar .studio-brand,.reference-app .studio-sidebar .tabs { flex:0 0 auto; }
  .reference-app .studio-sidebar .sidebar-note { position:static; flex:0 0 auto; width:auto; margin-top:auto; }
}
