
body, html {
    height: 100%;
    font-family: "Noto Sans Lao", sans-serif !important;
    font-size: 0.95rem !important;   
}
.bg {
    background: #25a611;
    width: 100%;
    height: 100%;
    position: absolute;
    z-index: -1;
    clip-path: polygon(0 0, 55% 0, 45% 100%, 0% 100%);
}

.w-60p{
    width: 60px !important;
}
.w-90p{
    width: 90px !important;
}
.w-150p{
    width: 150px !important;
}

.canvas{
    height: 300px!important;
}
.toggle.ios, .toggle-on.ios, .toggle-off.ios { 
    border-radius: 20px; 
    font-weight: 100px;
}
.toggle.ios .toggle-handle { 
    border-radius: 20px; 
}
.toggle-on.btn {
    padding-right: 19px;
    font-weight: 100 !important;
}
.btn {
    font-size: inherit !important;
}

.card, .small-box, .small-box-footer{
    border-radius: 15px !important;
}
.small-box h1{
    font-size: 2rem !important;
}

.rtl{
    direction: rtl !important;
}

@media (max-width: 1400px) {
    .table-responsive-xxl {
      display: block;
      width: 100%;
      overflow-x: auto;
      -webkit-overflow-scrolling: touch;
    }
    .table-responsive-xxl > .table-bordered {
      border: 0;
    }
    #orders .detail{
        width: 300px !important;
    }
}

@media (max-width: 1200px) {
    .small-box h1 {
        font-size: 1.7rem !important;
    }
}

@media (max-width: 767px) {
    .small-box h1 {
        font-size: 1.4rem !important;
    }
}

.order-header {
    display: flex;
    align-items: center; 
    gap: 8px;
}

.order-number {
    background-color: #f5b7b1;
    font-weight: bold;
    color: #333;
    padding: 5px 5px;
    border-radius: 6px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    font-size: 1.1em;
    display: inline-block;
    max-width: 100%;
    word-wrap: break-word;
}

@media only screen and (max-width: 600px) {
    .order-number {
        font-size: 1em; 
        padding: 5px 5px; 
    }
    .order-header {
        gap: 4px;
    }
}

/* Invoice Section */
.invoice-box {
    font-family: 'Noto Sans Lao', sans-serif !important;
}

.invoice-box {
    padding: 30px;
    border: 1px solid #eee;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.15);
    margin-top: 20px;
    font-size: 18px;
    line-height: 24px;
    font-family: 'Helvetica Neue', 'Helvetica', Helvetica, Arial, sans-serif;
    color: #555;
}

.invoice-box table {
    width: 100%;
    line-height: inherit;
    text-align: left;
}

.invoice-box table td {
    padding: 5px;
    vertical-align: top;
}

.invoice-box table tr td:nth-child(2) {
    text-align: right;
}

.invoice-box table tr.top table td {
    padding-bottom: 20px;
}

.invoice-box table tr.top table td.title {
    font-size: 45px;
    line-height: 45px;
    color: #333;
}

.invoice-box table tr.information table td {
    padding-bottom: 40px;
}

.invoice-box table tr.heading td {
    background: #eee;
    border-bottom: 1px solid #ddd;
    font-weight: bold;
}

.invoice-box table tr.details td {
    padding-bottom: 20px;
}

.invoice-box table tr.item td {
    border-bottom: 1px solid #eee;
}

.invoice-box table tr.item.last td {
    border-bottom: none;
}

.invoice-box table tr.total td:nth-child(2) {
    border-top: 2px solid #eee;
    font-weight: bold;
}

@media only screen and (max-width: 600px) {
    .invoice-box table tr.top table td {
        width: 100%;
        display: block;
        text-align: center;
    }

    .invoice-box table tr.information table td {
        width: 100%;
        display: block;
        text-align: center;
    }
}

/* Print Section */
.invoice-box {
    font-family: 'Noto Sans Lao', sans-serif !important;
}

.invoice-box {
    padding: 30px;
    border: 1px solid #eee;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.15);
    margin-top: 20px;
    font-size: 18px;
    line-height: 24px;
    font-family: 'Helvetica Neue', 'Helvetica', Helvetica, Arial, sans-serif;
    color: #555;
}

.invoice-box table {
    width: 100%;
    line-height: inherit;
    text-align: left;
}

.invoice-box table td {
    padding: 5px;
    vertical-align: top;
}

.invoice-box table tr td:nth-child(2) {
    text-align: right;
}

.invoice-box table tr.top table td {
    padding-bottom: 20px;
}

.invoice-box table tr.top table td.title {
    font-size: 45px;
    line-height: 45px;
    color: #333;
}

.invoice-box table tr.information table td {
    padding-bottom: 40px;
}

.invoice-box table tr.heading td {
    background: #eee;
    border-bottom: 1px solid #ddd;
    font-weight: bold;
}

.invoice-box table tr.details td {
    padding-bottom: 20px;
}

.invoice-box table tr.item td {
    border-bottom: 1px solid #eee;
}

.invoice-box table tr.item.last td {
    border-bottom: none;
}

.invoice-box table tr.total td:nth-child(2) {
    border-top: 2px solid #eee;
    font-weight: bold;
}

@media only screen and (max-width: 600px) {
    .invoice-box table tr.top table td {
        width: 100%;
        display: block;
        text-align: center;
    }

    .invoice-box table tr.information table td {
        width: 100%;
        display: block;
        text-align: center;
    }
}

/* Print Section */
.information .row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-top: 5px;
    margin-top: -30px !important;
}

.information .col-md-4 {
    flex: 1;
    text-align: left;
    padding: 10px;
}

.text-left p {
    margin: 0;
    padding: 2px 0;
}

h2, h4 {
    margin-bottom: 5px;
}

@media print {
    body {
        font-family: 'Noto Sans Lao', sans-serif;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
        font-size: 12pt;
        margin: 0;
        padding: 0;
        width: 100%;
    }

    body::after {
        content: "Page " counter(page) " of " counter(pages);
        position: fixed;
        bottom: 0;
        left: 0;
        text-align: center;
        font-size: 10px;
        color: black;
        z-index: 1; /* Keep it behind other elements */
        background: white; /* Prevent transparency issues */
        width: 100%;
        height: auto;
        pointer-events: none; /* Ensure it doesn't interfere with layout */
    }

    img {
        z-index: 2; /* Ensure the logo appears above the footer */
        position: relative;
    }

    .invoice-box {
        width: 100%;
        padding: 20px;
        page-break-inside: avoid;
        margin: 0;
    }

    .navbar, .sidebar, .btn, .no-print {
        display: none !important;
    }

    .table {
        width: 100%;
        border-collapse: collapse;
        page-break-inside: auto; /* Ensure tables break across pages correctly */
    }

    .table th, .table td {
        border: 1px solid black;
        padding: 4px;
    }

    .table thead {
        display: table-header-group; /* Repeat table header on every page */
    }

    .table tfoot {
        display: table-footer-group; /* Repeat table footer on every page */
    }
    tr {
        page-break-inside: auto; /* Allow row breaking */
        page-break-after: auto; /* Allow breaking after rows */
    }
    .footer-account{
        margin-top: -20px;
    }

    img {
        max-width: 150px;
        display: block;
        margin: 0 auto;
    }

    .d-flex {
        display: flex;
        justify-content: space-between;
        align-items: center;
    }

    .text-center {
        text-align: center;
    }

    .ml-3 {
        margin-left: 1rem;
    }

    .text-left {
        text-align: left;
    }

    .font-weight-bold {
        font-weight: bold;
    }

    .text-success {
        color: green;
    }

    .mt-1 {
        margin-top: 0.25rem;
    }

    .mb-0 {
        margin-bottom: 0;
    }

    hr {
        margin: 10px 0;
        border: none;
        border-top: 1px solid black;
    }

    .text-center h2, .text-center h4 {
        margin-top: 5px !important;
        margin-bottom: 5px !important;
    }

    .row {
        margin-top: 0 !important;
    }

    .col-md-4 p {
        margin-bottom: 3px !important;
        padding-left: 10px;
    }

    .col-md-4 p:last-child {
        margin: 0 !important;
    }

    /* Updated QR and Total Section Styling */
    .qr-totals-row {
        display: flex;
        justify-content: space-between;
        align-items: flex-start;
        page-break-inside: avoid; /* Prevent QR section from breaking */
    }

    .qr-section {
        width: 48%;
        display: flex;
        justify-content: flex-start;
        align-items: flex-start;
        flex-wrap: wrap;
        gap: 10px;
    }

    .card {
        width: 48%; /* Each QR card takes up nearly half the QR section */
        margin: 0 auto;
        text-align: center;
    }

    .totals-section {
        width: 55%; /* Total section takes nearly half */
        text-align: right;
        page-break-inside: avoid; /* Prevent totals section from breaking */
    }

    .table-borderless td {
        border: none !important;
    }

    .table th, .table td {
        padding: 4px;
        text-align: right;
    }

    .font-weight-bold {
        font-weight: bold;
    }

    .text-success {
        color: green !important;
    }
}


/* Certificate Section */
.cer-card:hover {
    transform: scale(1.05); /* Slight scale up */
    box-shadow: 0px 4px 15px rgba(0, 0, 0, 0.2); /* Adds shadow on hover */
    cursor: pointer; /* Change cursor to pointer */
    transition: all 0.3s ease; /* Smooth transition */
}

.highlighted-title {
    font-weight: bold;         /* Makes the text bold */
    color: #ffffff;            /* Change the color, e.g., to orange */
    background-color: #427c1d; /* Adds a light yellow background */
    padding: 5px;              /* Adds padding around the text */
    border-radius: 4px;        /* Rounds the corners */
}
    .tg {
        border-collapse: collapse;
        border-spacing: 0;
        width: 100%;
    }

    .tg td {
        border-color: black;
        border-style: solid;
        border-width: 1px;
        font-size: 14px;
        overflow: hidden;
        padding: 5px 3px;
        word-break: normal;
    }

    .tg th {
        border-color: black;
        border-style: solid;
        border-width: 1px;
        font-size: 14px;
        font-weight: normal;
        overflow: hidden;
        padding: 5px 3px;
        word-break: normal;
    }

    .tg .tg-9wq8 {
        border-color: inherit;
        text-align: center;
        vertical-align: middle;
    }

    .tg .tg-c4ww {
        background-color: #cbcefb;
        border-color: inherit;
        text-align: center;
        vertical-align: top;
    }

    .tg .tg-c3ow {
        border-color: inherit;
        text-align: center;
        vertical-align: top;
    }

    .tg .tg-9czg {
        background-color: #9aff99;
        border-color: inherit;
        text-align: right;
        vertical-align: top;
    }

    .tg .tg-0pky {
        border-color: inherit;
        text-align: left;
        vertical-align: top;
    }

    .tg .tg-dvpl {
        border-color: inherit;
        text-align: right;
        vertical-align: top;
    }

    .tg .tg-fjve {
        background-color: #fd6864;
        border-color: inherit;
        text-align: right;
        vertical-align: top;
    }

    .tg .tg-z115 {
        background-color: #cbcefb;
        border-color: inherit;
        text-align: right;
        vertical-align: top;
    }

    #fromDate, #toDate {
        max-width: 200px; /* Adjust as needed */
        width: 100%;
    }

    