/* ============================================================
   SHARED PDF PREVIEW AREA
   ============================================================ */
#pdfContentArea {
    font-family: 'Inter', 'Segoe UI', Arial, sans-serif;
    max-width: 840px;
    width: 100%;
    margin: 0 auto;
    transition: all 0.3s ease;
}

/* ============================================================
   TEMPLATE 1 — CLASSIC ELEGANCE (Teal → Indigo)
   ============================================================ */
.tpl-classic {
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.1), 0 4px 12px rgba(0, 0, 0, 0.04);
    overflow: hidden;
}

.tpl-classic .pdf-banner {
    background: linear-gradient(135deg, #0d9488 0%, #0891b2 55%, #6366f1 100%);
    padding: 2.5rem 3rem;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1.5rem;
    position: relative;
    overflow: hidden;
}

.tpl-classic .pdf-banner::before {
    content: '';
    position: absolute;
    width: 240px;
    height: 240px;
    border-radius: 50%;
    border: 44px solid rgba(255, 255, 255, 0.07);
    top: -90px;
    right: -60px;
}

.tpl-classic .pdf-logo {
    max-height: 52px;
    max-width: 140px;
    object-fit: contain;
    margin-bottom: 12px;
    display: block;
    filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.25));
}

.tpl-classic .pdf-company-block {
    color: #fff;
}

.tpl-classic .pdf-company-name {
    font-size: 2rem;
    font-weight: 900;
    margin: 0 0 4px;
    letter-spacing: -0.03em;
}

.tpl-classic .pdf-company-meta {
    font-size: 0.85rem;
    opacity: 1;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.95);
}

.tpl-classic .pdf-date-pill {
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.25);
    color: #fff;
    padding: 1rem 1.5rem;
    border-radius: 14px;
    text-align: center;
    backdrop-filter: blur(10px);
    flex-shrink: 0;
    min-width: 130px;
}

.tpl-classic .pdf-date-label {
    font-size: 0.6rem;
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 0.12em;
    opacity: 0.7;
    display: block;
}

.tpl-classic .pdf-date-value {
    font-size: 1rem;
    font-weight: 800;
    display: block;
    margin-top: 4px;
}

/* Summary strip */
.tpl-classic .pdf-summary {
    display: flex;
    background: #f0fdfa;
    border-bottom: 1px solid #e5e7eb;
}

.tpl-classic .pdf-sum-item {
    flex: 1;
    padding: 14px 20px;
    text-align: center;
    border-right: 1px solid #e5e7eb;
}

.tpl-classic .pdf-sum-item:last-child {
    border-right: none;
    background: #0d9488;
}

.tpl-classic .pdf-sum-lbl {
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #6b7280;
    font-weight: 700;
    display: block;
    margin-bottom: 3px;
}

.tpl-classic .pdf-sum-item:last-child .pdf-sum-lbl {
    color: rgba(255, 255, 255, 0.6);
}

.tpl-classic .pdf-sum-val {
    font-size: 1.2rem;
    font-weight: 900;
    color: #111;
}

.tpl-classic .pdf-sum-item:last-child .pdf-sum-val {
    color: #fff;
}

/* Body */
.tpl-classic .pdf-body {
    padding: 2.5rem 3rem;
}

.tpl-classic .pdf-list-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 1.25rem;
}

.tpl-classic .pdf-list-title {
    font-size: 1.15rem;
    font-weight: 800;
    color: #111827;
    margin: 0 0 4px;
    letter-spacing: -0.02em;
}

.tpl-classic .pdf-client-for {
    font-size: 0.88rem;
    color: #6b7280;
}

.tpl-classic .pdf-client-for strong {
    color: #0d9488;
    font-weight: 700;
}

.tpl-classic .pdf-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    overflow: hidden;
}

.tpl-classic .pdf-table thead th {
    padding: 12px 16px;
    font-size: 0.75rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #0f766e;
    background: #f0fdfa;
    border-bottom: 2px solid #ccfbf1;
}

.tpl-classic .pdf-table tbody tr:nth-child(even) {
    background: #f9fafb;
}

.tpl-classic .pdf-table tbody td {
    padding: 14px 16px;
    border-bottom: 1px solid #f3f4f6;
    vertical-align: middle;
}

.tpl-classic .pdf-table tbody tr:last-child td {
    border-bottom: none;
}

.tpl-classic .pdf-prod-name {
    font-weight: 700;
    font-size: 0.95rem;
    color: #1f2937;
    margin-bottom: 3px;
}

.tpl-classic .pdf-prod-detail {
    font-size: 0.8rem;
    color: #9ca3af;
}

.tpl-classic .pdf-price {
    font-size: 1.1rem;
    font-weight: 900;
    color: #0d9488;
    text-align: right;
}

.tpl-classic .pdf-sr {
    font-size: 0.85rem;
    color: #d1d5db;
    text-align: center;
    font-weight: 700;
}

.tpl-classic .pdf-footer {
    margin-top: 2rem;
    padding-top: 1.25rem;
    border-top: 1px dashed #e5e7eb;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.tpl-classic .pdf-footer-note {
    font-size: 0.75rem;
    color: #9ca3af;
}

.tpl-classic .pdf-footer-brand {
    font-size: 0.72rem;
    color: #d1d5db;
    font-weight: 600;
}

/* ============================================================
   TEMPLATE 2 — DARK EXECUTIVE (Centered Layout, Gold Accent)
   Unique: Centered banner, decorative circles, inline date, 
   card-style rows with left accent borders
   ============================================================ */
.tpl-dark {
    background: #0f172a;
    border-radius: 16px;
    box-shadow: 0 28px 72px rgba(0, 0, 0, 0.5), 0 4px 16px rgba(0, 0, 0, 0.3);
    overflow: hidden;
    color: #f1f5f9;
}

.tpl-dark .pdf-banner {
    background: linear-gradient(180deg, #0f172a 0%, #1e293b 100%);
    padding: 3rem 3rem 2.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    position: relative;
    overflow: hidden;
    border-bottom: 1px solid #1e293b;
}

.tpl-dark .pdf-dark-deco-circle {
    position: absolute;
    width: 300px;
    height: 300px;
    border-radius: 50%;
    border: 40px solid rgba(129, 140, 248, 0.06);
    top: -120px;
    right: -60px;
    pointer-events: none;
}

.tpl-dark .pdf-dark-deco-circle2 {
    position: absolute;
    width: 200px;
    height: 200px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(234, 179, 8, 0.08) 0%, transparent 70%);
    bottom: -80px;
    left: -40px;
    pointer-events: none;
}

.tpl-dark .pdf-company-block {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.tpl-dark .pdf-logo {
    max-height: 56px;
    max-width: 140px;
    object-fit: contain;
    margin-bottom: 14px;
    display: block;
    filter: drop-shadow(0 2px 12px rgba(0, 0, 0, 0.5));
}

.tpl-dark .pdf-company-name {
    font-size: 2.2rem;
    font-weight: 900;
    color: #fff;
    margin: 0 0 10px;
    letter-spacing: -0.03em;
}

.tpl-dark .pdf-accent-bar {
    width: 80px;
    height: 4px;
    background: linear-gradient(90deg, #eab308, #f59e0b, #eab308);
    border-radius: 2px;
    margin: 0 auto 14px;
}

.tpl-dark .pdf-company-meta {
    font-size: 0.82rem;
    color: #94a3b8;
    line-height: 1.6;
    text-align: center;
}

.tpl-dark .pdf-meta-row {
    color: #94a3b8;
    justify-content: center;
}

.tpl-dark .pdf-dark-date {
    margin-top: 14px;
    font-size: 0.75rem;
    font-weight: 700;
    color: #475569;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    background: rgba(255, 255, 255, 0.04);
    padding: 6px 18px;
    border-radius: 20px;
    border: 1px solid #1e293b;
}

/* Summary */
.tpl-dark .pdf-summary {
    display: flex;
    background: #1e293b;
    border-bottom: 1px solid #334155;
}

.tpl-dark .pdf-sum-item {
    flex: 1;
    padding: 14px 20px;
    text-align: center;
    border-right: 1px solid #334155;
}

.tpl-dark .pdf-sum-item:last-child {
    border-right: none;
    background: linear-gradient(135deg, #eab308, #d97706);
}

.tpl-dark .pdf-sum-lbl {
    font-size: 0.62rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #475569;
    font-weight: 700;
    display: block;
    margin-bottom: 3px;
}

.tpl-dark .pdf-sum-item:last-child .pdf-sum-lbl {
    color: rgba(255, 255, 255, 0.6);
}

.tpl-dark .pdf-sum-val {
    font-size: 1.15rem;
    font-weight: 900;
    color: #f1f5f9;
}

.tpl-dark .pdf-sum-item:last-child .pdf-sum-val {
    color: #fff;
}

/* Body */
.tpl-dark .pdf-body {
    padding: 2.5rem 3rem;
}

.tpl-dark .pdf-list-header {
    text-align: center;
    margin-bottom: 1.5rem;
}

.tpl-dark .pdf-list-title {
    font-size: 1.1rem;
    font-weight: 800;
    color: #f1f5f9;
    margin: 0 0 4px;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.tpl-dark .pdf-client-for {
    font-size: 0.85rem;
    color: #64748b;
}

.tpl-dark .pdf-client-for strong {
    color: #eab308;
    font-weight: 700;
}

/* Table — card-style rows with left gold accent */
.tpl-dark .pdf-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0 6px;
}

.tpl-dark .pdf-table thead th {
    padding: 10px 16px;
    font-size: 0.7rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #475569;
    background: transparent;
    border-bottom: 1px solid #1e293b;
}

.tpl-dark .pdf-table tbody tr {
    background: #1e293b;
    border-radius: 8px;
}

.tpl-dark .pdf-table tbody tr td:first-child {
    border-left: 3px solid #eab308;
    border-radius: 8px 0 0 8px;
}

.tpl-dark .pdf-table tbody tr td:last-child {
    border-radius: 0 8px 8px 0;
}

.tpl-dark .pdf-table tbody tr:nth-child(even) {
    background: #162033;
}

.tpl-dark .pdf-table tbody td {
    padding: 14px 16px;
    border-bottom: none;
    vertical-align: middle;
}

.tpl-dark .pdf-prod-name {
    font-weight: 700;
    font-size: 0.92rem;
    color: #f1f5f9;
    margin-bottom: 2px;
}

.tpl-dark .pdf-prod-detail {
    font-size: 0.78rem;
    color: #475569;
}

.tpl-dark .pdf-price {
    font-size: 1.05rem;
    font-weight: 900;
    color: #eab308;
    text-align: right;
}

.tpl-dark .pdf-sr {
    font-size: 0.82rem;
    color: #334155;
    text-align: center;
    font-weight: 700;
}

.tpl-dark .pdf-footer {
    margin-top: 2rem;
    padding-top: 1.25rem;
    border-top: 1px solid #1e293b;
    text-align: center;
}

.tpl-dark .pdf-footer-note {
    font-size: 0.72rem;
    color: #334155;
}

.tpl-dark .pdf-footer-brand {
    font-size: 0.68rem;
    color: #1e293b;
    font-weight: 700;
    margin-top: 6px;
}

/* ============================================================
   TEMPLATE 3 — MINIMAL (Clean Typography, No Banner BG)
   Unique: No colored banner, oversized company name,
   hairline divider, inline meta, open table design
   ============================================================ */
.tpl-minimal {
    background: #fff;
    border-radius: 0;
    box-shadow: none;
    overflow: hidden;
    border: 1px solid #e5e5e5;
}

/* Minimal uses custom header — NO pdf-banner */
.tpl-minimal .pdf-minimal-header {
    padding: 3rem 3rem 1.5rem;
}

.tpl-minimal .pdf-logo {
    max-height: 40px;
    max-width: 100px;
    object-fit: contain;
    margin-bottom: 12px;
    display: block;
    filter: grayscale(100%) contrast(1.2);
}

.tpl-minimal .pdf-company-name {
    font-size: 2.8rem;
    font-weight: 900;
    color: #111;
    margin: 0;
    letter-spacing: -0.04em;
    line-height: 1.1;
}

.tpl-minimal .pdf-minimal-divider {
    width: 100%;
    height: 1px;
    background: #222;
    margin: 1.25rem 0;
}

.tpl-minimal .pdf-minimal-info-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0;
    font-size: 0.78rem;
    color: #888;
    line-height: 1.5;
}

.tpl-minimal .pdf-minimal-info-item {
    padding-right: 1rem;
    margin-right: 1rem;
    border-right: 1px solid #ddd;
    white-space: nowrap;
}

.tpl-minimal .pdf-minimal-info-item:last-child {
    border-right: none;
    padding-right: 0;
    margin-right: 0;
}

/* Body */
.tpl-minimal .pdf-body {
    padding: 0 3rem 3rem;
}

.tpl-minimal .pdf-list-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 1.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid #eee;
}

.tpl-minimal .pdf-list-title {
    font-size: 0.72rem;
    font-weight: 800;
    color: #111;
    margin: 0 0 4px;
    letter-spacing: 0.15em;
    text-transform: uppercase;
}

.tpl-minimal .pdf-client-for {
    font-size: 0.88rem;
    color: #888;
}

.tpl-minimal .pdf-client-for strong {
    color: #111;
    font-weight: 700;
}

.tpl-minimal .pdf-minimal-date-block {
    text-align: right;
    flex-shrink: 0;
}

.tpl-minimal .pdf-minimal-date {
    font-size: 0.82rem;
    font-weight: 700;
    color: #333;
    display: block;
}

.tpl-minimal .pdf-minimal-valid {
    font-size: 0.7rem;
    color: #999;
    display: block;
    margin-top: 2px;
}

/* Table — open design, only horizontal hairlines */
.tpl-minimal .pdf-table {
    width: 100%;
    border-collapse: collapse;
}

.tpl-minimal .pdf-table thead th {
    padding: 8px 12px 10px;
    font-size: 0.65rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: #888;
    background: transparent;
    border-bottom: 2px solid #111;
}

.tpl-minimal .pdf-table tbody tr:nth-child(even) {
    background: transparent;
}

.tpl-minimal .pdf-table tbody td {
    padding: 14px 12px;
    border-bottom: 1px solid #f0f0f0;
    vertical-align: middle;
}

.tpl-minimal .pdf-table tbody tr:last-child td {
    border-bottom: 2px solid #111;
}

.tpl-minimal .pdf-prod-name {
    font-weight: 600;
    font-size: 0.92rem;
    color: #111;
    margin-bottom: 2px;
}

.tpl-minimal .pdf-prod-detail {
    font-size: 0.78rem;
    color: #aaa;
}

.tpl-minimal .pdf-price {
    font-size: 1rem;
    font-weight: 800;
    color: #111;
    text-align: right;
    font-variant-numeric: tabular-nums;
}

.tpl-minimal .pdf-sr {
    font-size: 0.78rem;
    color: #ccc;
    text-align: center;
    font-weight: 600;
}

.tpl-minimal .pdf-footer {
    margin-top: 2.5rem;
    padding-top: 1rem;
    border-top: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.tpl-minimal .pdf-footer-note {
    font-size: 0.72rem;
    color: #bbb;
}

.tpl-minimal .pdf-footer-brand {
    font-size: 0.68rem;
    color: #ddd;
    font-weight: 600;
}

/* ============================================================
   TEMPLATE 4 — VIBRANT (Split Layout: Sidebar + Content)
   Unique: Left gradient sidebar with company initial monogram,
   right side has products. Completely different 2-column layout.
   ============================================================ */
.tpl-vibrant {
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 24px 64px rgba(109, 40, 217, 0.12), 0 4px 12px rgba(0, 0, 0, 0.04);
    overflow: hidden;
}

/* 2-column grid layout */
.tpl-vibrant .pdf-vibrant-layout {
    display: grid;
    grid-template-columns: 220px 1fr;
    min-height: 600px;
}

/* Left Sidebar */
.tpl-vibrant .pdf-vibrant-sidebar {
    background: linear-gradient(180deg, #4c1d95 0%, #6d28d9 40%, #7c3aed 100%);
    padding: 2.5rem 1.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    color: #fff;
    position: relative;
    overflow: hidden;
}

.tpl-vibrant .pdf-vibrant-sidebar::before {
    content: '';
    position: absolute;
    width: 200px;
    height: 200px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
    top: -60px;
    left: -60px;
}

.tpl-vibrant .pdf-vibrant-sidebar::after {
    content: '';
    position: absolute;
    width: 150px;
    height: 150px;
    border-radius: 50%;
    border: 30px solid rgba(255, 255, 255, 0.04);
    bottom: -40px;
    right: -40px;
}

.tpl-vibrant .pdf-vibrant-initial {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.15);
    border: 2px solid rgba(255, 255, 255, 0.25);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.2rem;
    font-weight: 900;
    color: #fff;
    margin-bottom: 1rem;
    backdrop-filter: blur(8px);
    position: relative;
    z-index: 1;
}

.tpl-vibrant .pdf-logo {
    max-height: 40px;
    max-width: 100px;
    object-fit: contain;
    margin-bottom: 10px;
    display: block;
    filter: brightness(0) invert(1) drop-shadow(0 2px 6px rgba(0, 0, 0, 0.3));
    position: relative;
    z-index: 1;
}

.tpl-vibrant .pdf-vibrant-sidebar-name {
    font-size: 1rem;
    font-weight: 800;
    color: #fff;
    line-height: 1.3;
    margin-bottom: 0.75rem;
    position: relative;
    z-index: 1;
}

.tpl-vibrant .pdf-vibrant-sidebar-divider {
    width: 40px;
    height: 2px;
    background: rgba(255, 255, 255, 0.3);
    margin: 0 auto 1rem;
    position: relative;
    z-index: 1;
}

.tpl-vibrant .pdf-vibrant-sidebar-meta {
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.6;
    text-align: left;
    width: 100%;
    position: relative;
    z-index: 1;
}

.tpl-vibrant .pdf-vibrant-meta-item {
    margin-bottom: 6px;
    word-break: break-word;
}

.tpl-vibrant .pdf-vibrant-sidebar-date {
    margin-top: auto;
    padding-top: 1.5rem;
    font-size: 0.72rem;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.5);
    position: relative;
    z-index: 1;
}

.tpl-vibrant .pdf-vibrant-sidebar-date small {
    display: block;
    margin-top: 2px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.4);
}

/* Right Main Content */
.tpl-vibrant .pdf-vibrant-main {
    display: flex;
    flex-direction: column;
}

/* Summary */
.tpl-vibrant .pdf-summary {
    display: flex;
    background: #f5f3ff;
    border-bottom: 1px solid #ede9fe;
}

.tpl-vibrant .pdf-sum-item {
    flex: 1;
    padding: 14px 18px;
    text-align: center;
    border-right: 1px solid #ede9fe;
}

.tpl-vibrant .pdf-sum-item:last-child {
    border-right: none;
    background: linear-gradient(135deg, #7c3aed, #6d28d9);
}

.tpl-vibrant .pdf-sum-lbl {
    font-size: 0.6rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #7c3aed;
    font-weight: 700;
    display: block;
    margin-bottom: 3px;
}

.tpl-vibrant .pdf-sum-item:last-child .pdf-sum-lbl {
    color: rgba(255, 255, 255, 0.6);
}

.tpl-vibrant .pdf-sum-val {
    font-size: 1.1rem;
    font-weight: 900;
    color: #111;
}

.tpl-vibrant .pdf-sum-item:last-child .pdf-sum-val {
    color: #fff;
}

/* Body */
.tpl-vibrant .pdf-body {
    padding: 2rem 2.5rem;
    flex: 1;
}

.tpl-vibrant .pdf-list-header {
    margin-bottom: 1.25rem;
}

.tpl-vibrant .pdf-list-title {
    font-size: 1.1rem;
    font-weight: 800;
    color: #4c1d95;
    margin: 0 0 4px;
    letter-spacing: -0.02em;
}

.tpl-vibrant .pdf-client-for {
    font-size: 0.85rem;
    color: #9ca3af;
}

.tpl-vibrant .pdf-client-for strong {
    color: #7c3aed;
    font-weight: 700;
}

/* Table — rows with left purple accent border */
.tpl-vibrant .pdf-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0 4px;
}

.tpl-vibrant .pdf-table thead th {
    padding: 10px 14px;
    font-size: 0.68rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #7c3aed;
    background: transparent;
    border-bottom: 2px solid #ede9fe;
}

.tpl-vibrant .pdf-table tbody tr {
    background: #faf8ff;
    border-radius: 8px;
}

.tpl-vibrant .pdf-table tbody tr td:first-child {
    border-left: 3px solid #7c3aed;
    border-radius: 8px 0 0 8px;
}

.tpl-vibrant .pdf-table tbody tr td:last-child {
    border-radius: 0 8px 8px 0;
}

.tpl-vibrant .pdf-table tbody tr:nth-child(even) {
    background: #f5f3ff;
}

.tpl-vibrant .pdf-table tbody td {
    padding: 12px 14px;
    border-bottom: none;
    vertical-align: middle;
}

.tpl-vibrant .pdf-prod-name {
    font-weight: 700;
    font-size: 0.9rem;
    color: #1f2937;
    margin-bottom: 2px;
}

.tpl-vibrant .pdf-prod-detail {
    font-size: 0.78rem;
    color: #9ca3af;
}

.tpl-vibrant .pdf-price {
    font-size: 1.05rem;
    font-weight: 900;
    color: #6d28d9;
    text-align: right;
}

.tpl-vibrant .pdf-sr {
    font-size: 0.8rem;
    color: #d8b4fe;
    text-align: center;
    font-weight: 700;
}

.tpl-vibrant .pdf-footer {
    margin-top: 2rem;
    padding-top: 1rem;
    border-top: 1px dashed #ede9fe;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.tpl-vibrant .pdf-footer-note {
    font-size: 0.72rem;
    color: #9ca3af;
}

.tpl-vibrant .pdf-footer-brand {
    font-size: 0.68rem;
    color: #d8b4fe;
    font-weight: 700;
}

/* ============================================================
   TEMPLATE 5 — SAFFRON (Centered Formal, Double Borders)
   Unique: Centered header with gold ornament, decorative top/bottom
   bands, traditional formal Indian business style
   ============================================================ */
.tpl-saffron {
    background: #fff;
    border-radius: 0;
    box-shadow: 0 4px 24px rgba(180, 83, 9, 0.12);
    overflow: hidden;
    border: 1px solid #fde68a;
}

/* Decorative top band */
.tpl-saffron .pdf-saffron-top-band {
    height: 8px;
    background: linear-gradient(90deg, #78350f, #d97706, #f59e0b, #d97706, #78350f);
}

/* Banner — CENTERED layout */
.tpl-saffron .pdf-banner {
    background: linear-gradient(180deg, #fffbeb 0%, #fef3c7 100%);
    padding: 2.5rem 3rem 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    border-bottom: 2px solid #fde68a;
}

.tpl-saffron .pdf-banner::before {
    display: none;
}

.tpl-saffron .pdf-company-block {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.tpl-saffron .pdf-logo {
    max-height: 56px;
    max-width: 140px;
    object-fit: contain;
    margin-bottom: 14px;
    display: block;
    filter: drop-shadow(0 2px 8px rgba(180, 83, 9, 0.2));
}

.tpl-saffron .pdf-company-name {
    font-size: 2rem;
    font-weight: 900;
    color: #78350f;
    margin: 0 0 8px;
    letter-spacing: -0.02em;
}

/* Ornamental divider */
.tpl-saffron .pdf-saffron-ornament {
    width: 120px;
    height: 2px;
    margin: 4px auto 14px;
    position: relative;
    background: #d97706;
}

.tpl-saffron .pdf-saffron-ornament::before {
    content: '◆';
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    font-size: 10px;
    color: #d97706;
    background: #fef3c7;
    padding: 0 8px;
}

.tpl-saffron .pdf-company-meta {
    font-size: 0.82rem;
    color: #78350f;
    line-height: 1.6;
    opacity: 1;
    text-align: center;
}

.tpl-saffron .pdf-meta-row {
    color: #78350f;
    justify-content: center;
}

.tpl-saffron .pdf-saffron-dateline {
    margin-top: 12px;
    font-size: 0.72rem;
    font-weight: 700;
    color: #b45309;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

/* Summary */
.tpl-saffron .pdf-summary {
    display: flex;
    background: #fffbeb;
    border-bottom: 1px solid #fde68a;
}

.tpl-saffron .pdf-sum-item {
    flex: 1;
    padding: 14px 20px;
    text-align: center;
    border-right: 1px solid #fde68a;
}

.tpl-saffron .pdf-sum-item:last-child {
    border-right: none;
    background: linear-gradient(135deg, #b45309, #d97706);
}

.tpl-saffron .pdf-sum-lbl {
    font-size: 0.62rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #b45309;
    font-weight: 700;
    display: block;
    margin-bottom: 3px;
}

.tpl-saffron .pdf-sum-item:last-child .pdf-sum-lbl {
    color: rgba(255, 255, 255, 0.6);
}

.tpl-saffron .pdf-sum-val {
    font-size: 1.15rem;
    font-weight: 900;
    color: #78350f;
}

.tpl-saffron .pdf-sum-item:last-child .pdf-sum-val {
    color: #fff;
}

/* Body */
.tpl-saffron .pdf-body {
    padding: 2rem 3rem;
}

.tpl-saffron .pdf-list-header {
    text-align: center;
    margin-bottom: 1.5rem;
}

.tpl-saffron .pdf-list-title {
    font-size: 0.9rem;
    font-weight: 900;
    color: #78350f;
    margin: 0 0 4px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.tpl-saffron .pdf-client-for {
    font-size: 0.85rem;
    color: #92400e;
}

.tpl-saffron .pdf-client-for strong {
    color: #d97706;
    font-weight: 700;
}

/* Table — full bordered formal style */
.tpl-saffron .pdf-table {
    width: 100%;
    border-collapse: collapse;
    border: 2px solid #d97706;
    border-radius: 0;
}

.tpl-saffron .pdf-table thead th {
    padding: 12px 16px;
    font-size: 0.72rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #fff;
    background: linear-gradient(135deg, #78350f, #b45309);
    border-bottom: 2px solid #d97706;
}

.tpl-saffron .pdf-table tbody tr:nth-child(even) {
    background: #fffdf5;
}

.tpl-saffron .pdf-table tbody td {
    padding: 13px 16px;
    border-bottom: 1px solid #fde68a;
    vertical-align: middle;
    border-right: 1px solid #fef3c7;
}

.tpl-saffron .pdf-table tbody td:last-child {
    border-right: none;
}

.tpl-saffron .pdf-table tbody tr:last-child td {
    border-bottom: none;
}

.tpl-saffron .pdf-prod-name {
    font-weight: 700;
    font-size: 0.92rem;
    color: #1f2937;
    margin-bottom: 2px;
}

.tpl-saffron .pdf-prod-detail {
    font-size: 0.78rem;
    color: #9ca3af;
}

.tpl-saffron .pdf-price {
    font-size: 1.05rem;
    font-weight: 900;
    color: #b45309;
    text-align: right;
}

.tpl-saffron .pdf-sr {
    font-size: 0.8rem;
    color: #d97706;
    text-align: center;
    font-weight: 800;
}

.tpl-saffron .pdf-footer {
    margin-top: 2rem;
    padding-top: 1rem;
    border-top: 2px solid #fde68a;
    text-align: center;
}

.tpl-saffron .pdf-footer-note {
    font-size: 0.72rem;
    color: #9ca3af;
}

.tpl-saffron .pdf-footer-brand {
    font-size: 0.68rem;
    color: #d97706;
    font-weight: 700;
    margin-top: 6px;
}

/* Decorative bottom band */
.tpl-saffron .pdf-saffron-bottom-band {
    height: 8px;
    background: linear-gradient(90deg, #78350f, #d97706, #f59e0b, #d97706, #78350f);
}

/* ============================================================
   TEMPLATE 6 — BLACK & WHITE (Simple Printer Friendly)
   Pure black, white & grays only. No color at all.
   Designed for companies with simple mono/laser printers.
   ============================================================ */
.tpl-bw {
    background: #fff;
    border-radius: 0;
    box-shadow: none;
    overflow: hidden;
    border: 2px solid #000;
}

.tpl-bw .pdf-banner {
    background: #000;
    padding: 2rem 2.5rem;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1.5rem;
    position: relative;
}

.tpl-bw .pdf-banner::before {
    display: none;
}

.tpl-bw .pdf-logo {
    max-height: 48px;
    max-width: 120px;
    object-fit: contain;
    margin-bottom: 10px;
    display: block;
    filter: brightness(0) invert(1) !important;
}

.tpl-bw .pdf-company-block {
    color: #fff;
}

.tpl-bw .pdf-company-name {
    font-size: 1.8rem;
    font-weight: 900;
    margin: 0 0 4px;
    letter-spacing: -0.02em;
    color: #fff;
}

.tpl-bw .pdf-company-meta {
    font-size: 0.82rem;
    opacity: 1;
    line-height: 1.6;
    color: #fff;
}

.tpl-bw .pdf-meta-row {
    color: #fff;
}

.tpl-bw .pdf-date-pill {
    background: #fff;
    border: 2px solid #000;
    color: #000;
    padding: 0.85rem 1.25rem;
    border-radius: 0;
    text-align: center;
    flex-shrink: 0;
    min-width: 120px;
}

.tpl-bw .pdf-date-label {
    font-size: 0.6rem;
    text-transform: uppercase;
    font-weight: 800;
    letter-spacing: 0.12em;
    color: #555;
    display: block;
}

.tpl-bw .pdf-date-value {
    font-size: 0.95rem;
    font-weight: 900;
    display: block;
    margin-top: 3px;
    color: #000;
}

/* Summary strip */
.tpl-bw .pdf-summary {
    display: flex;
    background: #f5f5f5;
    border-bottom: 2px solid #000;
}

.tpl-bw .pdf-sum-item {
    flex: 1;
    padding: 12px 18px;
    text-align: center;
    border-right: 1px solid #ddd;
}

.tpl-bw .pdf-sum-item:last-child {
    border-right: none;
    background: #000;
}

.tpl-bw .pdf-sum-lbl {
    font-size: 0.62rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #666;
    font-weight: 800;
    display: block;
    margin-bottom: 3px;
}

.tpl-bw .pdf-sum-item:last-child .pdf-sum-lbl {
    color: rgba(255, 255, 255, 0.6);
}

.tpl-bw .pdf-sum-val {
    font-size: 1.1rem;
    font-weight: 900;
    color: #000;
}

.tpl-bw .pdf-sum-item:last-child .pdf-sum-val {
    color: #fff;
}

/* Body */
.tpl-bw .pdf-body {
    padding: 2rem 2.5rem;
}

.tpl-bw .pdf-list-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 1.25rem;
}

.tpl-bw .pdf-list-title {
    font-size: 1.1rem;
    font-weight: 900;
    color: #000;
    margin: 0 0 4px;
    letter-spacing: -0.02em;
    text-transform: uppercase;
}

.tpl-bw .pdf-client-for {
    font-size: 0.85rem;
    color: #555;
}

.tpl-bw .pdf-client-for strong {
    color: #000;
    font-weight: 800;
}

.tpl-bw .pdf-table {
    width: 100%;
    border-collapse: collapse;
    border: 2px solid #000;
}

.tpl-bw .pdf-table thead th {
    padding: 10px 14px;
    font-size: 0.72rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #fff;
    background: #000;
    border-bottom: 2px solid #000;
}

.tpl-bw .pdf-table tbody tr:nth-child(even) {
    background: #f5f5f5;
}

.tpl-bw .pdf-table tbody td {
    padding: 12px 14px;
    border-bottom: 1px solid #ddd;
    vertical-align: middle;
    color: #111;
}

.tpl-bw .pdf-table tbody tr:last-child td {
    border-bottom: none;
}

.tpl-bw .pdf-prod-name {
    font-weight: 700;
    font-size: 0.92rem;
    color: #000;
    margin-bottom: 2px;
}

.tpl-bw .pdf-prod-detail {
    font-size: 0.78rem;
    color: #666;
}

.tpl-bw .pdf-price {
    font-size: 1.05rem;
    font-weight: 900;
    color: #000;
    text-align: right;
}

.tpl-bw .pdf-sr {
    font-size: 0.82rem;
    color: #999;
    text-align: center;
    font-weight: 700;
}

.tpl-bw .pdf-footer {
    margin-top: 1.75rem;
    padding-top: 1rem;
    border-top: 2px solid #000;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.tpl-bw .pdf-footer-note {
    font-size: 0.72rem;
    color: #666;
}

.tpl-bw .pdf-footer-brand {
    font-size: 0.68rem;
    color: #999;
    font-weight: 700;
}


/* ============================================================
   PRINT STYLES
   ============================================================ */
@media print {
    @page {
        margin: 0;
        size: auto;
    }

    * {
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
    }

    .sidebar,
    .sidebar-toggle,
    .main-topbar,
    .gen-control-panel,
    .tpl-picker-wrap,
    .gen-preview-label,
    .gen-preview-badge,
    .section-topbar,
    .btn-primary-action,
    .btn-danger-action,
    .btn-icon,
    .gen-quotation-bar,
    .gen-product-selector,
    .gen-actions-bar,
    .gen-actions-row,
    .gen-step-card,
    .gen-step-connector,
    .gen-hero,
    .gen-cards-grid,
    .gen-terms-row-v2,
    .gen-tpl-section,
    .gen-visibility-section,
    .gen-preview-header,
    nav,
    header,
    footer {
        display: none !important;
    }

    body,
    html {
        background: #fff !important;
        margin: 0 !important;
        padding: 0 !important;
    }

    .main-content {
        margin: 0 !important;
        padding: 0 !important;
        width: 100% !important;
    }

    section {
        display: none !important;
    }

    #section-generator {
        display: block !important;
        padding: 0 !important;
        margin: 0 !important;
        border: 0 !important;
    }

    .gen-preview-wrapper,
    .gen-preview-section {
        padding: 0 !important;
        margin: 0 !important;
        background: transparent !important;
    }

    .gen-paper-bg,
    .gen-paper-bg-v2 {
        padding: 0 !important;
        background: transparent !important;
        border: none !important;
        box-shadow: none !important;
    }

    #pdfContentArea {
        width: 100% !important;
        max-width: none !important;
        margin: 0 !important;
        padding: 0 !important;
        border-radius: 0 !important;
        box-shadow: none !important;
    }

    .tpl-classic,
    .tpl-dark,
    .tpl-minimal,
    .tpl-vibrant,
    .tpl-saffron,
    .tpl-bw {
        border-radius: 0 !important;
        box-shadow: none !important;
    }

    .tpl-dark {
        background: #0f172a !important;
        color: #f1f5f9 !important;
    }

    .tpl-dark .pdf-banner {
        background: linear-gradient(180deg, #0f172a, #1e293b) !important;
    }

    .tpl-dark .pdf-summary {
        background: #1e293b !important;
    }

    .tpl-dark .pdf-table tbody tr {
        background: #1e293b !important;
    }

    .tpl-dark .pdf-table tbody tr:nth-child(even) {
        background: #162033 !important;
    }

    .tpl-dark .pdf-table tbody tr td:first-child {
        border-left: 3px solid #eab308 !important;
    }

    /* Vibrant sidebar prints correctly */
    .tpl-vibrant .pdf-vibrant-layout {
        display: grid !important;
        grid-template-columns: 200px 1fr !important;
    }

    .tpl-vibrant .pdf-vibrant-sidebar {
        background: linear-gradient(180deg, #4c1d95, #7c3aed) !important;
    }

    .tpl-vibrant .pdf-summary {
        background: #f5f3ff !important;
    }

    .tpl-vibrant .pdf-table tbody tr td:first-child {
        border-left: 3px solid #7c3aed !important;
    }

    /* Saffron centered formal */
    .tpl-saffron .pdf-saffron-top-band,
    .tpl-saffron .pdf-saffron-bottom-band {
        background: linear-gradient(90deg, #78350f, #d97706, #f59e0b, #d97706, #78350f) !important;
    }

    .tpl-saffron .pdf-banner {
        background: linear-gradient(180deg, #fffbeb, #fef3c7) !important;
    }

    .tpl-saffron .pdf-summary {
        background: #fffbeb !important;
    }

    .tpl-saffron .pdf-table thead th {
        background: linear-gradient(135deg, #78350f, #b45309) !important;
        color: #fff !important;
    }

    .tpl-classic .pdf-banner {
        background: linear-gradient(135deg, #0d9488, #6366f1) !important;
    }

    .tpl-classic .pdf-summary {
        background: #f0fdfa !important;
    }

    /* Minimal — no banner needed */
    .tpl-minimal .pdf-minimal-header {
        border-bottom: 1px solid #222 !important;
    }

    .tpl-bw {
        border: 2px solid #000 !important;
    }

    .tpl-bw .pdf-banner {
        background: #000 !important;
    }

    .tpl-bw .pdf-summary {
        background: #f5f5f5 !important;
    }

    .tpl-bw .pdf-table thead th {
        background: #000 !important;
        color: #fff !important;
    }

    .tpl-bw .pdf-table tbody tr:nth-child(even) {
        background: #f5f5f5 !important;
    }

    .tpl-bw .pdf-logo {
        filter: brightness(0) invert(1) !important;
    }
}

/* PDF Banner meta rows (used in JS-rendered preview) */
.pdf-meta-row {
    display: flex;
    align-items: flex-start;
    gap: 6px;
    font-size: 0.85rem;
    line-height: 1.5;
    margin-bottom: 3px;
    color: rgba(255, 255, 255, 0.95);
}

.pdf-meta-row span {
    font-size: 1rem;
    flex-shrink: 0;
}

