@import '_content/Microsoft.AspNetCore.Components.QuickGrid/Microsoft.AspNetCore.Components.QuickGrid.boiwgh0w5b.bundle.scp.css';

/* /Components/Layout/MainLayout.razor.rz.scp.css */
.page[b-dq5417sx1h] {
    position: relative;
    display: flex;
    flex-direction: column;
}

main[b-dq5417sx1h] {
    flex: 1;
}

.sidebar[b-dq5417sx1h] {
    background-image: linear-gradient(180deg, rgb(5, 39, 103) 0%, #3a0647 70%);
}

.top-row[b-dq5417sx1h] {
    background-color: #f7f7f7;
    border-bottom: 1px solid #d6d5d5;
    justify-content: flex-end;
    height: 3.5rem;
    display: flex;
    align-items: center;
}

    .top-row[b-dq5417sx1h]  a, .top-row[b-dq5417sx1h]  .btn-link {
        white-space: nowrap;
        margin-left: 1.5rem;
        text-decoration: none;
    }

    .top-row[b-dq5417sx1h]  a:hover, .top-row[b-dq5417sx1h]  .btn-link:hover {
        text-decoration: underline;
    }

    .top-row[b-dq5417sx1h]  a:first-child {
        overflow: hidden;
        text-overflow: ellipsis;
    }

@media (max-width: 640.98px) {
    .top-row[b-dq5417sx1h] {
        justify-content: space-between;
    }

    .top-row[b-dq5417sx1h]  a, .top-row[b-dq5417sx1h]  .btn-link {
        margin-left: 0;
    }
}

@media (min-width: 641px) {
    .page[b-dq5417sx1h] {
        flex-direction: row;
    }

    .sidebar[b-dq5417sx1h] {
        width: 250px;
        height: 100vh;
        position: sticky;
        top: 0;
    }

    .top-row[b-dq5417sx1h] {
        position: sticky;
        top: 0;
        z-index: 1;
    }

    .top-row.auth[b-dq5417sx1h]  a:first-child {
        flex: 1;
        text-align: right;
        width: 0;
    }

    .top-row[b-dq5417sx1h], article[b-dq5417sx1h] {
        padding-left: 2rem !important;
        padding-right: 1.5rem !important;
    }
}

#blazor-error-ui[b-dq5417sx1h] {
    color-scheme: light only;
    background: lightyellow;
    bottom: 0;
    box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
    box-sizing: border-box;
    display: none;
    left: 0;
    padding: 0.6rem 1.25rem 0.7rem 1.25rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
}

    #blazor-error-ui .dismiss[b-dq5417sx1h] {
        cursor: pointer;
        position: absolute;
        right: 0.75rem;
        top: 0.5rem;
    }
/* /Components/Layout/NavMenu.razor.rz.scp.css */
.navbar-toggler[b-x6mkdwrqdg] {
    appearance: none;
    cursor: pointer;
    width: 3.5rem;
    height: 2.5rem;
    color: white;
    position: absolute;
    top: 0.5rem;
    right: 1rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%28255, 255, 255, 0.55%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e") no-repeat center/1.75rem rgba(255, 255, 255, 0.1);
}

.navbar-toggler:checked[b-x6mkdwrqdg] {
    background-color: rgba(255, 255, 255, 0.5);
}

.top-row[b-x6mkdwrqdg] {
    min-height: 3.5rem;
    background-color: rgba(0,0,0,0.4);
}

.navbar-brand[b-x6mkdwrqdg] {
    font-size: 1.1rem;
}

.bi[b-x6mkdwrqdg] {
    display: inline-block;
    position: relative;
    width: 1.25rem;
    height: 1.25rem;
    margin-right: 0.75rem;
    top: -1px;
    background-size: cover;
}

.bi-house-door-fill-nav-menu[b-x6mkdwrqdg] {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='white' class='bi bi-house-door-fill' viewBox='0 0 16 16'%3E%3Cpath d='M6.5 14.5v-3.505c0-.245.25-.495.5-.495h2c.25 0 .5.25.5.5v3.5a.5.5 0 0 0 .5.5h4a.5.5 0 0 0 .5-.5v-7a.5.5 0 0 0-.146-.354L13 5.793V2.5a.5.5 0 0 0-.5-.5h-1a.5.5 0 0 0-.5.5v1.293L8.354 1.146a.5.5 0 0 0-.708 0l-6 6A.5.5 0 0 0 1.5 7.5v7a.5.5 0 0 0 .5.5h4a.5.5 0 0 0 .5-.5Z'/%3E%3C/svg%3E");
}

.bi-plus-square-fill-nav-menu[b-x6mkdwrqdg] {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='white' class='bi bi-plus-square-fill' viewBox='0 0 16 16'%3E%3Cpath d='M2 0a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V2a2 2 0 0 0-2-2H2zm6.5 4.5v3h3a.5.5 0 0 1 0 1h-3v3a.5.5 0 0 1-1 0v-3h-3a.5.5 0 0 1 0-1h3v-3a.5.5 0 0 1 1 0z'/%3E%3C/svg%3E");
}

.bi-list-nested-nav-menu[b-x6mkdwrqdg] {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='white' class='bi bi-list-nested' viewBox='0 0 16 16'%3E%3Cpath fill-rule='evenodd' d='M4.5 11.5A.5.5 0 0 1 5 11h10a.5.5 0 0 1 0 1H5a.5.5 0 0 1-.5-.5zm-2-4A.5.5 0 0 1 3 7h10a.5.5 0 0 1 0 1H3a.5.5 0 0 1-.5-.5zm-2-4A.5.5 0 0 1 1 3h10a.5.5 0 0 1 0 1H1a.5.5 0 0 1-.5-.5z'/%3E%3C/svg%3E");
}

.nav-item[b-x6mkdwrqdg] {
    font-size: 0.9rem;
    padding-bottom: 0.5rem;
}

    .nav-item:first-of-type[b-x6mkdwrqdg] {
        padding-top: 1rem;
    }

    .nav-item:last-of-type[b-x6mkdwrqdg] {
        padding-bottom: 1rem;
    }

    .nav-item[b-x6mkdwrqdg]  .nav-link {
        color: #d7d7d7;
        background: none;
        border: none;
        border-radius: 4px;
        height: 3rem;
        display: flex;
        align-items: center;
        line-height: 3rem;
        width: 100%;
    }

.nav-item[b-x6mkdwrqdg]  a.active {
    background-color: rgba(255,255,255,0.37);
    color: white;
}

.nav-item[b-x6mkdwrqdg]  .nav-link:hover {
    background-color: rgba(255,255,255,0.1);
    color: white;
}

.nav-scrollable[b-x6mkdwrqdg] {
    display: none;
}

.navbar-toggler:checked ~ .nav-scrollable[b-x6mkdwrqdg] {
    display: block;
}

@media (min-width: 641px) {
    .navbar-toggler[b-x6mkdwrqdg] {
        display: none;
    }

    .nav-scrollable[b-x6mkdwrqdg] {
        /* Never collapse the sidebar for wide screens */
        display: block;

        /* Allow sidebar to scroll for tall menus */
        height: calc(100vh - 3.5rem);
        overflow-y: auto;
    }
}
/* /Components/Layout/ReconnectModal.razor.rz.scp.css */
.components-reconnect-first-attempt-visible[b-jszmmrag17],
.components-reconnect-repeated-attempt-visible[b-jszmmrag17],
.components-reconnect-failed-visible[b-jszmmrag17],
.components-pause-visible[b-jszmmrag17],
.components-resume-failed-visible[b-jszmmrag17],
.components-rejoining-animation[b-jszmmrag17] {
    display: none;
}

#components-reconnect-modal.components-reconnect-show .components-reconnect-first-attempt-visible[b-jszmmrag17],
#components-reconnect-modal.components-reconnect-show .components-rejoining-animation[b-jszmmrag17],
#components-reconnect-modal.components-reconnect-paused .components-pause-visible[b-jszmmrag17],
#components-reconnect-modal.components-reconnect-resume-failed .components-resume-failed-visible[b-jszmmrag17],
#components-reconnect-modal.components-reconnect-retrying[b-jszmmrag17],
#components-reconnect-modal.components-reconnect-retrying .components-reconnect-repeated-attempt-visible[b-jszmmrag17],
#components-reconnect-modal.components-reconnect-retrying .components-rejoining-animation[b-jszmmrag17],
#components-reconnect-modal.components-reconnect-failed[b-jszmmrag17],
#components-reconnect-modal.components-reconnect-failed .components-reconnect-failed-visible[b-jszmmrag17] {
    display: block;
}


#components-reconnect-modal[b-jszmmrag17] {
    background-color: white;
    width: 20rem;
    margin: 20vh auto;
    padding: 2rem;
    border: 0;
    border-radius: 0.5rem;
    box-shadow: 0 3px 6px 2px rgba(0, 0, 0, 0.3);
    opacity: 0;
    transition: display 0.5s allow-discrete, overlay 0.5s allow-discrete;
    animation: components-reconnect-modal-fadeOutOpacity-b-jszmmrag17 0.5s both;
    &[open]

{
    animation: components-reconnect-modal-slideUp-b-jszmmrag17 1.5s cubic-bezier(.05, .89, .25, 1.02) 0.3s, components-reconnect-modal-fadeInOpacity-b-jszmmrag17 0.5s ease-in-out 0.3s;
    animation-fill-mode: both;
}

}

#components-reconnect-modal[b-jszmmrag17]::backdrop {
    background-color: rgba(0, 0, 0, 0.4);
    animation: components-reconnect-modal-fadeInOpacity-b-jszmmrag17 0.5s ease-in-out;
    opacity: 1;
}

@keyframes components-reconnect-modal-slideUp-b-jszmmrag17 {
    0% {
        transform: translateY(30px) scale(0.95);
    }

    100% {
        transform: translateY(0);
    }
}

@keyframes components-reconnect-modal-fadeInOpacity-b-jszmmrag17 {
    0% {
        opacity: 0;
    }

    100% {
        opacity: 1;
    }
}

@keyframes components-reconnect-modal-fadeOutOpacity-b-jszmmrag17 {
    0% {
        opacity: 1;
    }

    100% {
        opacity: 0;
    }
}

.components-reconnect-container[b-jszmmrag17] {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

#components-reconnect-modal p[b-jszmmrag17] {
    margin: 0;
    text-align: center;
}

#components-reconnect-modal button[b-jszmmrag17] {
    border: 0;
    background-color: #6b9ed2;
    color: white;
    padding: 4px 24px;
    border-radius: 4px;
}

    #components-reconnect-modal button:hover[b-jszmmrag17] {
        background-color: #3b6ea2;
    }

    #components-reconnect-modal button:active[b-jszmmrag17] {
        background-color: #6b9ed2;
    }

.components-rejoining-animation[b-jszmmrag17] {
    position: relative;
    width: 80px;
    height: 80px;
}

    .components-rejoining-animation div[b-jszmmrag17] {
        position: absolute;
        border: 3px solid #0087ff;
        opacity: 1;
        border-radius: 50%;
        animation: components-rejoining-animation-b-jszmmrag17 1.5s cubic-bezier(0, 0.2, 0.8, 1) infinite;
    }

        .components-rejoining-animation div:nth-child(2)[b-jszmmrag17] {
            animation-delay: -0.5s;
        }

@keyframes components-rejoining-animation-b-jszmmrag17 {
    0% {
        top: 40px;
        left: 40px;
        width: 0;
        height: 0;
        opacity: 0;
    }

    4.9% {
        top: 40px;
        left: 40px;
        width: 0;
        height: 0;
        opacity: 0;
    }

    5% {
        top: 40px;
        left: 40px;
        width: 0;
        height: 0;
        opacity: 1;
    }

    100% {
        top: 0px;
        left: 0px;
        width: 80px;
        height: 80px;
        opacity: 0;
    }
}
/* /Components/Pages/Trading/SgBill.razor.rz.scp.css */
/* ========== Voucher Popup Styling (Matching Image) ========== */
.sgbill-popup-voucher[b-ktw3xvjf9x] {
    width: 90vw !important;
    max-width: 1400px !important;
    max-height: 95vh !important;
    /* Keep it within view always */
    border: 2px solid #252467 !important;
    border-radius: 4px !important;
    padding: 0 !important;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    /* Ensure vertical layout for header/body/footer */
}

.voucher-popup-header[b-ktw3xvjf9x] {
    background: linear-gradient(to right, #252467, #4c1d95);
    color: white;
    padding: 8px 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 2px solid #1e1b4b;
}

.voucher-popup-title[b-ktw3xvjf9x] {
    font-weight: 700;
    font-size: 16px;
    letter-spacing: 0.5px;
}

.voucher-popup-close[b-ktw3xvjf9x] {
    cursor: pointer;
    font-size: 18px;
    opacity: 0.8;
}

.voucher-popup-close:hover[b-ktw3xvjf9x] {
    opacity: 1;
}

.voucher-popup-body[b-ktw3xvjf9x] {
    padding: 15px;
    background: #ffffff;
    flex: 1;
    /* Take all available space between header and footer */
    overflow-y: auto;
    /* Enable scroll if content is tall */
    min-height: 0;
    /* Flex overflow fix */
}

.voucher-entry-row[b-ktw3xvjf9x] {
    display: flex;
    flex-wrap: nowrap;
    gap: 3px;
    /* Minimal gap */
    align-items: flex-end;
    margin-bottom: 8px;
    padding: 4px 6px;
    /* Very tight padding */
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 4px;
    overflow: hidden;
    /* Force hide any scrolling */
}

.voucher-field-group[b-ktw3xvjf9x] {
    display: flex;
    flex-direction: column;
    gap: 3px;
    flex: 0 0 auto;
}

/* Even smaller widths for ultra-compact fit */
.field-voucher[b-ktw3xvjf9x] {
    width: 110px;
}

.field-type[b-ktw3xvjf9x] {
    width: 150px;
}

.field-gross[b-ktw3xvjf9x] {
    width: 70px;
}

.field-purity[b-ktw3xvjf9x] {
    width: 60px;
}

.field-wast[b-ktw3xvjf9x] {
    width: 60px;
}

.field-wb[b-ktw3xvjf9x] {
    width: 120px;
}

.field-fine[b-ktw3xvjf9x] {
    width: 75px;
}

.field-rate[b-ktw3xvjf9x] {
    width: 85px;
}

.field-amount[b-ktw3xvjf9x] {
    width: 85px;
}

.field-remarks[b-ktw3xvjf9x] {
    flex: 1;
    min-width: 60px;
}

/* Ultra-shrinking textboxes and components */
.voucher-entry-row .e-input-group[b-ktw3xvjf9x],
.voucher-entry-row .e-input-group.e-control-wrapper[b-ktw3xvjf9x],
.voucher-entry-row .e-control-wrapper[b-ktw3xvjf9x] {
    height: 22px !important;
    min-height: 22px !important;
    min-width: 0 !important;
    /* Force respect parent */
}

.voucher-entry-row .e-input[b-ktw3xvjf9x] {
    font-size: 9px !important;
    padding: 0 3px !important;
    height: 20px !important;
}

.voucher-entry-row .e-ddl.e-input-group .e-input-group-icon[b-ktw3xvjf9x],
.voucher-entry-row .e-numeric.e-input-group .e-input-group-icon[b-ktw3xvjf9x] {
    min-height: 20px !important;
    font-size: 9px !important;
    width: 20px !important;
}

.voucher-field-group label[b-ktw3xvjf9x] {
    font-size: 13px;
    font-weight: 700;
    color: #334155;
    white-space: nowrap;
    margin-bottom: 5px;
    /* Increased from 3px to keep border/box far from label */
    line-height: 1.2;
}

.voucher-action-cell[b-ktw3xvjf9x] {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.voucher-entry-btn[b-ktw3xvjf9x] {
    background: #252467 !important;
    color: white !important;
    border: none !important;
    height: 32px !important;
    width: 38px !important;
    border-radius: 4px !important;
}

.voucher-grid-container[b-ktw3xvjf9x] {
    border: 1px solid #cbd5e1;
    border-radius: 4px;
    margin-bottom: 15px;
    max-height: 250px;
    /* Reduced height to keep UI compact */
    overflow-y: auto;
    /* Scroll only if content exceeds 250px */
}

.voucher-grid[b-ktw3xvjf9x] {
    border: none !important;
}

.voucher-grid .e-headercell[b-ktw3xvjf9x] {
    background: #f1f5f9 !important;
    color: #334155 !important;
    font-weight: 700 !important;
    text-transform: capitalize !important;
    border-bottom: 2px solid #cbd5e1 !important;
}

.voucher-footer[b-ktw3xvjf9x] {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    /* Changed from flex-start to align better at the bottom */
    margin-top: 15px;
    margin-bottom: 20px;
    gap: 15px;
}

.voucher-footer-left[b-ktw3xvjf9x] {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.total-gross-label[b-ktw3xvjf9x] {
    font-weight: 700;
    font-size: 13px;
    /* Reduced to 13px as requested */
    color: #475569;
    margin-bottom: 2px;
}

.total-boxes[b-ktw3xvjf9x] {
    display: flex;
    gap: 10px;
}

.total-box[b-ktw3xvjf9x] {
    width: 120px;
    height: 32px;
    background: #f1f5f9;
    border: 1px solid #cbd5e1;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding: 0 8px;
    font-weight: 700;
    font-size: 13px;
    border-radius: 4px;
}

.voucher-footer-right[b-ktw3xvjf9x] {
    min-width: 320px;
    /* Reduced from 420px to ensure it fits "inside the form" */
    max-width: 400px;
    flex: 0 1 auto;
}

.summary-card[b-ktw3xvjf9x] {
    background: #fff;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    padding: 15px 5px;
    /* Increased top/bottom, set horizontal for lines to manage edge spacing */
    box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1);
}

.summary-line[b-ktw3xvjf9x] {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 6px;
    /* Adjusted padding for 13px font */
    border-bottom: 1px dashed #e2e8f0;
    margin: 0 !important;
}

.summary-line:last-child[b-ktw3xvjf9x] {
    border-bottom: none;
}

.voucher-summary-label[b-ktw3xvjf9x] {
    font-weight: 700 !important;
    font-size: 13px !important;
    text-transform: uppercase !important;
    letter-spacing: 0.05em !important;
    white-space: nowrap !important;
    color: inherit;
    margin: 0 !important;
    line-height: normal !important;
    padding-left: 15px;
    /* Indent label from border */
}

.summary-value[b-ktw3xvjf9x] {
    font-weight: 700 !important;
    font-size: 13px !important;
    text-align: right !important;
    margin: 0 !important;
    line-height: normal !important;
    padding-right: 15px;
    /* Indent value from border */
}

.voucher-save-section[b-ktw3xvjf9x] {
    padding: 10px 15px;
    border-top: 1px solid #e2e8f0;
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    background: #f8fafc;
    flex-shrink: 0;
    /* Ensure it stays visible at the bottom */
}

.action-buttons-container[b-ktw3xvjf9x] {
    display: flex;
    gap: 8px;
    justify-content: center;
}

.action-icon-btn[b-ktw3xvjf9x] {
    width: 28px !important;
    height: 28px !important;
    padding: 0 !important;
    border-radius: 6px !important;
    min-width: 28px !important;
}

.delete-btn:hover[b-ktw3xvjf9x] {
    background-color: #fee2e2 !important;
    color: #ef4444 !important;
}

.delete-icon-wrapper[b-ktw3xvjf9x] {
    background: #fef2f2;
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
}

/* ========== Payment Section Redesign ========== */
.payment-section-layout[b-ktw3xvjf9x] {
    display: flex;
    gap: 0;
    border: 1px solid var(--slate-300);
    border-radius: 4px;
    background: #fff;
    min-height: 80px;
    max-height: 120px;
    overflow: hidden;
}

.payment-sidebar[b-ktw3xvjf9x] {
    display: flex;
    flex-direction: column;
    flex: 0 0 100px;
    /* Increased from 55px */
    border-right: 1px solid var(--slate-300);
    background: #252467;
    height: auto;
}

.payment-sidebar-btn[b-ktw3xvjf9x],
.payment-sidebar-btn.e-btn[b-ktw3xvjf9x],
.payment-sidebar .e-btn[b-ktw3xvjf9x],
.payment-sidebar button.e-btn[b-ktw3xvjf9x],
.payment-sidebar .e-css.e-btn[b-ktw3xvjf9x] {
    flex: 1;
    width: 100% !important;
    border-radius: 0 !important;
    font-size: 10px !important;
    /* Increased from 8px */
    font-weight: 700 !important;
    text-transform: uppercase;
    border: none !important;
    box-shadow: none !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2) !important;
    background: #252467 !important;
    background-color: #252467 !important;
    color: #ffffff !important;
    padding: 4px 3px !important;
    white-space: normal !important;
    line-height: 1.1 !important;
    opacity: 1 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    visibility: visible !important;
    min-height: 35px !important;
}

.payment-sidebar-btn:last-child[b-ktw3xvjf9x],
.payment-sidebar .e-btn:last-child[b-ktw3xvjf9x] {
    border-bottom: none !important;
}

.payment-sidebar-btn:hover[b-ktw3xvjf9x],
.payment-sidebar .e-btn:hover[b-ktw3xvjf9x] {
    background: #312e81 !important;
    background-color: #312e81 !important;
    color: #ffffff !important;
}

.payment-main-content[b-ktw3xvjf9x] {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
    border: none !important;
}

.payment-grid-container[b-ktw3xvjf9x] {
    flex: 1;
    overflow-y: auto;
    overflow-x: auto;
}

.btn-delete-row[b-ktw3xvjf9x] {
    background: none;
    border: none;
    color: #ef4444;
    cursor: pointer;
    padding: 0 4px;
    font-size: 1.2rem;
    line-height: 1;
    border-radius: 4px;
}

.btn-delete-row:hover[b-ktw3xvjf9x] {
    background-color: #fee2e2;
}

/* ========== CSS Variables ========== */
:root[b-ktw3xvjf9x] {
    --primary-brand: #252467;
    --accent-glow: #2563eb;
    --slate-50: #f8fafc;
    --slate-100: #f1f5f9;
    --slate-200: #e2e8f0;
    --slate-300: #cbd5e1;
    --slate-400: #94a3b8;
    --slate-500: #64748b;
    --slate-600: #475569;
    --slate-700: #334155;
    --shadow-soft: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px -1px rgba(0, 0, 0, 0.1);
    --border-radius-md: 8px;
    --silver-btn: #252467;
    --gold-btn: #252467;
}

/* ========== Base Layout ========== */
.page-container[b-ktw3xvjf9x] {
    max-width: 100%;
    height: auto !important;
    min-height: min-content !important;
    overflow: visible !important;
    font-family: 'Inter', system-ui, -apple-system, sans-serif !important;
    animation: fadeIn-b-ktw3xvjf9x 0.2s ease-in;
}

@keyframes fadeIn-b-ktw3xvjf9x {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.full-width-content[b-ktw3xvjf9x] {
    padding: 6px 15px !important;
    background: #ffffff;
    height: auto !important;
    overflow: visible !important;
}

.sgbill-layout[b-ktw3xvjf9x] {
    display: flex;
    flex-direction: column;
    gap: 8px; /* Increased gap for better spacing */
    max-width: 100%;
    height: auto !important;
    min-height: 0 !important;
    padding-bottom: 120px !important; /* Force extra space at bottom for footer visibility */
    overflow: visible !important;
}

/* Removed fixed desktop height to prevent grid being pushed off by expanded headers */

/* ========== Card Components ========== */
.premium-card[b-ktw3xvjf9x] {
    background: #ffffff;
    border-radius: var(--border-radius-md);
    box-shadow: var(--shadow-soft);
    border: 1px solid var(--slate-100);
    overflow: visible;
    max-width: 100%;
    contain: layout style;
    flex-shrink: 0;
}

.premium-card:last-child[b-ktw3xvjf9x] {
    border-bottom: none;
}

.card-body-premium[b-ktw3xvjf9x] {
    padding: 8px 12px;
}

.header-card .card-body-premium[b-ktw3xvjf9x] {
    padding: 6px 12px;
}

.footer-card .card-body-premium[b-ktw3xvjf9x] {
    padding: 4px 10px;
    padding-right: 0 !important;
}

/* ========== Header Section ========== */
.header-main-container[b-ktw3xvjf9x] {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    justify-content: space-between;
    flex-wrap: wrap;
}

.header-left-col[b-ktw3xvjf9x] {
    flex: 1 1 500px;
    max-width: 600px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.header-right-col[b-ktw3xvjf9x] {
    flex: 0 1 500px;
    min-width: 300px;
}

.header-row[b-ktw3xvjf9x] {
    display: flex;
    gap: 8px;
    align-items: center;
}

.header-field[b-ktw3xvjf9x] {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.w-60[b-ktw3xvjf9x] {
    flex: 0 0 60px;
}

.w-150[b-ktw3xvjf9x] {
    flex: 0 0 150px;
}

.w-168[b-ktw3xvjf9x] {
    flex: 0 0 168px;
}

.w-225[b-ktw3xvjf9x] {
    flex: 0 0 225px;
}

.w-240[b-ktw3xvjf9x] {
    flex: 0 0 240px;
}

.flex-row-gap[b-ktw3xvjf9x] {
    display: flex;
    flex-direction: row;
    gap: 6px;
}


.history-grid-wrapper[b-ktw3xvjf9x] {
    background: var(--slate-50);
    border: none !important;
    box-shadow: none !important;
    border-radius: 6px;
    overflow: auto;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.history-table[b-ktw3xvjf9x] {
    width: 100%;
    border-collapse: collapse;
    font-size: 11px;
    table-layout: fixed;
    border: none !important;
}

.history-table thead th[b-ktw3xvjf9x] {
    background: var(--slate-100);
    padding: 5px 6px;
    font-weight: 600;
    font-size: 10px;
    text-align: left;
    border: none !important;
    white-space: nowrap;
    position: sticky;
    top: 0;
    z-index: 1;
    color: var(--slate-600);
}

.history-table tbody td[b-ktw3xvjf9x] {
    padding: 4px 6px;
    border: none !important;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: var(--slate-700);
}

.history-table tbody tr:hover[b-ktw3xvjf9x] {
    background: var(--slate-100);
}

.history-table th:nth-child(1)[b-ktw3xvjf9x],
.history-table td:nth-child(1)[b-ktw3xvjf9x] {
    width: 28%;
}

.history-table th:nth-child(2)[b-ktw3xvjf9x],
.history-table td:nth-child(2)[b-ktw3xvjf9x] {
    width: 22%;
}

.history-table th:nth-child(3)[b-ktw3xvjf9x],
.history-table td:nth-child(3)[b-ktw3xvjf9x] {
    width: 22%;
}

.history-table th:nth-child(4)[b-ktw3xvjf9x],
.history-table td:nth-child(4)[b-ktw3xvjf9x] {
    width: 28%;
}

/* ========== Table Section ========== */
.table-card .card-body-premium[b-ktw3xvjf9x] {
    padding: 0;
}

.table-scroll-wrapper[b-ktw3xvjf9x] {
    overflow: auto;
    flex: 0 1 auto;
    min-height: 100px; 
    max-width: 100%;
    border: 1px solid var(--slate-200);
    content-visibility: auto;
}

.table-card[b-ktw3xvjf9x] {
    flex: 0 1 auto !important;
    /* Shrink to content */
    min-height: 0 !important;
    overflow: hidden !important;
    display: flex;
    flex-direction: column;
}

.table-card .card-body-premium[b-ktw3xvjf9x] {
    flex: 0 1 auto;
    min-height: 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.table-scroll-wrapper[b-ktw3xvjf9x] {
    width: 100%;
    overflow: auto;
    position: relative;
}

.main-item-grid-wrapper[b-ktw3xvjf9x] {
    max-height: 155px !important; /* header + ~3 rows forced */
    min-height: 0 !important;
    overflow-y: auto !important;
}

.footer-card[b-ktw3xvjf9x] {
    flex-shrink: 0 !important;
}

.summary-section-wrapper[b-ktw3xvjf9x] {
    max-width: 100%;
    background: #ffffff;
    border-bottom: 1px solid var(--slate-200);
    margin: 5px 15px;
}

.summary-row-fields[b-ktw3xvjf9x] {
    padding: 4px 8px;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.sgbill-table[b-ktw3xvjf9x] {
    width: 100%;
    border-collapse: collapse;
    font-size: 11px;
    min-width: 1700px;
    background: #ffffff;
    table-layout: fixed;
}

.sgbill-table thead th[b-ktw3xvjf9x] {
    background: var(--slate-50);
    padding: 6px 4px;
    font-weight: 600;
    font-size: 10px;
    text-align: center;
    border: 1px solid var(--slate-300);
    white-space: nowrap;
    position: sticky;
    top: 0;
    z-index: 10;
    color: var(--slate-600);
}

.sgbill-table tbody td[b-ktw3xvjf9x] {
    padding: 8px 2px 2px 2px;
    border: 1px solid var(--slate-200);
    vertical-align: top;
    background: #ffffff;
}

/* Row colors matching legacy grdDetails_CellFormatting */
/* Pink/Red for Sale items: rgb(255,192,192) */
.sgbill-table tbody tr.row-pink[b-ktw3xvjf9x],
.sgbill-table tbody tr.row-pink td[b-ktw3xvjf9x] {
    background-color: rgb(255, 192, 192) !important;
}

/* Green for Return items: rgb(192,255,192) */
.sgbill-table tbody tr.row-green[b-ktw3xvjf9x],
.sgbill-table tbody tr.row-green td[b-ktw3xvjf9x] {
    background-color: rgb(192, 255, 192) !important;
}

/* Main Grid Header - Neutral theme */
.main-grid-pink thead th[b-ktw3xvjf9x] {
    background: #f1f5f9 !important;
    color: #475569 !important;
    border-color: #cbd5e1 !important;
}

/* Payment Grid - Neutral theme */
.payment-grid-green[b-ktw3xvjf9x] {
    background-color: #ffffff !important;
}

.payment-grid-green thead th[b-ktw3xvjf9x] {
    background: #f1f5f9 !important;
    color: #475569 !important;
    border-color: #cbd5e1 !important;
}

.payment-grid-green tbody tr[b-ktw3xvjf9x] {
    background-color: #ffffff !important;
}

/* Row-highlighted takes priority over sale/return colors (validation errors) */
.sgbill-table tbody tr.row-highlighted[b-ktw3xvjf9x],
.sgbill-table tbody tr.row-highlighted td[b-ktw3xvjf9x],
.sgbill-table tbody tr.row-highlighted.row-sale[b-ktw3xvjf9x],
.sgbill-table tbody tr.row-highlighted.row-sale td[b-ktw3xvjf9x],
.sgbill-table tbody tr.row-highlighted.row-return[b-ktw3xvjf9x],
.sgbill-table tbody tr.row-highlighted.row-return td[b-ktw3xvjf9x] {
    background-color: #ff6b6b !important;
}

.sgbill-popup-actions .e-outline:hover[b-ktw3xvjf9x] {
    background-color: transparent !important;
    color: inherit !important;
}

.sgbill-popup-section-title[b-ktw3xvjf9x] {
    font-size: 11px;
    font-weight: 700;
    color: var(--slate-600);
    margin: 12px 0 8px 0;
    padding-bottom: 4px;
    border-bottom: 1px dashed #e2e8f0;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.sgbill-popup-grid-row[b-ktw3xvjf9x] {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 10px;
}

.sgbill-popup-opening-row[b-ktw3xvjf9x] {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    align-items: end;
}

.sgbill-popup-opening-field-group[b-ktw3xvjf9x] {
    display: flex;
    align-items: center;
    gap: 0;
    border: 1px solid var(--slate-200);
    border-radius: 4px;
    overflow: hidden;
}

.sgbill-popup-opening-field-group .e-numeric[b-ktw3xvjf9x],
.sgbill-popup-opening-field-group .e-ddl[b-ktw3xvjf9x] {
    border: none !important;
}

.sgbill-popup-opening-field-group .e-numeric[b-ktw3xvjf9x] {
    flex: 1;
}

.sgbill-popup-opening-field-group .e-ddl[b-ktw3xvjf9x] {
    width: 100px;
    background: #f8fafc;
    border-left: 1px solid var(--slate-200) !important;
}

.sgbill-popup-opening-date-row[b-ktw3xvjf9x] {
    display: grid;
    grid-template-columns: 1fr 1fr 1.5fr;
    gap: 12px;
    margin-top: 8px;
}

.table-input[b-ktw3xvjf9x] {
    width: 100%;
    font-size: 11px;
}

.calculation-group .e-numerictextbox.e-small .e-input[b-ktw3xvjf9x] {
    padding: 0 6px !important;
    font-size: 11px !important;
}

.table-input .e-input-group[b-ktw3xvjf9x],
.table-input.e-input-group[b-ktw3xvjf9x] {
    min-height: 28px !important;
    max-height: 28px !important;
    border: none;
    background: transparent;
}

.table-input .e-input[b-ktw3xvjf9x],
.table-input.e-input[b-ktw3xvjf9x] {
    font-size: 11px;
    height: 26px !important;
    line-height: 26px !important;
    padding: 1px 7px;
    background: transparent;
    border: none;
    transition: background-color 0.15s ease;
}

.table-input .e-input:focus[b-ktw3xvjf9x] {
    background: #f0f9ff;
}

/* ========== Summary Section ========== */
.summary-label-cell[b-ktw3xvjf9x] {
    width: 50px;
    text-align: center;
    font-weight: 700;
    font-size: 14px;
    vertical-align: middle !important;
}

.label-s[b-ktw3xvjf9x] {
    color: #fff;
}

.label-r[b-ktw3xvjf9x] {
    color: #fff;
}

/* ========== Footer Section ========== */
.footer-layout[b-ktw3xvjf9x] {
    display: flex;
    gap: 32px; /* Increased gap for better separation */
    flex-wrap: nowrap;
    align-items: stretch;
    margin-top: 2px;
}

.footer-left-pack[b-ktw3xvjf9x] {
    flex: 1 1 70%;
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}

.footer-right-pack[b-ktw3xvjf9x] {
    flex: 0 0 200px;
    display: flex;
    flex-direction: column;
    gap: 3px;
    padding: 4px;
    background: var(--slate-50);
    border-left: 1px solid var(--slate-200);
}

.compact-footer-row[b-ktw3xvjf9x] {
    display: flex;
    gap: 6px;
    align-items: stretch;
}

.remarks-group[b-ktw3xvjf9x] {
    flex: 0 0 300px;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.calculation-group[b-ktw3xvjf9x] {
    flex: 1;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 4px;
    align-content: start;
}

.calc-row[b-ktw3xvjf9x] {
    display: contents;
}

.footer-col[b-ktw3xvjf9x] {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.payment-sidebar[b-ktw3xvjf9x] {
    display: flex;
    flex-direction: column;
    flex: 0 0 65px;
    border-right: 1px solid var(--slate-300);
    background: #f8fafc;
    /* Neutral Sidebar as requested */
    height: 100px;
}

.footer-table-container[b-ktw3xvjf9x] {
    max-height: 400px;
    height: 180px;
    overflow: auto;
    -webkit-overflow-scrolling: touch;
    border: none !important;
    box-shadow: none !important;
}

.compact-footer-table[b-ktw3xvjf9x] {
    min-width: 800px !important;
    margin-bottom: 0 !important;
}

.compact-footer-table thead th[b-ktw3xvjf9x] {
    background: var(--slate-100) !important;
    font-size: 10px !important;
    padding: 4px !important;
    border: 1px solid var(--slate-200) !important;
    color: var(--slate-700) !important;
}

.compact-footer-table tbody td[b-ktw3xvjf9x] {
    padding: 3px 5px !important;
    font-size: 10px !important;
    height: 22px !important;
    border: 1px solid var(--slate-100) !important;
}

.compact-footer-table .text-right[b-ktw3xvjf9x] {
    text-align: right !important;
}

.payment-tabs.e-tab[b-ktw3xvjf9x] {
    border: none !important;
}

.payment-tabs .e-tab-header[b-ktw3xvjf9x] {
    height: 30px !important;
    background: var(--slate-100) !important;
    border-bottom: 1px solid var(--slate-200) !important;
}

.payment-tabs .e-tab-header .e-toolbar-item .e-tab-text[b-ktw3xvjf9x] {
    font-size: 11px !important;
    font-weight: 600 !important;
}

.footer-grid-2[b-ktw3xvjf9x] {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

/* Summary Inputs */
.summary-item[b-ktw3xvjf9x] {
    width: 80px;
    flex: 0 0 auto;
}

.summary-input[b-ktw3xvjf9x] {
    width: 100%;
    height: 24px;
    font-size: 11px;
    text-align: right;
    border: 1px solid #cbd5e1;
    border-radius: 2px;
    padding: 2px 4px;
    background: #fff;
    color: #1e293b;
    font-weight: 600;
}

.summary-input:read-only[b-ktw3xvjf9x] {
    background: #f8fafc;
}

.summary-input:focus[b-ktw3xvjf9x] {
    outline: 1px solid #3b82f6;
    border-color: #3b82f6;
}



.final-summary[b-ktw3xvjf9x] {
    padding: 4px 8px;
    background: var(--slate-50);
    border: 1px solid var(--slate-200);
    border-radius: var(--border-radius-md);
    margin-top: 4px;
}

.final-summary.no-margin[b-ktw3xvjf9x] {
    margin-top: 0 !important;
    border: none !important;
    background: transparent !important;
    padding: 0 !important;
}

.summary-item[b-ktw3xvjf9x] {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.summary-label[b-ktw3xvjf9x] {
    font-size: 10px;
    font-weight: 600;
    color: var(--slate-500);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 2px;
}

.summary-value[b-ktw3xvjf9x] {
    font-weight: 700;
    font-size: 14px;
    color: var(--primary-brand);
}

.footer-actions-row[b-ktw3xvjf9x] {
    margin-top: auto;
    padding: 8px 16px;
    /*border-top: 2px solid var(--slate-100);*/
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    /*background: #f8fafc;*/
    flex-wrap: nowrap;
    position: sticky;
    bottom: 0;
    z-index: 1000;
    /*box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--slate-200);*/
}

.footer-actions-left[b-ktw3xvjf9x],
.footer-actions-right[b-ktw3xvjf9x] {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

/* ========== Input Styles ========== */
.e-numerictextbox input[b-ktw3xvjf9x],
.e-numeric input[b-ktw3xvjf9x] {
    text-align: right !important;
}

.e-input-group:not(.e-success):not(.e-error)[b-ktw3xvjf9x],
.e-input-group.e-control-wrapper:not(.e-success):not(.e-error)[b-ktw3xvjf9x] {
    border-color: var(--slate-300);
}

.e-input-group:not(.e-success):not(.e-error):hover[b-ktw3xvjf9x],
.e-input-group.e-control-wrapper:not(.e-success):not(.e-error):hover[b-ktw3xvjf9x],
.e-input-group.e-input-focus:not(.e-success):not(.e-error)[b-ktw3xvjf9x],
.e-input-group.e-control-wrapper.e-input-focus:not(.e-success):not(.e-error)[b-ktw3xvjf9x] {
    border-color: var(--accent-glow);
}

.e-input-group.e-input-focus[b-ktw3xvjf9x],
.e-input-group.e-control-wrapper.e-input-focus[b-ktw3xvjf9x] {
    box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.1);
}




*[b-ktw3xvjf9x] {
    touch-action: manipulation;
}

*:focus-visible[b-ktw3xvjf9x] {
    outline: 2px solid var(--accent-glow);
    outline-offset: 2px;
}

/* ========== Responsive Design ========== */
@media (max-width: 1200px) {
    .header-main-container[b-ktw3xvjf9x] {
        flex-direction: column;
        gap: 20px;
    }

    .header-left-col[b-ktw3xvjf9x],
    .header-right-col[b-ktw3xvjf9x] {
        max-width: 100%;
        width: 100%;
    }
}

@media (max-width: 1024px) {
    .footer-layout[b-ktw3xvjf9x] {
        flex-direction: column;
        gap: 20px;
    }

    .footer-right-side[b-ktw3xvjf9x] {
        width: 100%;
    }
}

@media (max-width: 767px) {
    .full-width-content[b-ktw3xvjf9x] {
        padding: 10px !important;
    }

    .header-row[b-ktw3xvjf9x] {
        flex-wrap: wrap;
        gap: 8px;
    }

    .header-field[b-ktw3xvjf9x] {
        flex: 1 1 calc(50% - 8px) !important;
        min-width: 120px;
    }

    .w-60[b-ktw3xvjf9x],
    .w-150[b-ktw3xvjf9x],
    .w-168[b-ktw3xvjf9x],
    .w-240[b-ktw3xvjf9x] {
        flex: 1 1 auto !important;
        width: auto !important;
    }

    .footer-right-side .row[b-ktw3xvjf9x] {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    .footer-right-side .row .col[b-ktw3xvjf9x] {
        width: 100% !important;
        flex: 0 0 100% !important;
        padding: 0 !important;
    }

    .footer-grid-2[b-ktw3xvjf9x],
    .footer-grid-3[b-ktw3xvjf9x] {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .footer-actions-row[b-ktw3xvjf9x] {
        flex-direction: row;
        flex-wrap: nowrap;
    }

    .footer-actions-left[b-ktw3xvjf9x],
    .footer-actions-right[b-ktw3xvjf9x] {
        justify-content: center;
        width: 100%;
    }

    .footer-actions-left .e-btn[b-ktw3xvjf9x],
    .footer-actions-right .e-btn[b-ktw3xvjf9x] {
        flex: 1;
    }
}

@media (max-width: 480px) {
    .header-field[b-ktw3xvjf9x] {
        flex: 1 1 100% !important;
    }

    .footer-right-side .row[b-ktw3xvjf9x] {
        grid-template-columns: 1fr;
    }
}

.footer-right-side[b-ktw3xvjf9x] {
    flex: 0 0 550px;
    /* Base width for footer section to ensure all boxes fit inside the form */
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 8px 16px; /* Increased horizontal padding */
    background: #f8fafc;
    border-left: 1px solid var(--slate-200);
    border-radius: 8px; /* Added border radius for better look */
}

.footer-right-side .row[b-ktw3xvjf9x] {
    display: flex;
    gap: 8px;
    align-items: center;
    margin-bottom: 4px;
}

.footer-right-side .col[b-ktw3xvjf9x] {
    flex: 1;
    min-width: 0;
}

.print-closing-balance .e-label[b-ktw3xvjf9x] {
    font-size: 14px !important;
}

/* ========== Overlay Popup (shared) ========== */
.sgbill-overlay[b-ktw3xvjf9x] {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.25);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

/* Placeholder Centering */
.e-input-group.e-control-wrapper.e-small .e-input[b-ktw3xvjf9x],
.e-outline.e-small .e-input[b-ktw3xvjf9x],
.e-ddl.e-small .e-input[b-ktw3xvjf9x] {
    text-align: center !important;
}

.e-numeric.e-small .e-input[b-ktw3xvjf9x] {
    text-align: right !important;
    /* Changed to right-aligned for numeric clarity */
    padding-right: 8px !important;
}

.e-input-group.e-control-wrapper.e-small .e-input[b-ktw3xvjf9x]::placeholder,
.e-outline.e-small .e-input[b-ktw3xvjf9x]::placeholder {
    text-align: center !important;
}

/* Legibility */
.no-records-msg[b-ktw3xvjf9x] {
    text-align: center;
    padding: 24px !important;
    color: var(--slate-500);
    font-size: 18px !important;
    font-weight: 600;
}

/* ========== Popup Styles ========== */
.sgbill-popup-panel[b-ktw3xvjf9x] {
    background: #ffffff;
    border: 1px solid var(--slate-300);
    border-radius: 6px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
    width: 320px;
    max-height: 98vh;
    overflow-y: hidden;
    /* Removed vertical scroll as requested */
}

.sgbill-popup-wide[b-ktw3xvjf9x] {
    width: 520px;
}

.sgbill-popup-title[b-ktw3xvjf9x] {
    text-align: center;
    font-weight: 700;
    font-size: 13px;
    padding: 8px 12px;
    border-bottom: 1px solid var(--slate-200);
    color: var(--slate-700);
}

.sgbill-popup-body[b-ktw3xvjf9x] {
    padding: 10px 14px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.sgbill-popup-field[b-ktw3xvjf9x] {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
}

.sgbill-popup-field label[b-ktw3xvjf9x] {
    flex: 0 0 130px;
    font-size: 11px;
    font-weight: 600;
    color: var(--slate-600);
    white-space: nowrap;
}

.sgbill-popup-field .e-input-group[b-ktw3xvjf9x],
.sgbill-popup-field .e-ddl[b-ktw3xvjf9x] {
    flex: 1;
    min-width: 0;
}

.sgbill-popup-row[b-ktw3xvjf9x] {
    display: flex;
    gap: 10px;
}

.sgbill-popup-row .sgbill-popup-field label[b-ktw3xvjf9x] {
    flex: 0 0 auto;
    min-width: 60px;
}

.sgbill-popup-actions[b-ktw3xvjf9x] {
    display: flex;
    justify-content: center;
    gap: 10px;
    padding: 6px 14px;
    border-top: 1px solid var(--slate-200);
}

/* ========== Summary Section Enhancements ========== */
.summary-rows-container[b-ktw3xvjf9x] {
    background: #f1f5f9;
    /* Light grey as requested */
    padding: 2px 4px;
    border: 1px solid #cbd5e1;
    border-top: none;
    font-family: inherit;
    border-bottom-left-radius: 4px;
    border-bottom-right-radius: 4px;
    width: fit-content;
    margin-right: auto;
}

.summary-flex-row[b-ktw3xvjf9x] {
    display: flex;
    align-items: center;
    gap: 2px;
    margin-bottom: 2px;
}

.summary-flex-row:last-child[b-ktw3xvjf9x] {
    margin-bottom: 0;
}

/* Removed conflicting .summary-label that forced width: 20px */
.summary-dot-label[b-ktw3xvjf9x] {
    width: 20px;
    height: 19px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    border-radius: 2px;
    font-size: 10px;
    color: white;
    flex-shrink: 0;
}

.label-s[b-ktw3xvjf9x] {
    background: #3b82f6;
}

/* Blue for Sale */
.label-r[b-ktw3xvjf9x] {
    background: #ef4444;
}

/* Red for Return */

.summary-item[b-ktw3xvjf9x] {
    width: 78px;
    /* Even more compact as requested */
    flex-shrink: 0;
}

.summary-input[b-ktw3xvjf9x] {
    width: 100%;
    height: 20px;
    padding: 0 4px;
    font-size: 10px;
    text-align: right;
    border: 1px solid #cbd5e1;
    border-radius: 2px;
    background: #ffffff;
    font-weight: 600;
    color: #334155;
    outline: none;
}

.summary-input:read-only[b-ktw3xvjf9x] {
    background: #fdfdfd;
}

/* Payment grid summary rows override */
.sgbill-table.payment-grid-green tbody tr.summary-row[b-ktw3xvjf9x],
.sgbill-table.payment-grid-green tbody tr.summary-row td[b-ktw3xvjf9x] {
    background-color: #f1f5f9 !important;
    /* Consistent light grey for totals */
    color: #1e293b !important;
    font-weight: 700 !important;
    border-top: 1px solid #cbd5e1 !important;
}

.summary-input[b-ktw3xvjf9x] {
    width: 80px;
    height: 24px;
    font-size: 11px;
    padding: 0 4px;
    border: 1px solid #cbd5e1;
    border-radius: 2px;
    background-color: white;
    text-align: right;
    font-weight: 600;
    color: #334155;
}

.summary-input:focus[b-ktw3xvjf9x] {
    outline: none;
    border-color: #3b82f6;
}

.summary-item[b-ktw3xvjf9x] {
    display: flex;
    align-items: center;
}

/* Grid Row Colors */
.row-sale[b-ktw3xvjf9x] {
    background-color: #fee2e2 !important;
    /* Soft Red */
}

.row-return[b-ktw3xvjf9x] {
    background-color: #dcfce7 !important;
    /* Soft Green */
}

.row-sale.e-row:hover .e-rowcell[b-ktw3xvjf9x] {
    background-color: #fecaca !important;
}

.row-return.e-row:hover .e-rowcell[b-ktw3xvjf9x] {
    background-color: #bbf7d0 !important;
}



/* Compact Inputs */
.quick-entry-section .e-input-group.e-control-wrapper[b-ktw3xvjf9x] {
    margin-bottom: 0 !important;
}

.quick-entry-section .e-numerictextbox .e-input-group[b-ktw3xvjf9x] {
    width: 100% !important;
}

.sgbill-popup-close[b-ktw3xvjf9x] {
    position: absolute;
    top: 6px;
    right: 12px;
    cursor: pointer;
    font-size: 18px;
    color: var(--slate-400);
    transition: color 0.2s;
    z-index: 10;
}

.sgbill-popup-close:hover[b-ktw3xvjf9x] {
    color: var(--danger-red);
}

.bg-light-yellow[b-ktw3xvjf9x] {
    background-color: #fffbeb !important;
}

/* ========== Mobile Responsiveness ========== */
@media (max-width: 991.98px) {
    .header-main-container .d-flex.flex-nowrap[b-ktw3xvjf9x] {
        flex-direction: column !important;
        flex-wrap: wrap !important;
    }

    .header-main-container .col-auto[b-ktw3xvjf9x],
    .header-main-container .col[b-ktw3xvjf9x] {
        width: 100% !important;
        flex: 1 1 100% !important;
        max-width: 100% !important;
        margin-bottom: 8px;
    }

    .ms-auto[b-ktw3xvjf9x] {
        margin-left: 0 !important;
    }

    .footer-layout[b-ktw3xvjf9x] {
        flex-direction: column !important;
        gap: 16px !important;
    }

    .remarks-group[b-ktw3xvjf9x] {
        flex: 1 1 100% !important;
        width: 100% !important;
    }

    .footer-right-side[b-ktw3xvjf9x] {
        flex: 1 1 100% !important;
        width: 100% !important;
        border-left: none !important;
        border-top: 1px solid var(--slate-200);
        padding: 16px 8px !important;
    }

    .footer-right-side .d-flex.flex-nowrap[b-ktw3xvjf9x] {
        flex-direction: column !important;
        gap: 16px !important;
    }

    .footer-right-side .col-auto[b-ktw3xvjf9x],
    .footer-right-side .col[b-ktw3xvjf9x] {
        width: 100% !important;
        flex: 1 1 100% !important;
    }

    .calculation-group[b-ktw3xvjf9x] {
        grid-template-columns: 1fr 1fr !important; /* Stack to 2 columns on tablets */
        width: 100% !important;
    }

    .payment-grid-container[b-ktw3xvjf9x] {
        height: auto !important;
        min-height: 200px;
        overflow-x: auto;
    }

    .history-grid-wrapper[b-ktw3xvjf9x] {
        height: auto !important;
        max-height: 200px;
    }

    .premium-card[b-ktw3xvjf9x] {
        margin-bottom: 12px;
    }
}

@media (max-width: 575.98px) {
    .calculation-group[b-ktw3xvjf9x] {
        grid-template-columns: 1fr !important; /* Single column on phones */
    }

    .footer-actions-right[b-ktw3xvjf9x] {
        flex-direction: column !important;
        gap: 8px !important;
    }

    .footer-actions-right .e-btn[b-ktw3xvjf9x] {
        width: 100% !important;
    }

    .summary-rows-container[b-ktw3xvjf9x] {
        width: 100% !important;
        overflow-x: auto;
    }
    
    .page-content[b-ktw3xvjf9x] {
        padding: 4px 8px !important;
    }
}

.bg-light-green[b-ktw3xvjf9x] {
    background-color: #f0fdf4 !important;
}
