/* RESET */

*{
    margin:0;
    padding:0;
    box-sizing:border-box;
}

body{
    font-family: Arial, sans-serif;
    background:#f4f7fb;
    color:#222;
}


/* MAIN LAYOUT */

.container{
    display:flex;
    min-height:100vh;
}


/* LEFT PANEL */

.form-panel{
    width:35%;
    background:#ffffff;
    padding:30px;
    overflow-y:auto;
    border-right:1px solid #ddd;
}

.form-panel h2{
    margin-bottom:30px;
    font-size:28px;
}

.form-panel section{
    margin-bottom:30px;
}

.form-panel h3{
    margin-bottom:12px;
    font-size:18px;
    color:#333;
}

.form-panel input,
.form-panel select{
    width:100%;
    padding:12px;
    margin-bottom:10px;
    border:1px solid #d7d7d7;
    border-radius:6px;
    font-size:14px;
}

.form-panel input:focus,
.form-panel select:focus{
    outline:none;
    border-color:#4b7bec;
}


/* BUTTONS */

button{
    cursor:pointer;
    border:none;
    padding:12px 18px;
    border-radius:6px;
    transition:0.2s ease;
}

#addRow{
    background:#28a745;
    color:white;
    margin-top:10px;
}

#addRow:hover{
    opacity:0.9;
}

#generatePDF{
    width:100%;
    background:#0d6efd;
    color:white;
    font-size:16px;
    margin-top:20px;
}

#generatePDF:hover{
    opacity:0.95;
}


/* SERVICE TABLE (FORM SIDE) */

#serviceTable{
    width:100%;
    border-collapse:collapse;
}

#serviceTable th{
    background:#f2f2f2;
    padding:10px;
    font-size:13px;
    text-align:left;
}

#serviceTable td{
    padding:5px;
}

#serviceTable input{
    margin-bottom:0;
}

.deleteRow{
    background:#dc3545;
    color:white;
    padding:8px 12px;
}

.deleteRow:hover{
    opacity:0.9;
}


/* RIGHT PANEL */

.preview-panel{
    width:65%;
    padding:40px;
    overflow-y:auto;
}


/* INVOICE BOX */

#invoicePreview{
    width:900px;
    max-width:100%;
    margin:auto;
    background:white;
    padding:50px;
    box-shadow:0 0 20px rgba(0,0,0,0.06);
    border-radius:10px;
}


/* HEADER */

.invoice-header{
    display:flex;
    justify-content:space-between;
    align-items:center;
    margin-bottom:40px;
    padding-bottom:20px;
    border-bottom:2px solid #ececec;
}

.invoice-header h1{
    font-size:34px;
    font-weight:700;
}

.invoice-header h2{
    color:#0d6efd;
    letter-spacing:2px;
}


/* INVOICE INFO */

.invoice-info{
    display:flex;
    justify-content:space-between;
    margin-bottom:30px;
}

.invoice-info p{
    font-size:14px;
}


/* CLIENT SECTION */

.client-section{
    margin-bottom:40px;
}

.client-section h3{
    margin-bottom:10px;
    font-size:18px;
}

.client-section p{
    margin-bottom:6px;
    color:#444;
}


/* INVOICE TABLE */

.invoice-table{
    width:100%;
    border-collapse:collapse;
    margin-bottom:30px;
}

.invoice-table thead{
    background:#f8f9fa;
}

.invoice-table th{
    text-align:left;
    padding:14px;
    border:1px solid #ddd;
}

.invoice-table td{
    padding:14px;
    border:1px solid #ddd;
}


/* TOTAL */

.totals{
    display:flex;
    justify-content:flex-end;
    margin-bottom:30px;
}

.totals h3{
    font-size:24px;
}


/* PAYMENT */

.payment-section{
    padding-top:20px;
    border-top:1px solid #eaeaea;
}

.payment-section p{
    margin-bottom:8px;
    color:#444;
}


/* MOBILE RESPONSIVE */

@media(max-width:1100px){

    .container{
        flex-direction:column;
    }

    .form-panel{
        width:100%;
        border-right:none;
        border-bottom:1px solid #ddd;
    }

    .preview-panel{
        width:100%;
        padding:20px;
    }

    #invoicePreview{
        padding:25px;
    }

    .invoice-header{
        flex-direction:column;
        align-items:flex-start;
        gap:10px;
    }

    .invoice-info{
        flex-direction:column;
        gap:10px;
    }

}

@media(max-width:650px){

    .form-panel{
        padding:20px;
    }

    .invoice-table th,
    .invoice-table td{
        font-size:12px;
        padding:8px;
    }

    .invoice-header h1{
        font-size:26px;
    }

    .totals h3{
        font-size:20px;
    }

}