/* Tahsilat Formu - A5 uyumlu, düzenli form */

/* A5: 148mm x 210mm */
.cf-document {
    width: 148mm;
    min-height: 210mm;
    margin: 0 auto;
    background: #fff;
    box-shadow: 0 2px 20px rgba(0,0,0,.1);
    overflow: hidden;
    box-sizing: border-box;
}

.cf-document * {
    box-sizing: border-box;
}

/* ----- Header ----- */
.cf-header {
    background: #1a1a2e;
    color: #fff;
    padding: 8mm 10mm;
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 8mm;
    align-items: start;
}

.cf-company-name {
    font-size: 9pt;
    line-height: 1.4;
    font-weight: 600;
    letter-spacing: 0.02em;
    margin: 0 0 3mm 0;
    text-transform: uppercase;
}

.cf-collected-by {
    font-size: 8pt;
    opacity: .9;
    margin: 0;
}

.cf-meta {
    text-align: right;
}

.cf-doc-badge {
    display: block;
    background: rgba(255,255,255,.2);
    font-size: 7pt;
    font-weight: 600;
    letter-spacing: 0.1em;
    padding: 3mm 5mm;
    border-radius: 2px;
    margin-bottom: 4mm;
    width: fit-content;
    margin-left: auto;
}

.cf-meta-item {
    font-size: 9pt;
    margin: 1mm 0;
    font-weight: 500;
}

.cf-meta-id {
    font-size: 10pt;
    color: #2ad19d;
    font-weight: 600;
}

/* ----- Body ----- */
.cf-body {
    padding: 8mm 10mm 10mm;
}

.cf-section {
    margin-bottom: 6mm;
}

.cf-section:last-of-type {
    margin-bottom: 0;
}

.cf-section-title {
    font-size: 7pt;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #666;
    margin: 0 0 3mm 0;
    padding-bottom: 2mm;
    border-bottom: 1px solid #e0e0e0;
}

.cf-customer-box {
    padding: 4mm 0;
}

.cf-customer-name {
    font-size: 11pt;
    font-weight: 600;
    color: #111;
    margin: 0 0 2mm 0;
}

.cf-customer-details {
    font-size: 9pt;
    color: #444;
    line-height: 1.5;
    margin: 0;
}

/* Detay tablosu - düzenli satırlar */
.cf-details-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 9pt;
    border: 1px solid #e0e0e0;
    border-radius: 2px;
    overflow: hidden;
}

.cf-details-table tr {
    border-bottom: 1px solid #e8e8e8;
}

.cf-details-table tr:last-child {
    border-bottom: none;
}

.cf-details-table td {
    padding: 3.5mm 4mm;
    vertical-align: middle;
}

.cf-details-table td:first-child {
    color: #555;
    font-weight: 500;
    width: 38mm;
    background: #f8f8f8;
}

.cf-details-table td:last-child {
    color: #111;
    font-weight: 500;
}

.cf-amount-row td:last-child {
    font-size: 12pt;
    font-weight: 700;
    color: #1a1a2e;
}

/* Uyarı kutusu */
.cf-disclaimer {
    margin-top: 6mm;
    padding: 3.5mm 4mm;
    background: #f5f9f7;
    border: 1px solid #e0e8e4;
    border-left: 3px solid #2ad19d;
    border-radius: 2px;
}

.cf-disclaimer p {
    margin: 0;
    font-size: 8pt;
    color: #555;
    line-height: 1.45;
}

/* Butonlar (ekranda) */
.cf-actions {
    display: flex;
    justify-content: center;
    gap: 4mm;
    margin-top: 8mm;
    padding-top: 6mm;
    border-top: 1px solid #eee;
}

.cf-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 2.5mm 6mm;
    font-size: 10pt;
    font-weight: 600;
    border-radius: 4px;
    cursor: pointer;
    border: none;
    transition: background .2s ease;
    text-decoration: none;
}

.cf-btn-print {
    background: #e8e8e8;
    color: #333;
}

.cf-btn-print:hover {
    background: #ddd;
}

.cf-btn-pdf {
    background: #2ad19d;
    color: #fff;
}

.cf-btn-pdf:hover {
    background: #25b88a;
}

/* ----- A5 Yazdırma ----- */
@page {
    size: A5;
    margin: 10mm;
}

@media print {
    body {
        background: #fff !important;
        margin: 0;
        padding: 0;
    }

    .cs-container {
        padding: 0 !important;
        max-width: none !important;
    }

    .cf-document {
        width: 100% !important;
        min-height: auto !important;
        max-width: none !important;
        box-shadow: none !important;
        border-radius: 0 !important;
        margin: 0 !important;
    }

    .cf-header {
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }

    .cf-actions {
        display: none !important;
    }

    .cf-body {
        padding-bottom: 0;
    }
}

/* Ekranda A5 oranında kutu */
@media screen {
    .cf-document {
        border-radius: 4px;
    }
}

@media (max-width: 170px) {
    .cf-document {
        width: 100%;
    }
    .cf-header, .cf-body {
        padding-left: 5mm;
        padding-right: 5mm;
    }
}
