.rich-document {
    --rich-ink: #19334d;
    --rich-muted: #566b81;
    --rich-border: #cdd9e4;
    --rich-field: #fff;
    --rich-tools: #f1f5f8;
    --rich-active: #dce9f4;
    color: var(--rich-ink);
    min-width: 0;
    margin-block: .4rem .65rem;
}
body.dark .rich-document {
    --rich-ink: #e2edf5;
    --rich-muted: #b4c9da;
    --rich-border: #456079;
    --rich-field: #172739;
    --rich-tools: #1f3549;
    --rich-active: #365675;
}
.rich-document .rich142 {
    display: flex;
    flex-wrap: wrap;
    gap: .25rem;
    align-items: center;
    margin: 0;
    padding: .4rem;
    border: 1px solid var(--rich-border);
    border-bottom: 0;
    border-radius: 9px 9px 0 0;
    background: var(--rich-tools);
}
.rich-document .rich142 button, .rich-document .rich142 select {
    width: auto;
    min-width: 2rem;
    min-height: 2rem;
    padding: .3rem .45rem;
    margin: 0;
    color: var(--rich-ink);
    background: var(--rich-field);
    border: 1px solid var(--rich-border);
    border-radius: 5px;
    font: 600 .8rem/1.15 Arial,sans-serif;
}
.rich-document .rich142 button:disabled { opacity: .45; }
.rich-document .rich142 button[aria-pressed=true] { background: var(--rich-active); box-shadow: inset 0 -2px #b59a64; }
.rich-document .rich142 [aria-label=Negrita] { font-weight: 800; }
.rich-document .rich142 [aria-label=Cursiva] { font-style: italic; }
.rich-document .rich142 [aria-label=Subrayado] { text-decoration: underline; }
.rich-document .rich142 [aria-label=Tachado] { text-decoration: line-through; }
.rich-document .rich142 :focus-visible, .rich-document .rich-surface:focus { outline: 2px solid #8385ad; outline-offset: 2px; }
.rich-document .rich-surface {
    box-sizing: border-box;
    min-height: 7.25rem;
    overflow-wrap: anywhere;
    white-space: pre-wrap;
    padding: .8rem;
    border: 1px solid var(--rich-border);
    border-radius: 0 0 9px 9px;
    background: var(--rich-field);
    color: var(--rich-ink);
    font: 10pt/1.4 Arial,sans-serif;
}
:is(.rich-surface,.document-paper,#ald141-paper .terms,#ald141-paper .rich-printed-description) :is(p,div,h3,h4,blockquote,ul,ol) { margin-top: 0; }
:is(.rich-surface,.document-paper .terms,.document-paper .rich-printed-description,#ald141-paper .terms,#ald141-paper .rich-printed-description) p { margin-bottom: .55em; }
:is(.rich-surface,.document-paper .terms,#ald141-paper .terms) [style*="break-before"] { border-top: 1px dashed #b59a64; }
.rich-colors { max-width: 22rem; }
.rich-colors .rich-swatches { display: flex; gap: .32rem; flex-wrap: wrap; margin: .5rem 0; }
.rich-colors .rich-swatches button { min-width: 1.7rem; min-height: 1.7rem; border: 1px solid #7a8d9d; margin: 0; }
.document-tabs, .document-actions { display: flex; flex-wrap: wrap; gap: .35rem; margin: .55rem 0; }
.document-tabs button { border-bottom: 2px solid transparent; padding: .45rem .6rem; }
.document-tabs button[aria-pressed=true] { background: #24415e; color: white; border-bottom-color: #cbb680; }
.document-tab-panel[hidden], .rich-description-summary[hidden], textarea[data-key=desc][hidden] { display: none !important; }
.rich-live { margin-top: .6rem; border-top: 1px solid #cbd9e4; padding-block: .55rem; }
.rich-live summary { cursor: pointer; font-weight: 700; }
.rich-paper-scroll { overflow: auto; padding: .75rem; border-radius: 8px; background: #e7edf3; margin-top: .6rem; }
body.dark .rich-paper-scroll { background: #102137; }
.document-paper { width: 186mm; box-sizing: content-box; margin: auto; padding: 12mm; background: white; color: #14263b; font: 10pt Arial,sans-serif; box-shadow: 0 2px 10px #12243a26; }
:is(#ald141-paper,.document-paper) *{box-sizing:border-box}
:is(#ald141-paper,.document-paper) h1{font-size:22pt;margin:0;color:#14263b}
:is(#ald141-paper,.document-paper) h2{break-after:avoid;font-size:11pt;margin:5mm 0 2mm;color:#14263b;border-bottom:1px solid #c9b38a;padding-bottom:1mm}
:is(#ald141-paper,.document-paper) .parties{display:grid;grid-template-columns:1fr 1fr;gap:8mm;margin:4mm 0;line-height:1.35}
:is(#ald141-paper,.document-paper) .meta{display:flex;justify-content:space-between;background:#eef2f6;padding:3mm;border-radius:2mm;margin:3mm 0}
:is(#ald141-paper,.document-paper) table{width:100%;table-layout:fixed;border-collapse:collapse}
:is(#ald141-paper,.document-paper) th{background:#14263b!important;color:white!important;print-color-adjust:exact}
:is(#ald141-paper,.document-paper) td,:is(#ald141-paper,.document-paper) th{padding:2mm;text-align:right;vertical-align:top;border-bottom:1px solid #dbe3ec}
:is(#ald141-paper,.document-paper) td:first-child,:is(#ald141-paper,.document-paper) th:first-child{text-align:left;width:48%;white-space:pre-wrap}
:is(#ald141-paper,.document-paper) tr{break-inside:avoid}
:is(#ald141-paper,.document-paper) img{max-width:45mm;max-height:28mm;object-fit:contain}
:is(#ald141-paper,.document-paper) .sum{margin:3mm 0 3mm auto;width:75mm;break-inside:avoid}
:is(#ald141-paper,.document-paper) .sum div{display:flex;justify-content:space-between;padding:1.5mm}
:is(#ald141-paper,.document-paper) .sum div:last-child{border-top:2px solid #c9b38a;font-size:15pt;font-weight:bold}
:is(#ald141-paper,.document-paper) .terms{white-space:pre-wrap;overflow-wrap:anywhere}
:is(#ald141-paper,.document-paper) .product-images:empty{display:none}
:is(#ald141-paper,.document-paper) .product-images img{display:block;max-width:23mm;max-height:18mm;margin-bottom:1mm}
:is(#ald141-paper,.document-paper) thead{display:table-header-group}
:is(#ald141-paper,.document-paper) td{overflow-wrap:anywhere}
:is(#ald141-paper,.document-paper) .sign{break-inside:avoid;margin-top:4mm}
:is(#ald141-paper,.document-paper) .signline{border-bottom:1px solid #64748b;width:75mm;height:12mm}
.rich-description-summary,.rich-printed-description { white-space: pre-wrap; overflow-wrap: anywhere; }
dialog.rich-library, dialog.rich-template-dialog { width: min(810px,calc(100% - 28px)); box-sizing: border-box; }
.rich-library-filters { display: flex; flex-wrap: wrap; align-items: end; gap: .5rem; }
.rich-library-filters label { flex: 1 1 145px; margin: 0; }
.rich-template-card { border-top: 1px solid #a9bbcd; padding: .75rem 0; }
.rich-template-card h3, .rich-template-card p { margin: .35rem 0; }
.rich-template-card small { color: inherit; opacity: .8; }
.rich-template-preview { white-space: pre-line; }
.rich-edit-description { font-size: .78rem; }
.rich-description-summary { padding: .45rem; }
@media (max-width: 650px) {
    .rich-document .rich142 button, .rich-document .rich142 select { min-height: 40px; }
    .rich-paper-scroll { padding: .35rem; }
    .document-tabs button { flex: 1 0 auto; }
}
@media print {
    #ald141-paper :is(.terms,.rich-printed-description) { print-color-adjust: exact; }
    #ald141-paper :is(.terms,.rich-printed-description) [style*="break-before"] { border-top: 0; }
    #ald141-paper .terms :is(h3,h4) { break-after: avoid; }
}

.rich-document .rich142[hidden],.rich-edit-description[hidden] { display: none !important; }
body.dark .document-paper :is(h1,h2,h3,h4) { color: #14263b; }

:is(#ald141-paper,.document-paper) .meta { padding: 2mm !important; margin: 2mm 0 !important; }

.rich142 button svg { width: 1rem; height: 1rem; display: block; fill: none; stroke: currentColor; stroke-width: 1.3; stroke-linecap: round; stroke-linejoin: round; }

body.dark .rich-document .rich-surface { background: #fff; color: #14263b; }
