/* Shared visual system for the MPG PHP app */

:root {
    --mpg-ink: #1b2430;
    --mpg-muted: #66758a;
    --mpg-muted-soft: #8b98aa;
    --mpg-line: rgba(36, 51, 71, 0.1);
    --mpg-line-strong: rgba(31, 45, 64, 0.14);
    --mpg-surface: rgba(255, 255, 255, 0.78);
    --mpg-surface-strong: rgba(255, 255, 255, 0.92);
    --mpg-surface-tint: #f5f7fb;
    --mpg-shadow: 0 18px 54px rgba(27, 36, 48, 0.08);
    --mpg-shadow-soft: 0 10px 30px rgba(31, 46, 66, 0.06);
    --mpg-radius: 1.2rem;
    --mpg-radius-sm: 0.9rem;
    --mpg-brand: #1f6feb;
    --mpg-brand-deep: #1646a0;
    --mpg-brand-soft: rgba(31, 111, 235, 0.12);
    --mpg-accent: #0f9a8a;
    --mpg-accent-soft: rgba(15, 154, 138, 0.12);
    --mpg-warm: #f6eee4;
    --mpg-topbar-height: 56px;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: "Manrope", "Segoe UI", sans-serif;
    color: var(--mpg-ink);
    background:
        radial-gradient(circle at top left, rgba(31, 111, 235, 0.12), transparent 30%),
        radial-gradient(circle at top right, rgba(15, 154, 138, 0.12), transparent 24%),
        linear-gradient(180deg, #eef2f8 0%, #f8f6f1 46%, #f4f7fb 100%);
}

h1,
h2,
h3,
.display-1,
.display-2,
.display-3 {
    letter-spacing: -0.035em;
}

.admin-app {
    min-width: 0;
    position: relative;
    background: transparent !important;
}

.admin-app > .admin-content {
    flex: 1 1 0%;
    min-width: 0;
}

.admin-content {
    position: relative;
    min-width: 0;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.34) 0%, rgba(255, 255, 255, 0) 24%),
        transparent;
}

.admin-content::before {
    content: "";
    position: fixed;
    inset: auto auto 8% 3%;
    width: 18rem;
    height: 18rem;
    border-radius: 999px;
    background: radial-gradient(circle, rgba(246, 238, 228, 0.9) 0%, rgba(246, 238, 228, 0) 72%);
    filter: blur(18px);
    pointer-events: none;
    z-index: 0;
}

.admin-content::after {
    content: "";
    position: fixed;
    inset: 6% 5% auto auto;
    width: 20rem;
    height: 20rem;
    border-radius: 999px;
    background: radial-gradient(circle, rgba(31, 111, 235, 0.1) 0%, rgba(31, 111, 235, 0) 74%);
    filter: blur(10px);
    pointer-events: none;
    z-index: 0;
}

.admin-content > * {
    position: relative;
    z-index: 1;
}

.admin-topbar {
    backdrop-filter: blur(18px);
    background: rgba(255, 255, 255, 0.74) !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.45) !important;
    box-shadow: 0 12px 30px rgba(23, 34, 51, 0.06) !important;
}

.admin-topbar .h5 {
    font-weight: 800;
    color: #122033 !important;
}

.admin-topbar .dropdown > .btn,
.admin-topbar .mpg-sidebar-toggle {
    border-radius: 999px;
    border-color: rgba(27, 36, 48, 0.1) !important;
    background: rgba(255, 255, 255, 0.76) !important;
    box-shadow: 0 10px 24px rgba(30, 44, 61, 0.08);
}

.admin-topbar .dropdown > .btn:hover,
.admin-topbar .mpg-sidebar-toggle:hover {
    transform: translateY(-1px);
    box-shadow: 0 14px 26px rgba(30, 44, 61, 0.1);
}

.admin-sidebar.bg-dark,
.offcanvas.offcanvas-start.text-bg-dark {
    background:
        radial-gradient(circle at top right, rgba(72, 114, 255, 0.24), transparent 24%),
        linear-gradient(180deg, #172234 0%, #0f1723 52%, #0a111b 100%) !important;
}

.admin-sidebar .nav-link,
.offcanvas .nav-link {
    border-radius: 0.95rem;
    color: rgba(255, 255, 255, 0.78);
    padding: 0.82rem 0.95rem;
    transition: all 0.2s ease;
}

.admin-sidebar .nav-link:hover,
.offcanvas .nav-link:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.08);
    transform: translateX(2px);
}

.admin-sidebar .nav-link.active,
.offcanvas .nav-link.active {
    color: #fff;
    background:
        linear-gradient(135deg, rgba(31, 111, 235, 0.82), rgba(15, 154, 138, 0.55));
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.14), 0 10px 24px rgba(0, 0, 0, 0.18);
}

.branch-switcher-select,
.offcanvas .form-select,
.admin-sidebar .form-select {
    border-radius: 0.85rem;
}

.mpg-page-head {
    margin-bottom: 1.8rem !important;
}

.mpg-page-head h1 {
    font-size: clamp(2rem, 2.6vw, 2.75rem);
    font-weight: 800;
    letter-spacing: -0.055em;
    color: #152132;
}

.mpg-page-head p,
.text-muted {
    color: var(--mpg-muted) !important;
}

.badge,
.btn,
.form-control,
.form-select,
.input-group-text,
.dropdown-menu,
.modal-content,
.alert {
    border-radius: 0.9rem;
}

.btn {
    font-weight: 700;
    letter-spacing: -0.01em;
    border-width: 1px;
    transition: transform 0.18s ease, box-shadow 0.18s ease, background-color 0.18s ease, border-color 0.18s ease;
}

.btn:hover {
    transform: translateY(-1px);
}

.btn-primary {
    border-color: transparent !important;
    background: linear-gradient(135deg, #2e78ef 0%, #1758bb 100%) !important;
    box-shadow: 0 12px 24px rgba(31, 111, 235, 0.22);
}

.btn-primary:hover,
.btn-primary:focus {
    box-shadow: 0 16px 28px rgba(31, 111, 235, 0.28);
}

.btn-outline-primary {
    border-color: rgba(31, 111, 235, 0.25);
    color: var(--mpg-brand);
    background: rgba(255, 255, 255, 0.7);
}

.btn-outline-secondary,
.btn-light,
.btn-outline-success {
    border-color: var(--mpg-line-strong);
    background: rgba(255, 255, 255, 0.66);
}

.btn-outline-success {
    color: #177d71;
}

.form-control,
.form-select,
.input-group-text {
    border-color: rgba(27, 36, 48, 0.09);
    background: rgba(255, 255, 255, 0.86);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.55);
}

.form-control:focus,
.form-select:focus {
    border-color: rgba(31, 111, 235, 0.4);
    box-shadow: 0 0 0 0.28rem rgba(31, 111, 235, 0.11);
}

.input-group-text {
    color: var(--mpg-muted);
}

.card,
.mpg-card {
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.55) !important;
    border-radius: var(--mpg-radius) !important;
    background: linear-gradient(180deg, var(--mpg-surface-strong) 0%, var(--mpg-surface) 100%) !important;
    box-shadow: var(--mpg-shadow) !important;
    backdrop-filter: blur(16px);
}

.card-header,
.mpg-card-header {
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.74) 0%, rgba(248, 251, 255, 0.84) 100%) !important;
    border-bottom: 1px solid var(--mpg-line) !important;
    font-weight: 800;
}

.card-body,
.card-footer {
    position: relative;
}

.mpg-badge-soft {
    background: rgba(31, 111, 235, 0.1);
    color: var(--mpg-brand-deep);
    font-weight: 700;
    padding: 0.5rem 0.8rem;
}

.table-responsive {
    max-width: 100%;
    -webkit-overflow-scrolling: touch;
    padding-left: 0.75rem;
    padding-right: 0.75rem;
    padding-bottom: 0.5rem;
}

.table {
    --bs-table-bg: transparent;
    --bs-table-striped-bg: rgba(16, 26, 39, 0.03);
    --bs-table-hover-bg: rgba(31, 111, 235, 0.045);
    margin-bottom: 0;
}

.table thead th {
    font-size: 0.76rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--mpg-muted-soft);
    border-bottom: 1px solid var(--mpg-line) !important;
    background: linear-gradient(180deg, #fbfcfe 0%, #f2f5fa 100%) !important;
    vertical-align: middle;
}

.table tbody td {
    border-color: rgba(28, 41, 58, 0.06);
    vertical-align: middle;
    font-size: 0.93rem;
}

#inventory-products-card table tbody td {
    vertical-align: middle;
}

#inventory-products-card .btn-link {
    color: var(--mpg-brand);
}

#inventory-products-card .btn-link.text-danger {
    color: #cb4c53 !important;
}

#inventory-products-card .btn-link:focus {
    box-shadow: none;
}

.table-pagination-bar {
    border-top: 1px solid var(--mpg-line);
    background: linear-gradient(180deg, rgba(251, 252, 254, 0.9), rgba(244, 247, 251, 0.88));
}

.table-pagination-bar .btn {
    border-radius: 999px;
}

.dropdown-menu {
    border: 1px solid rgba(27, 36, 48, 0.08);
    box-shadow: 0 24px 48px rgba(23, 34, 51, 0.12);
    padding: 0.55rem;
}

.dropdown-item {
    border-radius: 0.7rem;
    font-weight: 600;
}

.dropdown-item:hover {
    background: rgba(31, 111, 235, 0.08);
}

.modal-content {
    border: 1px solid rgba(255, 255, 255, 0.52);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(249, 251, 255, 0.92));
    box-shadow: 0 28px 64px rgba(17, 28, 43, 0.16);
}

.modal {
    z-index: 2000;
}

.modal-backdrop {
    z-index: 1990;
}

.modal-dialog,
.modal-content {
    pointer-events: auto;
}

.modal-header,
.modal-footer {
    border-color: var(--mpg-line) !important;
}

.catalog-master-overlay {
    position: fixed;
    inset: 0;
    z-index: 2110;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: calc(var(--mpg-topbar-height) + 1rem) 1.25rem 1.25rem;
    background: rgba(15, 23, 42, 0.56);
    backdrop-filter: blur(4px);
    pointer-events: auto;
    isolation: isolate;
}

.catalog-master-panel {
    width: min(1120px, 100%);
    max-height: calc(100dvh - var(--mpg-topbar-height) - 2rem);
    overflow: auto;
    position: relative;
    z-index: 1;
    pointer-events: auto;
    border-radius: 1.35rem;
    border: 1px solid rgba(255, 255, 255, 0.52);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(249, 251, 255, 0.92));
    box-shadow: 0 28px 64px rgba(17, 28, 43, 0.2);
}

body.catalog-master-open {
    overflow: hidden;
}

.catalog-master-header,
.catalog-master-footer {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem 1rem 0;
}

.catalog-master-body {
    padding: 1rem;
}

.catalog-master-footer {
    padding: 0 1rem 1rem;
    justify-content: flex-end;
}

.alert {
    border: 1px solid rgba(255, 255, 255, 0.45);
    box-shadow: var(--mpg-shadow-soft);
}

.app-site-footer {
    flex-shrink: 0;
}

.app-site-footer,
.app-site-footer .text-muted {
    color: #738397 !important;
}

.landing-page {
    position: relative;
    overflow: hidden;
    background:
        radial-gradient(circle at 15% 15%, rgba(31, 111, 235, 0.14), transparent 24%),
        radial-gradient(circle at 85% 18%, rgba(15, 154, 138, 0.12), transparent 22%),
        linear-gradient(145deg, #edf2fa 0%, #f8f5ef 48%, #f5f8fc 100%);
}

.landing-page::before {
    content: "";
    position: absolute;
    inset: 7% auto auto 6%;
    width: 18rem;
    height: 18rem;
    border-radius: 999px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.95), rgba(255, 255, 255, 0));
    filter: blur(8px);
}

.landing-page .hero-panel {
    position: relative;
    overflow: hidden;
    padding: 2.75rem;
    border-radius: 2rem;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.86), rgba(255, 255, 255, 0.68));
    box-shadow: 0 28px 64px rgba(25, 36, 52, 0.12);
    backdrop-filter: blur(18px);
}

.landing-page .hero-panel::after {
    content: "";
    position: absolute;
    inset: auto -4rem -4rem auto;
    width: 14rem;
    height: 14rem;
    border-radius: 999px;
    background: radial-gradient(circle, rgba(31, 111, 235, 0.14), rgba(31, 111, 235, 0));
}

.landing-page .hero-kicker {
    color: var(--mpg-brand-deep);
    text-transform: uppercase;
    font-size: 0.8rem;
    font-weight: 800;
    letter-spacing: 0.16em;
}

.landing-page .hero-title {
    font-family: "Cormorant Garamond", Georgia, serif;
    font-size: clamp(3rem, 5vw, 5rem);
    line-height: 0.95;
    letter-spacing: -0.05em;
    color: #102033;
}

.landing-page .hero-lead {
    color: #5f6f82;
    font-size: 1.05rem;
}

.landing-page .hero-note {
    color: #8190a2;
}

.dashboard-quick-link {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.dashboard-quick-link:hover {
    transform: translateY(-4px);
}

.dashboard-stat .stat-icon {
    width: 3.4rem;
    height: 3.4rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 1rem;
}

div.dataTables_wrapper {
    width: 100% !important;
    max-width: 100%;
    overflow-x: visible;
    padding-top: 0.35rem;
}

table.dataTable {
    width: 100% !important;
}

.mpg-dt-wrap table.dataTable thead th {
    font-size: 0.74rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--mpg-muted-soft);
    border-bottom: 1px solid var(--mpg-line) !important;
    background: linear-gradient(180deg, #fbfcfe 0%, #f2f5fa 100%) !important;
}

.mpg-dt-wrap table.dataTable tbody td {
    font-size: 0.9rem;
    border-color: rgba(15, 23, 42, 0.06);
}

.mpg-dt-wrap table.dataTable.table-striped > tbody > tr:nth-of-type(odd) > * {
    box-shadow: inset 0 0 0 9999px rgba(15, 23, 42, 0.024);
}

.mpg-dt-wrap table.dataTable.table-hover > tbody > tr:hover > * {
    box-shadow: inset 0 0 0 9999px rgba(31, 111, 235, 0.05);
}

.mpg-dt-wrap .dataTables_length,
.mpg-dt-wrap .dataTables_info {
    font-size: 0.82rem;
    color: var(--mpg-muted);
}

.mpg-dt-wrap .dataTables_wrapper .dataTables_filter input {
    border-radius: 0.75rem;
    border: 1px solid rgba(27, 36, 48, 0.1);
    padding: 0.42rem 0.7rem;
    font-size: 0.9rem;
}

.mpg-dt-wrap .dataTables_wrapper .dataTables_paginate .paginate_button {
    border-radius: 999px !important;
}

.card .mpg-dt-wrap.table-responsive {
    border-top: 1px solid var(--mpg-line);
    margin-top: 0.35rem;
    margin-bottom: 0.35rem;
    border-radius: 0.75rem;
    background: rgba(255, 255, 255, 0.75);
}

table.dataTable.dtr-inline.collapsed > tbody > tr > td.dtr-control:before,
table.dataTable.dtr-inline.collapsed > tbody > tr > th.dtr-control:before {
    top: 50%;
    transform: translateY(-50%);
    background-color: var(--mpg-brand);
}

table.dataTable > tbody > tr > td {
    vertical-align: middle;
}

table.dataTable thead th.dtr-control,
table.dataTable tbody td.dtr-control {
    width: 2.5rem;
    max-width: 2.75rem;
    padding-left: 0.35rem;
    padding-right: 0.35rem;
}

.pos-retail-hero {
    background: linear-gradient(120deg, #1655bc 0%, #0d377c 45%, #0d7a74 100%);
}

.pos-retail-page {
    position: relative;
}

.pos-retail-page > .row:first-of-type {
    margin-bottom: 1rem;
}

.pos-finder-results {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}

.pos-finder-overlay {
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 5.25rem 1.5rem 1.5rem;
    background: rgba(17, 24, 39, 0.56);
    backdrop-filter: blur(6px);
}

.pos-finder-panel {
    width: min(1040px, 100%);
    max-height: calc(100vh - 6.75rem);
    overflow: auto;
    border-radius: 1.35rem;
    border: 1px solid rgba(255, 255, 255, 0.45);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(248, 250, 255, 0.95));
    box-shadow: 0 28px 64px rgba(17, 28, 43, 0.22);
}

.pos-scanner-overlay {
    position: fixed;
    inset: 0;
    z-index: 2050;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    background: rgba(15, 23, 42, 0.64);
    backdrop-filter: blur(4px);
}

.pos-scanner-panel {
    width: min(980px, 100%);
    border-radius: 1.35rem;
    border: 1px solid rgba(255, 255, 255, 0.28);
    background: rgba(10, 18, 31, 0.92);
    box-shadow: 0 28px 64px rgba(17, 28, 43, 0.36);
    overflow: hidden;
}

.pos-scanner-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem 1rem 0;
    color: #fff;
}

.pos-scanner-body {
    padding: 1rem;
}

.pos-permission-overlay {
    position: fixed;
    inset: 0;
    z-index: 2100;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    background: rgba(15, 23, 42, 0.52);
    backdrop-filter: blur(4px);
}

.pos-permission-dialog {
    width: min(28rem, 100%);
    border-radius: 1.25rem;
    border: 1px solid rgba(255, 255, 255, 0.6);
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 24px 56px rgba(15, 23, 42, 0.2);
    padding: 1.25rem;
}

.pos-permission-steps {
    display: grid;
    gap: 0.45rem;
    padding: 0.9rem 1rem;
    border-radius: 1rem;
    background: rgba(31, 111, 235, 0.06);
    border: 1px solid rgba(31, 111, 235, 0.1);
}

.pos-finder-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    padding: 1.25rem 1.25rem 0;
}

.pos-finder-body {
    padding: 1rem 1.25rem 1.25rem;
}

.pos-camera-shell {
    position: relative;
    overflow: hidden;
    border-radius: 1rem;
    min-height: 15rem;
    border: 1px solid rgba(36, 51, 71, 0.08);
    background: linear-gradient(180deg, #f8fafc, #eef3fa);
}

.pos-camera-reader {
    width: 100%;
    min-height: 26rem;
    border-radius: 1rem;
    overflow: hidden;
    background: #09111f;
}

.pos-camera-reader video {
    width: 100% !important;
    height: 26rem !important;
    object-fit: cover;
}

.pos-camera-reader > div {
    border: 0 !important;
}

.pos-scanner-live-indicator {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    padding: 0.52rem 0.9rem;
    border-radius: 999px;
    background: rgba(9, 17, 31, 0.72);
    color: #fff;
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    white-space: nowrap;
}

.pos-scanner-live-dot {
    width: 0.55rem;
    height: 0.55rem;
    border-radius: 999px;
    background: #34d399;
    box-shadow: 0 0 0 0 rgba(52, 211, 153, 0.55);
    animation: posScanPulse 1.4s infinite;
}

@keyframes posScanPulse {
    0% {
        box-shadow: 0 0 0 0 rgba(52, 211, 153, 0.55);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(52, 211, 153, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(52, 211, 153, 0);
    }
}

.pos-camera-placeholder {
    min-height: 15rem;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: #66758a;
}

.pos-camera-placeholder i {
    font-size: 1.8rem;
    color: #1f6feb;
}

.pos-finder-item {
    display: grid;
    grid-template-columns: 72px minmax(0, 1fr) auto;
    gap: 0.9rem;
    align-items: center;
    padding: 0.9rem;
    border-radius: 1rem;
    border: 1px solid rgba(36, 51, 71, 0.08);
    background: rgba(255, 255, 255, 0.92);
}

.pos-finder-thumb-wrap {
    width: 72px;
    height: 72px;
    border-radius: 0.9rem;
    overflow: hidden;
    background: linear-gradient(180deg, #f8fafc, #eef3fa);
}

.pos-finder-thumb {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.pos-finder-copy {
    min-width: 0;
}

.pos-finder-name {
    font-weight: 800;
    color: #1a2433;
    margin-bottom: 0.2rem;
}

.pos-finder-meta {
    font-size: 0.85rem;
    color: #6a7890;
    margin-bottom: 0.45rem;
    word-break: break-word;
}

.pos-finder-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
}

.pos-finder-badge {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 0.28rem 0.6rem;
    background: #f2f5f9;
    color: #2c3b4e;
    font-size: 0.8rem;
    font-weight: 700;
}

.pos-finder-price {
    background: rgba(15, 154, 138, 0.12);
    color: #0f7f73;
}

.pos-finder-incart {
    background: rgba(31, 111, 235, 0.12);
    color: #1f6feb;
}

.pos-finder-actions .btn {
    min-width: 7rem;
}

.pos-dt-thumb {
    background: #f8f9fa;
}

.pos-cart-head {
    display: none;
}

.pos-cart-lines {
    display: flex;
    flex-direction: column;
    gap: 0.7rem;
    min-width: 0;
}

.pos-cart-line {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto;
    gap: 0.65rem 0.8rem;
    padding: 0.7rem 0;
    border-bottom: 1px solid rgba(28, 41, 58, 0.08);
    min-width: 0;
}

.pos-cart-item {
    min-width: 0;
    grid-column: 1 / -1;
}

.pos-cart-name,
.pos-cart-barcode {
    white-space: normal;
    word-break: break-word;
}

.pos-cart-name {
    font-size: 0.97rem;
}

.pos-cart-barcode,
.pos-cart-price {
    font-size: 0.82rem;
}

.pos-cart-price,
.pos-cart-qty,
.pos-cart-sub,
.pos-cart-remove-wrap {
    min-width: 0;
}

.pos-cart-price {
    text-align: left !important;
}

.pos-cart-qty {
    justify-self: center;
}

.pos-cart-sub {
    justify-self: end;
    font-size: 0.92rem;
}

.pos-cart-qty-group {
    flex-wrap: nowrap;
    max-width: 100%;
}

.pos-cart-qty-group .btn {
    min-width: 2.1rem;
}

.pos-cart-qty-value {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2.5rem;
}

.pos-cart-remove-wrap .btn {
    width: 2rem;
    height: 2rem;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.pos-cart-remove-wrap {
    grid-column: 3;
    grid-row: 2;
    justify-self: end;
    align-self: center;
}

.letter-spacing-1 {
    letter-spacing: 0.06em;
}

.pos-order-summary-inline {
    background: rgba(255, 255, 255, 0.94) !important;
}

.pos-cart-scroll {
    overflow: visible;
    overflow-x: hidden;
}

.pos-order-summary-inline .btn-success {
    box-shadow: 0 16px 26px rgba(25, 135, 84, 0.22);
}

@media (min-width: 1200px) {
    .mpg-dt-wrap table.dataTable thead th {
        font-size: 0.75rem;
    }

    .pos-products-col {
        padding-right: 0.5rem;
    }
}

@media (max-width: 767.98px) {
    body.pos-finder-open {
        overflow: hidden;
    }

    .pos-finder-overlay {
        padding: 1rem;
        align-items: flex-start;
    }

    .pos-finder-panel {
        max-height: calc(100vh - 2rem);
    }

    .pos-scanner-overlay {
        padding: 1rem;
        align-items: flex-end;
    }

    .pos-scanner-panel {
        width: 100%;
        border-radius: 1.1rem;
    }

    .pos-scanner-header {
        padding: 0.9rem 0.9rem 0;
        flex-direction: column;
    }

    .pos-scanner-body {
        padding: 0.9rem;
    }

    .pos-permission-overlay {
        padding: 1rem;
        align-items: flex-end;
    }

    .pos-permission-dialog {
        width: 100%;
        border-radius: 1.1rem;
        padding: 1rem;
    }

    .pos-finder-header,
    .pos-finder-body {
        padding-inline: 1rem;
    }

    .catalog-master-overlay {
        padding: calc(var(--mpg-topbar-height) + 0.75rem) 0.85rem 0.85rem;
    }

    .catalog-master-panel {
        max-height: calc(100dvh - var(--mpg-topbar-height) - 1.5rem);
    }

    .catalog-master-header,
    .catalog-master-footer,
    .catalog-master-body {
        padding-inline: 0.9rem;
    }

    .pos-retail-page > .row:first-of-type {
        margin-bottom: 0.75rem;
    }

    .pos-retail-page .btn-sm {
        min-height: 2.6rem;
    }

    .pos-retail-page > .d-flex:first-child {
        align-items: stretch !important;
    }

    .pos-retail-page > .d-flex:first-child .btn {
        border-radius: 999px;
        padding: 0.72rem 1rem;
        font-size: 0.95rem;
        font-weight: 700;
    }

    #posOpenFinderBtn {
        width: 100%;
        justify-content: center;
        order: -1;
        box-shadow: 0 12px 24px rgba(31, 111, 235, 0.18);
    }

    .pos-finder-item {
        grid-template-columns: 1fr;
        align-items: stretch;
    }

    .pos-scanner-live-indicator {
        font-size: 0.8rem;
    }

    .pos-camera-reader {
        min-height: 18rem;
    }

    .pos-camera-reader video {
        height: 18rem !important;
    }

    .pos-finder-thumb-wrap {
        width: 100%;
        height: 11rem;
    }

    .pos-finder-actions .btn {
        width: 100%;
    }

    .pos-camera-shell {
        min-height: 11rem;
    }

    .pos-camera-reader,
    .pos-camera-reader video,
    .pos-camera-placeholder {
        height: 11rem;
        min-height: 11rem;
    }

    .pos-camera-guide-frame {
        width: min(84%, 18rem);
        height: min(58%, 7.75rem);
    }

    .pos-camera-guide-label {
        bottom: -1.85rem;
        font-size: 0.7rem;
        padding: 0.28rem 0.6rem;
    }

    .pos-products-col .table-responsive {
        overflow-x: hidden;
    }

    #pos-products-dt {
        min-width: 0 !important;
    }

    #pos-products-dt th,
    #pos-products-dt td {
        white-space: normal;
    }

    #pos-products-dt .dtr-control {
        width: 2rem;
        max-width: 2rem;
    }

    #pos-products-dt .pos-add-btn {
        min-width: 0;
        width: 100%;
        justify-content: center;
        padding-inline: 0.85rem;
    }

    #pos-products-dt .dtr-details {
        width: 100%;
    }

    #pos-products-dt .dtr-details li {
        display: flex;
        justify-content: space-between;
        gap: 0.75rem;
        align-items: center;
    }

    #pos-products-dt .dtr-details .dtr-data {
        text-align: right;
        min-width: 0;
    }

    .mpg-page-head h1 {
        font-size: 1.8rem;
    }

    .landing-page .hero-panel {
        padding: 1.7rem;
        border-radius: 1.4rem;
    }

    .admin-topbar {
        padding-left: 1rem !important;
        padding-right: 1rem !important;
    }

    .admin-content main .table .btn-sm,
    .admin-content main .btn.btn-link.btn-sm {
        min-width: 2.5rem;
        min-height: 2.5rem;
        touch-action: manipulation;
        -webkit-tap-highlight-color: rgba(13, 110, 253, 0.15);
    }

    div.dataTables_wrapper > .row {
        margin-left: 0 !important;
        margin-right: 0 !important;
        --bs-gutter-x: 0.75rem;
    }

    .table-responsive {
        padding-left: 0.5rem;
        padding-right: 0.5rem;
    }

    .pos-cart-line {
        grid-template-columns: minmax(0, 1fr) auto;
        gap: 0.55rem 0.8rem;
        padding: 0.85rem 0;
    }

    .pos-cart-qty {
        justify-self: start;
    }

    .pos-cart-sub {
        justify-self: end;
        font-size: 0.92rem;
    }

    .pos-cart-remove-wrap {
        grid-column: 2;
        grid-row: auto;
        justify-self: end;
    }
}
