/* Jerarquía operativa: documento, renglón y respaldo desplegable. */
.deadline-info{margin-top:6px;min-width:0;overflow-wrap:anywhere}
.deadline-info>strong{display:block;font-size:12px!important;line-height:1.5;color:#164f70!important}
.deadline-info>small{display:block;font-size:11px;line-height:1.5;margin-top:4px}
.deadline-estimate{font-size:10px;font-weight:400;color:#866017}
.deadline-origin{margin-top:6px;font-size:11px;text-align:left}.deadline-origin summary{cursor:pointer;color:#476e89;line-height:1.5}
.deadline-origin p{font-size:11px!important;font-weight:400!important;line-height:1.6;margin:7px 0!important}
.workspace-deadlines{display:flex;flex-wrap:wrap;gap:7px 20px;padding:10px 22px;font-size:11px;border-bottom:1px solid #dfedf5;background:#fbfdfe;color:#4c6b80}.workspace-deadlines:empty{display:none}.workspace-deadlines small{margin:0}
.destination-reference{display:block;font-size:11px!important;font-weight:400;line-height:1.5;margin-top:4px;color:#647c90}
.destination-term{padding:8px 0}.destination-term>small{display:block;margin-top:4px}
.purchase-destination .deadline-info{text-align:left}.purchase-destination .deadline-info>strong{font-size:13px!important}
button{line-height:1.25}
.actions{gap:8px}
.toolbar{column-gap:14px;row-gap:12px}
.page-head{margin-bottom:20px}
.page-head .eyebrow{margin-bottom:7px}
.global-tools{margin-bottom:20px}
.document-types{display:flex;gap:6px;flex-wrap:wrap;grid-template-columns:none;padding:5px;background:#eaf0f6;border:1px solid #dfe7ef;border-radius:10px;margin:0 0 18px}
.document-types button{display:inline-flex;align-items:center;justify-content:center;gap:10px;flex:1;min-height:38px;padding:8px 14px;background:transparent;border:1px solid transparent;border-radius:6px;font-size:12px;white-space:nowrap;text-align:center;box-shadow:none;color:#526b80}
.document-types button.selected{background:#fff;border-color:#c9dbe9;color:#135d87;box-shadow:0 1px 3px #173b5910}
.document-types button>span{display:inline-grid;place-items:center;min-width:22px;height:20px;padding:0 5px;border-radius:4px;background:#dfe8f0;color:#526c82;font-size:11px;font-variant-numeric:tabular-nums}
.document-types button.selected>span{background:#e3f3fd;color:#086d9c}
.document-list{overflow:visible}
.document-list .documents-table{table-layout:auto;font-size:12px}
.documents-table .document-row>td{padding:12px 14px;vertical-align:middle;line-height:1.45}
.documents-table th{padding:12px 14px;letter-spacing:0;font-size:11px}
.documents-table .document-row>td small{font-size:11px;line-height:1.45;margin-top:4px}
.documents-table .document-row .document-identity{width:23%;min-width:205px}
.document-identity>div{display:flex;align-items:center;gap:7px}
.document-identity .text-button{white-space:nowrap;min-height:26px;line-height:1.3;padding:0;font-size:12px;font-weight:650}
.document-org{max-width:300px;min-width:145px}
.document-deadline{min-width:138px}
.document-deadline .muted{font-size:11px}
.document-stage{min-width:126px}
.documents-table .document-row>td.expand-cell{padding:12px 6px 12px 10px!important;width:42px;min-width:42px}
.expand-doc{display:grid;place-items:center;width:30px;height:32px;min-height:32px;font-size:20px;line-height:1;padding:0;border-radius:6px}
.documents-table .document-actions .actions{gap:8px}
.documents-table .document-actions button{min-height:34px;padding:7px 12px;font-size:12px}
.document-stage .badge{font-size:10px}
.review-marker{color:#946515!important;font-size:11px}
.documents-table .expanded-document>td{padding:0!important;white-space:normal}
.expanded-content{max-width:none;padding:16px}
.document-workspace.oc-detail{padding:0;border:1px solid #dce6ef;border-radius:10px;overflow:hidden}
.workspace-head{display:flex;justify-content:space-between;align-items:flex-start;gap:18px;padding:20px 22px 14px;background:#fff}
.workspace-head>div:first-child{flex:1;min-width:0}
.workspace-head h3{font-size:17px;margin:0 0 7px;display:flex;align-items:center;gap:8px}
.workspace-organism{margin:0 0 8px;font-size:13px;font-weight:650;line-height:1.45;overflow-wrap:anywhere}
.workspace-meta{display:flex;gap:6px 20px;flex-wrap:wrap;font-size:11px;color:#65758b}
.workspace-meta b{color:#23445f;font-weight:600;font-variant-numeric:tabular-nums}
.workspace-actions{display:flex;align-items:center;justify-content:flex-end;gap:10px;flex-wrap:wrap}
.workspace-actions button{min-height:34px;padding:7px 12px;font-size:12px}
.workspace-next{margin:0;padding:11px 22px;background:#f1f8fc;border-block:1px solid #dfedf5;color:#345c78;font-size:12px;line-height:1.6}
.workspace-warning{padding:10px 22px;margin:0;background:#fff8e9;color:#845f1e;font-size:12px;line-height:1.5}
.workspace-warning .text-button{font-size:12px;padding:3px 5px;min-height:26px}
.workspace-parent{font-size:11px;color:#65758b;margin:0;padding:8px 22px;border-bottom:1px solid #e5edf4}
.workspace-parent .text-button{padding:3px 5px;min-height:28px;font-size:11px}
.workspace-tabs{display:flex;gap:6px;padding:0 18px;background:#fff;border-bottom:1px solid #dae5ee;overflow-x:auto;overscroll-behavior-x:contain}
.workspace-tabs button{flex-shrink:0;min-height:47px;padding:13px 10px;border:0;border-radius:0;border-bottom:3px solid transparent;background:transparent;font-size:12px;color:#657a8c;box-shadow:none;white-space:nowrap}
.workspace-tabs button:hover{color:#145c89;background:#f7fbfd}
.workspace-tabs button[aria-selected=true]{color:#076fa6;border-bottom-color:#087db7;font-weight:700}
.workspace-tabs button>span{margin-left:5px;font-size:10px;border-radius:4px;padding:2px 5px;background:#edf3f8;color:#59758c}
.workspace-panel{padding:20px 22px;min-width:0;background:#fff;outline-offset:-4px}
.workspace-section-head{display:flex;justify-content:space-between;align-items:center;gap:16px;margin-bottom:16px}
.workspace-section-head h3{margin:0;font-size:16px}.workspace-section-head p{font-size:12px;color:#62798c;margin:5px 0 0}
.workspace-section-head button,.workspace-section-head>a{flex-shrink:0;font-size:12px}
.workspace-subtitle{margin:24px 0 12px;font-size:15px}
.workspace-panel .destination-summary{background:#f6fafc;border-color:#dce7ef;margin-bottom:18px}
.workspace-panel .document-invoices{border:0;margin:0;padding:0}
.workspace-panel .document-invoices>.section-title{margin:0 0 12px}
.workspace-panel .oca-requests{margin:0!important;padding:16px;background:#f7fbfd}
.document-workspace .oc-lines{display:grid;gap:14px;min-width:0}
.document-workspace .oc-line{border-color:#dfe7ee;border-radius:8px;background:#fff}
.document-workspace .oc-line-head{padding:10px 15px;gap:16px;background:#f7f9fc;flex-wrap:wrap;border-bottom:1px solid #e7edf2}
.document-workspace .oc-line-head h3{font-size:13px;margin:0;line-height:1.4}
.document-workspace .oc-line-head>strong{font-size:12px;font-weight:650;color:#365b76;font-variant-numeric:tabular-nums}
.document-workspace .oc-line-head small{display:inline!important;margin:0!important;font-size:11px;font-weight:400}
.line-main{display:grid;grid-template-columns:minmax(0,1.65fr) minmax(210px,1fr);gap:18px;padding:15px}
.line-main>div{min-width:0}
.line-main .purchase-source,.oca-line-balance{padding-left:18px;border-left:1px solid #e4ebf2}
.document-workspace .field-caption{font-size:10px;letter-spacing:.04em;color:#6b8092;font-weight:600;margin-bottom:7px}
.document-workspace .offered-description{font-size:13px;font-weight:500;line-height:1.6;margin:0;color:#1e3e57;white-space:pre-wrap}
.line-prices{display:flex;flex-wrap:wrap;gap:8px 20px;margin-top:10px;font-size:11px;color:#74869a}
.line-prices b{display:inline-block;margin-left:4px;color:#39566c;font-weight:600;font-variant-numeric:tabular-nums}
.purchase-source>strong{font-size:13px;font-weight:650;line-height:1.4;margin-bottom:5px}
.purchase-source .source-text{font-size:11px;line-height:1.5;margin:5px 0;color:#60768a;white-space:normal}
.purchase-source .source-code{font-size:11px;margin:5px 0}
.purchase-source small{font-size:11px;margin-top:5px;line-height:1.5}
.purchase-source a{font-size:12px;display:inline-block;padding:3px 0;line-height:1.5}
.purchase-source .notice{font-size:11px;padding:8px 10px;margin:8px 0 0}
.oca-line-balance strong,.oca-line-balance small{display:block;font-size:12px;margin:5px 0}
.line-destinations{border-top:1px solid #e7edf2;padding:11px 15px;background:#fbfcfd}
.document-workspace .line-destinations>.field-caption{margin-bottom:5px}
.document-workspace .delivery-term{display:grid;grid-template-columns:minmax(0,1.65fr) minmax(210px,1fr);gap:18px;padding:0;margin:0}
.document-workspace .delivery-term>div{min-width:0}
.document-workspace .delivery-term+.delivery-term{border-top:1px solid #e0e9f0;margin-top:10px;padding-top:10px}
.document-workspace .delivery-term strong{font-size:11px;font-weight:600;color:#42677d}
.document-workspace .delivery-term p{font-size:12px;font-weight:500;margin:3px 0 0;line-height:1.5;overflow-wrap:anywhere;color:#375669}
.document-workspace .delivery-term small{display:block;font-size:11px;margin:3px 0 0;line-height:1.5;color:#6b8090}
.document-workspace .line-tracking{display:flex;justify-content:space-between;align-items:center;flex-wrap:wrap;gap:12px;padding:10px 15px;background:#fff;border-top:1px solid #e4ebf2}
.document-workspace .tracking-quantities{display:flex;gap:16px;flex-wrap:wrap;margin:0;font-size:10px}
.document-workspace .tracking-quantities strong{display:inline;font-size:11px;margin-left:4px;font-variant-numeric:tabular-nums;color:#31546d}
.document-workspace .line-tracking .actions{justify-content:flex-start;gap:12px}
.document-workspace .line-tracking button{min-height:32px;padding:6px 10px;font-size:11px}
.document-workspace .purchase-tick{font-size:11px;gap:7px;min-height:32px}
.document-workspace .purchase-tick input{height:17px;min-height:17px;width:17px;min-width:17px}
.document-workspace details.line-reference{margin:0;border-top:1px solid #e7edf3;background:#fafbfd}
.document-workspace .line-reference>summary{padding:10px 15px;font-size:11px;color:#527187;cursor:pointer;line-height:1.5}
.line-reference .line-comparison{padding:0 15px 15px;gap:22px;grid-template-columns:1fr 1fr}
.line-reference section{min-width:0;overflow-wrap:anywhere}
.line-reference h4{font-size:12px;font-weight:650;margin:8px 0}
.line-reference p,.line-reference .requested-description{font-size:12px;font-weight:400;line-height:1.65;color:#536d81;white-space:pre-wrap}
.line-reference small{font-size:10px;line-height:1.5;color:#758797}
.source-reference{padding-top:8px;border-top:1px solid #e0e8ef;margin-top:14px}
.reference-facts{display:grid;grid-template-columns:1fr 1fr;gap:16px 24px;margin:0 0 20px}
.reference-facts>div{min-width:0;overflow-wrap:anywhere}.reference-facts dt{font-size:11px;color:#718496}.reference-facts dd{font-size:13px;margin:4px 0 0}.reference-facts a{display:inline-block;font-size:11px;margin-left:8px}
.workspace-notes{border-block:1px solid #e1eaf1;padding:12px 0;margin:15px 0}.workspace-notes h4{margin:0;font-size:12px}.workspace-notes p{font-size:12px;white-space:pre-wrap;margin:7px 0 0}
#detail[open]{display:flex;flex-direction:column;max-height:92dvh;width:min(1140px,calc(100vw - 40px))}
#detail .dialog-head{flex-shrink:0;padding:17px 22px}#detail .dialog-head h2{font-size:19px}
#detail .dialog-body{min-height:0;overflow:auto;overscroll-behavior:contain;padding:0}
#detailBody>.document-workspace{margin:0;border:0;border-radius:0;padding:0;overflow:visible}
#detail .workspace-tabs{position:sticky;top:0;z-index:2}
.document-workspace .panel-row{padding:14px 0;font-size:12px}.document-workspace .panel-row small{display:block;margin-top:5px}.document-workspace .panel-row button{flex-shrink:0;min-height:34px;padding:6px 10px;font-size:12px}
.workspace-audit .audit-row{font-size:12px;padding:12px 0}.workspace-audit pre{font-size:11px;max-height:300px;overflow:auto;white-space:pre-wrap;overflow-wrap:anywhere}
.purchase-group .supplier-head{padding:16px 18px}.purchase-line{padding:18px;gap:20px}.purchase-line .purchase-source{margin-top:12px;padding-top:12px}.purchase-quantity>strong{font-size:22px}.purchase-quantity>button{margin-top:12px}
.destination-actions{display:flex;flex-wrap:wrap;gap:8px}.destination-actions button{min-height:36px;padding:8px 12px}.destination-document-head{gap:8px}.destination-document-head button{min-height:34px;padding:7px 11px}
@media(min-width:900px) and (max-width:1240px){.document-org{min-width:125px}.documents-table .document-row>td{padding:10px}.documents-table .document-row .document-identity{min-width:190px}.document-deadline{min-width:116px}.document-stage{min-width:112px}.document-list{overflow-x:auto}.line-main,.document-workspace .delivery-term{grid-template-columns:minmax(0,1.4fr) minmax(180px,1fr)}}
@media(max-width:899px){
  .document-types button{flex:1 0 auto;min-height:40px;padding:8px 10px}
  .document-list .documents-table .document-row{display:grid;grid-template-columns:minmax(0,1fr) auto;column-gap:12px;row-gap:8px;padding:15px 14px 15px 51px}
  .documents-table .document-row>td{padding:0!important;min-width:0!important;width:auto!important;max-width:none;line-height:1.45}
  .documents-table .document-row>td.expand-cell{position:absolute;left:10px;top:15px;padding:0!important;width:32px!important}
  .document-identity,.document-org{grid-column:1/-1}.documents-table .document-row>td.document-identity{width:auto}.document-org{font-size:12px}
  .document-org small{display:none!important}.document-deadline{grid-column:1}.document-total{grid-column:2;text-align:right}.document-stage{grid-column:1;align-self:center}.document-actions{grid-column:2;align-self:center}
  .documents-table>tbody>.document-row>td:nth-child(4)::before,.documents-table>tbody>.document-row>td:nth-child(5)::before{content:none}
  .documents-table .document-row>td small{font-size:10px}.document-identity .text-button{font-size:12px}.document-total small{display:none!important}
  .document-list .document-actions button{min-height:36px}.expand-doc{width:32px;min-height:36px;height:36px}
  .expanded-content{padding:8px}.workspace-head{padding:16px;flex-direction:column;gap:12px}.workspace-actions{justify-content:flex-start;gap:8px}.workspace-actions button{min-height:36px}
  .workspace-meta{gap:5px 14px}.workspace-next,.workspace-warning{padding:10px 16px}.workspace-parent{padding:6px 16px}.workspace-tabs{padding:0 8px;gap:0}.workspace-tabs button{font-size:12px;min-height:46px;padding:12px 10px}
  .workspace-panel{padding:14px}.line-main{grid-template-columns:1fr;gap:12px;padding:13px}.line-main .purchase-source,.oca-line-balance{padding:12px 0 0;border-left:0;border-top:1px solid #e5ebf1}
  .line-destinations{padding:11px 13px}.document-workspace .delivery-term{grid-template-columns:1fr;gap:6px}.document-workspace .line-tracking{padding:10px 13px;gap:9px}.document-workspace .line-tracking .actions{width:100%;justify-content:space-between;gap:8px}.document-workspace .line-tracking button{min-height:38px}
  .document-workspace .tracking-quantities{gap:10px;justify-content:space-between;width:100%}.document-workspace .tracking-quantities strong{display:block;margin:3px 0 0;font-size:12px}
  .document-workspace .line-reference>summary{padding:12px 13px;min-height:42px}.line-reference .line-comparison{grid-template-columns:1fr;gap:8px;padding:0 13px 13px}
  .reference-facts{grid-template-columns:1fr;gap:12px}.workspace-section-head{align-items:flex-start;flex-wrap:wrap}.workspace-section-head button{min-height:40px}.workspace-section-head h3{font-size:15px}
  #detail[open]{width:calc(100vw - 16px);max-height:94dvh}#detail .dialog-head{padding:13px 15px}#detail .dialog-head h2{font-size:16px}#detail .dialog-head .icon-button{width:36px;height:36px;min-height:36px}
  .purchase-group .supplier-head button{width:auto;margin-left:auto;min-height:38px}.supplier-head h2{font-size:14px}.purchase-line{gap:14px}.destination-actions button{min-height:40px}
}
@media(max-width:380px){.document-types{gap:4px}.document-types button{padding:8px;gap:6px;font-size:11px}.workspace-panel{padding:10px}.workspace-tabs button{font-size:11px;padding:12px 8px}.workspace-tabs button>span{margin-left:3px}.document-total .money{font-size:11px}.document-workspace .line-tracking .actions{align-items:flex-start;flex-direction:column;gap:4px}.document-identity .text-button{font-size:11px}.document-identity .badge{font-size:9px}}
