/* Acabado visual del módulo de cotizaciones. */
.quotes-page > .quotes-heading {
    width: min(1120px, 100%);
    margin: 0 auto 28px;
    align-items: center;
}
.quotes-page > .quotes-heading h1 {
    max-width: 720px;
    font-size: clamp(36px, 4vw, 52px);
    line-height: 1.04;
    letter-spacing: -.025em;
    overflow-wrap: anywhere;
}
.quotes-page > .quotes-heading p { font-size: 16px; }
.quotes-page .quote-actions {
    flex: 0 0 auto;
    justify-content: flex-end;
    align-items: center;
}
.quotes-page .quote-actions .btn {
    width: auto !important;
    min-width: 0;
    min-height: 46px;
    padding: 0 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    white-space: nowrap;
    box-shadow: none;
}
.quotes-page .quote-actions .btn.primary {
    padding-inline: 24px;
    box-shadow: 0 10px 25px rgba(25,75,117,.18);
}
.quote-document {
    position: relative;
    max-width: 1040px;
    padding: 48px 52px 34px;
    border: 1px solid #d8e3ed;
    border-radius: 22px;
    box-shadow: 0 22px 60px rgba(13,41,69,.09);
    overflow: hidden;
}
.quote-document::before {
    content: "";
    position: absolute;
    inset: 0 0 auto;
    height: 8px;
    background: linear-gradient(90deg,#0e3456,#1c5c8c 65%,#62a6d5);
}
.quote-document > header {
    padding-bottom: 26px;
    border-bottom: 1px solid #cad9e5;
}
.quote-document > header::after {
    content: "";
    position: absolute;
    top: 8px;
    right: 0;
    width: 270px;
    height: 150px;
    background: radial-gradient(circle at 100% 0,rgba(80,157,211,.14),transparent 67%);
    pointer-events: none;
}
.quote-logo {
    width: 132px;
    height: 72px;
    border-radius: 18px;
    background-color: #143f65;
    background-image: url('/images/qwerty-medias-logo.svg'),linear-gradient(145deg,#123e65,#246b9f);
    background-position: center,center;
    background-repeat: no-repeat,no-repeat;
    background-size: 108px auto,cover;
    box-shadow: 0 12px 28px rgba(25,75,117,.2);
    font-size: 0;
}
.quote-document header strong { font-size: 25px; letter-spacing: -.02em; }
.quote-logo img{display:block;max-width:86%;max-height:72%;object-fit:contain}
.quote-document > header > div:last-child { gap: 8px; }
.quote-document > header > div:last-child > small {
    color: #3677aa;
    font-size: 13px;
}
.quote-document > header > div:last-child > b {
    font: 600 20px Georgia,serif;
    letter-spacing: .02em;
}
.quote-parties {
    grid-template-columns: 1.08fr .92fr;
    gap: 28px;
    padding: 30px 0;
}
.quote-parties > div,
.quote-parties > dl {
    padding: 20px 22px;
    border: 1px solid #dbe6ef;
    border-radius: 15px;
    background: linear-gradient(145deg,#f8fbfd,#fff);
}
.quote-parties > div strong { margin: 9px 0 6px; font-size: 19px; }
.quote-parties > div span { color: #516b83; }
.quote-parties dl div { padding: 6px 0; gap: 22px; }
.quote-parties dt { color: #688096; }
.quote-parties dd { margin: 0; font-weight: 700; text-align: right; }
.quote-document table {
    border: 1px solid #d9e4ed;
    border-radius: 14px;
    overflow: hidden;
}
.quote-document th {
    padding: 15px 20px;
    color: #315c7e;
    background: #edf5fa;
    border-bottom: 1px solid #d3e1eb;
}
.quote-document td { padding: 20px; }
.quote-document th:nth-child(n+2),
.quote-document td:nth-child(n+2) { text-align: right; }
.quote-document td:first-child strong { font-size: 16px; }
.quote-document-bottom {
    grid-template-columns: 1fr 360px;
    gap: 52px;
    padding: 30px 0 24px;
}
.quote-document-bottom > div {
    padding: 19px 20px;
    border-left: 4px solid #78acd0;
    border-radius: 0 12px 12px 0;
    background: #f5f9fc;
    color: #48637b;
}
.quote-document-bottom > div p { margin: 10px 0 0; line-height: 1.6; }
.quote-document-bottom dl { padding: 5px 0; }
.quote-document-bottom dl div { padding: 8px 4px; }
.quote-document-bottom dd { margin: 0; font-weight: 700; }
.quote-document-bottom .total {
    margin-top: 10px;
    padding: 17px 18px;
    border: 0;
    border-radius: 12px;
    background: #143f65;
    color: #fff;
    font-size: 22px;
    box-shadow: 0 10px 26px rgba(20,63,101,.16);
}
.quote-document > footer {
    padding-top: 20px;
    color: #7a8da0;
}
.quote-workflow {
    max-width: 1040px;
    border-radius: 18px;
    box-shadow: 0 12px 35px rgba(13,41,69,.05);
}
.quote-workflow .btn { width: auto !important; }
@media (max-width: 1000px) {
    .quotes-page > .quotes-heading { align-items: flex-start; }
    .quotes-page .quote-actions { justify-content: flex-start; }
    .quote-document { padding: 38px 30px 28px; }
}
@media (max-width: 760px) {
    .quotes-page .quote-actions { width: 100%; }
    .quotes-page .quote-actions .btn { flex: 1 1 auto; }
    .quote-parties,.quote-document-bottom { grid-template-columns: 1fr; gap: 18px; }
    .quote-document { border-radius: 16px; padding: 32px 18px 22px; }
    .quote-document > header { align-items: flex-start; gap: 20px; }
    .quote-document > header > div:last-child { align-items: flex-start; }
}
@media print {
    @page { size: A4 portrait; margin: 8mm; }
    html,body {
        width: 100%;
        height: auto !important;
        margin: 0 !important;
        padding: 0 !important;
        background: #fff !important;
    }
    .app-shell,.main-content,.admin-content,.content,.quotes-page {
        display: block !important;
        width: 100% !important;
        min-height: 0 !important;
        height: auto !important;
        margin: 0 !important;
        padding: 0 !important;
        overflow: visible !important;
        background: #fff !important;
    }
    .quote-document {
        display: block !important;
        width: 100% !important;
        max-width: 100% !important;
        min-height: 0 !important;
        height: auto !important;
        margin: 0 !important;
        padding: 8mm 9mm 5mm !important;
        border: 0 !important;
        border-radius: 0 !important;
        box-shadow: none !important;
        overflow: visible !important;
        font-size: 10.5pt !important;
        zoom: 1;
        page-break-inside: auto;
        break-inside: auto;
    }
    .quote-document::before { height: 4px; }
    .quote-document > header {
        padding-bottom: 4mm !important;
        page-break-inside: avoid;
    }
    .quote-logo {
        width: 35mm;
        height: 18mm;
        border-radius: 3mm;
        background-image: none !important;
        background: #fff !important;
        border: 1.5px solid #143f65;
        color: #143f65 !important;
        font-size: 22pt !important;
        box-shadow: none;
    }
    .quote-document header strong { font-size: 18pt; }
    .quote-logo img{max-width:90%;max-height:80%;object-fit:contain}
    .quote-document > header > div:last-child { gap: 1.5mm; }
    .quote-document > header > div:last-child > b { font-size: 13pt; }
    .quote-status { padding: 1.5mm 3mm; font-size: 7pt; }
    .quote-parties {
        display: flex !important;
        gap: 5mm !important;
        padding: 5mm 0 !important;
        page-break-inside: avoid;
    }
    .quote-parties > div,.quote-parties > dl {
        width: 50% !important;
        box-sizing: border-box;
        padding: 3.5mm 4mm !important;
        border-radius: 3mm;
        background: #fff !important;
    }
    .quote-parties > div strong { margin: 1.5mm 0 1mm; font-size: 12pt; }
    .quote-parties > div span { margin-top: .7mm; }
    .quote-parties dl div { padding: 1mm 0; }
    .quote-document table {
        page-break-inside: avoid;
        break-inside: avoid-page;
        font-size: 10pt;
        table-layout: fixed;
    }
    .quote-document th:first-child,.quote-document td:first-child { width: 48%; }
    .quote-document th:nth-child(2),.quote-document td:nth-child(2) { width: 14%; }
    .quote-document th:nth-child(3),.quote-document td:nth-child(3) { width: 18%; }
    .quote-document th:nth-child(4),.quote-document td:nth-child(4) { width: 20%; }
    .quote-document th { padding: 2.5mm 3.5mm !important; }
    .quote-document td { padding: 3mm 3.5mm !important; }
    .quote-document-bottom {
        display: flex !important;
        gap: 7mm !important;
        padding: 5mm 0 3mm !important;
        page-break-inside: auto;
        break-inside: auto;
    }
    .quote-document-bottom > div { padding: 3mm 3.5mm !important; }
    .quote-document-bottom > div { width: calc(100% - 83mm) !important; box-sizing: border-box; }
    .quote-document-bottom > dl { width: 76mm !important; flex: 0 0 76mm; }
    .quote-document-bottom > div p { margin-top: 1.5mm; line-height: 1.35; }
    .quote-document-bottom dl div { padding: 1.3mm 1mm; }
    .quote-document-bottom .total {
        margin-top: 1.5mm;
        padding: 3mm !important;
        border-radius: 2.5mm;
        font-size: 14pt;
        box-shadow: none;
    }
    .quote-document > footer {
        position: static !important;
        padding-top: 3mm !important;
        font-size: 8.5pt !important;
        page-break-inside: avoid;
    }
}
