/* ═══════════════════════════════════════════════════════════════
   AK PRINT SEVA — 5 COMPLETELY DISTINCT QUOTATION TEMPLATES CSS
   Exact A4 Portrait: 210mm x 297mm · 5 Unique Layouts & Textures
   Corporate Navy · Electric Teal · Swiss Minimal · Construction · Luxury Proposal
   ═══════════════════════════════════════════════════════════════ */

/* ─── A4 PORTRAIT BASE SHEET ─── */
.a4-quote-sheet {
    width: 210mm;
    height: 297mm;
    min-height: 297mm;
    max-height: 297mm;
    background: #ffffff !important;
    color: #1E293B;
    font-family: 'Plus Jakarta Sans', sans-serif;
    box-sizing: border-box;
    position: relative;
    box-shadow: none;
    margin: 0 auto;
    overflow: hidden;
    line-height: 1.35;
    padding: 0;
}

.text-center { text-align: center; }
.text-right { text-align: right; }
.fw-bold { font-weight: 700; }
.text-muted { color: #64748B; }


/* ═══════════════════════════════════════════════════════════════
   1. TEMPLATE 01: CLASSIC BUSINESS (Corporate Navy Header Bar)
   ═══════════════════════════════════════════════════════════════ */
.quote-t1-frame {
    width: 100%;
    height: 100%;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 10mm 12mm;
    background: #FFFFFF;
}

.t1-top-navy-bar {
    background: #1E3A8A;
    color: #ffffff;
    padding: 12px 16px;
    border-radius: 6px;
    border-bottom: 3px solid #F59E0B;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}
.t1-seller-brand { display: flex; align-items: center; gap: 12px; }
.t1-seller-logo { max-height: 44px; max-width: 130px; object-fit: contain; background: #ffffff; padding: 2px 4px; border-radius: 4px; }
.t1-seller-title { font-size: 18px; font-weight: 900; color: #ffffff; margin: 0; }
.t1-seller-meta { font-size: 10.5px; opacity: 0.9; line-height: 1.3; }
.t1-meta-block { text-align: right; }
.t1-doc-title { font-size: 24px; font-weight: 900; color: #F59E0B; letter-spacing: 1.5px; margin: 0 0 2px; }
.t1-meta-line { font-size: 11px; font-weight: 600; }

.t1-client-card {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
    background: #F8FAFC;
    border: 1px solid #E2E8F0;
    border-left: 4px solid #1E3A8A;
    border-radius: 6px;
    padding: 8px 12px;
    margin-bottom: 12px;
    font-size: 11px;
}
.t1-client-label { font-size: 9.5px; font-weight: 800; text-transform: uppercase; color: #1E3A8A; margin-bottom: 2px; }

.t1-table { width: 100%; border-collapse: collapse; font-size: 11px; margin-bottom: 10px; }
.t1-table th { background: #1E3A8A; color: #ffffff; padding: 7px 8px; font-weight: 800; font-size: 10px; text-transform: uppercase; }
.t1-table td { padding: 6px 8px; border-bottom: 1px solid #E2E8F0; }
.t1-table tr:nth-child(even) { background: #F8FAFC; }

.t1-bottom-grid {
    display: grid;
    grid-template-columns: 1fr 240px;
    gap: 16px;
    align-items: flex-start;
    border-top: 1px solid #CBD5E1;
    padding-top: 8px;
    margin-bottom: 8px;
}
.t1-words-pill { background: #EFF6FF; border-left: 3px solid #1E3A8A; padding: 5px 8px; font-size: 11px; font-weight: 700; color: #1E3A8A; margin-bottom: 6px; }
.t1-grand-total-box { background: #1E3A8A; color: #ffffff; padding: 6px 10px; border-radius: 4px; font-size: 14px; font-weight: 900; display: flex; justify-content: space-between; margin: 4px 0; }

.t1-footer-bar {
    display: grid;
    grid-template-columns: 1fr auto 180px;
    gap: 12px;
    align-items: flex-end;
    border-top: 1px solid #E2E8F0;
    padding-top: 8px;
    font-size: 9.5px;
}


/* ═══════════════════════════════════════════════════════════════
   2. TEMPLATE 02: MODERN CORPORATE (Electric Teal & Slate)
   ═══════════════════════════════════════════════════════════════ */
.quote-t2-frame {
    width: 100%;
    height: 100%;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 10mm 12mm;
    background: #F8FAFC;
    border-left: 12px solid #0F766E;
}

.t2-header-split {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    border-bottom: 2px solid #CCFBF1;
    padding-bottom: 10px;
    margin-bottom: 12px;
}
.t2-badge-pill {
    background: #0F766E;
    color: #ffffff;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 900;
    letter-spacing: 1px;
    display: inline-block;
    margin-bottom: 4px;
}

.t2-cards-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 12px;
}
.t2-card-box {
    background: #ffffff;
    border: 1px solid #E2E8F0;
    border-radius: 8px;
    padding: 10px 12px;
    font-size: 11px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}
.t2-card-title { font-size: 10px; font-weight: 800; text-transform: uppercase; color: #0F766E; margin-bottom: 4px; display: block; }

.t2-table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 11px; background: #ffffff; border-radius: 6px; overflow: hidden; border: 1px solid #E2E8F0; margin-bottom: 10px; }
.t2-table th { background: #0F766E; color: #ffffff; padding: 7px 8px; font-weight: 800; font-size: 10px; text-transform: uppercase; }
.t2-table td { padding: 6px 8px; border-bottom: 1px solid #F1F5F9; }

.t2-bottom-grid {
    display: grid;
    grid-template-columns: 1fr 240px;
    gap: 16px;
    align-items: flex-start;
    margin-bottom: 8px;
}
.t2-words-pill { background: #F0FDFA; border: 1px solid #CCFBF1; color: #0F766E; padding: 5px 8px; border-radius: 6px; font-size: 11px; font-weight: 700; margin-bottom: 6px; }
.t2-grand-total-box { background: #0F766E; color: #ffffff; padding: 6px 10px; border-radius: 6px; font-size: 14px; font-weight: 900; display: flex; justify-content: space-between; margin: 4px 0; }


/* ═══════════════════════════════════════════════════════════════
   3. TEMPLATE 03: MINIMAL PROFESSIONAL (Swiss Monochrome)
   ═══════════════════════════════════════════════════════════════ */
.quote-t3-frame {
    width: 100%;
    height: 100%;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 12mm 14mm;
    background: #FFFFFF;
    border: 1px solid #E2E8F0;
}

.t3-swiss-header {
    border-top: 4px solid #000000;
    border-bottom: 1px solid #000000;
    padding: 10px 0;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 14px;
}
.t3-doc-headline { font-family: 'Space Grotesk', sans-serif; font-size: 28px; font-weight: 900; letter-spacing: 4px; color: #000000; margin: 0; }

.t3-info-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    border-bottom: 1px solid #000000;
    padding-bottom: 10px;
    margin-bottom: 14px;
    font-size: 11px;
}

.t3-table { width: 100%; border-collapse: collapse; font-size: 11px; margin-bottom: 12px; }
.t3-table th { border-bottom: 2px solid #000000; padding: 6px 8px; font-weight: 900; font-size: 10px; text-transform: uppercase; letter-spacing: 1px; color: #000000; background: transparent; }
.t3-table td { padding: 6px 8px; border-bottom: 1px solid #E2E8F0; }

.t3-bottom-grid {
    display: grid;
    grid-template-columns: 1fr 240px;
    gap: 20px;
    border-top: 1px solid #000000;
    padding-top: 10px;
}
.t3-grand-total-box { border-top: 2px solid #000000; border-bottom: 2px solid #000000; padding: 6px 0; font-size: 14px; font-weight: 900; display: flex; justify-content: space-between; margin: 6px 0; color: #000000; }


/* ═══════════════════════════════════════════════════════════════
   4. TEMPLATE 04: PROJECT & CONSTRUCTION ESTIMATE (Amber Blueprint)
   ═══════════════════════════════════════════════════════════════ */
.quote-t4-frame {
    width: 100%;
    height: 100%;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 10mm 12mm;
    background: #FFFDF9;
    border: 3px solid #D97706;
}

.t4-blueprint-header {
    background: #78350F;
    color: #ffffff;
    padding: 10px 14px;
    border-radius: 4px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}
.t4-doc-headline { font-size: 20px; font-weight: 900; color: #FBBF24; margin: 0; }

.t4-project-badge-card {
    background: #FEF3C7;
    border: 1px dashed #D97706;
    border-radius: 6px;
    padding: 8px 12px;
    margin-bottom: 10px;
    font-size: 11.5px;
    color: #78350F;
}

.t4-table { width: 100%; border-collapse: collapse; font-size: 11px; margin-bottom: 10px; }
.t4-table th { background: #92400E; color: #ffffff; padding: 6px 8px; font-weight: 800; font-size: 10px; text-transform: uppercase; }
.t4-table td { padding: 6px 8px; border-bottom: 1px solid #FDE68A; }
.t4-table tr:nth-child(even) { background: #FEF3C7; }

.t4-grand-total-box { background: #92400E; color: #ffffff; padding: 6px 10px; border-radius: 4px; font-size: 14px; font-weight: 900; display: flex; justify-content: space-between; margin: 4px 0; }


/* ═══════════════════════════════════════════════════════════════
   5. TEMPLATE 05: ELEGANT PROPOSAL (Warm Amber & Gold Luxury)
   ═══════════════════════════════════════════════════════════════ */
.quote-t5-frame {
    width: 100%;
    height: 100%;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 10mm 12mm;
    background: #FAF7F2;
    border: 6px double #C2410C;
}

.t5-proposal-header {
    border-bottom: 2px solid #EA580C;
    padding-bottom: 10px;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 10px;
}
.t5-doc-headline { font-family: 'Playfair Display', serif; font-size: 26px; font-weight: 900; color: #C2410C; margin: 0; }

.t5-client-box {
    background: #FFF7ED;
    border: 1px solid #FED7AA;
    border-radius: 6px;
    padding: 8px 12px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 10px;
    font-size: 11px;
}

.t5-table { width: 100%; border-collapse: collapse; font-size: 11px; margin-bottom: 10px; }
.t5-table th { background: #C2410C; color: #ffffff; padding: 7px 8px; font-weight: 800; font-size: 10px; text-transform: uppercase; }
.t5-table td { padding: 6px 8px; border-bottom: 1px solid #FFEDD5; }
.t5-table tr:nth-child(even) { background: #FFF7ED; }

.t5-grand-total-box { background: #C2410C; color: #ffffff; padding: 6px 10px; border-radius: 4px; font-size: 14px; font-weight: 900; display: flex; justify-content: space-between; margin: 4px 0; }


/* ═══════════════════════════════════════════════════════════════
   PRINT STYLES FOR EXACT 1-PAGE A4 PORTRAIT PRINT & PDF
   ═══════════════════════════════════════════════════════════════ */
@media print {
    @page {
        size: A4 portrait;
        margin: 0mm !important;
    }
    *, *:before, *:after {
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
        box-sizing: border-box !important;
    }
    html, body, .quote-app-page, main, .studio-main-container, .studio-2col-layout, .studio-right-deck, .preview-deck-card, .pdk-canvas-viewport, .a4-scale-stage {
        background: #ffffff !important;
        color: #000000 !important;
        margin: 0 !important;
        padding: 0 !important;
        width: 100% !important;
        max-width: 100% !important;
        min-width: 100% !important;
        border: none !important;
        box-shadow: none !important;
        overflow: visible !important;
        position: static !important;
    }
    header, nav, footer, .builder-hero, .studio-left-deck, .pdk-header, .pdk-footer-bar, .toast-container, .hero-bg-shapes {
        display: none !important;
    }
    .a4-scale-stage {
        transform: none !important;
    }
    .a4-quote-sheet {
        width: 210mm !important;
        height: 296mm !important;
        max-height: 296mm !important;
        min-height: 296mm !important;
        margin: 0 auto !important;
        padding: 0 !important;
        background: #ffffff !important;
        box-shadow: none !important;
        border: none !important;
        page-break-after: avoid !important;
        page-break-inside: avoid !important;
        overflow: hidden !important;
    }
}
