    /* === 1. SETTINGS (Font & Spacing Control) === */
    :root {
        /* PAGE 1 SETTINGS */
        --lh-page1: 2.2;   
        --fs-page1: 15px;  /* Text Size Page 1 */
        --inp-page1: 16px; /* Input Size Page 1 */
        
        /* PAGE 2 SETTINGS */
        --lh-page2: 1.5;   
        --fs-page2: 13px;  /* Text Size Page 2 */
        --inp-page2: 14px; /* Input Size Page 2 */

        --font-small: 12px;
    }

    /* === General UI === */
    #scst-main-container {
        font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
        padding: 20px;
        box-sizing: border-box;
        max-width: 100%;
        margin: 0 auto;
    }

    /* === Form Section === */
    .form-section {
        background: #ffffff; padding: 25px; border-radius: 8px;
        box-shadow: 0 4px 15px rgba(0,0,0,0.1); margin-bottom: 30px;
        border-top: 5px solid #2196F3;
    }
    .form-heading {
        text-align: center; font-size: 22px; font-weight: bold; color: #333;
        margin-bottom: 20px; border-bottom: 2px solid #eee; padding-bottom: 10px;
    }
    .form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 15px; }
    .form-full { grid-column: 1 / -1; }

    .form-group label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 5px; color: #444; }
    .form-group input, .form-group select, .form-group textarea {
        width: 100%; padding: 10px; border: 1px solid #ccc; border-radius: 5px; font-size: 14px;
    }
    .form-group input:focus { border-color: #2196F3; outline: none; }

    /* Checkbox Row */
    .checkbox-row {
        display: flex; align-items: center; gap: 20px;
        background: #e3f2fd; padding: 8px 12px; border-radius: 4px;
        border: 1px solid #90caf9; width: fit-content; margin-top: 5px;
    }
    .checkbox-row input { width: 16px; height: 16px; margin: 0; cursor: pointer; }
    .checkbox-row span { font-size: 13px; font-weight: bold; color: #1565c0; cursor: pointer; }

    /* === Download Button === */
    .action-bar { text-align: center; margin: 20px 0; position: sticky; top: 10px; z-index: 1000; }
    .btn-download {
        padding: 12px 40px; font-size: 18px; font-weight: bold; border: none; border-radius: 50px;
        cursor: pointer; color: white; margin: 0 10px; box-shadow: 0 4px 6px rgba(0,0,0,0.2);
        transition: transform 0.2s; display: inline-block;
        background: linear-gradient(135deg, #28a745, #218838);
    }
    .btn-download:hover { transform: translateY(-2px); box-shadow: 0 6px 10px rgba(0,0,0,0.3); }

    /* === Preview Section === */
    .preview-container {
        background: #e0e0e0;
        padding: 40px 10px; display: flex; flex-direction: column; align-items: center; gap: 30px; border-radius: 8px;
        border: 1px solid #ccc;
    }

    /* === A4 Page Styling === */
    .a4-page {
        width: 210mm; 
        min-height: 297mm; 
        background: white;
        padding: 15mm; 
        box-shadow: 0 0 20px rgba(0,0,0,0.2);
        position: relative; box-sizing: border-box; overflow: hidden; color: #000;
    }

    /* PAGE SPECIFIC TEXT SIZES */
    #page1 { line-height: var(--lh-page1); font-size: var(--fs-page1); }
    #page2 { line-height: var(--lh-page2); font-size: var(--fs-page2); }

    /* PAGE SPECIFIC INPUT SIZES */
    #page1 .pv { font-size: var(--inp-page1); }
    #page2 .pv { font-size: var(--inp-page2); }

    /* Typography */
    .p-row { display: flex; align-items: baseline; flex-wrap: wrap; width: 100%; margin-bottom: 2px; }
    .space-between { justify-content: space-between; }
    
    /* LABELS: Slightly Lighter Color (#444) */
    .pl { 
        color: #444; /* Halka Kala */
        font-weight: 600; 
        margin-right: 5px; 
        white-space: nowrap; 
        font-size: inherit; 
    }

    /* VALUES (INPUTS): Dark Black (#000) & Extra Bold (900) */
    .pv {
        display: inline-block;
        border-bottom: 1px dotted #000;
        padding: 0 5px;
        min-height: 18px;
        color: #000000;   /* Jet Black */
        font-weight: 900; /* Extra Bold */
        font-family: 'Arial', sans-serif;
    }
    .pv.filled { min-width: auto !important; border-bottom: none !important; }
    .pv.empty { color: transparent; }

    /* Widths */
    .w-xxs { min-width: 30px; text-align: center; } 
    .w-xs  { min-width: 60px; text-align: center; }
    .w-sm  { min-width: 85px; }
    .w-md  { min-width: 100px; }
    .w-lg  { min-width: 130px; }
    .w-xl  { min-width: 95%; flex: 1; }

    #prev_place { min-width: 80px; text-align: center; }

    .origin-row { font-size: var(--font-small); margin-left: 30px; margin-top: -5px; color: #444; }
    .origin-row .pv { font-size: var(--font-small); }

    /* Header & Photo */
    .main-h { text-align: center; font-size: 20px; font-weight: bold; line-height: 1.2; margin-bottom: 2px; }
    .sub-h { text-align: center; font-size: 14px; font-weight: bold; margin-bottom: 15px; }
    .photo-area {
        position: absolute; top: 30mm; right: 15mm; width: 35mm; height: 45mm;
        border: 1px solid #000; display: flex; justify-content: center; align-items: center;
        background: #fff; z-index: 10; background-size: cover; background-position: center;
    }
    .cross-btn {
        position: absolute; top: -8px; right: -8px; background: red; color: white; border-radius: 50%;
        width: 20px; height: 20px; text-align: center; line-height: 18px; font-weight: bold; cursor: pointer;
        border: 2px solid white; display: none; z-index: 20;
    }

    /* Sections */
    .page-footer { position: absolute; bottom: 2px; left: 10mm; font-size: 11px; font-weight: bold; }
    .page-footer a { color: #000080; text-decoration: none; }

    /* === Patwari Section Alignment (FIXED FOR PRINT) === */
    .patwari-section { 
        display: flex; 
        justify-content: space-between; 
        align-items: flex-end; 
        margin-top: 15px;
        width: 100%; 
    }
    .patwari-left { font-weight: bold; font-size: 13px; }
    
    .patwari-right { 
        text-align: left; 
        line-height: 1.8; 
        min-width: 250px;
        margin-left: auto; 
    }
    
    .pat-row { display: grid; grid-template-columns: 90px 1fr; align-items: baseline; }
    .pat-lbl { font-weight: bold; text-align: left; }
    .pat-val { border-bottom: 1px dotted #000; min-height: 18px; width: 100%; }

    .sign-gap { margin-top: 30px; text-align: right; font-weight: bold; }
    
    .doc-list { font-size: 11px; margin-top: 10px; line-height: 1.4; border-top: 1px solid #eee; padding-top: 10px; }
    .hidden { display: none; }

    @media (max-width: 768px) {
        .a4-page { width: 100%; height: auto; padding: 10mm; }
        .photo-area { width: 30mm; height: 40mm; top: 25mm; right: 10mm; }
        .patwari-section { flex-direction: column; align-items: flex-start; gap: 20px; }
    }