/* ============================================================
   BlazorPOS - Enterprise POS Custom CSS
   ============================================================ */
:root {
    --pos-primary: #4361ee;
    --pos-primary-dark: #3451d1;
    --pos-secondary: #7209b7;
    --pos-success: #06d6a0;
    --pos-warning: #ffd60a;
    --pos-danger: #ef233c;
    --pos-info: #4cc9f0;
    --pos-dark: #0d1117;
    --pos-sidebar-bg: #0d1117;
    --pos-sidebar-width: 260px;
    --pos-topbar-height: 64px;
    --pos-card-bg: #ffffff;
    --pos-body-bg: #f0f2f5;
    --pos-text: #1a1d23;
    --pos-text-muted: #6b7280;
    --pos-border: #e5e7eb;
    --pos-radius: 12px;
    --pos-radius-sm: 8px;
    --pos-shadow: 0 2px 12px rgba(0, 0, 0, .08);
    --pos-shadow-md: 0 8px 24px rgba(0, 0, 0, .12);
    --pos-shadow-lg: 0 16px 48px rgba(0, 0, 0, .16);
    --transition: all .2s ease;
    font-family: 'Inter', sans-serif;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    background: var(--pos-body-bg);
    color: var(--pos-text);
    margin: 0;
    padding: 0;
    font-size: 14px;
    line-height: 1.6;
}

/* ── Splash Screen ─────────────────────────────────────────── */
.pos-splash {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: linear-gradient(135deg, #0d1117 0%, #1a1d3a 100%);
}

.pos-splash-inner {
    text-align: center;
    color: #fff;
}

.pos-splash-logo {
    font-size: 4rem;
    color: var(--pos-primary);
    margin-bottom: 1rem;
    animation: pulse 1.5s infinite;
}

.pos-splash-title {
    font-size: 2rem;
    font-weight: 800;
    margin: 0;
    letter-spacing: -0.5px;
}

.pos-splash-sub {
    color: rgba(255, 255, 255, .5);
    margin: .25rem 0 1.5rem;
}

.pos-spinner {
    margin-top: 1rem;
}

@keyframes pulse {

    0%,
    100% {
        transform: scale(1);
        opacity: 1
    }

    50% {
        transform: scale(1.1);
        opacity: .8
    }
}

/* ── Layout ────────────────────────────────────────────────── */
.pos-layout {
    display: flex;
    min-height: 100vh;
}

/* ── Sidebar ───────────────────────────────────────────────── */
.pos-sidebar {
    width: var(--pos-sidebar-width);
    background: var(--pos-sidebar-bg);
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    display: flex;
    flex-direction: column;
    z-index: 1040;
    transition: width .3s ease;
    overflow: hidden;
}

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: .75rem;
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, .06);
    text-decoration: none;
}

.sidebar-brand-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--pos-primary), var(--pos-secondary));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    color: #fff;
    flex-shrink: 0;
}

.sidebar-brand-text {
    color: #fff;
    font-size: 1.1rem;
    font-weight: 700;
    line-height: 1.2;
}

.sidebar-brand-sub {
    color: rgba(255, 255, 255, .4);
    font-size: .65rem;
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.sidebar-nav {
    flex: 1;
    overflow-y: auto;
    padding: 1rem 0;
}

.sidebar-nav::-webkit-scrollbar {
    width: 4px;
}

.sidebar-nav::-webkit-scrollbar-track {
    background: transparent;
}

.sidebar-nav::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, .1);
    border-radius: 4px;
}

.nav-section-label {
    color: rgba(255, 255, 255, .3);
    font-size: .65rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    padding: 1rem 1.5rem .5rem;
}

.nav-item-link {
    display: flex;
    align-items: center;
    gap: .75rem;
    padding: .65rem 1.5rem;
    color: rgba(255, 255, 255, .6);
    text-decoration: none;
    border-radius: 0;
    transition: var(--transition);
    font-size: .875rem;
    font-weight: 500;
    position: relative;
    margin: .1rem 0;
}

.nav-item-link:hover {
    color: #fff;
    background: rgba(255, 255, 255, .06);
}

.nav-item-link.active {
    color: #fff;
    background: linear-gradient(90deg, rgba(67, 97, 238, .3) 0%, transparent 100%);
}

.nav-item-link.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: var(--pos-primary);
    border-radius: 0 3px 3px 0;
}

.nav-item-icon {
    font-size: 1.1rem;
    width: 22px;
    text-align: center;
    flex-shrink: 0;
}

.nav-badge {
    margin-left: auto;
    background: var(--pos-danger);
    color: #fff;
    font-size: .6rem;
    font-weight: 700;
    padding: .15rem .45rem;
    border-radius: 10px;
    line-height: 1.4;
}

.sidebar-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, .06);
}

.sidebar-user {
    display: flex;
    align-items: center;
    gap: .75rem;
}

.sidebar-user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--pos-primary), var(--pos-secondary));
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: .8rem;
    font-weight: 700;
    flex-shrink: 0;
}

.sidebar-user-name {
    color: #fff;
    font-size: .8rem;
    font-weight: 600;
}

.sidebar-user-role {
    color: rgba(255, 255, 255, .4);
    font-size: .7rem;
}

/* ── Main Content ──────────────────────────────────────────── */
.pos-main {
    margin-left: var(--pos-sidebar-width);
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    min-width: 0;
    overflow-x: hidden;
}

/* ── Topbar ────────────────────────────────────────────────── */
.pos-topbar {
    height: var(--pos-topbar-height);
    background: #fff;
    border-bottom: 1px solid var(--pos-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 1.5rem;
    position: sticky;
    top: 0;
    z-index: 1030;
    box-shadow: var(--pos-shadow);
}

.topbar-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--pos-text);
}

.topbar-subtitle {
    font-size: .75rem;
    color: var(--pos-text-muted);
    font-weight: 400;
}

.topbar-actions {
    display: flex;
    align-items: center;
    gap: .75rem;
}

.topbar-btn {
    width: 38px;
    height: 38px;
    border-radius: var(--pos-radius-sm);
    border: 1px solid var(--pos-border);
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--pos-text-muted);
    cursor: pointer;
    transition: var(--transition);
    font-size: 1rem;
}

.topbar-btn:hover {
    background: var(--pos-body-bg);
    color: var(--pos-primary);
    border-color: var(--pos-primary);
}

.topbar-date {
    font-size: .8rem;
    color: var(--pos-text-muted);
    font-weight: 500;
}

/* ── Page Content ──────────────────────────────────────────── */
.pos-content { padding: 1.5rem; flex: 1; max-width: 100%; overflow-x: hidden; }

.page-header {
    margin-bottom: 1.5rem;
}

.page-header h4 {
    font-size: 1.3rem;
    font-weight: 700;
    margin: 0;
}

.page-header p {
    color: var(--pos-text-muted);
    margin: .25rem 0 0;
    font-size: .875rem;
}

/* ── Cards ─────────────────────────────────────────────────── */
.pos-card {
    background: var(--pos-card-bg);
    border-radius: var(--pos-radius);
    border: 1px solid var(--pos-border);
    box-shadow: var(--pos-shadow);
    overflow: hidden;
    transition: var(--transition);
    max-width: 100%;
}

.pos-card:hover {
    box-shadow: var(--pos-shadow-md);
}

.pos-card-header {
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--pos-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #fff;
}

.pos-card-header h6 {
    margin: 0;
    font-weight: 700;
    font-size: .9rem;
}

.pos-card-body {
    padding: 1.25rem;
}

/* ── Stat Cards ────────────────────────────────────────────── */
.stat-card {
    background: var(--pos-card-bg);
    border-radius: var(--pos-radius);
    border: 1px solid var(--pos-border);
    padding: 1.25rem;
    position: relative;
    overflow: hidden;
    transition: var(--transition);
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--pos-shadow-md);
}

.stat-card-icon {
    width: 52px;
    height: 52px;
    border-radius: var(--pos-radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.stat-card-value {
    font-size: 1.75rem;
    font-weight: 800;
    line-height: 1;
    margin-bottom: .25rem;
}

.stat-card-label {
    color: var(--pos-text-muted);
    font-size: .8rem;
    font-weight: 500;
}

.stat-card-trend {
    font-size: .75rem;
    font-weight: 600;
    margin-top: .5rem;
}

.stat-card-trend.up {
    color: var(--pos-success);
}

.stat-card-trend.down {
    color: var(--pos-danger);
}

.stat-card-bg {
    position: absolute;
    right: -20px;
    bottom: -20px;
    font-size: 6rem;
    opacity: .04;
    pointer-events: none;
}

/* ── Gradient Stat Cards ───────────────────────────────────── */
.stat-card-gradient {
    background: linear-gradient(135deg, var(--pos-primary), var(--pos-secondary));
    color: #fff;
    border: none;
}

.stat-card-gradient .stat-card-label {
    color: rgba(255, 255, 255, .75);
}

.stat-card-gradient .stat-card-trend {
    color: rgba(255, 255, 255, .9);
}

.stat-card-gradient .stat-card-icon {
    background: rgba(255, 255, 255, .15);
    color: #fff;
}

/* ── Tables ────────────────────────────────────────────────── */
.table-responsive { width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.pos-table {
    border-collapse: separate;
    border-spacing: 0;
    width: 100%;
    min-width: 800px;
}

.pos-table th {
    background: #f8fafc;
    font-size: .75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .5px;
    color: var(--pos-text-muted);
    padding: .75rem 1rem;
    border-bottom: 1px solid var(--pos-border);
}

.pos-table td {
    padding: .8rem 1rem;
    border-bottom: 1px solid var(--pos-border);
    vertical-align: middle;
}

.pos-table tr:last-child td {
    border-bottom: none;
}

.pos-table tr:hover td {
    background: #f8fafc;
}

.pos-table tbody tr {
    transition: var(--transition);
}

/* ── Badges ────────────────────────────────────────────────── */
.pos-badge {
    display: inline-flex;
    align-items: center;
    gap: .3rem;
    padding: .25rem .65rem;
    border-radius: 20px;
    font-size: .7rem;
    font-weight: 700;
    letter-spacing: .3px;
}

.badge-success {
    background: rgba(6, 214, 160, .12);
    color: #059669;
}

.badge-danger {
    background: rgba(239, 35, 60, .12);
    color: #dc2626;
}

.badge-warning {
    background: rgba(255, 214, 10, .15);
    color: #b45309;
}

.badge-info {
    background: rgba(76, 201, 240, .12);
    color: #0284c7;
}

.badge-primary {
    background: rgba(67, 97, 238, .12);
    color: var(--pos-primary);
}

.badge-secondary {
    background: rgba(108, 117, 125, .1);
    color: #6b7280;
}

.badge-dark {
    background: rgba(13, 17, 23, .1);
    color: var(--pos-text);
}

/* ── Buttons ───────────────────────────────────────────────── */
.btn {
    font-weight: 600;
    font-size: .85rem;
    border-radius: var(--pos-radius-sm);
    transition: var(--transition);
}

.btn-primary {
    background: var(--pos-primary);
    border-color: var(--pos-primary);
}

.btn-primary:hover {
    background: var(--pos-primary-dark);
    border-color: var(--pos-primary-dark);
}

.btn-icon {
    width: 36px;
    height: 36px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--pos-radius-sm);
}

/* ── Forms ─────────────────────────────────────────────────── */
.form-control,
.form-select {
    border-radius: var(--pos-radius-sm);
    border: 1px solid var(--pos-border);
    font-size: .875rem;
    transition: var(--transition);
}

.form-control:focus,
.form-select:focus {
    border-color: var(--pos-primary);
    box-shadow: 0 0 0 3px rgba(67, 97, 238, .1);
}

.form-label {
    font-size: .8rem;
    font-weight: 600;
    color: var(--pos-text);
    margin-bottom: .4rem;
}

/* ── Modal ─────────────────────────────────────────────────── */
.modal-content {
    border-radius: var(--pos-radius);
    border: none;
    box-shadow: var(--pos-shadow-lg);
}

.modal-header {
    border-bottom: 1px solid var(--pos-border);
    padding: 1.25rem 1.5rem;
}

.modal-title {
    font-weight: 700;
    font-size: 1rem;
}

.modal-footer {
    border-top: 1px solid var(--pos-border);
    padding: 1rem 1.5rem;
}

/* ── Product Grid ──────────────────────────────────────────── */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 1rem;
}

.product-card {
    background: #fff;
    border-radius: var(--pos-radius);
    border: 2px solid transparent;
    cursor: pointer;
    transition: var(--transition);
    overflow: hidden;
    box-shadow: var(--pos-shadow);
}

.product-card:hover {
    border-color: var(--pos-primary);
    transform: translateY(-2px);
    box-shadow: var(--pos-shadow-md);
}

.product-card.out-of-stock {
    opacity: .55;
    cursor: not-allowed;
}

.product-card-img {
    width: 100%;
    height: 110px;
    object-fit: cover;
    background: #f0f2f5;
}

.product-card-img-placeholder {
    width: 100%;
    height: 110px;
    background: linear-gradient(135deg, #f0f2f5, #e5e7eb);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    color: #9ca3af;
}

.product-card-body {
    padding: .65rem .75rem;
}

.product-card-name {
    font-size: .8rem;
    font-weight: 600;
    color: var(--pos-text);
    margin: 0 0 .25rem;
    line-height: 1.3;
}

.product-card-price {
    font-size: .95rem;
    font-weight: 800;
    color: var(--pos-primary);
}

.product-card-stock {
    font-size: .7rem;
    color: var(--pos-text-muted);
}

.product-card-stock.low {
    color: var(--pos-danger);
}

/* ── POS Terminal ──────────────────────────────────────────── */
.pos-terminal {
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: 0;
    height: calc(100vh - var(--pos-topbar-height));
}

.pos-products-panel {
    background: var(--pos-body-bg);
    overflow-y: auto;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.pos-cart-panel {
    background: #fff;
    border-left: 1px solid var(--pos-border);
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
}

.pos-cart-header {
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--pos-border);
}

.pos-cart-items {
    flex: 1;
    overflow-y: auto;
    padding: .5rem 0;
}

.pos-cart-items::-webkit-scrollbar {
    width: 4px;
}

.pos-cart-items::-webkit-scrollbar-thumb {
    background: var(--pos-border);
    border-radius: 4px;
}

.pos-cart-footer {
    border-top: 1px solid var(--pos-border);
    padding: 1rem 1.25rem;
}

.cart-item {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: .4rem;
    padding: 0.4rem 0.6rem;
    margin: 0.3rem 0.6rem;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
    transition: all 0.2s ease-in-out;
}

.cart-item:hover {
    border-color: var(--pos-primary);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
    transform: translateY(-1px);
}

.cart-item-name {
    font-size: .82rem;
    font-weight: 700;
    color: #1e293b;
}

.cart-item-price {
    font-size: .72rem;
    color: #64748b;
    font-weight: 500;
}

.cart-item-pill-selector {
    display: flex;
    align-items: center;
    gap: .2rem;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    padding: 2px 6px;
    font-size: .7rem;
    color: #475569;
}

.cart-item-pill-selector select,
.cart-item-pill-selector input {
    border: 0;
    background: transparent;
    font-size: .7rem;
    font-weight: 600;
    color: #1e293b;
    padding: 0;
    outline: none;
    cursor: pointer;
}

.cart-item-pill-selector select:focus,
.cart-item-pill-selector input:focus {
    box-shadow: none;
}

.cart-qty-group {
    display: flex;
    align-items: center;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    background: #fff;
    overflow: hidden;
    height: 28px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.cart-qty-group button {
    border: 0;
    background: #f8fafc;
    width: 26px;
    height: 100%;
    font-size: .85rem;
    font-weight: 700;
    color: #475569;
    cursor: pointer;
    transition: all 0.15s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cart-qty-group button:hover {
    background: var(--pos-primary);
    color: #fff;
}

.cart-qty-group input {
    border: 0;
    width: 38px;
    text-align: center;
    font-weight: 700;
    font-size: .8rem;
    color: #1e293b;
    outline: none;
}

/* Chrome, Safari, Edge, Opera: Remove spin buttons */
.cart-qty-group input::-webkit-outer-spin-button,
.cart-qty-group input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* Firefox: Remove spin buttons */
.cart-qty-group input[type=number] {
    -moz-appearance: textfield;
}

.cart-item-total {
    font-size: .85rem;
    font-weight: 800;
    color: var(--pos-primary);
    min-width: 65px;
    text-align: right;
}

.cart-item-remove-btn {
    border: 0;
    background: transparent;
    color: #94a3b8;
    padding: .25rem;
    border-radius: 6px;
    transition: all 0.15s ease;
    cursor: pointer;
}

.cart-item-remove-btn:hover {
    color: #ef4444;
    background: #fee2e2;
}

.pos-summary-line {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: .4rem;
    font-size: .85rem;
}

.pos-grand-total {
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--pos-primary);
}

/* ── Category Pills ────────────────────────────────────────── */
.category-pills {
    display: flex;
    gap: .5rem;
    flex-wrap: wrap;
}

.category-pill {
    padding: .4rem .9rem;
    border-radius: 20px;
    border: 1px solid var(--pos-border);
    background: #fff;
    font-size: .8rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    color: var(--pos-text-muted);
    white-space: nowrap;
}

.category-pill:hover,
.category-pill.active {
    background: var(--pos-primary);
    color: #fff;
    border-color: var(--pos-primary);
}

/* ── Search Bar ────────────────────────────────────────────── */
.pos-search {
    position: relative;
}

.pos-search .form-control {
    padding-left: 2.5rem;
    background: #fff;
}

.pos-search-icon {
    position: absolute;
    left: .85rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--pos-text-muted);
    pointer-events: none;
}

/* ── Avatar ────────────────────────────────────────────────── */
.customer-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: .8rem;
    font-weight: 700;
    color: #fff;
    flex-shrink: 0;
    background: linear-gradient(135deg, var(--pos-primary), var(--pos-secondary));
}

/* ── Payment Methods ───────────────────────────────────────── */
.payment-method-btn {
    border: 2px solid var(--pos-border);
    border-radius: var(--pos-radius-sm);
    padding: .65rem;
    cursor: pointer;
    text-align: center;
    transition: var(--transition);
    background: #fff;
}

.payment-method-btn:hover,
.payment-method-btn.selected {
    border-color: var(--pos-primary);
    background: rgba(67, 97, 238, .05);
    color: var(--pos-primary);
}

.payment-method-btn:focus {
    outline: none;
    border-color: var(--pos-primary);
    box-shadow: 0 0 0 3px rgba(67, 97, 238, 0.25);
}

.payment-method-btn i {
    font-size: 1.4rem;
    display: block;
    margin-bottom: .25rem;
}

.payment-method-btn span {
    font-size: .72rem;
    font-weight: 700;
    display: block;
}

/* ── Toast Notifications ───────────────────────────────────── */
.pos-toasts {
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: .5rem;
}

.pos-toast {
    background: #fff;
    border-radius: var(--pos-radius-sm);
    box-shadow: var(--pos-shadow-lg);
    padding: .85rem 1.25rem;
    min-width: 280px;
    display: flex;
    align-items: center;
    gap: .75rem;
    border-left: 4px solid var(--pos-primary);
    font-size: .875rem;
    animation: slideInRight .3s ease;
}

.pos-toast.success {
    border-color: var(--pos-success);
}

.pos-toast.danger {
    border-color: var(--pos-danger);
}

.pos-toast.warning {
    border-color: var(--pos-warning);
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* ── Invoice Print ─────────────────────────────────────────── */
.invoice-box {
    background: #fff;
    padding: 2rem;
    max-width: 600px;
    margin: 0 auto;
}

.invoice-header {
    border-bottom: 2px solid var(--pos-primary);
    padding-bottom: 1rem;
    margin-bottom: 1.5rem;
}

.invoice-logo-text {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--pos-primary);
}

@media print {

    .pos-sidebar,
    .pos-topbar,
    .modal-footer,
    .no-print {
        display: none !important;
    }

    .pos-main {
        margin-left: 0 !important;
        padding: 0 !important;
    }

    .modal-dialog {
        max-width: 100% !important;
    }

    body {
        background: white !important;
        margin: 0 !important;
        padding: 0 !important;
    }

    @page {
        margin: 0 !important;
    }

    /* Stack labels side-by-side and wrap naturally without forcing a page break */
    .print-only {
        display: flex !important;
        flex-wrap: wrap !important;
        justify-content: flex-start !important;
        gap: 8px !important;
        padding: 10px !important;
        margin: 0 !important;
    }

    .barcode-label {
        page-break-inside: avoid !important;
        break-inside: avoid !important;
        margin: 0 !important;
        border: 1px dotted #ccc !important; /* light border to help cut them, or hide as desired */
    }
}

/* ── print-only (hidden on screen, shown when printing) ─────── */
.print-only {
    display: none;
}

/* ── Barcode label styles ───────────────────────────────────── */
.barcode-label {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border: 1px solid #ccc;
    padding: 6px 10px;
    font-family: 'Inter', sans-serif;
    background: white;
    box-sizing: border-box;
}

.barcode-label.small  { width: 50mm;  height: 25mm; }
.barcode-label.medium { width: 70mm;  height: 35mm; }
.barcode-label.large  { width: 100mm; height: 50mm; }

.barcode-label-name {
    font-size: 7pt;
    font-weight: 700;
    text-align: center;
    max-width: 100%;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    margin-bottom: 2px;
}

.barcode-label-svg {
    max-width: 100%;
}

.barcode-label-price {
    font-size: 8pt;
    font-weight: 600;
    color: #333;
    margin-top: 2px;
}

/* ── Low stock warning row ──────────────────────────────────── */
.low-stock-row td {
    background: rgba(255, 214, 10, .05) !important;
}

.out-stock-row td {
    background: rgba(239, 35, 60, .05) !important;
}

/* ── Chart bars (CSS only) ──────────────────────────────────── */
.chart-bar-wrap {
    display: flex;
    align-items: flex-end;
    gap: .4rem;
    height: 80px;
}

.chart-bar {
    flex: 1;
    background: linear-gradient(180deg, var(--pos-primary) 0%, rgba(67, 97, 238, .3) 100%);
    border-radius: 4px 4px 0 0;
    min-width: 20px;
    transition: height .5s ease;
    position: relative;
}

.chart-bar:hover {
    opacity: .85;
}

.chart-bar-label {
    font-size: .6rem;
    color: var(--pos-text-muted);
    text-align: center;
    margin-top: .25rem;
}

/* ── Scrollbar global ───────────────────────────────────────── */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: #d1d5db;
    border-radius: 4px;
}

/* ── Utility ────────────────────────────────────────────────── */
.fw-700 {
    font-weight: 700;
}

.fw-800 {
    font-weight: 800;
}

.text-primary-custom {
    color: var(--pos-primary) !important;
}

.cursor-pointer {
    cursor: pointer;
}

.gap-2 {
    gap: .5rem;
}

.rounded-custom {
    border-radius: var(--pos-radius) !important;
}

.empty-state {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--pos-text-muted);
}

.empty-state i {
    font-size: 3.5rem;
    display: block;
    margin-bottom: 1rem;
    opacity: .3;
}

/* ── Responsive ─────────────────────────────────────────────── */
@media (max-width: 991.98px) {
    .pos-sidebar {
        transform: translateX(-100%);
    }

    .pos-sidebar.open {
        transform: translateX(0);
    }

    .pos-main {
        margin-left: 0;
    }

    .pos-terminal {
        grid-template-columns: 1fr;
        position: relative;
        height: calc(100vh - var(--pos-topbar-height));
        overflow: hidden;
    }

    .pos-cart-panel {
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        height: 100%;
        width: 100%;
        z-index: 1050;
        border-left: none;
        display: none !important;
        background: #fff;
    }

    .pos-terminal.show-cart .pos-cart-panel {
        display: flex !important;
    }

    .pos-products-panel {
        padding-bottom: 90px;
        height: 100%;
    }

    .mobile-cart-toggle-bar {
        position: fixed;
        bottom: 1.25rem;
        left: 1.25rem;
        right: 1.25rem;
        z-index: 1040;
    }

    .product-grid {
        grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    }
}

/* Bootstrap fw helpers */
.fw-600 {
    font-weight: 600 !important;
}

.fw-700 {
    font-weight: 700 !important;
}

.fw-800 {
    font-weight: 800 !important;
}

/* ── Footer ─────────────────────────────────────────────────── */
.pos-footer {
    background: #fff;
    border-top: 1px solid var(--pos-border);
    padding: 1.25rem 1.5rem;
    margin-top: auto;
}

.pos-footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.pos-footer-content p {
    margin: 0;
    color: var(--pos-text-muted);
    font-size: .85rem;
}

.pos-footer-links {
    display: flex;
    gap: 1.25rem;
}

.pos-footer-links a {
    color: var(--pos-text-muted);
    text-decoration: none;
    font-size: .85rem;
    font-weight: 500;
    transition: var(--transition);
}

.pos-footer-links a:hover {
    color: var(--pos-primary);
}

@media (max-width: 768px) {
    .pos-footer-content {
        flex-direction: column;
        justify-content: center;
        text-align: center;
    }
}