:root {
    --sidebar-width: 260px;
    --topbar-height: 60px;
    --sidebar-bg: #1e293b;
    --sidebar-text: #cbd5e1;
    --sidebar-text-active: #ffffff;
    --sidebar-hover: #334155;
    --sidebar-accent: #3b82f6;
    --page-bg: #f1f5f9;
    --card-radius: 12px;
}

/* —— App shell —— */
body.sidebar-layout {
    padding-top: var(--topbar-height);
    background: var(--page-bg);
    min-height: 100vh;
    overflow-x: hidden;
}

.app-topbar {
    height: var(--topbar-height);
    z-index: 1030;
    background: var(--sidebar-bg) !important;
    border-bottom: 1px solid var(--sidebar-hover);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
}

.app-topbar .navbar-brand {
    font-weight: 600;
    letter-spacing: -0.02em;
    color: var(--sidebar-text-active) !important;
}

.app-topbar .btn-outline-light {
    color: var(--sidebar-text);
    border-color: #475569;
}

.app-topbar .btn-outline-light:hover,
.app-topbar .btn-outline-light:focus {
    background: var(--sidebar-hover);
    border-color: #64748b;
    color: var(--sidebar-text-active);
}

.app-shell {
    display: flex;
    min-height: calc(100vh - var(--topbar-height));
}

/* Sidebar */
.app-sidebar {
    display: block;
    width: var(--sidebar-width);
    flex-shrink: 0;
    background: var(--sidebar-bg);
    position: fixed;
    top: var(--topbar-height);
    left: 0;
    bottom: 0;
    z-index: 1020;
    overflow-y: auto;
    overflow-x: hidden;
    transition: transform 0.3s ease;
    box-shadow: 2px 0 5px rgba(0, 0, 0, 0.12);
}

.app-sidebar-inner {
    padding: 1rem 0 1.5rem;
    flex: 1;
}

.app-sidebar .nav-section {
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #64748b;
    padding: 1.25rem 1.25rem 0.35rem;
    margin: 0;
}

.app-sidebar .nav-link {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.55rem 1.25rem;
    margin: 2px 0.5rem;
    border-radius: 8px;
    color: var(--sidebar-text);
    font-size: 0.9rem;
    font-weight: 500;
    text-decoration: none;
    border: none;
    transition: background 0.15s, color 0.15s;
}

.app-sidebar .nav-link i {
    font-size: 1.1rem;
    width: 1.25rem;
    text-align: center;
    opacity: 0.85;
}

.app-sidebar .nav-link:hover {
    background: var(--sidebar-hover);
    color: var(--sidebar-text-active);
}

.app-sidebar .nav-link.active {
    background: var(--sidebar-accent);
    color: var(--sidebar-text-active);
}

.app-sidebar .nav-link.active i {
    opacity: 1;
}

/* Main content */
.app-main {
    flex: 1;
    min-width: 0;
    padding: 1.5rem 1.75rem 2rem;
    margin-left: var(--sidebar-width);
    transition: margin-left 0.3s ease;
    overflow-x: hidden;
}

.sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1015;
    display: none;
}

.sidebar-overlay.show {
    display: block;
}

@media (min-width: 769px) {
    .sidebar-layout .app-sidebar {
        transform: translateX(0);
    }

    .sidebar-layout.sidebar-collapsed .app-sidebar {
        transform: translateX(-100%);
    }

    .sidebar-layout.sidebar-collapsed .app-main {
        margin-left: 0;
    }
}

/* Page header (used across modules) */
.page-header {
    margin-bottom: 1.5rem;
}

.page-header h1,
.page-header .page-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #0f172a;
    margin: 0 0 0.25rem;
    letter-spacing: -0.02em;
}

.page-header .page-subtitle {
    color: #64748b;
    font-size: 0.875rem;
    margin: 0;
}

@media (max-width: 768px) {
    .sidebar-layout .app-sidebar {
        transform: translateX(-100%);
    }

    .sidebar-layout.sidebar-open .app-sidebar {
        transform: translateX(0);
    }

    .sidebar-layout .app-main,
    .sidebar-layout.sidebar-collapsed .app-main {
        margin-left: 0;
        padding: 0.9rem;
    }

    .app-topbar .navbar-brand {
        max-width: 45vw;
    }

    .app-topbar .dropdown-toggle {
        max-width: 42vw;
    }

    h1, .h1, .page-title { font-size: 1.4rem; line-height: 1.25; }
    h2, .h2 { font-size: 1.2rem; }
    h3, .h3 { font-size: 1.05rem; }

    .table-responsive {
        font-size: 0.875rem;
    }

    .nav-tabs {
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
}

@media (max-width: 576px) {
    .sidebar-layout .app-sidebar {
        width: 100%;
        max-width: 100%;
    }

    .page-action-header,
    .page-header.d-flex {
        flex-direction: column;
        align-items: stretch !important;
    }

    .page-action-header > .btn,
    .page-action-header > a.btn,
    .page-action-header > div > .btn,
    .page-header .btn-page-action {
        width: 100%;
    }
}

/* Cards & stats */
.app-card {
    border: none;
    border-radius: var(--card-radius);
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06);
    background: #fff;
}

.stat-card {
    border: none;
    border-radius: var(--card-radius);
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06);
    background: #fff;
    height: 100%;
    transition: box-shadow 0.2s;
}

.stat-card:hover {
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.08);
}

.stat-card .stat-label {
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #64748b;
    margin-bottom: 0.35rem;
}

.stat-card .stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: #0f172a;
    line-height: 1.2;
}

.stat-card .stat-meta {
    font-size: 0.8rem;
    color: #94a3b8;
    margin-top: 0.25rem;
}

.stat-card.stat-danger .stat-value {
    color: #dc2626;
}

.stat-card .stat-icon {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
}

.stat-icon-blue { background: #dbeafe; color: #2563eb; }
.stat-icon-green { background: #d1fae5; color: #059669; }
.stat-icon-purple { background: #ede9fe; color: #7c3aed; }
.stat-icon-red { background: #fee2e2; color: #dc2626; }

/* Alerts */
.app-alert-shift {
    border-radius: var(--card-radius);
    border: none;
    padding: 1rem 1.25rem;
}

/* Tables inside cards */
.app-card .card-header {
    background: #fff;
    border-bottom: 1px solid #e2e8f0;
    font-weight: 600;
    font-size: 0.95rem;
    color: #334155;
    padding: 0.85rem 1.25rem;
}

.app-card .table {
    margin-bottom: 0;
    font-size: 0.875rem;
}

.app-card .table thead th {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #64748b;
    border-bottom-width: 1px;
    background: #f8fafc;
    padding: 0.65rem 1.25rem;
}

.app-card .table tbody td {
    padding: 0.75rem 1.25rem;
    vertical-align: middle;
    color: #334155;
}

.app-card .table-empty td {
    text-align: center;
    color: #94a3b8;
    padding: 2rem 1rem;
}

/* Mobile offcanvas sidebar */
.offcanvas-sidebar {
    background: var(--sidebar-bg);
    width: var(--sidebar-width) !important;
}

.offcanvas-sidebar .offcanvas-header {
    border-bottom: 1px solid #334155;
    color: #fff;
}

.offcanvas-sidebar .btn-close {
    filter: invert(1);
}

.offcanvas-sidebar .nav-section {
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #64748b;
    padding: 1rem 1.25rem 0.35rem;
}

.offcanvas-sidebar .nav-link {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.55rem 1.25rem;
    margin: 2px 0.5rem;
    border-radius: 8px;
    color: var(--sidebar-text);
    font-size: 0.9rem;
    text-decoration: none;
}

.offcanvas-sidebar .nav-link:hover,
.offcanvas-sidebar .nav-link.active {
    background: var(--sidebar-accent);
    color: #fff;
}

/* Auth */
.auth-page {
    --auth-accent: #0d9488;
    --auth-accent-hover: #0f766e;
    --auth-accent-soft: rgba(13, 148, 136, 0.12);
    min-height: 100vh;
    background-color: #f8fafc;
    background-image:
        radial-gradient(ellipse 80% 60% at 0% 0%, rgba(13, 148, 136, 0.08) 0%, transparent 55%),
        radial-gradient(ellipse 70% 50% at 100% 100%, rgba(59, 130, 246, 0.06) 0%, transparent 50%);
    font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

.auth-page .auth-shell {
    width: 100%;
    max-width: 420px;
    margin: 0 auto;
    padding: 1.5rem;
}

.auth-page .auth-card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    box-shadow:
        0 1px 2px rgba(15, 23, 42, 0.04),
        0 8px 24px rgba(15, 23, 42, 0.06);
    overflow: hidden;
}

.auth-page .auth-card-body {
    padding: 2rem 2rem 1.75rem;
}

.auth-page .auth-brand {
    text-align: center;
    margin-bottom: 1.75rem;
}

.auth-page .auth-logo {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    border-radius: 14px;
    background: var(--auth-accent-soft);
    color: var(--auth-accent);
    font-size: 1.65rem;
    margin-bottom: 1rem;
}

.auth-page .auth-title {
    font-size: 1.35rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: #0f172a;
    margin: 0 0 0.25rem;
}

.auth-page .auth-subtitle {
    font-size: 0.875rem;
    color: #64748b;
    margin: 0;
}

.auth-page .auth-alert {
    font-size: 0.875rem;
    border-radius: 10px;
    border: none;
    background: #fef2f2;
    color: #b91c1c;
    padding: 0.65rem 0.85rem;
    margin-bottom: 1.25rem;
}

.auth-page .form-label {
    font-size: 0.8125rem;
    font-weight: 600;
    color: #334155;
    margin-bottom: 0.35rem;
}

.auth-page .auth-input-wrap {
    position: relative;
}

.auth-page .auth-input-wrap .auth-input-icon {
    position: absolute;
    left: 0.85rem;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
    font-size: 1rem;
    pointer-events: none;
    z-index: 2;
}

.auth-page .auth-input-wrap .form-control {
    padding: 0.6rem 0.85rem 0.6rem 2.5rem;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    font-size: 0.9375rem;
    background: #f8fafc;
    transition: border-color 0.15s, box-shadow 0.15s, background 0.15s;
}

.auth-page .auth-input-wrap .form-control:focus {
    background: #fff;
    border-color: var(--auth-accent);
    box-shadow: 0 0 0 3px var(--auth-accent-soft);
}

.auth-page .auth-input-wrap.auth-input-password .form-control {
    padding-right: 2.75rem;
}

.auth-page .auth-toggle-password {
    position: absolute;
    right: 0.5rem;
    top: 50%;
    transform: translateY(-50%);
    border: none;
    background: transparent;
    color: #94a3b8;
    padding: 0.25rem 0.5rem;
    line-height: 1;
    border-radius: 6px;
    z-index: 2;
}

.auth-page .auth-toggle-password:hover {
    color: #64748b;
}

.auth-page .auth-submit {
    margin-top: 0.5rem;
    padding: 0.65rem 1rem;
    font-size: 0.9375rem;
    font-weight: 600;
    border: none;
    border-radius: 10px;
    background: var(--auth-accent);
    color: #fff;
    transition: background 0.15s;
}

.auth-page .auth-submit:hover,
.auth-page .auth-submit:focus {
    background: var(--auth-accent-hover);
    color: #fff;
}

.auth-page .auth-footer {
    text-align: center;
    padding: 0.85rem 2rem;
    border-top: 1px solid #f1f5f9;
    font-size: 0.75rem;
    color: #94a3b8;
    background: #fafbfc;
}

.auth-page .auth-shell {
    width: 100%;
    padding: max(12px, env(safe-area-inset-top, 0px)) max(12px, env(safe-area-inset-right, 0px))
        max(12px, env(safe-area-inset-bottom, 0px)) max(12px, env(safe-area-inset-left, 0px));
}

@media (max-width: 767.98px) {
    .auth-page .auth-card {
        border-radius: 14px;
    }

    .auth-page .auth-card-body {
        padding: 1.25rem 1.15rem;
    }

    .auth-page .form-control {
        min-height: 2.75rem;
        font-size: 1rem;
    }

    .auth-page .auth-submit {
        min-height: 2.85rem;
        font-size: 1rem;
    }
}

/* POS */
.pos-layout {
    display: block;
    position: relative;
}

.pos-products-column {
    min-width: 0;
}

.pos-cart-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.45);
    z-index: 1035;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, visibility 0.2s ease;
}

.pos-cart-backdrop.show {
    opacity: 1;
    visibility: visible;
}

body.pos-cart-sheet-open {
    overflow: hidden;
}

/* —— POS Cart panel (overlay) —— */
.pos-cart-panel {
    --pos-cart-accent: #2563eb;
    --pos-cart-surface: #ffffff;
    --pos-cart-muted: #64748b;
    --pos-cart-border: #e8edf3;
    display: grid;
    grid-template-rows: auto minmax(0, 1fr);
    position: fixed;
    z-index: 1040;
    margin: 0;
    overflow: hidden;
    visibility: hidden;
    pointer-events: none;
    background: var(--pos-cart-surface);
    transition: transform 0.28s cubic-bezier(0.32, 0.72, 0, 1), visibility 0.28s ease;
}

.pos-cart-panel.pos-cart-has-items {
    /* visibility handled when open */
}

.pos-cart-panel.pos-cart-open {
    transform: translateX(0);
    visibility: visible;
    pointer-events: auto;
}

.pos-cart-panel:not(.pos-cart-open) {
    transform: translateX(100%);
    pointer-events: none;
}

@media (min-width: 768px) {
    .pos-cart-panel {
        top: var(--topbar-height, 60px);
        right: 0;
        bottom: 0;
        width: min(420px, 100vw);
        height: auto;
        border-left: 1px solid var(--pos-cart-border);
        box-shadow: -16px 0 48px rgba(15, 23, 42, 0.12);
    }
}

.pos-cart-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.9rem 1rem;
    border-bottom: 1px solid var(--pos-cart-border);
    background: #fff;
}

.pos-cart-header-main {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    min-width: 0;
}

.pos-cart-header-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 12px;
    background: linear-gradient(135deg, #dbeafe 0%, #eff6ff 100%);
    color: var(--pos-cart-accent);
    font-size: 1.15rem;
    flex-shrink: 0;
}

.pos-cart-header-text {
    min-width: 0;
}

.pos-cart-title {
    font-size: 1.02rem;
    font-weight: 700;
    margin: 0;
    color: #0f172a;
    line-height: 1.2;
    letter-spacing: -0.01em;
}

.pos-cart-count {
    font-size: 0.74rem;
    color: var(--pos-cart-muted);
}

.pos-cart-header-actions {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    flex-shrink: 0;
}

.pos-cart-header-total {
    font-size: 0.92rem;
    font-weight: 700;
    color: var(--pos-cart-accent);
    margin-right: 0.25rem;
    white-space: nowrap;
}

.pos-cart-header-total:empty {
    display: none;
}

.pos-cart-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    border: none;
    border-radius: 8px;
    background: #f1f5f9;
    color: #64748b;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
}

.pos-cart-action:hover {
    background: #e2e8f0;
    color: #0f172a;
}

.pos-cart-action--danger:hover {
    background: #fee2e2;
    color: #dc2626;
}

.pos-cart-body {
    display: grid;
    grid-template-rows: minmax(0, 1fr) auto;
    min-height: 0;
    overflow: hidden;
}

.pos-cart-body.pos-cart-paying {
    grid-template-rows: minmax(0, 1fr);
}

.pos-cart-body.pos-cart-paying .pos-cart-items-section,
.pos-cart-body.pos-cart-paying .pos-cart-paybar {
    display: none;
}

.pos-cart-body.pos-cart-paying .pos-cart-checkout {
    display: flex;
    flex-direction: column;
    min-height: 0;
    max-height: none;
    overflow: hidden;
    border-top: none;
    box-shadow: none;
}

.pos-cart-checkout {
    display: none;
    flex-direction: column;
    min-height: 0;
    background: #f1f5f9;
    border-top: 1px solid var(--pos-cart-border);
}

.pos-cart-checkout:not(.pos-cart-checkout--collapsed) {
    display: flex;
}

.pos-cart-checkout--collapsed {
    display: none;
}

.pos-payment-top {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    background: #fff;
    border-bottom: 1px solid var(--pos-cart-border);
    flex-shrink: 0;
}

.pos-checkout-back {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    border: 1px solid #e2e8f0;
    border-radius: 999px;
    background: #fff;
    padding: 0.35rem 0.7rem;
    font-size: 0.76rem;
    font-weight: 600;
    color: #475569;
    cursor: pointer;
    flex-shrink: 0;
    transition: background 0.15s, border-color 0.15s;
}

.pos-checkout-back:hover {
    background: #f8fafc;
    border-color: #cbd5e1;
    color: #0f172a;
}

.pos-payment-heading {
    flex: 1;
    min-width: 0;
}

.pos-payment-title {
    margin: 0;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    color: #94a3b8;
    line-height: 1.2;
}

.pos-payment-amount {
    margin: 0.1rem 0 0;
    font-size: 1.35rem;
    font-weight: 800;
    color: #0f172a;
    letter-spacing: -0.03em;
    line-height: 1.15;
}

.pos-payment-method-bar {
    flex-shrink: 0;
    padding: 0 1rem 0.75rem;
    background: #fff;
    border-bottom: 1px solid var(--pos-cart-border);
    position: relative;
    z-index: 5;
    overflow: visible;
}

.pos-payment-method-bar .pos-payment-label {
    display: block;
    margin-bottom: 0.35rem;
}

.pos-payment-scroll {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    padding: 0.75rem;
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
    -webkit-overflow-scrolling: touch;
}

.pos-payment-card {
    background: #fff;
    border: 1px solid var(--pos-cart-border);
    border-radius: 14px;
    padding: 0.85rem 0.9rem;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
}

.pos-payment-card--summary {
    padding: 0.7rem 0.9rem;
}

.pos-payment-label {
    margin: 0 0 0.5rem;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    color: #94a3b8;
}

.pos-payment-footer {
    flex-shrink: 0;
    padding: 0.75rem 1rem;
    background: #fff;
    border-top: 1px solid var(--pos-cart-border);
    box-shadow: 0 -4px 20px rgba(15, 23, 42, 0.06);
}

.pos-checkout-meta {
    padding: 0.5rem 1rem 0.35rem;
}

.pos-cart-items-section {
    display: flex;
    flex-direction: column;
    min-height: 0;
    overflow: hidden;
    background: #f8fafc;
}

.pos-cart-items-head {
    padding: 0.5rem 1rem 0.3rem;
    flex-shrink: 0;
}

.pos-cart-items-label {
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #94a3b8;
}

.pos-cart-items {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    padding: 0 0.85rem 0.85rem;
    -webkit-overflow-scrolling: touch;
}

.pos-cart-paybar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.7rem 1rem;
    border-top: 1px solid var(--pos-cart-border);
    background: #fff;
    box-shadow: 0 -4px 16px rgba(15, 23, 42, 0.06);
    flex-shrink: 0;
}

.pos-paybar-summary {
    display: flex;
    flex-direction: column;
    gap: 0.05rem;
    min-width: 0;
}

.pos-paybar-label {
    font-size: 0.68rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #94a3b8;
}

.pos-paybar-total {
    font-size: 1.15rem;
    font-weight: 700;
    color: #0f172a;
    letter-spacing: -0.02em;
}

.pos-paybar-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    border: none;
    border-radius: 10px;
    padding: 0.6rem 1rem;
    background: var(--pos-cart-accent);
    color: #fff;
    font-size: 0.82rem;
    font-weight: 700;
    white-space: nowrap;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(37, 99, 235, 0.28);
    transition: background 0.15s, transform 0.15s;
}

.pos-paybar-btn:hover {
    background: #1d4ed8;
    color: #fff;
}

.pos-cart-empty {
    text-align: center;
    padding: 2rem 1rem;
    color: #94a3b8;
}

.pos-cart-empty i {
    font-size: 2rem;
    display: block;
    margin-bottom: 0.45rem;
    opacity: 0.4;
}

.pos-cart-empty p {
    margin: 0 0 0.15rem;
    font-weight: 600;
    color: #64748b;
}

.pos-cart-empty.hidden {
    display: none;
}

.pos-cart-item {
    background: #fff;
    border: 1px solid var(--pos-cart-border);
    border-radius: 12px;
    padding: 0.7rem 0.8rem;
    margin-bottom: 0.45rem;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.pos-cart-item-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.65rem;
    margin-bottom: 0.45rem;
}

.pos-cart-item-name {
    font-weight: 600;
    font-size: 0.9rem;
    color: #0f172a;
    line-height: 1.35;
    flex: 1;
    min-width: 0;
}

.pos-cart-item-total {
    font-weight: 700;
    font-size: 0.9rem;
    color: #0f172a;
    white-space: nowrap;
    flex-shrink: 0;
}

.pos-cart-item-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
}

.pos-cart-item-unit {
    font-size: 0.72rem;
    color: var(--pos-cart-muted);
}

.pos-cart-item-actions {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    flex-shrink: 0;
}

.pos-cart-item-fefo {
    margin-top: 0.35rem;
    padding-top: 0.35rem;
    border-top: 1px dashed #e2e8f0;
    font-size: 0.68rem;
    color: #2563eb;
}

.pos-qty-stepper {
    display: inline-flex;
    align-items: center;
    background: #f8fafc;
    border: 1px solid #dbe3ee;
    border-radius: 999px;
    overflow: hidden;
}

.pos-qty-stepper button {
    border: none;
    background: transparent;
    color: #475569;
    width: 1.75rem;
    height: 1.75rem;
    font-size: 0.95rem;
    line-height: 1;
    cursor: pointer;
    transition: background 0.12s;
}

.pos-qty-stepper button:hover {
    background: #e2e8f0;
}

.pos-qty-stepper input {
    width: 1.65rem;
    border: none;
    text-align: center;
    font-size: 0.8rem;
    font-weight: 700;
    padding: 0;
    background: transparent;
    color: #0f172a;
}

.pos-cart-item-remove {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.75rem;
    height: 1.75rem;
    border: none;
    border-radius: 999px;
    background: transparent;
    color: #94a3b8;
    padding: 0;
    cursor: pointer;
    transition: background 0.12s, color 0.12s;
}

.pos-cart-item-remove:hover {
    background: #fee2e2;
    color: #dc2626;
}

.pos-summary-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.78rem;
    color: var(--pos-cart-muted);
    margin-bottom: 0.2rem;
}

.pos-discount-toggle {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    border: none;
    background: none;
    padding: 0.1rem 0;
    margin-bottom: 0.2rem;
    font-size: 0.74rem;
    font-weight: 600;
    color: var(--pos-cart-accent);
    cursor: pointer;
}

.pos-discount-toggle:hover {
    text-decoration: underline;
}

.pos-discount-wrap {
    margin-bottom: 0.2rem;
}

.pos-summary-discount .input-group {
    max-width: 6.5rem;
}

.pos-summary-total {
    display: none;
}

.pos-cart-fab--bump {
    animation: pos-fab-bump 0.45s ease;
}

@keyframes pos-fab-bump {
    0%, 100% { transform: scale(1); }
    40% { transform: scale(1.06); }
}

.pos-cart-payment {
    padding: 0;
}

.pos-split-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid #f1f5f9;
}

.pos-split-label {
    font-size: 0.82rem;
    font-weight: 600;
    color: #334155;
    margin: 0;
}

.pos-pay-method-select {
    width: 100%;
    min-height: 2.75rem;
    padding: 0.5rem 2.25rem 0.5rem 0.85rem;
    font-size: 0.9rem;
    font-weight: 600;
    color: #0f172a;
    border: 1.5px solid #e2e8f0;
    border-radius: 10px;
    background-color: #fff;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
    cursor: pointer;
    transition: border-color 0.15s, box-shadow 0.15s;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23475569'%3e%3cpath fill-rule='evenodd' d='M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708z'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 0.85rem center;
    background-size: 14px 11px;
}

.pos-pay-method-select:hover {
    border-color: #cbd5e1;
}

.pos-pay-method-select:focus {
    border-color: #93c5fd;
    box-shadow: 0 0 0 0.2rem rgba(37, 99, 235, 0.12);
}

.pos-cash-panel {
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px dashed #e2e8f0;
}

.pos-cash-label {
    display: block;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: #64748b;
    margin-bottom: 0.4rem;
}

.pos-cash-panel .input-group {
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06);
}

.pos-cash-panel .form-control {
    font-size: 1.05rem;
    font-weight: 700;
    border-color: #e2e8f0;
}

.pos-cash-panel .form-control:focus {
    border-color: #93c5fd;
    box-shadow: 0 0 0 0.2rem rgba(37, 99, 235, 0.12);
}

.pos-change-strip {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 0.55rem;
    padding: 0.55rem 0.7rem;
    background: #ecfdf5;
    border: 1px solid #a7f3d0;
    border-radius: 10px;
}

.pos-change-strip-label {
    font-size: 0.78rem;
    font-weight: 600;
    color: #047857;
}

.pos-change-strip-value {
    font-size: 1.05rem;
    font-weight: 800;
    color: #059669;
    letter-spacing: -0.02em;
}

.pos-change-strip.pos-change-badge--due {
    background: #fef2f2;
    border-color: #fecaca;
}

.pos-change-strip.pos-change-badge--due .pos-change-strip-label {
    color: #b91c1c;
}

.pos-change-strip.pos-change-badge--due .pos-change-strip-value {
    color: #dc2626;
}

.pos-add-pay-row {
    margin-top: 0.35rem;
    font-size: 0.78rem;
}

.pos-pay-split .payment-row {
    display: flex;
    gap: 0.35rem;
    margin-bottom: 0.35rem;
}

.pos-split-progress {
    height: 4px;
    background: #e2e8f0;
    border-radius: 99px;
    overflow: hidden;
    margin-top: 0.45rem;
}

.pos-split-progress-bar {
    height: 100%;
    width: 0%;
    background: #2563eb;
    transition: width 0.2s;
}

.pos-split-amounts {
    display: flex;
    justify-content: space-between;
    margin-top: 0.25rem;
    font-size: 0.74rem;
    color: #64748b;
}

.pos-checkout-btn {
    margin: 0;
    padding: 0.9rem 1rem;
    font-weight: 700;
    font-size: 0.92rem;
    border-radius: 12px;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    min-height: 3.15rem;
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    border: none;
    box-shadow: 0 4px 16px rgba(37, 99, 235, 0.3);
    transition: transform 0.15s, box-shadow 0.15s, background 0.15s;
}

.pos-checkout-btn i {
    font-size: 1.15rem;
}

.pos-checkout-btn:disabled {
    background: #cbd5e1;
    box-shadow: none;
}

.pos-checkout-btn:not(:disabled):hover {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(37, 99, 235, 0.35);
}

.pos-checkout-total {
    font-size: 0.88rem;
    font-weight: 700;
    opacity: 0.95;
    margin-left: 0.15rem;
}

.pos-checkout-total:empty {
    display: none;
}

.pos-cart-peek-total,
.pos-cart-chevron,
.pos-pay-hint {
    display: none !important;
}

.pos-cart-fab {
    position: fixed;
    right: 1.25rem;
    bottom: 1.25rem;
    z-index: 1030;
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    padding: 0.8rem 1.15rem;
    border: none;
    border-radius: 999px;
    background: #2563eb;
    color: #fff;
    font-weight: 700;
    font-size: 0.92rem;
    box-shadow: 0 8px 28px rgba(37, 99, 235, 0.38);
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.pos-cart-fab:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 32px rgba(37, 99, 235, 0.42);
    color: #fff;
}

.pos-cart-fab-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.5rem;
    height: 1.5rem;
    padding: 0 0.35rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.22);
    font-size: 0.82rem;
}

.pos-cart-fab-total {
    white-space: nowrap;
}

/* Stock adjustments */
.adj-card {
    border-top: 3px solid #059669;
}

.adj-card[data-mode="out"] {
    border-top-color: #dc2626;
}

.adj-form .adj-block {
    padding: 1.15rem 1.35rem;
    border-bottom: 1px solid #f1f5f9;
}

.adj-form .adj-block:last-child {
    border-bottom: none;
}

.adj-block-label {
    display: block;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #64748b;
    margin-bottom: 0.5rem;
}

.adj-block-label-in {
    color: #047857;
}

.adj-block-label-out {
    color: #b91c1c;
}

.adj-product-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35rem;
}

.adj-stock-badge {
    font-size: 0.8rem;
    color: #475569;
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    padding: 0.2rem 0.55rem;
}

.adj-stock-badge strong {
    color: #0f172a;
    font-size: 0.95rem;
}

.adj-mode-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
}

.adj-mode-card {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.15rem;
    padding: 0.85rem 1rem;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    background: #fff;
    text-align: left;
    cursor: pointer;
    transition: border-color 0.15s, background 0.15s, box-shadow 0.15s;
}

.adj-mode-card:hover {
    border-color: #cbd5e1;
    background: #fafbfc;
}

.adj-mode-icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    margin-bottom: 0.25rem;
}

.adj-mode-icon-in {
    background: #ecfdf5;
    color: #059669;
}

.adj-mode-icon-out {
    background: #fef2f2;
    color: #dc2626;
}

.adj-mode-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: #0f172a;
}

.adj-mode-desc {
    font-size: 0.75rem;
    color: #94a3b8;
    line-height: 1.3;
}

.adj-mode-card.active {
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.08);
}

.adj-mode-card.active[data-mode="in"] {
    border-color: #059669;
    background: #f0fdf4;
}

.adj-mode-card.active[data-mode="in"] .adj-mode-title {
    color: #047857;
}

.adj-mode-card.active[data-mode="out"] {
    border-color: #dc2626;
    background: #fef2f2;
}

.adj-mode-card.active[data-mode="out"] .adj-mode-title {
    color: #b91c1c;
}

.adj-block-panel {
    background: #fafbfc;
}

.adj-card[data-mode="in"] #stockInPanel {
    background: #f0fdf9;
    border-top: 1px solid #d1fae5;
    border-bottom: 1px solid #d1fae5;
}

.adj-card[data-mode="out"] #stockOutPanel:not(.d-none) {
    background: #fef8f8;
    border-top: 1px solid #fecaca;
    border-bottom: 1px solid #fecaca;
}

.adj-block-footer {
    background: #f8fafc;
}

.adj-submit-btn {
    font-weight: 600;
    padding-top: 0.5rem;
    padding-bottom: 0.5rem;
}

.adj-card[data-mode="in"] .adj-submit-btn {
    background: #059669;
    border-color: #059669;
    color: #fff;
}

.adj-card[data-mode="in"] .adj-submit-btn:hover {
    background: #047857;
    border-color: #047857;
    color: #fff;
}

.adj-card[data-mode="out"] .adj-submit-btn {
    background: #dc2626;
    border-color: #dc2626;
    color: #fff;
}

.adj-card[data-mode="out"] .adj-submit-btn:hover {
    background: #b91c1c;
    border-color: #b91c1c;
    color: #fff;
}

@media (max-width: 575px) {
    .adj-mode-grid {
        grid-template-columns: 1fr;
    }

    .adj-form .adj-block {
        padding: 1rem;
    }
}

/* Product stock adjust modal */
#stockAdjustModalContent[data-mode="in"] {
    border-top: 3px solid #059669;
}

#stockAdjustModalContent[data-mode="out"] {
    border-top: 3px solid #dc2626;
}

.adj-modal-panel-in {
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
}

.adj-modal-panel-out {
    background: #fef2f2;
    border: 1px solid #fecaca;
}

#stockAdjustModalContent[data-mode="in"] .adj-modal-submit {
    background: #059669;
    border-color: #059669;
    color: #fff;
}

#stockAdjustModalContent[data-mode="in"] .adj-modal-submit:hover {
    background: #047857;
    border-color: #047857;
    color: #fff;
}

#stockAdjustModalContent[data-mode="out"] .adj-modal-submit {
    background: #dc2626;
    border-color: #dc2626;
    color: #fff;
}

#stockAdjustModalContent[data-mode="out"] .adj-modal-submit:hover {
    background: #b91c1c;
    border-color: #b91c1c;
    color: #fff;
}

/* Inventory / stock page */
.inv-nav-pills .nav-link {
    font-size: 0.875rem;
    font-weight: 500;
    color: #64748b;
    border-radius: 8px;
    padding: 0.45rem 0.9rem;
}

.inv-nav-pills .nav-link.active {
    background: #2563eb;
    color: #fff;
}

.inv-panel {
    overflow: hidden;
}

.inv-panel-header {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid #f1f5f9;
    background: linear-gradient(180deg, #fafbfc 0%, #fff 100%);
}

.inv-panel-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: #0f172a;
    margin: 0 0 0.15rem;
}

.inv-panel-desc {
    font-size: 0.8rem;
    color: #94a3b8;
}

.inv-table thead th {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #64748b;
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
    padding: 0.65rem 1.25rem;
}

.inv-table tbody td {
    padding: 0.7rem 1.25rem;
    vertical-align: middle;
    font-size: 0.875rem;
}

.inv-type-badge {
    display: inline-block;
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: capitalize;
    padding: 0.2rem 0.5rem;
    border-radius: 6px;
    white-space: nowrap;
}

.inv-badge-sale { background: #fee2e2; color: #b91c1c; }
.inv-badge-return { background: #d1fae5; color: #047857; }
.inv-badge-grn { background: #dbeafe; color: #1d4ed8; }
.inv-badge-adj { background: #fef3c7; color: #b45309; }
.inv-badge-writeoff { background: #f1f5f9; color: #475569; }
.inv-badge-opening { background: #ede9fe; color: #6d28d9; }
.inv-badge-default { background: #f1f5f9; color: #64748b; }

.inv-row-expiring {
    background: #fffbeb;
}

.inv-row-expired {
    background: #fef2f2;
}

/* Breadcrumb (detail pages) */
.breadcrumb-sm {
    font-size: 0.8rem;
}

.breadcrumb-sm .breadcrumb-item a {
    color: #64748b;
    text-decoration: none;
}

.breadcrumb-sm .breadcrumb-item a:hover {
    color: #2563eb;
}

.breadcrumb-sm .breadcrumb-item.active {
    color: #94a3b8;
}

/* Product batches */
.batch-number-badge {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: 0.8rem;
    font-weight: 600;
    color: #334155;
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    padding: 0.25rem 0.5rem;
}

.batch-badge-ok {
    background: #d1fae5 !important;
    color: #047857 !important;
}

.batch-badge-expiring {
    background: #fef3c7 !important;
    color: #b45309 !important;
}

.batch-badge-expired {
    background: #fee2e2 !important;
    color: #b91c1c !important;
}

.batch-row-expiring {
    background: #fffbeb;
}

.batch-row-expired {
    background: #fef2f2;
}

.app-card .table tfoot th {
    font-size: 0.8rem;
    font-weight: 600;
    color: #475569;
    padding: 0.65rem 1.25rem;
    border-top: 1px solid #e2e8f0;
}

/* Counters admin */
.counter-empty-state {
    text-align: center;
    padding: 3rem 1.5rem;
    color: #94a3b8;
}

.counter-empty-state i {
    font-size: 2.5rem;
    display: block;
    margin-bottom: 0.75rem;
    opacity: 0.45;
}

.counter-list-header {
    font-size: 0.72rem;
    letter-spacing: 0.04em;
}

.counter-edit-form {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--bs-border-color, #dee2e6);
}

.counter-edit-form:last-of-type {
    border-bottom: none;
}

.counter-edit-row:last-of-type {
    border-bottom: none !important;
}

.counter-row-inactive {
    background: #f8fafc;
}

.counter-row-inactive .counter-code-badge {
    opacity: 0.65;
}

.counter-code-badge {
    display: inline-block;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.03em;
    color: #3730a3;
    background: #e0e7ff;
    border: 1px solid #c7d2fe;
    border-radius: 8px;
    padding: 0.35rem 0.6rem;
}

.pm-edit-header {
    font-size: 0.72rem;
    letter-spacing: 0.04em;
}

.pm-edit-row:last-of-type {
    border-bottom: none !important;
}

.pos-category-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    padding-bottom: 0.25rem;
    border-bottom: 1px solid #e2e8f0;
}

.pos-category-tab {
    border: 1px solid #e2e8f0;
    background: #fff;
    color: #475569;
    border-radius: 999px;
    padding: 0.35rem 0.75rem;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.pos-category-tab:hover {
    border-color: #93c5fd;
    color: #2563eb;
}

.pos-category-tab.active {
    background: var(--sidebar-accent);
    border-color: var(--sidebar-accent);
    color: #fff;
}

.pos-category-count {
    display: inline-block;
    min-width: 1.25rem;
    margin-left: 0.15rem;
    padding: 0 0.35rem;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.08);
    font-size: 0.7rem;
    font-weight: 700;
}

.pos-category-tab.active .pos-category-count {
    background: rgba(255, 255, 255, 0.25);
}

.pos-products-by-category {
    max-height: calc(100vh - 220px);
    overflow-y: auto;
    padding-right: 4px;
}

.pos-category-section {
    margin-bottom: 1.25rem;
}

.pos-category-section:last-child {
    margin-bottom: 0.5rem;
}

.pos-category-heading {
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #334155;
    margin: 0 0 0.6rem;
    padding: 0.35rem 0;
    border-bottom: 2px solid #e2e8f0;
    position: sticky;
    top: 0;
    background: #fff;
    z-index: 1;
}

.pos-product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(175px, 1fr));
    gap: 0.65rem;
    padding: 2px;
}

@media (max-width: 767.98px) {
    .page-pos .pos-product-grid {
        display: flex;
        flex-direction: column;
        gap: 0.45rem;
    }
}

.pos-product-card {
    display: block;
    width: 100%;
    text-align: left;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    background: #fff;
    padding: 0.75rem 0.85rem;
    cursor: pointer;
    transition: border-color 0.15s, box-shadow 0.15s;
}

.pos-product-card:hover {
    border-color: var(--sidebar-accent);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.15);
}

.pos-product-card-name {
    font-weight: 600;
    font-size: 0.88rem;
    color: #0f172a;
    line-height: 1.3;
    margin-bottom: 0.2rem;
}

.pos-product-card-meta {
    font-size: 0.72rem;
    color: #64748b;
    margin-bottom: 0.5rem;
}

.pos-product-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.5rem;
}

.pos-search-scan-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(9rem, 11.5rem) auto;
    gap: 0.5rem;
    align-items: stretch;
}

.pos-product-search-wrap {
    min-width: 0;
}

.pos-category-filter-wrap {
    min-width: 0;
    position: relative;
    z-index: 2;
}

.pos-category-filter {
    width: 100%;
    min-height: 38px;
    font-size: 0.875rem;
    color: #374151;
    border-color: #e5e7eb;
    background-color: #fff;
    padding-right: 2rem;
    cursor: pointer;
    pointer-events: auto;
}

.pos-category-filter:focus {
    border-color: #86b7fe;
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.15);
}

.pos-scanner-group {
    display: flex;
    align-items: stretch;
    gap: 0.35rem;
    flex-shrink: 0;
}

.pos-scanner-status {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0 0.65rem;
    font-size: 0.75rem;
    font-weight: 700;
    border-radius: 0.375rem;
    border: 1px solid transparent;
    user-select: none;
}

.pos-scanner-status--ready {
    background: #ecfdf5;
    color: #047857;
    border-color: #a7f3d0;
}

.pos-scanner-status--paused {
    background: #f3f4f6;
    color: #6b7280;
    border-color: #e5e7eb;
}

.pos-barcode-input {
    width: 7.5rem;
    max-width: 7.5rem;
    font-weight: 600;
    font-size: 0.8rem;
}

.pos-barcode-input:focus {
    border-color: #059669;
    box-shadow: 0 0 0 0.15rem rgba(5, 150, 105, 0.25);
}

.pos-product-card-price {
    font-weight: 700;
    font-size: 0.85rem;
    color: #2563eb;
}

/* Utility */
.content-narrow {
    max-width: 720px;
}

.btn-page-action {
    white-space: nowrap;
}

/* Shifts */
.shift-current-header {
    background: linear-gradient(135deg, #ecfdf5 0%, #f0fdf4 100%);
    border-bottom: 1px solid #bbf7d0;
    font-weight: 600;
}

.shift-total-label {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #64748b;
}

.shift-total-value {
    font-size: 1.75rem;
    font-weight: 700;
    color: #0f172a;
    line-height: 1.2;
}

.shift-payments-title {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #64748b;
    margin-bottom: 0.5rem;
}

.shift-payments-list {
    display: grid;
    gap: 0.35rem;
    max-width: 420px;
}

.shift-payments-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    padding: 0.5rem 0.65rem;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 0.375rem;
    font-size: 0.9rem;
}

.shift-payments-detail {
    margin-top: 0.15rem;
    line-height: 1.3;
}

.shift-sort-link {
    color: inherit;
    text-decoration: none;
    white-space: nowrap;
}

.shift-sort-link:hover {
    color: var(--bs-primary);
    text-decoration: underline;
}

.shifts-filter-card h6 {
    font-size: 0.9rem;
    font-weight: 600;
}

.shifts-filter-actions .btn {
    min-width: 6.5rem;
}

/* Products list filters */
.products-filter-card .form-label {
    font-weight: 500;
}

.products-row-low {
    background-color: #fffbeb;
}

.products-row-out {
    background-color: #fef2f2;
}

.cat-list-header {
    font-size: 0.7rem;
    letter-spacing: 0.04em;
}

.cat-edit-row:hover {
    background-color: #f8fafc;
}

/* GRN view */
.grn-meta-dl dt {
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: #64748b;
}

.grn-meta-dl dd {
    margin-bottom: 0.75rem;
}

.grn-meta-dl dd:last-child {
    margin-bottom: 0;
}

.grn-summary-card {
    border-left: 3px solid #2563eb;
}

.grn-items-table thead th {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #64748b;
    font-weight: 600;
}

/* GRN product search */
.grn-product-cell {
    min-width: 220px;
}

.grn-product-search {
    position: relative;
}

.grn-product-results {
    position: absolute;
    z-index: 1050;
    left: 0;
    right: 0;
    top: 100%;
    margin-top: 2px;
    max-height: 220px;
    overflow-y: auto;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 0.375rem;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.12);
}

.grn-product-option {
    display: block;
    width: 100%;
    text-align: left;
    border: none;
    background: transparent;
    padding: 0.5rem 0.65rem;
    border-bottom: 1px solid #f1f5f9;
    cursor: pointer;
}

.grn-product-option:hover,
.grn-product-option:focus {
    background: #eff6ff;
    outline: none;
}

.grn-product-option:last-child {
    border-bottom: none;
}

.grn-product-option-name {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: #0f172a;
}

.grn-product-option-meta {
    display: block;
    font-size: 0.72rem;
    color: #64748b;
}

.grn-product-empty {
    padding: 0.65rem;
    font-size: 0.8rem;
    color: #64748b;
    text-align: center;
}

/* GRN index — desktop layout */
@media (min-width: 768px) {
    .page-grn-index .grn-section .card-body {
        padding: 1rem 1.25rem;
    }

    .page-grn-index .grn-lines-table-wrap {
        overflow: visible;
    }

    .page-grn-index .grn-lines-table {
        table-layout: fixed;
        width: 100%;
    }

    .page-grn-index .grn-col-product {
        width: 26%;
    }

    .page-grn-index .grn-col-sku {
        width: 8%;
    }

    .page-grn-index .grn-col-barcode {
        width: 11%;
    }

    .page-grn-index .grn-col-batch {
        width: 12%;
    }

    .page-grn-index .grn-col-expiry {
        width: 12%;
    }

    .page-grn-index .grn-col-qty {
        width: 8%;
    }

    .page-grn-index .grn-col-cost {
        width: 10%;
    }

    .page-grn-index .grn-col-actions {
        width: 4%;
    }

    .page-grn-index .line-sku,
    .page-grn-index .line-barcode {
        background-color: #f8fafc;
        color: #475569;
        font-size: 0.8rem;
    }

    .page-grn-index #grnLines thead th {
        font-size: 0.72rem;
        text-transform: uppercase;
        letter-spacing: 0.04em;
        color: #64748b;
        font-weight: 600;
        padding-top: 0.35rem;
        padding-bottom: 0.35rem;
    }

    .page-grn-index #grnLines tbody td {
        vertical-align: middle;
        padding-top: 0.45rem;
        padding-bottom: 0.45rem;
    }

    .page-grn-index .grn-product-cell {
        min-width: 0;
    }

    .page-grn-index .grn-lines-actions {
        margin-top: 0.75rem !important;
    }

    .page-grn-index .grn-history-table {
        table-layout: fixed;
        width: 100%;
    }

    .page-grn-index .grn-hist-col-num {
        width: 18%;
    }

    .page-grn-index .grn-hist-col-date {
        width: 14%;
    }

    .page-grn-index .grn-hist-col-supplier {
        width: 38%;
    }

    .page-grn-index .grn-hist-col-total {
        width: 16%;
    }

    .page-grn-index .grn-hist-col-action {
        width: 14%;
    }

    .page-grn-index .grn-history-table thead th {
        font-size: 0.72rem;
        text-transform: uppercase;
        letter-spacing: 0.04em;
        color: #64748b;
        font-weight: 600;
    }

    .page-grn-index .grn-history-table tbody td {
        vertical-align: middle;
    }
}

/* Table card layout on small screens */
@media (max-width: 576px) {
    .table-cards thead {
        display: none;
    }

    .table-cards,
    .table-cards tbody,
    .table-cards tr,
    .table-cards td {
        display: block;
        width: 100%;
    }

    .table-cards tr {
        margin-bottom: 0.75rem;
        border: 1px solid #e2e8f0;
        border-radius: 10px;
        padding: 0.5rem 0.65rem;
        background: #fff;
    }

    .table-cards td {
        display: flex;
        justify-content: space-between;
        align-items: flex-start;
        gap: 0.5rem;
        padding: 0.35rem 0;
        border: none;
        text-align: right;
    }

    .table-cards td::before {
        content: attr(data-label);
        font-weight: 600;
        font-size: 0.72rem;
        color: #64748b;
        text-align: left;
        flex-shrink: 0;
    }

    .table-cards td:first-child {
        font-weight: 600;
        font-size: 0.95rem;
        padding-bottom: 0.5rem;
        margin-bottom: 0.25rem;
        border-bottom: 1px solid #f1f5f9;
    }

    .table-cards td:first-child::before {
        display: none;
    }

    .table-cards td.td-actions {
        justify-content: flex-end;
        padding-top: 0.5rem;
        border-top: 1px solid #f1f5f9;
    }

    .table-cards td.td-actions::before {
        display: none;
    }
}

/* Stocktake count — barcode scanner */
.stc-barcode-input {
    font-family: ui-monospace, monospace;
    letter-spacing: 0.02em;
}
.stc-scanner-status {
    cursor: pointer;
    user-select: none;
}
.stc-scanner-status--paused {
    opacity: 0.85;
}
.stc-count-table .stc-row-variance {
    background-color: rgba(255, 193, 7, 0.08);
}
.stc-quick-result strong {
    font-weight: 600;
}

/* GRN receive — barcode scanner */
.grn-barcode-input {
    font-family: ui-monospace, monospace;
    letter-spacing: 0.02em;
}
.grn-scanner-status {
    cursor: pointer;
    user-select: none;
}
.grn-scanner-status--paused {
    opacity: 0.85;
}
