body[data-mobile-phone="true"] {
    overflow-x: hidden;
}

body[data-mobile-phone="true"] .app-content,
body[data-mobile-phone="true"] #kt_app_content_container,
body[data-mobile-phone="true"] .content {
    overflow-x: clip;
}

.mobile-screen-only {
    display: none !important;
}

.mobile-data-card-list {
    display: none;
}

.mobile-page-toolbar {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.mobile-page-toolbar .btn,
.mobile-touch-target {
    min-height: 44px;
    min-width: 44px;
}

.mobile-filter-sheet__header {
    display: none;
}

.mobile-filter-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.55);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease;
    z-index: 1090;
}

.mobile-filter-backdrop.is-active {
    opacity: 1;
    visibility: visible;
}

.mobile-summary-grid {
    display: grid;
    gap: 0.75rem;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
}

.mobile-summary-tile {
    border: 1px solid rgba(148, 163, 184, 0.2);
    border-radius: 1rem;
    background: #fff;
    padding: 1rem;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.05);
}

.mobile-summary-tile__label {
    color: #64748b;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.mobile-summary-tile__value {
    color: #0f172a;
    font-size: 1.15rem;
    font-weight: 800;
    margin-top: 0.4rem;
    line-height: 1.2;
}

.mobile-summary-tile__hint {
    color: #64748b;
    font-size: 0.8rem;
    margin-top: 0.25rem;
}

.mobile-data-card-list__empty {
    padding: 1rem;
    border: 1px dashed #cbd5e1;
    border-radius: 1rem;
    background: #fff;
    color: #64748b;
    text-align: center;
}

.mobile-data-card {
    border: 1px solid rgba(148, 163, 184, 0.2);
    border-radius: 1rem;
    background: #fff;
    padding: 1rem;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.05);
}

.mobile-data-card + .mobile-data-card {
    margin-top: 0.85rem;
}

.mobile-data-card__top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 0.75rem;
    margin-bottom: 0.85rem;
}

.mobile-data-card__top-side {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.5rem;
    flex-shrink: 0;
}

.mobile-data-card__title {
    color: #0f172a;
    font-size: 1rem;
    font-weight: 800;
    line-height: 1.25;
}

.mobile-data-card__subtitle {
    color: #475569;
    font-size: 0.9rem;
    margin-top: 0.2rem;
}

.mobile-data-card__meta {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    border-radius: 999px;
    background: #eff6ff;
    color: #1d4ed8;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 0.35rem 0.75rem;
    white-space: nowrap;
}

.mobile-data-card__details {
    display: grid;
    gap: 0.65rem;
}

.mobile-data-card__detail {
    display: grid;
    gap: 0.3rem;
}

.mobile-data-card__label {
    color: #64748b;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.mobile-data-card__value {
    color: #0f172a;
    font-size: 0.92rem;
    line-height: 1.45;
    word-break: break-word;
}

.mobile-data-card__actions {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #e2e8f0;
}

.mobile-data-card--clickable {
    cursor: pointer;
}

.mobile-data-card--clickable:focus-visible {
    outline: 3px solid rgba(14, 165, 233, 0.35);
    outline-offset: 2px;
}

.mobile-data-card--clickable:active {
    transform: scale(0.99);
}

.mobile-data-card__primary-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 34px;
    padding: 0.45rem 0.75rem;
    border-radius: 999px;
    background: #0f172a;
    color: #fff;
    font-size: 0.75rem;
    font-weight: 700;
    text-decoration: none;
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.18);
}

.mobile-data-card__primary-action:hover {
    color: #fff;
    text-decoration: none;
}

.mobile-card-hint,
.sell-card-hint {
    display: none;
}

.mobile-data-card__actions .btn,
.mobile-data-card__actions .btn-group,
.mobile-data-card__actions .dropdown {
    width: 100%;
}

.mobile-scroll-tabs {
    display: flex;
    gap: 0.5rem;
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 0.25rem;
    scrollbar-width: thin;
}

.mobile-scroll-tabs .nav-link {
    white-space: nowrap;
}

table[data-mobile-stack="true"] td[data-cell-label]::before {
    content: attr(data-cell-label);
    display: none;
}

@media (max-width: 575.98px) {
    .mobile-screen-only {
        display: block !important;
    }

    .desktop-screen-only {
        display: none !important;
    }

    .mobile-data-card-list {
        display: block;
    }

    .mobile-card-hint,
    .sell-card-hint {
        display: flex !important;
        align-items: center;
        gap: 0.5rem;
        margin: 0.85rem 0 0;
        padding: 0.75rem 0.85rem;
        border: 1px solid #dbe3ef;
        border-radius: 0.9rem;
        background: #fff;
        color: #475569;
        font-size: 0.82rem;
        font-weight: 700;
    }

    .mobile-filter-sheet {
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 1095;
        max-height: min(82vh, 760px);
        padding: 1rem 1rem calc(1rem + env(safe-area-inset-bottom, 0));
        border-radius: 1.25rem 1.25rem 0 0;
        background: #fff;
        box-shadow: 0 -24px 60px rgba(15, 23, 42, 0.22);
        transform: translateY(105%);
        transition: transform 0.22s ease;
        overflow-y: auto;
    }

    .mobile-filter-sheet.is-mobile-open {
        transform: translateY(0);
    }

    .mobile-filter-sheet__header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        gap: 0.75rem;
        margin-bottom: 1rem;
    }

    .mobile-filter-sheet__title {
        color: #0f172a;
        font-size: 1rem;
        font-weight: 800;
    }

    .mobile-filter-sheet .card {
        margin-bottom: 0;
        border: 0;
        box-shadow: none;
    }

    .mobile-filter-sheet .card-header {
        display: none;
    }

    .mobile-filter-sheet .card-body {
        padding: 0;
    }

    .mobile-filter-sheet .collapse {
        display: block !important;
    }

    body[data-page="page-sale-pos-index"] #sell_table_wrapper,
    body[data-page="page-purchase-index"] #purchase_table_wrapper {
        display: none;
    }

    body[data-page="page-purchase-index"] .purchase-index-page {
        margin-inline: -0.25rem;
    }

    body[data-page="page-purchase-index"] .purchase-hero {
        gap: 1rem;
        margin-bottom: 1rem;
        padding: 1rem;
        border-radius: 1rem;
        box-shadow: 0 14px 30px rgba(15, 23, 42, 0.1);
    }

    body[data-page="page-purchase-index"] .purchase-hero__eyebrow {
        padding: 0.35rem 0.65rem;
        font-size: 0.68rem;
        letter-spacing: 0.06em;
    }

    body[data-page="page-purchase-index"] .purchase-hero__title {
        margin-top: 0.7rem;
        font-size: 1.35rem;
        letter-spacing: 0;
    }

    body[data-page="page-purchase-index"] .purchase-hero__text {
        font-size: 0.88rem;
        line-height: 1.55;
    }

    body[data-page="page-purchase-index"] .purchase-search-panel {
        padding: 0.75rem;
        border-radius: 0.95rem;
    }

    body[data-page="page-purchase-index"] .purchase-global-search__input {
        height: 46px;
        font-size: 0.92rem;
    }

    body[data-page="page-purchase-index"] .purchase-shortcuts {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 0.5rem;
    }

    body[data-page="page-purchase-index"] .purchase-shortcut {
        justify-content: center;
        min-height: 38px;
        padding: 0.5rem 0.65rem;
        border-radius: 0.8rem;
        font-size: 0.78rem;
        text-align: center;
    }

    body[data-page="page-purchase-index"] .purchase-metrics {
        margin-bottom: 1rem;
    }

    body[data-page="page-purchase-index"] .purchase-metrics .row,
    body[data-page="page-purchase-index"] .purchase-metrics {
        --bs-gutter-x: 0.75rem;
        --bs-gutter-y: 0.75rem;
    }

    body[data-page="page-purchase-index"] .purchase-metric {
        padding: 0.8rem;
        border-radius: 1rem;
        box-shadow: 0 10px 24px rgba(15, 23, 42, 0.05);
    }

    body[data-page="page-purchase-index"] .purchase-metric__label {
        gap: 0.4rem;
        margin-bottom: 0.5rem;
        font-size: 0.68rem;
        letter-spacing: 0.05em;
    }

    body[data-page="page-purchase-index"] .purchase-metric__icon {
        width: 1.75rem;
        height: 1.75rem;
        border-radius: 0.75rem;
    }

    body[data-page="page-purchase-index"] .purchase-metric__value {
        font-size: 1.08rem;
        letter-spacing: 0;
        word-break: break-word;
    }

    body[data-page="page-purchase-index"] .purchase-table-shell {
        border-radius: 1rem;
        box-shadow: none;
    }

    body[data-page="page-purchase-index"] .purchase-table-toolbar {
        padding: 0.85rem;
        border-radius: 1rem 1rem 0 0;
    }

    body[data-page="page-purchase-index"] .purchase-table-toolbar__heading {
        font-size: 0.95rem;
    }

    body[data-page="page-purchase-index"] .purchase-table-toolbar__text {
        font-size: 0.78rem;
    }

    body[data-page="page-purchase-index"] .mobile-data-card-list[data-card-theme="purchases"] {
        padding: 0.85rem;
        background: #f8fafc;
    }

    body[data-page="page-purchase-index"] .mobile-data-card-list[data-card-theme="purchases"] .mobile-data-card {
        border: 1px solid rgba(15, 118, 110, 0.14);
        border-radius: 1rem;
        background:
            linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
        box-shadow: 0 14px 30px rgba(15, 23, 42, 0.07);
    }

    body[data-page="page-purchase-index"] .mobile-data-card-list[data-card-theme="purchases"] .mobile-data-card__title {
        font-size: 0.98rem;
    }

    body[data-page="page-purchase-index"] .mobile-data-card-list[data-card-theme="purchases"] .mobile-data-card__meta {
        border-radius: 999px;
        background: #ecfdf5;
        color: #047857;
        box-shadow: inset 0 0 0 1px rgba(5, 150, 105, 0.12);
    }

    body[data-page="page-purchase-index"] .mobile-data-card-list[data-card-theme="purchases"] .mobile-data-card__meta .badge {
        border-radius: 999px;
        font-size: 0.72rem;
        padding: 0.35rem 0.7rem;
    }

    body[data-page="page-purchase-index"] .mobile-data-card-list[data-card-theme="purchases"] .mobile-data-card__detail {
        padding: 0.7rem 0.8rem;
        border: 1px solid #e2e8f0;
        border-radius: 0.85rem;
        background: rgba(255, 255, 255, 0.96);
    }

    body[data-page="page-purchase-index"] .mobile-data-card-list[data-card-theme="purchases"] .mobile-data-card__actions {
        display: grid;
        gap: 0.65rem;
    }

    .mobile-data-card__actions [data-kt-menu-trigger] {
        width: 100%;
        min-height: 42px;
        justify-content: center;
        gap: 0.5rem;
        border: 1px solid #cbd5e1;
        border-radius: 0.9rem;
        background: #fff;
        color: #0f172a;
        box-shadow: none;
    }

    .mobile-data-card__actions [data-kt-menu-trigger][aria-label]::after {
        content: attr(aria-label);
        font-size: 0.86rem;
        font-weight: 700;
    }

    .mobile-data-card__actions .menu-sub-dropdown {
        max-width: calc(100vw - 2rem);
        max-height: min(70vh, 520px);
        overflow-y: auto;
        border: 1px solid #e2e8f0;
        box-shadow: 0 20px 45px rgba(15, 23, 42, 0.18);
    }

    body[data-page="page-sale-pos-index"] .sell-hero {
        padding: 1.2rem;
    }

    body[data-page="page-sale-pos-index"] .sell-hero__title {
        font-size: 1.55rem;
    }

    body[data-page="page-sale-pos-index"] .mobile-data-card-list[data-card-theme="sales"] .mobile-data-card {
        border: 1px solid rgba(14, 165, 233, 0.12);
        border-radius: 1.2rem;
        background:
            radial-gradient(circle at top right, rgba(14, 165, 233, 0.12), transparent 34%),
            linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
        box-shadow: 0 18px 38px rgba(15, 23, 42, 0.08);
    }

    body[data-page="page-sale-pos-index"] .mobile-data-card-list[data-card-theme="sales"] .mobile-data-card__detail {
        padding: 0.75rem 0.85rem;
        border: 1px solid #e2e8f0;
        border-radius: 0.95rem;
        background: rgba(255, 255, 255, 0.96);
    }

    body[data-page="page-sale-pos-index"] .mobile-data-card-list[data-card-theme="sales"] .mobile-data-card__meta {
        background: #ecfeff;
        color: #0f766e;
        box-shadow: inset 0 0 0 1px rgba(14, 165, 233, 0.12);
    }

    body[data-page="page-sale-pos-index"] .mobile-data-card-list[data-card-theme="sales"] .mobile-data-card__meta .badge {
        border-radius: 999px;
        font-size: 0.72rem;
        padding: 0.35rem 0.7rem;
    }

    body[data-page="page-sale-pos-index"] .mobile-data-card-list[data-card-theme="sales"] .mobile-data-card__actions {
        display: grid;
        gap: 0.65rem;
    }

    body[data-page="page-sale-pos-index"] .mobile-data-card-list[data-card-theme="sales"] .mobile-data-card__primary-action {
        min-height: 38px;
        padding-inline: 0.95rem;
        background: linear-gradient(135deg, #0f172a 0%, #0f766e 100%);
    }

    body[data-page="page-sale-pos-create"] {
        padding-bottom: 9rem !important;
    }

    body[data-page="page-sale-pos-create"] #kt_app_header {
        padding-block: 0.35rem !important;
        min-height: auto !important;
    }

    body[data-page="page-sale-pos-create"] #kt_app_header_container {
        padding-inline: 0.5rem !important;
        gap: 0.35rem !important;
    }

    body[data-page="page-sale-pos-create"] .pos-header .d-flex.align-items-center.gap-1 {
        flex-wrap: nowrap !important;
        justify-content: flex-start !important;
        width: 100% !important;
        overflow-x: auto !important;
        padding-bottom: 0.15rem !important;
        scrollbar-width: thin;
    }

    body[data-page="page-sale-pos-create"] .pos-header .btn {
        width: 34px !important;
        height: 34px !important;
        flex: 0 0 auto !important;
        border-radius: 0.8rem !important;
        box-shadow: none !important;
    }

    body[data-page="page-sale-pos-create"] .pos-header .btn i {
        font-size: 0.95rem !important;
    }

    body[data-page="page-sale-pos-create"] .pos-header [data-bs-target="#mobile_product_suggestion_modal"] {
        display: none !important;
    }

    body[data-page="page-sale-pos-create"] #add_pos_sell_form {
        height: calc(100dvh - 116px) !important;
    }

    body[data-page="page-sale-pos-create"] #kt_app_content_container {
        margin-top: 0.5rem !important;
        padding-inline: 0.45rem !important;
    }

    body[data-page="page-sale-pos-create"] .pos-products-section,
    body[data-page="page-sale-pos-create"] .pos-separator {
        display: none !important;
    }

    body[data-page="page-sale-pos-create"] .pos-layout-container {
        display: flex !important;
        flex-direction: column !important;
        gap: 0.75rem !important;
        height: 100% !important;
        max-height: none !important;
        margin-bottom: 8.25rem !important;
        padding: 0.5rem !important;
        border-radius: 1rem !important;
        background: #f8fafc !important;
        box-shadow: none !important;
        border: 0 !important;
    }

    body[data-page="page-sale-pos-create"] .pos-cart-section {
        flex: 1 1 auto !important;
        width: 100% !important;
        max-width: 100% !important;
        min-height: 0 !important;
        max-height: none !important;
        height: auto !important;
        padding-right: 0 !important;
    }

    body[data-page="page-sale-pos-create"] .pos-cart-body {
        padding: 0 !important;
    }

    body[data-page="page-sale-pos-create"] .mobile-pos-products-trigger {
        display: inline-flex !important;
        align-items: center;
        justify-content: center;
        align-self: flex-start;
        width: auto;
        margin-bottom: 0.15rem;
        min-height: 38px;
        padding: 0.55rem 0.95rem;
        border-radius: 999px;
        border: 1px solid #cbd5e1 !important;
        background: #fff !important;
        color: #0f172a !important;
        box-shadow: none !important;
        font-size: 0.9rem;
        font-weight: 700;
    }

    body[data-page="page-sale-pos-create"] .mobile-pos-products-trigger i {
        font-size: 0.95rem !important;
        margin-right: 0.5rem !important;
    }

    body[data-page="page-sale-pos-create"] .pos-form-container {
        gap: 0.75rem !important;
        margin-bottom: 0.8rem !important;
    }

    body[data-page="page-sale-pos-create"] .pos-form-container > .col-md-5,
    body[data-page="page-sale-pos-create"] .pos-form-container > .col-md-7 {
        background: transparent !important;
        border: 0 !important;
        border-radius: 0 !important;
        padding: 0 !important;
        box-shadow: none !important;
    }

    body[data-page="page-sale-pos-create"] .pos-form-container .form-group {
        margin-bottom: 0.7rem !important;
    }

    body[data-page="page-sale-pos-create"] .pos-form-container .input-group {
        align-items: stretch !important;
        border: 1px solid #dbe3ef !important;
        border-radius: 1rem !important;
        overflow: hidden !important;
        background: #fff !important;
        box-shadow: none !important;
    }

    body[data-page="page-sale-pos-create"] .pos-form-container .input-group-text,
    body[data-page="page-sale-pos-create"] .pos-form-container .btn.btn-icon,
    body[data-page="page-sale-pos-create"] .pos-form-container #weighing_scale_btn {
        min-width: 44px !important;
        min-height: 44px !important;
        border-radius: 0 !important;
        box-shadow: none !important;
    }

    body[data-page="page-sale-pos-create"] #search_product,
    body[data-page="page-sale-pos-create"] #customer_id,
    body[data-page="page-sale-pos-create"] #customer_contact_id,
    body[data-page="page-sale-pos-create"] #sub_customer_id {
        min-height: 44px !important;
        font-size: 0.95rem !important;
    }

    body[data-page="page-sale-pos-create"] .cart-table-container {
        padding-right: 0 !important;
        overflow: hidden !important;
    }

    body[data-page="page-sale-pos-create"] .cart-table-container > div {
        border: 0 !important;
        background: transparent !important;
        padding-right: 0 !important;
    }

    body[data-page="page-sale-pos-create"] #pos_table {
        width: 100% !important;
        min-width: 100% !important;
        border-collapse: separate;
        border-spacing: 0;
    }

    body[data-page="page-sale-pos-create"] #pos_table thead {
        display: none;
    }

    body[data-page="page-sale-pos-create"] #pos_table tbody {
        display: block;
    }

    body[data-page="page-sale-pos-create"] #pos_table tbody tr.product_row {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
        grid-template-areas:
            "product action"
            "serial serial"
            "qty qty"
            "price subtotal"
            "staff staff"
            "warranty warranty";
        gap: 0.75rem 0.8rem;
        margin: 0 0 0.85rem;
        padding: 0.9rem;
        border: 1px solid #dbe3ef;
        border-radius: 1rem;
        background: #fff;
        box-shadow: 0 10px 24px rgba(15, 23, 42, 0.06);
    }

    body[data-page="page-sale-pos-create"] #pos_table tbody tr.product_row > td {
        display: block;
        width: auto !important;
        border: 0 !important;
        padding: 0 !important;
    }

    body[data-page="page-sale-pos-create"] #pos_table tbody tr.product_row > td::before {
        display: none !important;
        content: none !important;
    }

    body[data-page="page-sale-pos-create"] #pos_table tbody tr.product_row > td[data-mobile-label]::before {
        content: attr(data-mobile-label) !important;
        display: block !important;
        margin-bottom: 0.45rem;
        color: #64748b;
        font-size: 0.68rem;
        font-weight: 800;
        letter-spacing: 0.08em;
        line-height: 1;
        text-align: start;
        text-transform: uppercase;
    }

    body[data-page="page-sale-pos-create"] #pos_table .pos-td-product {
        grid-area: product;
        min-width: 0;
    }

    body[data-page="page-sale-pos-create"] #pos_table .pos-td-action {
        grid-area: action;
        justify-self: end;
        align-self: start;
        min-width: auto !important;
    }

    body[data-page="page-sale-pos-create"] #pos_table .pos-td-serial {
        grid-area: serial;
    }

    body[data-page="page-sale-pos-create"] #pos_table .pos-td-serial.no-serial {
        display: none !important;
    }

    body[data-page="page-sale-pos-create"] #pos_table .pos-td-qty {
        grid-area: qty;
    }

    body[data-page="page-sale-pos-create"] #pos_table .pos-td-price {
        grid-area: price;
    }

    body[data-page="page-sale-pos-create"] #pos_table .pos-td-subtotal {
        grid-area: subtotal;
    }

    body[data-page="page-sale-pos-create"] #pos_table .pos-td-staff {
        grid-area: staff;
    }

    body[data-page="page-sale-pos-create"] #pos_table .pos-td-warranty {
        grid-area: warranty;
    }

    body[data-page="page-sale-pos-create"] #pos_table .conditional-td {
        display: none !important;
    }

    body[data-page="page-sale-pos-create"] #pos_table .product-info-container {
        display: flex !important;
        align-items: flex-start !important;
        gap: 0.75rem !important;
    }

    body[data-page="page-sale-pos-create"] #pos_table .product-image {
        width: 56px !important;
        height: 56px !important;
        min-width: 56px !important;
        margin-bottom: 0 !important;
        border-radius: 0.9rem !important;
    }

    body[data-page="page-sale-pos-create"] #pos_table .product-details {
        min-width: 0 !important;
        width: auto !important;
        flex: 1 1 auto !important;
    }

    body[data-page="page-sale-pos-create"] #pos_table .product-name {
        font-size: 0.98rem !important;
        line-height: 1.35 !important;
        margin-bottom: 0.35rem !important;
    }

    body[data-page="page-sale-pos-create"] #pos_table .product-meta-info {
        display: flex;
        flex-wrap: wrap;
        gap: 0.35rem 0.5rem;
    }

    body[data-page="page-sale-pos-create"] #pos_table .product-sku,
    body[data-page="page-sale-pos-create"] #pos_table .brand-badge,
    body[data-page="page-sale-pos-create"] #pos_table .stock-info {
        margin: 0 !important;
    }

    body[data-page="page-sale-pos-create"] #pos_table .input-number {
        display: grid;
        grid-template-columns: 42px minmax(0, 1fr) 42px;
        max-width: 210px;
    }

    body[data-page="page-sale-pos-create"] #pos_table .quantity-down,
    body[data-page="page-sale-pos-create"] #pos_table .quantity-up {
        min-width: 42px !important;
        min-height: 42px !important;
        border-radius: 0.85rem !important;
    }

    body[data-page="page-sale-pos-create"] #pos_table .pos_quantity,
    body[data-page="page-sale-pos-create"] #pos_table input[type="number"],
    body[data-page="page-sale-pos-create"] #pos_table input[type="text"],
    body[data-page="page-sale-pos-create"] #pos_table select {
        min-height: 42px !important;
        font-size: 0.95rem !important;
    }

    body[data-page="page-sale-pos-create"] #pos_table .pos_quantity {
        text-align: center !important;
        font-weight: 700;
    }

    body[data-page="page-sale-pos-create"] #pos_table .sub_unit,
    body[data-page="page-sale-pos-create"] #pos_table .unit-badge,
    body[data-page="page-sale-pos-create"] #pos_table .multi-unit-badges,
    body[data-page="page-sale-pos-create"] #pos_table .codename-row {
        margin-top: 0.55rem !important;
    }

    body[data-page="page-sale-pos-create"] #pos_table .codename-row {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 0.5rem;
    }

    body[data-page="page-sale-pos-create"] #pos_table .pos-td-price,
    body[data-page="page-sale-pos-create"] #pos_table .pos-td-subtotal,
    body[data-page="page-sale-pos-create"] #pos_table .pos-td-serial.has-serial,
    body[data-page="page-sale-pos-create"] #pos_table .pos-td-staff,
    body[data-page="page-sale-pos-create"] #pos_table .pos-td-warranty {
        padding: 0.75rem !important;
        border: 1px solid #e2e8f0 !important;
        border-radius: 0.9rem;
        background: #f8fafc;
    }

    body[data-page="page-sale-pos-create"] #pos_table .pos-td-price {
        min-width: 0;
    }

    body[data-page="page-sale-pos-create"] #pos_table .pos-td-subtotal {
        text-align: end !important;
        display: flex !important;
        flex-direction: column;
        justify-content: center;
    }

    body[data-page="page-sale-pos-create"] #pos_table .pos_line_total_text {
        font-size: 1rem !important;
        font-weight: 800 !important;
        color: #0f172a !important;
        display: block;
    }

    body[data-page="page-sale-pos-create"] #pos_table .pos_remove_row {
        display: inline-flex !important;
        align-items: center;
        justify-content: center;
        width: 40px;
        height: 40px;
        padding: 0 !important;
        border: 1px solid #fecaca;
        border-radius: 999px;
        background: #fef2f2;
    }

    body[data-page="page-sale-pos-create"] .pos-footer-container {
        padding: 0.6rem 0.6rem calc(0.7rem + env(safe-area-inset-bottom, 0)) !important;
        min-height: 0 !important;
        max-height: none !important;
        border-top-left-radius: 1rem;
        border-top-right-radius: 1rem;
        background: #fff !important;
        border-top: 1px solid #dbe3ef !important;
        box-shadow: 0 -8px 24px rgba(15, 23, 42, 0.08) !important;
    }

    body[data-page="page-sale-pos-create"] .pos-footer-grid {
        flex-wrap: wrap !important;
        gap: 0.55rem !important;
        min-height: 0 !important;
    }

    body[data-page="page-sale-pos-create"] .pos-footer-totals,
    body[data-page="page-sale-pos-create"] .pos-footer-actions {
        max-width: 100% !important;
        flex: 1 0 100% !important;
        justify-content: flex-start !important;
    }

    body[data-page="page-sale-pos-create"] .pos-footer-totals-track {
        width: 100% !important;
        overflow-x: auto;
        padding-bottom: 0.15rem;
        gap: 0.85rem !important;
        scrollbar-width: thin;
    }

    body[data-page="page-sale-pos-create"] .pos-footer-totals-track > div {
        margin-right: 0 !important;
        margin-left: 0 !important;
    }

    body[data-page="page-sale-pos-create"] .pos-footer-actions-track {
        display: flex !important;
        flex-wrap: wrap !important;
        align-items: stretch !important;
        gap: 0.45rem !important;
        justify-content: flex-start !important;
        width: 100%;
    }

    body[data-page="page-sale-pos-create"] .pos-total-payable-mobile {
        order: -1;
        width: 100%;
        justify-content: space-between !important;
        margin-right: 0 !important;
        padding: 0.6rem 0.75rem !important;
        border-radius: 0.95rem !important;
    }

    body[data-page="page-sale-pos-create"] .pos-total-payable-mobile b {
        display: inline !important;
        font-size: 0.72rem !important;
    }

    body[data-page="page-sale-pos-create"] .pos-total-payable-mobile #total_payable_mobile {
        font-size: 1.05rem !important;
    }

    body[data-page="page-sale-pos-create"] .pos-footer-container .btn-pos {
        min-height: 44px !important;
        border-radius: 0.9rem !important;
    }

    body[data-page="page-sale-pos-create"] .pos-footer-container .btn-pos-success,
    body[data-page="page-sale-pos-create"] .pos-footer-container .btn-pos-credit,
    body[data-page="page-sale-pos-create"] .pos-footer-container .btn-pos-pay {
        flex: 1 1 92px;
        min-width: 92px !important;
        justify-content: center !important;
        padding-inline: 0.7rem !important;
    }

    body[data-page="page-sale-pos-create"] .pos-footer-container .btn-pos span {
        display: inline !important;
        font-size: 0.78rem !important;
    }

    body[data-page="page-sale-pos-create"] .pos-footer-container .btn-pos-secondary,
    body[data-page="page-sale-pos-create"] .pos-footer-container .btn-pos-cancel {
        flex: 0 0 44px;
        min-width: 44px !important;
        width: 44px !important;
        min-height: 44px !important;
    }

    body[data-page="page-sale-pos-create"] #mobile_product_suggestion_modal .modal-body {
        padding: 0.75rem !important;
    }

    body[data-page="page-sale-pos-create"] #mobile_product_suggestion_modal .pos_items_category_center {
        border: 0 !important;
        border-radius: 0.85rem !important;
        background: #fff;
        box-shadow: 0 10px 24px rgba(15, 23, 42, 0.06);
        margin-bottom: 0.75rem;
        padding: 0.5rem;
    }

    body[data-page="page-sale-pos-create"] #mobile_product_suggestion_modal #product_list_body {
        gap: 0.75rem;
    }

    body[data-page="page-sale-pos-create"] #mobile_product_suggestion_modal .modal-dialog,
    body[data-page="page-sale-pos-create"] .contact_modal .modal-dialog,
    body[data-page="page-sale-pos-create"] .register_details_modal .modal-dialog,
    body[data-page="page-sale-pos-create"] .close_register_modal .modal-dialog,
    body[data-page="page-sale-pos-create"] .quick_add_product_modal .modal-dialog {
        width: 100vw;
        max-width: 100vw;
        min-height: 100dvh;
        margin: 0;
    }

    body[data-page="page-sale-pos-create"] #mobile_product_suggestion_modal .modal-content,
    body[data-page="page-sale-pos-create"] .contact_modal .modal-content,
    body[data-page="page-sale-pos-create"] .register_details_modal .modal-content,
    body[data-page="page-sale-pos-create"] .close_register_modal .modal-content,
    body[data-page="page-sale-pos-create"] .quick_add_product_modal .modal-content {
        min-height: 100dvh;
        border-radius: 0;
    }

    body[data-page="page-home-dashboard"] .app-content,
    body[data-page="page-purchase-create"] .app-content,
    body[data-page="page-report-dashboard-summary"] .app-content,
    body[data-page="page-report-profit-loss"] .app-content,
    body[data-page="page-customer-ledger"] .app-content,
    body[data-page="page-sale-pos-index"] .app-content,
    body[data-page="page-purchase-index"] .app-content {
        padding-top: 0.75rem;
    }

    body[data-page="page-home-dashboard"] .cont {
        max-width: none !important;
        height: 118px !important;
        margin-bottom: 1rem !important;
    }

    body[data-page="page-home-dashboard"] .home-section-panel,
    body[data-page="page-home-dashboard"] .card.card-flush,
    body[data-page="page-report-dashboard-summary"] .dashboard-card,
    body[data-page="page-report-dashboard-summary"] .summary-card,
    body[data-page="page-report-profit-loss"] .pl-section-card,
    body[data-page="page-customer-ledger"] .info-section,
    body[data-page="page-customer-ledger"] .summary-card {
        border-radius: 1rem !important;
    }

    body[data-page="page-report-dashboard-summary"] #quick_date_buttons,
    body[data-page="page-report-profit-loss"] .nav-line-tabs,
    body[data-page="page-customer-ledger"] .ledger-tabs {
        display: flex;
        flex-wrap: nowrap;
        overflow-x: auto;
        padding-bottom: 0.35rem;
        scrollbar-width: thin;
    }

    body[data-page="page-report-dashboard-summary"] .modal-dialog,
    body[data-page="page-report-profit-loss"] .modal-dialog,
    body[data-page="page-customer-ledger"] .modal-dialog {
        width: 100vw;
        max-width: 100vw;
        margin: 0;
        min-height: 100dvh;
    }

    body[data-page="page-report-dashboard-summary"] .modal-content,
    body[data-page="page-report-profit-loss"] .modal-content,
    body[data-page="page-customer-ledger"] .modal-content {
        min-height: 100dvh;
        border-radius: 0;
    }

    body[data-page="page-sale-pos-index"] .payment_modal .modal-dialog,
    body[data-page="page-sale-pos-index"] .edit_payment_modal .modal-dialog,
    body[data-page="page-sale-pos-index"] .register_details_modal .modal-dialog,
    body[data-page="page-sale-pos-index"] .close_register_modal .modal-dialog,
    body[data-page="page-purchase-index"] .payment_modal .modal-dialog,
    body[data-page="page-purchase-index"] .product_modal .modal-dialog,
    body[data-page="page-purchase-create"] .payment_modal .modal-dialog,
    body[data-page="page-purchase-create"] .product_modal .modal-dialog,
    body[data-page="page-purchase-create"] .contact_modal .modal-dialog {
        width: 100vw;
        max-width: 100vw;
        min-height: 100dvh;
        margin: 0;
    }

    body[data-page="page-sale-pos-index"] .payment_modal .modal-content,
    body[data-page="page-sale-pos-index"] .edit_payment_modal .modal-content,
    body[data-page="page-sale-pos-index"] .register_details_modal .modal-content,
    body[data-page="page-sale-pos-index"] .close_register_modal .modal-content,
    body[data-page="page-purchase-index"] .payment_modal .modal-content,
    body[data-page="page-purchase-index"] .product_modal .modal-content,
    body[data-page="page-purchase-create"] .payment_modal .modal-content,
    body[data-page="page-purchase-create"] .product_modal .modal-content,
    body[data-page="page-purchase-create"] .contact_modal .modal-content {
        min-height: 100dvh;
        border-radius: 0;
    }

    body[data-page="page-home-dashboard"] .home-section-panel .card-header,
    body[data-page="page-home-dashboard"] .home-section-panel .card-body {
        padding-inline: 1rem;
    }

    body[data-page="page-home-dashboard"] .home-section-panel .btn.btn-flex {
        width: 100%;
        justify-content: center;
        margin-left: 0 !important;
        margin-bottom: 0.75rem;
    }

    body[data-page="page-purchase-create"] #search_product {
        position: sticky;
        top: 0;
        z-index: 20;
        background: #fff;
    }

    body[data-page="page-purchase-create"] .table-responsive {
        overflow: visible;
    }

    body[data-page="page-purchase-create"] #purchase_entry_table,
    body[data-page="page-customer-ledger"] table[data-mobile-stack="true"] {
        min-width: 100% !important;
        width: 100% !important;
        border-collapse: separate;
        border-spacing: 0;
    }

    body[data-page="page-purchase-create"] #purchase_entry_table thead,
    body[data-page="page-customer-ledger"] table[data-mobile-stack="true"] thead {
        display: none;
    }

    body[data-page="page-purchase-create"] #purchase_entry_table tbody,
    body[data-page="page-purchase-create"] #purchase_entry_table tr,
    body[data-page="page-purchase-create"] #purchase_entry_table td,
    body[data-page="page-customer-ledger"] table[data-mobile-stack="true"] tbody,
    body[data-page="page-customer-ledger"] table[data-mobile-stack="true"] tr,
    body[data-page="page-customer-ledger"] table[data-mobile-stack="true"] td {
        display: block;
        width: 100% !important;
    }

    body[data-page="page-purchase-create"] #purchase_entry_table tbody tr,
    body[data-page="page-customer-ledger"] table[data-mobile-stack="true"] tbody tr {
        padding: 1rem;
        margin-bottom: 1rem;
        border: 1px solid #e2e8f0;
        border-radius: 1rem;
        background: #fff;
        box-shadow: 0 12px 24px rgba(15, 23, 42, 0.05);
    }

    body[data-page="page-purchase-create"] #purchase_entry_table tbody td,
    body[data-page="page-customer-ledger"] table[data-mobile-stack="true"] td[data-cell-label] {
        border: 0 !important;
        padding: 0.55rem 0 !important;
    }

    body[data-page="page-purchase-create"] #purchase_entry_table tbody td::before,
    body[data-page="page-customer-ledger"] table[data-mobile-stack="true"] td[data-cell-label]::before {
        content: attr(data-cell-label);
        display: block;
        color: #64748b;
        font-size: 0.72rem;
        font-weight: 700;
        letter-spacing: 0.06em;
        text-transform: uppercase;
        margin-bottom: 0.35rem;
    }

    body[data-page="page-purchase-create"] #purchase_entry_table .form-control,
    body[data-page="page-purchase-create"] #purchase_entry_table .form-select {
        min-height: 44px;
    }

    body[data-page="page-purchase-create"] .card-footer,
    body[data-page="page-sale-pos-create"] .pos-footer-container {
        position: sticky;
        bottom: 0;
        z-index: 40;
        background: #fff;
        box-shadow: 0 -8px 24px rgba(15, 23, 42, 0.08);
    }

    body[data-page="page-customer-ledger"] .ledger-tabs-container {
        padding: 0.85rem;
    }

    body[data-page="page-customer-ledger"] .ledger-tab-link {
        min-width: auto !important;
        padding: 0.85rem 1rem !important;
        font-size: 0.95rem !important;
        white-space: nowrap;
    }

    body[data-page="page-customer-ledger"] .summary-card-value {
        font-size: 1.35rem;
    }
}

@media (min-width: 576px) and (max-width: 991.98px) {
    body[data-page="page-sale-pos-create"] .mobile-pos-products-trigger {
        display: none !important;
    }

    body[data-page="page-report-profit-loss"] .nav-line-tabs,
    body[data-page="page-customer-ledger"] .ledger-tabs {
        flex-wrap: nowrap;
        overflow-x: auto;
    }
}
