.qa-ip-toolbar {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 16px;
    border-bottom: 1px solid #e5e7eb;
    background: #f8fafc;
    position: sticky;
    top: 0;
    z-index: 10;
}

.qa-ip-toolbar-spacer { flex: 1 1 auto; }

.qa-ip-toolbar-btn {
    padding: 6px 12px;
    border: 1px solid #cbd5e1;
    background: #ffffff;
    border-radius: 6px;
    font-size: 13px;
    cursor: pointer;
}

.qa-ip-toolbar-btn:hover {
    background: #f1f5f9;
}

.qa-ip-toolbar-style {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-left: 12px;
}

.qa-ip-toolbar-style-label {
    font-size: 12px;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.qa-ip-toolbar-style-btn {
    padding: 4px 10px;
    border: 1px solid #cbd5e1;
    background: #ffffff;
    border-radius: 999px;
    font-size: 12px;
    cursor: pointer;
}

.qa-ip-toolbar-style-btn--active {
    background: #0f172a;
    color: #ffffff;
    border-color: #0f172a;
}

.qa-ip-toolbar-docs {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-left: 12px;
}

.qa-ip-export {
    position: relative;
    display: inline-flex;
}

.qa-ip-export-trigger {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.qa-ip-export-backdrop {
    position: fixed;
    inset: 0;
    z-index: 40;
}

.qa-ip-export-menu {
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    z-index: 50;
    min-width: 180px;
    background: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.16);
    padding: 6px;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.qa-ip-export-item {
    text-align: left;
    padding: 8px 12px;
    border: none;
    background: transparent;
    border-radius: 6px;
    font-size: 13px;
    color: #0f172a;
    cursor: pointer;
}

.qa-ip-export-item:hover {
    background: #f1f5f9;
}

.qa-ip-legaldoc-title {
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 8px;
    color: #0f172a;
}

.qa-ip-loading {
    padding: 64px 24px;
    text-align: center;
    color: #64748b;
}

.qa-ip-page {
    max-width: 900px;
    margin: 24px auto;
    padding: 32px 40px;
    background: #ffffff;
    color: #0f172a;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 12px;
    line-height: 1.45;
}

.qa-ip-header {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    align-items: start;
    margin-bottom: 24px;
}

.qa-ip-company {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.qa-ip-logo {
    max-width: 140px;
    max-height: 140px;
    object-fit: contain;
    margin-bottom: 8px;
}

.qa-ip-company-info {
    color: #64748b;
    font-size: 11px;
}

.qa-ip-company-name {
    color: #0f172a;
    font-size: 13px;
    font-weight: 700;
    margin-bottom: 2px;
}

.qa-ip-meta {
    text-align: right;
}

.qa-ip-title {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 12px;
}

.qa-ip-meta-table {
    border-collapse: collapse;
    width: 100%;
    border: 1px solid #d1d5db;
}

.qa-ip-meta-key {
    background: #d9d9d9;
    padding: 7px 14px;
    font-weight: 700;
    font-size: 11px;
    text-align: center;
    white-space: nowrap;
    border: 1px solid #ffffff;
    width: 40%;
}

.qa-ip-meta-val {
    padding: 7px 14px;
    text-align: center;
    font-size: 11px;
    background: #ffffff;
    border-bottom: 1px solid #e5e7eb;
}

.qa-ip-twocol {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    margin-bottom: 16px;
}

.qa-ip-section {
    border: 1px solid #d1d5db;
}

.qa-ip-section-header {
    background: #e5e7eb;
    padding: 6px 10px;
    font-weight: 700;
    font-size: 11px;
    text-align: center;
    letter-spacing: 0.05em;
}

.qa-ip-section-body {
    padding: 10px;
    min-height: 60px;
}

.qa-ip-center { text-align: center; }

.qa-ip-jobs {
    width: 100%;
    border-collapse: collapse;
    margin-top: 8px;
}

.qa-ip-jobs thead th {
    background: #d9d9d9;
    padding: 7px 10px;
    text-align: left;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.03em;
    border: 1px solid #ffffff;
}

.qa-ip-jobs tbody td {
    padding: 7px 10px;
    font-size: 12px;
    vertical-align: top;
}

.qa-ip-jobs-num { width: 120px; }
.qa-ip-jobs-date { width: 200px; }
.qa-ip-jobs-po { width: 200px; }

.qa-ip-completion {
    padding: 4px 10px 8px;
    font-size: 12px;
    border-bottom: 1px solid #cbd5e1;
}

.qa-ip-completion-label {
    font-weight: 700;
}

.qa-ip-charges {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 18px;
}

.qa-ip-charges thead th {
    padding: 6px 10px;
    font-size: 12px;
    font-weight: 700;
    text-align: left;
    border-bottom: 1px solid #0f172a;
}

.qa-ip-charges tbody td {
    padding: 6px 10px;
    font-size: 12px;
    vertical-align: top;
    border-bottom: 1px solid #f1f5f9;
}

.qa-ip-charges-img {
    width: 1%;
    white-space: nowrap;
    vertical-align: top;
}

.qa-ip-charges-name { text-align: left; }

.qa-ip-charges-qty { width: 90px; text-align: right; white-space: nowrap; }
.qa-ip-charges-rate { width: 110px; text-align: right; white-space: nowrap; }
.qa-ip-charges-total { width: 120px; text-align: right; white-space: nowrap; }

.qa-ip-jobsubtotal td,
.qa-ip-jobtotal td {
    font-weight: 700;
    border-bottom: none;
    padding-top: 8px;
}

.qa-ip-jobtotal td {
    border-top: 1px solid #cbd5e1;
}

.qa-ip-line-image {
    display: block;
    max-width: 80px;
    max-height: 80px;
    width: auto;
    height: auto;
    border: 1px solid #E2E8F0;
    border-radius: 6px;
    object-fit: contain;
}

.qa-ip-line-title {
    font-weight: 400;
    color: #0f172a;
}

.qa-ip-line-detail {
    font-size: 12px;
    color: #4b5563;
    line-height: 1.45;
}

.qa-ip-sign-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    margin: 16px 0;
}

.qa-ip-sign {
    display: flex;
    flex-direction: column;
}

.qa-ip-sign .qa-ip-section-header {
    border: 1px solid #d1d5db;
}

.qa-ip-sign-body {
    border: 1px solid #d1d5db;
    border-top: none;
    min-height: 70px;
}

.qa-ip-sign-line {
    display: flex;
    align-items: flex-end;
    gap: 8px;
    margin-top: 10px;
    font-size: 12px;
}

.qa-ip-sign-underline {
    flex: 1 1 auto;
    border-bottom: 1px solid #94a3b8;
    min-height: 1.4em;
}

.qa-ip-footer-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    align-items: start;
    margin-bottom: 16px;
}

.qa-ip-customer-message .qa-ip-section-body,
.qa-ip-message-body {
    min-height: 80px;
}

.qa-ip-total-block {
    display: flex;
    justify-content: flex-end;
    align-items: flex-start;
}

.qa-ip-totals {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.qa-ip-totals td {
    padding: 4px 6px;
}

.qa-ip-totals td:first-child {
    font-weight: 700;
}

.qa-ip-totals td:last-child {
    text-align: right;
    white-space: nowrap;
    font-weight: 700;
}

.qa-ip-totals-grand td {
    font-size: 15px;
    border-top: 1px solid #0f172a;
    padding-top: 6px;
}

.qa-ip-page-break {
    text-align: center;
    color: #94a3b8;
    font-size: 11px;
    padding: 12px 0;
    border-top: 1px dashed #cbd5e1;
    border-bottom: 1px dashed #cbd5e1;
    margin: 16px 0;
    page-break-before: always;
    break-before: page;
}

.qa-ip-terms {
    font-size: 12px;
    line-height: 1.5;
}

.qa-ip-terms h1, .qa-ip-terms h2, .qa-ip-terms h3 {
    font-weight: 700;
    margin: 12px 0 6px;
}

.qa-ip-terms p { margin: 6px 0; }

.qa-ip-terms ol, .qa-ip-terms ul {
    margin: 6px 0 6px 24px;
}

.qa-ipb-page {
    max-width: 900px;
    margin: 24px auto;
    background: #ffffff;
    color: #0f172a;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 12px;
    line-height: 1.45;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.1);
}

.qa-ipb-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #1e3a8a;
    padding: 18px 28px;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
}

.qa-ipb-brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.qa-ipb-logo {
    width: 48px;
    height: 48px;
    object-fit: contain;
}

.qa-ipb-company {
    color: #ffffff;
    font-size: 16px;
    font-weight: 700;
}

.qa-ipb-tagline {
    color: #60a5fa;
    font-size: 10px;
}

.qa-ipb-headmeta {
    text-align: right;
}

.qa-ipb-headtitle {
    color: #ffffff;
    font-size: 24px;
    font-weight: 700;
    letter-spacing: 0.06em;
}

.qa-ipb-headnumber {
    color: #fbbf24;
    font-size: 13px;
    font-weight: 600;
    margin-top: 2px;
}

.qa-ipb-body {
    padding: 24px 32px;
}

.qa-ipb-twocol {
    display: grid;
    grid-template-columns: 1fr 240px;
    gap: 24px;
    margin-bottom: 16px;
}

.qa-ipb-label {
    font-size: 9px;
    font-weight: 700;
    color: #94a3b8;
    letter-spacing: 0.1em;
}

.qa-ipb-prepared-name {
    font-size: 14px;
    font-weight: 700;
    color: #0f172a;
    margin-top: 4px;
}

.qa-ipb-muted {
    font-size: 11px;
    color: #475569;
}

.qa-ipb-details .qa-ipb-detail-row {
    display: flex;
    justify-content: space-between;
    padding: 2px 0;
    margin-top: 4px;
    font-size: 11px;
}

.qa-ipb-detail-row span:first-child {
    color: #475569;
}

.qa-ipb-detail-row span:last-child {
    color: #0f172a;
    font-weight: 600;
}

.qa-ipb-doctitle {
    font-size: 17px;
    font-weight: 600;
    color: #1e3a8a;
    margin: 8px 0 14px;
}

.qa-ipb-table {
    width: 100%;
    border-collapse: collapse;
}

.qa-ipb-table thead th {
    background: #1e3a8a;
    color: #ffffff;
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 0.05em;
    padding: 8px;
    text-align: left;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
}

.qa-ipb-th-img {
    width: 96px;
}

.qa-ipb-table thead th.qa-ipb-th-right {
    text-align: right;
}

.qa-ipb-table tbody td {
    padding: 10px 8px;
    vertical-align: top;
    border: none;
}

.qa-ipb-td-img {
    width: 96px;
    vertical-align: middle;
}

.qa-ipb-row-alt td {
    background: #f8fafc;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
}

.qa-ipb-td-right {
    text-align: right;
}

.qa-ipb-td-bold {
    font-weight: 700;
}

.qa-ipb-li-name {
    font-weight: 600;
    color: #0f172a;
}

.qa-ipb-li-cat {
    font-size: 8px;
    color: #94a3b8;
    margin-top: 2px;
}

.qa-ipb-li-detail {
    font-size: 9px;
    color: #475569;
    margin-top: 2px;
}

.qa-ipb-li-image {
    display: block;
    max-width: 90px;
    max-height: 90px;
    border: 1px solid #e2e8f0;
    border-radius: 4px;
    object-fit: contain;
}

.qa-ipb-totals-wrap {
    display: flex;
    justify-content: flex-end;
    margin-top: 12px;
}

.qa-ipb-totals {
    width: 280px;
    border: 1px solid #e2e8f0;
    padding: 14px;
}

.qa-ipb-total-row {
    display: flex;
    justify-content: space-between;
    padding: 3px 0;
    font-size: 11px;
}

.qa-ipb-total-row span:first-child {
    color: #475569;
}

.qa-ipb-total-row span:last-child {
    color: #0f172a;
    font-weight: 700;
}

.qa-ipb-neg {
    color: #dc2626 !important;
}

.qa-ipb-total-grand {
    border-top: 2px solid #1e3a8a;
    margin-top: 6px;
    padding-top: 8px;
}

.qa-ipb-total-grand span {
    font-size: 14px !important;
}

.qa-ipb-notes {
    margin-top: 16px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    padding: 14px;
}

.qa-ipb-notes-body {
    margin-top: 6px;
    font-size: 11px;
    color: #0f172a;
    line-height: 1.5;
}

@media print {
    body {
        background: #ffffff !important;
        margin: 0 !important;
        padding: 0 !important;
    }

    .qa-ip-toolbar { display: none !important; }
    .qa-app-shell, .qa-app-header, .qa-app-sidebar, .qa-footer, .app-footer, footer, nav, header { display: none !important; }

    .qa-ip-page {
        max-width: none;
        margin: 0;
        padding: 0;
        box-shadow: none;
    }

    .qa-ipb-page {
        max-width: none;
        margin: 0;
        box-shadow: none;
    }

    .qa-ip-page-break {
        border: none;
        color: transparent;
        padding: 0;
        height: 0;
        margin: 0;
    }

    @page { size: letter; margin: 0.5in; }
}
