.quote-screen-actions {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    max-width: 900px;
    margin: 0 auto 16px;
}
.quote-document {
    width: min(900px, 100%);
    min-height: 1180px;
    margin: 0 auto 18px;
    padding: 46px 58px 55px;
    background: #fff;
    color: #111;
    border: 1px solid #d9dee6;
    box-shadow: 0 8px 28px #14213d18;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 16px;
    line-height: 1.45;
}
.quote-letterhead {
    display: grid;
    grid-template-columns: 1.2fr .8fr;
    align-items: center;
    gap: 28px;
    padding-bottom: 14px;
    margin-bottom: 24px;
}
.quote-company-brand {
    display: flex;
    align-items: center;
    gap: 16px;
    min-width: 0;
}
.quote-company-brand img {
    display: block;
    width: 220px;
    height: 220px;
    object-fit: contain;
}
.quote-company-brand strong {
    font: 700 30px/1.06 Georgia, "Times New Roman", serif;
    letter-spacing: -.3px;
    color: #111;
    text-transform: uppercase;
}
.quote-company-contact {
    display: grid;
    gap: 3px;
    text-align: right;
    font-size: 13.5px;
    font-weight: 600;
    color: #333;
}
.quote-date { text-align: right; margin: 0 0 8px; font-size: 14px; color: #333; }
.quote-title { margin: 0 0 24px; font-size: 20px; font-weight: 800; text-transform: uppercase; letter-spacing: .2px; }
.quote-introduction p { margin: 0 0 16px; text-align: justify; }
.quote-attention { text-transform: uppercase; }
.quote-scope h3 { margin: 22px 0 10px; font-size: 16px; }
.quote-scope ul { margin: 0 0 18px; padding-left: 32px; }
.quote-scope li { margin-bottom: 5px; }
.quote-items-table, .quote-total-table {
    width: 100%;
    border-collapse: collapse;
    margin: 0 0 20px;
}
.quote-items-table th, .quote-items-table td {
    border: 1px solid #111;
    padding: 6px 8px;
    vertical-align: top;
}
.quote-items-table th {
    background: #c5c5c5;
    color: #111;
    font-size: 14px;
    line-height: 1.1;
    text-align: left;
}
.quote-items-table .qty { width: 72px; text-align: center; }
.quote-items-table .money { width: 132px; text-align: right; white-space: nowrap; }
.quote-total-table { margin-top: 30px; }
.quote-total-table th, .quote-total-table td { border: 1px solid #111; padding: 6px 9px; }
.quote-total-table th { text-align: right; background: #c5c5c5; }
.quote-total-table td { width: 150px; text-align: right; white-space: nowrap; }
.quote-total-words { font-weight: 700; }
.quote-payment strong { text-decoration: underline; }
.quote-closing { margin-top: 26px; }
.quote-signature {
    width: 260px;
    margin: 80px 20px 0 auto;
    display: grid;
    text-align: center;
    line-height: 1.25;
}
.quote-signature span { border-top: 2px dotted #111; margin-bottom: 8px; }
.quote-validity { max-width: 900px; margin: 0 auto 18px; color: var(--muted); }
.receipt-document{width:min(820px,100%);min-height:620px;margin:0 auto 18px;padding:46px 52px;background:#fff;color:#111;border:1px solid #d9dee6;box-shadow:0 8px 28px #14213d18;font:16px/1.5 Arial,sans-serif}.receipt-head{display:grid;grid-template-columns:auto 1fr auto;align-items:center;gap:18px;padding-bottom:18px;margin-bottom:30px;border-bottom:3px solid #222}.receipt-head img{width:92px;height:92px;object-fit:contain}.receipt-head h1,.receipt-head p{margin:2px 0}.receipt-head>div:last-child{display:grid;text-align:right}.receipt-head>div:last-child b{font-size:26px}.receipt-amount{margin:24px 0 8px;padding:14px;background:#eee;text-align:center;font-size:28px;font-weight:800;border:1px solid #333}.receipt-words{text-align:center;font-weight:700;text-transform:uppercase}.receipt-balances{display:flex;justify-content:space-between;gap:20px;margin-top:25px;padding-top:14px;border-top:1px solid #777}
.receipt-tax{display:grid;gap:6px;margin:14px 0;padding:12px 16px;border:1px solid #ddd;border-radius:8px;background:#fafafa}
.receipt-tax>div{display:flex;justify-content:space-between;gap:20px}
.receipt-tax span{color:#555}
.receipt-tax b{color:#111}
.receipt-tax-total{border-top:1px solid #bbb;padding-top:6px;margin-top:2px}
@media (max-width:700px){.receipt-tax>div{flex-direction:column;gap:2px}.receipt-tax-total{flex-direction:row!important}}
.receipt-items-table{margin:14px 0 10px;overflow-x:auto}
.receipt-items-table table{width:100%;border-collapse:collapse}
.receipt-items-table th,.receipt-items-table td{border:1px solid #bbb;padding:7px 9px;vertical-align:top;text-align:left}
.receipt-items-table thead th,.receipt-items-table tfoot th{background:#e8e8e8;font-size:13px}
.receipt-items-table .money{text-align:right;white-space:nowrap}
@media (max-width:700px){.receipt-items-table{font-size:12px}.receipt-items-table th,.receipt-items-table td{padding:5px 6px}}
@media (max-width: 700px) {
    .quote-document { min-height: 0; padding: 28px 20px; font-size: 14px; }
    .quote-letterhead { grid-template-columns: 1fr; gap: 14px; }
    .quote-company-contact { text-align: left; }
    .quote-company-brand img { width: 180px; height: 180px; }
    .quote-company-brand strong { font-size: 23px; }
    .quote-items-table { font-size: 12px; }
    .quote-items-table th, .quote-items-table td { padding: 5px; }
    .quote-items-table .qty { width: 48px; }
    .quote-items-table .money { width: 92px; }
    .receipt-document{padding:28px 20px}.receipt-head{grid-template-columns:1fr;text-align:center}.receipt-head img{margin:auto}.receipt-head>div:last-child{text-align:center}.receipt-balances{flex-direction:column}
}
@media print {
    @page { size: legal portrait; margin: 14mm 17mm; }
    body { background: #fff !important; }
    .sidebar, .menu-button, .topbar, .no-print { display: none !important; }
    .main { margin: 0 !important; padding: 0 !important; max-width: none !important; }
    .quote-document {
        width: auto;
        min-height: 0;
        margin: 0;
        padding: 0;
        border: 0;
        box-shadow: none;
        font-size: 11pt;
    }
    .receipt-document{width:auto;min-height:0;margin:0;padding:0;border:0;box-shadow:none}
    .quote-letterhead { min-height: 31mm; margin-bottom: 7mm; }
    .quote-items-table tr, .quote-total-table, .quote-signature { break-inside: avoid; }
}

/* ===== Orden de trabajo: membrete + galería de evidencias ===== */
.workorder-letterhead{margin:0 0 18px}
.workorder-gallery{display:grid;grid-template-columns:repeat(auto-fill,minmax(220px,1fr));gap:14px;margin-top:14px}
.workorder-photo{display:flex;flex-direction:column;margin:0;border:1px solid #e2e8ee;border-radius:10px;overflow:hidden;background:#f7f9fc}
.workorder-photo a{display:block}
.workorder-photo img{display:block;width:100%;height:220px;object-fit:cover}
.workorder-photo figcaption{padding:8px 10px;font-size:.85rem;color:#5b6670}
@media print{
  .workorder-gallery{grid-template-columns:repeat(2,1fr);gap:10px}
  .workorder-photo{break-inside:avoid;border:1px solid #ddd}
  .workorder-photo img{height:auto;max-height:230px}
  .workorder-letterhead{margin:0 0 6mm}
}

/* ===== Selección de evidencias para el PDF de la OT ===== */
.workorder-pickbar{display:flex;align-items:center;gap:12px;flex-wrap:wrap;margin:4px 0 2px}
.workorder-check{display:inline-flex;align-items:center;gap:5px;font-size:.82rem;color:#5b6670;padding:4px 6px;cursor:pointer}
@media print{
  .workorder-pickbar,.workorder-check{display:none!important}
  .workorder-photo:not(.print-include){display:none!important}
}
