/* QPOS App shell + dashboard UI
   Structural polish only. Accent follows AdminLTE skin / business theme_color. */

:root {
    --qpos-accent: #1572e8;
    --qpos-accent-soft: rgba(21, 114, 232, 0.12);
    --qpos-ink: #1c2430;
    --qpos-muted: #667085;
    --qpos-line: #e4e7ec;
    --qpos-fill: #f4f6f9;
    --qpos-paper: #ffffff;
    --qpos-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
}

/* Per-business theme (body.skin-*) */
.skin-blue,
.skin-blue-light {
    --qpos-accent: #1572e8;
    --qpos-accent-soft: rgba(21, 114, 232, 0.12);
}

.skin-red,
.skin-red-light {
    --qpos-accent: #d9272d;
    --qpos-accent-soft: rgba(217, 39, 45, 0.12);
}

.skin-purple,
.skin-purple-light {
    --qpos-accent: #6f42c1;
    --qpos-accent-soft: rgba(111, 66, 193, 0.12);
}

.skin-green,
.skin-green-light {
    --qpos-accent: #28a745;
    --qpos-accent-soft: rgba(40, 167, 69, 0.12);
}

.skin-yellow,
.skin-yellow-light {
    --qpos-accent: #e0a800;
    --qpos-accent-soft: rgba(224, 168, 0, 0.15);
}

.skin-black,
.skin-black-light {
    --qpos-accent: #343a40;
    --qpos-accent-soft: rgba(52, 58, 64, 0.12);
}

/* ========== Shell structure (do not override skin colors) ========== */
body:not(.lockscreen) {
    font-size: 14px;
    color: var(--qpos-ink);
}

body:not(.lockscreen) .content-wrapper {
    background: var(--qpos-fill) !important;
}

body:not(.lockscreen) .main-header .navbar {
    border: none !important;
    min-height: 50px;
}

/* Main navbar: actions + date / bell / profile */
body:not(.lockscreen) .main-header .qpos-navbar-menu {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 14px;
    height: 50px;
    padding-right: 12px;
    float: right;
}

body:not(.lockscreen) .main-header .qpos-navbar-actions {
    display: flex;
    align-items: center;
    gap: 6px;
    height: 50px;
}

body:not(.lockscreen) .main-header .qpos-navbar-actions .btn-group {
    display: inline-flex;
    align-items: center;
    height: 34px;
}

body:not(.lockscreen) .main-header .qpos-nav-btn {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    gap: 6px;
    height: 34px !important;
    min-width: 34px;
    margin: 0 !important;
    padding: 0 10px !important;
    border-radius: 8px !important;
    border: none !important;
    background: rgba(255, 255, 255, 0.18) !important;
    color: #fff !important;
    box-shadow: none !important;
    float: none !important;
    line-height: 1 !important;
    font-weight: 600;
    font-size: 13px;
}

body:not(.lockscreen) .main-header .qpos-nav-btn:hover,
body:not(.lockscreen) .main-header .qpos-nav-btn:focus {
    background: rgba(255, 255, 255, 0.28) !important;
    color: #fff !important;
}

body:not(.lockscreen) .main-header .qpos-nav-btn i {
    font-size: 14px;
    line-height: 1;
    width: 1em;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: inherit !important;
}

body:not(.lockscreen) .main-header .qpos-nav-btn--label {
    padding: 0 12px !important;
}

body:not(.lockscreen) .main-header .qpos-nav-btn--danger {
    background: rgba(255, 255, 255, 0.22) !important;
}

body:not(.lockscreen) .main-header .qpos-navbar-meta {
    display: flex;
    align-items: center;
    gap: 4px;
    height: 50px;
    margin-left: 4px;
    padding-left: 12px;
    border-left: 1px solid rgba(255, 255, 255, 0.22);
}

body:not(.lockscreen) .main-header .qpos-navbar-date {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    height: 34px;
    padding: 0 10px;
    margin: 0;
    color: #fff;
    font-size: 13px;
    line-height: 1;
    white-space: nowrap;
}

body:not(.lockscreen) .main-header .qpos-navbar-date i {
    font-size: 13px;
    opacity: 0.9;
    line-height: 1;
}

body:not(.lockscreen) .main-header .qpos-navbar-date strong {
    font-weight: 600;
    letter-spacing: 0.01em;
}

body:not(.lockscreen) .main-header .qpos-navbar-user {
    display: flex !important;
    align-items: center;
    float: none !important;
    margin: 0 !important;
    height: 50px;
}

body:not(.lockscreen) .main-header .qpos-navbar-user > li {
    float: none !important;
    display: flex;
    align-items: center;
    height: 50px;
    position: relative;
}

body:not(.lockscreen) .main-header .qpos-navbar-user > li > a {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: 34px !important;
    min-height: 34px;
    padding: 0 10px !important;
    margin: 0 !important;
    line-height: 1 !important;
    color: #fff !important;
    background: transparent !important;
    border-radius: 8px;
}

body:not(.lockscreen) .main-header .qpos-navbar-user > li > a:hover,
body:not(.lockscreen) .main-header .qpos-navbar-user > li.open > a {
    background: rgba(255, 255, 255, 0.14) !important;
}

/* Keep profile / notifications dropdowns inside the viewport */
body:not(.lockscreen) .main-header .qpos-navbar-user > li > .dropdown-menu,
body:not(.lockscreen) .main-header .user-menu > .dropdown-menu,
body:not(.lockscreen) .main-header .notifications-menu > .dropdown-menu {
    left: auto !important;
    right: 0 !important;
    top: 100% !important;
    margin-top: 2px !important;
    float: none !important;
    min-width: 240px;
    max-width: min(280px, calc(100vw - 16px));
}

body:not(.lockscreen) .main-header .user-menu > .dropdown-menu {
    width: 260px;
    border-radius: 10px;
    overflow: hidden;
    border: none;
    box-shadow: 0 12px 32px rgba(15, 23, 42, 0.18);
    padding: 0;
}

body:not(.lockscreen) .main-header .user-menu > .dropdown-menu > .user-header {
    height: auto !important;
    padding: 16px 14px !important;
    background: var(--qpos-accent) !important;
}

body:not(.lockscreen) .main-header .user-menu > .dropdown-menu > .user-header > img {
    max-height: 48px;
    width: auto;
    border: none;
    margin: 0 auto 8px;
}

body:not(.lockscreen) .main-header .user-menu > .dropdown-menu > .user-header > p {
    margin: 0;
    color: #fff;
    font-size: 14px;
    font-weight: 600;
}

body:not(.lockscreen) .main-header .user-menu > .dropdown-menu > .user-footer {
    background: #fff;
    padding: 10px 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

body:not(.lockscreen) .main-header .user-menu > .dropdown-menu > .user-footer .pull-left,
body:not(.lockscreen) .main-header .user-menu > .dropdown-menu > .user-footer .pull-right {
    float: none !important;
}

body:not(.lockscreen) .main-header .user-menu > .dropdown-menu > .user-footer .btn {
    border-radius: 6px;
    margin: 0;
}

body:not(.lockscreen) .main-header .notifications-menu > a > .fas.fa-bell,
body:not(.lockscreen) .main-header .notifications-menu > a > i {
    font-size: 15px !important;
    line-height: 1 !important;
    width: auto !important;
    height: auto !important;
    margin: 0 !important;
    vertical-align: middle;
}

body:not(.lockscreen) .main-header .notifications-menu > a > .label {
    top: 2px !important;
    right: 2px !important;
    font-size: 10px;
    padding: 2px 5px;
    border-radius: 10px;
    background: #fff !important;
    color: var(--qpos-accent) !important;
}

body:not(.lockscreen) .main-header .user-menu > a > .user-image {
    float: none !important;
    width: 22px !important;
    height: 22px !important;
    margin: 0 !important;
    border-radius: 50%;
    object-fit: cover;
}

body:not(.lockscreen) .main-header .qpos-navbar-avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    font-size: 11px;
}

body:not(.lockscreen) .main-header .qpos-navbar-username {
    font-weight: 600;
    font-size: 13px;
    line-height: 1;
    max-width: 160px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

body:not(.lockscreen) .main-header .qpos-navbar-caret {
    font-size: 10px;
    opacity: 0.8;
    margin-left: 2px;
}

@media (max-width: 767px) {
    body:not(.lockscreen) .main-header .qpos-navbar-menu {
        gap: 6px;
        padding-right: 6px;
    }

    body:not(.lockscreen) .main-header .qpos-navbar-meta {
        padding-left: 8px;
        gap: 0;
    }

    body:not(.lockscreen) .main-header .qpos-navbar-username {
        max-width: 90px;
    }
}

body:not(.lockscreen) .main-sidebar {
    box-shadow: 0 0 1.5rem 0 rgba(136, 152, 170, 0.12) !important;
}

body:not(.lockscreen) .sidebar-menu > li > a {
    margin: 2px 8px;
    border-radius: 8px;
    border-left: 3px solid transparent;
}

/* Active item uses theme accent, keeps skin readable */
body:not(.lockscreen) .sidebar-menu > li.active > a,
body:not(.lockscreen) .sidebar-menu > li.menu-open > a {
    border-left-color: var(--qpos-accent);
}

/* Flatter page header: keep layout, drop tall gradient band */
body:not(.lockscreen) .content-wrapper .content-header-custom {
    background-color: transparent !important;
    background-image: none !important;
    color: var(--qpos-ink) !important;
    padding: 20px 20px 8px !important;
    margin: 0 !important;
}

body:not(.lockscreen) .content-wrapper .content-header-custom h1,
body:not(.lockscreen) .content-wrapper .content-header-custom small,
body:not(.lockscreen) .content-wrapper .content-header-custom a {
    color: var(--qpos-ink) !important;
}

body:not(.lockscreen) .content-wrapper .content-header-custom h1 {
    font-size: 24px !important;
    font-weight: 600 !important;
    margin: 0 !important;
    line-height: 1.3 !important;
}

body:not(.lockscreen) .content-wrapper .content-custom {
    margin-top: 0 !important;
    padding-top: 8px !important;
}

/* ========== Dashboard ========== */
.qpos-dash .qpos-dash__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px 20px;
    flex-wrap: wrap;
    width: 100%;
    min-height: 44px;
}

.qpos-dash .qpos-dash__header h1 {
    flex: 1 1 auto;
    min-width: 0;
    margin: 0 !important;
    line-height: 1.25 !important;
    display: flex;
    align-items: center;
}

.qpos-dash .qpos-dash__header-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    flex: 0 0 auto;
    margin-left: auto;
    height: 40px;
}

.qpos-dash .qpos-dash__control {
    position: relative;
    display: flex;
    align-items: center;
    height: 40px;
}

.qpos-dash .qpos-dash__control-icon {
    position: absolute;
    left: 12px;
    z-index: 2;
    width: 16px;
    height: 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--qpos-accent);
    pointer-events: none;
    font-size: 13px;
    line-height: 1;
}

.qpos-dash .qpos-dash__control .form-control,
.qpos-dash .qpos-dash__control .select2-container--default .select2-selection--single {
    border-radius: 8px !important;
    border: 1px solid var(--qpos-line) !important;
    height: 40px !important;
    min-width: 200px;
    background: var(--qpos-paper) !important;
    box-shadow: none !important;
}

.qpos-dash .qpos-dash__control .select2-container {
    width: 220px !important;
    height: 40px;
}

.qpos-dash .qpos-dash__control .select2-container--default .select2-selection--single .select2-selection__rendered {
    line-height: 38px !important;
    padding-left: 34px !important;
    color: var(--qpos-ink);
    font-weight: 500;
}

.qpos-dash .qpos-dash__control .select2-container--default .select2-selection--single .select2-selection__arrow {
    height: 38px !important;
}

.qpos-dash .qpos-dash__control .select2-container--default.select2-container--focus .select2-selection--single,
.qpos-dash .qpos-dash__control .form-control:focus {
    border-color: var(--qpos-accent) !important;
}

.qpos-dash .qpos-dash__date-btn,
.qpos-dash #dashboard_date_filter {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: 40px !important;
    min-height: 40px;
    padding: 0 14px !important;
    margin: 0 !important;
    border-radius: 8px !important;
    border: 1px solid var(--qpos-accent) !important;
    background: var(--qpos-accent) !important;
    color: #fff !important;
    font-weight: 600;
    font-size: 13px;
    line-height: 1;
    box-shadow: none !important;
    white-space: nowrap;
}

.qpos-dash .qpos-dash__date-btn:hover,
.qpos-dash .qpos-dash__date-btn:focus,
.qpos-dash #dashboard_date_filter:hover,
.qpos-dash #dashboard_date_filter:focus {
    background: var(--qpos-accent) !important;
    border-color: var(--qpos-accent) !important;
    color: #fff !important;
    filter: brightness(0.95);
    outline: none;
}

.qpos-dash .qpos-dash__date-btn > i:first-child,
.qpos-dash #dashboard_date_filter > i.fa-calendar-alt {
    font-size: 14px;
    line-height: 1;
    opacity: 0.95;
}

.qpos-dash .qpos-dash__date-caret {
    font-size: 10px;
    opacity: 0.85;
    margin-left: 2px;
}

@media (max-width: 767px) {
    .qpos-dash .qpos-dash__header {
        align-items: stretch;
    }

    .qpos-dash .qpos-dash__header-actions {
        width: 100%;
        height: auto;
        flex-wrap: wrap;
        justify-content: stretch;
    }

    .qpos-dash .qpos-dash__control,
    .qpos-dash .qpos-dash__control .select2-container,
    .qpos-dash .qpos-dash__date-btn,
    .qpos-dash #dashboard_date_filter {
        width: 100% !important;
        flex: 1 1 100%;
    }
}

/* Metric cards */
.qpos-dash .info-box.info-box-new-style,
.qpos-dash .qpos-metric {
    background: var(--qpos-paper) !important;
    border: 1px solid var(--qpos-line) !important;
    border-radius: 12px !important;
    box-shadow: var(--qpos-shadow) !important;
    padding: 14px 16px !important;
    margin-bottom: 16px;
    min-height: 92px;
    transform: none !important;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
    display: flex;
    align-items: center;
    overflow: hidden;
}

.qpos-dash .info-box.info-box-new-style:hover,
.qpos-dash .qpos-metric:hover {
    transform: none !important;
    border-color: var(--qpos-accent) !important;
    box-shadow: 0 10px 28px var(--qpos-accent-soft) !important;
}

.qpos-dash .info-box-new-style .info-box-icon,
.qpos-dash .qpos-metric .info-box-icon {
    float: none !important;
    width: 48px !important;
    height: 48px !important;
    min-width: 48px;
    line-height: 1 !important;
    border-radius: 10px !important;
    margin: 0 12px 0 0 !important;
    padding: 0 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    align-self: center;
    background: var(--qpos-accent-soft) !important;
    color: var(--qpos-accent) !important;
}

.qpos-dash .info-box-new-style .info-box-icon.bg-aqua,
.qpos-dash .info-box-new-style .info-box-icon.bg-green,
.qpos-dash .info-box-new-style .info-box-icon.bg-yellow,
.qpos-dash .info-box-new-style .info-box-icon.bg-red,
.qpos-dash .info-box-new-style .info-box-icon.bg-blue {
    background: var(--qpos-accent-soft) !important;
    color: var(--qpos-accent) !important;
}

.qpos-dash .info-box-new-style .info-box-icon i,
.qpos-dash .qpos-metric .info-box-icon i {
    font-size: 22px !important;
    line-height: 1 !important;
    width: 1em;
    height: 1em;
    margin: 0 !important;
    padding: 0 !important;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    color: var(--qpos-accent) !important;
    position: static !important;
}

.qpos-dash .info-box-new-style .info-box-icon i::before,
.qpos-dash .qpos-metric .info-box-icon i::before {
    margin: 0 !important;
    line-height: 1 !important;
    vertical-align: middle;
}

.qpos-dash .info-box-new-style .info-box-content,
.qpos-dash .qpos-metric .info-box-content {
    padding: 0 !important;
    margin: 0 !important;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-width: 0;
    flex: 1;
}

.qpos-dash .info-box-text {
    color: var(--qpos-muted) !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    text-transform: none !important;
    letter-spacing: 0;
    white-space: normal;
}

.qpos-dash .info-box-number {
    color: var(--qpos-ink) !important;
    font-size: 22px !important;
    font-weight: 700 !important;
    line-height: 1.25;
}

.qpos-dash .info-box-new-style > p,
.qpos-dash .qpos-metric > p {
    display: none;
}

/* Boxes / charts / tables */
.qpos-dash .box,
body:not(.lockscreen) .content-wrapper .box {
    border: 1px solid var(--qpos-line) !important;
    border-radius: 12px !important;
    box-shadow: var(--qpos-shadow) !important;
    background: var(--qpos-paper);
    border-top: 1px solid var(--qpos-line) !important;
}

.qpos-dash .box.box-primary,
.qpos-dash .box.box-warning,
.qpos-dash .box.box-success,
.qpos-dash .box.box-danger,
.qpos-dash .box.box-info,
body:not(.lockscreen) .content-wrapper .box.box-primary,
body:not(.lockscreen) .content-wrapper .box.box-warning {
    border-top-color: var(--qpos-line) !important;
}

.qpos-dash .box-header,
body:not(.lockscreen) .content-wrapper .box-header {
    background: transparent !important;
    color: var(--qpos-ink) !important;
    border-bottom: 1px solid var(--qpos-line);
    padding: 14px 16px;
    border-radius: 12px 12px 0 0;
}

.qpos-dash .box-header .box-title,
body:not(.lockscreen) .content-wrapper .box-header .box-title {
    font-size: 16px !important;
    font-weight: 600 !important;
    color: var(--qpos-ink) !important;
}

.qpos-dash .box-body,
body:not(.lockscreen) .content-wrapper .box-body {
    padding: 16px;
}

.qpos-dash .table > thead > tr > th {
    border-bottom: 1px solid var(--qpos-line);
    color: var(--qpos-muted);
    font-size: 13px;
    font-weight: 600;
    background: var(--qpos-fill);
}

.qpos-dash .table-bordered,
.qpos-dash .table-bordered > thead > tr > th,
.qpos-dash .table-bordered > tbody > tr > td {
    border-color: var(--qpos-line);
}

.qpos-dash .table-striped > tbody > tr:nth-of-type(odd) {
    background: #fafbfc;
}

.qpos-dash .dataTables_wrapper .dataTables_filter input,
.qpos-dash .dataTables_wrapper .dataTables_length select {
    border: 1px solid var(--qpos-line);
    border-radius: 8px;
    height: 34px;
    padding: 4px 10px;
}

@media (max-width: 767px) {
    body:not(.lockscreen) .content-wrapper .content-header-custom h1 {
        font-size: 20px !important;
    }

    .qpos-dash .info-box-number {
        font-size: 18px !important;
    }
}

/* ==========================================================================
   POS sell screen (body.lockscreen)
   Theme accents via --qpos-accent (skin-* on body)
   ========================================================================== */

body.lockscreen {
    background: var(--qpos-fill) !important;
    font-size: 14px;
}

body.lockscreen .wrapper {
    background: var(--qpos-fill);
}

body.lockscreen .content {
    padding-bottom: 100px !important;
}

/* POS header toolbar */
body.lockscreen .pos-header {
    background: var(--qpos-paper);
    border-bottom: 1px solid var(--qpos-line);
    padding: 8px 12px;
    margin: 0 0 10px;
    box-shadow: var(--qpos-shadow);
}

body.lockscreen .pos-header .form-control {
    min-height: 36px;
    border-radius: 8px;
    border-color: var(--qpos-line);
}

body.lockscreen .pos-header .curr_datetime {
    color: var(--qpos-muted);
    font-weight: 500;
}

/* Panels */
.qpos-pos .box,
body.lockscreen .box {
    border: 1px solid var(--qpos-line) !important;
    border-radius: 12px !important;
    box-shadow: var(--qpos-shadow) !important;
    border-top: 1px solid var(--qpos-line) !important;
    background: var(--qpos-paper);
}

.qpos-pos .box-body {
    padding: 14px 16px !important;
}

.qpos-pos .form-control,
.qpos-pos .select2-container--default .select2-selection--single {
    min-height: 42px;
    border-radius: 8px !important;
    border-color: var(--qpos-line) !important;
}

.qpos-pos .select2-container--default .select2-selection--single .select2-selection__rendered {
    line-height: 40px !important;
}

.qpos-pos .select2-container--default .select2-selection--single .select2-selection__arrow {
    height: 40px !important;
}

.qpos-pos #search_product {
    font-size: 16px !important;
    min-height: 44px;
}

/* Join customer / product search into one control (no bubbled middle) */
.qpos-pos .box-body > .row > [class*="col-"] > .form-group > .input-group {
    display: flex;
    align-items: stretch;
    width: 100%;
    border: 1px solid var(--qpos-line);
    border-radius: 8px;
    overflow: hidden;
    background: #fff;
}

.qpos-pos .box-body > .row > [class*="col-"] > .form-group > .input-group > .form-control,
.qpos-pos .box-body > .row > [class*="col-"] > .form-group > .input-group .select2-container--default .select2-selection--single {
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    min-height: 44px;
    height: 44px;
}

.qpos-pos .box-body > .row > [class*="col-"] > .form-group > .input-group .select2-container {
    flex: 1 1 auto;
    width: auto !important;
    display: block !important;
}

.qpos-pos .box-body > .row > [class*="col-"] > .form-group > .input-group > .form-control#search_product {
    flex: 1 1 auto;
    width: 1% !important;
    min-width: 0;
}

.qpos-pos .box-body > .row > [class*="col-"] > .form-group > .input-group .select2-container--default .select2-selection--single .select2-selection__rendered {
    line-height: 44px !important;
    padding-left: 10px;
}

.qpos-pos .box-body > .row > [class*="col-"] > .form-group > .input-group .select2-container--default .select2-selection--single .select2-selection__arrow {
    height: 44px !important;
}

.qpos-pos .box-body > .row > [class*="col-"] > .form-group > .input-group > .input-group-addon,
.qpos-pos .box-body > .row > [class*="col-"] > .form-group > .input-group > .input-group-btn {
    display: flex;
    align-items: stretch;
    width: auto;
    padding: 0;
    border: 0;
    background: transparent;
}

.qpos-pos .box-body > .row > [class*="col-"] > .form-group > .input-group > .input-group-addon {
    align-items: center;
    justify-content: center;
    min-width: 44px;
    padding: 0 12px;
    background: var(--qpos-fill);
    color: var(--qpos-muted);
    border-right: 1px solid var(--qpos-line);
    border-radius: 0;
}

.qpos-pos .box-body > .row > [class*="col-"] > .form-group > .input-group > .input-group-btn > .btn {
    min-height: 44px;
    height: 44px;
    margin: 0 !important;
    padding: 0 12px !important;
    border: 0 !important;
    border-left: 1px solid var(--qpos-line) !important;
    border-radius: 0 !important;
    background: #fff !important;
    box-shadow: none !important;
    line-height: 44px;
}

.qpos-pos .box-body > .row > [class*="col-"] > .form-group > .input-group > .input-group-btn:first-child > .btn {
    border-left: 0 !important;
    border-right: 1px solid var(--qpos-line) !important;
}

.qpos-pos #search_product {
    font-size: 16px !important;
    min-height: 44px;
    border-radius: 0 !important;
}

/* Cart */
.qpos-pos .pos_product_div,
body.lockscreen .pos_product_div {
    min-height: 42vh;
    max-height: 52vh;
    border: 1px solid var(--qpos-line);
    border-radius: 10px;
    background: #fafbfc;
    padding: 4px;
    margin-bottom: 12px;
}

.qpos-pos #pos_table,
body.lockscreen #pos_table {
    margin-bottom: 0;
    table-layout: fixed;
    width: 100%;
}

.qpos-pos #pos_table > thead > tr > th,
body.lockscreen #pos_table > thead > tr > th {
    background: var(--qpos-fill);
    color: var(--qpos-muted);
    font-size: 12px;
    font-weight: 600;
    border-bottom: 1px solid var(--qpos-line) !important;
    white-space: nowrap;
    vertical-align: middle !important;
    text-align: center;
    padding: 10px 8px !important;
    line-height: 1.25;
    float: none !important;
}

.qpos-pos #pos_table > thead > tr > th.pos-col-product,
body.lockscreen #pos_table > thead > tr > th.pos-col-product,
.qpos-pos #pos_table > thead > tr > th.text-left,
body.lockscreen #pos_table > thead > tr > th.text-left {
    text-align: left;
}

.qpos-pos #pos_table .pos-col-product {
    width: 46%;
}

.qpos-pos #pos_table .pos-col-qty {
    width: 22%;
}

.qpos-pos #pos_table .pos-col-staff {
    width: 16%;
}

.qpos-pos #pos_table .pos-col-price {
    width: 16%;
}

.qpos-pos #pos_table .pos-col-subtotal {
    width: 22%;
}

.qpos-pos #pos_table .pos-col-action {
    width: 44px;
}

.qpos-pos #pos_table > thead > tr > th.pos-col-action .fa,
.qpos-pos #pos_table > thead > tr > th.pos-col-action .fas {
    font-size: 12px;
    color: var(--qpos-muted);
}

.qpos-pos #pos_table > tbody > tr > td,
body.lockscreen #pos_table > tbody > tr > td {
    vertical-align: middle !important;
    border-color: var(--qpos-line);
    font-size: 14px;
    float: none !important;
}

.qpos-pos #pos_table > tbody > tr > td:first-child {
    text-align: left;
}

.qpos-pos #pos_table > tbody > tr > td.text-center,
.qpos-pos #pos_table > tbody > tr > td:nth-child(n+2) {
    text-align: center;
}

.qpos-pos #pos_table .pos_quantity,
.qpos-pos #pos_table .form-control {
    min-height: 40px;
    font-size: 15px;
    text-align: center;
}

.qpos-pos i.pos_remove_row {
    font-size: 18px;
    padding: 8px;
    cursor: pointer;
}

/* Totals strip */
.qpos-pos .pos_form_totals .form-group,
body.lockscreen .pos_form_totals {
    margin-bottom: 8px;
}

/* Product grid */
body.lockscreen .pos_sidebar .box,
.qpos-pos + .pos_sidebar .box {
    border-radius: 12px;
}

body.lockscreen #product_list_body {
    max-height: 62vh;
    overflow-y: auto;
    padding: 6px 4px;
}

body.lockscreen .product_list {
    padding-left: 6px;
    padding-right: 6px;
}

body.lockscreen .product_box {
    border: 1px solid var(--qpos-line);
    border-radius: 10px !important;
    padding: 8px 6px 10px !important;
    margin-bottom: 10px;
    box-shadow: none;
    transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.1s ease;
    background: var(--qpos-paper);
    min-height: 110px;
}

body.lockscreen .product_box.no-image {
    min-height: 72px;
    display: flex;
    align-items: center;
    justify-content: center;
}

body.lockscreen .product_box.no-image .text_div {
    margin-top: 0;
    width: 100%;
}

body.lockscreen .product_box:hover,
body.lockscreen .product_box:active {
    border-color: var(--qpos-accent);
    box-shadow: 0 8px 20px var(--qpos-accent-soft);
    transform: translateY(-1px);
}

body.lockscreen .product_box .image-container {
    height: 64px !important;
    margin-bottom: 6px;
}

body.lockscreen .product_box .image-container img {
    height: 56px !important;
    max-width: 100%;
    object-fit: contain;
}

body.lockscreen .product_box .text_div {
    margin-top: 4px;
}

body.lockscreen .product_box .text {
    font-size: 13px !important;
    line-height: 1.25 !important;
    max-height: 2.5em !important;
    -webkit-line-clamp: 2 !important;
    color: var(--qpos-ink) !important;
    font-weight: 600;
}

body.lockscreen .product_box small.text-muted {
    font-size: 11px;
    display: block;
    margin-top: 2px;
}

body.lockscreen #product_category,
body.lockscreen #product_brand {
    min-height: 40px;
    border-radius: 8px;
    margin-bottom: 8px;
}

/* Fixed action bar */
body.lockscreen .pos-form-actions,
.qpos-pos-actions.pos-form-actions {
    background: var(--qpos-paper) !important;
    border-top: 1px solid var(--qpos-line);
    box-shadow: 0 -8px 24px rgba(15, 23, 42, 0.08);
    padding: 10px 14px 12px !important;
    display: block;
    width: 100%;
}

body.lockscreen .qpos-pos-actions-main {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
    width: 100%;
}

body.lockscreen .qpos-pos-actions-left {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    flex: 1 1 auto;
    min-width: 0;
}

body.lockscreen .qpos-pos-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    width: 100%;
}

body.lockscreen .qpos-pos-toolbar .btn,
body.lockscreen .qpos-pos-toolbar a.btn {
    min-height: 36px !important;
    height: 36px;
    padding: 0 12px !important;
    margin: 0 !important;
    border-radius: 8px !important;
    font-weight: 600;
    font-size: 13px !important;
    line-height: 1 !important;
    box-shadow: none !important;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    gap: 6px;
    border: 1px solid transparent !important;
}

/* Theme-aligned utility icons (override rainbow AdminLTE colors) */
body.lockscreen .qpos-pos-toolbar .btn,
body.lockscreen .qpos-pos-toolbar a.btn,
body.lockscreen .qpos-pos-toolbar .btn.bg-purple,
body.lockscreen .qpos-pos-toolbar .btn.bg-yellow,
body.lockscreen .qpos-pos-toolbar .btn.btn-success,
body.lockscreen .qpos-pos-toolbar .btn.btn-danger,
body.lockscreen .qpos-pos-toolbar .btn.btn-primary,
body.lockscreen .qpos-pos-toolbar .btn.btn-info {
    background: var(--qpos-accent-soft) !important;
    border-color: transparent !important;
    color: var(--qpos-accent) !important;
}

body.lockscreen .qpos-pos-toolbar .btn:hover,
body.lockscreen .qpos-pos-toolbar a.btn:hover {
    filter: brightness(0.97);
    color: var(--qpos-accent) !important;
}

body.lockscreen .qpos-pos-toolbar .btn i,
body.lockscreen .qpos-pos-toolbar a.btn i {
    font-size: 14px;
    line-height: 1;
    width: 1em;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: inherit !important;
}

body.lockscreen .qpos-pos-toolbar .btn:not(#add_expense) {
    min-width: 36px;
    padding: 0 10px !important;
}

body.lockscreen .qpos-pos-toolbar #add_expense {
    padding: 0 14px !important;
    background: var(--qpos-accent) !important;
    color: #fff !important;
}

body.lockscreen .qpos-pos-toolbar #add_expense i {
    color: #fff !important;
}

body.lockscreen .qpos-pos-toolbar #close_register {
    background: rgba(217, 39, 45, 0.12) !important;
    color: #d9272d !important;
}

body.lockscreen .qpos-pos-actions-buttons {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    width: 100%;
}

body.lockscreen .pos-form-actions .btn,
.qpos-pos-actions .btn {
    min-height: 44px;
    border-radius: 8px !important;
    font-weight: 600;
    font-size: 14px !important;
    padding: 8px 14px !important;
    box-shadow: none !important;
    margin: 0 !important;
    float: none !important;
}

body.lockscreen .pos-form-actions #pos-finalize,
body.lockscreen .pos-form-actions .pos-express-finalize[data-pay_method="cash"],
body.lockscreen .pos-form-actions .pos-express-finalize[data-pay_method="card"] {
    min-height: 48px;
    font-size: 15px !important;
    padding: 10px 16px !important;
}

body.lockscreen .pos-form-actions .pos-express-finalize[data-pay_method="cash"] {
    background: var(--qpos-accent) !important;
    border-color: var(--qpos-accent) !important;
    color: #fff !important;
}

body.lockscreen .pos-form-actions .pos-express-finalize[data-pay_method="card"] {
    background: #1c2430 !important;
    border-color: #1c2430 !important;
    color: #fff !important;
}

body.lockscreen .pos-form-actions #pos-finalize {
    background: #0f766e !important;
    border-color: #0f766e !important;
    color: #fff !important;
}

/* Right-side cash + total stack */
body.lockscreen .qpos-pos-pay-summary {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    flex: 0 0 260px;
    width: 260px;
    margin-left: auto;
}

body.lockscreen .qpos-pos-pay-summary--mobile {
    width: 100%;
    flex: 1 1 100%;
    margin: 0 0 10px;
}

body.lockscreen .qpos-pos-cash-wrap {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

body.lockscreen .qpos-pos-cash-label {
    margin: 0;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #64748b;
}

body.lockscreen .qpos-pos-cash-wrap .cash_recieved {
    height: 44px;
    min-height: 44px;
    border: 1px solid var(--qpos-line);
    border-radius: 8px;
    font-size: 20px;
    font-weight: 700;
    text-align: right;
    padding: 6px 12px;
    color: var(--qpos-ink);
    background: #fff;
    box-shadow: none;
}

body.lockscreen .qpos-pos-cash-wrap .cash_recieved:focus {
    border-color: var(--qpos-accent);
    outline: none;
    box-shadow: 0 0 0 3px var(--qpos-accent-soft);
}

body.lockscreen .qpos-cash-return {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #ecfdf5;
    color: #065f46;
    border: 1px solid #a7f3d0;
    border-radius: 8px;
    padding: 6px 10px;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.2;
}

body.lockscreen .qpos-cash-return strong {
    font-weight: 700;
    color: #047857;
}

body.lockscreen .pos-form-actions .pos-total-box,
body.lockscreen .pos-form-actions .qpos-pos-total {
    background: #111827 !important;
    color: #fff !important;
    border-radius: 10px;
    width: 100%;
    min-width: 0;
    padding: 10px 16px 12px !important;
    margin: 0 !important;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    justify-content: center;
    text-align: right;
    line-height: 1.15;
}

body.lockscreen .pos-form-actions .qpos-pos-total b,
body.lockscreen .pos-form-actions .pos-total-box b {
    font-size: 11px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.72);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 2px;
}

body.lockscreen #total_payable {
    font-size: 36px !important;
    font-weight: 800 !important;
    color: #fff !important;
    line-height: 1;
    letter-spacing: -0.02em;
}

body.lockscreen .pos-express-btn {
    height: auto !important;
    font-size: 15px !important;
}

/* Payment modal polish */
body.lockscreen #modal_payment .modal-content {
    border-radius: 12px;
    border: none;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.2);
}

body.lockscreen #modal_payment .modal-header {
    border-bottom: 1px solid var(--qpos-line);
    background: var(--qpos-fill);
    border-radius: 12px 12px 0 0;
}

body.lockscreen #modal_payment .modal-footer {
    border-top: 1px solid var(--qpos-line);
}

body.lockscreen #modal_payment .payment-amount,
body.lockscreen #modal_payment .form-control {
    min-height: 42px;
    font-size: 16px;
    border-radius: 8px;
}

body.lockscreen #modal_payment .total_payable_span,
body.lockscreen #modal_payment .lead {
    font-size: 22px !important;
    font-weight: 700;
    color: var(--qpos-accent);
}

@media (max-width: 1200px) {
    body.lockscreen .qpos-pos-pay-summary {
        flex-basis: 220px;
        width: 220px;
    }

    body.lockscreen #total_payable {
        font-size: 30px !important;
    }
}

@media (max-width: 767px) {
    body.lockscreen .qpos-pos-actions-main {
        flex-direction: column;
        align-items: stretch;
    }

    body.lockscreen .qpos-pos-actions-buttons .btn.col-xs-6 {
        width: calc(50% - 4px);
    }

    body.lockscreen .pos-form-actions .btn {
        min-height: 48px;
    }

    body.lockscreen #total_payable {
        font-size: 28px !important;
    }

    body.lockscreen .product_box {
        min-height: 100px;
    }
}
