@page {
    size: A4;
    margin: 12mm;
}

html, body {
    margin: 0;
    padding: 0;
    background: #fff;
    font-family: Arial, sans-serif;
    font-size: 11px;
    color: #000;
}

/* MAIN */
.tally-invoice {
    width: 210mm;
    box-sizing: border-box;
}

/* HEADER */
.ti-header {
    border: 1px solid #000;
    border-collapse: collapse;
}

.ti-header td {
    border: 1px solid #000;
    padding: 6px;
    vertical-align: top;
}

.ti-head-left {
    width: 65%;
}

.ti-head-right {
    width: 35%;
    text-align: center;
}

.ti-brand {
    display: flex;
    align-items: center;
    gap: 10px;
}

.ti-logo {
    width: 70px;
    height: auto;
    max-height: 50px;
    object-fit: contain;
}

.ti-company-name {
    font-size: 20px;
    font-weight: bold;
    line-height: 1.2;
}

.ti-title {
    font-size: 16px;
    font-weight: bold;
}

.ti-address {
    font-size: 11px;
    line-height: 1.3;
}

.ti-meta {
    font-size: 11px;
}

.ti-original {
    font-size: 10px;
    font-weight: bold;
    margin-bottom: 4px;
}

/* BARCODE */
#barcode {
    display: block;
    max-width: 160px;
    height: 45px;
    margin: 6px auto 0;
}

/* PARTY */
.ti-party {
    border: 1px solid #000;
    border-top: none;
}

.ti-party td {
    border-right: 1px solid #000;
    padding: 6px;
    vertical-align: top;
}

.ti-party td:last-child {
    border-right: none;
}

/* ITEMS */
.ti-items {
    width: 100%;
    border-collapse: collapse;
    font-size: 10.5px;
}

.ti-items th, .ti-items td {
    border: 1px solid #000;
    padding: 3px 4px;
}

.ti-items th {
    background: #f2f2f2;
    text-align: center;
    font-weight: bold;
}

.ti-desc {
    font-size: 9px;
    color: #333;
    margin-top: 2px;
}

/* BOTTOM */
.ti-bottom {
    margin-top: 6px;
}

.ti-hsn, .ti-totals {
    width: 100%;
    border-collapse: collapse;
}

.ti-hsn th, .ti-hsn td,
.ti-totals td {
    border: 1px solid #000;
    padding: 4px;
}

.ti-hsn th {
    background: #f2f2f2;
    text-align: center;
}

.ti-grand td {
    font-weight: bold;
    font-size: 12px;
}

/* WORDS */
.ti-words {
    border: 1px solid #000;
    padding: 5px;
    margin-top: 5px;
}

/* BANK + QR */
.ti-bank {
    border: 1px solid #000;
    margin-top: 5px;
    border-collapse: collapse;
}

.ti-bank td {
    border-right: 1px solid #000;
    padding: 6px;
    vertical-align: top;
}

.ti-bank td:last-child {
    border-right: none;
}

.ti-qr-box {
    text-align: center;
    vertical-align: middle;
}

#upiQR {
    width: 110px;
    margin: auto;
}

.ti-qr-text {
    font-size: 10px;
    font-weight: bold;
    margin-top: 4px;
}

.ti-qr-amt {
    font-size: 11px;
    margin-top: 2px;
}

/* TERMS */
.ti-terms {
    border: 1px solid #000;
    border-top: none;
    padding: 6px;
    font-size: 10px;
    line-height: 1.3;

}

/* SIGN */
.ti-sign {
    border: 1px solid #000;
    border-top: none;
    border-collapse: collapse;

}

.ti-sign td {
    border-right: 1px solid #000;
font-size: 18px;
    padding: 8px;
    vertical-align: top;

}
.decdata {
font-size: 13px;
text-wrap: wrap;
}
.ti-sign td:last-child {
    border-right: none;
    text-align: right;
}

/* ALIGN HELPERS */
.r { text-align: right; }
.c { text-align: center; }

/* PRINT FIX */


@media print {
    body * {
        visibility: hidden;
    }

    .tally-invoice,
    .tally-invoice * {
        visibility: visible;

        max-width: 190mm;
left:-12%;
    }

    .tally-invoice {
        position: relative;
border: 1px solid #000;
    }
}
