/* Shared document look for on-page preview and mPDF. Keep selectors simple
   — mPDF does not handle nested flex the way a browser does. */

.dwd-doc {
    font-family: DejaVu Sans, Arial, Helvetica, sans-serif;
    font-size: 10.5px;
    color: #1a2332;
    line-height: 1.45;
    padding: 8px 6px 8px;
}

.dwd-doc h1 {
    font-size: 18px;
    margin: 4px 0 12px;
    color: #0a4064;
    letter-spacing: 0.4px;
    text-transform: uppercase;
}

.dwd-doc h2 {
    font-size: 12px;
    margin: 16px 0 8px;
    color: #0a4064;
    text-transform: uppercase;
    letter-spacing: 0.4px;
}

.dwd-sec-label {
    font-size: 8px;
    font-weight: 700;
    letter-spacing: 0.9px;
    text-transform: uppercase;
    color: #6b7280;
    margin-bottom: 4px;
}

/* ---- Letterhead (quotation) ---- */
.dwd-letterhead {
    width: 100%;
    border-collapse: collapse;
    margin: 0 0 6px;
}

.dwd-lh-logo {
    width: 118px;
    vertical-align: middle;
    padding: 0 14px 8px 0;
}

.dwd-lh-logo img {
    max-width: 110px;
    max-height: 58px;
    width: auto;
    height: auto;
}

.dwd-lh-company {
    vertical-align: top;
    padding: 0 10px 8px 0;
}

.dwd-lh-name {
    font-size: 16px;
    font-weight: 700;
    color: #0a4064;
    letter-spacing: -0.2px;
    margin-bottom: 3px;
    line-height: 1.2;
}

.dwd-lh-line {
    font-size: 9.5px;
    color: #374151;
    line-height: 1.45;
}

.dwd-lh-title {
    width: 168px;
    vertical-align: top;
    text-align: right;
    padding: 0 0 8px 8px;
}

.dwd-lh-doctype {
    font-size: 15px;
    font-weight: 700;
    letter-spacing: 1.6px;
    text-transform: uppercase;
    color: #0a4064;
    margin-bottom: 8px;
}

.dwd-lh-ids {
    width: 100%;
    border-collapse: collapse;
    font-size: 9.5px;
}

.dwd-lh-ids td {
    padding: 2px 0;
    color: #374151;
}

.dwd-lh-ids td:first-child {
    color: #6b7280;
    text-align: left;
    padding-right: 8px;
    white-space: nowrap;
}

.dwd-lh-ids td:last-child {
    text-align: right;
    font-weight: 700;
    color: #0f1e2c;
}

.dwd-lh-rule {
    height: 3px;
    background: #0a4064;
    border-bottom: 2px solid #f6c733;
    margin: 0 0 12px;
}

.dwd-party-table {
    width: 100%;
    border-collapse: collapse;
    margin: 0 0 10px;
}

.dwd-party-box {
    width: 50%;
    vertical-align: top;
    padding: 8px 12px;
    border: 1px solid #e5e7eb;
    background: #f8fafc;
}

.dwd-party-box + .dwd-party-box {
    border-left: 0;
}

.dwd-party-name {
    font-size: 11.5px;
    font-weight: 700;
    color: #0f1e2c;
    margin-bottom: 3px;
}

.dwd-subject {
    font-size: 10.5px;
    margin: 0 0 6px;
    padding: 6px 0;
    border-bottom: 1px solid #eef0f2;
    color: #1a2332;
}

.dwd-subject span {
    font-size: 8px;
    font-weight: 700;
    letter-spacing: 0.8px;
    text-transform: uppercase;
    color: #6b7280;
    margin-right: 8px;
}

.dwd-tax-note {
    font-size: 9px;
    color: #4b5563;
    margin: 0 0 8px;
}

.dwd-quote-table {
    font-size: 9px;
}

.dwd-quote-table th {
    font-size: 8px;
    letter-spacing: 0.3px;
    text-transform: uppercase;
}

.dwd-doc-table tbody tr:nth-child(even) td {
    background: #f7f9fb;
}

.dwd-after-items {
    width: 100%;
    border-collapse: collapse;
    margin: 4px 0 8px;
}

.dwd-after-left {
    width: 56%;
    vertical-align: top;
    padding-right: 16px;
}

.dwd-after-right {
    width: 44%;
    vertical-align: top;
}

.dwd-words-box {
    border: 1px solid #e5e7eb;
    background: #f8fafc;
    padding: 8px 10px;
    font-size: 10px;
    margin-bottom: 10px;
}

.dwd-bank {
    font-size: 9.5px;
    color: #374151;
    line-height: 1.5;
}

.dwd-totals-box {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 14px;
}

.dwd-totals-box td {
    padding: 5px 8px;
    font-size: 10.5px;
    border-bottom: 1px solid #eef0f2;
}

.dwd-totals-box td + td {
    text-align: right;
    font-weight: 600;
    white-space: nowrap;
}

.dwd-totals-box .grand td {
    background: #0a4064;
    color: #fff;
    font-weight: 700;
    font-size: 12px;
    border: 0;
    padding: 8px;
}

.dwd-sign-box {
    text-align: right;
    font-size: 10.5px;
    margin-top: 8px;
}

.dwd-sign-space {
    height: 48px;
}

.dwd-sign-line {
    border-top: 1px solid #9ca3af;
    display: inline-block;
    padding-top: 4px;
    min-width: 160px;
    color: #4b5563;
}

.dwd-doc-terms ol {
    margin: 4px 0 0;
    padding-left: 16px;
    font-size: 9.5px;
    color: #374151;
}

.dwd-doc-terms li {
    margin-bottom: 3px;
}

.dwd-declare {
    margin-top: 12px;
    font-size: 8.5px;
    color: #6b7280;
    font-style: italic;
}

.dwd-doc-foot {
    margin-top: 16px;
    padding-top: 6px;
    border-top: 0.5px solid #e5e7eb;
    font-size: 8px;
    color: #9ca3af;
    text-align: center;
    letter-spacing: 0.2px;
}

.dwd-doc-brand {
    border-bottom: 3px solid #f6c733;
    padding-bottom: 8px;
    margin-bottom: 10px;
    color: #0a4064;
    font-size: 13px;
    font-weight: 700;
    overflow: hidden;
}

.dwd-doc-brand-sub {
    float: right;
    color: #6b7280;
    font-weight: 500;
    font-size: 10px;
}

.dwd-doc-kicker {
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 0.6px;
    text-transform: uppercase;
    color: #6b7280;
    margin-bottom: 3px;
}

.dwd-doc-meta {
    width: 100%;
    border-collapse: collapse;
    margin: 0 0 12px;
    background: #f4f7fa;
}

.dwd-doc-meta td {
    padding: 8px 10px;
    vertical-align: top;
    width: 25%;
}

.dwd-doc-meta.tight td {
    width: 33%;
}

.dwd-doc-meta span {
    display: block;
    font-size: 9px;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    color: #6b7280;
}

.dwd-doc-meta strong {
    font-size: 11px;
    color: #0f1e2c;
}

.dwd-doc-parties {
    width: 100%;
    margin: 0 0 12px;
}

.dwd-doc-party {
    display: inline-block;
    vertical-align: top;
    width: 32%;
    padding-right: 2%;
    font-size: 10.5px;
}

.dwd-doc-party strong {
    display: block;
    margin-bottom: 3px;
    color: #0f1e2c;
}

.dwd-doc-table {
    width: 100%;
    border-collapse: collapse;
    margin: 0 0 12px;
    font-size: 10px;
}

.dwd-doc-table th {
    background: #0a4064;
    color: #fff;
    font-weight: 600;
    text-align: left;
    padding: 6px 5px;
}

.dwd-doc-table td {
    border-bottom: 1px solid #e5e7eb;
    padding: 6px 5px;
    vertical-align: top;
}

.dwd-doc-table .num {
    text-align: right;
    white-space: nowrap;
}

.dwd-doc-table .muted,
.muted {
    color: #6b7280;
    font-style: italic;
}

.dwd-doc-bottom {
    margin-top: 8px;
}

.dwd-doc-words {
    font-size: 10.5px;
    margin: 0 0 10px;
}

.dwd-doc-totals {
    width: 240px;
    margin-left: auto;
}

.dwd-doc-totals table {
    width: 100%;
    border-collapse: collapse;
}

.dwd-doc-totals td {
    padding: 4px 0;
    font-size: 11px;
}

.dwd-doc-totals td + td {
    text-align: right;
}

.dwd-doc-totals .grand td {
    font-weight: 700;
    font-size: 12px;
    border-top: 2px solid #0a4064;
    padding-top: 8px;
    color: #0a4064;
}

.dwd-doc-terms {
    margin-top: 14px;
    font-size: 10.5px;
}

.dwd-doc-sign {
    margin-top: 28px;
    font-size: 11px;
}

.dwd-doc-block {
    margin: 0 0 10px;
    padding: 8px 10px;
    background: #f8fafc;
    border-left: 3px solid #f6c733;
}

.dwd-doc-signoff {
    margin-top: 28px;
}

.dwd-job-strip {
    width: 100%;
    border-collapse: collapse;
    margin: 0 0 12px;
    background: #f4f7fa;
}

.dwd-job-strip td {
    padding: 8px 10px;
    vertical-align: top;
    width: 25%;
    border-right: 1px solid #e8edf2;
}

.dwd-job-strip td:last-child {
    border-right: 0;
}

.dwd-job-strip span {
    display: block;
    font-size: 8px;
    font-weight: 700;
    letter-spacing: 0.7px;
    text-transform: uppercase;
    color: #6b7280;
    margin-bottom: 2px;
}

.dwd-job-strip strong {
    font-size: 11px;
    color: #0f1e2c;
}

.dwd-findings {
    width: 100%;
    border-collapse: collapse;
    margin: 0 0 14px;
    border: 1px solid #e5e7eb;
}

.dwd-findings th {
    width: 22%;
    text-align: left;
    vertical-align: top;
    padding: 8px 10px;
    background: #f8fafc;
    font-size: 8.5px;
    font-weight: 700;
    letter-spacing: 0.6px;
    text-transform: uppercase;
    color: #6b7280;
    border-bottom: 1px solid #eef0f2;
}

.dwd-findings td {
    padding: 8px 10px;
    font-size: 10.5px;
    color: #1a2332;
    border-bottom: 1px solid #eef0f2;
    vertical-align: top;
}

.dwd-findings tr:last-child th,
.dwd-findings tr:last-child td {
    border-bottom: 0;
}

.dwd-before-after {
    width: 100%;
    border-collapse: collapse;
    margin: 0 0 14px;
}

.dwd-ba-col {
    width: 50%;
    vertical-align: top;
    padding: 8px 10px;
    border: 1px solid #e5e7eb;
    background: #fafbfc;
}

.dwd-ba-col + .dwd-ba-col {
    border-left: 0;
}

.dwd-photo-table {
    width: 100%;
    border-collapse: collapse;
}

.dwd-photo-cell {
    width: 50%;
    vertical-align: top;
    padding: 4px;
}

.dwd-photo-frame {
    border: 1px solid #e5e7eb;
    background: #fff;
    text-align: center;
    padding: 3px;
}

.dwd-photo-frame img {
    max-width: 100%;
    max-height: 118px;
    width: auto;
    height: auto;
}

.dwd-photo-cap {
    font-size: 8px;
    color: #6b7280;
    text-align: center;
    margin-top: 3px;
    letter-spacing: 0.3px;
    text-transform: uppercase;
}

.dwd-photo-empty {
    font-size: 9.5px;
    color: #9ca3af;
    font-style: italic;
    padding: 18px 8px;
    text-align: center;
}

.dwd-signoff-table {
    margin-top: 4px;
}

.dwd-signoff-table .dwd-sign-line {
    min-width: 140px;
}

.dwd-doc-foot {
    margin-top: 16px;
    padding-top: 6px;
    border-top: 0.5px solid #e5e7eb;
    font-size: 8px;
    color: #9ca3af;
    text-align: center;
    letter-spacing: 0.2px;
}
