/* Template 1 - Classic Executive */

.header-bar {
    width: 100%;
    height: 6px;
    background-color: var(--brand-primary, #0F4C81);
    margin-bottom: 10px;
}

.invoice-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 20px;
    margin-top: 8px;
}

.logo {
    max-width: 170px;
    max-height: 58px;
    object-fit: contain;
}

.header-right {
    text-align: right;
    width: 58%;
}

.header-date {
    font-size: 20pt;
    font-weight: 800;
    color: var(--brand-primary, #0F4C81);
    margin-bottom: 2px;
}

.header-note {
    font-size: 8.4pt;
    color: #666;
    line-height: 1.25;
}

.header-meta-row {
    font-size: 9pt;
    font-weight: 600;
    color: #0f172a;
    padding-top: 2px;
    text-transform: uppercase;
}

.meta-separator {
    margin: 0 5px;
    color: #ccc;
}

/* Info Section */
.info-total-section {
    display: flex;
    justify-content: space-between;
    margin-bottom: 20px;
    align-items: flex-start;
}

.info-col-left {
    width: 45%;
}

.company-info-block {
    border-left: 3px solid #0F4C81;
    padding-left: 12px;
    font-size: 8.5pt;
    color: #444;
    line-height: 1.38;
}

.company-name {
    font-weight: 800;
    color: #0f172a;
    text-transform: uppercase;
    margin-bottom: 3px;
}

.company-trn-line,
.customer-trn-right {
    margin-top: 3px;
    font-size: 8.2pt;
    font-weight: 600;
    color: #0F766E;
}

.info-col-right {
    width: 45%;
    text-align: left;
}

.customer-info-block-right {
    font-size: 9pt;
    color: #333;
}

.sayin-label {
    font-size: 7.2pt;
    color: #999;
    font-weight: 600;
    text-transform: uppercase;
    margin-bottom: 3px;
    letter-spacing: 1px;
}

.customer-name-right {
    font-weight: 800;
    font-size: 10pt;
    margin-bottom: 3px;
    color: #0f172a;
    text-transform: uppercase;
}

.customer-address-right {
    margin-bottom: 3px;
    color: #555;
    white-space: pre-line;
    line-height: 1.3;
}

.customer-phone-right {
    color: #555;
    font-weight: 500;
    line-height: 1.25;
}

/* Items Table */
.items-section {
    margin-bottom: 18px;
}

.table-header-row {
    display: grid;
    grid-template-columns: minmax(0, 2.8fr) minmax(0, 1.2fr) minmax(0, 0.9fr) minmax(0, 1.3fr);
    gap: 12px;
    border-bottom: 2px solid #0f172a;
    padding-bottom: 7px;
    margin-bottom: 8px;
    font-weight: 700;
    color: #0f172a;
    font-size: 8.2pt;
    text-transform: uppercase;
}

.th-desc {
    min-width: 0;
    overflow-wrap: break-word;
}

.th-price,
.th-total {
    min-width: 0;
    text-align: right;
    white-space: nowrap;
}

.th-qty {
    min-width: 0;
    text-align: center;
    white-space: nowrap;
}

.item-row-display {
    display: grid;
    grid-template-columns: minmax(0, 2.8fr) minmax(0, 1.2fr) minmax(0, 0.9fr) minmax(0, 1.3fr);
    gap: 12px;
    padding: 9px 0;
    border-bottom: 1px solid #e2e8f0;
    align-items: center;
}

.item-row-display:last-child {
    border-bottom: none;
}

.col-desc {
    min-width: 0;
    padding-left: 0;
    font-weight: 700;
    color: #334155;
    overflow-wrap: break-word;
}

.col-price {
    min-width: 0;
    text-align: right;
    color: #444;
    font-size: 9pt;
    white-space: nowrap;
}

.col-qty {
    min-width: 0;
    text-align: center;
    color: #444;
    white-space: nowrap;
}

.col-total {
    min-width: 0;
    text-align: right;
    padding-right: 0;
    font-weight: 700;
    color: #0f172a;
    white-space: nowrap;
}

/* Totals Section */
.totals-section {
    display: flex;
    justify-content: space-between;
    margin-bottom: 20px;
    align-items: flex-start;
    gap: 16px;
}

.notes-col {
    width: 55%;
    padding-right: 14px;
}

.notes-content {
    font-size: 9pt;
    color: #555;
    white-space: pre-line;
    line-height: 1.4;
}

.totals-col-right {
    width: 40%;
    border: 1px solid #d7dbe2;
    border-radius: 10px;
    overflow: hidden;
    background: #f8fafc;
}

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

.totals-table th {
    text-align: left;
    padding: 10px 14px;
    font-size: 9pt;
    color: #5b6576;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.4px;
}

.totals-table td {
    text-align: right;
    padding: 10px 14px;
    font-weight: 800;
    color: #1f2937;
    font-size: 10.5pt;
}

.totals-table tr {
    border-bottom: 1px solid #d9dde6;
    background: #f3f4f6;
}

.totals-table tr:last-child {
    border-bottom: none;
}

.totals-table .grand-total-row {
    background: #0F4C81;
}

.totals-table .grand-total-row th,
.totals-table .grand-total-row td {
    color: #ffffff;
    font-size: 12pt;
    font-weight: 800;
    padding: 13px 14px;
}

/* Footer */
.invoice-footer {
    margin-top: auto;
    border-top: 1px solid #cbd5e1;
    padding-top: 14px;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 10px;
}

.footer-logo {
    margin-right: 0;
}

.footer-logo-img {
    height: 30px;
    object-fit: contain;
}

.footer-info {
    font-size: 8.8pt;
    color: #5f6675;
    line-height: 1.3;
    text-align: left;
    flex: 1;
    min-width: 0;
    overflow-wrap: break-word;
}

.footer-info strong {
    color: #111827;
}

.text-logo {
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
    font-size: 1.45rem;
    color: #0F4C81;
    text-align: left;
    line-height: 1.2;
    margin-bottom: 6px;
}

.footer-logo .text-logo {
    font-size: 0.9rem;
    font-weight: 600;
    margin: 0;
    color: #333;
}
