.qa-ep-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-ep-toolbar-spacer { flex: 1 1 auto; }

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

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

.qa-ep-toolbar-btn--primary {
    background: #2563eb;
    color: #ffffff;
    border-color: #2563eb;
}

.qa-ep-toolbar-btn--primary:hover {
    background: #1d4ed8;
}

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

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

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

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

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

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

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

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

.qa-ep-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-ep-export-item {
    text-align: left;
    padding: 8px 12px;
    border: none;
    background: transparent;
    border-radius: 6px;
    font-size: 13px;
    color: #0f172a;
    cursor: pointer;
}

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

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

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

.qa-ep-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-ep-header {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    align-items: start;
    margin-bottom: 24px;
}

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

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

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

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

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

.qa-ep-meta-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    border: 1px solid #d1d5db;
}

.qa-ep-meta-label {
    background: #e5e7eb;
    padding: 6px 10px;
    font-weight: 700;
    font-size: 11px;
    text-align: center;
    border-bottom: 1px solid #d1d5db;
}

.qa-ep-meta-value {
    padding: 6px 10px;
    text-align: center;
    border-bottom: 1px solid #d1d5db;
    background: #ffffff;
}

.qa-ep-meta-grid > .qa-ep-meta-label:last-of-type,
.qa-ep-meta-grid > .qa-ep-meta-value:last-of-type { border-bottom: none; }

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

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

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

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

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

.qa-ep-description {
    display: grid;
    grid-template-columns: 160px 1fr;
    border: 1px solid #d1d5db;
    margin-bottom: 16px;
}

.qa-ep-description-label {
    background: #e5e7eb;
    padding: 8px 10px;
    font-weight: 700;
    font-size: 11px;
    text-align: center;
}

.qa-ep-description-body {
    padding: 8px 10px;
    background: #ffffff;
}

.qa-ep-lines {
    margin-bottom: 16px;
}

.qa-ep-lines-title {
    text-align: center;
    font-weight: 700;
    font-size: 16px;
    margin-bottom: 6px;
}

.qa-ep-lines-table {
    width: 100%;
    border-collapse: collapse;
    border-bottom: 2px solid #0f172a;
}

.qa-ep-lines-table thead th {
    border-bottom: 2px solid #0f172a;
    padding: 6px 8px;
    text-align: left;
    font-size: 12px;
    font-weight: 700;
}

.qa-ep-lines-table tbody td {
    padding: 6px 8px;
    border-bottom: 1px solid #e5e7eb;
}

.qa-ep-lines-col-qty,
.qa-ep-lines-col-rate,
.qa-ep-lines-col-total {
    text-align: right;
    white-space: nowrap;
}

.qa-ep-lines-table thead .qa-ep-lines-col-qty,
.qa-ep-lines-table thead .qa-ep-lines-col-rate,
.qa-ep-lines-table thead .qa-ep-lines-col-total {
    text-align: right;
}

.qa-ep-lines-empty {
    text-align: center;
    color: #94a3b8;
    padding: 12px;
}

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

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

.qa-ep-total-block {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 4px;
}

.qa-ep-total-label {
    font-weight: 700;
    font-size: 14px;
}

.qa-ep-total-value {
    font-weight: 700;
    font-size: 14px;
}

.qa-ep-signature-row {
    margin-bottom: 12px;
}

.qa-ep-signature {
    border: 1px solid #d1d5db;
}

.qa-ep-signature-body {
    min-height: 110px;
    padding: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.qa-ep-signature-img {
    max-height: 90px;
    max-width: 100%;
}

.qa-ep-signed-by {
    display: flex;
    align-items: end;
    gap: 8px;
    margin-bottom: 24px;
}

.qa-ep-signed-by-label {
    font-weight: 700;
    font-size: 12px;
}

.qa-ep-signed-by-line {
    flex: 1 1 auto;
    border-bottom: 1px solid #94a3b8;
    min-height: 1.5em;
    padding-bottom: 2px;
}

.qa-ep-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-ep-terms {
    font-size: 12px;
    line-height: 1.5;
}

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

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

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

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

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

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

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

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

.qa-ep-lines-col-img {
    width: 96px;
    vertical-align: top;
    padding: 6px 8px;
}

.qa-ep-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-ep-line-detail {
    font-size: 12px;
    color: #4b5563;
    line-height: 1.45;
}

.qa-epb-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-epb-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-epb-brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

.qa-epb-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-epb-th-img {
    width: 96px;
}

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

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

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

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

.qa-epb-td-num {
    color: #475569;
}

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

.qa-epb-signature {
    margin-top: 16px;
    background: #f0fdf4;
    border: 1px solid #a7f3d0;
    padding: 16px;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
}

.qa-epb-signature-img {
    display: block;
    max-height: 80px;
    margin-top: 8px;
}

.qa-epb-sign-by {
    font-size: 12px;
    font-weight: 700;
    margin-top: 4px;
}

.qa-epb-terms {
    margin-top: 16px;
}

.qa-epb-terms-body {
    margin-top: 6px;
    font-size: 9px;
    color: #475569;
    line-height: 1.5;
}

@media print {
    .qa-epb-page {
        max-width: none;
        margin: 0;
        box-shadow: none;
    }
}
