/* Compact controls and independently scrollable audit tables. */
*{box-sizing:border-box}main,.content,.panel,.card,.field{min-width:0}
input[type="checkbox"],input[type="radio"]{width:17px!important;height:17px!important;min-width:17px!important;min-height:17px!important;max-width:17px!important;padding:0!important;margin:0 7px 0 0!important;vertical-align:middle;accent-color:#b40018}
label:has(input[type="checkbox"]){display:inline-flex;align-items:center;gap:4px}
.portal-input-action{display:flex;align-items:center;gap:8px}.portal-input-action input{min-width:100px;flex:1}.portal-input-action button{white-space:normal;min-width:150px;margin:0}
.table-scroll{max-width:100%;max-height:65vh;overflow:auto}table th{position:sticky;top:0;z-index:2}table td{overflow-wrap:anywhere}td a{overflow-wrap:anywhere}
.portal-empty{padding:18px!important;color:#5d6b7e;font-size:13px;line-height:1.5}.portal-business-note{font-size:13px;line-height:1.5;color:#536275;margin:8px 0 12px}.portal-index-status{font-size:12px;line-height:1.5;padding:8px 0;color:#536275}
.portal-clickable:focus{outline:2px solid #244e88;outline-offset:-2px}button:disabled{opacity:.6;cursor:wait}button[hidden],label[hidden]{display:none!important}#tbl_admin_users label,#tbl_admin_active label{display:inline-flex;margin:4px 8px 4px 0;font-size:12px}#tbl_admin_users button,#tbl_admin_active button{margin:3px;font-size:12px}
#preview_download{white-space:nowrap}#preview_frame{background:white}#preview_drawer .drawer-head{flex-wrap:wrap}#preview_path{overflow-wrap:anywhere;font-size:12px}.portal-input-action:focus-within{outline-offset:4px}
@media(max-width:850px){.portal-input-action{flex-wrap:wrap}.portal-input-action button{width:100%}#preview_drawer{width:96vw!important}th,td{padding:8px!important}}
#source_controls>summary{cursor:pointer;color:#536275;font-size:12px;padding:4px 0 10px}#source_controls[open]>summary{margin-bottom:10px}.portal-primary-search{padding-top:8px;align-items:end}.portal-primary-search #imp_sku{min-width:250px}#status_imp{flex-basis:100%;margin-top:8px}

/* v41.2-HF1: wide audit tables must not be squeezed into three 300px cards. */
#panel-imp .portal-origin-evidence,#panel-trace .portal-trace-evidence{grid-template-columns:minmax(0,1fr)!important;gap:16px}
#panel-imp .portal-origin-evidence>.card,#panel-trace .portal-trace-evidence>.card{width:100%;min-width:0}
#panel-imp .portal-origin-evidence .table-scroll{max-height:400px}
#panel-trace .portal-trace-evidence .table-scroll{max-height:420px}
#panel-imp .portal-origin-evidence table,#panel-trace .portal-trace-evidence table{width:100%}
#tbl_imp_ship{min-width:780px}#tbl_imp_docs{min-width:680px}#tbl_imp_lines{min-width:740px}
#tbl_imp_docs td:nth-child(3){min-width:240px;max-width:420px}#tbl_imp_docs td:nth-child(4){min-width:220px}
#panel-imp #source_controls .row>div{min-width:0!important}#panel-imp #source_controls input[type=file]{max-width:100%}
.portal-source-summary{margin:8px 0 16px;padding:12px 14px;border:1px solid #ddc68e;border-radius:10px;background:#fffcf3;font-size:13px;line-height:1.55;min-width:0}
.portal-source-summary[hidden],.portal-job-details[hidden],#source_diagnostic_results[hidden]{display:none!important}
.portal-source-summary p{margin:5px 0 9px}.portal-source-summary button{margin:4px 6px 4px 0;font-size:12px}
.portal-source-summary pre,.portal-job-details{white-space:pre-wrap;overflow-wrap:anywhere;max-width:100%}
.portal-source-summary .table-scroll{max-height:340px}.portal-source-summary table{min-width:660px}
.portal-source-summary th,.portal-source-summary td{padding:8px 10px}.portal-source-summary td:nth-child(3){max-width:440px;overflow-wrap:anywhere}
.portal-job-details{background:#fff8f6;border:1px solid #e4c3b7;border-radius:9px;padding:12px;margin-top:12px;font-size:12px;line-height:1.55}
.portal-job-details li{margin:6px 0}.portal-job-details ol{margin:6px 0;padding-left:22px}
#repo_status,#status_imp,#fcm_index_state{max-width:100%;overflow-wrap:anywhere;white-space:normal}
#panel-imp .portal-primary-search button{background:#c5142b;color:#fff;border-color:#c5142b}
#panel-trace .three-col .muted{line-height:1.5}.enterprise-main,.enterprise-content,#panel-trace,#panel-imp{min-width:0}
@media(max-width:1100px){#panel-trace .stats-grid{grid-template-columns:repeat(2,minmax(0,1fr))}#panel-imp .portal-primary-search>div{min-width:0;max-width:100%}}
@media(max-width:600px){#panel-trace .stats-grid{grid-template-columns:minmax(0,1fr)}#panel-imp .portal-primary-search{display:block}#panel-imp .portal-primary-search input{min-width:0!important;width:100%}#panel-imp .portal-primary-search button{width:100%}#panel-imp .portal-primary-search>div{width:100%}.portal-source-summary{padding:10px}.portal-source-summary button{width:100%;margin-right:0}.result-switcher button{padding:8px;font-size:11px}}

.portal-source-summary.is-readable{display:flex;align-items:center;flex-wrap:wrap;gap:8px;background:#f7fafc;border-color:#d6e2ed;padding:7px 10px}
.portal-source-summary.is-readable #source_health_message{display:none}.portal-source-summary.is-readable #check_sources_button{margin-left:auto}.portal-source-summary.is-readable #source_diagnostic_results,.portal-source-summary.is-readable #source_diagnostic_status:not(:empty){flex-basis:100%}.portal-source-summary p:empty{display:none}.enterprise-main>.footer-bar{font-size:11px;padding:10px 26px;display:flex;gap:12px;flex-wrap:wrap}

/* A closed off-canvas drawer must not become visible/focusable in mobile capture/layout. */
#preview_drawer:not(.open){visibility:hidden;pointer-events:none}
#preview_drawer.open{visibility:visible;pointer-events:auto}
@media(max-width:600px){
  .enterprise-topbar{flex-wrap:wrap;gap:7px!important}
  .enterprise-topbar .topbar-command{min-width:0!important;width:100%;max-width:100%;flex:1 0 100%}
  .enterprise-topbar .topbar-command input{min-width:0!important;width:0;flex:1}
  .enterprise-topbar .topbar-account{margin-left:auto;max-width:100%}
  .enterprise-sidebar .side-collapse{display:none}
  .toast-stack{right:12px;left:12px}.toast-item{min-width:0;max-width:100%;overflow-wrap:anywhere}
}
