* {
    box-sizing: border-box;
}

body {
    margin: 0;
    padding: 30px;
    font-family: Arial, sans-serif;
    background: #f3f3f3;
    color: #222;
}


/* =========================
   FORM
========================= */

.form-section {
    max-width: 700px;
    margin: 0 auto 40px;
    padding: 25px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
}

.form-section h1 {
    margin-top: 0;
}

.form-section h2 {
    margin-top: 30px;
}

.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 6px;
    font-weight: bold;
}

.form-group input {
    width: 100%;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 15px;
}




button {
    border: 0;
    border-radius: 5px;
    margin-top: 10px;
    padding: 10px 18px;
    background: #2f373c;
    color: #fff;
    cursor: pointer;
    font-size: 14px;
}

button:hover {
    opacity: .9;
}

/* =========================
   INVOICE
========================= */

.invoice {
    width: 210mm;
    min-height: 297mm;
    margin: 0 auto;
    padding: 20mm;

    background: white;

    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.15);
}


/* =========================
   HEADER
========================= */

.invoice-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;

    margin-bottom: 35px;
}


/* Logo */

.company-logo {
    width: 200px;
}

.company-logo img {
    width: 100px;
    height: 100px;
    object-fit: contain;
}


/* QR + Invoice Information */

.invoice-meta {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

.qr-container {
    width: 150px;
    height: 150px;
}

.qr-container img {
    width: 150px;
    height: 150px;
    object-fit: contain;
}

.invoice-info {
    width: 200px;
    margin-top: 10px;
}

.invoice-info-row {
    display: flex;
    justify-content: space-between;

    padding: 5px 0;

    border-bottom: 1px solid #ddd;

    font-size: 13px;
}

.invoice-info-row .label {
    font-weight: bold;
}


/* =========================
   COMPANY DETAILS
========================= */

.company-details,
.bill-to {
    margin-bottom: 30px;
}

.company-details h2,
.bill-to h2 {
    margin: 0 0 12px;

    padding-bottom: 7px;

    border-bottom: 2px solid #2f373c;

    font-size: 18px;
}

.company-details p,
.bill-to p {
    margin: 5px 0;
    font-size: 14px;
}


/* =========================
   PRODUCTS TABLE
========================= */

.products-section {
    margin-top: 32px;
}

.products-section table {
    width: 100%;
    border-collapse: collapse;
}

.products-section th,
.products-section td {
    border: 1px solid #ccc;
    padding: 8px;
    font-size: 13px;
}

.products-section th {
    background: #f1f1f1;
    text-align: left;
}

.empty-row {
    text-align: center;
    color: #777;
}

.totals-section {
    width: 320px;
    margin: 20px 0 0 auto;
}

.total-row {
    display: flex;
    justify-content: space-between;
    padding: 7px 0;
    border-bottom: 1px solid #ddd;
}

.grand-total {
    font-size: 17px;
    border-bottom: 2px solid #222;
    padding-top: 12px;
}


/* =========================
   PRINT
========================= */

@media print {

    body {
        padding: 0;
        background: white;
    }

    .form-section {
        display: none;
    }

    .invoice {
        width: 210mm;
        min-height: 297mm;
        margin: 0;
        padding: 15mm;

        box-shadow: none;
    }

    @page {
        size: A4;
        margin: 0;
    }
}