/* Module presentation only. Load after redesign.css and report-image.css.
   Keep engine visibility, [hidden], input IDs and table structure intact. */
body.studio-redesign :is(.friendly-module-setup,.friendly-setup-body,.workflow-config,
  #results,#lineReportPanel,#mappingPanel,#auditResultsPanel,#floorPanel,
  #docAiPanel,#pdfToolsPanel,#reportImagePanel){min-width:0}
body.studio-redesign .friendly-module-setup{margin-bottom:28px}
body.studio-redesign .friendly-setup-body{border-top:3px solid #adc4e8!important}
body.studio-redesign .general-config{align-items:start;row-gap:12px}
body.studio-redesign .general-config>.section-title{grid-row:1}
body.studio-redesign .general-config>#dropzone{grid-row:2/5;align-self:start}
body.studio-redesign .general-config>#fileCard{grid-row:5;align-self:start}
body.studio-redesign .general-config>label[for=namesInput]{grid-row:2;margin:0}
body.studio-redesign .general-config>#namesInput{grid-row:3;margin:0}
body.studio-redesign .general-config>.help{grid-row:4;margin:0}
body.studio-redesign .general-config>.general-advanced{grid-row:5}
body.studio-redesign .general-config>.actions{grid-row:6}
body.studio-redesign .general-config>#status{grid-row:7}
body.studio-redesign :is(.workflow-config,.ri-fields,.docai-inline) label{
  color:#344d65;font-size:14px;line-height:1.5;font-weight:650;overflow-wrap:anywhere}
body.studio-redesign :is(.workflow-config,.ri-fields,.docai-inline) :is(input:not([type=checkbox]):not([type=radio]),select,textarea){min-width:0;width:100%;color:#192d43;background:#fff;border-color:#c4d1e0}
body.studio-redesign :is(.workflow-config,.ri-fields) textarea{resize:vertical;line-height:1.6}
body.studio-redesign :is(.help,.hint,.ri-help,#riStatus){color:#53677c;line-height:1.65}
body.studio-redesign .workflow-config .actions{gap:10px;flex-wrap:wrap;margin-top:12px}
body.studio-redesign .workflow-config .section-title{margin-bottom:12px}
body.studio-redesign .settings-grid{gap:16px}
body.studio-redesign .setting{min-width:0}
body.studio-redesign .ux-details{margin-top:14px;border-color:#dce4ed;background:#f8fafc}
body.studio-redesign .ux-details-content{padding:16px!important}
body.studio-redesign .results-topline{gap:24px;align-items:flex-start;flex-wrap:wrap}
body.studio-redesign .results-topline>div:first-child{flex:1 1 360px;min-width:0}
body.studio-redesign .export-actions{gap:10px;flex-wrap:wrap;max-width:100%}
body.studio-redesign .export-actions .btn{white-space:normal;text-align:center}
body.studio-redesign .toolbar{margin-bottom:18px!important;background:#fff!important;border:1px solid #dce4ed!important;box-shadow:none!important;align-items:center}
body.studio-redesign .toolbar-search{flex:1 1 300px;min-width:0}
body.studio-redesign .toolbar-search input{width:100%;min-width:0;background:#f8fafc!important;padding-left:42px!important}
body.studio-redesign .toolbar-search svg{top:50%;transform:translateY(-50%);left:14px;width:18px;height:18px}
body.studio-redesign .toolbar>select{flex:0 1 260px;min-width:0;max-width:100%}
body.studio-redesign .kpis{grid-template-columns:repeat(auto-fit,minmax(160px,1fr))!important}
body.studio-redesign :is(.kpi.success,.kpi.danger){border-top-width:3px}
body.studio-redesign .kpi.success{border-top-color:#208576!important}
body.studio-redesign .kpi.danger{border-top-color:#b84150!important}
body.studio-redesign .report-section-title{padding:8px 0;margin:24px 0 12px;gap:8px;align-items:baseline;flex-wrap:wrap}
body.studio-redesign .report-section-title h3{margin:0;color:#192d43}
body.studio-redesign .report-section-title p{font-size:14px;line-height:1.6;color:#53677c;margin:0}
/* Wide data stays in its own scroll region; the page never clips controls. */
body.studio-redesign :is(.table-wrap,.docai-table){border:1px solid #dce4ed;background:#fff;scrollbar-gutter:stable;overscroll-behavior-x:contain}
body.studio-redesign :is(.table-wrap,.docai-table) table{width:100%;border-collapse:separate;border-spacing:0}
body.studio-redesign :is(.table-wrap,.docai-table) td{vertical-align:top;border-bottom-color:#e6ecf3}
body.studio-redesign :is(.table-wrap,.docai-table) tbody tr:hover{background:#f5f8fc}
body.studio-redesign :is(.table-wrap,.docai-table) td :is(a,button){overflow-wrap:anywhere;white-space:normal}
body.studio-redesign .matrix-table :is(td,th){padding:12px!important}
body.studio-redesign :is(.mapping-guide,.floor-import-steps){gap:14px}
body.studio-redesign :is(.mapping-guide>div,.floor-step-card){padding:18px;border:1px solid #dce4ed;border-radius:12px;background:#f8fafc;min-width:0}
body.studio-redesign :is(.mapping-guide strong,.floor-step-card strong){font-size:15px;line-height:1.5;margin-bottom:6px}
body.studio-redesign :is(.mapping-guide span,.floor-step-card){font-size:14px;line-height:1.65;color:#53677c}
body.studio-redesign :is(.mapping-empty,.floor-empty-message,.audit-note){padding:20px;border-radius:12px;border:1px solid #dce4ed;background:#f4f8fc;font-size:15px;line-height:1.65;overflow-wrap:anywhere}
body.studio-redesign .mapping-empty strong{font-size:17px;margin-bottom:8px}
body.studio-redesign .floor-import-card{gap:24px;padding:24px;border:1px solid #c4d8df;background:#f4faf9;border-radius:14px;min-width:0}
body.studio-redesign .floor-import-card p{font-size:15px;line-height:1.65}
body.studio-redesign .floor-upload-label{padding:20px;min-height:100px;min-width:0;text-align:center;overflow-wrap:anywhere;background:#fff;border-color:#b4d2cf;color:#20665f}
body.studio-redesign .floor-upload-label span{font-size:13px}
body.studio-redesign .line-visual-summary{gap:22px;background:#fff;border:1px solid #dce4ed;border-radius:14px;padding:24px}
body.studio-redesign :is(.line-chart-box,.line-visual-card){border-color:#dce4ed;border-radius:12px;min-width:0}
body.studio-redesign :is(.line-score-card small,.line-visual-card span,.line-chart-title small){font-size:14px;line-height:1.5}
body.studio-redesign .line-chart-title{gap:10px;flex-wrap:wrap}
body.studio-redesign .docai-inline{gap:12px}
body.studio-redesign #docAiPanel .docai-grid{align-items:start}
body.studio-redesign .friendly-matrix-card{justify-content:flex-start!important;align-self:start}
body.studio-redesign :is(.docai-switches,.docai-profile-row){gap:12px}
body.studio-redesign .docai-switch{padding:12px;align-items:flex-start;font-size:14px!important;line-height:1.55;border-color:#dce4ed}
body.studio-redesign .docai-switch input{margin-top:3px}
body.studio-redesign .docai-list{max-height:320px;scrollbar-gutter:stable}
body.studio-redesign .docai-file .name{white-space:normal;overflow-wrap:anywhere;font-size:14px;line-height:1.5}
body.studio-redesign .docai-file .meta{margin-top:4px}
body.studio-redesign .docai-profile-row{grid-template-columns:minmax(0,1fr) minmax(0,1fr) auto;align-items:start}
body.studio-redesign .docai-profile-row>span{font-size:14px;overflow-wrap:anywhere}
body.studio-redesign .docai-profile-row>span small{display:block;margin-top:4px;font-size:13px}
body.studio-redesign .friendly-docai-export{gap:12px;flex-wrap:wrap}
body.studio-redesign .docai-progress-copy{flex-wrap:wrap;font-size:14px;line-height:1.6}
body.studio-redesign .pdf-tools-row{padding:16px;gap:16px;background:#f8fafc;min-width:0}
body.studio-redesign .pdf-tools-row .file strong{white-space:normal;overflow-wrap:anywhere;font-size:15px;line-height:1.5}
body.studio-redesign .pdf-tools-row .controls{gap:8px}
body.studio-redesign .pdf-tools-row .controls button{min-width:44px}
body.studio-redesign .ri-heading{gap:24px;align-items:flex-start;flex-wrap:wrap}
body.studio-redesign .ri-heading>div{flex:1 1 360px;min-width:0}
body.studio-redesign .ri-heading h2{font-size:30px;letter-spacing:-.035em;line-height:1.2}
body.studio-redesign .ri-heading p{font-size:16px;color:#53677c}
body.studio-redesign .ri-workspace{grid-template-columns:minmax(280px,360px) minmax(0,1fr);gap:24px}
body.studio-redesign .ri-card{padding:24px;border-color:#dce4ed;border-top:3px solid #bfd8d4;border-radius:14px}
body.studio-redesign .ri-card h3{font-size:19px!important;line-height:1.4}
body.studio-redesign :is(.ri-help,#riStatus,.ri-card summary){font-size:14px;line-height:1.65}
body.studio-redesign .ri-fields{gap:16px}
body.studio-redesign :is(.ri-card>label,.ri-export label){font-size:14px}
body.studio-redesign .ri-export{padding:16px;background:#fff;border:1px solid #dce4ed;border-radius:12px;gap:12px}
body.studio-redesign .ri-export strong{font-size:17px}
body.studio-redesign .ri-export span{font-size:13px;line-height:1.5}
body.studio-redesign .ri-empty{min-height:420px}
body.studio-redesign #riWarnings p{font-size:14px;line-height:1.6}
body.studio-redesign #riMetrics{overflow-x:auto;max-width:100%}
body.studio-redesign #riMetrics th{white-space:normal}
@media(max-width:1080px){
  body.studio-redesign .ri-workspace{grid-template-columns:minmax(260px,300px) minmax(0,1fr);gap:18px}
  body.studio-redesign .docai-switches{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media(max-width:760px){
  body.studio-redesign .general-config>*{grid-row:auto!important}
  body.studio-redesign .results-topline>div:first-child{flex-basis:100%}
  body.studio-redesign :is(.friendly-setup-body,.pdf-tools-body,.ri-card){padding:18px!important}
  body.studio-redesign .toolbar-search{flex-basis:100%}
  body.studio-redesign .toolbar>select{flex:1 1 100%;width:100%}
  body.studio-redesign .kpis{grid-template-columns:repeat(2,minmax(0,1fr))!important}
  body.studio-redesign .kpi{padding:14px!important}
  body.studio-redesign :is(.mapping-guide,.floor-import-steps,.line-visual-cards){grid-template-columns:repeat(2,minmax(0,1fr))}
  body.studio-redesign .floor-import-card{padding:18px;grid-template-columns:minmax(0,1fr)}
  body.studio-redesign .line-visual-summary{grid-template-columns:minmax(0,1fr);padding:18px}
  body.studio-redesign :is(.docai-inline,.docai-switches,.docai-profile-row){grid-template-columns:minmax(0,1fr)!important}
  body.studio-redesign .docai-file select{grid-column:1/-1;width:100%;min-width:0}
  body.studio-redesign .ri-workspace{grid-template-columns:minmax(0,1fr);gap:20px}
  body.studio-redesign .ri-output{grid-row:auto}
  body.studio-redesign .ri-heading h2{font-size:28px}
  body.studio-redesign .ri-empty{min-height:280px;padding:28px 18px}
  body.studio-redesign .ri-export>div{flex:1 1 100%}
  body.studio-redesign .ri-export .btn{flex:1 1 auto}
}
@media(max-width:420px){
  body.studio-redesign :is(.mapping-guide,.floor-import-steps){grid-template-columns:minmax(0,1fr)}
  body.studio-redesign .export-actions .btn{flex:1 1 100%;width:100%}
  body.studio-redesign .friendly-docai-export button{flex:1 1 100%}
}
@media print{
  body.studio-redesign :is(.table-wrap,.docai-table){max-height:none!important;overflow:visible!important;scrollbar-gutter:auto}
  body.studio-redesign :is(.table-wrap,.docai-table) th{position:static}
  body.studio-redesign .ri-workspace{display:block}
}
