
    /* PANEL TASARIMI */
    body { font-family: 'Segoe UI', sans-serif; background-color: #f4f7f6; padding: 10px; margin: 0; }
    .ui-panel { width: 95%; max-width: 1150px; margin: auto; background: white; padding: 20px; border-radius: 12px; box-shadow: 0 4px 15px rgba(0,0,0,0.1); }
    .section-title { color: #004085; border-bottom: 2px solid #004085; padding-bottom: 5px; margin: 20px 0 10px 0; font-size: 16px; font-weight: bold; }
    .grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; margin-bottom: 12px; }
    input, select, textarea { width: 100%; padding: 10px; border: 1px solid #ccc; border-radius: 6px; font-size: 14px; box-sizing: border-box; }
    
    .error-border { border: 2px solid #dc3545 !important; background-color: #fff8f8; }

    .product-row { display: grid; grid-template-columns: 40px 100px 1.5fr 3fr 60px 120px 45px; gap: 8px; margin-bottom: 10px; background: #f9f9f9; padding: 10px; border: 1px solid #ddd; border-radius: 6px; align-items: center; }
    .row-no { font-weight: bold; text-align: center; color: #004085; }

        /* Paneldeki görünüm için */
    .product-row textarea.p-desc {
        resize: vertical; /* Kullanıcı isterse aşağı doğru büyütebilsin */
        min-height: 40px;
        padding: 8px;
        line-height: 1.4;
    }


    
    @media (max-width: 992px) { .product-row { grid-template-columns: 1fr; } }
    .btn-add { background: #28a745; color: white; border: none; padding: 10px 20px; border-radius: 6px; cursor: pointer; font-weight: bold; }
    .btn-generate { background: #004085; color: white; border: none; padding: 18px; border-radius: 8px; cursor: pointer; font-size: 18px; font-weight: bold; width: 100%; margin-top: 20px; }
    
    /* PDF ÇIKTI AYARLARI */
    #pdf-render-area { position: absolute; left: -9999px; top: 0; visibility: hidden; }
    #pdf-content { 
    width: 175mm !important; 
    max-width: none !important;
    background: white; 
    color: #000; 
    font-family: Arial, sans-serif; 
    box-sizing: border-box; 
    margin: 0 auto; 
}
    
    /* Üst çizgi kaybolmasını önleyen yeni tablo yapısı */
    .pdf-table { 
        width: 100%; 
        border-collapse: separate !important; 
        border-spacing: 0; 
        margin-top: 5px; 
        font-size: 9.5px; 
        table-layout: auto; 
        border-top: 0.5pt solid #000; /* Üst çizgiyi tablo bazında sabitledik */
        border-left: 0.5pt solid #000;
    }

    .pdf-table th, .pdf-table td { 
        border-right: 0.5pt solid #000; 
        border-bottom: 0.5pt solid #000; 
        padding: 5px; 
        text-align: left; 
        word-wrap: break-word; 
        vertical-align: top;
    }

    /* Blokların sayfa başında kırpılmasını önleyen koruma */
    #pdf-items-container div {
        page-break-inside: avoid !important;
        padding-top: 2px; /* Sayfa sınırına çok yaklaşmasını engeller */
        margin-bottom: 0px;
    }

    .pdf-table thead { display: table-header-group !important; }

    /* Teklif notları düzeni */
    .u-notes {
        margin-top: 40px !important; 
        page-break-inside: avoid !important;
        border-top: 1px solid #ccc;
        padding-top: 15px;
    }

/* PDF çıktısında metnin düzgün akması için  */
#pdf-content .p-desc {
    white-space: pre-wrap; /* Alt satıra geçişleri PDF'de korur */
    word-wrap: break-word;
}