/* =============================
   PAGE SETUP
============================= */
@page {
    size: A4;
    margin: 10mm;
}

html, body {
    margin: 0;
    padding: 0;
    font-family: Arial, sans-serif;
    font-size: 11px;
    color: #000;
}

/* =============================
   PRINT ISOLATION (IMPORTANT)
============================= */
@media print {

    html, body {
        margin: 0;
        padding: 0;
    }

    .invoice-toolbar,
    .sidebar,
    .header,
    .no-print {
        display: none !important;
    }

    .content-wrapper,
    .main-content {
        margin: 0 !important;
        padding: 0 !important;
    }

    .invoice-wrapper {
        margin: 0 !important;
        padding: 0 !important;
    }

}

/* =============================
   INVOICE CONTAINER
============================= */
.print-root {
    width: 100%;
}

.tally-invoice {
    width: 100%;
}

/* =============================
   HEADER
============================= */
.ti-header {
    width: 100%;
    border: 1px solid #000;
    border-collapse: collapse;
}

.ti-header td {
    border: 1px solid #000;
    padding: 6px;
    vertical-align: top;
}

.ti-left { width: 65%; }
.ti-right { width: 35%; text-align: center; }

.ti-logo {
    max-height: 50px;
    margin-bottom: 4px;
}

.ti-company {
    font-size: 18px;
    font-weight: bold;
}

.ti-title {
    font-size: 16px;
    font-weight: bold;
}

/* =============================
   PARTY
============================= */
.ti-party {
    width: 100%;
    border: 1px solid #000;
    border-top: none;
    border-collapse: collapse;
}

.ti-party td {
    border-right: 1px solid #000;
    padding: 6px;
}

.ti-party td:last-child {
    border-right: none;
}

/* =============================
   ITEMS
============================= */
.ti-items {
    width: 100%;
    border-collapse: collapse;
}

.ti-items th,
.ti-items td {
    border: 1px solid #000;
    padding: 4px;
}

.ti-items th {
    background: #f2f2f2;
}

/* =============================
   TOTALS
============================= */
.ti-totals {
    width: 40%;
    margin-left: auto;
    border-collapse: collapse;
    margin-top: 6px;
}

.ti-totals td {
    border: 1px solid #000;
    padding: 4px;
}

.ti-totals .grand td {
    font-weight: bold;
    font-size: 12px;
}

/* =============================
   QR
============================= */
.ti-qr {
    text-align: center;
    margin-top: 10px;
}

#upiQR {
    width: 120px;
    height: 120px;
    margin: auto;
}

/* =============================
   HELPERS
============================= */
.c { text-align: center; }
.r { text-align: right; }
.ti-small { font-size: 10px; }

.ti-footer {
    margin-top: 10px;
    font-size: 10px;
    text-align: center;
}
