/* Taka sign (U+09F3) is missing from Inter, so the browser fell back to a
   small, baseline-dropped system Bengali font. Serve it from Noto Sans
   Bengali (local) for this one code point so ৳ matches adjacent figures. */
@font-face {
    font-family: 'BP Taka';
    src: url('../vendor/fonts/noto-sans-bengali/NotoSansBengali-Regular.ttf') format('truetype');
    font-weight: 400 500;
    font-display: swap;
    unicode-range: U+09F3;
}

@font-face {
    font-family: 'BP Taka';
    src: url('../vendor/fonts/noto-sans-bengali/NotoSansBengali-Bold.ttf') format('truetype');
    font-weight: 600 900;
    font-display: swap;
    unicode-range: U+09F3;
}

/* ============================================================
   DESIGN TOKENS — 2026 redesign (Inter, blue #1A6FEA system)
   Legacy --bp-* names are kept and re-pointed so every existing rule
   flips automatically; the semantic tokens below are the new API.
   ============================================================ */
:root {
    /* Brand + status (solid hues) */
    --bp-primary: #1A6FEA;
    --bp-on-solid: #FFFFFF; /* text/icons on any -solid fill */
    --bp-primary-light: #3D86EE;
    --bp-primary-dark: #155BC4;
    --bp-primary-50: #EBF3FE;
    --bp-primary-100: #D6E6FD;
    --bp-primary-ink: #1866DB;
    --bp-secondary: #117A65;
    --bp-secondary-ink: #0E6253;
    --bp-accent: #D4AC0D;
    --bp-danger: #EF4444;
    --bp-danger-bg: #FDECEC;
    --bp-danger-ink: #B42323;
    --bp-warning: #F59E0B;
    --bp-warning-bg: #FEF3DC;
    --bp-warning-ink: #9A5B00;
    --bp-success: #10B981;
    --bp-success-bg: #E7F8F1;
    --bp-success-ink: #0B7A57;
    --bp-info: #1A6FEA;
    /* Filled-button fills: white text on these is >= 4.5:1 */
    --bp-primary-solid: #1A6FEA;
    --bp-success-solid: #0B7A57;
    --bp-danger-solid: #C62828;
    --bp-warning-solid: #A85F00;

    /* Surfaces, text, lines */
    --bp-bg: #F4F6F9;
    --bp-surface: #FFFFFF;
    --bp-border: #E5E7EB;
    --bp-border-soft: #EEF0F4;
    --bp-text: #0F172A;
    --bp-text-2: #475569;
    --bp-muted: #5B6B82;
    --bp-row-hover: #F8FAFC;
    --bp-grid: #E9EDF3;
    --bp-dark: #0F172A;

    /* Legacy greys (used for both surfaces and text across the file) */
    --bp-gray-100: #F8FAFC;
    --bp-gray-200: #EEF0F4;
    --bp-gray-300: #E5E7EB;
    --bp-gray-400: #CBD5E1;
    --bp-gray-500: #94A3B8;
    --bp-gray-600: #64748B;
    --bp-gray-700: #475569;
    --bp-gray-800: #1E293B;

    /* Layout + shape */
    --bp-sidebar-width: 256px;
    --bp-sidebar-collapsed: 70px;
    --bp-header-height: 64px;
    --bp-radius-sm: 7px;
    --bp-radius-md: 10px;
    --bp-radius-lg: 14px;
    --bp-radius-xl: 16px;
    --bp-border-radius: 10px;
    --bp-shadow-card: 0 1px 2px rgba(15, 23, 42, 0.04), 0 1px 3px rgba(15, 23, 42, 0.05);
    --bp-shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.04), 0 1px 3px rgba(15, 23, 42, 0.05);
    --bp-shadow-md: 0 2px 8px rgba(15, 23, 42, 0.08);
    --bp-shadow-lg: 0 8px 24px rgba(15, 23, 42, 0.12);
    --bp-transition: all 0.2s ease;
    --bp-font: 'Inter', 'BP Taka', system-ui, -apple-system, 'Segoe UI', 'Noto Sans Bengali', 'Nirmala UI', sans-serif;

    --themeColorTwo: #ffa500;
    --colorGreen: #05A845;
    --colorRed: #DB4437;
    --paraColor: #7d7b7b;
    --colorBlack: #333333;
    --colorWhite: #ffffff;
    --lightBg: #edf5ff;
    --lightBg2: #F5F5F5;
}

[data-theme="dark"] {
    --bp-primary: #4B8FF2;
    --bp-on-solid: #FFFFFF;
    --bp-primary-light: #6BA3F5;
    --bp-primary-dark: #3A7BDD;
    --bp-primary-50: #18294A;
    --bp-primary-100: #1F3A6A;
    --bp-primary-ink: #7DAEF7;
    --bp-secondary-ink: #5FD3BF;
    --bp-info: #4B8FF2;
    --bp-primary-solid: #2F6FD8;
    --bp-danger: #EF4444;
    --bp-danger-bg: #3A1A1F;
    --bp-danger-ink: #F58A8A;
    --bp-warning-bg: #3A2D12;
    --bp-warning-ink: #F7C25B;
    --bp-success-bg: #12302A;
    --bp-success-ink: #4DD3A2;

    --bp-bg: #0E1320;
    --bp-surface: #151C2C;
    --bp-border: #26304A;
    --bp-border-soft: #1F2840;
    --bp-text: #E8ECF4;
    --bp-text-2: #B4BDCF;
    --bp-muted: #7C879E;
    --bp-row-hover: #1A2337;
    --bp-grid: #222B42;
    --bp-dark: #E8ECF4;

    --bp-gray-100: #1A2337;
    --bp-gray-200: #1F2840;
    --bp-gray-300: #26304A;
    --bp-gray-400: #33405F;
    --bp-gray-500: #7C879E;
    --bp-gray-600: #9AA5BC;
    --bp-gray-700: #B4BDCF;
    --bp-gray-800: #E8ECF4;

    --bp-shadow-card: none;
    --bp-shadow-sm: none;
    --bp-shadow-md: 0 2px 8px rgba(0, 0, 0, 0.35);
    --bp-shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.45);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--bp-font);
    font-size: 14px;
    color: var(--bp-text);
    background-color: var(--bp-bg);
    overflow-x: hidden;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a {
    text-decoration: none;
    color: var(--bp-primary-ink);
    transition: var(--bp-transition);
    -webkit-transition: var(--bp-transition);
    -moz-transition: var(--bp-transition);
    -ms-transition: var(--bp-transition);
    -o-transition: var(--bp-transition);
}

a:hover {
    color: var(--bp-primary);
}

::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: var(--bp-gray-200);
}

::-webkit-scrollbar-thumb {
    background: var(--bp-gray-400);
    border-radius: 3px;
    -webkit-border-radius: 3px;
    -moz-border-radius: 3px;
    -ms-border-radius: 3px;
    -o-border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--bp-gray-500);
}

.bp-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: var(--bp-sidebar-width);
    height: 100vh;
    display: flex;
    flex-direction: column;
    padding: 20px 14px 0;
    background-color: var(--bp-surface);
    color: var(--bp-text-2);
    border-right: 1px solid var(--bp-border);
    z-index: 1040;
    overflow-y: auto;
    overflow-x: hidden;
    transition: width 0.2s ease, transform 0.2s ease;
}

.bp-sidebar.collapsed {
    width: var(--bp-sidebar-collapsed);
    padding-left: 10px;
    padding-right: 10px;
}

.bp-sidebar-brand {
    display: flex;
    align-items: center;
    flex-shrink: 0;
    padding: 2px 8px 22px;
}

.bp-sidebar-brand h4 {
    margin: 0;
    font-weight: 800;
    font-size: 17px;
    letter-spacing: 0.01em;
    line-height: 1.1;
    white-space: nowrap;
}

.bp-brand-link {
    display: flex;
    align-items: center;
    gap: 11px;
    min-width: 0;
    color: var(--bp-text);
}

.bp-brand-link:hover {
    color: var(--bp-text);
}

.bp-brand-mark {
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    width: 38px;
    height: 38px;
    border-radius: var(--bp-radius-md);
    background-color: var(--bp-primary-solid);
    color: #fff;
    font-weight: 800;
    font-size: 15px;
    letter-spacing: -0.02em;
}

.bp-brand-name {
    font-weight: 800;
    font-size: 17px;
    letter-spacing: 0.01em;
    line-height: 1.1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: var(--bp-text);
}

.collapsed .bp-sidebar-brand {
    justify-content: center;
    padding-left: 0;
    padding-right: 0;
}

.collapsed .bp-brand-name {
    display: none;
}

.bp-sidebar-logo {
    display: flex;
    align-items: center;
    max-width: 100%;
}

.bp-sidebar-logo img {
    max-height: 40px;
    max-width: 100%;
    width: auto;
    object-fit: contain;
}

.collapsed .bp-sidebar-logo img {
    max-height: 32px;
}

.bp-sidebar-menu {
    display: flex;
    flex-direction: column;
    gap: 2px;
    flex: 1 0 auto;
    list-style: none;
    padding: 0 0 12px;
    margin: 0;
}

.bp-sidebar-menu .menu-header {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--bp-muted);
    padding: 14px 12px 8px;
}

.bp-sidebar-menu .menu-header:first-child {
    padding-top: 6px;
}

.collapsed .menu-header {
    display: none;
}

.bp-sidebar-menu .menu-item {
    position: relative;
}

.bp-sidebar-menu .menu-link {
    position: relative;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: var(--bp-radius-md);
    color: var(--bp-text-2);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    white-space: nowrap;
    transition: background-color 0.15s ease, color 0.15s ease;
}

.bp-sidebar-menu .menu-link:hover {
    color: var(--bp-text);
    background-color: var(--bp-row-hover);
}

.bp-sidebar-menu .menu-link.active {
    color: var(--bp-primary-ink);
    background-color: var(--bp-primary-50);
    font-weight: 600;
}

.bp-sidebar-menu .menu-link.active::after {
    content: "";
    position: absolute;
    left: -14px;
    top: 8px;
    bottom: 8px;
    width: 4px;
    border-radius: 0 4px 4px 0;
    background-color: var(--bp-primary);
}

.bp-sidebar-menu .menu-link i {
    width: 20px;
    font-size: 16px;
    text-align: center;
    flex-shrink: 0;
}

.bp-sidebar-menu .menu-link .menu-text {
    margin-left: 0;
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
}

.collapsed .bp-sidebar-menu .menu-link {
    justify-content: center;
    padding-left: 0;
    padding-right: 0;
}

.collapsed .bp-sidebar-menu .menu-link.active::after {
    left: -10px;
}

.collapsed .menu-text,
.collapsed .menu-arrow,
.collapsed .menu-badge {
    display: none;
}

.collapsed .menu-item>.menu-link::before {
    content: attr(title);
    position: absolute;
    left: 100%;
    top: 50%;
    margin-left: 12px;
    padding: 6px 12px;
    background-color: var(--bp-text);
    color: var(--bp-surface);
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
    pointer-events: none;
    opacity: 0;
    visibility: hidden;
    z-index: 9999;
    box-shadow: var(--bp-shadow-md);
    transform: translateY(-50%);
    transition: opacity 0.15s ease, visibility 0.15s ease;
    border-radius: var(--bp-radius-sm);
}

.collapsed .menu-item>.menu-link:hover::before {
    opacity: 1;
    visibility: visible;
}

.collapsed .menu-item:has(.submenu)>.menu-link::before {
    display: none;
}

.collapsed .menu-item>.submenu {
    position: fixed;
    left: var(--bp-sidebar-collapsed);
    width: 224px;
    max-height: none;
    overflow: visible;
    margin: 0;
    padding: 8px;
    background-color: var(--bp-surface);
    border: 1px solid var(--bp-border);
    box-shadow: var(--bp-shadow-lg);
    opacity: 0;
    visibility: hidden;
    z-index: 9999;
    transition: opacity 0.15s ease, visibility 0.15s ease;
    border-radius: var(--bp-radius-md);
}

.collapsed .menu-item:hover>.submenu {
    opacity: 1;
    visibility: visible;
}

.collapsed .menu-item>.submenu .menu-link {
    justify-content: flex-start;
    padding: 8px 12px;
}

.bp-sidebar-menu .menu-arrow {
    width: auto;
    font-size: 11px;
    color: var(--bp-muted);
    transition: transform 0.2s ease;
}

.bp-sidebar-menu .menu-item.open>.menu-link .menu-arrow {
    transform: rotate(90deg);
}

.bp-sidebar-menu .menu-badge {
    font-size: 10px;
    padding: 2px 7px;
    font-weight: 700;
    margin-left: 8px;
    border-radius: 10px;
}

.bp-sidebar-menu .submenu {
    list-style: none;
    margin: 0 0 0 21px;
    padding: 0 0 0 12px;
    border-left: 1px solid var(--bp-border-soft);
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

/* No fixed height cap: an open submenu always shows every item. app.js animates
   max-height to the measured scrollHeight, then releases it to none. */
.bp-sidebar-menu .menu-item.open>.submenu {
    max-height: none;
    margin-top: 2px;
    margin-bottom: 4px;
}

.bp-sidebar-menu .submenu .menu-link {
    gap: 10px;
    padding: 8px 12px;
    border-radius: var(--bp-radius-sm);
    font-size: 13px;
    font-weight: 500;
}

.bp-sidebar-menu .submenu .menu-link.active {
    background-color: transparent;
    color: var(--bp-primary-ink);
    font-weight: 600;
}

.bp-sidebar-menu .submenu .menu-link.active::after {
    display: none;
}

.bp-sidebar-menu .submenu .menu-link::before {
    content: '';
    display: none;
    width: 6px;
    height: 6px;
    flex-shrink: 0;
    border-radius: 50%;
    background-color: var(--bp-primary);
}

.bp-sidebar-menu .submenu .menu-link.active::before {
    display: block;
}

/* Sidebar footer — user card + Log Out (sticks to the bottom of the scroll area) */
.bp-sidebar-foot {
    position: sticky;
    bottom: 0;
    margin: auto -14px 0;
    padding: 14px 14px 16px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    flex-shrink: 0;
    background-color: var(--bp-surface);
    border-top: 1px solid var(--bp-border);
}

.bp-sidebar-user {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 0 6px;
    min-width: 0;
    color: var(--bp-text);
}

.bp-sidebar-user:hover {
    color: var(--bp-text);
}

.bp-sidebar-user .bp-user-avatar {
    width: 38px;
    height: 38px;
    background-color: var(--bp-primary-100);
    color: var(--bp-primary-ink);
    font-size: 14px;
}

.bp-sidebar-user-text {
    min-width: 0;
}

.bp-sidebar-user-name {
    display: block;
    font-weight: 600;
    line-height: 1.2;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.bp-sidebar-user-role {
    display: block;
    font-size: 12px;
    color: var(--bp-muted);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.bp-sidebar-logout {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 8px 12px;
    border: 0;
    border-radius: var(--bp-radius-md);
    background: transparent;
    color: var(--bp-danger-ink);
    font: inherit;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.15s ease;
}

.bp-sidebar-logout:hover {
    background-color: var(--bp-danger-bg);
}

.collapsed .bp-sidebar-foot {
    margin-left: -10px;
    margin-right: -10px;
    padding-left: 10px;
    padding-right: 10px;
    align-items: center;
}

.collapsed .bp-sidebar-user-text,
.collapsed .bp-sidebar-logout span {
    display: none;
}

.collapsed .bp-sidebar-logout {
    justify-content: center;
    padding-left: 0;
    padding-right: 0;
}

.bp-header {
    position: fixed;
    top: 0;
    left: var(--bp-sidebar-width);
    right: 0;
    height: var(--bp-header-height);
    background-color: var(--bp-surface);
    border-bottom: 1px solid var(--bp-border);
    z-index: 1030;
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 0 28px;
    transition: left 0.2s ease;
}

[data-theme="dark"] .bp-header {
    background-color: var(--bp-surface);
    border-bottom-color: var(--bp-border);
}

.sidebar-collapsed .bp-header {
    left: var(--bp-sidebar-collapsed);
}

.bp-header-left {
    display: flex;
    align-items: center;
    flex: 1;
    min-width: 0;
    gap: 12px;
}

.bp-header-right {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-left: auto;
    flex-shrink: 0;
}

.bp-toggle-btn {
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    width: 40px;
    height: 40px;
    padding: 0;
    border: 1px solid var(--bp-border);
    border-radius: var(--bp-radius-md);
    background: var(--bp-surface);
    color: var(--bp-text-2);
    font-size: 16px;
    cursor: pointer;
    transition: background-color 0.15s ease;
}

.bp-toggle-btn:hover {
    background-color: var(--bp-row-hover);
    color: var(--bp-text);
}

.bp-global-search {
    position: relative;
    flex: 1;
    width: 100%;
    max-width: 520px;
}

@media (max-width: 1200px) {
    .bp-global-search {
        width: 280px;
    }
}

.bp-global-search-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.bp-global-search-icon {
    position: absolute;
    left: 13px;
    top: 50%;
    color: var(--bp-muted);
    font-size: 15px;
    pointer-events: none;
    z-index: 2;
    transform: translateY(-50%);
}

.bp-global-search-input {
    width: 100%;
    height: 40px;
    border: 1px solid var(--bp-border);
    padding: 0 84px 0 40px;
    font-size: 14px;
    font-family: var(--bp-font);
    background-color: var(--bp-bg);
    color: var(--bp-text);
    transition: border-color 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
    border-radius: var(--bp-radius-md);
}

[data-theme="dark"] .bp-global-search-input {
    background-color: var(--bp-bg);
    border-color: var(--bp-border);
    color: var(--bp-text);
}

.bp-global-search-input:focus {
    outline: none;
    border-color: var(--bp-primary);
    background-color: var(--bp-surface);
    box-shadow: 0 0 0 3px var(--bp-primary-50);
}

.bp-global-search-input::placeholder {
    color: var(--bp-muted);
}

.bp-global-search-shortcut {
    position: absolute;
    right: 10px;
    top: 50%;
    font-size: 11px;
    font-weight: 600;
    color: var(--bp-muted);
    background: var(--bp-surface);
    padding: 2px 7px;
    border-radius: 6px;
    border: 1px solid var(--bp-border);
    pointer-events: none;
    transform: translateY(-50%);
}

.bp-global-search.has-value .bp-global-search-shortcut {
    display: none;
}

.bp-global-search-clear {
    position: absolute;
    right: 10px;
    top: 50%;
    background: none;
    border: none;
    color: var(--bp-gray-500);
    font-size: 14px;
    cursor: pointer;
    padding: 4px;
    display: none;
    z-index: 2;
    transform: translateY(-50%);
    -webkit-transform: translateY(-50%);
    -moz-transform: translateY(-50%);
    -ms-transform: translateY(-50%);
    -o-transform: translateY(-50%);
}

.bp-global-search.has-value .bp-global-search-clear {
    display: block;
}

.bp-global-search-clear:hover {
    color: var(--bp-danger);
}

.bp-global-search-dropdown {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    right: 0;
    background: #fff;
    border: 1px solid var(--bp-gray-300);
    border-radius: var(--bp-border-radius);
    box-shadow: var(--bp-shadow-lg);
    z-index: 1060;
    max-height: 480px;
    overflow-y: auto;
    display: none;
}

.bp-global-search-dropdown.open {
    display: block;
}

[data-theme="dark"] .bp-global-search-dropdown {
    background: var(--bp-gray-100);
    border-color: var(--bp-gray-400);
}

.bp-global-search-dropdown::-webkit-scrollbar {
    width: 5px;
}

.bp-global-search-dropdown::-webkit-scrollbar-track {
    background: transparent;
}

.bp-global-search-dropdown::-webkit-scrollbar-thumb {
    background: var(--bp-gray-300);
    border-radius: 3px;
    -webkit-border-radius: 3px;
    -moz-border-radius: 3px;
    -ms-border-radius: 3px;
    -o-border-radius: 3px;
}

.bp-global-search-group-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px 4px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--bp-gray-500);
    border-top: 1px solid var(--bp-gray-200);
}

.bp-global-search-group:first-child .bp-global-search-group-header {
    border-top: none;
}

[data-theme="dark"] .bp-global-search-group-header {
    color: var(--bp-gray-600);
    border-top-color: var(--bp-gray-300);
}

.bp-global-search-group-header i {
    font-size: 12px;
    width: 16px;
    text-align: center;
}

.bp-global-search-group-count {
    margin-left: auto;
    font-size: 10px;
    font-weight: 600;
    background: var(--bp-gray-200);
    color: var(--bp-gray-600);
    padding: 0 6px;
    border-radius: 10px;
    min-width: 18px;
    text-align: center;
}

[data-theme="dark"] .bp-global-search-group-count {
    background: var(--bp-gray-300);
    color: var(--bp-gray-700);
}

.bp-global-search-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 14px;
    text-decoration: none;
    color: var(--bp-dark);
    cursor: pointer;
    transition: background 0.15s;
    -webkit-transition: background 0.15s;
    -moz-transition: background 0.15s;
    -ms-transition: background 0.15s;
    -o-transition: background 0.15s;
}

.bp-global-search-item:hover,
.bp-global-search-item.active {
    background: var(--bp-gray-100);
    color: var(--bp-primary);
}

[data-theme="dark"] .bp-global-search-item {
    color: var(--bp-gray-700);
}

[data-theme="dark"] .bp-global-search-item:hover,
[data-theme="dark"] .bp-global-search-item.active {
    background: var(--bp-gray-200);
    color: var(--bp-primary-light);
}

.bp-global-search-item-icon {
    width: 32px;
    height: 32px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    flex-shrink: 0;
    background: color-mix(in srgb, var(--bp-primary) 8%, transparent);
    color: var(--bp-primary);
}

[data-theme="dark"] .bp-global-search-item-icon {
    background: color-mix(in srgb, var(--bp-primary) 15%, transparent);
    color: var(--bp-primary-light);
}

.bp-global-search-item-content {
    flex: 1;
    min-width: 0;
}

.bp-global-search-item-title {
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.bp-global-search-item-subtitle {
    font-size: 11px;
    color: var(--bp-gray-500);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.bp-global-search-item-badge {
    font-size: 10px;
    font-weight: 600;
    background: var(--bp-gray-200);
    color: var(--bp-gray-600);
    padding: 2px 8px;
    border-radius: 10px;
    white-space: nowrap;
    flex-shrink: 0;
}

[data-theme="dark"] .bp-global-search-item-badge {
    background: var(--bp-gray-300);
    color: var(--bp-gray-700);
}

.bp-global-search-item.bp-global-search-nav-item {
    border-left: 2px dashed var(--bp-accent);
    margin-left: 4px;
    padding-left: 10px;
}

.bp-global-search-nav-item .bp-global-search-item-icon {
    background: color-mix(in srgb, var(--bp-accent) 10%, transparent);
    color: var(--bp-accent);
}

.bp-global-search-nav-item .bp-global-search-item-badge {
    background: color-mix(in srgb, var(--bp-accent) 12%, transparent);
    color: #a38600;
}

[data-theme="dark"] .bp-global-search-nav-item .bp-global-search-item-badge {
    background: color-mix(in srgb, var(--bp-accent) 20%, transparent);
    color: var(--bp-accent);
}

.bp-global-search-dropdown mark {
    background: color-mix(in srgb, var(--bp-accent) 30%, transparent);
    color: inherit;
    padding: 0 1px;
    border-radius: 2px;
}

[data-theme="dark"] .bp-global-search-dropdown mark {
    background: color-mix(in srgb, var(--bp-accent) 40%, transparent);
}

.bp-global-search-empty,
.bp-global-search-loading {
    padding: 24px 14px;
    text-align: center;
    color: var(--bp-gray-500);
    font-size: 13px;
}

.bp-global-search-loading i {
    font-size: 18px;
    margin-bottom: 6px;
    display: block;
    animation: bp-spin 1s linear infinite;
}

@keyframes bp-spin {
    from {
        transform: rotate(0deg);
        -webkit-transform: rotate(0deg);
        -moz-transform: rotate(0deg);
        -ms-transform: rotate(0deg);
        -o-transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
        -webkit-transform: rotate(360deg);
        -moz-transform: rotate(360deg);
        -ms-transform: rotate(360deg);
        -o-transform: rotate(360deg);
    }
}

.bp-global-search-empty i {
    font-size: 24px;
    margin-bottom: 8px;
    display: block;
    opacity: 0.4;
}

.bp-global-search-recent-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px 4px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--bp-gray-500);
}

.bp-global-search-recent-clear {
    font-size: 11px;
    font-weight: 600;
    color: var(--bp-primary-light);
    cursor: pointer;
    text-transform: none;
    letter-spacing: 0;
}

.bp-global-search-recent-clear:hover {
    color: var(--bp-danger);
}

.bp-global-search-view-all {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 14px;
    font-size: 12px;
    font-weight: 600;
    color: var(--bp-primary);
    text-decoration: none;
    border-top: 1px solid var(--bp-gray-200);
    transition: var(--bp-transition);
    -webkit-transition: var(--bp-transition);
    -moz-transition: var(--bp-transition);
    -ms-transition: var(--bp-transition);
    -o-transition: var(--bp-transition);
}

.bp-global-search-view-all:hover {
    background-color: var(--bp-gray-100);
    color: var(--bp-primary-dark);
}

[data-theme="dark"] .bp-global-search-view-all {
    border-top-color: var(--bp-gray-300);
    color: var(--bp-primary-light);
}

[data-theme="dark"] .bp-global-search-view-all:hover {
    background-color: var(--bp-gray-200);
}

.bp-global-search-footer {
    padding: 8px 14px;
    text-align: center;
    font-size: 11px;
    color: var(--bp-gray-500);
    border-top: 1px solid var(--bp-gray-200);
}

[data-theme="dark"] .bp-global-search-footer {
    border-top-color: var(--bp-gray-300);
}

.bp-global-search-footer kbd {
    font-size: 10px;
    background: var(--bp-gray-200);
    padding: 1px 4px;
    border-radius: 3px;
    border: 1px solid var(--bp-gray-300);
}

.bp-global-search-overlay {
    display: none;
}

/* The topbar search field stays inline at every width (design); the overlay below is only opened by Ctrl+K on small screens. */
@media (max-width: 991.98px) {
    .bp-global-search-overlay {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0, 0, 0, 0.5);
        z-index: 1070;
        display: none;
        align-items: flex-start;
        justify-content: center;
        padding-top: 60px;
    }

    .bp-global-search-overlay.open {
        display: flex;
    }

    .bp-global-search-overlay .bp-global-search {
        display: block !important;
        width: 90%;
        max-width: 500px;
    }

    .bp-global-search-overlay .bp-global-search-dropdown {
        position: relative;
        top: 6px;
        max-height: 60vh;
    }
}

.bp-mobile-search-btn {
    display: none !important;
}

.bp-header-icon {
    position: relative;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    border-radius: var(--bp-radius-md);
    color: var(--bp-text-2);
    cursor: pointer;
    border: 1px solid var(--bp-border);
    background: var(--bp-surface);
    transition: background-color 0.15s ease, color 0.15s ease;
}

.bp-header-icon:hover {
    background-color: var(--bp-row-hover);
    color: var(--bp-text);
}

.bp-header-icon .badge-dot {
    position: absolute;
    top: 9px;
    right: 10px;
    width: 8px;
    height: 8px;
    background-color: var(--bp-danger);
    border-radius: 50%;
    border: 2px solid var(--bp-surface);
}

[data-theme="dark"] .bp-header-icon .badge-dot {
    border-color: var(--bp-border);
}

.bp-header-icon .badge-count {
    position: absolute;
    top: -6px;
    right: -6px;
    min-width: 18px;
    font-size: 10px;
    padding: 0 5px;
    height: 18px;
    line-height: 14px;
    text-align: center;
    background-color: var(--bp-danger);
    color: #fff;
    border: 2px solid var(--bp-surface);
    border-radius: 9px;
    font-weight: 700;
}

.bp-branch-select {
    height: 34px;
    font-size: 13px;
    border: 1px solid var(--bp-gray-300);
    border-radius: 6px;
    padding: 0 10px;
    color: var(--bp-dark);
    background-color: var(--bp-gray-100);
}

[data-theme="dark"] .bp-branch-select {
    background-color: var(--bp-gray-200);
    border-color: var(--bp-gray-400);
    color: var(--bp-gray-700);
}

.bp-user-dropdown {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: var(--bp-radius-md);
    transition: background-color 0.15s ease;
}

.bp-user-dropdown:hover {
    background-color: var(--bp-row-hover);
}

.bp-user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background-color: var(--bp-primary-solid);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 700;
    overflow: hidden;
    flex: 0 0 auto;
}

.bp-user-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.bp-user-info {
    line-height: 1.2;
}

.bp-user-info .user-name {
    font-size: 13px;
    font-weight: 600;
    color: var(--bp-text);
}

.bp-user-info .user-role {
    font-size: 11.5px;
    color: var(--bp-muted);
}

.bp-main {
    margin-left: var(--bp-sidebar-width);
    margin-top: var(--bp-header-height);
    padding: 24px 28px 40px;
    width: calc(100% - var(--bp-sidebar-width));
    max-width: none;
    min-height: calc(100vh - var(--bp-header-height));
    transition: margin-left 0.2s ease;
    box-sizing: border-box;
}

.bp-main > .bp-content-wrapper {
    width: 100%;
    max-width: 1556px;
    margin-left: auto;
    margin-right: auto;
    box-sizing: border-box;
}

.sidebar-collapsed .bp-main {
    margin-left: var(--bp-sidebar-collapsed);
}

.bp-page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 20px;
}

.bp-page-title {
    margin: 0;
    font-size: 24px;
    font-weight: 800;
    color: var(--bp-text);
    letter-spacing: -0.02em;
    line-height: 1.25;
}

.bp-breadcrumb {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12.5px;
    color: var(--bp-muted);
    margin-top: 2px;
}

.bp-breadcrumb a {
    color: var(--bp-muted);
}

.bp-breadcrumb a:hover {
    color: var(--bp-primary-ink);
}

.bp-breadcrumb .sep {
    font-size: 9px;
}

.bp-card {
    background-color: var(--bp-surface);
    border: 1px solid var(--bp-border);
    border-radius: var(--bp-radius-lg);
    box-shadow: var(--bp-shadow-card);
}

[data-theme="dark"] .bp-card {
    background-color: var(--bp-surface);
    border-color: var(--bp-border);
}

.bp-card:hover {
    box-shadow: var(--bp-shadow-card);
}

.bp-card-header {
    padding: 16px 20px;
    border-bottom: 1px solid var(--bp-border-soft);
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
}

[data-theme="dark"] .bp-card-header {
    border-bottom-color: var(--bp-border-soft);
}

.bp-card-title {
    font-size: 15px;
    font-weight: 700;
    color: var(--bp-text);
    margin: 0;
}

.bp-card-body {
    padding: 20px;
}

.bp-card-footer {
    padding: 12px 20px;
    border-top: 1px solid var(--bp-border-soft);
    background-color: var(--bp-row-hover);
    border-radius: 0 0 var(--bp-radius-lg) var(--bp-radius-lg);
}

[data-theme="dark"] .bp-card-footer {
    background-color: var(--bp-row-hover);
    border-top-color: var(--bp-border-soft);
}

.bp-card-hover {
    cursor: pointer;
    transition: var(--bp-transition);
    -webkit-transition: var(--bp-transition);
    -moz-transition: var(--bp-transition);
    -ms-transition: var(--bp-transition);
    -o-transition: var(--bp-transition);
}

.bp-card-hover:hover {
    box-shadow: var(--bp-shadow-md);
    border-color: var(--bp-primary);
    transform: translateY(-2px);
}

[data-theme="dark"] .bp-card-hover:hover {
    border-color: var(--bp-primary-light);
}

.bp-stat-card {
    background-color: var(--bp-surface);
    border: 1px solid var(--bp-border);
    border-radius: var(--bp-radius-lg);
    padding: 18px 20px;
    display: flex;
    flex-direction: row-reverse;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    box-shadow: var(--bp-shadow-card);
    transition: none;
}

[data-theme="dark"] .bp-stat-card {
    background-color: var(--bp-surface);
    border-color: var(--bp-border);
}

.bp-stat-card:hover {
    box-shadow: var(--bp-shadow-card);
    transform: none;
}

.bp-stat-icon {
    width: 36px;
    height: 36px;
    border-radius: var(--bp-radius-md);
    display: grid;
    place-items: center;
    font-size: 16px;
    flex-shrink: 0;
    background-color: var(--bp-primary-50);
    color: var(--bp-primary-ink);
}

.bp-stat-icon.icon-primary {
    background-color: var(--bp-primary-50);
    color: var(--bp-primary-ink);
}

.bp-stat-icon.icon-success {
    background-color: var(--bp-success-bg);
    color: var(--bp-success-ink);
}

.bp-stat-icon.icon-danger {
    background-color: var(--bp-danger-bg);
    color: var(--bp-danger-ink);
}

.bp-stat-icon.icon-warning {
    background-color: var(--bp-warning-bg);
    color: var(--bp-warning-ink);
}

.bp-stat-icon.icon-info {
    background-color: var(--bp-primary-50);
    color: var(--bp-primary-ink);
}

.bp-stat-icon.icon-accent {
    background-color: var(--bp-warning-bg);
    color: var(--bp-warning-ink);
}

.bp-stat-icon.icon-secondary {
    background-color: color-mix(in srgb, var(--bp-secondary) 14%, transparent);
    color: var(--bp-secondary-ink);
}

.bp-stat-content {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.bp-stat-label {
    font-size: 14px;
    font-weight: 500;
    color: var(--bp-text-2);
}

.bp-stat-value {
    font-size: 24px;
    font-weight: 800;
    color: var(--bp-text);
    letter-spacing: -0.02em;
    line-height: 1.15;
    margin-top: 0;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.bp-stat-change {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    width: fit-content;
    font-size: 12.5px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 999px;
    margin-top: 0;
}

.bp-stat-change.up {
    background-color: var(--bp-success-bg);
    color: var(--bp-success-ink);
}

.bp-stat-change.down {
    background-color: var(--bp-danger-bg);
    color: var(--bp-danger-ink);
}

.bp-table-wrapper {
    overflow-x: auto !important;
    overflow-y: hidden !important;
    width: 100%;
}

.bp-table-wrapper .dropdown-menu {
    z-index: 1050;
}

.bp-table-wrapper .bp-table tr th,
.bp-table-wrapper .bp-table tr td {
    border-right: none;
}

.bp-table-wrapper .bp-table tr th:last-child,
.bp-table-wrapper .bp-table tr td:last-child {
    border-right: none;
}

td.fw-700.fs-13.bp-cat-name-col .depth-1 {
    font-weight: 400;
}

.bp-sales-table td:nth-child(3) {
    min-width: 95px;
}

.bp-sales-table td:nth-child(6) {
    min-width: 190px;
}

.bp-sales-table td:nth-child(7) {
    min-width: 100px;
}

.bp-sales-table td:nth-child(8) {
    min-width: 170px;
}

.bp-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
    font-variant-numeric: tabular-nums;
}

.bp-table thead th {
    background-color: var(--bp-row-hover);
    color: var(--bp-muted);
    font-weight: 600;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    padding: 8px 12px;
    border-bottom: 1px solid var(--bp-border);
    white-space: nowrap;
    cursor: pointer;
    user-select: none;
    transition: color 0.15s ease;
}

.bp-table tfoot th {
    padding: 12px;
}

[data-theme="dark"] .bp-table thead th {
    background-color: var(--bp-row-hover);
    border-bottom-color: var(--bp-border);
}

.bp-table thead th:hover {
    background-color: var(--bp-row-hover);
    color: var(--bp-text-2);
}

.bp-table thead th .sort-icon {
    font-size: 10px;
    margin-left: 4px;
    opacity: 0.4;
}

.bp-table thead th.sorted .sort-icon {
    opacity: 1;
    color: var(--bp-primary);
}

.bp-table tbody td {
    padding: 12px;
    border-bottom: 1px solid var(--bp-border-soft);
    color: var(--bp-text);
    vertical-align: middle;
}

[data-theme="dark"] .bp-table tbody td {
    border-bottom-color: var(--bp-border-soft);
}

.bp-table tbody tr:hover {
    background-color: var(--bp-row-hover);
}

.bp-table .product-thumb {
    width: 40px;
    height: 40px;
    border-radius: var(--bp-radius-sm);
    object-fit: cover;
    border: 1px solid var(--bp-border);
}

.bp-settings-thumb {
    width: 72px;
    height: 56px;
    border-radius: 6px;
    object-fit: cover;
    border: 1px solid var(--bp-gray-300);
    background: var(--bp-gray-100);
    flex-shrink: 0;
}

[data-theme="dark"] .bp-settings-thumb {
    border-color: var(--bp-border-dark, var(--bp-border));
    background: var(--bp-surface-dark, var(--bp-surface));
}

.bp-table .text-truncate-cell {
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.bp-table-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 16px;
}

.bp-table-toolbar .toolbar-left {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.bp-table-toolbar .toolbar-right {
    display: flex;
    align-items: center;
    gap: 8px;
}

.bp-table-search {
    position: relative;
}

/* Inside a filter bar the search grows to fill the row so the other
   controls stay on one line and wrap gracefully on narrow screens. */
.bp-filter-bar .bp-table-search {
    flex: 1 1 240px;
    min-width: 200px;
}

.bp-filter-bar .bp-table-search input {
    width: 100%;
}

.bp-table-search input {
    width: 610px;
    height: 40px;
    border: 1px solid var(--bp-border);
    border-radius: var(--bp-radius-md);
    padding: 0 12px 0 38px;
    font-size: 14px;
    color: var(--bp-text);
    background-color: var(--bp-surface);
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.bp-table-search.w-100 input {
    width: 100%;
}

[data-theme="dark"] .bp-table-search input {
    background-color: var(--bp-surface);
    border-color: var(--bp-border);
    color: var(--bp-text);
}

.bp-table-search input:focus {
    outline: none;
    border-color: var(--bp-primary);
    box-shadow: 0 0 0 3px var(--bp-primary-50);
}

.bp-table-search i {
    position: absolute;
    left: 13px;
    top: 50%;
    color: var(--bp-muted);
    font-size: 14px;
    transform: translateY(-50%);
}

.bp-search-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 1050;
    background: #fff;
    border: 1px solid var(--bp-gray-300);
    border-radius: 0 0 6px 6px;
    box-shadow: var(--bp-shadow-lg);
    max-height: 300px;
    overflow-y: auto;
}

.bp-search-item {
    padding: 10px 14px;
    cursor: pointer;
    border-bottom: 1px solid var(--bp-gray-100);
    transition: background 0.12s;
    -webkit-transition: background 0.12s;
    -moz-transition: background 0.12s;
    -ms-transition: background 0.12s;
    -o-transition: background 0.12s;
}

.bp-search-item:last-child {
    border-bottom: none;
}

.bp-search-item:hover {
    background: var(--bp-gray-100);
}

[data-theme="dark"] .bp-search-dropdown {
    background: var(--bp-surface);
    border-color: rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .bp-search-item {
    border-bottom-color: rgba(255, 255, 255, 0.05);
}

[data-theme="dark"] .bp-search-item:hover {
    background: rgba(255, 255, 255, 0.05);
}

.bp-search-header {
    font-size: 13px;
    background: var(--bp-gray-100);
}

[data-theme="dark"] .bp-search-header {
    background: rgba(255, 255, 255, 0.03);
}

.bp-badge-xs {
    font-size: 9px;
    padding: 2px 5px;
    vertical-align: middle;
}

.bp-empty-items {
    font-size: 13px;
}

.bp-pagination {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px 16px;
    font-size: 13px;
    color: var(--bp-text-2);
}

.bp-pagination .page-info {
    font-weight: 600;
}

.bp-pagination .pagination {
    --bs-pagination-padding-x: 10px;
    --bs-pagination-padding-y: 5px;
    --bs-pagination-font-size: 13px;
    --bs-pagination-color: var(--bp-text-2);
    --bs-pagination-bg: var(--bp-surface);
    --bs-pagination-border-width: 1px;
    --bs-pagination-border-color: var(--bp-border);
    --bs-pagination-border-radius: 8px;
    --bs-pagination-hover-color: var(--bp-primary-ink);
    --bs-pagination-hover-bg: var(--bp-primary-50);
    --bs-pagination-hover-border-color: var(--bp-primary);
    --bs-pagination-focus-color: var(--bp-primary-ink);
    --bs-pagination-focus-bg: var(--bp-primary-50);
    --bs-pagination-focus-box-shadow: none;
    --bs-pagination-active-color: #fff;
    --bs-pagination-active-bg: var(--bp-primary-solid);
    --bs-pagination-active-border-color: var(--bp-primary-solid);
    --bs-pagination-disabled-color: var(--bp-muted);
    --bs-pagination-disabled-bg: var(--bp-row-hover);
    --bs-pagination-disabled-border-color: var(--bp-border);
    gap: 4px;
    margin: 0;
}

.bp-pagination .pagination .page-item {
    margin: 0;
}

.bp-pagination .pagination .page-link {
    font-weight: 600;
    line-height: 1.4;
    border-radius: 8px !important;
    transition: var(--bp-transition);
}

.bp-pagination .pagination .page-item.disabled .page-link {
    opacity: 0.6;
}

[data-theme="dark"] .bp-pagination .pagination {
    --bs-pagination-color: var(--bp-text-2);
    --bs-pagination-bg: var(--bp-surface);
    --bs-pagination-border-color: var(--bp-border);
    --bs-pagination-hover-color: var(--bp-primary-ink);
    --bs-pagination-hover-bg: var(--bp-primary-50);
    --bs-pagination-hover-border-color: var(--bp-primary);
    --bs-pagination-active-color: #fff;
    --bs-pagination-active-bg: var(--bp-primary-solid);
    --bs-pagination-active-border-color: var(--bp-primary-solid);
    --bs-pagination-disabled-color: var(--bp-muted);
    --bs-pagination-disabled-bg: var(--bp-row-hover);
    --bs-pagination-disabled-border-color: var(--bp-border);
}

.bp-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 40px;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.2;
    padding: 0 16px;
    border-radius: var(--bp-radius-md);
    border: 1px solid transparent;
    cursor: pointer;
    white-space: nowrap;
    font-family: var(--bp-font);
    transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.bp-btn i {
    font-size: 14px;
}

.bp-btn-primary {
    background-color: var(--bp-primary-solid);
    color: #fff;
    border-color: var(--bp-primary-solid);
}

.bp-btn-primary:hover {
    background-color: var(--bp-primary-dark);
    border-color: var(--bp-primary-dark);
    color: #fff;
}

.bp-btn-success {
    background-color: var(--bp-success-solid);
    border-color: var(--bp-success-solid);
    color: #fff;
}

.bp-btn-success:hover {
    background-color: color-mix(in srgb, var(--bp-success-solid) 85%, #000);
    border-color: color-mix(in srgb, var(--bp-success-solid) 85%, #000);
    color: #fff;
}

.bp-btn-danger {
    background-color: var(--bp-danger-solid);
    border-color: var(--bp-danger-solid);
    color: #fff;
}

.bp-btn-danger:hover {
    background-color: color-mix(in srgb, var(--bp-danger-solid) 85%, #000);
    border-color: color-mix(in srgb, var(--bp-danger-solid) 85%, #000);
    color: #fff;
}

.bp-btn-warning {
    background-color: var(--bp-warning-solid);
    border-color: var(--bp-warning-solid);
    color: #fff;
}

.bp-btn-warning:hover {
    background-color: color-mix(in srgb, var(--bp-warning-solid) 85%, #000);
    border-color: color-mix(in srgb, var(--bp-warning-solid) 85%, #000);
    color: #fff;
}

.bp-btn-info {
    background-color: var(--bp-primary-solid);
    color: #fff;
    border-color: var(--bp-primary-solid);
}

.bp-btn-info:hover {
    background-color: var(--bp-primary-dark);
    border-color: var(--bp-primary-dark);
    color: #fff;
}

.bp-btn-secondary {
    background-color: var(--bp-secondary);
    color: #fff;
    border-color: var(--bp-secondary);
}

.bp-btn-secondary:hover {
    background-color: color-mix(in srgb, var(--bp-secondary) 85%, #000);
    border-color: color-mix(in srgb, var(--bp-secondary) 85%, #000);
    color: #fff;
}

.bp-btn-outline {
    background-color: var(--bp-surface);
    color: var(--bp-text-2);
    border-color: var(--bp-border);
}

.bp-btn-outline:hover {
    background-color: var(--bp-row-hover);
    border-color: var(--bp-border);
    color: var(--bp-text);
}

[data-theme="dark"] .bp-btn-outline {
    background-color: var(--bp-surface);
    border-color: var(--bp-border);
    color: var(--bp-text-2);
}

.bp-btn-sm {
    min-height: 32px;
    padding: 0 12px;
    font-size: 13px;
    border-radius: 8px;
    gap: 6px;
}

.bp-btn-sm i {
    font-size: 12px;
}

.bp-btn-lg {
    min-height: 48px;
    padding: 0 24px;
    font-size: 15px;
}

.bp-btn-icon {
    width: 40px;
    height: 40px;
    min-height: 0;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--bp-radius-md);
}

.bp-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 3px 10px;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.4;
    border-radius: 999px;
    white-space: nowrap;
}

.bp-badge-success {
    background-color: var(--bp-success-bg);
    color: var(--bp-success-ink);
}

.bp-badge-danger {
    background-color: var(--bp-danger-bg);
    color: var(--bp-danger-ink);
}

.bp-badge-warning {
    background-color: var(--bp-warning-bg);
    color: var(--bp-warning-ink);
}

.bp-badge-info {
    background-color: var(--bp-primary-50);
    color: var(--bp-primary-ink);
}

.bp-badge-primary {
    background-color: var(--bp-primary-50);
    color: var(--bp-primary-ink);
}

.bp-badge-secondary {
    background-color: color-mix(in srgb, var(--bp-secondary) 14%, transparent);
    color: var(--bp-secondary-ink);
}

.bp-badge-dark {
    background-color: var(--bp-gray-200);
    color: var(--bp-text-2);
}

.bp-form-control {
    width: 100%;
    height: 40px;
    border: 1px solid var(--bp-border);
    border-radius: var(--bp-radius-md);
    padding: 0 12px;
    font-size: 14px;
    color: var(--bp-text);
    background-color: var(--bp-surface);
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
    font-family: var(--bp-font);
    box-sizing: border-box;
}

[data-theme="dark"] .bp-form-control {
    background-color: var(--bp-surface);
    border-color: var(--bp-border);
    color: var(--bp-text);
}

.bp-form-control:focus {
    outline: none;
    border-color: var(--bp-primary);
    box-shadow: 0 0 0 3px var(--bp-primary-50);
}

.bp-form-label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--bp-text-2);
    margin-bottom: 6px;
}

.bp-form-select {
    height: 40px;
    border: 1px solid var(--bp-border);
    border-radius: var(--bp-radius-md);
    padding: 0 30px 0 12px;
    font-size: 14px;
    color: var(--bp-text);
    background-color: var(--bp-surface);
    cursor: pointer;
    font-family: var(--bp-font);
    appearance: auto;
    box-sizing: border-box;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

[data-theme="dark"] .bp-form-select {
    background-color: var(--bp-surface);
    border-color: var(--bp-border);
    color: var(--bp-text);
}

.bp-form-select:focus {
    outline: none;
    border-color: var(--bp-primary);
    box-shadow: 0 0 0 3px var(--bp-primary-50);
}

.input-group>.bp-form-control,
.input-group>.bp-form-select {
    flex: 1 1 auto;
    width: 1%;
    min-width: 0;
}

.input-group> :not(:first-child).bp-form-control,
.input-group> :not(:first-child).bp-form-select,
.input-group> :not(:first-child).bp-btn {
    margin-left: -1px;
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
}

.input-group> :not(:last-child).bp-form-control,
.input-group> :not(:last-child).bp-form-select,
.input-group> :not(:last-child).bp-btn {
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
}

.input-group>.bp-btn {
    height: 40px;
    flex-shrink: 0;
}

textarea.bp-form-control {
    height: auto;
    padding: 10px 12px;
    resize: vertical;
}

input[type="file"].bp-form-control {
    height: auto;
    padding: 7px 12px;
    line-height: 1.4;
}

input[type="file"].bp-form-control::file-selector-button {
    margin-right: 10px;
    padding: 4px 10px;
    border: 1px solid var(--bp-gray-300);
    border-radius: 4px;
    background-color: var(--bp-gray-100);
    color: var(--bp-gray-700);
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--bp-transition);
    -webkit-transition: var(--bp-transition);
    -moz-transition: var(--bp-transition);
    -ms-transition: var(--bp-transition);
    -o-transition: var(--bp-transition);
}

input[type="file"].bp-form-control::file-selector-button:hover {
    background-color: var(--bp-gray-200);
}

[data-theme="dark"] input[type="file"].bp-form-control::file-selector-button {
    background-color: var(--bp-gray-300);
    border-color: var(--bp-gray-400);
    color: var(--bp-gray-700);
}

.modal-content {
    border: 1px solid var(--bp-border);
    border-radius: var(--bp-radius-xl);
    background-color: var(--bp-surface);
    color: var(--bp-text);
    box-shadow: var(--bp-shadow-lg);
}

[data-theme="dark"] .modal-content {
    background-color: var(--bp-surface);
}

.modal-header {
    padding: 18px 24px;
    border-bottom: 1px solid var(--bp-border-soft);
}

[data-theme="dark"] .modal-header {
    border-bottom-color: var(--bp-border-soft);
}

.modal-title {
    font-size: 16px;
    font-weight: 700;
}

.modal-body {
    padding: 24px;
}

.modal-footer {
    padding: 14px 24px;
    border-top: 1px solid var(--bp-border-soft);
}

[data-theme="dark"] .modal-footer {
    border-top-color: var(--bp-border-soft);
}

.dropdown-menu {
    --bs-dropdown-bg: var(--bp-surface);
    --bs-dropdown-color: var(--bp-text);
    --bs-dropdown-link-color: var(--bp-text-2);
    --bs-dropdown-link-hover-color: var(--bp-text);
    --bs-dropdown-link-hover-bg: var(--bp-row-hover);
    --bs-dropdown-link-active-bg: var(--bp-primary-50);
    --bs-dropdown-link-active-color: var(--bp-primary-ink);
    border: 1px solid var(--bp-border);
    border-radius: 12px;
    box-shadow: var(--bp-shadow-lg);
    padding: 6px;
    font-size: 13px;
}

[data-theme="dark"] .dropdown-menu {
    background-color: var(--bp-surface);
    border-color: var(--bp-border);
}

.dropdown-item {
    padding: 8px 12px;
    border-radius: 8px;
    font-weight: 500;
    transition: background-color 0.15s ease, color 0.15s ease;
}

.dropdown-item:hover {
    background-color: var(--bp-row-hover);
    color: var(--bp-text);
}

[data-theme="dark"] .dropdown-item {
    color: var(--bp-text-2);
}

[data-theme="dark"] .dropdown-item:hover {
    background-color: var(--bp-row-hover);
    color: var(--bp-text);
}

.dropdown-item i {
    width: 20px;
    text-align: center;
    margin-right: 6px;
    color: var(--bp-muted);
}

.dropdown-divider {
    margin: 4px 0;
    border-color: var(--bp-border-soft);
}

.bp-quick-actions {
    position: relative;
}

.bp-fab {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background-color: var(--bp-primary);
    color: #fff;
    border: none;
    font-size: 20px;
    cursor: pointer;
    box-shadow: 0 4px 12px color-mix(in srgb, var(--bp-primary) 40%, transparent);
    transition: var(--bp-transition);
    display: flex;
    align-items: center;
    justify-content: center;
    -webkit-transition: var(--bp-transition);
    -moz-transition: var(--bp-transition);
    -ms-transition: var(--bp-transition);
    -o-transition: var(--bp-transition);
}

.bp-fab:hover {
    background-color: var(--bp-primary-dark);
    transform: scale(1.05);
    -webkit-transform: scale(1.05);
    -moz-transform: scale(1.05);
    -ms-transform: scale(1.05);
    -o-transform: scale(1.05);
}

.bp-filter-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    padding: 0;
    background-color: transparent;
    border: 0;
    border-radius: 0;
    margin-bottom: 0;
    justify-content: space-between;
    width: 100%;
}

[data-theme="dark"] .bp-filter-bar {
    background-color: transparent;
    border-color: transparent;
}

.bp-filter-bar-inner {
    padding: 16px 20px;
    border-bottom: 1px solid var(--bp-border-soft);
}

[data-theme="dark"] .bp-filter-bar-inner {
    border-bottom-color: var(--bp-border-soft);
}

.bp-filter-bar .bp-form-select,
.bp-filter-bar .bp-form-control {
    width: auto;
    min-width: 150px;
    height: 40px;
    font-size: 13px;
}

/* Date inputs are compact — they never need 150px+ of width. */
.bp-filter-bar .bp-filter-date {
    min-width: 0;
    width: 150px;
    flex: 0 0 auto;
}

.bp-filter-bar .select2-container {
    width: auto !important;
    min-width: 150px;
}

.bp-filter-bar .select2-container--default .select2-selection--single {
    height: 40px !important;
    font-size: 13px;
}

.bp-filter-bar .select2-container--default .select2-selection--single .select2-selection__arrow {
    height: 38px;
}

.bp-status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
    margin-right: 6px;
}

.bp-status-dot.online {
    background-color: var(--bp-success);
}

.bp-status-dot.offline {
    background-color: var(--bp-gray-400);
}

.bp-chart-container {
    position: relative;
    width: 100%;
    min-height: 280px;
}

.bp-empty-state {
    text-align: center;
    padding: 60px 20px;
}

.bp-empty-state i {
    font-size: 24px;
    color: var(--bp-muted);
}

.bp-empty-state h5 {
    font-weight: 700;
    color: var(--bp-text-2);
}

.bp-empty-state p {
    font-size: 13px;
    color: var(--bp-muted);
    margin-top: 4px;
}

.bp-notification-list {
    width: 360px !important;
    max-height: 460px;
    border-radius: var(--bp-border-radius) !important;
    box-shadow: var(--bp-shadow-lg) !important;
    overflow: hidden;
    background-color: var(--bp-surface);
    z-index: 1080;
}

[data-theme="dark"] .bp-notification-list {
    background: var(--bp-gray-100);
    border-color: var(--bp-gray-400);
}

.bp-notification-list .bp-notif-header {
    padding: 14px 16px;
    border-bottom: 1px solid var(--bp-gray-300);
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: var(--bp-dark);
}

.bp-notification-list .bp-notif-body {
    max-height: 340px;
    overflow-y: auto;
}

.bp-notification-list .bp-notif-footer {
    padding: 10px 16px;
    border-top: 1px solid var(--bp-gray-300);
    text-align: center;
    background-color: var(--bp-surface);
    position: relative;
}

[data-theme="dark"] .bp-notification-list .bp-notif-footer {
    background-color: var(--bp-gray-100);
}

.bp-notification-item {
    display: flex;
    gap: 10px;
    padding: 12px 16px;
    border-bottom: 1px solid var(--bp-gray-200);
    text-decoration: none;
    color: var(--bp-dark);
    transition: var(--bp-transition);
    -webkit-transition: var(--bp-transition);
    -moz-transition: var(--bp-transition);
    -ms-transition: var(--bp-transition);
    -o-transition: var(--bp-transition);
}

.bp-notification-item:last-child {
    border-bottom: none;
}

.bp-notification-item:hover {
    background-color: var(--bp-gray-100);
    color: var(--bp-primary);
}

[data-theme="dark"] .bp-notification-item:hover {
    background-color: var(--bp-gray-200);
}

.bp-notification-item.unread {
    background-color: color-mix(in srgb, var(--bp-primary) 6%, transparent);
}

.bp-notif-icon {
    width: 36px;
    height: 36px;
    min-width: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
}

.bp-notif-icon.icon-success {
    background: #D4EFDF;
    color: var(--bp-success);
}

.bp-notif-icon.icon-warning {
    background: #FDEBD0;
    color: var(--bp-warning);
}

.bp-notif-icon.icon-danger {
    background: #FADBD8;
    color: var(--bp-danger);
}

.bp-notif-icon.icon-primary {
    background: #D6EAF8;
    color: var(--bp-primary-light);
}

.bp-notif-icon.icon-info {
    background: #D6EAF8;
    color: var(--bp-primary-light);
}

.bp-notif-empty {
    padding: 30px 16px;
    text-align: center;
    color: var(--bp-gray-500);
}

.bp-notif-empty i {
    font-size: 28px;
    margin-bottom: 8px;
    display: block;
    opacity: 0.4;
}

.bp-notif-item {
    display: flex;
    gap: 10px;
    padding: 12px 16px;
    border-bottom: 1px solid var(--bp-gray-200);
    text-decoration: none;
    color: var(--bp-dark);
    transition: var(--bp-transition);
    -webkit-transition: var(--bp-transition);
    -moz-transition: var(--bp-transition);
    -ms-transition: var(--bp-transition);
    -o-transition: var(--bp-transition);
}

.bp-notif-item:last-child {
    border-bottom: none;
}

.bp-notif-item:hover {
    background-color: var(--bp-gray-100);
    color: var(--bp-primary);
}

[data-theme="dark"] .bp-notif-item {
    border-bottom-color: var(--bp-gray-300);
    color: var(--bp-light);
}

[data-theme="dark"] .bp-notif-item:hover {
    background-color: var(--bp-gray-200);
}

.bp-notif-item.is-unread {
    background-color: color-mix(in srgb, var(--bp-primary) 6%, transparent);
}

[data-theme="dark"] .bp-notif-item.is-unread {
    background-color: color-mix(in srgb, var(--bp-primary) 12%, transparent);
}

.bp-notif-item .bp-notif-icon {
    width: 32px;
    height: 32px;
    min-width: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bp-primary-light, #D6EAF8);
    color: #fff;
    font-size: 12px;
}

.bp-notif-item .bp-notif-content {
    flex: 1;
    min-width: 0;
}

.bp-notif-item .bp-notif-title,
.bp-notif-item .bp-notif-body-text,
.bp-notif-item .bp-notif-time {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.bp-notification-icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    flex-shrink: 0;
}

.bp-notification-text {
    font-size: 13px;
    color: var(--bp-dark);
    line-height: 1.4;
}

.bp-notification-time {
    font-size: 11px;
    color: var(--bp-gray-500);
    margin-top: 2px;
}

@media (max-width: 992px) {
    .bp-sidebar {
        transform: translateX(-100%);
        -webkit-transform: translateX(-100%);
        -moz-transform: translateX(-100%);
        -ms-transform: translateX(-100%);
        -o-transform: translateX(-100%);
    }

    .bp-sidebar.mobile-open {
        transform: translateX(0);
        -webkit-transform: translateX(0);
        -moz-transform: translateX(0);
        -ms-transform: translateX(0);
        -o-transform: translateX(0);
    }

    .bp-header {
        left: 0;
    }

    .bp-main {
        margin-left: 0;
    }

    .bp-search-box {
        display: none;
    }

    .bp-user-info {
        display: none;
    }
}

@media (max-width: 768px) {
     .bp-main {
        margin-left: 0;
        width: 100%;
        padding: 20px 16px 32px;
        max-width: 100%;
    }

    .bp-main > .bp-content-wrapper {
        width: 100%;
        max-width: 100%;
        margin-left: auto;
        margin-right: auto;
    }

    .bp-page-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .bp-stat-value {
        font-size: 20px;
    }

    .bp-filter-bar .bp-form-select,
    .bp-filter-bar .bp-form-control {
        width: 100%;
    }

    .bp-filter-bar .select2-container {
        width: 100% !important;
    }
}

.bp-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(15, 23, 42, 0.4);
    z-index: 1035;
}

.bp-overlay.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(8px);
        -webkit-transform: translateY(8px);
        -moz-transform: translateY(8px);
        -ms-transform: translateY(8px);
        -o-transform: translateY(8px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
        -webkit-transform: translateY(0);
        -moz-transform: translateY(0);
        -ms-transform: translateY(0);
        -o-transform: translateY(0);
    }
}

.bp-animate-in {
    animation: fadeIn 0.3s ease forwards;
}

.bp-animate-in:nth-child(1) {
    animation-delay: 0.05s;
}

.bp-animate-in:nth-child(2) {
    animation-delay: 0.1s;
}

.bp-animate-in:nth-child(3) {
    animation-delay: 0.15s;
}

.bp-animate-in:nth-child(4) {
    animation-delay: 0.2s;
}

.bp-animate-in:nth-child(5) {
    animation-delay: 0.25s;
}

.bp-animate-in:nth-child(6) {
    animation-delay: 0.3s;
}

.bp-animate-in:nth-child(7) {
    animation-delay: 0.35s;
}

.bp-animate-in:nth-child(8) {
    animation-delay: 0.4s;
}

.fw-800 {
    font-weight: 800;
}

.fs-11 {
    font-size: 11px;
}

.fs-12 {
    font-size: 12px;
}

.fs-13 {
    font-size: 13px;
}

.gap-8 {
    gap: 8px;
}

.gap-12 {
    gap: 12px;
}

.gap-16 {
    gap: 16px;
}

.text-primary {
    color: var(--bp-primary-ink) !important;
}

.text-success {
    color: var(--bp-success-ink) !important;
}

.text-danger {
    color: var(--bp-danger-ink) !important;
}

.text-warning {
    color: var(--bp-warning-ink) !important;
}

.text-muted {
    color: var(--bp-gray-600) !important;
}

.bg-soft-primary {
    background-color: color-mix(in srgb, var(--bp-primary) 10%, transparent);
}

.bg-soft-success {
    background-color: color-mix(in srgb, var(--bp-success) 10%, transparent);
}

.bg-soft-danger {
    background-color: color-mix(in srgb, var(--bp-danger) 10%, transparent);
}

.bg-soft-warning {
    background-color: color-mix(in srgb, var(--bp-warning) 10%, transparent);
}

.fw-600 {
    font-weight: 600;
}

.fs-14 {
    font-size: 14px;
}

.bp-settings-nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: var(--bp-border-radius);
    cursor: pointer;
    text-decoration: none;
    margin-bottom: 2px;
    border: 1px solid transparent;
    transition: var(--bp-transition);
    -webkit-transition: var(--bp-transition);
    -moz-transition: var(--bp-transition);
    -ms-transition: var(--bp-transition);
    -o-transition: var(--bp-transition);
}

.bp-settings-nav-item:hover {
    background-color: var(--bp-gray-100);
    border-color: var(--bp-gray-300);
}

.bp-settings-nav-item.active {
    background-color: color-mix(in srgb, var(--bp-primary) 7%, transparent);
    border-color: var(--bp-primary-light);
}

[data-theme="dark"] .bp-settings-nav-item:hover {
    background-color: var(--bp-gray-200);
}

[data-theme="dark"] .bp-settings-nav-item.active {
    background-color: color-mix(in srgb, var(--bp-primary) 12%, transparent);
}

.bp-settings-nav-icon {
    width: 38px;
    height: 38px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    flex-shrink: 0;
}

.bp-settings-nav-text {
    flex: 1;
    min-width: 0;
}

.bp-settings-nav-label {
    font-size: 13px;
    font-weight: 700;
    color: var(--bp-dark);
    line-height: 1.2;
}

.bp-settings-nav-desc {
    font-size: 11px;
    color: var(--bp-gray-500);
    margin-top: 1px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.bp-settings-nav-arrow {
    font-size: 11px;
    color: var(--bp-gray-400);
    transition: var(--bp-transition);
    -webkit-transition: var(--bp-transition);
    -moz-transition: var(--bp-transition);
    -ms-transition: var(--bp-transition);
    -o-transition: var(--bp-transition);
}

.bp-settings-nav-item.active .bp-settings-nav-arrow {
    color: var(--bp-primary);
    transform: translateX(2px);
    -webkit-transform: translateX(2px);
    -moz-transform: translateX(2px);
    -ms-transform: translateX(2px);
    -o-transform: translateX(2px);
}

.bp-settings-section-header {
    display: flex;
    align-items: flex-start;
    gap: 16px;
}

.bp-settings-section-title {
    font-size: 20px;
    font-weight: 800;
    color: var(--bp-dark);
    margin: 0 0 4px 0;
}

.bp-settings-section-desc {
    font-size: 13px;
    color: var(--bp-gray-600);
    margin: 0;
    line-height: 1.5;
}

.bp-toggle-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px;
    border: 1px solid var(--bp-gray-300);
    border-radius: var(--bp-border-radius);
    background-color: var(--bp-gray-100);
    transition: var(--bp-transition);
    -webkit-transition: var(--bp-transition);
    -moz-transition: var(--bp-transition);
    -ms-transition: var(--bp-transition);
    -o-transition: var(--bp-transition);
}

[data-theme="dark"] .bp-toggle-card {
    background-color: var(--bp-gray-200);
    border-color: var(--bp-gray-400);
}

.bp-toggle-card:hover {
    border-color: var(--bp-primary-light);
}

.bp-toggle-card-icon {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    flex-shrink: 0;
    -webkit-border-radius: 8px;
    -moz-border-radius: 8px;
    -ms-border-radius: 8px;
    -o-border-radius: 8px;
}

.bp-toggle-card-body {
    flex: 1;
    min-width: 0;
}

.bp-payment-icon {
    width: 34px;
    height: 34px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    flex-shrink: 0;
}

.bp-logo-upload-box {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px;
    border: 2px dashed var(--bp-gray-300);
    border-radius: var(--bp-border-radius);
    background-color: var(--bp-gray-100);
}

[data-theme="dark"] .bp-logo-upload-box {
    background-color: var(--bp-gray-200);
    border-color: var(--bp-gray-400);
}

.bp-logo-preview {
    width: 70px;
    height: 70px;
    border-radius: 8px;
    background-color: var(--bp-gray-200);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    color: var(--bp-gray-400);
    flex-shrink: 0;
    border: 1px solid var(--bp-gray-300);
    padding: 5px;
}

img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.bp-input-addon {
    height: 38px;
    background-color: var(--bp-gray-100);
    border: 1px solid var(--bp-gray-300);
    border-right: none;
    border-radius: 6px 0 0 6px;
    padding: 0 10px;
    font-size: 13px;
    font-weight: 600;
    color: var(--bp-gray-600);
    display: flex;
    align-items: center;
}

[data-theme="dark"] .bp-input-addon {
    background-color: var(--bp-gray-300);
    border-color: var(--bp-gray-400);
}

.bp-input-addon+.bp-form-control {
    border-radius: 0 6px 6px 0;
}

.bp-courier-card {
    border: 1px solid var(--bp-gray-300);
    border-radius: var(--bp-border-radius);
    overflow: hidden;
    transition: var(--bp-transition);
    -webkit-transition: var(--bp-transition);
    -moz-transition: var(--bp-transition);
    -ms-transition: var(--bp-transition);
    -o-transition: var(--bp-transition);
}

[data-theme="dark"] .bp-courier-card {
    border-color: var(--bp-border);
}

.bp-courier-card:hover {
    border-color: var(--bp-primary-light);
    box-shadow: var(--bp-shadow-sm);
}

.bp-courier-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    background-color: var(--bp-gray-100);
    border-bottom: 1px solid var(--bp-gray-300);
}

[data-theme="dark"] .bp-courier-card-header {
    background-color: var(--bp-row-hover);
    border-bottom-color: var(--bp-border);
}

.bp-courier-card-body {
    padding: 16px;
    background-color: #fff;
}

[data-theme="dark"] .bp-courier-card-body {
    background-color: var(--bp-surface);
}

.bp-courier-logo {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    background-color: color-mix(in srgb, var(--bp-primary) 10%, transparent);
    color: var(--bp-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
}

.bp-product-gallery {
    border: 1px solid var(--bp-gray-300);
    border-radius: var(--bp-border-radius);
    overflow: hidden;
}

.pro_view_card {
    border-radius: 8px;
    -webkit-border-radius: 8px;
    -moz-border-radius: 8px;
    -ms-border-radius: 8px;
    -o-border-radius: 8px;
    overflow: hidden;
}

.bp-product-main-img img {
    display: block;
    width: 100%;
    max-width: 100%;
    height: auto;
    max-height: 420px;
    object-fit: contain;
}

.bp-product-thumb img {
    display: block;
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
}

.bp-product-thumbs {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding: 10px;
    border-top: 1px solid var(--bp-gray-300);
    background-color: var(--bp-gray-100);
}

.bp-product-thumb {
    width: 56px;
    border: 2px solid transparent;
    cursor: pointer;
    overflow: hidden;
    transition: var(--bp-transition);
    -webkit-transition: var(--bp-transition);
    -moz-transition: var(--bp-transition);
    -ms-transition: var(--bp-transition);
    -o-transition: var(--bp-transition);
    border-radius: 6px;
    -webkit-border-radius: 6px;
    -moz-border-radius: 6px;
    -ms-border-radius: 6px;
    -o-border-radius: 6px;
}

.bp-product-thumb.active,
.bp-product-thumb:hover {
    border-color: var(--bp-primary);
}

.bp-info-row {
    display: flex;
    align-items: flex-start;
    padding: 10px 0;
    border-bottom: 1px solid var(--bp-gray-200);
    font-size: 13px;
}

[data-theme="dark"] .bp-info-row {
    border-bottom-color: var(--bp-border);
}

.bp-info-row:last-child {
    border-bottom: none;
}

.bp-info-label {
    width: 140px;
    font-weight: 600;
    color: var(--bp-gray-600);
    flex-shrink: 0;
}

.bp-info-value {
    flex: 1;
    color: var(--bp-dark);
    font-weight: 500;
}

.bp-price-card {
    border: 1px solid var(--bp-gray-300);
    border-radius: var(--bp-border-radius);
    padding: 16px;
    text-align: center;
    transition: var(--bp-transition);
    -webkit-transition: var(--bp-transition);
    -moz-transition: var(--bp-transition);
    -ms-transition: var(--bp-transition);
    -o-transition: var(--bp-transition);
}

[data-theme="dark"] .bp-price-card {
    border-color: var(--bp-border);
}

.bp-price-card-label {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    color: var(--bp-gray-500);
    margin-bottom: 4px;
}

.bp-price-card-value {
    font-size: 20px;
    font-weight: 800;
    color: var(--bp-dark);
}

.bp-price-card-sub {
    font-size: 11px;
    color: var(--bp-gray-500);
    margin-top: 2px;
}

.bp-stock-branch-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid var(--bp-gray-200);
    font-size: 13px;
}

[data-theme="dark"] .bp-stock-branch-row {
    border-bottom-color: var(--bp-border);
}

.bp-stock-branch-row:last-child {
    border-bottom: none;
}

.bp-invoice-hero {
    background-color: var(--bp-primary);
    border-radius: var(--bp-border-radius);
    padding: 24px;
    color: #fff;
    margin-bottom: 20px;
}

.bp-invoice-hero .inv-number {
    font-size: 26px;
    font-weight: 800;
    letter-spacing: -0.5px;
}

.bp-invoice-hero .inv-meta {
    font-size: 13px;
    opacity: 0.8;
    margin-top: 4px;
}

.bp-invoice-hero-stat {
    text-align: right;
}

.bp-invoice-hero-stat .stat-label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    opacity: 0.7;
    font-weight: 700;
}

.bp-invoice-hero-stat .stat-value {
    font-size: 28px;
    font-weight: 800;
    line-height: 1.1;
}

.bp-invoice-hero-stat .stat-sub {
    font-size: 12px;
    opacity: 0.75;
    margin-top: 2px;
}

.bp-timeline {
    position: relative;
    padding-left: 28px;
}

.bp-timeline::before {
    content: '';
    position: absolute;
    left: 10px;
    top: 4px;
    bottom: 4px;
    width: 2px;
    background-color: var(--bp-gray-300);
}

[data-theme="dark"] .bp-timeline::before {
    background-color: var(--bp-border);
}

.bp-timeline-item {
    position: relative;
    margin-bottom: 20px;
}

.bp-timeline-item:last-child {
    margin-bottom: 0;
}

.bp-timeline-dot {
    position: absolute;
    left: -22px;
    top: 3px;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    border: 2px solid #fff;
    box-shadow: 0 0 0 2px var(--bp-gray-300);
}

[data-theme="dark"] .bp-timeline-dot {
    border-color: var(--bp-gray-200);
}

.bp-timeline-dot.success {
    background-color: var(--bp-success);
    box-shadow: 0 0 0 2px color-mix(in srgb, var(--bp-success) 30%, transparent);
}

.bp-timeline-dot.primary {
    background-color: var(--bp-primary);
    box-shadow: 0 0 0 2px color-mix(in srgb, var(--bp-primary) 30%, transparent);
}

.bp-timeline-dot.warning {
    background-color: var(--bp-warning);
    box-shadow: 0 0 0 2px color-mix(in srgb, var(--bp-warning) 30%, transparent);
}

.bp-timeline-dot.info {
    background-color: var(--bp-info);
    box-shadow: 0 0 0 2px color-mix(in srgb, var(--bp-primary) 30%, transparent);
}

.bp-timeline-title {
    font-size: 13px;
    font-weight: 700;
    color: var(--bp-dark);
}

.bp-timeline-desc {
    font-size: 12px;
    color: var(--bp-gray-600);
    margin-top: 2px;
}

.bp-timeline-time {
    font-size: 11px;
    color: var(--bp-gray-500);
    margin-top: 2px;
}

.bp-tracking-steps {
    display: flex;
    align-items: flex-start;
    position: relative;
    padding: 8px 0;
}

.bp-tracking-step {
    flex: 1;
    text-align: center;
    position: relative;
}

.bp-tracking-step::before {
    content: '';
    position: absolute;
    top: 18px;
    left: 50%;
    right: -50%;
    height: 2px;
    background-color: var(--bp-gray-300);
    z-index: 0;
}

.bp-tracking-step:last-child::before {
    display: none;
}

.bp-tracking-step.done::before {
    background-color: var(--bp-success);
}

.bp-tracking-dot {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background-color: var(--bp-gray-200);
    border: 2px solid var(--bp-gray-300);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    color: var(--bp-gray-500);
    margin: 0 auto 6px;
    position: relative;
    z-index: 1;
    transition: var(--bp-transition);
    -webkit-transition: var(--bp-transition);
    -moz-transition: var(--bp-transition);
    -ms-transition: var(--bp-transition);
    -o-transition: var(--bp-transition);
}

.bp-tracking-step.done .bp-tracking-dot {
    background-color: var(--bp-success);
    border-color: var(--bp-success);
    color: #fff;
}

.bp-tracking-step.active .bp-tracking-dot {
    background-color: var(--bp-primary);
    border-color: var(--bp-primary);
    color: #fff;
    box-shadow: 0 0 0 4px color-mix(in srgb, var(--bp-primary) 15%, transparent);
}

.bp-tracking-label {
    font-size: 11px;
    font-weight: 600;
    color: var(--bp-gray-600);
}

.bp-tracking-step.done .bp-tracking-label,
.bp-tracking-step.active .bp-tracking-label {
    color: var(--bp-dark);
    font-weight: 700;
}

.bp-tracking-date {
    font-size: 10px;
    color: var(--bp-gray-500);
    margin-top: 2px;
}

.bp-image-dropzone {
    border: 2px dashed var(--bp-gray-300);
    border-radius: var(--bp-border-radius);
    padding: 28px 16px;
    text-align: center;
    background-color: var(--bp-gray-100);
    cursor: pointer;
    transition: var(--bp-transition);
    -webkit-transition: var(--bp-transition);
    -moz-transition: var(--bp-transition);
    -ms-transition: var(--bp-transition);
    -o-transition: var(--bp-transition);
}

[data-theme="dark"] .bp-image-dropzone {
    background-color: var(--bp-gray-200);
    border-color: var(--bp-gray-400);
}

.bp-image-dropzone:hover,
.bp-image-dropzone.drag-over {
    border-color: var(--bp-primary-light);
    background-color: color-mix(in srgb, var(--bp-primary) 4%, transparent);
}

.bp-image-thumbs {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.bp-image-thumb {
    width: 80px;
    height: 80px;
    border-radius: 6px;
    border: 2px solid var(--bp-gray-300);
    overflow: hidden;
    position: relative;
    transition: var(--bp-transition);
    -webkit-transition: var(--bp-transition);
    -moz-transition: var(--bp-transition);
    -ms-transition: var(--bp-transition);
    -o-transition: var(--bp-transition);
}

.bp-gallery-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    counter-reset: bp-gimg;
}

.bp-gallery-item {
    width: 96px;
    height: 96px;
    border-radius: 6px;
    border: 2px solid var(--bp-gray-300);
    overflow: hidden;
    position: relative;
    cursor: grab;
    background-color: var(--bp-gray-100);
    counter-increment: bp-gimg;
}

.bp-gallery-item:active {
    cursor: grabbing;
}

.bp-gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    pointer-events: none;
}

.bp-gallery-item::after {
    content: counter(bp-gimg);
    position: absolute;
    left: 0;
    bottom: 0;
    min-width: 18px;
    text-align: center;
    background-color: rgba(0, 0, 0, .6);
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    padding: 1px 5px;
    border-top-right-radius: 6px;
}

.bp-gallery-item:first-child {
    border-color: var(--bp-primary);
}

.bp-gallery-remove {
    position: absolute;
    top: 3px;
    right: 3px;
    width: 20px;
    height: 20px;
    border: none;
    border-radius: 50%;
    background-color: color-mix(in srgb, var(--bp-danger) 92%, transparent);
    color: #fff;
    font-size: 11px;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    transition: opacity .15s;
    -webkit-transition: opacity .15s;
    -moz-transition: opacity .15s;
    -ms-transition: opacity .15s;
    -o-transition: opacity .15s;
}

.bp-gallery-item:hover .bp-gallery-remove,
.bp-gallery-remove:focus {
    opacity: 1;
}

.bp-gallery-remove:hover {
    background-color: var(--bp-danger);
}

.bp-gallery-ghost {
    opacity: .4;
}

[data-theme="dark"] .bp-gallery-item {
    background-color: var(--bp-gray-200);
}

.bp-gallery-dropzone .bp-gallery-grid {
    justify-content: center;
}

.bp-gallery-dropzone.has-images .bp-gallery-grid {
    margin-bottom: 14px;
}

.bp-gallery-dropzone.has-images .bp-gallery-prompt-icon,
.bp-gallery-dropzone.has-images .bp-gallery-prompt-hint,
.bp-gallery-dropzone.has-images .bp-gallery-prompt-btn {
    display: none;
}

.bp-gallery-dropzone.has-images .bp-gallery-prompt-title {
    font-weight: 600;
    font-size: 12px;
    color: var(--bp-gray-600);
    margin-bottom: 0;
}

.bp-image-thumb-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--bp-gray-100);
    color: var(--bp-gray-400);
    font-size: 18px;
    cursor: pointer;
    border-style: dashed;
}

[data-theme="dark"] .bp-image-thumb-placeholder {
    background-color: var(--bp-gray-200);
}

.bp-image-thumb-primary {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--bp-primary);
    color: #fff;
    font-size: 9px;
    font-weight: 700;
    text-align: center;
    padding: 1px 0;
    text-transform: uppercase;
}

.bp-image-thumb-placeholder:hover {
    border-color: var(--bp-primary);
    color: var(--bp-primary);
}

.bp-image-thumb-removable .bp-image-thumb-remove {
    position: absolute;
    top: 2px;
    right: 2px;
    width: 18px;
    height: 18px;
    padding: 0;
    border-radius: 50%;
    border: none;
    background: color-mix(in srgb, var(--bp-danger) 95%, transparent);
    color: #fff;
    font-size: 10px;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    transition: var(--bp-transition);
    -webkit-transition: var(--bp-transition);
    -moz-transition: var(--bp-transition);
    -ms-transition: var(--bp-transition);
    -o-transition: var(--bp-transition);
}

.bp-image-thumb-removable:hover .bp-image-thumb-remove,
.bp-image-thumb-removable .bp-image-thumb-remove:focus {
    opacity: 1;
}

.bp-image-thumb-removable .bp-image-thumb-remove:hover {
    background: var(--bp-danger);
}

.bp-image-thumb-existing .bp-image-thumb-actions {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: flex-start;
    justify-content: flex-end;
    padding: 2px;
    gap: 2px;
    pointer-events: none;
}

.bp-image-thumb-existing .bp-image-remove-label {
    pointer-events: auto;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: color-mix(in srgb, var(--bp-danger) 95%, transparent);
    color: #fff;
    font-size: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    transition: var(--bp-transition);
    -webkit-transition: var(--bp-transition);
    -moz-transition: var(--bp-transition);
    -ms-transition: var(--bp-transition);
    -o-transition: var(--bp-transition);
}

.bp-image-thumb-existing:hover .bp-image-remove-label,
.bp-image-thumb-existing.bp-image-marked-remove .bp-image-remove-label {
    opacity: 1;
}

.bp-image-thumb-existing .bp-image-remove-label:hover {
    background: var(--bp-danger);
}

.bp-image-thumb-existing.bp-image-marked-remove {
    opacity: 0.4;
    outline: 2px solid var(--bp-danger);
}

.bp-image-thumb-existing.bp-image-marked-remove img {
    filter: grayscale(1);
}

.bp-badge-img-primary {
    position: absolute;
    bottom: 2px;
    left: 2px;
    font-size: 8px;
    padding: 1px 4px;
    pointer-events: auto;
}

.bp-barcode-preview {
    padding: 12px;
    border: 1px solid var(--bp-gray-200);
    border-radius: var(--bp-border-radius);
    background-color: var(--bp-gray-100);
}

[data-theme="dark"] .bp-barcode-preview {
    background-color: var(--bp-gray-200);
    border-color: var(--bp-gray-400);
}

.bp-profit-preview {
    padding: 12px;
    border: 1px solid var(--bp-gray-200);
    border-radius: var(--bp-border-radius);
    background-color: color-mix(in srgb, var(--bp-success) 3%, transparent);
}

[data-theme="dark"] .bp-profit-preview {
    background-color: color-mix(in srgb, var(--bp-success) 6%, transparent);
    border-color: color-mix(in srgb, var(--bp-success) 15%, transparent);
}

.bp-product-type-toggle {
    display: flex;
    gap: 12px;
}

@media (max-width: 576px) {
    .bp-product-type-toggle {
        flex-direction: column;
    }
}

.bp-type-btn {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    border: 2px solid var(--bp-border);
    border-radius: 10px;
    background: var(--bp-surface);
    cursor: pointer;
    text-align: left;
    transition: border-color .2s, background .2s;
    -webkit-transition: border-color .2s, background .2s;
    -moz-transition: border-color .2s, background .2s;
    -ms-transition: border-color .2s, background .2s;
    -o-transition: border-color .2s, background .2s;
}

.bp-type-btn:hover {
    border-color: var(--bp-primary);
}

.bp-type-btn.active {
    border-color: var(--bp-primary);
    background: color-mix(in srgb, var(--bp-primary) 5%, transparent);
}

.bp-type-btn-icon {
    width: 42px;
    height: 42px;
    border-radius: 9px;
    background: color-mix(in srgb, var(--bp-primary) 10%, transparent);
    color: var(--bp-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    flex-shrink: 0;
    transition: background .2s, color .2s;
    -webkit-transition: background .2s, color .2s;
    -moz-transition: background .2s, color .2s;
    -ms-transition: background .2s, color .2s;
    -o-transition: background .2s, color .2s;
}

.bp-type-btn.active .bp-type-btn-icon {
    background: var(--bp-primary);
    color: #fff;
}

.bp-type-btn-text {
    flex: 1;
}

.bp-type-btn-check {
    color: var(--bp-primary);
    opacity: 0;
    font-size: 20px;
    transition: opacity .2s;
    -webkit-transition: opacity .2s;
    -moz-transition: opacity .2s;
    -ms-transition: opacity .2s;
    -o-transition: opacity .2s;
}

.bp-type-btn.active .bp-type-btn-check {
    opacity: 1;
}

[data-theme="dark"] .bp-type-btn.active {
    background: color-mix(in srgb, var(--bp-primary) 15%, transparent);
}

.bp-info-alert {
    padding: 12px 16px;
    border-radius: 8px;
    background: color-mix(in srgb, var(--bp-primary) 6%, transparent);
    border: 1.5px solid color-mix(in srgb, var(--bp-primary) 20%, transparent);
    color: var(--bp-dark);
    font-size: 13px;
}

[data-theme="dark"] .bp-info-alert {
    background: color-mix(in srgb, var(--bp-primary) 14%, transparent);
    border-color: color-mix(in srgb, var(--bp-primary) 35%, transparent);
}

.bp-branch-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    display: inline-block;
    flex-shrink: 0;
}

.bp-attr-card {
    border: 1.5px solid var(--bp-border);
    border-radius: 10px;
    overflow: hidden;
}

.bp-attr-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    background: var(--bp-sidebar-bg);
    border-bottom: 1.5px solid var(--bp-border);
}

[data-theme="dark"] .bp-attr-header {
    background: rgba(0, 0, 0, .18);
}

.bp-attr-body {
    padding: 12px 14px;
}

.bp-attr-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
    min-height: 36px;
}

.bp-attr-chip {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    padding: 4px 8px;
    border-radius: 20px;
    background: color-mix(in srgb, var(--bp-primary) 8%, transparent);
    color: var(--bp-primary);
    font-size: 12px;
    font-weight: 600;
    border: 1.5px solid color-mix(in srgb, var(--bp-primary) 20%, transparent);
    cursor: default;
    user-select: none;
}

[data-theme="dark"] .bp-attr-chip {
    background: color-mix(in srgb, var(--bp-primary) 22%, transparent);
    border-color: color-mix(in srgb, var(--bp-primary) 40%, transparent);
}

.bp-attr-chip .chip-del {
    background: none;
    border: none;
    padding: 0;
    margin-left: 2px;
    color: var(--bp-danger);
    cursor: pointer;
    line-height: 1;
    font-size: 15px;
    opacity: .7;
    transition: opacity .15s;
    -webkit-transition: opacity .15s;
    -moz-transition: opacity .15s;
    -ms-transition: opacity .15s;
    -o-transition: opacity .15s;
}

.bp-attr-chip .chip-del:hover {
    opacity: 1;
}

.bp-attr-chip-color-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    display: inline-block;
    flex-shrink: 0;
}

.bp-attr-value-toggle {
    display: inline-block;
    cursor: pointer;
}

.bp-attr-value-toggle input {
    display: none;
}

.bp-attr-chip-selectable {
    cursor: pointer;
    user-select: none;
    transition: all 0.15s;
    -webkit-transition: all 0.15s;
    -moz-transition: all 0.15s;
    -ms-transition: all 0.15s;
    -o-transition: all 0.15s;
}

.bp-attr-chip-selectable:hover {
    border-color: var(--bp-primary-light);
}

.bp-attr-value-toggle input:checked+.bp-attr-chip-selectable {
    background-color: var(--bp-primary);
    color: #fff;
    border-color: var(--bp-primary);
}

.bp-attr-value-toggle input:checked+.bp-attr-chip-selectable .bp-attr-chip-color-dot {
    border: 2px solid #fff;
}

[data-theme="dark"] .bp-attr-value-toggle input:checked+.bp-attr-chip-selectable {
    background-color: var(--bp-primary-light);
    border-color: var(--bp-primary-light);
}

.bp-variant-toggle {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    line-height: 1;
    cursor: pointer;
    user-select: none;
    transition: all 0.15s;
    -webkit-transition: all 0.15s;
    -moz-transition: all 0.15s;
    -ms-transition: all 0.15s;
    -o-transition: all 0.15s;
}

.bp-variant-toggle-on {
    background-color: var(--bp-primary);
    color: #fff;
    border: 1.5px solid var(--bp-primary);
}

.bp-variant-toggle-on:hover {
    background-color: var(--bp-primary-dark);
    border-color: var(--bp-primary-dark);
}

.bp-variant-toggle-on .bp-attr-chip-color-dot {
    border: 2px solid #fff;
}

.bp-variant-toggle-off {
    background: transparent;
    color: var(--bp-gray-600);
    border: 1.5px dashed var(--bp-gray-400);
}

.bp-variant-toggle-off:hover {
    color: var(--bp-primary-light);
    border-color: var(--bp-primary-light);
    border-style: solid;
}

.bp-variant-toggle-icon {
    font-size: 10px;
    opacity: .85;
}

[data-theme="dark"] .bp-variant-toggle-on {
    background-color: var(--bp-primary-light);
    border-color: var(--bp-primary-light);
}

.bp-attr-add-input {
    border: 1.5px dashed var(--bp-border);
    border-radius: 20px;
    padding: 4px 12px;
    font-size: 12px;
    font-family: inherit;
    outline: none;
    background: transparent;
    color: var(--bp-dark);
    width: 190px;
    transition: border-color .2s;
    -webkit-transition: border-color .2s;
    -moz-transition: border-color .2s;
    -ms-transition: border-color .2s;
    -o-transition: border-color .2s;
}

.bp-attr-add-input:focus {
    border-color: var(--bp-primary);
}

.bp-attr-add-input::placeholder {
    color: var(--bp-gray-400);
}

.bp-color-presets {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid var(--bp-border);
}

.bp-color-swatch-row {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.bp-color-dot-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
}

.bp-color-dot {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    cursor: pointer;
    border: 2px solid transparent;
    padding: 0;
    transition: transform .15s, border-color .15s, box-shadow .15s;
    -webkit-transition: transform .15s, border-color .15s, box-shadow .15s;
    -moz-transition: transform .15s, border-color .15s, box-shadow .15s;
    -ms-transition: transform .15s, border-color .15s, box-shadow .15s;
    -o-transition: transform .15s, border-color .15s, box-shadow .15s;
}

.bp-color-dot:hover {
    box-shadow: 0 2px 6px rgba(0, 0, 0, .25);
    transform: scale(1.25);
    -webkit-transform: scale(1.25);
    -moz-transform: scale(1.25);
    -ms-transform: scale(1.25);
    -o-transform: scale(1.25);
}

.bp-color-dot-label {
    font-size: 9px;
    color: var(--bp-gray-500);
    white-space: nowrap;
}

.bp-variation-table {
    min-width: 1060px;
}

.bp-variation-row {
    transition: opacity .2s;
    -webkit-transition: opacity .2s;
    -moz-transition: opacity .2s;
    -ms-transition: opacity .2s;
    -o-transition: opacity .2s;
}

.bp-variation-row-inactive {
    opacity: .55;
}

/* Inactive variant row inside the purchase variant picker */
#poVariantRows tr.pv-inactive td {
    background: #FBEDEC;
}

[data-theme="dark"] #poVariantRows tr.pv-inactive td {
    background: color-mix(in srgb, var(--bp-danger) 12%, transparent);
}

.bp-detail-tabs .nav-link {
    color: var(--bp-text-muted, var(--bp-gray-600));
    font-weight: 600;
    border: none;
    border-bottom: 2px solid transparent;
    background: transparent;
}

.bp-detail-tabs .nav-link:hover {
    color: var(--bp-primary, var(--bp-primary));
}

.bp-detail-tabs .nav-link.active {
    color: var(--bp-primary, var(--bp-primary));
    background: transparent;
    border-bottom-color: var(--bp-primary, var(--bp-primary));
}

[data-theme="dark"] .bp-detail-tabs .nav-link {
    color: var(--bp-text-muted-dark, var(--bp-gray-600));
}

[data-theme="dark"] .bp-detail-tabs .nav-link:hover,
[data-theme="dark"] .bp-detail-tabs .nav-link.active {
    color: var(--bp-primary-light, var(--bp-primary-light));
    border-bottom-color: var(--bp-primary-light, var(--bp-primary-light));
}

.bp-variant-combo {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}

.bp-variant-chip {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    background: color-mix(in srgb, var(--bp-primary) 8%, transparent);
    color: var(--bp-primary);
    border: 1px solid color-mix(in srgb, var(--bp-primary) 20%, transparent);
    white-space: nowrap;
}

[data-theme="dark"] .bp-variant-chip {
    background: color-mix(in srgb, var(--bp-primary) 20%, transparent);
    border-color: color-mix(in srgb, var(--bp-primary) 40%, transparent);
}

.bp-variant-chip-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
    flex-shrink: 0;
}

.bp-fc-sm {
    padding: 4px 7px;
    font-size: 12px;
    height: auto;
    min-width: 0;
}

#variationMatrixTable tfoot tr,
#variantStockTable tfoot tr {
    background: var(--bp-sidebar-bg);
}

[data-theme="dark"] #variationMatrixTable tfoot tr,
[data-theme="dark"] #variantStockTable tfoot tr {
    background: rgba(0, 0, 0, .15);
}

.bp-vstock-table {
    min-width: 720px;
}

.bp-vstock-row {
    transition: opacity .2s;
    -webkit-transition: opacity .2s;
    -moz-transition: opacity .2s;
    -ms-transition: opacity .2s;
    -o-transition: opacity .2s;
}

.bp-badge-muted {
    background: var(--bp-gray-200);
    color: var(--bp-gray-600);
}

[data-theme="dark"] .bp-badge-muted {
    background: rgba(255, 255, 255, .08);
    color: var(--bp-gray-600);
}

.bp-stock-table {
    min-width: 800px;
}

.bp-auth-wrapper {
    display: flex;
    min-height: 100vh;
}

.bp-auth-left {
    flex: 0 0 420px;
    /* D3 exception: the auth brand panel shares the AI-banner gradient */
    background: linear-gradient(115deg, #0B2E73 0%, #1450B8 55%, #1A6FEA 100%);
    color: #fff;
    display: flex;
    flex-direction: column;
    padding: 44px 44px 36px;
    position: relative;
    overflow: hidden;
}

[data-theme="dark"] .bp-auth-left {
    background: linear-gradient(115deg, #0B2E73 0%, #1450B8 55%, #1A6FEA 100%);
}

.bp-auth-left::before {
    content: '';
    position: absolute;
    top: -90px;
    right: -90px;
    width: 300px;
    height: 300px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.05);
    pointer-events: none;
}

.bp-auth-left::after {
    content: '';
    position: absolute;
    bottom: -70px;
    left: -70px;
    width: 240px;
    height: 240px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.05);
    pointer-events: none;
}

.bp-auth-logo {
    font-size: 24px;
    font-weight: 800;
    color: #fff;
    letter-spacing: -0.5px;
    position: relative;
    z-index: 1;
}

.bp-auth-logo .logo-accent {
    color: var(--bp-accent);
}

.bp-auth-logo-tagline {
    font-size: 11px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.5);
    margin-top: 3px;
    letter-spacing: 0.3px;
}

.bp-auth-left-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 40px 0;
    position: relative;
    z-index: 1;
}

.bp-auth-tagline {
    font-size: 24px;
    font-weight: 800;
    color: #fff;
    line-height: 1.3;
    margin-bottom: 10px;
}

.bp-auth-tagline-sub {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.6);
    line-height: 1.65;
    margin-bottom: 36px;
}

.bp-auth-feat-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.bp-auth-feat-list li {
    display: flex;
    align-items: center;
    gap: 14px;
}

.bp-auth-feat-icon {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    background-color: rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 15px;
    color: var(--bp-accent);
}

.bp-auth-feat-text strong {
    display: block;
    font-size: 13px;
    font-weight: 700;
    color: #fff;
    line-height: 1;
    margin-bottom: 2px;
}

.bp-auth-feat-text span {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.5);
}

.bp-auth-left-footer {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.35);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 18px;
    position: relative;
    z-index: 1;
}

.bp-auth-right {
    flex: 1;
    background-color: var(--bp-bg);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 48px 40px;
    position: relative;
}

[data-theme="dark"] .bp-auth-right {
    background-color: var(--bp-bg);
}

.bp-auth-form-box {
    width: 100%;
    max-width: 400px;
}

.bp-auth-theme-btn {
    position: absolute;
    top: 18px;
    right: 20px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 1.5px solid var(--bp-gray-300);
    background-color: #fff;
    color: var(--bp-gray-600);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 14px;
    transition: var(--bp-transition);
    -webkit-transition: var(--bp-transition);
    -moz-transition: var(--bp-transition);
    -ms-transition: var(--bp-transition);
    -o-transition: var(--bp-transition);
}

.bp-auth-theme-btn:hover {
    border-color: var(--bp-primary);
    color: var(--bp-primary);
}

[data-theme="dark"] .bp-auth-theme-btn {
    background-color: #1e252f;
    border-color: var(--bp-border);
    color: var(--bp-gray-600);
}

.bp-auth-form-header {
    margin-bottom: 28px;
}

.bp-auth-form-title {
    font-size: 22px;
    font-weight: 800;
    color: var(--bp-dark);
    margin-bottom: 5px;
    line-height: 1.2;
}

[data-theme="dark"] .bp-auth-form-title {
    color: #e4e8ef;
}

.bp-auth-form-sub {
    font-size: 13px;
    color: var(--bp-gray-600);
    line-height: 1.55;
}

.bp-auth-back {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-size: 13px;
    font-weight: 600;
    color: var(--bp-gray-600);
    margin-bottom: 22px;
    text-decoration: none;
    transition: color 0.2s;
    -webkit-transition: color 0.2s;
    -moz-transition: color 0.2s;
    -ms-transition: color 0.2s;
    -o-transition: color 0.2s;
}

.bp-auth-back:hover {
    color: var(--bp-primary);
}

[data-theme="dark"] .bp-auth-back {
    color: var(--bp-gray-600);
}

.bp-af {
    margin-bottom: 18px;
}

.bp-af label {
    display: block;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--bp-gray-700);
    margin-bottom: 7px;
}

[data-theme="dark"] .bp-af label {
    color: var(--bp-gray-600);
}

.bp-af-wrap {
    position: relative;
}

.bp-af-wrap .af-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    color: var(--bp-gray-400);
    font-size: 13px;
    pointer-events: none;
    transform: translateY(-50%);
    -webkit-transform: translateY(-50%);
    -moz-transform: translateY(-50%);
    -ms-transform: translateY(-50%);
    -o-transform: translateY(-50%);
}

.bp-af-wrap input {
    width: 100%;
    height: 46px;
    padding: 0 44px 0 40px;
    font-size: 14px;
    font-family: var(--bp-font);
    font-weight: 500;
    border: 1.5px solid var(--bp-gray-300);
    border-radius: 8px;
    background-color: #fff;
    color: var(--bp-dark);
    outline: none;
    transition: var(--bp-transition);
    -webkit-transition: var(--bp-transition);
    -moz-transition: var(--bp-transition);
    -ms-transition: var(--bp-transition);
    -o-transition: var(--bp-transition);
}

.bp-af-wrap input::placeholder {
    color: var(--bp-gray-400);
    font-weight: 400;
}

.bp-af-wrap input:focus {
    border-color: var(--bp-primary);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--bp-primary) 10%, transparent);
}

[data-theme="dark"] .bp-af-wrap input {
    background-color: #1c2330;
    border-color: var(--bp-border);
    color: #d0d8e4;
}

[data-theme="dark"] .bp-af-wrap input::placeholder {
    color: #4a5568;
}

[data-theme="dark"] .bp-af-wrap input:focus {
    border-color: var(--bp-primary-light);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--bp-primary) 12%, transparent);
}

.bp-af-wrap .af-eye {
    position: absolute;
    right: 13px;
    top: 50%;
    background: none;
    border: none;
    color: var(--bp-gray-400);
    cursor: pointer;
    padding: 0;
    font-size: 13px;
    transform: translateY(-50%);
    -webkit-transform: translateY(-50%);
    -moz-transform: translateY(-50%);
    -ms-transform: translateY(-50%);
    -o-transform: translateY(-50%);
    transition: color 0.2s;
    -webkit-transition: color 0.2s;
    -moz-transition: color 0.2s;
    -ms-transition: color 0.2s;
    -o-transition: color 0.2s;
}

.bp-af-wrap .af-eye:hover {
    color: var(--bp-primary);
}

.bp-auth-meta-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 22px;
}

.bp-auth-check {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 500;
    color: var(--bp-gray-700);
    cursor: pointer;
    user-select: none;
}

[data-theme="dark"] .bp-auth-check {
    color: var(--bp-gray-600);
}

.bp-auth-check input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: var(--bp-primary);
    cursor: pointer;
}

.bp-auth-link {
    font-size: 13px;
    font-weight: 600;
    color: var(--bp-primary-light);
    text-decoration: none;
    transition: color 0.2s;
    -webkit-transition: color 0.2s;
    -moz-transition: color 0.2s;
    -ms-transition: color 0.2s;
    -o-transition: color 0.2s;
}

.bp-auth-link:hover {
    color: var(--bp-primary);
}

.bp-auth-submit {
    width: 100%;
    height: 44px;
    font-size: 14px;
    font-weight: 700;
    font-family: var(--bp-font);
    background-color: var(--bp-primary-solid);
    color: #fff;
    border: none;
    border-radius: var(--bp-radius-md);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: background-color 0.2s;
}

.bp-auth-submit:hover {
    background-color: var(--bp-primary-dark);
}

.bp-auth-submit:disabled {
    opacity: 0.65;
    cursor: not-allowed;
}

.bp-auth-alert {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 11px 14px;
    border-radius: var(--bp-radius-md);
    font-size: 13px;
    margin-bottom: 20px;
    line-height: 1.5;
}

.bp-auth-alert-error {
    background-color: var(--bp-danger-bg);
    color: var(--bp-danger-ink);
    border: 1px solid color-mix(in srgb, var(--bp-danger) 30%, transparent);
}

.bp-auth-alert-success {
    background-color: var(--bp-success-bg);
    color: var(--bp-success-ink);
    border: 1px solid color-mix(in srgb, var(--bp-success) 30%, transparent);
}

.bp-auth-version {
    text-align: center;
    font-size: 11px;
    color: var(--bp-gray-400);
    margin-top: 26px;
}

.bp-pw-strength {
    margin-top: 8px;
    display: none;
}

.bp-pw-strength-bar {
    height: 4px;
    border-radius: 2px;
    background-color: var(--bp-gray-200);
    overflow: hidden;
    margin-bottom: 5px;
}

[data-theme="dark"] .bp-pw-strength-bar {
    background-color: var(--bp-border);
}

.bp-pw-strength-fill {
    height: 100%;
    width: 0%;
    border-radius: 2px;
    transition: width 0.3s ease, background-color 0.3s ease;
    -webkit-transition: width 0.3s ease, background-color 0.3s ease;
    -moz-transition: width 0.3s ease, background-color 0.3s ease;
    -ms-transition: width 0.3s ease, background-color 0.3s ease;
    -o-transition: width 0.3s ease, background-color 0.3s ease;
}

.bp-pw-strength-label {
    font-size: 11px;
    font-weight: 700;
}

.bp-pw-rules {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 20px;
}

.bp-pw-rule {
    font-size: 11px;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 20px;
    background-color: var(--bp-gray-200);
    color: var(--bp-gray-600);
    display: inline-flex;
    align-items: center;
    gap: 5px;
    transition: all 0.2s;
    -webkit-transition: all 0.2s;
    -moz-transition: all 0.2s;
    -ms-transition: all 0.2s;
    -o-transition: all 0.2s;
}

[data-theme="dark"] .bp-pw-rule {
    background-color: var(--bp-border);
    color: #6c757d;
}

.bp-pw-rule.ok {
    background-color: color-mix(in srgb, var(--bp-success) 10%, transparent);
    color: var(--bp-success);
}

.bp-otp-row {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin-bottom: 22px;
}

.bp-otp-box {
    width: 54px;
    height: 58px;
    text-align: center;
    font-size: 22px;
    font-weight: 800;
    font-family: var(--bp-font);
    border: 1.5px solid var(--bp-gray-300);
    border-radius: 8px;
    background-color: #fff;
    color: var(--bp-dark);
    outline: none;
    transition: var(--bp-transition);
    -webkit-transition: var(--bp-transition);
    -moz-transition: var(--bp-transition);
    -ms-transition: var(--bp-transition);
    -o-transition: var(--bp-transition);
}

.bp-otp-box:focus {
    border-color: var(--bp-primary);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--bp-primary) 10%, transparent);
}

[data-theme="dark"] .bp-otp-box {
    background-color: #1c2330;
    border-color: var(--bp-border);
    color: #d0d8e4;
}

.bp-auth-resend {
    text-align: center;
    font-size: 13px;
    color: var(--bp-gray-600);
    margin-top: 14px;
}

.bp-auth-resend-btn {
    background: none;
    border: none;
    padding: 0;
    font-family: var(--bp-font);
    font-size: 13px;
    font-weight: 600;
    color: var(--bp-primary-light);
    cursor: pointer;
    transition: color 0.2s;
    -webkit-transition: color 0.2s;
    -moz-transition: color 0.2s;
    -ms-transition: color 0.2s;
    -o-transition: color 0.2s;
}

.bp-auth-resend-btn:hover {
    color: var(--bp-primary);
}

.bp-auth-resend-btn:disabled {
    color: var(--bp-gray-400);
    cursor: default;
}

.bp-auth-success-wrap {
    text-align: center;
    padding: 8px 0;
}

.bp-auth-success-icon {
    width: 76px;
    height: 76px;
    border-radius: 50%;
    background-color: color-mix(in srgb, var(--bp-success) 10%, transparent);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    font-size: 34px;
    color: var(--bp-success);
}

.bp-auth-sep {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 11px;
    color: var(--bp-gray-400);
    margin: 22px 0;
}

.bp-auth-sep::before,
.bp-auth-sep::after {
    content: '';
    flex: 1;
    height: 1px;
    background-color: var(--bp-gray-200);
}

[data-theme="dark"] .bp-auth-sep::before,
[data-theme="dark"] .bp-auth-sep::after {
    background-color: var(--bp-border);
}

@media (max-width: 960px) {
    .bp-auth-left {
        flex: 0 0 340px;
        padding: 36px 32px 28px;
    }
}

@media (max-width: 700px) {
    .bp-auth-wrapper {
        flex-direction: column;
    }

    .bp-auth-left {
        flex: none;
        padding: 28px 24px 24px;
    }

    .bp-auth-left-body {
        display: none;
    }

    .bp-auth-left-footer {
        display: none;
    }

    .bp-auth-logo {
        font-size: 22px;
    }

    .bp-auth-right {
        padding: 32px 20px 40px;
    }

    .bp-auth-theme-btn {
        top: 12px;
        right: 12px;
    }

    .bp-otp-box {
        width: 44px;
        height: 48px;
        font-size: 18px;
    }
}

.bp-th-checkbox {
    width: 40px;
    text-align: center;
}

.bp-sort-link {
    color: inherit;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 2px;
    cursor: pointer;
    white-space: nowrap;
}

.bp-sort-link:hover {
    color: var(--bp-primary);
}

.bp-sort-link .fa-sort,
.bp-sort-link .fa-sort-up,
.bp-sort-link .fa-sort-down {
    font-size: 10px;
    opacity: 0.5;
}

.bp-sort-link.active .fa-sort-up,
.bp-sort-link.active .fa-sort-down {
    opacity: 1;
}

.bp-table-empty {
    padding: 48px 20px;
}

/* When a table has no data rows (only the empty-state cell), clear any fixed
   per-column widths and min-widths so the header columns distribute and span
   the full table width — otherwise tables with fixed column widths (e.g. the
   sales list) leave a gap after the last column. The .bp-table-is-empty class
   is added by app.js (cross-browser, no :has() dependency); populated tables
   keep their natural layout and column sizing. */
.bp-table.bp-table-is-empty {
    table-layout: auto;
}

.bp-table.bp-table-is-empty thead th,
.bp-table.bp-table-is-empty tbody td {
    width: auto !important;
    min-width: 0 !important;
    white-space: normal;
}

.bp-empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    color: var(--bp-muted);
}

.bp-empty-state p {
    margin: 0;
    font-size: 14px;
}

.bp-bulk-actions {
    background: var(--bp-primary);
    color: #fff;
    border-bottom: 1px solid var(--bp-border);
}

.bp-bulk-actions .bp-btn {
    color: #fff;
    border-color: rgba(255, 255, 255, 0.4);
    font-size: 12px;
}

.bp-bulk-actions .bp-btn:hover {
    background: rgba(255, 255, 255, 0.15);
}

.bp-bulk-count .count {
    font-weight: 700;
}

.bp-filter-reset {
    flex-shrink: 0;
}

.bp-chart-container-lg {
    height: 320px;
}

.bp-chart-container-md {
    height: 280px;
}

.bp-chart-period-select {
    width: auto;
    height: 30px;
    font-size: 12px;
    padding: 0 8px;
}

.bp-activity-icon {
    width: 36px;
    height: 36px;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

[data-theme="dark"] .bp-sort-link:hover {
    color: var(--bp-primary-light);
}

[data-theme="dark"] .bp-sort-link.active {
    color: var(--bp-primary-light);
}

[data-theme="dark"] .bp-bulk-actions {
    background: var(--bp-primary-dark);
}

.bp-brand-logo-sm {
    width: 40px;
    height: 40px;
    border-radius: 6px;
    border: 1px solid var(--bp-border);
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bp-row-hover);
    font-size: 16px;
    overflow: hidden;
}

.bp-brand-logo-sm img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.bp-brand-logo-preview {
    width: 120px;
    height: 120px;
    border-radius: 8px;
    border: 1px solid var(--bp-border);
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bp-row-hover);
    overflow: hidden;
}

.bp-brand-logo-preview img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

[data-theme="dark"] .bp-brand-logo-sm {
    border-color: #3a3a3a;
    background: #2a2a2a;
}

[data-theme="dark"] .bp-brand-logo-preview {
    border-color: #3a3a3a;
    background: #2a2a2a;
}

.bp-color-swatch {
    display: inline-block;
    width: 20px;
    height: 20px;
    border-radius: 4px;
    border: 1px solid rgba(0, 0, 0, 0.15);
    vertical-align: middle;
    margin-right: 6px;
}

.bp-form-color {
    width: 50px;
    height: 36px;
    padding: 2px;
    cursor: pointer;
}

[data-theme="dark"] .bp-color-swatch {
    border-color: rgba(255, 255, 255, 0.2);
}

.bp-text-receipt-amount {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--bp-success);
    line-height: 1.2;
}

.bp-attachment-card {
    background: var(--bp-bg-secondary, var(--bp-row-hover));
    border: 2px dashed var(--bp-border-color, #dee2e6);
    transition: border-color 0.2s;
    -webkit-transition: border-color 0.2s;
    -moz-transition: border-color 0.2s;
    -ms-transition: border-color 0.2s;
    -o-transition: border-color 0.2s;
}

.bp-attachment-card:hover {
    border-color: var(--bp-primary-light);
}

.bp-table-row-active {
    background: color-mix(in srgb, var(--bp-primary) 5%, transparent);
}

.bp-linked-doc {
    background: var(--bp-bg-secondary, var(--bp-row-hover));
    transition: background 0.2s;
    -webkit-transition: background 0.2s;
    -moz-transition: background 0.2s;
    -ms-transition: background 0.2s;
    -o-transition: background 0.2s;
}

.bp-linked-doc:hover {
    background: color-mix(in srgb, var(--bp-primary) 8%, transparent);
}

[data-theme="dark"] .bp-text-receipt-amount {
    color: var(--bp-success);
}

[data-theme="dark"] .bp-attachment-card {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.15);
}

[data-theme="dark"] .bp-attachment-card:hover {
    border-color: var(--bp-primary-light);
}

[data-theme="dark"] .bp-table-row-active {
    background: color-mix(in srgb, var(--bp-primary) 10%, transparent);
}

[data-theme="dark"] .bp-linked-doc {
    background: rgba(255, 255, 255, 0.05);
}

[data-theme="dark"] .bp-linked-doc:hover {
    background: color-mix(in srgb, var(--bp-primary) 10%, transparent);
}

.bp-pos-page .bp-main {
    display: none;
}

.bp-pos-layout {
    display: flex;
    height: calc(100vh - var(--bp-header-height));
    margin-top: var(--bp-header-height);
    margin-left: var(--bp-sidebar-width);
    overflow: hidden;
    transition: margin-left 0.25s ease;
    -webkit-transition: margin-left 0.25s ease;
    -moz-transition: margin-left 0.25s ease;
    -ms-transition: margin-left 0.25s ease;
    -o-transition: margin-left 0.25s ease;
}

.sidebar-collapsed .bp-pos-layout {
    margin-left: var(--bp-sidebar-collapsed);
}

.bp-pos-products {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    padding: 20px;
    gap: 14px;
    background: var(--bp-gray-100);
}

.bp-pos-cart {
    width: clamp(440px, 36vw, 520px);
    min-width: clamp(440px, 36vw, 520px);
    display: flex;
    flex-direction: column;
    border-left: 2px solid var(--bp-gray-300);
    background: #fff;
}

.bp-pos-search {
    display: flex;
    align-items: center;
    gap: 12px;
    background: #fff;
    border: 2px solid var(--bp-gray-300);
    border-radius: 10px;
    padding: 12px 18px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
    transition: all 0.2s;
    -webkit-transition: all 0.2s;
    -moz-transition: all 0.2s;
    -ms-transition: all 0.2s;
    -o-transition: all 0.2s;
}

.bp-pos-search:focus-within {
    border-color: var(--bp-primary);
    box-shadow: 0 0 0 4px color-mix(in srgb, var(--bp-primary) 8%, transparent);
}

.bp-pos-search i {
    color: var(--bp-primary-light);
    font-size: 20px;
}

.bp-pos-search input {
    border: none;
    outline: none;
    flex: 1;
    font-size: 15px;
    font-weight: 600;
    background: transparent;
    color: var(--bp-dark);
}

.bp-pos-search input::placeholder {
    color: var(--bp-gray-400);
    font-weight: 400;
}

.bp-pos-search-hint {
    font-size: 10px;
    color: var(--bp-gray-400);
    border: 1px solid var(--bp-gray-300);
    padding: 2px 6px;
    border-radius: 3px;
    font-family: var(--bp-font);
    font-weight: 600;
    flex-shrink: 0;
}

.bp-pos-categories {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 4px;
}

.bp-pos-cat-btn {
    white-space: nowrap;
    padding: 7px 18px;
    border: 1.5px solid var(--bp-gray-300);
    border-radius: 20px;
    background: #fff;
    color: var(--bp-gray-700);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    -webkit-transition: all 0.2s;
    -moz-transition: all 0.2s;
    -ms-transition: all 0.2s;
    -o-transition: all 0.2s;
}

.bp-pos-cat-btn:hover {
    border-color: var(--bp-primary-light);
    color: var(--bp-primary);
    background: color-mix(in srgb, var(--bp-primary) 4%, transparent);
}

.bp-pos-cat-btn.active {
    background: var(--bp-primary);
    border-color: var(--bp-primary);
    color: #fff;
    box-shadow: 0 2px 6px color-mix(in srgb, var(--bp-primary) 25%, transparent);
}

.bp-pos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 10px;
    overflow-y: auto;
    flex: 1;
    padding-right: 4px;
    scrollbar-width: thin;
    align-content: start;
}

.bp-pos-item {
    background: #fff;
    border: 1px solid var(--bp-gray-200);
    border-radius: 10px;
    padding: 0;
    text-align: center;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: all 0.15s ease;
    -webkit-transition: all 0.15s ease;
    -moz-transition: all 0.15s ease;
    -ms-transition: all 0.15s ease;
    -o-transition: all 0.15s ease;
}

.bp-pos-item:hover {
    border-color: var(--bp-primary);
    box-shadow: 0 4px 14px color-mix(in srgb, var(--bp-primary) 12%, transparent);
    transform: translateY(-2px);
    -webkit-transform: translateY(-2px);
    -moz-transform: translateY(-2px);
    -ms-transform: translateY(-2px);
    -o-transform: translateY(-2px);
}

.bp-pos-item:active {
    transform: translateY(0);
    box-shadow: none;
    -webkit-transform: translateY(0);
    -moz-transform: translateY(0);
    -ms-transform: translateY(0);
    -o-transform: translateY(0);
}

.bp-pos-item.out-of-stock {
    opacity: 0.45;
    pointer-events: none;
}

.bp-pos-item-img {
    width: 100%;
    height: 100px;
    background: var(--bp-row-hover);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    color: var(--bp-gray-400);
    overflow: hidden;
    flex-shrink: 0;
}

.bp-pos-item-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.bp-pos-item-img-sm {
    width: 40px;
    height: 40px;
    border-radius: 6px;
    font-size: 16px;
}

.bp-pos-item-details {
    padding: 10px 10px 12px;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.bp-pos-item-name {
    font-size: 12px;
    font-weight: 700;
    color: var(--bp-dark);
    margin-bottom: 2px;
    line-height: 1.3;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.bp-pos-item-sku {
    font-size: 10px;
    color: var(--bp-gray-500);
    letter-spacing: 0.3px;
    text-transform: uppercase;
    margin-bottom: 4px;
}

.bp-pos-item-price {
    font-size: 14px;
    font-weight: 800;
    color: var(--bp-primary);
}

.bp-pos-item-stock {
    font-size: 9px;
    color: var(--bp-gray-500);
    margin-top: 3px;
    letter-spacing: 0.3px;
    text-transform: uppercase;
}

.bp-pos-cart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 18px;
    border-bottom: 1px solid var(--bp-gray-200);
    background: var(--bp-row-hover);
}

.bp-pos-customer-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    background: var(--bp-gray-100);
    border-bottom: 1px solid var(--bp-gray-200);
}

/* Which store this terminal session is acting for — sits above the search
   bar so it's the first thing visible, since every stock check on the page
   is scoped to this one branch. */
.bp-pos-branch-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 4px 12px;
}

.bp-pos-branch-bar i {
    color: var(--bp-primary-light);
}

.bp-pos-branch-bar .bp-form-select {
    width: auto;
    min-width: 160px;
}

.bp-pos-cart-items {
    flex: 1;
    overflow-y: auto;
    padding: 4px 0;
    scrollbar-width: thin;
}

.bp-pos-cart-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 10px 18px;
    border-bottom: 1px solid var(--bp-gray-100);
    transition: background 0.15s;
    -webkit-transition: background 0.15s;
    -moz-transition: background 0.15s;
    -ms-transition: background 0.15s;
    -o-transition: background 0.15s;
}

.bp-pos-cart-item:hover {
    background: color-mix(in srgb, var(--bp-primary) 2%, transparent);
}

.bp-pos-cart-item-info {
    flex: 1;
    min-width: 0;
}

.bp-pos-cart-item-name {
    font-size: 13px;
    font-weight: 700;
    color: var(--bp-dark);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.bp-pos-cart-item-sku {
    font-size: 11px;
    color: var(--bp-gray-500);
}

.bp-pos-cart-item-price {
    font-size: 12px;
    color: var(--bp-gray-600);
    margin-top: 2px;
}

.bp-pos-cart-item-line-total {
    font-size: 14px;
    font-weight: 800;
    color: var(--bp-primary);
    white-space: nowrap;
    text-align: right;
    min-width: 90px;
}

.bp-pos-cart-item-line-discount {
    font-size: 11px;
    color: var(--bp-danger);
}

.bp-pos-cart-item-remove {
    background: none;
    border: none;
    color: var(--bp-gray-400);
    cursor: pointer;
    padding: 4px;
    font-size: 13px;
    border-radius: 4px;
    transition: all 0.15s;
    -webkit-transition: all 0.15s;
    -moz-transition: all 0.15s;
    -ms-transition: all 0.15s;
    -o-transition: all 0.15s;
}

.bp-pos-cart-item-remove:hover {
    color: var(--bp-danger);
    background: color-mix(in srgb, var(--bp-danger) 8%, transparent);
}

.bp-pos-qty-stepper {
    display: flex;
    align-items: center;
    border: 1.5px solid var(--bp-gray-300);
    border-radius: 6px;
    margin-top: 6px;
    width: fit-content;
    overflow: hidden;
}

.bp-pos-qty-stepper button {
    width: 30px;
    height: 30px;
    border: none;
    background: var(--bp-gray-100);
    color: var(--bp-dark);
    cursor: pointer;
    font-size: 14px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s;
    -webkit-transition: all 0.15s;
    -moz-transition: all 0.15s;
    -ms-transition: all 0.15s;
    -o-transition: all 0.15s;
}

.bp-pos-qty-stepper button:hover {
    background: var(--bp-primary);
    color: #fff;
}

.bp-pos-qty-stepper button:first-child {
    border-radius: 4px 0 0 4px;
}

.bp-pos-qty-stepper button:last-child {
    border-radius: 0 4px 4px 0;
}

.bp-pos-qty-stepper input {
    width: 42px;
    height: 30px;
    border: none;
    border-left: 1.5px solid var(--bp-gray-300);
    border-right: 1.5px solid var(--bp-gray-300);
    text-align: center;
    font-size: 13px;
    font-weight: 700;
    color: var(--bp-dark);
    background: #fff;
    outline: none;
}

.bp-pos-qty-stepper input::-webkit-inner-spin-button,
.bp-pos-qty-stepper input::-webkit-outer-spin-button {
    -webkit-appearance: none;
}

.bp-pos-cart-summary {
    border-top: 2px solid var(--bp-gray-200);
    padding: 14px 18px;
    background: var(--bp-gray-100);
}

.bp-cart-summary-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 5px 0;
    font-size: 14px;
}

.bp-cart-summary-row.total {
    padding-top: 12px;
    margin-top: 8px;
    border-top: 1px solid var(--bp-gray-300);
    font-size: 20px;
    font-weight: 700;
    color: var(--bp-dark);
}

.bp-pos-discount-input {
    width: 80px;
    height: 30px;
    padding: 2px 8px;
    text-align: right;
    font-size: 13px;
    font-weight: 600;
}

.bp-pos-cart-actions {
    display: flex;
    gap: 10px;
    padding: 14px 18px;
    border-top: 1px solid var(--bp-gray-200);
    background: #fff;
}

.bp-pos-cart-actions .bp-btn {
    flex: 1;
    padding: 14px;
    font-size: 15px;
    font-weight: 700;
    border-radius: 8px;
}

.bp-pos-cart-actions .bp-btn-success {
    box-shadow: 0 3px 10px color-mix(in srgb, var(--bp-success) 25%, transparent);
}

.bp-pos-cart-actions .bp-btn-success:hover {
    box-shadow: 0 4px 14px color-mix(in srgb, var(--bp-success) 35%, transparent);
}

.bp-pos-discount-row {
    display: flex;
    align-items: center;
    gap: 6px;
}

.bp-pos-discount-type {
    width: 60px;
    height: 30px;
    padding: 2px 4px;
    font-size: 12px;
    font-weight: 600;
    border: 1px solid var(--bp-gray-300);
    border-radius: 4px;
    background: #fff;
    cursor: pointer;
}

.bp-pos-item-discount-popup {
    position: absolute;
    z-index: 100;
    background: #fff;
    border: 1px solid var(--bp-gray-300);
    border-radius: var(--bp-border-radius);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
    padding: 12px;
    width: 260px;
    right: 0;
    top: 100%;
    margin-top: 4px;
}

.bp-pos-item-discount-popup .bp-form-label {
    font-size: 11px;
    margin-bottom: 4px;
}

.bp-payment-modal .modal-body {
    padding: 0;
}

.bp-payment-hero {
    background: var(--bp-primary-solid);
    color: #fff;
    padding: 24px 28px;
    text-align: center;
}

.bp-payment-hero-label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    opacity: 0.75;
    font-weight: 700;
    margin-bottom: 4px;
}

.bp-payment-hero-amount {
    font-size: 40px;
    font-weight: 900;
    line-height: 1.1;
    letter-spacing: -1px;
}

.bp-payment-body {
    padding: 20px 24px;
}

.bp-payment-section-label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 700;
    color: var(--bp-gray-500);
    margin-bottom: 10px;
}

.bp-advance-adjust {
    background: color-mix(in srgb, var(--bp-info) 8%, transparent);
    border: 1px solid var(--bp-info, var(--bp-primary-light));
    border-radius: 8px;
    margin-bottom: 16px;
    overflow: hidden;
}

.bp-advance-adjust-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
}

.bp-advance-adjust-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.bp-advance-adjust-info>i {
    font-size: 20px;
    color: var(--bp-info, var(--bp-primary-light));
}

.bp-advance-adjust-title {
    font-size: 12px;
    font-weight: 700;
    color: var(--bp-gray-600);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.bp-advance-adjust-balance {
    font-size: 18px;
    font-weight: 800;
    color: var(--bp-info, var(--bp-primary-light));
    line-height: 1.2;
}

.bp-advance-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    user-select: none;
}

.bp-advance-toggle input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--bp-primary, var(--bp-primary));
    cursor: pointer;
}

.bp-advance-toggle-label {
    font-size: 13px;
    font-weight: 700;
    color: var(--bp-primary);
}

.bp-advance-adjust-body {
    padding: 0 16px 14px;
}

.bp-advance-adjust-input-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.bp-advance-input-group {
    display: flex;
    align-items: center;
    gap: 6px;
}

.bp-advance-input-group input {
    width: 140px;
    font-weight: 700;
    text-align: right;
}

.bp-advance-adjust-remaining {
    font-size: 12px;
    color: var(--bp-gray-500);
    margin-top: 8px;
    text-align: right;
}

.bp-advance-adjust-remaining strong {
    color: var(--bp-primary);
    font-weight: 800;
}

.bp-walkin-due-warning {
    background: color-mix(in srgb, var(--bp-danger) 8%, transparent);
    border: 1px solid var(--bp-danger);
    border-radius: 6px;
    padding: 10px 14px;
    font-size: 12px;
    font-weight: 600;
    color: var(--bp-danger);
    margin-top: 12px;
}

.bp-walkin-name-row {
    margin-bottom: 4px;
}

[data-theme="dark"] .bp-walkin-due-warning {
    background: color-mix(in srgb, var(--bp-danger) 15%, transparent);
}

.bp-payment-total {
    font-size: 36px;
    line-height: 1.2;
}

.bp-split-payment-row {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0;
    background: transparent;
    border-radius: 0;
    margin-bottom: 8px;
    border: none;
    transition: border-color 0.15s ease;
    -webkit-transition: border-color 0.15s ease;
    -moz-transition: border-color 0.15s ease;
    -ms-transition: border-color 0.15s ease;
    -o-transition: border-color 0.15s ease;
}

.bp-split-payment-row:focus-within {
    border-color: var(--bp-primary-light);
}

.bp-split-payment-row .bp-pay-method-col {
    width: 150px;
    flex-shrink: 0;
}

.bp-split-payment-row .bp-pay-account-col {
    flex: 1;
    min-width: 200px;
}

.bp-split-payment-row .bp-pay-amount-col {
    width: 180px;
    flex-shrink: 0;
}

.bp-split-payment-row .bp-pay-ref-col {
    width: 280px;
    flex-shrink: 0;
}

.bp-split-payment-row .bp-form-control,
.bp-split-payment-row .bp-form-select {
    width: 100%;
}

.bp-split-payment-row .remove-split {
    color: var(--bp-gray-400);
    cursor: pointer;
    background: none;
    border: none;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    flex-shrink: 0;
    transition: all 0.15s ease;
    -webkit-transition: all 0.15s ease;
    -moz-transition: all 0.15s ease;
    -ms-transition: all 0.15s ease;
    -o-transition: all 0.15s ease;
}

.bp-split-payment-row .remove-split:hover {
    color: var(--bp-danger);
    background: color-mix(in srgb, var(--bp-danger) 10%, transparent);
}

.bp-payment-add-split {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 600;
    color: var(--bp-primary-light);
    background: none;
    border: 1px dashed var(--bp-gray-300);
    border-radius: 8px;
    padding: 8px 14px;
    cursor: pointer;
    width: 100%;
    transition: all 0.15s ease;
    -webkit-transition: all 0.15s ease;
    -moz-transition: all 0.15s ease;
    -ms-transition: all 0.15s ease;
    -o-transition: all 0.15s ease;
}

.bp-payment-add-split:hover {
    border-color: var(--bp-primary-light);
    background: color-mix(in srgb, var(--bp-primary) 4%, transparent);
}

.bp-quick-amounts {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.bp-quick-amount-btn {
    flex: 1;
    min-width: 60px;
    padding: 8px 4px;
    font-size: 13px;
    font-weight: 700;
    text-align: center;
    border: 1px solid var(--bp-gray-300);
    border-radius: 6px;
    background: #fff;
    color: var(--bp-gray-700);
    cursor: pointer;
    transition: all 0.15s ease;
    -webkit-transition: all 0.15s ease;
    -moz-transition: all 0.15s ease;
    -ms-transition: all 0.15s ease;
    -o-transition: all 0.15s ease;
}

.bp-quick-amount-btn:hover {
    border-color: var(--bp-primary-light);
    color: var(--bp-primary);
    background: color-mix(in srgb, var(--bp-primary) 6%, transparent);
}

.bp-quick-amount-btn.bp-quick-exact {
    background: var(--bp-primary);
    color: #fff;
    border-color: var(--bp-primary);
}

.bp-quick-amount-btn.bp-quick-exact:hover {
    background: var(--bp-primary-dark);
    border-color: var(--bp-primary-dark);
}

.bp-payment-summary {
    display: flex;
    border-top: 2px dashed var(--bp-gray-300);
    margin-top: 16px;
    padding-top: 16px;
}

.bp-payment-summary-item {
    flex: 1;
    text-align: center;
}

.bp-payment-summary-item+.bp-payment-summary-item {
    border-left: 1px solid var(--bp-gray-200);
}

.bp-payment-summary-label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    font-weight: 700;
    color: var(--bp-gray-500);
    margin-bottom: 2px;
}

.bp-payment-summary-value {
    font-size: 22px;
    font-weight: 800;
    line-height: 1.2;
}

.bp-payment-summary-value.bp-change-positive {
    color: var(--bp-success);
}

.bp-payment-summary-value.bp-change-negative {
    color: var(--bp-danger);
}

.bp-payment-footer-row {
    display: flex;
    gap: 12px;
    margin-top: 16px;
}

.bp-payment-footer-row>div {
    flex: 1;
}

.bp-payment-modal .modal-footer {
    padding: 14px 24px;
    border-top: 1px solid var(--bp-gray-200);
}

.bp-payment-ref-input {
    width: 180px;
    flex-shrink: 0;
}

.bp-pos-success-flash {
    z-index: 9999;
}

.bp-cust-current {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 20px;
    background: var(--bp-gray-100);
    border-bottom: 1px solid var(--bp-gray-200);
}

.bp-cust-current-avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: var(--bp-primary);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    flex-shrink: 0;
}

.bp-cust-current-info {
    flex: 1;
    min-width: 0;
}

.bp-cust-tabs {
    display: flex;
    border-bottom: 2px solid var(--bp-gray-200);
}

.bp-cust-tab {
    flex: 1;
    padding: 12px 16px;
    font-size: 13px;
    font-weight: 700;
    color: var(--bp-gray-500);
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    cursor: pointer;
    transition: all 0.15s ease;
    -webkit-transition: all 0.15s ease;
    -moz-transition: all 0.15s ease;
    -ms-transition: all 0.15s ease;
    -o-transition: all 0.15s ease;
}

.bp-cust-tab:hover {
    color: var(--bp-primary);
}

.bp-cust-tab.active {
    color: var(--bp-primary);
    border-bottom-color: var(--bp-primary);
}

.bp-cust-tab-content {
    display: none;
}

.bp-cust-tab-content.active {
    display: block;
}

.bp-cust-search-wrap {
    position: relative;
    padding: 16px 20px 0;
}

.bp-cust-search-wrap i {
    position: absolute;
    left: 32px;
    top: 50%;
    color: var(--bp-gray-400);
    font-size: 13px;
    transform: translateY(-20%);
    -webkit-transform: translateY(-20%);
    -moz-transform: translateY(-20%);
    -ms-transform: translateY(-20%);
    -o-transform: translateY(-20%);
}

.bp-cust-search-wrap input {
    width: 100%;
    padding: 10px 12px 10px 36px;
    border: 1px solid var(--bp-gray-300);
    border-radius: 8px;
    font-size: 13px;
    background: #fff;
    transition: border-color 0.15s ease;
    -webkit-transition: border-color 0.15s ease;
    -moz-transition: border-color 0.15s ease;
    -ms-transition: border-color 0.15s ease;
    -o-transition: border-color 0.15s ease;
}

.bp-cust-search-wrap input:focus {
    outline: none;
    border-color: var(--bp-primary-light);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--bp-primary) 10%, transparent);
}

.bp-cust-results {
    max-height: 300px;
    overflow-y: auto;
    padding: 8px 12px 12px;
}

.bp-cust-empty {
    text-align: center;
    padding: 32px 16px;
    color: var(--bp-gray-400);
}

.bp-cust-empty i {
    font-size: 32px;
    margin-bottom: 8px;
    display: block;
}

.bp-cust-empty p {
    font-size: 13px;
    margin: 0;
}

.bp-cust-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: 8px;
    cursor: pointer;
    border: none;
    background: none;
    width: 100%;
    text-align: left;
    transition: background 0.12s ease;
    -webkit-transition: background 0.12s ease;
    -moz-transition: background 0.12s ease;
    -ms-transition: background 0.12s ease;
    -o-transition: background 0.12s ease;
}

.bp-cust-item:hover {
    background: var(--bp-gray-100);
}

.bp-cust-item-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--bp-primary-light);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 800;
    flex-shrink: 0;
}

.bp-cust-item-info {
    flex: 1;
    min-width: 0;
}

.bp-cust-item-name {
    font-size: 13px;
    font-weight: 700;
    color: var(--bp-gray-800);
    line-height: 1.3;
}

.bp-cust-item-phone {
    font-size: 12px;
    color: var(--bp-gray-500);
}

.bp-cust-item-due {
    flex-shrink: 0;
}

.bp-cust-add-form {
    padding: 20px;
}

.bp-pos-cart-items .bp-empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: var(--bp-gray-400);
    padding: 40px 20px;
}

.bp-pos-cart-items .bp-empty-state i {
    font-size: 56px;
    margin-bottom: 16px;
    opacity: 0.4;
}

.bp-pos-cart-items .bp-empty-state h5 {
    font-weight: 700;
    color: var(--bp-gray-500);
    margin-bottom: 6px;
}

.bp-pos-cart-items .bp-empty-state p {
    font-size: 13px;
}

.bp-pos-held-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--bp-danger);
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
}

.bp-pos-shortcuts {
    position: fixed;
    bottom: 0;
    left: var(--bp-sidebar-width);
    right: 400px;
    z-index: 10;
    padding: 6px 20px;
    background: rgba(28, 40, 51, 0.92);
    color: rgba(255, 255, 255, 0.7);
    font-size: 11px;
    backdrop-filter: blur(4px);
}

.sidebar-collapsed .bp-pos-shortcuts {
    left: var(--bp-sidebar-collapsed);
}

.bp-pos-shortcuts span {
    color: rgba(255, 255, 255, 0.6);
}

.bp-pos-shortcuts kbd {
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
    padding: 2px 7px;
    border-radius: 3px;
    font-size: 10px;
    font-weight: 700;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.bp-pos-search.scanning {
    border-color: var(--bp-success);
    animation: bp-scan-pulse 0.5s;
}

@keyframes bp-scan-pulse {
    0% {
        box-shadow: 0 0 0 0 color-mix(in srgb, var(--bp-success) 40%, transparent);
    }

    100% {
        box-shadow: 0 0 0 8px color-mix(in srgb, var(--bp-success) 0%, transparent);
    }
}

@media (max-width: 1200px) {
    .bp-pos-cart {
        width: 400px;
        min-width: 400px;
    }
}

/* Tablet/phone POS layout lives in the "POS terminal — tablet & phone"
   block at the bottom of this file. */
@media (max-width: 992px) {
    .bp-pos-shortcuts {
        left: 0;
        right: 320px;
    }
}

@media (max-width: 768px) {
    .bp-pos-shortcuts {
        display: none;
    }

    .bp-split-payment-row {
        flex-wrap: wrap;
    }

    .bp-split-payment-row .bp-pay-method-col,
    .bp-split-payment-row .bp-pay-account-col {
        width: 100%;
    }

    .bp-split-payment-row .bp-pay-ref-col {
        width: 100%;
    }

    .bp-payment-hero-amount {
        font-size: 32px;
    }

    .bp-payment-summary-value {
        font-size: 18px;
    }
}

[data-theme="dark"] .bp-pos-products {
    background: var(--bp-bg);
}

[data-theme="dark"] .bp-pos-cart {
    background: var(--bp-surface);
    border-left-color: rgba(255, 255, 255, 0.12);
}

[data-theme="dark"] .bp-pos-search {
    background: var(--bp-surface);
    border-color: rgba(255, 255, 255, 0.12);
    box-shadow: none;
}

[data-theme="dark"] .bp-pos-search:focus-within {
    border-color: var(--bp-primary-light);
    box-shadow: 0 0 0 4px color-mix(in srgb, var(--bp-primary) 12%, transparent);
}

[data-theme="dark"] .bp-pos-search i {
    color: var(--bp-primary-light);
}

[data-theme="dark"] .bp-pos-search input {
    color: var(--bp-text);
}

[data-theme="dark"] .bp-pos-search input::placeholder {
    color: var(--bp-gray-500);
}

[data-theme="dark"] .bp-pos-search-hint {
    color: var(--bp-gray-500);
    border-color: rgba(255, 255, 255, 0.12);
}

[data-theme="dark"] .bp-pos-cat-btn {
    background: var(--bp-surface);
    border-color: rgba(255, 255, 255, 0.12);
    color: #adb5bd;
}

[data-theme="dark"] .bp-pos-cat-btn:hover {
    border-color: var(--bp-primary-light);
    color: var(--bp-primary-light);
    background: color-mix(in srgb, var(--bp-primary) 8%, transparent);
}

[data-theme="dark"] .bp-pos-cat-btn.active {
    background: var(--bp-primary);
    border-color: var(--bp-primary);
    color: #fff;
}

[data-theme="dark"] .bp-pos-item {
    background: var(--bp-surface);
    border-color: rgba(255, 255, 255, 0.08);
}

[data-theme="dark"] .bp-pos-item:hover {
    border-color: var(--bp-primary-light);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.3);
}

[data-theme="dark"] .bp-pos-item-img {
    background: var(--bp-row-hover);
}

[data-theme="dark"] .bp-pos-item-name {
    color: var(--bp-text);
}

[data-theme="dark"] .bp-pos-cart-header {
    border-bottom-color: rgba(255, 255, 255, 0.08);
    background: var(--bp-row-hover);
}

[data-theme="dark"] .bp-pos-customer-bar {
    background: rgba(255, 255, 255, 0.03);
    border-bottom-color: rgba(255, 255, 255, 0.08);
}

[data-theme="dark"] .bp-pos-cart-item {
    border-bottom-color: rgba(255, 255, 255, 0.04);
}

[data-theme="dark"] .bp-pos-cart-item:hover {
    background: rgba(255, 255, 255, 0.03);
}

[data-theme="dark"] .bp-pos-cart-item-name {
    color: var(--bp-text);
}

[data-theme="dark"] .bp-pos-cart-item-line-total {
    color: var(--bp-primary-light);
}

[data-theme="dark"] .bp-pos-qty-stepper {
    border-color: rgba(255, 255, 255, 0.12);
}

[data-theme="dark"] .bp-pos-qty-stepper button {
    background: rgba(255, 255, 255, 0.08);
    color: var(--bp-text);
}

[data-theme="dark"] .bp-pos-qty-stepper button:hover {
    background: var(--bp-primary);
    color: #fff;
}

[data-theme="dark"] .bp-pos-qty-stepper input {
    background: var(--bp-surface);
    border-color: rgba(255, 255, 255, 0.12);
    color: var(--bp-text);
}

[data-theme="dark"] .bp-pos-cart-summary {
    border-top-color: rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.02);
}

[data-theme="dark"] .bp-cart-summary-row.total {
    border-top-color: var(--bp-primary);
}

[data-theme="dark"] .bp-pos-cart-actions {
    border-top-color: rgba(255, 255, 255, 0.08);
    background: var(--bp-surface);
}

[data-theme="dark"] .bp-pos-discount-input {
    background: var(--bp-surface);
    color: var(--bp-text);
}

[data-theme="dark"] .bp-pos-discount-type {
    background: var(--bp-surface);
    border-color: rgba(255, 255, 255, 0.12);
    color: var(--bp-text);
}

[data-theme="dark"] .bp-pos-item-discount-popup {
    background: var(--bp-surface);
    border-color: rgba(255, 255, 255, 0.12);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
}

[data-theme="dark"] .bp-split-payment-row {
    background: rgba(255, 255, 255, 0.04);
    border-color: transparent;
}

[data-theme="dark"] .bp-split-payment-row:focus-within {
    border-color: var(--bp-primary-light);
}

[data-theme="dark"] .bp-payment-summary {
    border-top-color: rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .bp-payment-summary-item+.bp-payment-summary-item {
    border-left-color: rgba(255, 255, 255, 0.08);
}

[data-theme="dark"] .bp-quick-amount-btn {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(255, 255, 255, 0.12);
    color: var(--bp-gray-700);
}

[data-theme="dark"] .bp-quick-amount-btn:hover {
    background: color-mix(in srgb, var(--bp-primary) 12%, transparent);
    border-color: var(--bp-primary-light);
}

[data-theme="dark"] .bp-payment-add-split {
    border-color: rgba(255, 255, 255, 0.12);
}

[data-theme="dark"] .bp-payment-add-split:hover {
    background: color-mix(in srgb, var(--bp-primary) 8%, transparent);
    border-color: var(--bp-primary-light);
}

[data-theme="dark"] .bp-payment-modal .modal-footer {
    border-top-color: rgba(255, 255, 255, 0.08);
}

[data-theme="dark"] .bp-payment-hero {
    background: var(--bp-primary-solid);
}

[data-theme="dark"] .bp-advance-adjust {
    background: color-mix(in srgb, var(--bp-primary) 10%, transparent);
    border-color: color-mix(in srgb, var(--bp-primary) 30%, transparent);
}

[data-theme="dark"] .bp-advance-adjust-title {
    color: var(--bp-gray-600);
}

[data-theme="dark"] .bp-advance-adjust-remaining {
    color: var(--bp-gray-500);
}

[data-theme="dark"] .bp-cust-current {
    background: rgba(255, 255, 255, 0.04);
    border-bottom-color: rgba(255, 255, 255, 0.08);
}

[data-theme="dark"] .bp-cust-tabs {
    border-bottom-color: rgba(255, 255, 255, 0.08);
}

[data-theme="dark"] .bp-cust-tab.active {
    color: var(--bp-primary-light);
    border-bottom-color: var(--bp-primary-light);
}

[data-theme="dark"] .bp-cust-search-wrap input {
    background: var(--bp-surface);
    border-color: rgba(255, 255, 255, 0.12);
    color: var(--bp-text);
}

[data-theme="dark"] .bp-cust-search-wrap input:focus {
    border-color: var(--bp-primary-light);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--bp-primary) 15%, transparent);
}

[data-theme="dark"] .bp-cust-item:hover {
    background: rgba(255, 255, 255, 0.04);
}

[data-theme="dark"] .bp-cust-item-name {
    color: var(--bp-text);
}

[data-theme="dark"] .bp-cust-item-avatar {
    background: color-mix(in srgb, var(--bp-primary) 30%, transparent);
}

[data-theme="dark"] .bp-pos-cart-items .bp-empty-state i,
[data-theme="dark"] .bp-pos-cart-items .bp-empty-state h5 {
    color: var(--bp-gray-500);
}

[data-theme="dark"] .bp-pos-cart-item-remove:hover {
    background: color-mix(in srgb, var(--bp-danger) 15%, transparent);
}

.select2-container--default {
    height: 40px;
}

.select2-container--default .select2-selection--single {
    height: 40px !important;
    border: 1px solid var(--bp-border);
    border-radius: var(--bp-radius-md);
    padding: 0 12px;
    font-size: 14px;
    font-family: var(--bp-font);
    background-color: var(--bp-surface);
    box-sizing: border-box;
    display: flex;
    align-items: center;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.select2-container--default .select2-selection--single .select2-selection__rendered {
    flex: 1;
    min-width: 0;
    padding-left: 0;
    padding-right: 20px;
    line-height: normal;
    color: var(--bp-text);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.select2-container--default .select2-selection--single .select2-selection__arrow {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    top: 0;
    right: 6px;
    width: 20px;
}

.select2-container--default .select2-selection--single .select2-selection__clear {
    float: right;
    height: 38px;
    line-height: 38px;
    margin-right: 16px;
    font-size: 14px;
    font-weight: 700;
}

.select2-container--default .select2-selection--single .select2-selection__placeholder {
    color: var(--bp-muted);
}

.select2-container--default.select2-container--open .select2-selection--single,
.select2-container--default.select2-container--focus .select2-selection--single {
    border-color: var(--bp-primary);
    box-shadow: 0 0 0 3px var(--bp-primary-50);
}

.select2-dropdown {
    border: 1px solid var(--bp-border);
    border-radius: var(--bp-radius-md);
    background-color: var(--bp-surface);
    box-shadow: var(--bp-shadow-lg);
    font-family: var(--bp-font);
    font-size: 13px;
    z-index: 1060;
}

.select2-container--default .select2-search--dropdown .select2-search__field {
    height: 36px;
    border: 1px solid var(--bp-border);
    border-radius: 8px;
    padding: 0 10px;
    font-size: 13px;
    font-family: var(--bp-font);
    background-color: var(--bp-surface);
    color: var(--bp-text);
    outline: none;
}

.select2-container--default .select2-search--dropdown .select2-search__field:focus {
    border-color: var(--bp-primary);
}

.select2-container--default .select2-results__option--highlighted.select2-results__option--selectable {
    background-color: var(--bp-primary-solid);
    color: #fff;
}

.select2-container--default .select2-results__option--selected {
    background-color: var(--bp-primary-50);
    color: var(--bp-primary-ink);
}

.select2-results__option {
    padding: 8px 12px;
}

.input-group .select2-container {
    flex: 1 1 auto;
    width: 1% !important;
    min-width: 0;
}

.input-group .select2-container,
.input-group .select2-container .select2-selection--single {
    height: 38px !important;
    min-height: 38px !important;
}

.input-group .select2-container:has(~ .bp-btn, ~ .bp-form-control, ~ .bp-form-select) .select2-selection--single {
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
}

.input-group>.select2-container+.bp-btn {
    margin-left: -1px;
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
}

.input-group>.select2-hidden-accessible:first-child+.select2-container {
    margin-left: 0;
}

.input-group>.select2-hidden-accessible:first-child+.select2-container .select2-selection--single {
    border-left: 1px solid var(--bp-gray-300);
    border-top-left-radius: 6px;
    border-bottom-left-radius: 6px;
}

[data-theme="dark"] .input-group>.select2-hidden-accessible:first-child+.select2-container .select2-selection--single {
    border-left-color: var(--bp-gray-400);
}

[data-theme="dark"] .select2-container--default .select2-selection--single {
    background-color: var(--bp-gray-200);
    border-color: var(--bp-gray-400);
}

[data-theme="dark"] .select2-container--default .select2-selection--single .select2-selection__rendered {
    color: var(--bp-gray-700);
}

[data-theme="dark"] .select2-dropdown {
    background-color: #1a1d21;
    border-color: var(--bp-gray-400);
}

[data-theme="dark"] .select2-container--default .select2-search--dropdown .select2-search__field {
    background-color: var(--bp-gray-200);
    border-color: var(--bp-gray-400);
    color: var(--bp-gray-700);
}

[data-theme="dark"] .select2-container--default .select2-results__option--selected {
    background-color: var(--bp-gray-200);
}

[data-theme="dark"] .select2-results__option {
    color: var(--bp-gray-700);
}

.bp-conversion-builder {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.bp-conv-label {
    font-size: 14px;
    font-weight: 600;
    white-space: nowrap;
}

.bp-conv-operator {
    width: 52px;
    height: 34px;
    padding: 2px 4px;
    font-size: 16px;
    font-weight: 700;
    text-align: center;
    flex-shrink: 0;
}

.bp-conv-value {
    width: 100px;
    height: 34px;
    font-size: 14px;
    font-weight: 700;
    text-align: center;
}

.bp-conversion-preview {
    background: color-mix(in srgb, var(--bp-success) 6%, transparent);
    border: 1px solid color-mix(in srgb, var(--bp-success) 15%, transparent);
    color: var(--bp-dark);
}

[data-theme="dark"] .bp-conversion-builder .bp-conv-label {
    color: var(--bp-text);
}

[data-theme="dark"] .bp-conversion-preview {
    background: color-mix(in srgb, var(--bp-success) 10%, transparent);
    border-color: color-mix(in srgb, var(--bp-success) 20%, transparent);
}

.bp-user-avatar-sm {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--bp-gray-200);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
    color: var(--bp-primary);
    overflow: hidden;
    flex-shrink: 0;
}

.bp-user-avatar-sm img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.bp-user-avatar-lg {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: var(--bp-gray-200);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    font-weight: 800;
    color: var(--bp-primary);
    overflow: hidden;
    margin: 0 auto;
}

.bp-user-avatar-lg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.bp-user-profile-card {
    padding: 30px 20px;
}

.bp-toggle-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid var(--bp-gray-200);
}

.bp-toggle-row:last-child {
    border-bottom: none;
}

.bp-opacity-30 {
    opacity: 0.3;
}

.fs-8 {
    font-size: 8px;
}

[data-theme="dark"] .bp-user-avatar-sm {
    background: var(--bp-gray-300);
    color: var(--bp-primary-light);
}

[data-theme="dark"] .bp-user-avatar-lg {
    background: var(--bp-gray-300);
    color: var(--bp-primary-light);
}

[data-theme="dark"] .bp-toggle-row {
    border-bottom-color: var(--bp-gray-300);
}

.bp-info-label-lg {
    width: 160px;
    font-weight: 600;
    color: var(--bp-gray-600);
    flex-shrink: 0;
    font-size: 13px;
}

.bp-info-row-compact {
    padding: 6px 0;
}

.bp-info-row-compact .bp-info-label {
    font-size: 12px;
}

.bp-info-row-compact .bp-info-value {
    font-size: 13px;
}

.bp-info-row-last {
    border-bottom: none !important;
}

.bp-badge-hero {
    font-size: 13px;
    padding: 6px 16px;
    letter-spacing: 0.3px;
    color: #fff;
    border: 1.5px solid rgba(255, 255, 255, 0.3);
}

.bp-badge-hero.bp-badge-success {
    background: color-mix(in srgb, var(--bp-success) 70%, transparent);
    color: #fff;
}

.bp-badge-hero.bp-badge-warning {
    background: color-mix(in srgb, var(--bp-warning) 70%, transparent);
    color: #fff;
}

.bp-badge-hero.bp-badge-danger {
    background: color-mix(in srgb, var(--bp-danger) 70%, transparent);
    color: #fff;
}

.bp-badge-hero.bp-badge-primary {
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
}

.bp-badge-hero.bp-badge-info {
    background: color-mix(in srgb, var(--bp-primary) 60%, transparent);
    color: #fff;
}

.bp-badge-hero.bp-badge-dark {
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
}

.bp-badge-hero.bp-badge-secondary {
    background: color-mix(in srgb, var(--bp-secondary) 60%, transparent);
    color: #fff;
}

.bp-card-danger {
    border: 1px solid color-mix(in srgb, var(--bp-danger) 20%, transparent);
}

.bp-card-header-danger {
    background: color-mix(in srgb, var(--bp-danger) 4%, transparent);
    border-bottom-color: color-mix(in srgb, var(--bp-danger) 15%, transparent);
}

[data-theme="dark"] .bp-card-danger {
    border-color: color-mix(in srgb, var(--bp-danger) 25%, transparent);
}

[data-theme="dark"] .bp-card-header-danger {
    background: color-mix(in srgb, var(--bp-danger) 8%, transparent);
    border-bottom-color: color-mix(in srgb, var(--bp-danger) 20%, transparent);
}

.bp-bg-primary {
    background-color: var(--bp-primary) !important;
}

.bp-bg-success {
    background-color: var(--bp-success) !important;
}

.bp-bg-danger {
    background-color: var(--bp-danger) !important;
}

.bp-bg-warning {
    background-color: var(--bp-warning) !important;
}

.bp-bg-info {
    background-color: var(--bp-info) !important;
}

.bp-bg-secondary {
    background-color: var(--bp-secondary) !important;
}

.bp-timeline-marker {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
    margin-top: 4px;
}

.bp-timeline-content {
    flex: 1;
}

.bp-table-totals-row td {
    background: var(--bp-gray-100);
    font-weight: 800;
    font-size: 13px;
    border-top: 2px solid var(--bp-gray-300);
}

[data-theme="dark"] .bp-table-totals-row td {
    background: var(--bp-row-hover);
    border-top-color: var(--bp-border);
}

.fs-15 {
    font-size: 15px;
}

.fs-18 {
    font-size: 18px;
}

.bp-receipt-preview-header {
    padding: 12px 0 4px;
}

.bp-receipt-preview-header .fs-18 {
    color: var(--bp-dark);
}

.bp-receipt-divider {
    border: none;
    border-top: 1px dashed var(--bp-gray-300);
    margin: 0;
}

[data-theme="dark"] .bp-receipt-divider {
    border-top-color: var(--bp-border);
}

.bp-receipt-amount-block {
    background: var(--bp-gray-100);
    border-radius: var(--bp-border-radius);
    padding: 16px 20px;
    text-align: center;
}

[data-theme="dark"] .bp-receipt-amount-block {
    background: var(--bp-row-hover);
}

.bp-receipt-amount-label {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--bp-gray-500);
    margin-bottom: 4px;
}

.bp-receipt-amount-value {
    font-size: 28px;
    font-weight: 800;
    color: var(--bp-primary);
    letter-spacing: -0.5px;
}

[data-theme="dark"] .bp-receipt-amount-value {
    color: var(--bp-primary-light);
}

[data-theme="dark"] .bp-receipt-preview-header .fs-18 {
    color: var(--bp-dark);
}

.bp-custom-report-empty-icon {
    color: var(--bp-primary);
    opacity: 0.3;
}

.bp-custom-report-steps {
    max-width: 480px;
}

.bp-step-badge {
    min-width: 28px;
    text-align: center;
}

[data-theme="dark"] .bp-custom-report-empty-icon {
    color: var(--bp-primary-light);
    opacity: 0.4;
}

.bp-recon-check-col {
    width: 40px;
}

.bp-recon-summary-label {
    width: 60%;
}

[data-theme="dark"] .bp-recon-matched {
    background-color: color-mix(in srgb, var(--bp-success) 8%, transparent);
}

[data-theme="dark"] .bp-recon-check-col,
[data-theme="dark"] .bp-recon-summary-label {
    color: var(--bp-dark);
}

.bp-courier-logo {
    width: 32px;
    height: 32px;
    object-fit: contain;
    border-radius: var(--bp-border-radius);
}

.bp-courier-logo-placeholder {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--bp-gray-200);
    color: var(--bp-gray-600);
    border-radius: var(--bp-border-radius);
    font-size: 14px;
}

.bp-badge-clickable {
    cursor: pointer;
    border: none;
    padding: 4px 10px;
    font-size: 12px;
    transition: opacity 0.15s;
    -webkit-transition: opacity 0.15s;
    -moz-transition: opacity 0.15s;
    -ms-transition: opacity 0.15s;
    -o-transition: opacity 0.15s;
}

.bp-badge-clickable:hover {
    opacity: 0.8;
}

.bp-config-row[data-visible="false"] {
    display: none;
}

.bp-config-panel {
    padding: 20px;
    background-color: var(--bp-gray-100);
    border-top: 1px solid var(--bp-gray-300);
}

[data-theme="dark"] .bp-courier-logo-placeholder {
    background-color: var(--bp-gray-700);
    color: var(--bp-gray-400);
}

[data-theme="dark"] .bp-config-panel {
    background-color: var(--bp-gray-800);
    border-top-color: var(--bp-gray-700);
}

.bp-banner-preview {
    max-width: 100%;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid var(--bp-gray-200);
}

.bp-banner-preview img {
    width: 100%;
    max-height: 250px;
    object-fit: cover;
    display: block;
}

.bp-table-thumb {
    width: 50px;
    height: 50px;
    object-fit: cover;
    border-radius: 6px;
    border: 1px solid var(--bp-gray-200);
}

.bp-form-control-sm {
    padding: 4px 8px;
    font-size: 13px;
}

.bp-form-select-sm {
    padding: 4px 28px 4px 8px;
    font-size: 13px;
}

[data-theme="dark"] .bp-banner-preview {
    border-color: var(--bp-gray-600);
}

[data-theme="dark"] .bp-table-thumb {
    border-color: var(--bp-gray-600);
}

.bp-input-narrow {
    width: 80px;
    min-width: 80px;
}

.bp-input-medium {
    width: 120px;
    min-width: 120px;
}

.bp-col-qty {
    width: 110px;
}

.bp-col-price {
    width: 150px;
}

.bp-col-img {
    width: 72px;
}

.bp-line-item-img {
    width: 50px;
    height: auto;
    object-fit: cover;
    border-radius: 6px;
    border: 1px solid var(--bp-border, var(--bp-border));
}

.bp-line-item-img-ph {
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bp-bg, var(--bp-bg));
    color: var(--bp-text-muted, var(--bp-gray-600));
    font-size: 18px;
}

[data-theme="dark"] .bp-line-item-img-ph {
    background: var(--bp-bg-dark, var(--bp-bg));
    border-color: var(--bp-border-dark, var(--bp-border));
}

.bp-col-product {
    width: 100%;
    min-width: 340px;
}

#lineItemsTable .bp-line-item-qty {
    width: 70px;
    min-width: 70px;
}

#lineItemsTable .bp-line-item-price {
    width: 100px;
    min-width: 100px;
}

#lineItemsTable .bp-line-item-discount {
    width: 88px;
    min-width: 88px;
}

#lineItemsTable .line-item-total {
    width: 96px;
    text-align: left !important;
}

#purchaseItemsTable td:first-child {
    min-width: 250px;
    max-width: 380px;
}

#purchaseItemsTable td:nth-child(2) {
    min-width: 200px;
    max-width: 300px;
}

.bp-pos-variant-badge {
    position: absolute;
    top: 6px;
    right: 6px;
    background: var(--bp-primary);
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 4px;
    line-height: 1.3;
}

.bp-pos-item {
    position: relative;
}

.bp-variant-option {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 12px 14px;
    border: 1px solid var(--bp-gray-200);
    border-radius: 8px;
    background: var(--bp-white);
    cursor: pointer;
    margin-bottom: 8px;
    text-align: left;
    transition: all 0.15s;
    -webkit-transition: all 0.15s;
    -moz-transition: all 0.15s;
    -ms-transition: all 0.15s;
    -o-transition: all 0.15s;
}

.bp-variant-option:hover {
    border-color: var(--bp-primary);
    background: var(--bp-primary-bg, #f0f7ff);
}

.bp-variant-option-name {
    font-weight: 600;
    font-size: 13px;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
}

.bp-variant-option-sku {
    margin-top: 2px;
}

.bp-variant-option-price {
    font-weight: 800;
    font-size: 14px;
    color: var(--bp-primary);
    white-space: nowrap;
    margin-left: 12px;
}

.bp-variant-attr {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: var(--bp-gray-100);
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 12px;
}

.bp-variant-color-dot {
    display: inline-block;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: 1px solid var(--bp-gray-300);
}

[data-theme="dark"] .bp-variant-option {
    border-color: var(--bp-gray-600);
    background: var(--bp-gray-700);
}

[data-theme="dark"] .bp-variant-option:hover {
    border-color: var(--bp-primary-light);
    background: var(--bp-gray-600);
}

[data-theme="dark"] .bp-variant-attr {
    background: var(--bp-gray-600);
}

.bp-pos-offline-bar {
    display: none;
    background: var(--bp-warning);
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    text-align: center;
    padding: 6px 12px;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 9999;
}

.bp-pos-offline-bar.active {
    display: block;
}

.bp-pos-offline-bar i {
    margin-right: 6px;
}

.bp-pos-queued-badge {
    background: var(--bp-warning);
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: 10px;
    margin-left: 6px;
}

.bp-settlement-stat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.bp-settlement-method-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.bp-settlement-method-card {
    background: var(--bp-white);
    border: 1px solid var(--bp-gray-200);
    border-radius: 10px;
    padding: 16px;
    display: flex;
    align-items: center;
    gap: 14px;
}

.bp-settlement-method-icon {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    flex-shrink: 0;
}

.bp-settlement-method-icon.icon-cash {
    background: #e8f5e9;
    color: var(--bp-success);
}

.bp-settlement-method-icon.icon-mobile {
    background: #fce4ec;
    color: #d81b60;
}

.bp-settlement-method-icon.icon-card {
    background: #e3f2fd;
    color: var(--bp-info);
}

.bp-settlement-method-icon.icon-bank {
    background: #fff3e0;
    color: var(--bp-warning);
}

.bp-settlement-method-icon.icon-advance {
    background: #f3e5f5;
    color: #8e24aa;
}

.bp-settlement-method-info {
    flex: 1;
    min-width: 0;
}

.bp-settlement-method-label {
    font-size: 12px;
    color: var(--bp-muted);
    font-weight: 600;
    text-transform: uppercase;
}

.bp-settlement-method-amount {
    font-size: 18px;
    font-weight: 800;
    color: var(--bp-dark);
}

.bp-settlement-method-count {
    font-size: 11px;
    color: var(--bp-muted);
}

.bp-cash-count-table input {
    width: 80px;
    text-align: center;
}

.bp-cash-count-table td.total-col {
    font-weight: 700;
    text-align: right;
}

.bp-settlement-variance {
    font-size: 20px;
    font-weight: 800;
}

.bp-settlement-variance.positive {
    color: var(--bp-success);
}

.bp-settlement-variance.negative {
    color: var(--bp-danger);
}

.bp-settlement-variance.zero {
    color: var(--bp-muted);
}

[data-theme="dark"] .bp-settlement-method-card {
    background: var(--bp-gray-700);
    border-color: var(--bp-gray-600);
}

[data-theme="dark"] .bp-settlement-method-icon.icon-cash {
    background: color-mix(in srgb, var(--bp-success) 15%, transparent);
}

[data-theme="dark"] .bp-settlement-method-icon.icon-mobile {
    background: rgba(216, 27, 96, 0.15);
}

[data-theme="dark"] .bp-settlement-method-icon.icon-card {
    background: color-mix(in srgb, var(--bp-primary) 15%, transparent);
}

[data-theme="dark"] .bp-settlement-method-icon.icon-bank {
    background: color-mix(in srgb, var(--bp-warning) 15%, transparent);
}

[data-theme="dark"] .bp-settlement-method-icon.icon-advance {
    background: rgba(142, 36, 170, 0.15);
}

.bp-admin-error-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bp-bg);
    padding: 40px 20px;
}

.bp-admin-error-container {
    text-align: center;
    max-width: 520px;
    width: 100%;
}

.bp-admin-error-brand h4 {
    font-size: 22px;
    font-weight: 800;
    margin-bottom: 40px;
    color: var(--bp-primary);
}

.bp-admin-error-brand .brand-accent {
    color: var(--bp-accent);
}

.bp-admin-error-illustration {
    position: relative;
    margin-bottom: 24px;
    height: 180px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.bp-admin-error-code-bg {
    font-size: 180px;
    font-weight: 900;
    color: var(--bp-primary);
    opacity: 0.07;
    line-height: 1;
    letter-spacing: -8px;
    position: absolute;
    user-select: none;
}

.bp-admin-error-icon {
    position: relative;
    z-index: 1;
    width: 90px;
    height: 90px;
    border-radius: 50%;
    background: var(--bp-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 12px 40px color-mix(in srgb, var(--bp-primary) 25%, transparent);
}

.bp-admin-error-icon i {
    font-size: 36px;
    color: #fff;
}

.bp-admin-error-title {
    font-size: 26px;
    font-weight: 800;
    color: var(--bp-dark);
    margin-bottom: 10px;
}

.bp-admin-error-desc {
    font-size: 14px;
    color: var(--bp-muted);
    line-height: 1.7;
    margin-bottom: 30px;
}

.bp-admin-error-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 36px;
}

.bp-admin-error-links {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 36px;
}

.bp-admin-error-links a {
    font-size: 13px;
    font-weight: 600;
    color: var(--bp-primary);
    text-decoration: none;
    transition: color 0.15s;
    -webkit-transition: color 0.15s;
    -moz-transition: color 0.15s;
    -ms-transition: color 0.15s;
    -o-transition: color 0.15s;
}

.bp-admin-error-links a:hover {
    color: var(--bp-primary-dark);
    text-decoration: underline;
}

.bp-admin-error-footer {
    font-size: 12px;
    color: var(--bp-gray-400);
}

[data-theme="dark"] .bp-admin-error-page {
    background: var(--bp-bg);
}

[data-theme="dark"] .bp-admin-error-title {
    color: var(--bp-text);
}

[data-theme="dark"] .bp-admin-error-code-bg {
    color: var(--bp-primary-light);
    opacity: 0.08;
}

[data-theme="dark"] .bp-admin-error-icon {
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
}

[data-theme="dark"] .bp-admin-error-links a {
    color: var(--bp-primary-light);
}

[data-theme="dark"] .bp-admin-error-footer {
    color: var(--bp-gray-600);
}

.form-check-input:checked {
    background-color: var(--bp-primary-solid);
    border-color: var(--bp-primary-solid);
}

.form-check-input:focus {
    border-color: var(--bp-primary);
    box-shadow: 0 0 0 3px var(--bp-primary-50);
}

.form-switch .form-check-input:checked {
    background-color: var(--bp-primary-solid);
    border-color: var(--bp-primary-solid);
}

[data-theme="dark"] .form-check-input:checked {
    background-color: var(--bp-primary-light);
    border-color: var(--bp-primary-light);
}

[data-theme="dark"] .form-check-input:focus {
    box-shadow: 0 0 0 0.2rem color-mix(in srgb, var(--bp-primary) 30%, transparent);
}

input[type="checkbox"]:not(.form-check-input),
input[type="radio"]:not(.form-check-input) {
    accent-color: var(--bp-primary);
}

[data-theme="dark"] input[type="checkbox"]:not(.form-check-input),
[data-theme="dark"] input[type="radio"]:not(.form-check-input) {
    accent-color: var(--bp-primary-light);
}

.bp-col-amount {
    width: 180px;
}

.bp-table-group-header td {
    background-color: var(--bp-gray-100);
    padding-top: 14px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--bp-gray-300);
    letter-spacing: 0.5px;
}

.bp-table-subtotal-row td {
    background-color: var(--bp-gray-100);
    border-top: 2px solid var(--bp-gray-300);
    border-bottom: 2px solid var(--bp-gray-300);
    padding-top: 10px;
    padding-bottom: 10px;
}

.bp-table-highlight-row td {
    background-color: var(--bp-gray-200);
    border-top: 2px solid var(--bp-gray-400);
    border-bottom: 2px solid var(--bp-gray-400);
    padding-top: 12px;
    padding-bottom: 12px;
}

.bp-bg-success-light {
    background-color: color-mix(in srgb, var(--bp-success) 8%, transparent) !important;
}

[data-theme="dark"] .bp-bg-success-light {
    background-color: color-mix(in srgb, var(--bp-success) 15%, transparent) !important;
}

.bp-cashflow-table {
    /* table-layout: fixed; */
}

.bp-cashflow-table th,
.bp-cashflow-table td {
    vertical-align: middle;
}

.bp-cf-header-in {
    background-color: var(--bp-primary) !important;
    color: #fff !important;
    font-size: 14px;
    font-weight: 700;
    padding: 10px 16px;
    letter-spacing: 0.5px;
}

.bp-cf-header-out {
    background-color: var(--bp-warning) !important;
    color: #fff !important;
    font-size: 14px;
    font-weight: 700;
    padding: 10px 16px;
    letter-spacing: 0.5px;
}

.bp-cf-icon {
    width: 20px;
    text-align: center;
    margin-right: 8px;
    font-size: 13px;
}

.bp-cf-total-row td {
    background-color: var(--bp-gray-100);
    border-top: 2px solid var(--bp-gray-300);
    padding-top: 12px;
    padding-bottom: 12px;
    font-size: 14px;
}

.bp-cf-summary-row td {
    padding-top: 10px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--bp-gray-200);
}

.bp-cf-closing-row td {
    background-color: color-mix(in srgb, var(--bp-success) 8%, transparent);
    border-top: 2px solid var(--bp-gray-400);
    padding-top: 14px;
    padding-bottom: 14px;
}

[data-theme="dark"] .bp-cf-closing-row td {
    background-color: color-mix(in srgb, var(--bp-success) 15%, transparent);
}

.bp-form-color {
    width: 42px;
    height: 38px;
    padding: 2px;
    border: 1px solid var(--bp-gray-300);
    border-radius: 4px;
    cursor: pointer;
    flex-shrink: 0;
}

.bp-form-color::-webkit-color-swatch-wrapper {
    padding: 2px;
}

.bp-form-color::-webkit-color-swatch {
    border: none;
    border-radius: 2px;
}

[data-theme="dark"] .bp-form-color {
    border-color: var(--bp-gray-400);
}

.bp-lp-success-wrapper {
    min-height: 100vh;
    align-items: center;
}

.bp-lp-success-card {
    background: #fff;
    border-radius: 12px;
    padding: 40px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.bp-lp-success-icon {
    width: 80px;
    height: 80px;
    background: var(--bp-success);
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    color: #fff;
    font-size: 36px;
}

.bp-lp-success-title {
    font-weight: 800;
    color: var(--bp-dark);
    margin-bottom: 10px;
}

.bp-lp-success-desc {
    color: var(--bp-gray-600);
    font-size: 16px;
}

.bp-lp-success-order {
    background: var(--bp-gray-100);
    border-radius: 8px;
    padding: 16px;
    margin: 20px 0;
}

.bp-lp-success-order-label {
    font-size: 13px;
    color: var(--bp-gray-600);
}

.bp-lp-success-order-number {
    font-weight: 800;
    color: var(--bp-primary);
    margin: 4px 0 0;
}

.bp-lp-success-note {
    color: var(--bp-gray-600);
    font-size: 14px;
}

.bp-lp-success-btn {
    display: inline-block;
    margin-top: 16px;
    padding: 10px 24px;
    background: var(--bp-primary);
    color: #fff;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
    transition: var(--bp-transition);
    -webkit-transition: var(--bp-transition);
    -moz-transition: var(--bp-transition);
    -ms-transition: var(--bp-transition);
    -o-transition: var(--bp-transition);
}

.bp-lp-success-btn:hover {
    background: var(--bp-primary-dark);
    color: #fff;
}

.bp-lp-preview-frame {
    width: 100%;
    height: calc(100vh - 200px);
    border: none;
    border-radius: 0 0 var(--bp-border-radius) var(--bp-border-radius);
}

.bp-lp-preview-sticky {
    position: sticky;
    top: 76px;
}

.bp-lp-hero-thumb {
    max-height: 80px;
}

.bp-lp-css-editor {
    font-family: monospace;
    font-size: 12px;
}

.bp-template-card {
    display: block;
    border: 2px solid var(--bp-gray-300);
    border-radius: 6px;
    padding: 16px;
    cursor: pointer;
    transition: var(--bp-transition);
    -webkit-transition: var(--bp-transition);
    -moz-transition: var(--bp-transition);
    -ms-transition: var(--bp-transition);
    -o-transition: var(--bp-transition);
}

.bp-template-card:hover {
    border-color: var(--bp-primary-light);
}

.bp-template-card.active {
    border-color: var(--bp-primary);
    background-color: color-mix(in srgb, var(--bp-primary) 5%, transparent);
}

[data-theme="dark"] .bp-template-card {
    border-color: var(--bp-gray-400);
}

[data-theme="dark"] .bp-template-card.active {
    border-color: var(--bp-primary-light);
    background-color: color-mix(in srgb, var(--bp-primary) 10%, transparent);
}

[data-theme="dark"] .bp-lp-success-card {
    background: var(--bp-gray-200);
}

[data-theme="dark"] .bp-lp-success-order {
    background: var(--bp-gray-300);
}

[data-theme="dark"] .bp-lp-success-btn {
    background: var(--bp-primary-light);
}

[data-theme="dark"] .bp-lp-success-btn:hover {
    background: var(--bp-primary);
}

.bp-thumbnail-preview {
    max-width: 170px;
    max-height: 170px;
    border-radius: var(--bp-border-radius);
}

.bp-thumbnail-dropzone {
    padding: 20px 16px;
}

.bp-thumb-figure {
    display: none;
    position: relative;
    margin: 0;
}

.bp-image-dropzone.has-image .bp-thumb-figure {
    display: inline-block;
}

.bp-image-dropzone.has-image .bp-thumb-placeholder {
    display: none;
}

.bp-image-dropzone.has-image .bp-thumbnail-preview {
    margin-bottom: 0;
}

.bp-thumb-remove {
    position: absolute;
    top: -8px;
    right: -8px;
    width: 24px;
    height: 24px;
    padding: 0;
    border-radius: 50%;
    border: 2px solid var(--bp-surface);
    background: var(--bp-danger);
    color: #fff;
    font-size: 12px;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--bp-transition);
    -webkit-transition: var(--bp-transition);
    -moz-transition: var(--bp-transition);
    -ms-transition: var(--bp-transition);
    -o-transition: var(--bp-transition);
}

.bp-thumb-remove:hover {
    filter: brightness(0.9);
    transform: scale(1.08);
    -webkit-transform: scale(1.08);
    -moz-transform: scale(1.08);
    -ms-transform: scale(1.08);
    -o-transform: scale(1.08);
}

[data-theme="dark"] .bp-thumb-remove {
    border-color: var(--bp-surface-dark, var(--bp-border));
}

.bp-variant-value-check {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    border: 1px solid var(--bp-gray-300);
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    user-select: none;
    transition: var(--bp-transition);
    -webkit-transition: var(--bp-transition);
    -moz-transition: var(--bp-transition);
    -ms-transition: var(--bp-transition);
    -o-transition: var(--bp-transition);
}

.bp-variant-value-check:has(input:checked) {
    background: var(--bp-primary);
    border-color: var(--bp-primary);
    color: #fff;
}

.bp-variant-value-check input {
    display: none;
}

.bp-selected-variant-attr {
    padding: 10px 12px;
    background: var(--bp-gray-100);
    border-radius: var(--bp-border-radius);
}

[data-theme="dark"] .bp-variant-value-check {
    border-color: var(--bp-gray-400);
    color: var(--bp-gray-600);
}

[data-theme="dark"] .bp-selected-variant-attr {
    background: var(--bp-gray-200);
}

.bp-status-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.bp-status-tab {
    display: flex;
    flex-wrap: wrap;
    flex-direction: row-reverse;
    align-items: center;
    padding: 8px 20px;
    text-decoration: none;
    color: var(--colorBlack);
    gap: 6px;
    background: var(--colorWhite);
    border: 1px solid #ddd;
    border-radius: 6px;
    -webkit-border-radius: 6px;
    -moz-border-radius: 6px;
    -ms-border-radius: 6px;
    -o-border-radius: 6px;
}

.bp-status-tab:hover,
.bp-status-tab.active {
    color: var(--colorWhite);
    background: var(--themeColorTwo);
    border-color: var(--themeColorTwo);
}

.bp-status-tab-count {
    font-size: 12px;
    font-weight: 600;
}

.bp-status-tab-label {
    font-size: 12px;
    font-weight: 600;
    text-transform: capitalize;
    letter-spacing: 0.3px;
}

[data-theme="dark"] .bp-status-tab {
    color: var(--bp-gray-500);
}

[data-theme="dark"] .bp-status-tab:hover,
[data-theme="dark"] .bp-status-tab.active {
    color: var(--bp-primary-light);
    border-bottom-color: var(--bp-primary-light);
    background: color-mix(in srgb, var(--bp-primary) 8%, transparent);
}

.bp-sale-row-cancelled {
    background: color-mix(in srgb, var(--bp-danger) 6%, transparent) !important;
}

.bp-sale-row-delivered {
    background: color-mix(in srgb, var(--bp-success) 6%, transparent) !important;
}

.bp-sale-row-returned,
.bp-sale-row-return_received {
    background: color-mix(in srgb, var(--bp-warning) 6%, transparent) !important;
}

.bp-sale-row-draft {
    background: rgba(127, 140, 141, 0.06) !important;
}

.bp-sale-row-on_hold {
    background: color-mix(in srgb, var(--bp-accent) 6%, transparent) !important;
}

[data-theme="dark"] .bp-sale-row-cancelled {
    background: color-mix(in srgb, var(--bp-danger) 12%, transparent) !important;
}

[data-theme="dark"] .bp-sale-row-delivered {
    background: color-mix(in srgb, var(--bp-success) 12%, transparent) !important;
}

[data-theme="dark"] .bp-sale-row-returned,
[data-theme="dark"] .bp-sale-row-return_received {
    background: color-mix(in srgb, var(--bp-warning) 12%, transparent) !important;
}

[data-theme="dark"] .bp-sale-row-draft {
    background: rgba(127, 140, 141, 0.12) !important;
}

[data-theme="dark"] .bp-sale-row-on_hold {
    background: color-mix(in srgb, var(--bp-accent) 12%, transparent) !important;
}

.bp-search-item-img {
    width: 36px;
    height: 36px;
    border-radius: 6px;
    object-fit: cover;
    flex-shrink: 0;
}

.bp-search-item-img-placeholder {
    background: var(--bp-gray-200);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--bp-gray-400);
    font-size: 14px;
}

.bp-bulk-actions {
    display: none;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background: var(--bp-primary);
    color: #fff;
    border-radius: var(--bp-border-radius);
    margin-bottom: 12px;
    font-size: 13px;
    font-weight: 600;
}

.bp-bulk-actions.show {
    display: flex;
}

.bp-bulk-actions .bp-bulk-count {
    background: rgba(255, 255, 255, 0.2);
    padding: 2px 10px;
    border-radius: 20px;
    font-weight: 700;
}

.bp-bulk-actions .bp-btn {
    border-color: rgba(255, 255, 255, 0.3);
    color: #fff;
    font-size: 12px;
}

.bp-bulk-actions .bp-btn:hover {
    background: rgba(255, 255, 255, 0.15);
}

.bp-table-bulk-actions {
    display: none;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-left: auto;
}

.bp-table-bulk-actions.show {
    display: flex;
}

.bp-bulk-toolbar {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

.bp-bulk-toolbar .bp-btn,
.bp-bulk-toolbar .bp-form-select {
    height: 32px;
    box-sizing: border-box;
    font-size: 12px;
}

.bp-table-bulk-actions .bp-table-bulk-count,
.bp-bulk-toolbar .bp-table-bulk-count {
    font-size: 12px;
    font-weight: 700;
    color: var(--bp-text-muted, var(--bp-gray-600));
    padding-right: 4px;
}

.bp-table-bulk-actions .bp-form-select-sm,
.bp-bulk-toolbar .bp-form-select-sm {
    min-width: 140px;
}

.bp-bulk-toolbar .bp-bulk-status-select {
    color: #fff;
    background-color: var(--bp-success);
    border-color: var(--bp-success);
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16' fill='none' stroke='%23ffffff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='4 6 8 10 12 6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 8px center;
    background-size: 12px;
}

.bp-bulk-toolbar .bp-bulk-status-select:focus {
    color: #fff;
    background-color: #196f3d;
    border-color: #196f3d;
}

.bp-bulk-toolbar .bp-bulk-status-select option {
    color: var(--bp-text, var(--bp-text));
    background-color: #fff;
}

[data-theme="dark"] .bp-bulk-toolbar .bp-bulk-status-select option {
    color: var(--bp-text-dark, var(--bp-text));
    background-color: var(--bp-surface-dark, var(--bp-surface));
}

.bp-bulk-toolbar .bp-btn:disabled,
.bp-bulk-toolbar .bp-form-select:disabled {
    background-color: var(--bp-gray-200);
    border-color: var(--bp-gray-300);
    color: var(--bp-gray-500);
    opacity: 1;
    cursor: not-allowed;
    pointer-events: none;
}

.bp-bulk-toolbar .bp-bulk-status-select:disabled {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16' fill='none' stroke='%237f8c8d' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='4 6 8 10 12 6'/%3E%3C/svg%3E");
}

[data-theme="dark"] .bp-bulk-toolbar .bp-btn:disabled,
[data-theme="dark"] .bp-bulk-toolbar .bp-form-select:disabled {
    background-color: var(--bp-gray-200);
    border-color: var(--bp-gray-400);
    color: var(--bp-gray-600);
}

[data-theme="dark"] .bp-table-bulk-actions .bp-table-bulk-count,
[data-theme="dark"] .bp-bulk-toolbar .bp-table-bulk-count {
    color: var(--bp-text-muted-dark, var(--bp-gray-600));
}

.bp-bulk-actions .bp-bulk-select {
    min-width: 140px;
    color: #fff;
    background-color: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.3);
}

.bp-bulk-actions .bp-bulk-select:focus {
    background-color: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.5);
    color: #fff;
    box-shadow: none;
}

.bp-bulk-actions .bp-bulk-select option {
    color: var(--bp-text, var(--bp-text));
    background-color: #fff;
}

[data-theme="dark"] .bp-bulk-actions .bp-bulk-select option {
    color: var(--bp-text-dark, var(--bp-text));
    background-color: var(--bp-surface-dark, var(--bp-surface));
}

.bp-radio-card {
    display: block;
    cursor: pointer;
    margin: 0;
    position: relative;
}

.bp-radio-card input[type="radio"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.bp-radio-card-body {
    border: 2px solid var(--bp-border, var(--bp-border));
    border-radius: 8px;
    padding: 14px 16px;
    background: var(--bp-surface, #fff);
    transition: border-color 0.15s ease, background 0.15s ease;
    -webkit-transition: border-color 0.15s ease, background 0.15s ease;
    -moz-transition: border-color 0.15s ease, background 0.15s ease;
    -ms-transition: border-color 0.15s ease, background 0.15s ease;
    -o-transition: border-color 0.15s ease, background 0.15s ease;
}

.bp-radio-card:hover .bp-radio-card-body {
    border-color: var(--bp-primary-light, var(--bp-primary-light));
}

.bp-radio-card.is-active .bp-radio-card-body,
.bp-radio-card input[type="radio"]:checked+.bp-radio-card-body {
    border-color: var(--bp-primary, var(--bp-primary));
    background: color-mix(in srgb, var(--bp-primary) 4%, transparent);
}

[data-theme="dark"] .bp-radio-card-body {
    background: var(--bp-surface-dark, var(--bp-surface));
    border-color: var(--bp-border-dark, var(--bp-border));
}

[data-theme="dark"] .bp-radio-card.is-active .bp-radio-card-body {
    background: color-mix(in srgb, var(--bp-primary) 10%, transparent);
}

.bp-reorderable .bp-drag-handle {
    width: 36px;
    text-align: center;
    cursor: grab;
    color: var(--bp-text-muted, var(--bp-gray-600));
    user-select: none;
    font-size: 14px;
    transition: background 0.15s ease, color 0.15s ease;
    -webkit-transition: background 0.15s ease, color 0.15s ease;
    -moz-transition: background 0.15s ease, color 0.15s ease;
    -ms-transition: background 0.15s ease, color 0.15s ease;
    -o-transition: background 0.15s ease, color 0.15s ease;
}

.bp-reorderable .bp-drag-handle:hover {
    color: var(--bp-primary, var(--bp-primary));
    background: color-mix(in srgb, var(--bp-primary) 6%, transparent);
}

.bp-reorderable .bp-drag-handle:active {
    cursor: grabbing;
}

[data-theme="dark"] .bp-reorderable .bp-drag-handle:hover {
    background: color-mix(in srgb, var(--bp-primary) 12%, transparent);
}

.bp-check {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    user-select: none;
    margin: 0;
    vertical-align: middle;
    line-height: 1;
}

.bp-check input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
    pointer-events: none;
}

.bp-check .bp-check-box {
    position: relative;
    display: inline-block;
    width: 18px;
    height: 18px;
    border: 1.5px solid var(--bp-gray-400, #BDC3C7);
    border-radius: 4px;
    background: #fff;
    flex-shrink: 0;
    transition: background 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
    -webkit-transition: background 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
    -moz-transition: background 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
    -ms-transition: background 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
    -o-transition: background 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.bp-check:hover .bp-check-box {
    border-color: var(--bp-primary, var(--bp-primary));
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--bp-primary) 10%, transparent);
}

.bp-check input[type="checkbox"]:checked+.bp-check-box {
    background: var(--bp-primary, var(--bp-primary));
    border-color: var(--bp-primary, var(--bp-primary));
}

.bp-check input[type="checkbox"]:checked+.bp-check-box::after {
    content: "";
    position: absolute;
    left: 5px;
    top: 1px;
    width: 5px;
    height: 10px;
    border: solid #fff;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
    -webkit-transform: rotate(45deg);
    -moz-transform: rotate(45deg);
    -ms-transform: rotate(45deg);
    -o-transform: rotate(45deg);
}

.bp-check input[type="checkbox"]:focus-visible+.bp-check-box {
    outline: 2px solid var(--bp-primary-light, var(--bp-primary-light));
    outline-offset: 2px;
}

.bp-check input[type="checkbox"]:disabled+.bp-check-box {
    background: var(--bp-gray-100, #ECF0F1);
    border-color: var(--bp-gray-300, #D5DBDB);
    cursor: not-allowed;
}

[data-theme="dark"] .bp-check .bp-check-box {
    background: var(--bp-surface);
    border-color: var(--bp-border);
}

[data-theme="dark"] .bp-check input[type="checkbox"]:checked+.bp-check-box {
    background: var(--bp-primary-light, var(--bp-primary-light));
    border-color: var(--bp-primary-light, var(--bp-primary-light));
}

[data-theme="dark"] .bp-check input[type="checkbox"]:disabled+.bp-check-box {
    background: var(--bp-bg);
    border-color: #2A2F3A;
}

.bp-radio {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    user-select: none;
    margin: 0;
    vertical-align: middle;
    line-height: 1;
}

.bp-radio input[type="radio"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
    pointer-events: none;
}

.bp-radio .bp-radio-dot {
    position: relative;
    display: inline-block;
    width: 18px;
    height: 18px;
    border: 1.5px solid var(--bp-gray-400, #BDC3C7);
    border-radius: 50%;
    background: #fff;
    flex-shrink: 0;
    transition: background 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
    -webkit-transition: background 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
    -moz-transition: background 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
    -ms-transition: background 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
    -o-transition: background 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.bp-radio:hover .bp-radio-dot {
    border-color: var(--bp-primary, var(--bp-primary));
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--bp-primary) 10%, transparent);
}

.bp-radio input[type="radio"]:checked+.bp-radio-dot {
    border-color: var(--bp-primary, var(--bp-primary));
}

.bp-radio input[type="radio"]:checked+.bp-radio-dot::after {
    content: "";
    position: absolute;
    inset: 3px;
    border-radius: 50%;
    background: var(--bp-primary, var(--bp-primary));
}

.bp-radio input[type="radio"]:focus-visible+.bp-radio-dot {
    outline: 2px solid var(--bp-primary-light, var(--bp-primary-light));
    outline-offset: 2px;
}

[data-theme="dark"] .bp-radio .bp-radio-dot {
    background: var(--bp-surface);
    border-color: var(--bp-border);
}

[data-theme="dark"] .bp-radio input[type="radio"]:checked+.bp-radio-dot {
    border-color: var(--bp-primary-light, var(--bp-primary-light));
}

[data-theme="dark"] .bp-radio input[type="radio"]:checked+.bp-radio-dot::after {
    background: var(--bp-primary-light, var(--bp-primary-light));
}

.bp-cat-search {
    position: relative;
}

.bp-cat-search>i {
    position: absolute;
    left: 12px;
    top: 50%;
    color: var(--bp-text-muted, var(--bp-gray-600));
    font-size: 13px;
    pointer-events: none;
    transform: translateY(-50%);
    -webkit-transform: translateY(-50%);
    -moz-transform: translateY(-50%);
    -ms-transform: translateY(-50%);
    -o-transform: translateY(-50%);
}

.bp-cat-search>input {
    padding-left: 34px;
}

.bp-cat-list {
    max-height: 360px;
    overflow-y: auto;
    border: 1px solid var(--bp-border, var(--bp-border));
    border-radius: 6px;
    padding: 6px 4px;
    background: #fff;
}

[data-theme="dark"] .bp-cat-list {
    background: #1F232B;
    border-color: #2A2F3A;
}

.bp-cat-list::-webkit-scrollbar {
    width: 6px;
}

.bp-cat-list::-webkit-scrollbar-thumb {
    background: var(--bp-gray-300, #D5DBDB);
    border-radius: 3px;
}

.bp-cat-item {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 8px 10px;
    padding-left: calc(10px + var(--depth, 0) * 24px);
    cursor: pointer;
    border-radius: 4px;
    margin: 0;
    transition: background 0.12s ease;
    -webkit-transition: background 0.12s ease;
    -moz-transition: background 0.12s ease;
    -ms-transition: background 0.12s ease;
    -o-transition: background 0.12s ease;
}

.bp-cat-item.bp-cat-depth-1:hover span {
    color: var(--themeColorTwo);
}

[data-theme="dark"] .bp-cat-item:hover {
    background: color-mix(in srgb, var(--bp-primary) 10%, transparent);
}

.bp-cat-item input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
    pointer-events: none;
}

.bp-cat-item .bp-check-box {
    position: relative;
    display: inline-block;
    width: 18px;
    height: 18px;
    border: 1.5px solid var(--bp-gray-400, #BDC3C7);
    border-radius: 4px;
    background: #fff;
    flex-shrink: 0;
    transition: background 0.15s ease, border-color 0.15s ease;
    -webkit-transition: background 0.15s ease, border-color 0.15s ease;
    -moz-transition: background 0.15s ease, border-color 0.15s ease;
    -ms-transition: background 0.15s ease, border-color 0.15s ease;
    -o-transition: background 0.15s ease, border-color 0.15s ease;
}

.bp-cat-item input[type="checkbox"]:checked+.bp-check-box {
    background: var(--bp-primary, var(--bp-primary));
    border-color: var(--bp-primary, var(--bp-primary));
}

.bp-cat-item input[type="checkbox"]:checked+.bp-check-box::after {
    content: "";
    position: absolute;
    left: 5px;
    top: 1px;
    width: 5px;
    height: 10px;
    border: solid #fff;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
    -webkit-transform: rotate(45deg);
    -moz-transform: rotate(45deg);
    -ms-transform: rotate(45deg);
    -o-transform: rotate(45deg);
}

[data-theme="dark"] .bp-cat-item .bp-check-box {
    background: var(--bp-surface);
    border-color: var(--bp-border);
}

[data-theme="dark"] .bp-cat-item input[type="checkbox"]:checked+.bp-check-box {
    background: var(--bp-primary-light, var(--bp-primary-light));
    border-color: var(--bp-primary-light, var(--bp-primary-light));
}

.bp-cat-label {
    color: var(--bp-text, var(--bp-text));
    font-size: 13px;
    font-weight: 600;
    line-height: 1.3;
    flex: 1;
    transition: all linear .3s;
    -webkit-transition: all linear .3s;
    -moz-transition: all linear .3s;
    -ms-transition: all linear .3s;
    -o-transition: all linear .3s;
}

.bp-cat-item input[type="checkbox"]:checked~.bp-cat-label {
    color: var(--bp-primary, var(--bp-primary));
}

[data-theme="dark"] .bp-cat-label {
    color: var(--bp-text-dark, var(--bp-text));
}

[data-theme="dark"] .bp-cat-item input[type="checkbox"]:checked~.bp-cat-label {
    color: var(--bp-primary-light, var(--bp-primary-light));
}

.bp-cat-item.bp-cat-depth-0>.bp-cat-label {
    font-weight: 800;
}

.bp-cat-item.bp-cat-depth-0:not(:first-child) {
    margin-top: 2px;
    border-top: 1px solid transparent;
}

.bp-cat-list .bp-cat-item.bp-cat-depth-0+.bp-cat-item:not(.bp-cat-depth-0) {
    margin-top: 0;
}

.bp-cat-item.bp-cat-depth-0 {
    background: color-mix(in srgb, var(--bp-primary) 3%, transparent);
}

[data-theme="dark"] .bp-cat-item.bp-cat-depth-0 {
    background: color-mix(in srgb, var(--bp-primary) 6%, transparent);
}

.bp-cat-item.bp-cat-depth-0:hover span {
    color: var(--themeColorTwo);
}

[data-theme="dark"] .bp-cat-item.bp-cat-depth-0:hover {
    background: color-mix(in srgb, var(--bp-primary) 12%, transparent);
}

.bp-reorderable tr.bp-dragging {
    opacity: 0.4;
    background: color-mix(in srgb, var(--bp-primary) 5%, transparent);
}

.bp-reorderable tr {
    transition: background 0.15s ease;
    -webkit-transition: background 0.15s ease;
    -moz-transition: background 0.15s ease;
    -ms-transition: background 0.15s ease;
    -o-transition: background 0.15s ease;
}

[data-theme="dark"] .bp-reorderable tr.bp-dragging {
    background: color-mix(in srgb, var(--bp-primary) 10%, transparent);
}

.bp-reorder-col {
    width: 36px;
}

.bp-sale-form-wrapper {
    padding-bottom: 80px;
}

.bp-sale-totals-bar {
    position: fixed;
    bottom: 0;
    left: 250px;
    right: 0;
    z-index: 1020;
    background: var(--bp-surface, #fff);
    border-top: 2px solid var(--bp-primary, var(--bp-primary));
    box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.06);
    padding: 12px 24px;
}

.bp-sale-totals-bar .bp-totals-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 16px;
    align-items: center;
}

.bp-sale-totals-bar .bp-totals-cell {
    display: flex;
    flex-direction: column;
}

.bp-sale-totals-bar .bp-totals-label {
    font-size: 11px;
    text-transform: uppercase;
    color: var(--bp-text-muted, var(--bp-gray-600));
    font-weight: 700;
    letter-spacing: 0.3px;
}

.bp-sale-totals-bar .bp-totals-value {
    font-size: 15px;
    font-weight: 800;
    color: var(--bp-text, var(--bp-text));
    margin-top: 2px;
}

.bp-sale-totals-bar .bp-totals-cell.grand .bp-totals-value {
    color: var(--bp-primary, var(--bp-primary));
    font-size: 17px;
}

[data-theme="dark"] .bp-sale-totals-bar {
    background: var(--bp-surface-dark, var(--bp-surface));
    border-top-color: var(--bp-primary-light, var(--bp-primary-light));
    box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.3);
}

[data-theme="dark"] .bp-sale-totals-bar .bp-totals-value {
    color: var(--bp-text-dark, var(--bp-text));
}

[data-theme="dark"] .bp-sale-totals-bar .bp-totals-cell.grand .bp-totals-value {
    color: var(--bp-primary-light, var(--bp-primary-light));
}

@media (max-width: 1199.98px) {
    .bp-sale-totals-bar {
        left: 0;
        padding: 10px 16px;
    }
}

@media (max-width: 767.98px) {
    .bp-sale-totals-bar .bp-totals-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }

    .bp-sale-totals-bar .bp-totals-value {
        font-size: 13px;
    }
}

.bp-sale-product-search {
    display: flex;
    align-items: stretch;
}

.bp-sale-product-search .bp-barcode-btn {
    flex: 0 0 auto;
    width: 46px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--bp-border, var(--bp-border));
    border-right: 0;
    border-radius: 6px 0 0 6px;
    background: var(--bp-bg, var(--bp-bg));
    color: var(--bp-text-muted, var(--bp-gray-600));
    cursor: pointer;
}

.bp-sale-product-search .bp-form-control {
    border-radius: 0 6px 6px 0;
    flex: 1 1 auto;
}

[data-theme="dark"] .bp-sale-product-search .bp-barcode-btn {
    background: var(--bp-bg-dark, var(--bp-bg));
    border-color: var(--bp-border-dark, var(--bp-border));
    color: var(--bp-text-muted, var(--bp-gray-600));
}

.bp-product-search-wrapper {
    position: relative;
}

.bp-product-search {
    display: flex;
    align-items: stretch;
}

.bp-product-search .bp-barcode-btn {
    flex: 0 0 auto;
    width: 46px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--bp-border, var(--bp-border));
    border-right: 0;
    border-radius: 6px 0 0 6px;
    background: var(--bp-bg, var(--bp-bg));
    color: var(--bp-text-muted, var(--bp-gray-600));
    cursor: pointer;
}

.bp-product-search .bp-form-control {
    border-radius: 0 6px 6px 0;
    flex: 1 1 auto;
}

.bp-product-search-results {
    display: none;
}

.bp-search-item.is-active {
    background: var(--bp-gray-100);
}

[data-theme="dark"] .bp-product-search .bp-barcode-btn {
    background: var(--bp-bg-dark, var(--bp-bg));
    border-color: var(--bp-border-dark, var(--bp-border));
    color: var(--bp-text-muted, var(--bp-gray-600));
}

[data-theme="dark"] .bp-search-item.is-active {
    background: rgba(255, 255, 255, 0.05);
}

.bp-courier-section {
    display: none;
}

.bp-courier-section.is-active {
    display: flex;
}

.bp-order-table input.bp-form-control,
.bp-order-table select.bp-form-select {
    min-width: 64px;
    padding: 6px 8px;
    font-size: 13px;
}

.bp-order-table .order-qty {
    width: 70px;
}

.bp-order-table .order-batch {
    width: 110px;
}

.bp-order-table .order-discount {
    width: 90px;
}

.bp-order-table .order-tax {
    width: 80px;
}

.bp-order-table td {
    vertical-align: middle;
}

.bp-order-table .empty-row td {
    text-align: center;
    padding: 24px;
    color: var(--bp-text-muted, var(--bp-gray-600));
    font-style: italic;
}

.bp-sale-thumb {
    width: 48px;
    height: 48px;
    object-fit: cover;
    border-radius: 4px;
    border: 1px solid var(--bp-border, var(--bp-border));
    background: #fff;
}

.bp-sale-thumb-placeholder {
    width: 48px;
    height: 48px;
    border-radius: 4px;
    border: 1px dashed var(--bp-border, var(--bp-border));
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--bp-text-muted, var(--bp-gray-600));
    background: var(--bp-bg, var(--bp-bg));
}

.bp-sale-products {
    max-width: 260px;
}

.bp-sale-customer {
    min-width: 200px;
}

.bp-sale-customer .fw-700 {
    font-weight: 600;
}

.bp-inline-status {
    min-width: 130px;
}

[data-theme="dark"] .bp-sale-thumb {
    border-color: var(--bp-border-dark, var(--bp-border));
    background: var(--bp-bg);
}

.bp-label-preview-wrap {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 16px;
    background:
        var(--bp-row-hover);
    border: 1px solid var(--bp-border, var(--bp-border));
    border-radius: 6px;
    min-height: 140px;
}

.bp-label-preview {
    background: #fff;
    border: 1px dashed #aaa;
    padding: 6px 8px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    font-family: 'Nunito Sans', sans-serif;
    color: #000;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.bp-label-preview .label-business {
    font-size: 7px;
    font-weight: 600;
    color: #666;
    margin-bottom: 1px;
}

.bp-label-preview .label-name {
    font-size: 9px;
    font-weight: 700;
    line-height: 1.2;
    max-height: 20px;
    overflow: hidden;
    margin-bottom: 2px;
}

.bp-label-preview svg {
    display: block;
    margin: 0 auto;
}

.bp-label-preview .label-price {
    font-size: 10px;
    font-weight: 800;
    margin-top: 2px;
}

.bp-label-preview.size-38x25 {
    width: 38mm;
    height: 25mm;
}

.bp-label-preview.size-50x25 {
    width: 50mm;
    height: 25mm;
}

.bp-label-preview.size-50x30 {
    width: 50mm;
    height: 30mm;
}

[data-theme="dark"] .bp-label-preview-wrap {
    background:
        var(--bp-row-hover);
    border-color: var(--bp-border-dark, var(--bp-border));
}

[data-theme="dark"] .bp-label-preview {
    background: #fff;
    color: #000;
}

.bp-invoice-quick-view {
    color: var(--bp-text, var(--bp-text));
}

.bp-invoice-qv-logo {
    width: 60px;
    height: 60px;
    object-fit: contain;
    border-radius: 6px;
}

.bp-invoice-qv-logo-placeholder {
    width: 60px;
    height: 60px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    background: var(--bp-bg, var(--bp-bg));
    color: var(--bp-text-muted, var(--bp-gray-600));
    font-size: 24px;
    flex-shrink: 0;
}

.bp-invoice-qv-biz-name {
    font-weight: 800;
    font-size: 16px;
    line-height: 1.2;
    margin-bottom: 2px;
}

.bp-invoice-qv-title {
    font-weight: 800;
    font-size: 22px;
    letter-spacing: 2px;
    color: var(--bp-primary, var(--bp-primary));
    line-height: 1;
    margin-bottom: 4px;
}

.bp-invoice-qv-head {
    padding-bottom: 16px;
    border-bottom: 2px solid var(--bp-primary, var(--bp-primary));
}

.bp-invoice-qv-party {
    background: var(--bp-bg, var(--bp-bg));
    border: 1px solid var(--bp-border, var(--bp-border));
    border-radius: 6px;
    padding: 14px 16px;
    height: 100%;
}

.bp-invoice-qv-party-label {
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    margin-bottom: 5px;
    color: var(--themeColorTwo);
}

.bp-invoice-qv-party-name {
    font-weight: 600;
    font-size: 14px;
    color: var(--bp-text, var(--bp-text));
    margin-bottom: 4px;
}

.bp-invoice-qv-meta {
    display: grid;
    grid-template-columns: max-content 1fr;
    column-gap: 12px;
    row-gap: 4px;
    font-size: 13px;
}

.bp-invoice-qv-meta dt {
    font-weight: 700;
}

.bp-invoice-qv-meta dd {
    margin: 0;
    color: var(--bp-text, var(--bp-text));
    word-break: break-word;
}

.bp-invoice-qv-thumb {
    width: 32px;
    height: 32px;
    object-fit: cover;
    border-radius: 4px;
    border: 1px solid var(--bp-border, var(--bp-border));
}

.bp-invoice-qv-thumb-placeholder {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--bp-bg, var(--bp-bg));
    color: var(--bp-text-muted, var(--bp-gray-600));
}

.bp-invoice-qv-items table thead th {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.bp-invoice-quick-view .bp-invoice-qv-grand th {
    font-weight: 600;
}

.bp-invoice-quick-view .bp-table tr {
    border-top: 1px solid var(--bp-gray-300);
}

.bp-invoice-quick-view .bp-table tr:first-child {
    border-top: 0;
}

[data-theme="dark"] .bp-invoice-qv-meta dd {
    color: var(--bp-text-dark, var(--bp-text));
}

[data-theme="dark"] .bp-invoice-qv-thumb {
    border-color: var(--bp-border-dark, var(--bp-border));
}

[data-theme="dark"] .bp-invoice-qv-thumb-placeholder {
    background: var(--bp-surface-dark, var(--bp-surface));
}

.bp-invoice-qv-items .bp-table-wrapper {
    border: 1px solid var(--bp-border, var(--bp-border));
    border-radius: 6px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.bp-invoice-qv-items table {
    min-width: initial;
    width: 100%;
}

.bp-invoice-qv-items table td,
.bp-invoice-qv-items table th {
    white-space: nowrap;
}

.bp-invoice-qv-items table td:nth-child(2) {
    white-space: normal;
    min-width: 160px;
}

/* Product cell: cap the width and allow the name to wrap onto a second line
   instead of forcing the row wide (overrides the nowrap rule above). */
.bp-invoice-qv-items table td.bp-invoice-qv-product {
    white-space: normal;
    max-width: 330px;
    word-break: break-word;
}

/* Footer cells default to 20px side padding (.bp-table tfoot th), which makes
   left-aligned footer values sit further right than the body cells (10px) above
   them. Match the body padding so the value columns line up vertically. */
.bp-invoice-qv-items table tfoot th {
    padding: 8px 10px;
}

.bp-quick-view-dialog {
    max-width: 850px;
}

.bp-invoice-qv-summary {
    background: var(--bp-bg, var(--bp-bg));
    border: 1px solid var(--bp-border, var(--bp-border));
    border-radius: 6px;
    padding: 12px 16px;
}

.bp-invoice-qv-summary-row {
    display: flex;
    justify-content: space-between;
    padding: 6px 0;
    font-size: 13px;
}

.bp-invoice-qv-summary-row.bp-invoice-qv-summary-total {
    margin-top: 6px;
    padding-top: 10px;
    padding-bottom: 10px;
    border-top: 2px solid var(--bp-primary, var(--bp-primary));
    border-bottom: 1px solid var(--bp-border, var(--bp-border));
    font-size: 15px;
    font-weight: 800;
    color: var(--bp-primary, var(--bp-primary));
}

[data-theme="dark"] .bp-invoice-quick-view {
    color: var(--bp-text-dark, var(--bp-text));
}

[data-theme="dark"] .bp-invoice-qv-logo-placeholder,
[data-theme="dark"] .bp-invoice-qv-party,
[data-theme="dark"] .bp-invoice-qv-summary {
    background: var(--bp-surface-dark, var(--bp-surface));
    border-color: var(--bp-border-dark, var(--bp-border));
}

[data-theme="dark"] .bp-invoice-qv-items .bp-table-wrapper {
    border-color: var(--bp-border-dark, var(--bp-border));
}

[data-theme="dark"] .bp-invoice-qv-party-name,
[data-theme="dark"] .bp-invoice-qv-biz-name {
    color: var(--bp-text-dark, var(--bp-text));
}

[data-theme="dark"] .bp-invoice-qv-summary-row.bp-invoice-qv-summary-total {
    border-bottom-color: var(--bp-border-dark, var(--bp-border));
}

[data-theme="dark"] .bp-sale-thumb-placeholder {
    border-color: var(--bp-border-dark, var(--bp-border));
    background: var(--bp-bg);
}

.bp-table-wrapper:has(> .bp-table-compact) {
    overflow-x: visible;
    overflow-y: visible;
}

.bp-table-compact {
    table-layout: fixed;
    width: 100%;
    font-size: 12px;
}

.bp-table-compact thead th {
    padding: 8px 6px;
    font-size: 10px;
    letter-spacing: 0.2px;
    white-space: normal;
}

.bp-table-compact tbody td {
    padding: 8px 6px;
    vertical-align: middle;
    word-wrap: break-word;
    overflow-wrap: anywhere;
    white-space: normal;
}

.bp-table-compact .bp-btn-sm {
    padding: 3px 8px;
    font-size: 11px;
}

.bp-table-compact .bp-btn-icon.bp-btn-sm {
    padding: 4px 6px;
}

.bp-table-compact .bp-badge {
    font-size: 10px;
    padding: 2px 6px;
}

.bp-table-compact .bp-form-select-sm {
    font-size: 11px;
    padding: 4px 22px 4px 8px;
    min-width: 0;
}

.bp-sales-table th:nth-child(1),
.bp-sales-table td:nth-child(1) {
    width: 32px;
}

.fs-12 {
    font-size: 14px;
}

.bp-sales-table th:nth-child(2),
.bp-sales-table td:nth-child(2) {
    width: 78px;
}

.bp-sales-table th:nth-child(3),
.bp-sales-table td:nth-child(3) {
    width: 90px;
}

.bp-sales-table th:nth-child(4),
.bp-sales-table td:nth-child(4) {
    display: none;
}

.bp-sales-table th:nth-child(5),
.bp-sales-table td:nth-child(5) {
    width: 65px;
}

.bp-sales-table th:nth-child(6),
.bp-sales-table td:nth-child(6) {
    width: auto;
    min-width: 190px;
    /* Belt-and-braces ceiling for table-layout:fixed: without this, this is
       the one column with no explicit width, so it's the column the fixed
       layout algorithm shrinks first (see the media query below) when the
       other ~15 columns' explicit widths don't leave it enough room. Reuses
       the same 260px cap .bp-sale-products already uses elsewhere in the app. */
    max-width: 260px;
}

.bp-sales-table th:nth-child(7),
.bp-sales-table td:nth-child(7) {
    width: 110px;
}

.bp-sales-table th:nth-child(8),
.bp-sales-table td:nth-child(8) {
    width: 200px;
}

.bp-sales-table th:nth-child(9),
.bp-sales-table td:nth-child(9) {
    width: 135px;
}

.bp-sales-table th:nth-child(10),
.bp-sales-table td:nth-child(10) {
    width: 100px;
}

.bp-sales-table th:nth-child(11),
.bp-sales-table td:nth-child(11) {
    width: 50px;
}

.bp-sales-table th:nth-child(12),
.bp-sales-table td:nth-child(12) {
    width: 110px;
}

.bp-sales-table th:nth-child(13),
.bp-sales-table td:nth-child(13) {
    width: 82px;
}

.bp-sales-table th:nth-child(14),
.bp-sales-table td:nth-child(14) {
    width: 90px;
}

.bp-sales-table th:nth-child(15),
.bp-sales-table td:nth-child(15) {
    width: 80px;
}

.bp-sales-table th:nth-child(16),
.bp-sales-table td:nth-child(16) {
    width: 76px;
}

.bp-sales-table .bp-sale-products,
.bp-sales-table .bp-sale-customer {
    max-width: none;
    min-width: 0;
}

.bp-sales-table .bp-inline-status {
    min-width: 0;
    width: 100%;
}

.bp-sales-table .bp-sale-thumb,
.bp-sales-table .bp-sale-thumb-placeholder {
    width: 100% !important;
    height: auto;
}

.bp-sales-table .bp-send-default-courier-form .bp-btn {
    white-space: normal;
    line-height: 1.15;
    font-size: 10px;
    padding: 3px 6px;
}

/*
 * The sales table's ~15-16 columns carry explicit fixed pixel widths that
 * sum to ~1298px (checkbox + Action + Date + Image + Staff + Customer +
 * Sale Status + Note + Fraud Check + Courier + Courier Status + Total +
 * Paid + Due — the hidden ID column doesn't count), plus the Details
 * column's own 190px min-width — ~1488px total. Once the sidebar (260px)
 * and .bp-main's 24px page padding are subtracted from the viewport, that
 * needs roughly a 1800px+ browser window to render without squeezing.
 * Below that, table-layout:fixed has nowhere to put the Details column
 * (the one column with no explicit width) and crushes it toward 0,
 * forcing overflow-wrap:anywhere to break every character onto its own
 * line. This used to only kick in below 767.98px (phones); widened to
 * 1850px so typical small-laptop widths (1024-1440px) get the same
 * auto-layout + horizontal-scroll treatment instead of the squeeze.
 */
@media (max-width: 1850px) {
    .bp-table-wrapper:has(> .bp-sales-table) {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .bp-sales-table {
        table-layout: auto;
        width: max-content;
        min-width: 100%;
    }

    .bp-sales-table thead th,
    .bp-sales-table tbody td {
        overflow-wrap: normal;
        word-break: normal;
        white-space: nowrap;
    }

    .bp-sales-table th,
    .bp-sales-table td {
        width: auto !important;
    }

    .bp-sales-table th:nth-child(4),
    .bp-sales-table td:nth-child(4) {
        display: none;
    }

    .bp-sales-table .bp-sale-products,
    .bp-sales-table .bp-sale-customer {
        white-space: normal;
        min-width: 200px;
        max-width: 260px;
    }

    .bp-sales-table .bp-sale-thumb,
    .bp-sales-table .bp-sale-thumb-placeholder {
        width: 40px !important;
        height: 40px !important;
    }
}

.bp-push-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    padding: 10px 16px;
    background: var(--bp-gray-100);
    border: none;
    border-bottom: 1px solid var(--bp-gray-300);
    color: var(--bp-dark);
    cursor: pointer;
    text-align: left;
    transition: background 0.15s ease;
    -webkit-transition: background 0.15s ease;
    -moz-transition: background 0.15s ease;
    -ms-transition: background 0.15s ease;
    -o-transition: background 0.15s ease;
}

.bp-push-toggle:hover:not(:disabled) {
    background: var(--bp-gray-200);
}

.bp-push-toggle:disabled {
    cursor: not-allowed;
    opacity: 0.7;
}

.bp-push-toggle .bp-push-icon {
    width: 24px;
    display: inline-flex;
    justify-content: center;
}

[data-theme="dark"] .bp-push-toggle {
    background: var(--bp-gray-200);
    border-bottom-color: var(--bp-gray-300);
    color: var(--bp-dark);
}

[data-theme="dark"] .bp-push-toggle:hover:not(:disabled) {
    background: var(--bp-gray-300);
}

.bp-size-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    min-height: 44px;
}

.bp-size-empty {
    width: 100%;
    padding: 10px 12px;
    background: var(--bp-gray-100);
    border-radius: 6px;
    color: var(--bp-gray-500);
    font-size: 13px;
}

[data-theme="dark"] .bp-size-empty {
    background: var(--bp-gray-200);
}

.bp-size-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 8px;
    background: var(--bp-gray-100);
    border: 1px solid var(--bp-gray-300);
    border-radius: 6px;
    cursor: default;
    user-select: none;
}

.bp-size-pill.is-dragging {
    opacity: 0.5;
}

.bp-size-pill.is-disabled {
    opacity: 0.55;
    background: transparent;
}

[data-theme="dark"] .bp-size-pill {
    background: var(--bp-gray-200);
    border-color: var(--bp-gray-300);
}

.bp-size-drag,
.bp-sc-row-drag {
    cursor: grab;
    color: var(--bp-gray-500);
    font-size: 12px;
    padding: 6px 4px;
    user-select: none;
    touch-action: none;
}

.bp-size-drag:hover,
.bp-sc-row-drag:hover {
    color: var(--bp-primary);
}

.bp-size-drag:active,
.bp-sc-row-drag:active {
    cursor: grabbing;
}

.bp-size-label-text {
    display: inline-block;
    font-weight: 700;
    font-size: 13px;
    min-width: 32px;
    padding: 2px 4px;
    color: var(--bp-text, inherit);
}

.bp-size-remove {
    border: none;
    background: transparent;
    color: var(--bp-danger);
    font-size: 13px;
    padding: 2px 4px;
    cursor: pointer;
    line-height: 1;
}

.bp-size-remove:hover {
    color: var(--bp-primary-dark);
}

.bp-size-toggle {
    position: relative;
    display: inline-block;
    width: 28px;
    height: 16px;
    margin: 0;
    cursor: pointer;
}

.bp-size-toggle input {
    opacity: 0;
    width: 0;
    height: 0;
}

.bp-size-toggle-track {
    position: absolute;
    inset: 0;
    background: var(--bp-gray-400);
    border-radius: 16px;
    transition: background .15s;
    -webkit-transition: background .15s;
    -moz-transition: background .15s;
    -ms-transition: background .15s;
    -o-transition: background .15s;
}

.bp-size-toggle-track::before {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 12px;
    height: 12px;
    background: #fff;
    border-radius: 50%;
    transition: transform .15s;
    -webkit-transition: transform .15s;
    -moz-transition: transform .15s;
    -ms-transition: transform .15s;
    -o-transition: transform .15s;
}

.bp-size-toggle input:checked+.bp-size-toggle-track {
    background: var(--bp-success);
}

.bp-size-toggle input:checked+.bp-size-toggle-track::before {
    transform: translateX(12px);
    -webkit-transform: translateX(12px);
    -moz-transform: translateX(12px);
    -ms-transform: translateX(12px);
    -o-transform: translateX(12px);
}

.bp-size-chart-wrap {
    overflow-x: auto;
}

.bp-size-chart-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.bp-size-chart-table thead th {
    background: var(--bp-gray-200);
    padding: 12px 14px;
    text-align: left;
    font-weight: 700;
    color: var(--bp-gray-700);
    border: none;
    white-space: nowrap;
}

[data-theme="dark"] .bp-size-chart-table thead th {
    background: var(--bp-gray-200);
}

.bp-size-chart-table .bp-sc-size-head.is-disabled {
    opacity: 0.45;
}

.bp-size-chart-table tbody th,
.bp-size-chart-table tbody td {
    padding: 10px 14px;
    border: none;
    vertical-align: middle;
}

.bp-size-chart-table tbody tr:nth-child(even) {
    background: var(--bp-gray-100);
}

.bp-size-chart-table tbody tr.is-dragging {
    opacity: 0.5;
}

.bp-size-chart-table tbody tr.is-disabled td,
.bp-size-chart-table tbody tr.is-disabled .bp-sc-row-label-input {
    opacity: 0.55;
}

.bp-sc-row-head {
    display: flex;
    align-items: center;
    gap: 6px;
    background: transparent;
    min-width: 200px;
}

.bp-sc-row-label-input {
    border: none;
    background: transparent;
    font-weight: 600;
    width: 100%;
    padding: 4px 6px;
    color: var(--bp-text, inherit);
}

.bp-sc-row-label-input:focus,
.bp-sc-cell-input:focus {
    outline: 2px solid var(--bp-primary-light);
    border-radius: 4px;
    background: var(--bp-surface, #fff);
}

[data-theme="dark"] .bp-sc-row-label-input:focus,
[data-theme="dark"] .bp-sc-cell-input:focus {
    background: var(--bp-gray-200);
}

.bp-sc-cell-input {
    width: 100%;
    min-width: 80px;
    border: 1px solid transparent;
    background: transparent;
    padding: 4px 6px;
    font-size: 13px;
    color: var(--bp-text, inherit);
}

.bp-sc-cell-input:hover {
    border-color: var(--bp-gray-300);
    border-radius: 4px;
}

.bp-sc-row-actions {
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 8px;
}

.bp-sc-row-remove {
    border: none;
    background: transparent;
    color: var(--bp-danger);
    font-size: 13px;
    cursor: pointer;
    padding: 2px 4px;
    line-height: 1;
}

.bp-sc-row-remove:hover {
    color: var(--bp-primary-dark);
}

.bp-size-override-table .bp-size-col {
    width: 120px;
}

.bp-size-override-table tbody th.bp-size-cell {
    background: transparent;
    color: var(--bp-dark);
    font-weight: 700;
    font-size: 13px;
    text-align: left;
    padding: 12px 14px;
    border-bottom: 1px solid var(--bp-gray-200);
    text-transform: none;
    letter-spacing: 0;
    white-space: nowrap;
}

[data-theme="dark"] .bp-size-override-table tbody th.bp-size-cell {
    color: var(--bp-light);
    border-bottom-color: var(--bp-border);
}

.bp-size-override-table tbody td .bp-form-control {
    max-width: 320px;
}

.size_guide_link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: var(--bp-primary, var(--bp-primary));
    text-decoration: underline;
    cursor: pointer;
}

.size_guide_link:hover {
    color: var(--bp-primary-dark, var(--bp-primary-dark));
}

.bp-sizechart-inline {
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid #eef0f3;
}

.bp-sizechart-title {
    font-size: 15px;
    font-weight: 700;
    color: var(--bp-text);
    margin-bottom: 12px;
}

.bp-sizechart-tabs {
    display: flex;
    list-style: none;
    margin: 0 0 18px;
    padding: 8px 0 0;
    border-bottom: 1px solid #e5e7eb;
    gap: 4px;
}

.bp-sc-tab {
    border: 1px solid transparent;
    background: transparent;
    padding: 8px 22px;
    font-size: 13px;
    font-weight: 700;
    color: #6c757d;
    letter-spacing: 0.4px;
    cursor: pointer;
    border-radius: 6px 6px 0 0;
    margin-bottom: -1px;
    transition: color .15s, background-color .15s, border-color .15s;
    -webkit-transition: color .15s, background-color .15s, border-color .15s;
    -moz-transition: color .15s, background-color .15s, border-color .15s;
    -ms-transition: color .15s, background-color .15s, border-color .15s;
    -o-transition: color .15s, background-color .15s, border-color .15s;
}

.bp-sc-tab:hover {
    color: var(--bp-text);
}

.bp-sc-tab.active {
    border-color: #e5e7eb #e5e7eb #fff;
    background: #fff;
    color: var(--bp-text);
}

.bp-sizechart-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.bp-sizechart-table thead th {
    background: var(--bp-bg);
    padding: 12px 18px;
    text-align: left;
    font-weight: 700;
    color: #4a5568;
    border: none;
    white-space: nowrap;
}

.bp-sizechart-table tbody td {
    padding: 12px 18px;
    border: none;
    color: #444;
    white-space: nowrap;
}

.bp-sizechart-table tbody tr:nth-child(even) {
    background: #fafbfc;
}

.bp-sc-size-label {
    color: var(--bp-primary-light, var(--bp-primary-light));
    font-weight: 600;
}

.bp-product-thumb-sm {
    width: 55px;
}

.bp-category-img {
    width: 35px;
}

.bp-category-img i {
    display: none;
}

.bp-image-preview #preview-img {
    width: 40px;
}

input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button {
    -webkit-appearance: none;
    appearance: none;
    margin: 0;
}

input[type="number"] {
    -moz-appearance: textfield;
    appearance: textfield;
}

.bp-contact-banner-preview {
    max-width: 160px;
    height: auto;
}

.bp-discount-type-addon {
    flex: 0 0 auto;
    width: 72px;
    min-width: 72px;
}

.bp-col-110 {
    width: 110px;
}

.bp-col-140 {
    width: 140px;
}

.bp-line-discount {
    display: flex;
    align-items: stretch;
    width: 150px;
    max-width: 150px;
}

.bp-line-discount .order-discount-type {
    width: 58px;
    flex: 0 0 58px;
    padding-left: 6px;
    padding-right: 4px;
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
}

.bp-line-discount .order-discount-input {
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
    margin-left: -1px;
    min-width: 70px;
}

.bp-line-discount .bp-line-item-discount-type {
    width: 58px;
    flex: 0 0 58px;
    padding-left: 6px;
    padding-right: 4px;
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
}

.bp-line-discount .bp-line-item-discount-input {
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
    margin-left: -1px;
    min-width: 70px;
}

.bp-col-variants {
    width: 210px;
}

.bp-has-variant-col .bp-col-product {
    width: auto;
    min-width: 320px;
}

.bp-has-variant-col .bp-col-variants {
    min-width: 300px;
}

.bp-has-variant-col td.bp-col-variants {
    padding: 12px 0px;
}

.bp-qline-variants {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.bp-qline-v-row {
    border-bottom: 1px solid var(--bp-gray-300);
    padding: 2px 14px 6px 14px;
}

.bp-qline-v-row:last-child {
    border-bottom: 0;
    padding-bottom: 0;
}

.bp-qline-v-name {
    font-weight: 500 !important;
    display: inline-block;
    min-width: 85px;
}

.bp-qline-v-qty {
    text-transform: capitalize;
    font-weight: 500 !important;
    margin-right: 30px;
}

.bp-qline-v-price {
    margin-left: auto;
    font-weight: 500 !important;
}

.bp-qline-v-unit {
    color: var(--bp-gray-500);
    font-weight: 400 !important;
    font-size: 11px;
    margin-left: 2px;
}

/* Combo line summary (sale create/edit order table) */
.bp-combo-comp-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.bp-combo-comp-line {
    font-size: 12.5px;
    color: var(--bp-gray-700);
    line-height: 1.35;
}

.bp-combo-comp-qty {
    display: inline-block;
    min-width: 26px;
    font-weight: 700;
    color: var(--bp-secondary);
}

.bp-combo-comp-variant {
    display: inline-block;
    margin-left: 6px;
    padding: 1px 7px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 600;
    background: var(--bp-gray-100);
    color: var(--bp-gray-600);
}

[data-theme="dark"] .bp-combo-comp-line {
    color: var(--bp-gray-700);
}

[data-theme="dark"] .bp-combo-comp-variant {
    background: var(--bp-gray-800);
    color: var(--bp-gray-300);
}

[data-theme="dark"] .bp-qline-v-unit {
    color: var(--bp-gray-600);
}

[data-theme="dark"] .bp-qline-v-row {
    background: var(--bp-surface);
    border-color: var(--bp-border);
}

[data-theme="dark"] .bp-qline-v-name {
    color: var(--bp-gray-700);
}

[data-theme="dark"] .bp-qline-v-price {
    color: var(--bp-primary-light);
}

#lineItemsTable tbody>tr>td .bp-form-control,
#lineItemsTable tbody>tr>td .bp-form-select,
#lineItemsTable tbody>tr>td.line-item-total {
    margin-top: 2px;
}

.bp-date-dropdown {
    position: relative;
    display: inline-block;
}

.bp-date-dropdown-toggle {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background-color: var(--bp-surface);
    border: 1px solid var(--bp-border);
    border-radius: var(--bp-radius-md);
    min-height: 40px;
    padding: 0 14px;
    font-size: 14px;
    font-weight: 600;
    color: var(--bp-text);
    cursor: pointer;
    transition: border-color 0.15s ease, background-color 0.15s ease;
}

/* ==========================================================================
   Ecommerce Storefront Theme Picker (Ecommerce → Website → Themes)
   ========================================================================== */
.bp-theme-card-body {
    padding: 0;
    overflow: hidden;
}

.bp-theme-preview {
    position: relative;
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    background: var(--bp-gray-100, var(--bp-bg));
    overflow: hidden;
}

.bp-theme-preview-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.bp-theme-active-badge {
    position: absolute;
    top: 10px;
    right: 10px;
}

.bp-theme-default-badge {
    position: absolute;
    top: 10px;
    left: 10px;
}

.bp-theme-card-info {
    display: block;
    padding: 14px 16px;
}

.bp-theme-card-title {
    display: block;
    font-size: 15px;
    font-weight: 700;
    color: var(--bp-text, var(--bp-text));
    margin-bottom: 4px;
}

.bp-theme-card-desc {
    display: block;
    font-size: 12px;
    line-height: 1.5;
    color: var(--bp-text-muted, var(--bp-gray-600));
}

[data-theme="dark"] .bp-theme-preview {
    background: var(--bp-surface-dark, var(--bp-surface));
}

[data-theme="dark"] .bp-theme-card-title {
    color: var(--bp-text-dark, var(--bp-text));
}

.bp-date-dropdown-toggle:hover {
    border-color: var(--bp-primary);
    background-color: var(--bp-row-hover);
}

.bp-date-dropdown-toggle .fa-calendar-day {
    color: var(--bp-primary-ink);
}

.bp-date-dropdown-caret {
    font-size: 11px;
    color: var(--bp-gray-500);
    transition: transform 0.2s ease;
    -webkit-transition: transform 0.2s ease;
    -moz-transition: transform 0.2s ease;
    -ms-transition: transform 0.2s ease;
    -o-transition: transform 0.2s ease;
}

.bp-date-dropdown.open .bp-date-dropdown-caret {
    transform: rotate(180deg);
    -webkit-transform: rotate(180deg);
    -moz-transform: rotate(180deg);
    -ms-transform: rotate(180deg);
    -o-transform: rotate(180deg);
}

[data-theme="dark"] .bp-date-dropdown-toggle {
    background-color: var(--bp-surface);
    border-color: var(--bp-border);
    color: var(--bp-text);
}

.bp-date-dropdown-panel {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    z-index: 1050;
    width: 340px;
    max-width: 90vw;
    background-color: var(--bp-surface);
    border: 1px solid var(--bp-border);
    border-radius: var(--bp-radius-lg);
    box-shadow: var(--bp-shadow-lg);
    padding: 8px;
}

.bp-date-dropdown.open .bp-date-dropdown-panel {
    display: block;
}

[data-theme="dark"] .bp-date-dropdown-panel {
    background-color: var(--bp-surface);
    border-color: var(--bp-border);
}

.bp-date-dropdown-heading {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--bp-gray-500);
    padding: 8px 10px 6px;
}

.bp-date-dropdown-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 9px 10px;
    border-radius: 8px;
    text-decoration: none;
    color: var(--bp-text);
    transition: background-color 0.15s ease;
}

.bp-date-dropdown-item:hover {
    background-color: var(--bp-row-hover);
}

.bp-date-dropdown-item.active {
    background-color: var(--bp-primary-50);
}

.bp-date-dropdown-item-label {
    font-size: 14px;
    font-weight: 600;
}

.bp-date-dropdown-item.active .bp-date-dropdown-item-label {
    color: var(--bp-primary-ink);
    font-weight: 700;
}

.bp-date-dropdown-item-range {
    font-size: 12px;
    color: var(--bp-gray-500);
}

[data-theme="dark"] .bp-date-dropdown-item {
    color: var(--bp-gray-700);
}

[data-theme="dark"] .bp-date-dropdown-item:hover {
    background-color: var(--bp-row-hover);
}

.bp-date-dropdown-divider {
    height: 1px;
    background-color: var(--bp-border-soft);
    margin: 8px 4px;
}

[data-theme="dark"] .bp-date-dropdown-divider {
    background-color: var(--bp-border);
}

.bp-date-dropdown-custom {
    display: flex;
    gap: 10px;
    padding: 0 10px;
}

.bp-date-dropdown-custom-field {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.bp-date-dropdown-panel .bp-btn {
    margin-top: 10px;
}

/* ============================================================
   Solid-fill stat cards (bp-stat-fill / -cN / -flat-*) were retired in the
   2026 redesign. The class names are kept as inert aliases: elements that
   still carry them render as the standard white .bp-stat-card KPI tile.
   ============================================================ */
.bp-stat-fill {
    color: inherit;
}

select {
    appearance: none !important;
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    background-image: url('data:image/svg+xml;utf8,<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M6 9L12 15L18 9" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" stroke="currentColor"/></svg>');
    background-repeat: no-repeat;
    background-position: right 8px center;
    background-size: 20px;
    cursor: pointer;
}

@media (max-width: 575.99px) {
    .bp-table-search input {
        width: 100%;
    }

    .bp-table-search {
        position: relative;
        width: 100%;
    }

    .bp-filter-bar .bp-filter-date {
        width: 130px;
        min-width: initial;
    }

    .bp-status-tab {
        padding: 6px 14px;
    }

}

.bp-seo-image-preview {
    max-height: 80px;
    width: auto;
}

.bp-seo-snippet {
    border: 1px solid var(--bp-border, var(--bp-border));
    border-radius: 6px;
    padding: 12px 16px;
    background: var(--bp-surface, #ffffff);
    font-family: arial, sans-serif;
    margin-top: 8px;
}

.seo-pv-title {
    color: #1a0dab;
    font-size: 18px;
    font-weight: 400;
    line-height: 1.3;
    margin-bottom: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.seo-pv-url {
    color: var(--bp-success, var(--bp-success));
    font-size: 13px;
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.seo-pv-desc {
    color: #545454;
    font-size: 13px;
    line-height: 1.57;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

[data-theme="dark"] .bp-seo-snippet {
    border-color: var(--bp-border-dark, var(--bp-border));
    background: var(--bp-surface-dark, var(--bp-surface));
}

[data-theme="dark"] .seo-pv-title {
    color: #8ab4f8;
}

[data-theme="dark"] .seo-pv-url {
    color: #34a853;
}

[data-theme="dark"] .seo-pv-desc {
    color: #bdc1c6;
}

.bp-status-switch {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 0;
    padding-left: 0;
    cursor: pointer;
}

.bp-status-switch .form-check-input {
    cursor: pointer;
    margin-top: 0;
    margin-left: 0;
    float: none;
}

.bp-status-switch-label {
    color: var(--bp-gray-500);
}

.bp-status-switch .form-check-input:checked {
    background-color: var(--bp-success);
    border-color: var(--bp-success);
}

.bp-status-switch .form-check-input:checked~.bp-status-switch-label {
    color: var(--bp-success);
}

.bp-search-results-form {
    margin-bottom: 14px;
}

.bp-search-results-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.bp-search-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 12px;
    font-size: 12px;
    font-weight: 600;
    border-radius: 16px;
    border: 1px solid var(--bp-gray-300);
    background-color: var(--bp-gray-100);
    color: var(--bp-gray-700);
    text-decoration: none;
    transition: var(--bp-transition);
    -webkit-transition: var(--bp-transition);
    -moz-transition: var(--bp-transition);
    -ms-transition: var(--bp-transition);
    -o-transition: var(--bp-transition);
}

.bp-search-chip:hover {
    border-color: var(--bp-primary-light);
    color: var(--bp-primary);
}

.bp-search-chip.active {
    background-color: var(--bp-primary);
    border-color: var(--bp-primary);
    color: #fff;
}

[data-theme="dark"] .bp-search-chip {
    background-color: var(--bp-gray-200);
    border-color: var(--bp-gray-400);
    color: var(--bp-gray-700);
}

[data-theme="dark"] .bp-search-chip.active {
    background-color: var(--bp-primary-light);
    border-color: var(--bp-primary-light);
    color: #fff;
}

.bp-search-results-empty {
    text-align: center;
    padding: 48px 16px;
    color: var(--bp-gray-500);
    font-size: 14px;
}

.bp-search-results-empty i {
    font-size: 32px;
    display: block;
    margin-bottom: 12px;
    opacity: 0.4;
}

.bp-search-result-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-bottom: 1px solid var(--bp-gray-200);
    text-decoration: none;
    transition: var(--bp-transition);
    -webkit-transition: var(--bp-transition);
    -moz-transition: var(--bp-transition);
    -ms-transition: var(--bp-transition);
    -o-transition: var(--bp-transition);
}

.bp-search-result-row:last-child {
    border-bottom: none;
}

.bp-search-result-row:hover {
    background-color: var(--bp-gray-100);
}

[data-theme="dark"] .bp-search-result-row {
    border-bottom-color: var(--bp-gray-300);
}

[data-theme="dark"] .bp-search-result-row:hover {
    background-color: var(--bp-gray-200);
}

.bp-search-result-icon {
    flex: 0 0 auto;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--bp-gray-100);
    color: var(--bp-primary);
    font-size: 14px;
}

[data-theme="dark"] .bp-search-result-icon {
    background-color: var(--bp-gray-300);
}

.bp-search-result-content {
    flex: 1 1 auto;
    min-width: 0;
}

.bp-search-result-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--bp-dark);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.bp-search-result-subtitle {
    font-size: 12px;
    color: var(--bp-gray-600);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.bp-search-result-row mark {
    background-color: color-mix(in srgb, var(--bp-accent) 30%, transparent);
    color: inherit;
    padding: 0 1px;
    border-radius: 2px;
}

.bp-filter-submit,
.bp-filter-reset {
    width: 34px;
    height: 34px;
    padding: 0;
    border: none;
    border-radius: 6px;
    -webkit-border-radius: 6px;
    -moz-border-radius: 6px;
    -ms-border-radius: 6px;
    -o-border-radius: 6px;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
}

.payment_acc_ledger_filters .search_buttons {
    padding: 11px;
}

.bp-filter-reset {
    background: var(--bp-danger) !important;
    color: #fff !important;
}

.create_pro_buttons .bp-card-body .draft,
.create_pro_buttons .bp-card-body .cancel {
    width: 48%;
    margin-top: 5px;
}

.bp-card-body .nav-tabs .nav-link {
    color: var(--colorBlack);
}

.bp-card-body .nav-tabs .nav-link.active {
    color: var(--colorWhite) !important;
    background-color: var(--bp-primary-dark);
    border-color: var(--bp-primary-dark);
}

.category_img .bp-image-dropzone {
    display: flex;
}

.category_img .js-thumb-placeholder {
    border: 1px solid #ddd;
    height: 100%;
    padding: 23px 10px;
    border-radius: 6px;
    -webkit-border-radius: 6px;
    -moz-border-radius: 6px;
    -ms-border-radius: 6px;
    -o-border-radius: 6px;
}

#valuesTable {
    border: 1px solid var(--bp-gray-200);
}

.shipping_table .bp-btn-success,
.shipping_table .bp-btn-danger {
    padding: 0;
    width: 35px;
    height: 35px;
    display: inline-flex;
    justify-content: center;
    align-items: center;
}

.tagify {
    --tags-border-color: var(--bp-gray-300);
    --tags-hover-border-color: var(--bp-gray-400);
    --tags-focus-border-color: var(--bp-primary);
    --tag-bg: var(--bp-primary);
    --tag-hover: var(--bp-primary-dark);
    --tag-text-color: #fff;
    --tag-text-color--edit: var(--bp-dark);
    --tag-remove-bg: var(--bp-danger);
    --tag-remove-btn-color: #fff;
    --tag-pad: 4px 8px;
    --tag-inset-shadow-size: 1.1em;
    --placeholder-color: var(--bp-gray-500);
    --tag-border-radius: 6px;
    border: 1px solid var(--bp-gray-300);
    border-radius: 6px;
    font-family: var(--bp-font);
    font-size: 13px;
    width: 100%;
    min-height: 38px;
    background-color: #fff;
    transition: var(--bp-transition);
    -webkit-transition: var(--bp-transition);
    -moz-transition: var(--bp-transition);
    -ms-transition: var(--bp-transition);
    -o-transition: var(--bp-transition);
}

.tagify--focus {
    border-color: var(--bp-primary);
}

.tagify__tag>div {
    font-size: 12px;
    font-weight: 600;
}

.tagify__input {
    font-size: 13px;
    color: var(--bp-dark);
}

.tagify__input::before {
    color: var(--bp-gray-500);
}

.tagify.is-invalid {
    border-color: var(--bp-danger);
}

.tagify__dropdown {
    font-family: var(--bp-font);
}

.tagify__dropdown__wrapper {
    border-color: var(--bp-gray-300);
}

[data-theme="dark"] .tagify {
    --tags-border-color: var(--bp-gray-400);
    --placeholder-color: var(--bp-gray-600);
    border-color: var(--bp-gray-400);
    background-color: var(--bp-gray-200);
}

[data-theme="dark"] .tagify__input {
    color: var(--bp-gray-700);
}

[data-theme="dark"] .tagify__input::before {
    color: var(--bp-gray-600);
}

[data-theme="dark"] .tagify__dropdown__wrapper {
    background-color: #1a1d21;
    border-color: var(--bp-gray-400);
}

[data-theme="dark"] .tagify__dropdown__item {
    color: var(--bp-gray-700);
}

[data-theme="dark"] .tagify__dropdown__item--active {
    background-color: var(--bp-gray-200);
}

.bp-cat-tree {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.bp-cat-tree.depth-0 {
    font-weight: 800;
}

.bp-cat-tree.depth-1 {
    padding-left: 22px;
}

.bp-cat-tree.depth-2 {
    padding-left: 44px;
}

.bp-cat-tree.depth-3 {
    padding-left: 66px;
}

.bp-cat-tree.depth-4 {
    padding-left: 88px;
}

.bp-cat-tree.depth-5 {
    padding-left: 110px;
}

.bp-cat-tree.depth-6 {
    padding-left: 132px;
}

.bp-cat-tree-icon {
    color: var(--bp-gray-500);
    font-size: 11px;
    flex-shrink: 0;
}

[data-theme="dark"] .bp-cat-tree-icon {
    color: var(--bp-gray-500);
}

.bp-table tbody.bp-cat-tree-body td:first-child {
    border-left: 1px solid var(--bp-gray-300);
}

.bp-table tbody.bp-cat-tree-body td:last-child {
    border-right: 1px solid var(--bp-gray-300);
}

.bp-table tbody.bp-cat-tree-body tr[data-depth="0"] td {
    border-top: 1px solid var(--bp-gray-300);
}

.bp-table tbody.bp-cat-tree-body tr:last-child td {
    border-bottom: 1px solid var(--bp-gray-300);
}

.bp-table tbody.bp-cat-tree-body tr.bp-cat-sep td.bp-cat-name-col {
    border-top: 1px solid var(--bp-gray-300);
}

.bp-btn:disabled,
.bp-btn.bp-btn-submitting {
    opacity: 0.65;
    cursor: not-allowed;
    pointer-events: none;
}

#salePaymentRows .bp-split-payment-row .bp-pay-amount-col,
#salePaymentRows .bp-split-payment-row .bp-pay-method-col,
#salePaymentRows .bp-split-payment-row .bp-pay-ref-col {
    flex: 1 1 0;
    width: auto;
    min-width: 0;
}

.bp-advance-summary {
    background: var(--bp-gray-100);
    border: 1px solid var(--bp-gray-200);
    border-radius: 6px;
    padding: 6px 16px;
}

.bp-advance-summary .bp-adv-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 9px 0;
    font-weight: 700;
    font-size: 14px;
}

.bp-advance-summary .bp-adv-row+.bp-adv-row {
    border-top: 1px dashed var(--bp-gray-300);
}

.bp-advance-summary .bp-adv-advance {
    color: var(--bp-success);
}

.bp-advance-summary .bp-adv-due {
    color: var(--bp-danger);
    font-size: 16px;
}

[data-theme="dark"] .bp-advance-summary {
    background: var(--bp-surface);
    border-color: var(--bp-border);
}

[data-theme="dark"] .bp-advance-summary .bp-adv-row+.bp-adv-row {
    border-top-color: var(--bp-border);
}

/* Previous Due row (Order & Quotation forms) — customer's prior outstanding
   balance, display-only. Works for both the sale advance-summary row and the
   quotation cart-summary row via the shared .bp-adv-prevdue class. */
.bp-adv-prevdue>span:last-child {
    color: var(--bp-warning);
    font-weight: 800;
}

[data-theme="dark"] .bp-adv-prevdue>span:last-child {
    color: #F0A44E;
}

/* Expense list attachment cell — receipt thumbnail (images) or file icon (PDF) */
.bp-expense-attach {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
}

.bp-expense-attach-thumb {
    width: 40px;
    height: 40px;
    border-radius: 6px;
    object-fit: cover;
    border: 1px solid var(--bp-gray-200);
    background: var(--bp-gray-100);
}

.bp-expense-attach .fa-file-pdf {
    font-size: 22px;
    color: var(--bp-danger);
}

[data-theme="dark"] .bp-expense-attach-thumb {
    border-color: var(--bp-border);
    background: var(--bp-surface);
}

/* Out-of-stock variant row in the Select Variants picker (Order & Quotation).
   Flags a size/color with zero stock so the seller sees it's unavailable. */
.bp-variant-oos>td {
    background: color-mix(in srgb, var(--bp-danger) 8%, transparent);
}

.bp-variant-oos>td:first-child {
    box-shadow: inset 3px 0 0 var(--bp-danger);
}

[data-theme="dark"] .bp-variant-oos>td {
    background: color-mix(in srgb, var(--bp-danger) 18%, transparent);
}

/* Billing/Shipping address quick view cards (Order & Quotation forms) */
.bp-addr-quickview {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

@media (max-width: 767.98px) {
    .bp-addr-quickview {
        grid-template-columns: 1fr;
    }
}

.bp-addr-card {
    background: var(--bp-gray-100);
    border: 1px solid var(--bp-gray-200);
    border-radius: 6px;
    padding: 10px 14px;
}

.bp-addr-card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 4px;
    min-height: 30px;
}

.bp-addr-card-title {
    font-size: 12px;
    font-weight: 700;
    color: var(--bp-primary);
}

.bp-addr-card-text {
    font-size: 13px;
    font-weight: 700;
    color: var(--bp-text, var(--bp-text));
    white-space: pre-line;
}

[data-theme="dark"] .bp-addr-card {
    background: var(--bp-surface);
    border-color: var(--bp-border);
}

[data-theme="dark"] .bp-addr-card-title {
    color: var(--bp-primary-light);
}

[data-theme="dark"] .bp-addr-card-text {
    color: var(--bp-text);
}

.bp-quick-view-dialog .modal-body {
    padding-bottom: 5px;
}

.bp-quick-view-dialog .bp-table thead th {
    background-color: var(--bp-gray-200);
}

.bp-quick-view-dialog .bp-invoice-qv-items table td:nth-child(2) {
    min-width: initial;
}

#quickViewModal #quickViewEditBtn {
    background: var(--bp-success);
    color: var(--colorWhite);
}

#quickViewModal #quickViewPrintBtn {
    background: var(--bp-primary-light);
    color: var(--colorWhite);
}

#quickViewModal .bp-table-wrapper .bp-table tr th.fw-800,
#quickViewModal .bp-table-wrapper .bp-table tr td.fw-800 {
    font-weight: 600;
}

#quickViewModal .bp-table-wrapper .bp-table tr td.text-muted {
    color: var(--colorBlack) !important;
}

#orderTable tr th {
    font-weight: 700;
}

#orderTable tr th:nth-child(2),
#orderTable tr td:nth-child(2) {
    min-width: 300px;
}

#orderTable tr th:nth-child(5),
#orderTable tr td:nth-child(5) {
    min-width: 100px;
}

#orderTable tr th:nth-child(6),
#orderTable tr td:nth-child(6) {
    min-width: 100px;
}

#orderTable tr td span {
    font-weight: 500;
}

#purchaseItemsTable th {
    background: var(--bp-gray-200);
}

#returnItemsTable tr th,
#returnItemsTable tr td {
    text-align: left !important;
}

.bp-discount-type-addon {
    max-width: 150px !important;
}

.payment_details_table_footer td {
    font-weight: 700;
}

.customer_profile_photo {
    width: 70px;
    height: 70px;
}

.bp-2fa-hero {
    text-align: center;
    padding: 28px 16px 4px;
}

.bp-2fa-badge {
    width: 76px;
    height: 76px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    margin-bottom: 16px;
}

.bp-2fa-badge-idle {
    background: color-mix(in srgb, var(--bp-primary) 8%, transparent);
    color: var(--bp-primary);
}

.bp-2fa-badge-on {
    background: color-mix(in srgb, var(--bp-success) 10%, transparent);
    color: var(--bp-success);
}

.bp-2fa-hero h3 {
    font-size: 20px;
    font-weight: 800;
    margin: 0 0 8px;
    color: var(--bp-dark);
}

.bp-2fa-hero p {
    font-size: 13px;
    line-height: 1.65;
    color: var(--bp-text-muted, var(--bp-gray-600));
    max-width: 460px;
    margin: 0 auto;
}

.bp-2fa-apps {
    font-size: 12px;
    color: var(--bp-text-muted, var(--bp-gray-600));
    margin-top: 16px;
}

.bp-2fa-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 13px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .06em;
    text-transform: uppercase;
    background: color-mix(in srgb, var(--bp-success) 10%, transparent);
    color: var(--bp-success);
    margin-bottom: 14px;
}

.bp-2fa-steps {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 32px;
    align-items: start;
}

.bp-2fa-step-eyebrow {
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--bp-primary-light);
    margin-bottom: 4px;
}

.bp-2fa-step-title {
    font-size: 15px;
    font-weight: 800;
    color: var(--bp-dark);
    margin-bottom: 14px;
}

.bp-2fa-step-help {
    font-size: 13px;
    line-height: 1.6;
    color: var(--bp-text-muted, var(--bp-gray-600));
    margin-bottom: 16px;
}

.bp-2fa-scan {
    position: relative;
    width: 200px;
    height: 200px;
    padding: 14px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, .08);
}

.bp-2fa-scan img {
    display: block;
    width: 100%;
    height: 100%;
}

.bp-2fa-corner {
    position: absolute;
    width: 22px;
    height: 22px;
    border: 3px solid var(--bp-primary);
}

.bp-2fa-corner.tl {
    top: 6px;
    left: 6px;
    border-right: 0;
    border-bottom: 0;
    border-top-left-radius: 7px;
}

.bp-2fa-corner.tr {
    top: 6px;
    right: 6px;
    border-left: 0;
    border-bottom: 0;
    border-top-right-radius: 7px;
}

.bp-2fa-corner.bl {
    bottom: 6px;
    left: 6px;
    border-right: 0;
    border-top: 0;
    border-bottom-left-radius: 7px;
}

.bp-2fa-corner.br {
    bottom: 6px;
    right: 6px;
    border-left: 0;
    border-top: 0;
    border-bottom-right-radius: 7px;
}

.bp-2fa-key-label {
    font-size: 12px;
    font-weight: 600;
    color: var(--bp-text-muted, var(--bp-gray-600));
    margin: 18px 0 6px;
}

.bp-2fa-key {
    display: flex;
    align-items: stretch;
    gap: 8px;
}

.bp-2fa-key code {
    flex: 1;
    min-width: 0;
    font-family: monospace;
    font-size: 13px;
    letter-spacing: .06em;
    background: var(--bp-gray-100, #F1F3F5);
    border: 1px solid var(--bp-border, var(--bp-border));
    border-radius: 7px;
    padding: 9px 11px;
    color: var(--bp-dark);
    word-break: break-all;
}

.bp-2fa-copy {
    flex: none;
}

.bp-2fa-otp {
    justify-content: flex-start;
    gap: 8px;
}

.bp-2fa-otp .bp-otp-box {
    width: 46px;
    height: 52px;
    font-size: 20px;
}

.bp-2fa-danger {
    margin: 24px 8px 8px;
    border: 1px solid color-mix(in srgb, var(--bp-danger) 28%, transparent);
    border-radius: 10px;
    padding: 18px;
    background: color-mix(in srgb, var(--bp-danger) 4%, transparent);
}

.bp-2fa-danger-head {
    display: flex;
    gap: 12px;
    margin-bottom: 14px;
}

.bp-2fa-danger-head>i {
    color: var(--bp-danger);
    font-size: 18px;
    margin-top: 2px;
}

.bp-2fa-danger-title {
    font-size: 14px;
    font-weight: 800;
    color: var(--bp-danger);
}

.bp-2fa-danger-sub {
    font-size: 12.5px;
    line-height: 1.55;
    color: var(--bp-text-muted, var(--bp-gray-600));
}

.bp-2fa-danger-row {
    display: flex;
    gap: 10px;
}

.bp-2fa-danger-row .bp-form-control {
    flex: 1;
}

.bp-2fa-danger-row .bp-btn {
    flex: none;
}

@media (max-width: 767.98px) {
    .bp-2fa-steps {
        grid-template-columns: 1fr;
        gap: 28px;
    }

    .bp-2fa-scan {
        margin: 0 auto;
    }

    .bp-2fa-otp {
        justify-content: center;
    }

    .bp-2fa-danger-row {
        flex-direction: column;
    }

    .bp-2fa-danger-row .bp-btn {
        width: 100%;
    }
}

/* Dark mode */
[data-theme="dark"] .bp-2fa-hero h3,
[data-theme="dark"] .bp-2fa-step-title,
[data-theme="dark"] .bp-2fa-key code {
    color: var(--bp-text-dark, var(--bp-text));
}

[data-theme="dark"] .bp-2fa-badge-idle {
    background: color-mix(in srgb, var(--bp-primary) 16%, transparent);
    color: var(--bp-primary-light);
}

[data-theme="dark"] .bp-2fa-badge-on {
    background: color-mix(in srgb, var(--bp-success) 20%, transparent);
    color: #7CC8A0;
}

[data-theme="dark"] .bp-2fa-pill {
    background: color-mix(in srgb, var(--bp-success) 20%, transparent);
    color: #7CC8A0;
}

[data-theme="dark"] .bp-2fa-scan {
    background: #fff;
}

[data-theme="dark"] .bp-2fa-key code {
    background: #1c2330;
    border-color: var(--bp-border);
}

[data-theme="dark"] .bp-2fa-danger {
    background: color-mix(in srgb, var(--bp-danger) 10%, transparent);
    border-color: color-mix(in srgb, var(--bp-danger) 35%, transparent);
}

.bp-tabs.nav-tabs {
    border-bottom: 2px solid var(--bp-border, var(--bp-border));
    gap: 2px;
}

.bp-tabs.nav-tabs .nav-item {
    margin-bottom: 0;
}

.bp-tabs.nav-tabs .nav-link {
    display: inline-flex;
    align-items: center;
    border: 0;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    border-radius: 0;
    padding: 11px 18px;
    font-size: 14px;
    font-weight: 700;
    color: var(--bp-text-muted, var(--bp-gray-600));
    background: transparent;
    transition: var(--bp-transition);
}

.bp-tabs.nav-tabs .nav-link:hover {
    color: var(--bp-primary);
    border-bottom-color: var(--bp-gray-300, #CDD3DA);
}

.bp-tabs.nav-tabs .nav-link.active {
    color: var(--bp-primary);
    border-bottom-color: var(--bp-primary);
    background: transparent;
}

.bp-tabs.nav-tabs .nav-link .bp-badge {
    font-weight: 800;
}

[data-theme="dark"] .bp-tabs.nav-tabs {
    border-bottom-color: var(--bp-border);
}

[data-theme="dark"] .bp-tabs.nav-tabs .nav-link:hover {
    color: var(--bp-primary-light);
}

[data-theme="dark"] .bp-tabs.nav-tabs .nav-link.active {
    color: var(--bp-primary-light);
    border-bottom-color: var(--bp-primary-light);
}

.bp-inline-search {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
    margin-bottom: 0;
}

.bp-inline-search .bp-form-control,
.bp-inline-search .bp-form-select,
.bp-inline-search .bp-btn {
    height: 38px;
    flex: 0 0 auto;
}

.bp-inline-search .bp-form-control {
    width: 220px;
    min-width: 0;
}

.bp-inline-search .bp-form-select {
    width: 190px;
}

.bp-inline-search .bp-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.bp-inline-search .select2-container {
    width: 190px !important;
    flex: 0 0 auto;
}

.bp-inline-search .select2-container--default .select2-selection--single {
    height: 38px !important;
}

@media (min-width: 768px) {
    .bp-report-filters>[class*="col-"]:not(.d-flex) {
        flex: 1 1 0;
        min-width: 160px;
        max-width: 320px;
    }

    .bp-report-filters>.d-flex {
        flex: 0 0 auto;
        max-width: none;
        margin-left: auto;
    }
}

.bp-combo-gallery {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.bp-combo-gallery-item {
    position: relative;
    display: block;
    cursor: pointer;
    margin: 0;
}

.bp-combo-gallery-item img {
    width: 72px;
    height: 72px;
    object-fit: cover;
    border-radius: 8px;
    border: 2px solid var(--bp-gray-300);
    display: block;
    transition: border-color .15s ease;
}

.bp-combo-gallery-item input[type="checkbox"] {
    position: absolute;
    top: 6px;
    left: 6px;
    width: 16px;
    height: 16px;
    cursor: pointer;
}

.bp-combo-gallery-item input[type="checkbox"]:checked+img {
    border-color: var(--bp-primary);
}

.bp-combo-preview {
    background: var(--bp-gray-100);
    border: 1px solid var(--bp-gray-300);
    border-radius: 8px;
    padding: 12px 14px;
}

.bp-combo-preview .bp-combo-save {
    color: var(--bp-success);
    font-weight: 700;
}

[data-theme="dark"] .bp-combo-gallery-item img {
    border-color: var(--bp-border-dark, var(--bp-border));
}

[data-theme="dark"] .bp-combo-gallery-item input[type="checkbox"]:checked+img {
    border-color: var(--bp-primary-light);
}

[data-theme="dark"] .bp-combo-preview {
    background: var(--bp-surface-dark, var(--bp-surface));
    border-color: var(--bp-border-dark, var(--bp-border));
}

.menu-node-actions .bp-btn {
    width: 30px;
    height: 30px;
    padding: 0;
    border-radius: 6px;
    -webkit-border-radius: 6px;
    -moz-border-radius: 6px;
    -ms-border-radius: 6px;
    -o-border-radius: 6px;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
}

.debit_credit_line table tr td {
    font-weight: 400 !important;
}

.debit_credit_line tfoot tr td {
    font-weight: 800 !important;
}

.recent_distribution_area .bp-empty-state {
    padding: 3px 0px;
}

.customer_ledger_search .bp-btn {
    width: 35px;
    height: 35px;
    padding: 0;
    display: flex;
    justify-content: center;
    align-items: center;
}

.bp-table-wrapper .bp-table tr td span.fw-800,
.bp-table-wrapper .bp-table tr td.fw-800 {
    font-weight: 800;
}

.bp-table tfoot .bp-table-total-row td {
    background: var(--bp-bg-subtle, var(--bp-bg));
    border-top: 2px solid var(--bp-border, var(--bp-border));
    font-size: 13px;
    padding: 12px 10px;
}

[data-theme="dark"] .bp-table tfoot .bp-table-total-row td {
    background: #20242c;
    border-top-color: var(--bp-border);
}

.bp-due-summary {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 32px;
    align-items: center;
}

.bp-due-summary-item {
    display: flex;
    align-items: baseline;
    gap: 8px;
}

.bp-due-summary-label {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--bp-text-muted, var(--bp-gray-600));
}

.bp-due-summary-value {
    font-size: 14px;
    font-weight: 800;
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
    color: var(--bp-text, var(--bp-text));
}

.bp-due-summary-value.due {
    color: var(--bp-danger);
}

.bp-due-summary-value.paying {
    color: var(--bp-success);
}

.bp-due-summary-value.remaining {
    color: var(--bp-warning);
}

.bp-due-summary-value.remaining.cleared {
    color: var(--bp-success);
}

[data-theme="dark"] .bp-due-summary-value {
    color: var(--bp-text);
}

[data-theme="dark"] .bp-due-summary-value.due {
    color: #e57368;
}

[data-theme="dark"] .bp-due-summary-value.paying,
[data-theme="dark"] .bp-due-summary-value.remaining.cleared {
    color: #58c27d;
}

[data-theme="dark"] .bp-due-summary-value.remaining {
    color: #f0a35e;
}

.bp-ajax-tab-loading {
    opacity: 0.5;
    pointer-events: none;
    transition: opacity 0.15s ease;
}

.filtar_btn {
    width: 34px;
    height: 34px;
    padding: 0;
    border: none;
    border-radius: 6px;
    -webkit-border-radius: 6px;
    -moz-border-radius: 6px;
    -ms-border-radius: 6px;
    -o-border-radius: 6px;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
}

.cashflow_filter {
    width: auto;
}

.employee_view .bp-user-avatar {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background-color: var(--bp-primary);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 700;
    overflow: hidden;
    flex: 0 0 auto;
}

#productsTable .select2-container--default .select2-selection--single .select2-selection__placeholder {
    color: var(--colorBlack);
}

.bp-color-input {
    height: 38px;
    padding: 4px 6px;
    cursor: pointer;
}

[data-theme="dark"] .bp-color-input {
    background: var(--bp-surface);
    border-color: var(--bp-border);
}

.bp-cashflow-table tr:nth-child(2) th:nth-child(1),
.bp-cashflow-table tr:nth-child(2) th:nth-child(3) {
    min-width: 250px;
}

.bp-cashflow-table tr:nth-child(2) th:nth-child(2),
.bp-cashflow-table tr:nth-child(2) th:nth-child(4) {
    min-width: 135px;
}
/* ============================================================
   Expense Receipt / Attachment Preview
   ============================================================ */
.bp-receipt-preview {
    margin-top: 10px;
    border: 1px solid var(--bp-border, var(--bp-border));
    border-radius: 6px;
    padding: 10px;
    background: #fff;
}

.bp-receipt-preview-img {
    display: block;
    max-width: 100%;
    max-height: 220px;
    border-radius: 4px;
}

.bp-receipt-preview-pdf {
    display: block;
    width: 100%;
    height: 280px;
    border: 0;
    border-radius: 4px;
    background: var(--bp-bg);
}

.bp-receipt-preview-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-top: 8px;
}

.bp-receipt-preview-name {
    font-size: 12px;
    color: var(--bp-gray-600);
    word-break: break-all;
}

[data-theme="dark"] .bp-receipt-preview {
    background: #1F232B;
    border-color: #2A2F3A;
}

[data-theme="dark"] .bp-receipt-preview-pdf {
    background: var(--bp-surface);
}

[data-theme="dark"] .bp-receipt-preview-name {
    color: #9AA3AB;
}

/* ============================================================
   Stock Adjustment Items Table — column sizing
   ============================================================ */
.bp-adjust-items th:nth-child(1) {
    width: 32%;
}

.bp-adjust-items th:nth-child(2) {
    width: 16%;
}

.bp-adjust-items th:nth-child(3) {
    width: 10%;
}

.bp-adjust-items th:nth-child(4) {
    width: 13%;
}

.bp-adjust-items th:nth-child(6) {
    width: 48px;
}

/* ==========================================================================
   Form Hint — short guidance under a field
   ========================================================================== */

.bp-form-hint {
    font-size: 12px;
    color: var(--bp-text-muted, var(--bp-gray-600));
    margin-top: 6px;
}

[data-theme="dark"] .bp-form-hint {
    color: var(--bp-text-muted-dark, var(--bp-gray-600));
}

/* ==========================================================================
   Memo Row — a figure shown for context that is excluded from column totals
   ========================================================================== */

.bp-memo-row {
    background: var(--bp-gray-50, var(--bp-row-hover));
    font-style: italic;
}

[data-theme="dark"] .bp-memo-row {
    background: rgba(255, 255, 255, 0.03);
}

/* ==========================================================================
   Inline Filters — a compact filter group for page-actions or a card header.
   Unlike .bp-filter-bar (a full-width row that spreads its children apart),
   controls here size to their content and stay grouped beside a page action.
   ========================================================================== */

.bp-inline-filters {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.bp-inline-filters .bp-form-label {
    margin-bottom: 0;
    white-space: nowrap;
}

.bp-inline-filters .bp-form-control,
.bp-inline-filters .bp-form-select {
    width: auto;
    min-width: 0;
    flex: 0 0 auto;
}

@media (max-width: 767.98px) {
    .bp-inline-filters {
        width: 100%;
    }

    .bp-inline-filters .bp-form-control,
    .bp-inline-filters .bp-form-select {
        flex: 1 1 140px;
    }
}

/* ========================================================================
   Store / Store Group Access Picker (Users form, Store Groups form)
   ======================================================================== */
.bp-check-list {
    max-height: 220px;
    overflow-y: auto;
    border: 1px solid var(--bp-gray-200);
    border-radius: 8px;
    padding: 10px 12px;
}

.bp-check-list-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 0;
}

.bp-check-list-item:not(:last-child) {
    border-bottom: 1px solid var(--bp-gray-100);
}

.bp-check-list-empty {
    padding: 8px 0;
}

[data-theme="dark"] .bp-check-list {
    border-color: var(--bp-gray-300);
}

[data-theme="dark"] .bp-check-list-item:not(:last-child) {
    border-bottom-color: var(--bp-gray-300);
}

/* ========================================================================
   Ecommerce Orders (list, detail, branch transfer)
   ======================================================================== */
/* Preserves line breaks in a plain-text notes field. No color involved, so
   no separate dark-mode override is needed. */
.bp-notes-preline {
    white-space: pre-line;
}

/* ========================================================================
   Product Pricing Row (Add/Edit Product — Cost/Retail/Wholesale/Reseller)
   ======================================================================== */
/* "Cost / Purchase Price (৳) *" is long enough to wrap onto two lines at
   col-md-3 width while its three sibling labels stay on one line; with no
   shared baseline between independent columns, the wrapped label alone
   pushed its input down relative to the other three.
   Fix: keep all four columns on one line and let the row itself scroll
   horizontally, same as the wide-table pattern elsewhere in the app,
   instead of letting Bootstrap's col-md-3 shrink/stack and wrap the
   label. Scoped to this row only (not .row/.col-* globally) — those are
   used app-wide, and forcing them off-wrap everywhere would break every
   other responsive grid. min-height stays as a defensive fallback for a
   locale/font where even the fixed column width still wraps. No color
   involved, so no separate dark-mode override is needed. */
.bp-pricing-price-row {
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 4px;
}

.bp-pricing-price-row > [class*="col-"] {
    flex: 0 0 220px;
    width: 220px;
    max-width: none;
}

.bp-pricing-price-row .bp-form-label {
    min-height: 2.4em;
    white-space: normal;
}

/* ── Sales Targets (Manager: set a rep's monthly target) ── */
.bp-month-picker {
    width: auto;
}

.bp-target-amount-input {
    width: 160px;
    text-align: right;
    font-variant-numeric: tabular-nums;
}

.bp-amount-affix {
    position: relative;
    display: inline-block;
}

.bp-amount-affix-symbol {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--bp-text-muted, var(--bp-gray-600));
    pointer-events: none;
}

.bp-amount-affix .bp-form-control {
    padding-left: 30px;
}

.bp-rep-search {
    width: 260px;
    padding-left: 34px;
}

.bp-target-progress-col {
    min-width: 180px;
}

/* ── Sales Rep dashboard: monthly target progress bar ── */
.bp-target-progress {
    height: 10px;
    background-color: var(--bp-border);
}

[data-theme="dark"] .bp-target-progress {
    background-color: var(--bp-bg-dark, var(--bp-bg));
}

/* ── Add Product: "Fetch from URL" indeterminate loading bar ──
   No real percentage to report (a single AJAX call), so a sliding fill
   rather than a determinate width. Built on the theme-aware --bp-gray-200 /
   --bp-primary vars directly, so no separate [data-theme="dark"] block is
   needed here. */
.bp-indeterminate-bar {
    height: 3px;
    margin-top: 6px;
    border-radius: 2px;
    background-color: var(--bp-gray-200);
    overflow: hidden;
}

.bp-indeterminate-bar-fill {
    height: 100%;
    width: 40%;
    border-radius: 2px;
    background-color: var(--bp-primary);
    animation: bp-indeterminate-slide 1.2s ease-in-out infinite;
}

@keyframes bp-indeterminate-slide {
    0% {
        margin-left: -40%;
    }

    100% {
        margin-left: 100%;
    }
}

/* ── Meta Campaigns: floating typeahead result list (product/area search) ──
   Built entirely on the theme-aware --bp-gray-*/--bp-shadow-md vars, so no
   separate [data-theme="dark"] block is needed (same reasoning as the
   indeterminate bar above). */
.bp-search-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 1050;
    margin-top: 4px;
    max-height: 260px;
    overflow-y: auto;
    background-color: var(--bp-gray-100);
    border: 1px solid var(--bp-gray-300);
    border-radius: var(--bp-border-radius);
    box-shadow: var(--bp-shadow-md);
}

.bp-search-dropdown-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    cursor: pointer;
    font-size: 13px;
}

.bp-search-dropdown-item:hover {
    background-color: var(--bp-gray-200);
}

.bp-search-dropdown-item img {
    width: 28px;
    height: 28px;
    object-fit: cover;
    border-radius: 4px;
}

.bp-search-dropdown-empty {
    padding: 8px 12px;
    font-size: 12px;
    color: var(--bp-gray-600);
}

/* ── Generic no-wrap utility (e.g. a timestamp cell in a narrow table column) ── */
.bp-nowrap {
    white-space: nowrap;
}

/* ── Meta Campaigns: selected-state highlight for a picked ad-copy card ── */
.bp-card-selected {
    border-color: var(--bp-success);
    box-shadow: 0 0 0 1px var(--bp-success);
}

/* ── Meta Campaigns: interest chips (review page) ── */
.bp-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    font-size: 12px;
    border-radius: 999px;
    background-color: var(--bp-gray-200);
    border: 1px solid var(--bp-gray-300);
}

.bp-chip-selected {
    background-color: var(--bp-success);
    border-color: var(--bp-success);
    color: #fff;
}

.bp-chip-btn {
    background: none;
    border: none;
    padding: 0 2px;
    line-height: 1;
    cursor: pointer;
    color: inherit;
    opacity: 0.7;
}

.bp-chip-btn:hover {
    opacity: 1;
}

/* ── Meta Campaigns: banner picker grid (review page) ── */
.bp-creative-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 12px;
}

.bp-creative-card {
    padding: 10px;
    border: 1px solid var(--bp-gray-300);
    border-radius: var(--bp-border-radius);
    background-color: var(--bp-gray-100);
}

.bp-creative-selected {
    border-color: var(--bp-success);
    box-shadow: 0 0 0 1px var(--bp-success);
}

.bp-creative-thumb {
    width: 100%;
    aspect-ratio: 4 / 5;
    border-radius: 6px;
    overflow: hidden;
    background-color: var(--bp-gray-200);
    margin-bottom: 8px;
}

.bp-creative-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.bp-creative-meta {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

/* ── Meta Campaigns: approval confirmation page ── */
.bp-approve-preview-img {
    max-width: 240px;
    width: 100%;
    border-radius: var(--bp-border-radius);
    border: 1px solid var(--bp-gray-300);
    display: block;
}

/* ── Reports: AI Sales Reporting — KPI dashboard (spec v1.2.0) ──
   Built on the theme-aware --bp-gray-*/--bp-* vars used everywhere else in
   this file, so most rules need no separate [data-theme="dark"] block —
   this IS this app's dark-mode mechanism (data-theme attribute selectors),
   not Tailwind's `dark:` variant classes, which this codebase does not use
   anywhere (Bootstrap 5.3.3 + these bp- classes only, per CLAUDE.md). */
.bp-kpi-card {
    background-color: #fff;
    border: 1px solid var(--bp-gray-300);
    border-radius: var(--bp-border-radius);
    padding: 18px 20px;
    height: 100%;
    box-shadow: var(--bp-shadow-sm);
}

[data-theme="dark"] .bp-kpi-card {
    background-color: var(--bp-surface);
    border-color: var(--bp-border);
}

.bp-kpi-label {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--bp-gray-600);
    margin-bottom: 6px;
}

.bp-kpi-value {
    font-size: 22px;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 6px;
}

.bp-kpi-delta {
    font-size: 12px;
    font-weight: 700;
    display: inline-block;
}

.bp-kpi-delta.up {
    color: var(--bp-success);
}

.bp-kpi-delta.down {
    color: var(--bp-danger);
}

.bp-insight-card-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.bp-insight-card-list li {
    padding: 8px 10px;
    border-radius: var(--bp-border-radius);
    background-color: var(--bp-gray-100);
    border: 1px solid var(--bp-gray-200);
}

.bp-action-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.bp-action-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px;
    border-radius: var(--bp-border-radius);
    background-color: var(--bp-gray-100);
    border: 1px solid var(--bp-gray-200);
}

.bp-action-item-body {
    flex: 1;
    min-width: 0;
}

/* ==========================================================================
   Meta Campaigns: pickers (product multi-select, area, placements),
   banner upload, and the in-dashboard ad preview.
   Flat colours from the theme-aware --bp-* vars only. Rules on
   --bp-gray-* switch with the theme automatically; rules that use a fixed
   colour carry their own [data-theme="dark"] override just below.
   ========================================================================== */

/* -- Picker: shared input + dropdown -- */
.bp-picker {
    position: relative;
}

.bp-picker-input-wrap {
    position: relative;
}

.bp-picker-spinner {
    position: absolute;
    top: 50%;
    right: 12px;
    transform: translateY(-50%);
    color: var(--bp-gray-600);
    pointer-events: none;
}

.bp-picker-list {
    max-height: 340px;
}

.bp-picker-option {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    cursor: pointer;
    font-size: 13px;
    border-bottom: 1px solid var(--bp-gray-200);
}

.bp-picker-option:last-child {
    border-bottom: none;
}

.bp-picker-option:hover,
.bp-picker-option.is-active {
    background-color: var(--bp-gray-200);
}

.bp-picker-option.is-selected {
    opacity: 0.55;
    cursor: default;
}

.bp-picker-thumb {
    flex: 0 0 40px;
    width: 40px;
    height: 40px;
    object-fit: cover;
    border-radius: 6px;
    background-color: var(--bp-gray-200);
}

.bp-picker-thumb-empty {
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--bp-gray-500);
}

.bp-picker-body {
    flex: 1;
    min-width: 0;
}

.bp-picker-name {
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.bp-picker-sub {
    font-size: 11px;
    color: var(--bp-gray-600);
}

.bp-picker-price {
    flex: 0 0 auto;
    font-weight: 700;
    font-size: 12px;
    color: var(--bp-primary);
}

[data-theme="dark"] .bp-picker-price {
    color: var(--bp-primary-light);
}

.bp-picker-empty {
    padding: 14px 12px;
    font-size: 12px;
    color: var(--bp-gray-600);
    text-align: center;
}

/* -- Picker: selected products list -- */
.bp-picker-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 10px 0 6px;
    font-size: 12px;
    color: var(--bp-gray-600);
}

.bp-picker-counter {
    font-weight: 700;
}

.bp-picker-counter.is-full {
    color: var(--bp-warning);
}

.bp-picker-selected {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.bp-picker-chip {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    border: 1px solid var(--bp-gray-300);
    border-radius: var(--bp-border-radius);
    background-color: var(--bp-gray-100);
}

.bp-picker-chip .bp-picker-thumb {
    flex-basis: 44px;
    width: 44px;
    height: 44px;
}

.bp-picker-chip-actions {
    display: flex;
    gap: 4px;
    flex: 0 0 auto;
}

.bp-picker-msg {
    font-size: 12px;
    margin-top: 6px;
    color: var(--bp-warning);
}

/* -- Area picker -- */
.bp-area-presets {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 10px;
}

.bp-area-preset {
    padding: 5px 12px;
    font-size: 12px;
    font-weight: 600;
    border-radius: 999px;
    border: 1px solid var(--bp-gray-300);
    background-color: var(--bp-gray-100);
    color: inherit;
    cursor: pointer;
    transition: var(--bp-transition);
}

.bp-area-preset:hover {
    border-color: var(--bp-primary);
}

.bp-area-preset.is-on {
    background-color: var(--bp-primary);
    border-color: var(--bp-primary);
    color: #fff;
}

.bp-area-selected {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 10px;
}

/* -- Placement picker -- */
.bp-placement-auto {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px;
    border: 1px solid var(--bp-gray-300);
    border-radius: var(--bp-border-radius);
    background-color: var(--bp-gray-100);
}

.bp-placement-group {
    border: 1px solid var(--bp-gray-300);
    border-radius: var(--bp-border-radius);
    margin-top: 10px;
    overflow: hidden;
}

.bp-placement-group-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 8px 12px;
    background-color: var(--bp-gray-200);
    font-weight: 700;
    font-size: 13px;
}

.bp-placement-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    border-top: 1px solid var(--bp-gray-200);
    font-size: 13px;
}

.bp-placement-row.is-disabled {
    opacity: 0.5;
}

.bp-placement-body {
    flex: 1;
    min-width: 0;
}

.bp-placement-hint {
    font-size: 11px;
    color: var(--bp-gray-600);
}

.bp-placement-ratio {
    flex: 0 0 auto;
    padding: 2px 8px;
    font-size: 11px;
    font-weight: 700;
    border-radius: 999px;
    background-color: var(--bp-gray-200);
    color: var(--bp-gray-700);
}

/* -- Creative-format radio (single banner / carousel) -- */
.bp-format-options {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.bp-format-option {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 10px 12px;
    border: 1px solid var(--bp-gray-300);
    border-radius: var(--bp-border-radius);
    background-color: var(--bp-gray-100);
    cursor: pointer;
}

.bp-format-option.is-on {
    border-color: var(--bp-primary);
    box-shadow: 0 0 0 1px var(--bp-primary);
}

/* -- Banner upload -- */
.bp-dropzone {
    display: block;
    padding: 18px 12px;
    text-align: center;
    font-size: 13px;
    color: var(--bp-gray-600);
    border: 2px dashed var(--bp-gray-400);
    border-radius: var(--bp-border-radius);
    background-color: var(--bp-gray-100);
    cursor: pointer;
    transition: var(--bp-transition);
}

.bp-dropzone:hover,
.bp-dropzone.is-dragover {
    border-color: var(--bp-primary);
    color: var(--bp-primary);
}

.bp-dropzone input[type="file"] {
    display: none;
}

.bp-upload-previews {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(96px, 1fr));
    gap: 8px;
    margin-top: 10px;
}

.bp-upload-preview {
    position: relative;
    border: 1px solid var(--bp-gray-300);
    border-radius: 6px;
    overflow: hidden;
    background-color: var(--bp-gray-100);
}

.bp-upload-preview.is-invalid {
    border-color: var(--bp-danger);
}

.bp-upload-preview img {
    display: block;
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
}

.bp-upload-preview-note {
    padding: 3px 6px;
    font-size: 10px;
    line-height: 1.3;
    color: var(--bp-gray-700);
}

.bp-upload-preview.is-invalid .bp-upload-preview-note {
    color: var(--bp-danger);
}

.bp-coverage-item {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    font-size: 12px;
    padding: 4px 0;
}

.bp-coverage-item.is-ok i {
    color: var(--bp-success);
}

.bp-coverage-item.is-missing i {
    color: var(--bp-warning);
}

.bp-card-image-override {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 0;
    border-bottom: 1px solid var(--bp-gray-200);
}

.bp-card-image-override:last-child {
    border-bottom: none;
}

/* -- Ad preview (approximate Facebook / Instagram mobile feed post) -- */
.bp-adprev-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 10px;
}

.bp-adprev-tab {
    padding: 4px 12px;
    font-size: 12px;
    font-weight: 700;
    border: 1px solid var(--bp-gray-300);
    border-radius: 999px;
    background-color: var(--bp-gray-100);
    color: inherit;
    cursor: pointer;
}

/* ==========================================================================
   Storage usage (Settings → Storage)
   ========================================================================== */
.bp-storage-meter {
    height: 10px;
    border-radius: 999px;
    background: var(--bp-border-soft);
    overflow: hidden;
}

.bp-storage-meter > i {
    display: block;
    width: 0;
    height: 100%;
    border-radius: 999px;
    background: var(--bp-primary);
}

.bp-storage-meter.is-warning > i {
    background: var(--bp-warning);
}

.bp-storage-meter.is-full > i {
    background: var(--bp-danger);
}

.bp-storage-meter-sm {
    flex: 1 1 auto;
    height: 6px;
    min-width: 90px;
}

.bp-storage-meter-caption {
    margin-top: 10px;
    font-size: 13px;
    color: var(--bp-text-2);
    font-variant-numeric: tabular-nums;
}

.bp-storage-hint {
    color: var(--bp-muted);
}

.bp-storage-share {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 160px;
    font-size: 12px;
    color: var(--bp-text-2);
    font-variant-numeric: tabular-nums;
}

.bp-storage-limit-form {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}

.bp-storage-chart {
    position: relative;
    height: 260px;
}

[data-theme="dark"] .bp-storage-meter {
    background: var(--bp-border);
}

[data-theme="dark"] .bp-storage-meter-caption,
[data-theme="dark"] .bp-storage-share {
    color: var(--bp-text-2);
}

[data-theme="dark"] .bp-storage-hint {
    color: var(--bp-muted);
}

@media (max-width: 768px) {
    .bp-storage-limit-form {
        align-items: stretch;
        flex-direction: column;
    }

    .bp-storage-chart {
        height: 200px;
    }
}

.bp-adprev-tab.is-on {
    background-color: var(--bp-primary);
    border-color: var(--bp-primary);
    color: #fff;
}

.bp-adprev-stage {
    display: flex;
    justify-content: center;
    padding: 16px;
    border-radius: var(--bp-border-radius);
    background-color: var(--bp-gray-200);
}

.bp-adprev-phone {
    width: 100%;
    max-width: 360px;
    background-color: #fff;
    color: #1c1e21;
    border: 1px solid var(--bp-gray-300);
    border-radius: 10px;
    overflow: hidden;
}

[data-theme="dark"] .bp-adprev-phone {
    background-color: #242526;
    color: var(--bp-text);
    border-color: #3a3b3c;
}

.bp-adprev-head {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
}

.bp-adprev-avatar {
    flex: 0 0 36px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--bp-primary);
    color: #fff;
    font-weight: 800;
    font-size: 14px;
}

.bp-adprev-page {
    font-size: 13px;
    font-weight: 700;
    line-height: 1.2;
}

.bp-adprev-sponsored {
    font-size: 11px;
    color: var(--bp-gray-600);
}

[data-theme="dark"] .bp-adprev-sponsored {
    color: var(--bp-gray-600);
}

.bp-adprev-text {
    padding: 0 12px 10px;
    font-size: 13px;
    line-height: 1.4;
    white-space: pre-line;
}

.bp-adprev-more {
    color: var(--bp-gray-600);
    font-weight: 600;
}

[data-theme="dark"] .bp-adprev-more {
    color: var(--bp-gray-600);
}

.bp-adprev-media {
    background-color: var(--bp-gray-200);
}

.bp-adprev-media img {
    display: block;
    width: 100%;
    object-fit: cover;
}

.bp-adprev-media.is-feed img {
    height: auto;
}

.bp-adprev-media.is-story {
    aspect-ratio: 9 / 16;
    display: flex;
    align-items: center;
    justify-content: center;
}

.bp-adprev-media.is-story img {
    height: 100%;
}

.bp-adprev-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    aspect-ratio: 1 / 1;
    color: var(--bp-gray-500);
    font-size: 12px;
    text-align: center;
    padding: 12px;
}

.bp-adprev-linkbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 10px 12px;
    background-color: #f0f2f5;
}

[data-theme="dark"] .bp-adprev-linkbar {
    background-color: #3a3b3c;
}

.bp-adprev-headline {
    font-size: 13px;
    font-weight: 700;
    line-height: 1.25;
}

.bp-adprev-desc {
    font-size: 11px;
    color: var(--bp-gray-600);
}

[data-theme="dark"] .bp-adprev-desc {
    color: var(--bp-gray-600);
}

.bp-adprev-cta {
    flex: 0 0 auto;
    padding: 6px 10px;
    font-size: 12px;
    font-weight: 700;
    border-radius: 6px;
    background-color: var(--bp-border-soft);
    color: #1c1e21;
    white-space: nowrap;
}

[data-theme="dark"] .bp-adprev-cta {
    background-color: #4e4f50;
    color: var(--bp-text);
}

.bp-adprev-actions {
    display: flex;
    justify-content: space-around;
    padding: 8px 12px;
    font-size: 12px;
    font-weight: 600;
    color: var(--bp-gray-600);
    border-top: 1px solid var(--bp-border);
}

[data-theme="dark"] .bp-adprev-actions {
    color: var(--bp-gray-600);
    border-top-color: #3a3b3c;
}

/* Carousel: CSS scroll-snap track with a peek of the next card. */
.bp-adprev-carousel {
    position: relative;
}

.bp-adprev-track {
    display: flex;
    gap: 8px;
    padding: 0 12px 4px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
}

.bp-adprev-track::-webkit-scrollbar {
    display: none;
}

.bp-adprev-card {
    flex: 0 0 78%;
    scroll-snap-align: start;
    border: 1px solid var(--bp-border);
    border-radius: 8px;
    overflow: hidden;
    background-color: inherit;
}

[data-theme="dark"] .bp-adprev-card {
    border-color: #3a3b3c;
}

.bp-adprev-card-img {
    aspect-ratio: 1 / 1;
    background-color: var(--bp-gray-200);
}

.bp-adprev-card-img img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.bp-adprev-card-img.is-missing {
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--bp-danger);
    font-size: 11px;
    text-align: center;
    padding: 8px;
}

.bp-adprev-card-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
    padding: 8px 10px;
    background-color: #f0f2f5;
}

[data-theme="dark"] .bp-adprev-card-foot {
    background-color: #3a3b3c;
}

.bp-adprev-card-name {
    font-size: 12px;
    font-weight: 700;
    line-height: 1.25;
}

.bp-adprev-card-price {
    font-size: 11px;
    color: var(--bp-gray-600);
}

[data-theme="dark"] .bp-adprev-card-price {
    color: var(--bp-gray-600);
}

.bp-adprev-nav {
    position: absolute;
    top: 38%;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: 1px solid var(--bp-gray-300);
    background-color: #fff;
    color: #1c1e21;
    cursor: pointer;
    z-index: 2;
    box-shadow: var(--bp-shadow-sm);
}

[data-theme="dark"] .bp-adprev-nav {
    background-color: #3a3b3c;
    color: var(--bp-text);
    border-color: #4e4f50;
}

.bp-adprev-nav.is-prev {
    left: 4px;
}

.bp-adprev-nav.is-next {
    right: 4px;
}

.bp-adprev-nav[disabled] {
    opacity: 0.35;
    cursor: default;
}

.bp-adprev-dots {
    display: flex;
    justify-content: center;
    gap: 5px;
    padding: 8px 0 2px;
}

.bp-adprev-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background-color: #ced0d4;
}

.bp-adprev-dot.is-on {
    background-color: var(--bp-primary-light);
}

.bp-adprev-variants {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 10px;
}

.bp-adprev-note {
    font-size: 11px;
    color: var(--bp-gray-600);
    margin-top: 8px;
}

.bp-adprev-warning {
    font-size: 12px;
    color: var(--bp-warning);
    margin-top: 6px;
}

/* Compact card strip used on the approve page. */
.bp-card-strip {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 4px;
}

.bp-card-strip-item {
    flex: 0 0 96px;
    font-size: 11px;
}

.bp-card-strip-item img,
.bp-card-strip-item .bp-adprev-card-img {
    display: block;
    width: 96px;
    height: 96px;
    object-fit: cover;
    border-radius: 6px;
    border: 1px solid var(--bp-gray-300);
}

@media (max-width: 767.98px) {
    .bp-adprev-stage {
        padding: 8px;
    }

    .bp-adprev-card {
        flex-basis: 84%;
    }
}

.bp-adprev-more {
    cursor: pointer;
}

.bp-adprev-track {
    cursor: grab;
}

.bp-adprev-track.is-dragging {
    scroll-snap-type: none;
    cursor: grabbing;
    user-select: none;
}

/* ==========================================================================
   AI SALES REPORTING CHAT — history sidebar + message thread
   (Modules/Report/resources/views/ai-sales.blade.php)
   Two panes >= 992px; below that the history list stacks on top of the
   thread. Bubbles/inputs use hard-coded surfaces, so each has an explicit
   [data-theme="dark"] override below.
   ========================================================================== */
.bp-chat {
    display: grid;
    grid-template-columns: 290px minmax(0, 1fr);
    height: calc(100vh - 210px);
    min-height: 540px;
    background-color: #fff;
    border: 1px solid var(--bp-gray-300);
    border-radius: var(--bp-border-radius);
    box-shadow: var(--bp-shadow-sm);
    overflow: hidden;
}

.bp-chat-sidebar {
    display: flex;
    flex-direction: column;
    min-height: 0;
    border-right: 1px solid var(--bp-gray-300);
    background-color: var(--bp-gray-100);
}

.bp-chat-sidebar-head {
    padding: 14px;
    border-bottom: 1px solid var(--bp-gray-300);
}

.bp-chat-history {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    padding: 8px;
}

.bp-chat-history-item {
    display: block;
    width: 100%;
    padding: 9px 12px;
    margin-bottom: 4px;
    border: 1px solid transparent;
    border-radius: var(--bp-border-radius);
    background: transparent;
    text-align: left;
    color: var(--bp-dark);
    cursor: pointer;
    transition: var(--bp-transition);
}

.bp-chat-history-item:hover {
    background-color: var(--bp-gray-200);
}

.bp-chat-history-item.is-active {
    background-color: #fff;
    border-color: var(--bp-primary-light);
}

.bp-chat-history-title {
    display: block;
    font-size: 13px;
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.bp-chat-history-time {
    display: block;
    font-size: 11px;
    color: var(--bp-gray-600);
}

.bp-chat-history-empty {
    padding: 16px 8px;
    font-size: 12px;
    text-align: center;
    color: var(--bp-gray-600);
}

.bp-chat-main {
    display: flex;
    flex-direction: column;
    min-width: 0;
    min-height: 0;
}

.bp-chat-messages {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    padding: 20px;
}

.bp-chat-empty {
    max-width: 560px;
    margin: 40px auto 0;
    text-align: center;
}

.bp-chat-empty-title {
    font-size: 15px;
    font-weight: 700;
    margin-bottom: 4px;
}

.bp-chat-chips {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    margin-top: 16px;
}

.bp-chat-chip {
    padding: 7px 14px;
    border: 1px solid var(--bp-gray-300);
    border-radius: 999px;
    background-color: #fff;
    font-size: 13px;
    font-weight: 600;
    color: var(--bp-primary);
    cursor: pointer;
    transition: var(--bp-transition);
}

.bp-chat-chip:hover {
    border-color: var(--bp-primary-light);
    background-color: var(--bp-gray-100);
}

.bp-chat-msg {
    display: flex;
    flex-direction: column;
    margin-bottom: 16px;
}

.bp-chat-msg-user {
    align-items: flex-end;
}

.bp-chat-msg-assistant {
    align-items: flex-start;
}

.bp-chat-bubble {
    max-width: 78%;
    padding: 10px 14px;
    border-radius: 12px;
    font-size: 14px;
    line-height: 1.55;
    word-wrap: break-word;
    overflow-wrap: anywhere;
}

.bp-chat-bubble-user {
    background-color: var(--bp-primary);
    color: #fff;
    border-bottom-right-radius: 3px;
    white-space: pre-wrap;
}

.bp-chat-bubble-assistant {
    background-color: var(--bp-gray-100);
    color: var(--bp-dark);
    border: 1px solid var(--bp-gray-300);
    border-bottom-left-radius: 3px;
}

.bp-chat-bubble-assistant p {
    margin: 0 0 6px;
}

.bp-chat-bubble-assistant p:last-child,
.bp-chat-bubble-assistant ul:last-child {
    margin-bottom: 0;
}

.bp-chat-bubble-assistant ul {
    margin: 0 0 6px;
    padding-left: 18px;
}

.bp-chat-bubble-error {
    background-color: #fdecea;
    border-color: #f5c6c1;
    color: var(--bp-danger);
}

.bp-chat-time {
    margin-top: 3px;
    font-size: 11px;
    color: var(--bp-gray-600);
}

.bp-chat-links {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 8px;
}

.bp-chat-typing {
    display: inline-flex;
    gap: 4px;
    padding: 12px 14px;
}

.bp-chat-typing span {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background-color: var(--bp-gray-500);
    animation: bp-chat-dot 1.2s ease-in-out infinite;
}

.bp-chat-typing span:nth-child(2) {
    animation-delay: 0.15s;
}

.bp-chat-typing span:nth-child(3) {
    animation-delay: 0.3s;
}

@keyframes bp-chat-dot {

    0%,
    60%,
    100% {
        opacity: 0.3;
        transform: translateY(0);
    }

    30% {
        opacity: 1;
        transform: translateY(-3px);
    }
}

.bp-chat-inputbar {
    display: flex;
    gap: 8px;
    padding: 12px 16px;
    border-top: 1px solid var(--bp-gray-300);
    background-color: #fff;
}

.bp-chat-note {
    padding: 0 16px 10px;
    font-size: 11px;
    color: var(--bp-gray-600);
    background-color: #fff;
}

@media (max-width: 991.98px) {
    .bp-chat {
        grid-template-columns: 1fr;
        grid-template-rows: auto minmax(0, 1fr);
        height: calc(100vh - 170px);
        min-height: 520px;
    }

    .bp-chat-sidebar {
        max-height: 190px;
        border-right: 0;
        border-bottom: 1px solid var(--bp-gray-300);
    }
}

@media (max-width: 767.98px) {
    .bp-chat-messages {
        padding: 14px;
    }

    .bp-chat-bubble {
        max-width: 92%;
    }
}

[data-theme="dark"] .bp-chat,
[data-theme="dark"] .bp-chat-inputbar,
[data-theme="dark"] .bp-chat-note {
    background-color: var(--bp-surface);
    border-color: var(--bp-border);
}

[data-theme="dark"] .bp-chat-sidebar {
    background-color: var(--bp-bg);
    border-color: var(--bp-border);
}

[data-theme="dark"] .bp-chat-sidebar-head {
    border-color: var(--bp-border);
}

[data-theme="dark"] .bp-chat-history-item {
    color: var(--bp-text);
}

[data-theme="dark"] .bp-chat-history-item:hover {
    background-color: var(--bp-row-hover);
}

[data-theme="dark"] .bp-chat-history-item.is-active {
    background-color: var(--bp-surface);
    border-color: var(--bp-primary-light);
}

[data-theme="dark"] .bp-chat-chip {
    background-color: var(--bp-surface);
    border-color: var(--bp-border);
    color: var(--bp-primary-light);
}

[data-theme="dark"] .bp-chat-chip:hover {
    background-color: var(--bp-row-hover);
}

[data-theme="dark"] .bp-chat-bubble-assistant {
    background-color: var(--bp-row-hover);
    border-color: var(--bp-border);
    color: var(--bp-text);
}

[data-theme="dark"] .bp-chat-bubble-error {
    background-color: #3a1d1a;
    border-color: #6b2c26;
    color: #f1948a;
}

/* ==========================================================================
   AI REPORT CHAT — reply-language toggle (বাংলা / English)
   Sits at the top of the history sidebar (partials/ai-chat.blade.php), above
   "New conversation". Flat colors only; active state uses --bp-primary.
   ========================================================================== */
.bp-chat-lang-toggle {
    display: flex;
    margin-bottom: 10px;
    border: 1px solid var(--bp-gray-300);
    border-radius: var(--bp-border-radius);
    background-color: #fff;
    overflow: hidden;
}

.bp-chat-lang-btn {
    flex: 1 1 50%;
    padding: 6px 10px;
    border: 0;
    background: transparent;
    font-size: 13px;
    font-weight: 700;
    color: var(--bp-gray-700);
    cursor: pointer;
    transition: var(--bp-transition);
}

.bp-chat-lang-btn:hover:not(.is-active):not(:disabled) {
    background-color: var(--bp-gray-200);
}

.bp-chat-lang-btn.is-active {
    background-color: var(--bp-primary);
    color: #fff;
}

.bp-chat-lang-btn:disabled {
    cursor: not-allowed;
    opacity: 0.6;
}

[data-theme="dark"] .bp-chat-lang-toggle {
    background-color: var(--bp-surface);
    border-color: var(--bp-border);
}

[data-theme="dark"] .bp-chat-lang-btn {
    color: var(--bp-text);
}

[data-theme="dark"] .bp-chat-lang-btn:hover:not(.is-active):not(:disabled) {
    background-color: var(--bp-row-hover);
}

[data-theme="dark"] .bp-chat-lang-btn.is-active {
    background-color: var(--bp-primary-light);
    color: #fff;
}

/* ==========================================================================
   META COMPETITOR ANALYSIS — Ad Library result cards + status panel
   (Modules/Marketing/resources/views/meta-competitor-analysis/index.blade.php)
   3 columns >= 1200px, 2 >= 768px, 1 below. Hard-coded card surfaces have
   explicit [data-theme="dark"] overrides at the end of this block.
   ========================================================================== */
.bp-adlib-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
}

.bp-adlib-card {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 16px;
    background-color: #fff;
    border: 1px solid var(--bp-gray-300);
    border-radius: var(--bp-border-radius);
    box-shadow: var(--bp-shadow-sm);
}

.bp-adlib-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 8px;
}

.bp-adlib-page {
    font-size: 13px;
    font-weight: 800;
    color: var(--bp-primary);
    overflow-wrap: anywhere;
}

.bp-adlib-platforms {
    display: flex;
    flex-shrink: 0;
    gap: 4px;
}

.bp-adlib-title {
    margin: 0;
    font-size: 15px;
    font-weight: 700;
    overflow-wrap: anywhere;
}

.bp-adlib-body {
    display: -webkit-box;
    -webkit-line-clamp: 6;
    -webkit-box-orient: vertical;
    margin: 0;
    overflow: hidden;
    font-size: 14px;
    line-height: 1.5;
    white-space: pre-line;
    overflow-wrap: anywhere;
}

.bp-adlib-desc {
    margin: 0;
    font-size: 12px;
    color: var(--bp-gray-600);
    overflow-wrap: anywhere;
}

.bp-adlib-meta {
    margin-top: auto;
    padding-top: 8px;
    border-top: 1px solid var(--bp-gray-200);
    font-size: 12px;
    font-weight: 600;
    color: var(--bp-gray-700);
}

.bp-adlib-stats {
    font-size: 12px;
    font-weight: 700;
    color: var(--bp-secondary);
}

.bp-adlib-link {
    align-self: flex-start;
}

.bp-adlib-state {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    margin-bottom: 16px;
    padding: 16px 20px;
    background-color: #fff;
    border: 1px solid var(--bp-gray-300);
    border-left-width: 4px;
    border-radius: var(--bp-border-radius);
}

.bp-adlib-state.d-none {
    display: none;
}

.bp-adlib-state.is-loading,
.bp-adlib-state.is-empty {
    border-left-color: var(--bp-primary-light);
}

.bp-adlib-state.is-warning {
    border-left-color: var(--bp-warning);
}

.bp-adlib-state.is-error {
    border-left-color: var(--bp-danger);
}

.bp-adlib-state-icon {
    margin-top: 2px;
    font-size: 20px;
    color: var(--bp-gray-600);
}

.bp-adlib-state-title {
    font-size: 15px;
    font-weight: 700;
}

.bp-adlib-state-text {
    font-size: 13px;
    color: var(--bp-gray-700);
}

@media (max-width: 1199.98px) {
    .bp-adlib-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 767.98px) {
    .bp-adlib-grid {
        grid-template-columns: minmax(0, 1fr);
    }
}

[data-theme="dark"] .bp-adlib-card,
[data-theme="dark"] .bp-adlib-state {
    background-color: var(--bp-surface);
    border-color: var(--bp-border);
}

[data-theme="dark"] .bp-adlib-state.is-warning {
    border-left-color: var(--bp-warning);
}

[data-theme="dark"] .bp-adlib-state.is-error {
    border-left-color: var(--bp-danger);
}

[data-theme="dark"] .bp-adlib-meta {
    border-top-color: var(--bp-border);
}

[data-theme="dark"] .bp-adlib-page {
    color: var(--bp-primary-light);
}

/* ==========================================================================
   META PRODUCT ANALYSIS — demand list, activity stats, info note
   (Modules/Marketing/resources/views/meta-product-analysis/index.blade.php)
   Reuses the bp-adlib-* card grid / status panel from Meta Competitor Analysis.
   Hard-coded surfaces have explicit [data-theme="dark"] overrides below.
   ========================================================================== */
.bp-prodan-interests {
    margin: 0;
    padding: 0;
    list-style: none;
}

.bp-prodan-interests li {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    padding: 9px 0;
    border-bottom: 1px solid var(--bp-gray-200);
}

.bp-prodan-interests li:last-child {
    border-bottom: 0;
}

.bp-prodan-interest-name {
    font-size: 14px;
    font-weight: 700;
    overflow-wrap: anywhere;
}

.bp-prodan-interest-size {
    flex-shrink: 0;
    font-size: 13px;
    font-weight: 600;
    color: var(--bp-secondary);
}

.bp-prodan-empty {
    padding: 8px 0;
    font-size: 13px;
    color: var(--bp-gray-600);
}

.bp-prodan-stats {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.bp-prodan-stat {
    padding: 14px 16px;
    background-color: var(--bp-gray-100);
    border: 1px solid var(--bp-gray-300);
    border-radius: var(--bp-border-radius);
}

.bp-prodan-stat-value {
    font-size: 26px;
    font-weight: 800;
    line-height: 1.2;
    color: var(--bp-primary);
}

.bp-prodan-stat-label {
    font-size: 13px;
    font-weight: 700;
}

.bp-prodan-stat-hint {
    font-size: 11px;
    color: var(--bp-gray-600);
}

.bp-prodan-note {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px 14px;
    background-color: #eaf3fb;
    border: 1px solid #c9dff2;
    border-radius: var(--bp-border-radius);
    font-size: 13px;
    color: var(--bp-primary-dark);
}

.bp-prodan-note-icon {
    margin-top: 2px;
}

.bp-prodan-note-link {
    display: inline-block;
    margin-top: 4px;
    font-weight: 700;
}

@media (max-width: 767.98px) {
    .bp-prodan-stats {
        grid-template-columns: minmax(0, 1fr);
    }

    .bp-prodan-interests li {
        flex-direction: column;
        gap: 2px;
    }
}

[data-theme="dark"] .bp-prodan-stat {
    background-color: var(--bp-bg);
    border-color: var(--bp-border);
}

[data-theme="dark"] .bp-prodan-interests li {
    border-bottom-color: var(--bp-border);
}

[data-theme="dark"] .bp-prodan-note {
    background-color: #12283a;
    border-color: #1f4566;
    color: #9cc9ea;
}

[data-theme="dark"] .bp-prodan-stat-value {
    color: var(--bp-primary-light);
}


/* ============================================================
   DASHBOARD — Sales Analytics, tables, Quick Modules, Top Dues
   ============================================================ */
.bp-dash-single {
    grid-template-columns: minmax(0, 1fr);
}

/* Compact table inset used by dashboard cards (design: .table-wrap) */
.bp-dash-table {
    padding: 12px 8px 8px;
}

.bp-dash-table .bp-table tbody tr:last-child td {
    border-bottom: 0;
}

.bp-table th.num,
.bp-table td.num {
    text-align: right;
    font-variant-numeric: tabular-nums;
}

.bp-table td.amt {
    font-weight: 700;
}

.bp-table td.bp-inv a {
    font-weight: 600;
    color: var(--bp-primary-ink);
}

/* Sales Analytics */
.bp-chart-meta {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    padding: 14px 20px 0;
}

.bp-chart-total {
    font-size: 24px;
    font-weight: 800;
    letter-spacing: -0.02em;
    line-height: 1.1;
    font-variant-numeric: tabular-nums;
}

.bp-chart-sub {
    font-size: 12px;
    color: var(--bp-muted);
}

.bp-chart-range {
    display: none;
    align-items: center;
    gap: 8px;
    font-size: 12.5px;
    color: var(--bp-text-2);
}

.bp-chart-range.on {
    display: flex;
}

.bp-chart-range input {
    height: 32px;
    padding: 0 8px;
    border: 1px solid var(--bp-border);
    border-radius: 8px;
    background: var(--bp-surface);
    color: var(--bp-text);
}

.bp-chart-plot {
    position: relative;
    height: 270px;
    padding: 8px 12px 14px;
}

@media (max-width: 560px) {
    .bp-chart-plot {
        height: 220px;
    }
}

/* Quick Modules — shortcut tile grid (design region R9) */
.bp-quick-modules-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 10px;
    padding: 16px 20px 20px;
}

.bp-quick-modules .bp-card-body {
    padding: 0;
}

.bp-quick-module {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    min-height: 44px;
    padding: 14px 6px 12px;
    border: 1px solid var(--bp-border-soft);
    border-radius: 12px;
    color: var(--bp-text-2);
    font-size: 12.5px;
    font-weight: 500;
    text-align: center;
    text-decoration: none;
    transition: border-color 0.15s ease, background-color 0.15s ease, color 0.15s ease;
}

.bp-quick-module-icon {
    display: grid;
    place-items: center;
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    border-radius: 11px;
    background-color: var(--bp-primary-50);
    color: var(--bp-primary-ink);
    font-size: 17px;
    transition: background-color 0.15s ease;
}

.bp-quick-module-label {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    overflow: hidden;
    max-width: 100%;
    line-height: 1.3;
    overflow-wrap: anywhere;
}

.bp-quick-module:hover,
.bp-quick-module:focus-visible {
    border-color: var(--bp-primary);
    background-color: var(--bp-primary-50);
    color: var(--bp-primary-ink);
}

.bp-quick-module:hover .bp-quick-module-icon,
.bp-quick-module:focus-visible .bp-quick-module-icon {
    background-color: var(--bp-surface);
}

@media (max-width: 900px) {
    .bp-quick-modules-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 560px) {
    .bp-quick-modules-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

/* Top Dues */
.bp-top-dues-caption {
    margin-left: 8px;
    font-size: 11px;
    font-weight: 600;
    color: var(--bp-muted);
}

.bp-top-dues-name {
    display: inline-block;
    max-width: 220px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    vertical-align: bottom;
    color: var(--bp-primary-ink);
    text-decoration: none;
}

.bp-top-dues-name:hover {
    text-decoration: underline;
}

.bp-top-dues-phone-sub {
    display: none;
}

.bp-top-dues-due {
    color: var(--bp-danger-ink);
    white-space: nowrap;
}

.bp-dash-empty {
    padding: 32px 20px;
    text-align: center;
    color: var(--bp-text-2);
}

.bp-dash-empty i {
    display: block;
    margin-bottom: 8px;
    font-size: 28px;
    color: var(--bp-success);
}

@media (max-width: 767.98px) {
    .bp-top-dues-md {
        display: none;
    }

    .bp-top-dues-phone-sub {
        display: block;
    }

    .bp-top-dues-name {
        max-width: 150px;
    }
}

/* ============================================================
   REDESIGN 2026 — shared components + vendor skins
   Design source: Claude outputs/design-reference/yes-sme-dashboard.html
   ============================================================ */

/* Global focus ring + reduced motion */
:focus-visible {
    outline: 2px solid var(--bp-primary);
    outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        transition: none !important;
        animation-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* Bootstrap colour variables follow the design tokens */
:root {
    --bs-body-font-family: var(--bp-font);
    --bs-body-color: var(--bp-text);
    --bs-body-bg: var(--bp-bg);
    --bs-border-color: var(--bp-border);
    --bs-link-color: var(--bp-primary-ink);
    --bs-primary: #1A6FEA;
    --bs-primary-rgb: 26, 111, 234;
    --bs-success: #10B981;
    --bs-success-rgb: 16, 185, 129;
    --bs-danger: #EF4444;
    --bs-danger-rgb: 239, 68, 68;
    --bs-warning: #F59E0B;
    --bs-warning-rgb: 245, 158, 11;
    --bs-info: #1A6FEA;
    --bs-info-rgb: 26, 111, 234;
}

[data-theme="dark"] {
    --bs-body-color: var(--bp-text);
    --bs-body-bg: var(--bp-bg);
    --bs-border-color: var(--bp-border);
    --bs-primary: #4B8FF2;
    --bs-primary-rgb: 75, 143, 242;
    --bs-info: #4B8FF2;
    --bs-info-rgb: 75, 143, 242;
}

/* Status dot on badges (opt-out: .bp-badge-nodot; hero/xs/count variants skip it) */
.bp-badge::before {
    content: "";
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background-color: currentColor;
    flex: 0 0 auto;
}

.bp-badge-nodot::before,
.bp-badge-xs::before,
.bp-badge-hero::before,
.bp-badge-img-primary::before,
.bp-badge-clickable::before,
.bp-badge:empty::before {
    display: none;
}

.bp-badge-xs {
    font-size: 10px;
    padding: 2px 6px;
}

/* Text link (card-header "View all", inline links) */
.bp-link {
    color: var(--bp-primary-ink);
    font-weight: 600;
    font-size: 13px;
}

.bp-link:hover {
    color: var(--bp-primary-ink);
    text-decoration: underline;
}

/* Pill button (used on dark/gradient surfaces) */
.bp-btn-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    height: 40px;
    padding: 0 20px;
    border-radius: 999px;
    border: 0;
    background: #fff;
    color: #0F4CB0;
    font-weight: 700;
    cursor: pointer;
    transition: background-color 0.15s ease;
}

.bp-btn-pill:hover {
    background: #EAF2FF;
    color: #0F4CB0;
}

/* Header Quick Action button takes the design's primary-button slot */
.bp-quick-actions-btn.bp-btn {
    min-height: 40px;
    padding: 0 16px;
    font-size: 14px;
    gap: 8px;
    border-radius: var(--bp-radius-md);
}

/* Segmented control (timeframe / view switch) */
.bp-seg {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 2px;
    padding: 3px;
    background-color: var(--bp-bg);
    border: 1px solid var(--bp-border);
    border-radius: var(--bp-radius-md);
}

.bp-seg > a,
.bp-seg > button {
    border: 0;
    background: transparent;
    padding: 5px 12px;
    border-radius: var(--bp-radius-sm);
    font-size: 12.5px;
    font-weight: 500;
    color: var(--bp-text-2);
    cursor: pointer;
    text-decoration: none;
}

.bp-seg > a:hover,
.bp-seg > button:hover {
    color: var(--bp-text);
}

.bp-seg > [aria-pressed="true"],
.bp-seg > .active {
    background-color: var(--bp-surface);
    color: var(--bp-primary-ink);
    font-weight: 700;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.10);
}

[data-theme="dark"] .bp-seg > [aria-pressed="true"],
[data-theme="dark"] .bp-seg > .active {
    box-shadow: none;
}

/* Bootstrap alerts — tinted tokens */
.alert {
    border-radius: var(--bp-radius-md);
    border-width: 1px;
    font-size: 13.5px;
}

.alert-success {
    --bs-alert-color: var(--bp-success-ink);
    --bs-alert-bg: var(--bp-success-bg);
    --bs-alert-border-color: color-mix(in srgb, var(--bp-success) 30%, transparent);
}

.alert-danger {
    --bs-alert-color: var(--bp-danger-ink);
    --bs-alert-bg: var(--bp-danger-bg);
    --bs-alert-border-color: color-mix(in srgb, var(--bp-danger) 30%, transparent);
}

.alert-warning {
    --bs-alert-color: var(--bp-warning-ink);
    --bs-alert-bg: var(--bp-warning-bg);
    --bs-alert-border-color: color-mix(in srgb, var(--bp-warning) 30%, transparent);
}

.alert-info {
    --bs-alert-color: var(--bp-primary-ink);
    --bs-alert-bg: var(--bp-primary-50);
    --bs-alert-border-color: color-mix(in srgb, var(--bp-primary) 30%, transparent);
}

[data-theme="dark"] .btn-close {
    filter: invert(1) grayscale(1) brightness(1.6);
}

/* Bootstrap tabs / pills */
.nav-tabs {
    --bs-nav-tabs-border-color: var(--bp-border);
    --bs-nav-tabs-link-active-color: var(--bp-primary-ink);
    --bs-nav-tabs-link-active-bg: var(--bp-surface);
    --bs-nav-tabs-link-active-border-color: var(--bp-border) var(--bp-border) var(--bp-surface);
    --bs-nav-link-color: var(--bp-text-2);
    --bs-nav-link-hover-color: var(--bp-text);
}

.nav-pills {
    --bs-nav-pills-link-active-bg: var(--bp-primary-50);
    --bs-nav-pills-link-active-color: var(--bp-primary-ink);
    --bs-nav-link-color: var(--bp-text-2);
    --bs-nav-link-hover-color: var(--bp-text);
}

.nav-pills .nav-link {
    border-radius: var(--bp-radius-md);
    font-weight: 500;
}

.nav-pills .nav-link.active {
    font-weight: 700;
}

/* Tooltip, progress, list-group */
.tooltip {
    --bs-tooltip-bg: var(--bp-text);
    --bs-tooltip-color: var(--bp-surface);
    --bs-tooltip-border-radius: 8px;
    --bs-tooltip-font-size: 12px;
}

.progress {
    --bs-progress-bg: var(--bp-border-soft);
    --bs-progress-bar-bg: var(--bp-primary);
    --bs-progress-border-radius: 3px;
}

.list-group {
    --bs-list-group-bg: var(--bp-surface);
    --bs-list-group-border-color: var(--bp-border);
    --bs-list-group-color: var(--bp-text);
    --bs-list-group-action-hover-bg: var(--bp-row-hover);
    --bs-list-group-active-bg: var(--bp-primary-solid);
    --bs-list-group-active-border-color: var(--bp-primary-solid);
    --bs-list-group-border-radius: var(--bp-radius-md);
}

/* Native <select> chevron follows the theme (data-URI SVGs cannot use currentColor) */
[data-theme="dark"] select {
    background-image: url('data:image/svg+xml;utf8,<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M6 9L12 15L18 9" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" stroke="%23B4BDCF"/></svg>');
}

/* Flatpickr */
.flatpickr-calendar {
    font-family: var(--bp-font);
    background: var(--bp-surface);
    border: 1px solid var(--bp-border);
    border-radius: var(--bp-radius-lg);
    box-shadow: var(--bp-shadow-lg);
    color: var(--bp-text);
}

.flatpickr-calendar.arrowTop::before,
.flatpickr-calendar.arrowTop::after,
.flatpickr-calendar.arrowBottom::before,
.flatpickr-calendar.arrowBottom::after {
    display: none;
}

.flatpickr-months .flatpickr-month,
.flatpickr-current-month .flatpickr-monthDropdown-months,
.flatpickr-current-month input.cur-year,
span.flatpickr-weekday {
    color: var(--bp-text);
    fill: var(--bp-text);
    background: transparent;
}

span.flatpickr-weekday {
    color: var(--bp-muted);
    font-weight: 600;
}

.flatpickr-months .flatpickr-prev-month,
.flatpickr-months .flatpickr-next-month {
    fill: var(--bp-text-2);
}

.flatpickr-day {
    color: var(--bp-text);
    border-radius: 8px;
}

.flatpickr-day:hover,
.flatpickr-day.prevMonthDay:hover,
.flatpickr-day.nextMonthDay:hover {
    background: var(--bp-row-hover);
    border-color: var(--bp-row-hover);
}

.flatpickr-day.today {
    border-color: var(--bp-primary);
}

.flatpickr-day.selected,
.flatpickr-day.startRange,
.flatpickr-day.endRange {
    background: var(--bp-primary-solid);
    border-color: var(--bp-primary-solid);
    color: #fff;
}

.flatpickr-day.inRange {
    background: var(--bp-primary-50);
    border-color: var(--bp-primary-50);
    box-shadow: -5px 0 0 var(--bp-primary-50), 5px 0 0 var(--bp-primary-50);
}

.flatpickr-day.prevMonthDay,
.flatpickr-day.nextMonthDay,
.flatpickr-day.flatpickr-disabled {
    color: var(--bp-muted);
}

/* Tagify */
.tagify {
    --tagify-dd-bg-color: var(--bp-surface);
    --tags-border-color: var(--bp-border);
    --tags-hover-border-color: var(--bp-border);
    --tags-focus-border-color: var(--bp-primary);
    --tag-bg: var(--bp-primary-50);
    --tag-hover: var(--bp-primary-100);
    --tag-text-color: var(--bp-primary-ink);
    --tag-border-radius: 8px;
    --tag-remove-btn-color: var(--bp-primary-ink);
    border-radius: var(--bp-radius-md);
    background-color: var(--bp-surface);
    color: var(--bp-text);
}

.tagify__dropdown__wrapper {
    background: var(--bp-surface);
    border-color: var(--bp-border);
    color: var(--bp-text);
}

.tagify__dropdown__item--active {
    background: var(--bp-primary-50);
    color: var(--bp-primary-ink);
}

/* ---- Dashboard layout primitives ---- */
.bp-dash {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.bp-kpis {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
}

.bp-kpis-5 {
    grid-template-columns: repeat(5, minmax(0, 1fr));
}

.bp-kpis-6 {
    grid-template-columns: repeat(6, minmax(0, 1fr));
}

.bp-dash-split {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.35fr);
    gap: 16px;
    align-items: stretch;
}

.bp-dash-bottom {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.6fr);
    gap: 16px;
    align-items: start;
}

.bp-dash-pair {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
    align-items: stretch;
}

@media (max-width: 1180px) {
    .bp-kpis,
    .bp-kpis-5,
    .bp-kpis-6 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .bp-dash-split,
    .bp-dash-bottom,
    .bp-dash-pair {
        grid-template-columns: minmax(0, 1fr);
    }
}

@media (max-width: 560px) {
    .bp-kpis,
    .bp-kpis-5,
    .bp-kpis-6 {
        grid-template-columns: minmax(0, 1fr);
    }
}

/* KPI value never wraps/overflows: full value stays in the title tooltip */
.bp-kpis .bp-stat-value {
    font-size: 28px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.bp-kpis-5 .bp-stat-value,
.bp-kpis-6 .bp-stat-value {
    font-size: 24px;
}

@media (min-width: 1181px) and (max-width: 1500px) {
    .bp-kpis-5 .bp-stat-value,
    .bp-kpis-6 .bp-stat-value {
        font-size: 20px;
    }
}

.bp-kpi-note {
    font-size: 12px;
    font-weight: 400;
    color: var(--bp-muted);
}

/* Card head without divider (dashboard cards) */
.bp-card-head-plain {
    border-bottom: 0;
    padding: 18px 20px 0;
}

/* AI banner — the one gradient surface in the design (decision D3) */
.bp-ai-banner {
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 28px 32px;
    border-radius: var(--bp-radius-xl);
    color: #fff;
    background: linear-gradient(115deg, #0B2E73 0%, #1450B8 55%, #1A6FEA 100%);
}

.bp-ai-banner::after {
    content: "";
    position: absolute;
    right: -60px;
    top: -80px;
    width: 320px;
    height: 320px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.06);
}

.bp-ai-banner-copy {
    position: relative;
    z-index: 1;
    max-width: 560px;
}

.bp-ai-banner-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 12px;
    padding: 4px 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.14);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.bp-ai-banner-title {
    margin: 0 0 8px;
    font-size: 26px;
    font-weight: 800;
    line-height: 1.2;
    letter-spacing: -0.02em;
    text-wrap: balance;
    color: #fff;
}

.bp-ai-banner-text {
    margin: 0 0 18px;
    max-width: 46ch;
    color: rgba(255, 255, 255, 0.82);
}

.bp-ai-banner-robot {
    position: relative;
    z-index: 1;
    flex: none;
    width: 170px;
    height: 150px;
}

@media (max-width: 560px) {
    .bp-ai-banner {
        flex-direction: column;
        align-items: flex-start;
        padding: 22px 20px;
    }

    .bp-ai-banner-robot {
        width: 120px;
        height: 106px;
        align-self: flex-end;
        margin-top: -56px;
    }
}

/* Inventory overview list */
.bp-stock-list {
    list-style: none;
    margin: 0;
    padding: 8px 20px 12px;
}

.bp-stock-list li {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid var(--bp-border-soft);
}

.bp-stock-list li:last-child {
    border-bottom: 0;
}

.bp-stock-ico {
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    width: 38px;
    height: 38px;
    border-radius: var(--bp-radius-md);
    background-color: var(--bp-primary-50);
    color: var(--bp-primary-ink);
}

.bp-stock-name {
    flex: 1;
    min-width: 0;
}

.bp-stock-name b {
    display: block;
    font-weight: 600;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.bp-stock-name small {
    color: var(--bp-muted);
    font-size: 12px;
}

.bp-stock-qty {
    margin-right: 6px;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}

.bp-stock-bar {
    height: 5px;
    margin-top: 6px;
    overflow: hidden;
    border-radius: 3px;
    background-color: var(--bp-border-soft);
}

.bp-stock-bar i {
    display: block;
    height: 100%;
    border-radius: 3px;
}

.bp-stock-bar .lvl-red {
    background-color: var(--bp-danger);
}

.bp-stock-bar .lvl-amber {
    background-color: var(--bp-warning);
}

.bp-dash-table .bp-table {
    min-width: 420px;
}

.bp-dash-table .bp-table td {
    white-space: nowrap;
}

.bp-dash-table .bp-table .bp-top-dues-name {
    white-space: nowrap;
}

.bp-dash-table .bp-table th,
.bp-dash-table .bp-table td {
    padding-left: 10px;
    padding-right: 10px;
}

.bp-pagination .pagination {
    flex-wrap: wrap;
    max-width: 100%;
}

/* ---- Shell at <= 992px (matches the JS-driven off-canvas sidebar) ---- */
@media (max-width: 992px) {
.bp-header {
        padding: 0 16px;
    }

    .bp-main {
        margin-left: 0;
        width: 100%;
        max-width: 100%;
        padding: 20px 16px 32px;
    }

    .bp-main > .bp-content-wrapper {
        width: 100%;
        max-width: 100%;
        margin-left: auto;
        margin-right: auto;
    }

    /* Results panel spans the viewport instead of the (narrow) inline field */
    .bp-global-search-dropdown {
        position: fixed;
        top: calc(var(--bp-header-height) + 6px);
        left: 12px;
        right: 12px;
    }
}

@media (max-width: 560px) {
    .bp-header-left,
    .bp-header-right {
        gap: 8px;
    }

    .bp-global-search {
        min-width: 0;
    }

    .bp-global-search-input {
        padding-right: 12px;
    }

    .bp-global-search-shortcut {
        display: none;
    }

    .bp-quick-actions-btn.bp-btn {
        padding: 0 12px;
    }

    /* Phone widths: no room beside search, theme, bell and avatar. Tablet and up keep it. */
    .bp-quick-actions {
        display: none !important;
    }

    .bp-header-right > a.bp-header-icon {
        display: none;
    }
}

/* Bootstrap look-alikes still used in a few views — skinned with the tokens */
.input-group-text {
    display: inline-flex;
    align-items: center;
    padding: 0 12px;
    border: 1px solid var(--bp-border);
    border-radius: var(--bp-radius-md);
    background-color: var(--bp-row-hover);
    color: var(--bp-text-2);
    font-size: 14px;
}

.input-group > .input-group-text:not(:last-child) {
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
}

.input-group > .input-group-text:not(:first-child) {
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
}

:root {
    --bs-light-rgb: 248, 250, 252;
    --bs-dark-rgb: 15, 23, 42;
    --bs-secondary-bg: var(--bp-row-hover);
    --bs-tertiary-bg: var(--bp-row-hover);
}

[data-theme="dark"] {
    --bs-light-rgb: 26, 35, 55;
    --bs-dark-rgb: 8, 12, 22;
    --bs-secondary-color: var(--bp-text-2);
}

[data-theme="dark"] .text-light {
    color: var(--bp-text) !important;
}

/* ============================================================
   Native App Mode (.bp-app)
   `bp-app` is added to <body> when the request comes from the YesSME
   Android WebView shell (is_native_app(), user agent "YesSMEApp/").
   The shell draws only the bottom navigation and the modules grid; the
   web topbar (hamburger, search, quick actions, theme, bell, avatar), the
   sidebar drawer and the page heading are the app's top bar and show as
   on any phone browser. Layout-only rules (no colours), so nothing here
   needs a [data-theme="dark"] counterpart.
   ============================================================ */

/* The POS terminal has no web topbar or sidebar of its own: zero the shell
   dimensions so its layout (and shortcut bar) fills the WebView. */
.bp-pos-page.bp-app {
    --bp-sidebar-width: 0px;
    --bp-sidebar-collapsed: 0px;
    --bp-header-height: 0px;
}

/* The native bottom nav sits below the WebView, not over it — only the
   device's own inset (gesture bar / notch) needs clearing. */
.bp-app .bp-main {
    padding-bottom: calc(32px + env(safe-area-inset-bottom, 0px));
}

.bp-app .bp-pos-layout {
    padding-bottom: env(safe-area-inset-bottom, 0px);
}

.bp-app .bp-pos-shortcuts {
    padding-bottom: calc(6px + env(safe-area-inset-bottom, 0px));
}

/* Touch targets >= 44px. Regular controls grow to 44px; small and
   icon-only buttons keep their look but get an invisible hit area
   extended around them. */
.bp-app .bp-btn:not(.bp-btn-sm),
.bp-app .bp-form-control,
.bp-app .bp-form-select {
    min-height: 44px;
}

.bp-app .bp-btn-sm,
.bp-app .bp-btn-icon {
    position: relative;
}

.bp-app .bp-btn-sm::after,
.bp-app .bp-btn-icon::after {
    content: "";
    position: absolute;
    inset: -6px;
}

/* ==========================================================================
   Dashboard — mobile order + compact AI banner (≤560px)
   Quick Modules sits right under the AI banner; banner collapses to one row.
   ========================================================================== */
@media (max-width: 560px) {
    .bp-dash-bottom {
        display: contents;
    }

    .bp-dash > .bp-ai-banner {
        order: -2;
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        gap: 12px;
        padding: 14px 16px;
    }

    .bp-dash .bp-quick-modules {
        order: -1;
    }

    .bp-ai-banner::after {
        right: -40px;
        top: -60px;
        width: 180px;
        height: 180px;
    }

    .bp-ai-banner .bp-ai-banner-chip {
        margin-bottom: 6px;
        padding: 3px 8px;
        font-size: 10px;
    }

    .bp-ai-banner .bp-ai-banner-title {
        margin: 0 0 8px;
        font-size: 17px;
        line-height: 1.25;
    }

    .bp-ai-banner .bp-ai-banner-text {
        display: none;
    }

    .bp-ai-banner .bp-btn-pill {
        padding: 6px 12px;
        font-size: 12px;
    }

    .bp-ai-banner .bp-ai-banner-robot {
        width: 72px;
        height: 64px;
        margin: 0;
        align-self: center;
    }
}

/* ==========================================================================
   Breadcrumb on phones
   The "Home > Section" trail wastes a row of height on a phone, where the
   page title alone is enough (and the native app shell has its own back
   navigation). Hidden below the Bootstrap `sm` breakpoint (576px), unchanged
   from `sm` up. Every staff page prints it from the one shared master layout
   (.bp-breadcrumb), so this is the only rule needed. display:none, so it takes
   no height; the title block is the only child left in .bp-page-header.
   Layout-only, no colours: no [data-theme="dark"] counterpart.
   ========================================================================== */
@media (max-width: 575.98px) {
    .bp-breadcrumb {
        display: none;
    }
}

/* ==========================================================================
   Dashboard date filter on phones (<= 560px)
   The "Today" date-range dropdown is printed twice from one component
   (components/dashboard/date-filter): in the page header (.bp-timeframe-wide)
   and inside .bp-dash (.bp-timeframe-phone). Wider than 560px only the header
   copy shows. On phones the header copy is hidden and the .bp-dash copy sits
   after Quick Modules (order -1, above) and before the KPI cards: order 0 and
   earlier in the DOM than them. Only the generic dashboard has the phone copy;
   role dashboards keep the header dropdown at every width.
   Layout-only, no colours: no [data-theme="dark"] counterpart.
   ========================================================================== */
.bp-timeframe-phone {
    display: none;
}

@media (max-width: 560px) {
    .bp-timeframe-wide {
        display: none;
    }

    .bp-timeframe-phone {
        display: block;
    }

    /* Left-aligned toggle: open the panel rightwards, inside the viewport. */
    .bp-timeframe-phone .bp-date-dropdown-panel {
        left: 0;
        right: auto;
        width: min(340px, calc(100vw - 32px));
    }
}

/* ==========================================================================
   Mobile sidebar drawer scrolling (<= 992px)
   .bp-sidebar is the drawer's single scroller (brand + menu + sticky footer).
   - height: 100dvh (100vh stays as the fallback): on a phone 100vh is the
     LARGE viewport, taller than what is visible while the browser toolbar is
     showing, so the bottom of the list sat off-screen and the last items could
     not be scrolled into view.
   - overscroll-behavior: contain: when the drawer reaches its top or bottom the
     gesture no longer chains to the page behind (it scrolled the page, or
     triggered the browser's pull-to-refresh, instead of the list), and
     touch-action: pan-y keeps the drawer a plain vertical scroller.
   - the overlay accepts taps only (touch-action: none), so a swipe on the dimmed
     page cannot scroll the page behind the open drawer.
   - the footer clears the bottom safe area, so Log Out stays reachable.
   Desktop (> 992px) and the collapsed 70px mode are untouched.
   Layout-only, no colours: no [data-theme="dark"] counterpart.
   ========================================================================== */
@media (max-width: 992px) {
    .bp-sidebar {
        height: 100vh;
        height: 100dvh;
        overscroll-behavior: contain;
        -webkit-overflow-scrolling: touch;
        touch-action: pan-y;
    }

    .bp-sidebar-foot {
        padding-bottom: calc(16px + env(safe-area-inset-bottom, 0px));
    }

    .bp-overlay.active {
        touch-action: none;
    }
}
/* ==========================================================================
   POS terminal — tablet & phone
   >= 993px      : desktop layout above, untouched.
   768-992px     : side-by-side, cart 320px, only the grid and the cart items
                   scroll (landscape phones up to 500px tall too, compact).
   <= 767px      : products take the whole screen; the existing .bp-pos-cart
                   becomes a fixed bottom sheet (collapsed / half / full) driven
                   by public/js/pos-sheet.js. Keep the phone media query in sync
                   with PHONE_QUERY in that file.
   ========================================================================== */
.bp-pos-page {
    --bp-pos-sheet-peek: 72px;
}

/* Phone-only pieces stay out of the desktop/tablet layout. */
.bp-pos-sheet-handle,
.bp-pos-sheet-backdrop,
.bp-pos-summary-toggle {
    display: none;
}

.bp-pos-branch-name {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Touch screens: no sticky hover lift, press feedback instead. */
@media (hover: none) {
    .bp-pos-item:hover,
    [data-theme="dark"] .bp-pos-item:hover {
        transform: none;
        box-shadow: none;
        border-color: var(--bp-border);
    }

    .bp-pos-item:active {
        transform: scale(0.97);
        border-color: var(--bp-primary);
    }

    .bp-pos-qty-stepper button:hover {
        background: var(--bp-gray-100);
        color: var(--bp-dark);
    }

    [data-theme="dark"] .bp-pos-qty-stepper button:hover {
        background: var(--bp-row-hover);
        color: var(--bp-text);
    }

    .bp-pos-qty-stepper button:active,
    [data-theme="dark"] .bp-pos-qty-stepper button:active {
        background: var(--bp-primary-solid);
        color: var(--bp-on-solid);
    }
}

@media (max-width: 992px) {
    .bp-pos-page {
        overflow: hidden;
        overscroll-behavior: none;
    }

    .bp-pos-layout,
    .sidebar-collapsed .bp-pos-layout {
        margin-left: 0;
        height: calc(100vh - var(--bp-header-height));
        height: calc(100dvh - var(--bp-header-height));
    }

    .bp-pos-products {
        min-width: 0;
        padding: 14px;
        gap: 10px;
    }

    .bp-pos-cart {
        width: 320px;
        min-width: 320px;
    }

    .bp-pos-cart-title {
        white-space: nowrap;
    }

    .bp-pos-branch-bar {
        flex-shrink: 0;
        min-width: 0;
        padding: 0 2px;
    }

    .bp-pos-branch-bar .bp-form-select {
        flex: 0 1 auto;
        min-width: 0;
        max-width: 60%;
    }

    .bp-pos-search {
        flex-shrink: 0;
        min-height: 48px;
        padding: 6px 6px 6px 14px;
    }

    /* >= 16px stops iOS zooming the page when the input is focused. */
    .bp-pos-search input {
        min-width: 0;
        min-height: 32px;
        font-size: 16px;
    }

    .bp-pos-categories {
        flex-shrink: 0;
        padding-bottom: 0;
        scrollbar-width: none;
        scroll-snap-type: x proximity;
        overscroll-behavior-x: contain;
    }

    .bp-pos-categories::-webkit-scrollbar {
        display: none;
    }

    .bp-pos-cat-btn {
        min-height: 40px;
        padding: 8px 16px;
        scroll-snap-align: start;
    }

    /* max-content rows: the cards clip their overflow, so plain auto rows
       would be squeezed to fit a short scroller instead of scrolling. */
    .bp-pos-grid {
        grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
        grid-auto-rows: max-content;
        padding-right: 0;
        overscroll-behavior: contain;
    }

    .bp-pos-cart-items {
        overscroll-behavior: contain;
    }
}

/* Landscape phones: side-by-side, everything compact so the cart footer fits. */
@media (max-width: 992px) and (max-height: 500px) and (orientation: landscape) {
    .bp-pos-products {
        padding: 8px 10px;
        gap: 6px;
    }

    /* Too short for a fixed header + summary around a scrolling list: the
       whole cart column scrolls instead, with Hold / Pay Now kept in view. */
    .bp-pos-cart {
        width: 290px;
        min-width: 290px;
        overflow-y: auto;
        overscroll-behavior: contain;
    }

    .bp-pos-cart-items {
        flex: none;
        overflow: visible;
    }

    .bp-pos-cart-actions {
        position: sticky;
        bottom: 0;
        margin-top: auto;
    }

    .bp-pos-branch-bar {
        display: none;
    }

    .bp-pos-search {
        min-height: 44px;
    }

    .bp-pos-grid {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
        gap: 8px;
    }

    .bp-pos-item-img {
        height: 60px;
    }

    .bp-pos-item-sku {
        display: none;
    }

    .bp-pos-cart-header,
    .bp-pos-customer-bar {
        padding: 6px 12px;
    }

    .bp-pos-cart-header {
        justify-content: flex-end;
    }

    .bp-pos-cart-title {
        display: none;
    }

    .bp-pos-cart-item {
        padding: 8px 12px;
    }

    .bp-pos-cart-summary {
        padding: 6px 12px;
    }

    .bp-pos-cart-actions {
        padding: 8px 12px calc(8px + env(safe-area-inset-bottom, 0px));
    }

    .bp-pos-cart-actions .bp-btn {
        padding: 10px;
    }
}

/* Collapsible "Discount & VAT" rows: phones and landscape phones only. */
@media (max-width: 767.98px) and (min-height: 501px),
       (max-width: 767.98px) and (orientation: portrait),
       (max-width: 992px) and (max-height: 500px) and (orientation: landscape) {
    .bp-pos-summary-toggle {
        display: flex;
        align-items: center;
        justify-content: space-between;
        width: 100%;
        min-height: 40px;
        padding: 0;
        border: none;
        background: none;
        color: var(--bp-text-2);
        font-size: 13px;
        font-weight: 600;
        text-align: left;
    }

    .bp-pos-summary-chevron {
        color: var(--bp-muted);
        font-size: 12px;
        transition: transform 0.2s ease;
    }

    .bp-pos-summary-toggle[aria-expanded="true"] .bp-pos-summary-chevron {
        transform: rotate(180deg);
    }

    .bp-pos-summary-extra {
        display: none;
    }

    .bp-pos-summary-extra.is-open {
        display: block;
    }
}

/* ---------- Phone: products full screen + bottom-sheet cart ---------- */
@media (max-width: 767.98px) and (min-height: 501px),
       (max-width: 767.98px) and (orientation: portrait) {
    /* clip (not just hidden): focusing something inside the fixed sheet
       must not scroll the layout behind it. */
    .bp-pos-layout {
        display: block;
        position: relative;
        overflow: clip;
    }

    .bp-pos-products {
        height: 100%;
        padding: 10px 12px 0;
        gap: 8px;
        overflow: clip;
    }

    .bp-pos-grid {
        grid-template-columns: repeat(auto-fill, minmax(144px, 1fr));
        gap: 10px;
        padding-bottom: calc(var(--bp-pos-sheet-peek) + 12px + env(safe-area-inset-bottom, 0px));
    }

    .bp-pos-item-img {
        height: 84px;
    }

    .bp-pos-item-noimg .bp-pos-item-img {
        height: 56px;
    }

    .bp-pos-item-details {
        padding: 8px 10px 10px;
    }

    .bp-pos-item-name {
        font-size: 13px;
        font-weight: 600;
    }

    .bp-pos-item-price {
        font-size: 15px;
        font-variant-numeric: tabular-nums;
    }

    /* The sheet */
    .bp-pos-cart {
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 1025; /* above content; below header 1030, overlay 1035, sidebar drawer 1040 and modals */
        width: auto;
        min-width: 0;
        height: calc(100vh - var(--bp-header-height) - 12px);
        height: calc(100dvh - var(--bp-header-height) - 12px);
        overflow: hidden;
        border-left: none;
        border-top: 1px solid var(--bp-border);
        border-radius: var(--bp-radius-xl) var(--bp-radius-xl) 0 0;
        background: var(--bp-surface);
        box-shadow: var(--bp-shadow-lg);
        transform: translateY(calc(100% - var(--bp-pos-sheet-peek) - env(safe-area-inset-bottom, 0px)));
        transition: transform 0.32s cubic-bezier(0.16, 1, 0.3, 1), height 0.32s cubic-bezier(0.16, 1, 0.3, 1);
        will-change: transform;
    }

    /* Half is a shorter sheet (not a translated full one) so the summary and
       Hold / Pay Now stay on screen; at least 440px so short phones still
       show a few cart rows. Mirrored in pos-sheet.js snapOffsets(). */
    .bp-pos-cart[data-sheet-state="half"] {
        height: min(max(60vh, 440px), calc(100vh - var(--bp-header-height) - 12px));
        height: min(max(60dvh, 440px), calc(100dvh - var(--bp-header-height) - 12px));
        transform: translateY(0);
    }

    .bp-pos-cart[data-sheet-state="full"] {
        transform: translateY(0);
    }

    .bp-pos-cart.is-dragging {
        height: calc(100vh - var(--bp-header-height) - 12px);
        height: calc(100dvh - var(--bp-header-height) - 12px);
        transform: translateY(var(--bp-sheet-drag, 0px));
        transition: none;
    }

    .bp-pos-sheet-backdrop.is-visible {
        display: block;
        position: fixed;
        inset: 0;
        z-index: 1024;
        background: color-mix(in srgb, var(--bp-text) 40%, transparent);
        touch-action: none;
    }

    /* Collapsed bar = drag handle; always visible. Only the handle blocks
       native panning, so the cart items list keeps scrolling normally. */
    .bp-pos-sheet-handle {
        display: flex;
        flex-direction: column;
        flex-shrink: 0;
        height: var(--bp-pos-sheet-peek);
        padding: 6px 12px 8px;
        border-bottom: 1px solid var(--bp-border-soft);
        background: var(--bp-surface);
        touch-action: none;
        cursor: grab;
        user-select: none;
        -webkit-user-select: none;
    }

    .bp-pos-cart.is-dragging .bp-pos-sheet-handle {
        cursor: grabbing;
    }

    .bp-pos-sheet-grip {
        flex-shrink: 0;
        width: 40px;
        height: 4px;
        margin: 0 auto 6px;
        border-radius: 999px;
        background: var(--bp-gray-400);
    }

    .bp-pos-sheet-bar {
        display: flex;
        align-items: center;
        gap: 10px;
        flex: 1;
        min-height: 0;
    }

    .bp-pos-sheet-toggle {
        display: flex;
        align-items: center;
        gap: 12px;
        flex: 1;
        min-width: 0;
        min-height: 44px;
        padding: 0;
        border: none;
        background: none;
        color: var(--bp-text);
        text-align: left;
    }

    .bp-pos-sheet-icon {
        position: relative;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        flex-shrink: 0;
        width: 42px;
        height: 42px;
        border-radius: var(--bp-radius-md);
        background: var(--bp-primary-50);
        color: var(--bp-primary-ink);
        font-size: 17px;
    }

    .bp-pos-sheet-count {
        position: absolute;
        top: -6px;
        right: -6px;
        min-width: 20px;
        height: 20px;
        padding: 0 5px;
        border: 2px solid var(--bp-surface);
        border-radius: 999px;
        background: var(--bp-danger-solid);
        color: var(--bp-on-solid);
        font-size: 11px;
        font-weight: 800;
        line-height: 16px;
        text-align: center;
        font-variant-numeric: tabular-nums;
    }

    .bp-pos-sheet-count.is-empty {
        display: none;
    }

    .bp-pos-sheet-count.is-bump {
        animation: bp-pos-sheet-bump 0.35s ease;
    }

    .bp-pos-sheet-info {
        display: flex;
        flex-direction: column;
        min-width: 0;
        line-height: 1.2;
    }

    .bp-pos-sheet-title {
        color: var(--bp-muted);
        font-size: 12px;
        font-weight: 600;
        white-space: nowrap;
    }

    .bp-pos-sheet-total {
        overflow: hidden;
        color: var(--bp-text);
        font-size: 17px;
        font-weight: 800;
        font-variant-numeric: tabular-nums;
        white-space: nowrap;
        text-overflow: ellipsis;
    }

    .bp-pos-sheet-chevron {
        margin-left: auto;
        color: var(--bp-muted);
        font-size: 13px;
        transition: transform 0.2s ease;
    }

    .bp-pos-cart[data-sheet-state="full"] .bp-pos-sheet-chevron {
        transform: rotate(180deg);
    }

    .bp-pos-sheet-pay {
        flex-shrink: 0;
        min-height: 44px;
        padding: 0 18px;
        font-weight: 700;
    }

    /* Once open, the footer has Pay Now and the bar already says "Cart · N items". */
    .bp-pos-cart:not([data-sheet-state="collapsed"]) .bp-pos-sheet-pay {
        display: none;
    }

    /* Sheet contents */
    .bp-pos-cart-header {
        justify-content: flex-end;
        padding: 8px 14px;
        background: var(--bp-surface);
    }

    .bp-pos-cart-title {
        display: none;
    }

    .bp-pos-cart-header .bp-btn-sm {
        min-width: 40px;
        min-height: 40px;
        justify-content: center;
    }

    .bp-pos-customer-bar {
        flex-wrap: wrap;
        padding: 2px 14px;
    }

    .bp-pos-customer-bar a {
        display: inline-flex;
        align-items: center;
        min-height: 40px;
    }

    .bp-pos-cart-items {
        flex: 1;
        min-height: 0;
        -webkit-overflow-scrolling: touch;
    }

    .bp-pos-cart-items .bp-empty-state {
        padding: 24px 20px;
    }

    .bp-pos-cart-item {
        padding: 10px 14px;
    }

    .bp-pos-cart-item-line-total {
        min-width: 0;
    }

    .bp-pos-qty-stepper button {
        width: 40px;
        height: 40px;
        font-size: 16px;
    }

    .bp-pos-qty-stepper input {
        width: 48px;
        height: 40px;
        font-size: 16px;
    }

    .bp-pos-cart-item .item-discount-btn {
        width: 40px;
        height: 40px;
    }

    .bp-pos-cart-item-remove {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 40px;
        height: 40px;
        font-size: 16px;
    }

    .bp-pos-cart-summary {
        flex-shrink: 0;
        padding: 6px 14px 8px;
    }

    .bp-cart-summary-row {
        padding: 3px 0;
    }

    .bp-cart-summary-row.total {
        margin-top: 4px;
        padding-top: 8px;
        font-size: 17px;
    }

    .bp-pos-summary-extra .bp-pos-discount-input,
    .bp-pos-summary-extra .bp-pos-discount-type {
        height: 40px;
        font-size: 16px;
    }

    .bp-pos-cart-actions {
        flex-shrink: 0;
        padding: 8px 14px calc(10px + env(safe-area-inset-bottom, 0px));
    }

    .bp-pos-cart-actions .bp-btn {
        min-height: 48px;
        padding: 0 14px;
    }

    .bp-pos-cart-actions .bp-btn-success {
        flex: 2;
    }
}

@media (max-width: 560px) {
    .bp-pos-branch-label,
    .bp-pos-btn-label {
        display: none;
    }

    .bp-pos-branch-bar .bp-btn {
        width: 40px;
        min-height: 40px;
        padding: 0;
        justify-content: center;
    }

    .bp-pos-item-sku {
        display: none;
    }
}

@keyframes bp-pos-sheet-bump {
    0% {
        transform: scale(1);
    }

    40% {
        transform: scale(1.35);
    }

    100% {
        transform: scale(1);
    }
}

@media (prefers-reduced-motion: reduce) {
    .bp-pos-cart,
    .bp-pos-sheet-chevron,
    .bp-pos-summary-chevron {
        transition: none;
    }

    .bp-pos-sheet-count.is-bump {
        animation: none;
    }
}

[data-theme="dark"] .bp-pos-sheet-handle {
    background: var(--bp-surface);
    border-bottom-color: var(--bp-border-soft);
}

[data-theme="dark"] .bp-pos-sheet-grip {
    background: var(--bp-gray-400);
}

[data-theme="dark"] .bp-pos-sheet-icon {
    background: var(--bp-primary-50);
    color: var(--bp-primary-ink);
}

[data-theme="dark"] .bp-pos-sheet-count {
    border-color: var(--bp-surface);
    background: var(--bp-danger-solid);
    color: var(--bp-on-solid);
}

[data-theme="dark"] .bp-pos-sheet-toggle,
[data-theme="dark"] .bp-pos-sheet-total {
    color: var(--bp-text);
}

[data-theme="dark"] .bp-pos-sheet-title,
[data-theme="dark"] .bp-pos-sheet-chevron,
[data-theme="dark"] .bp-pos-summary-chevron {
    color: var(--bp-muted);
}

[data-theme="dark"] .bp-pos-summary-toggle {
    color: var(--bp-text-2);
}

[data-theme="dark"] .bp-pos-sheet-backdrop.is-visible {
    background: color-mix(in srgb, var(--bp-bg) 75%, transparent);
}

@media (max-width: 767.98px) and (min-height: 501px),
       (max-width: 767.98px) and (orientation: portrait) {
    [data-theme="dark"] .bp-pos-cart {
        border-top-color: var(--bp-border);
    }

    [data-theme="dark"] .bp-pos-cart-header {
        background: var(--bp-surface);
    }
}

/* ==========================================================================
   POS camera barcode scan — public/js/pos-camera-scan.js
   A small ghost icon at the end of the search bar, on every screen size
   where a camera exists (the script un-hides it). On desktops it is a
   secondary control: the USB scanner / typing flow stays primary.
   ========================================================================== */
.bp-pos-scan-btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    /* desktop bar has 12px padding: pull in so the bar keeps its height */
    margin: -6px -8px -6px 0;
    padding: 0;
    border: none;
    border-radius: var(--bp-radius-md);
    background: transparent;
    color: var(--bp-primary);
    cursor: pointer;
    transition: background-color 0.15s ease, color 0.15s ease;
}

.bp-pos-scan-btn[hidden] {
    display: none;
}

.bp-pos-search .bp-pos-scan-btn i {
    color: inherit;
    font-size: 17px;
}

.bp-pos-scan-btn:hover {
    background: var(--bp-primary-50);
    color: var(--bp-primary-ink);
}

.bp-pos-scan-btn:active {
    background: var(--bp-primary-50);
    color: var(--bp-primary-dark);
}

.bp-pos-scan-btn:focus-visible {
    outline: 2px solid var(--bp-primary);
    outline-offset: 1px;
}

/* Touch: 44px hit area around the 36px icon without growing the bar. */
@media (pointer: coarse) {
    .bp-pos-scan-btn::after {
        content: "";
        position: absolute;
        inset: -4px;
    }
}

@media (max-width: 992px) {
    .bp-pos-scan-btn {
        margin: 0;
    }
}

[data-theme="dark"] .bp-pos-scan-btn {
    background: transparent;
    color: var(--bp-primary-light);
}

[data-theme="dark"] .bp-pos-scan-btn:hover,
[data-theme="dark"] .bp-pos-scan-btn:active {
    background: var(--bp-primary-50);
    color: var(--bp-primary-ink);
}

/* Torch toggle in the scan modal footer (only when the camera has a torch). */
.bp-camera-scan-torch.is-on {
    background: var(--bp-warning-bg);
    border-color: var(--bp-warning);
    color: var(--bp-warning-ink);
}

[data-theme="dark"] .bp-camera-scan-torch.is-on {
    background: var(--bp-warning-bg);
    border-color: var(--bp-warning);
    color: var(--bp-warning-ink);
}

.bp-camera-scan-stage {
    position: relative;
    width: 100%;
    aspect-ratio: 3 / 4;
    max-height: 70vh;
    max-height: 70dvh;
    overflow: hidden;
    background: var(--bp-text);
}

.bp-camera-scan-video {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Viewfinder: flat frame, everything outside it dimmed by a spread shadow. */
.bp-camera-scan-frame {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 76%;
    aspect-ratio: 3 / 2;
    transform: translate(-50%, -50%);
    border: 3px solid var(--bp-success);
    border-radius: var(--bp-radius-lg);
    box-shadow: 0 0 0 100vmax color-mix(in srgb, var(--bp-text) 45%, transparent);
    pointer-events: none;
}

.bp-camera-scan-line {
    position: absolute;
    left: 8%;
    right: 8%;
    top: 10%;
    height: 2px;
    border-radius: 2px;
    background: var(--bp-success);
    animation: bp-camera-scan-sweep 1.8s ease-in-out infinite alternate;
}

.bp-camera-scan-frame.is-hit {
    border-color: var(--bp-success);
    background: color-mix(in srgb, var(--bp-success) 22%, transparent);
    transition: background-color 0.05s ease;
}

.bp-camera-scan-frame {
    transition: background-color 0.35s ease;
}

[data-theme="dark"] .bp-camera-scan-frame.is-hit {
    background: color-mix(in srgb, var(--bp-success) 28%, transparent);
}

@keyframes bp-camera-scan-sweep {
    from {
        top: 10%;
    }

    to {
        top: 88%;
    }
}

.bp-camera-scan-status {
    margin: 0;
    padding: 12px 16px;
    color: var(--bp-text-2);
    font-size: 14px;
    font-weight: 600;
    text-align: center;
    word-break: break-all;
}

.bp-camera-scan-status.is-success {
    color: var(--bp-success-ink);
}

.bp-camera-scan-status.is-error {
    color: var(--bp-danger-ink);
}

/* Full-screen on phones: the stage takes whatever the header/footer leave. */
@media (max-width: 575.98px) {
    .bp-camera-scan-modal .modal-body {
        display: flex;
        flex-direction: column;
    }

    .bp-camera-scan-stage {
        flex: 1;
        aspect-ratio: auto;
        max-height: none;
    }

    .bp-camera-scan-modal .modal-footer {
        padding-bottom: calc(12px + env(safe-area-inset-bottom, 0px));
    }
}

@media (prefers-reduced-motion: reduce) {
    .bp-camera-scan-line {
        animation: none;
        top: 50%;
    }
}

[data-theme="dark"] .bp-camera-scan-stage {
    background: var(--bp-bg);
}

[data-theme="dark"] .bp-camera-scan-frame {
    border-color: var(--bp-success);
    box-shadow: 0 0 0 100vmax color-mix(in srgb, var(--bp-bg) 55%, transparent);
}

[data-theme="dark"] .bp-camera-scan-line {
    background: var(--bp-success);
}

[data-theme="dark"] .bp-camera-scan-status {
    color: var(--bp-text-2);
}

[data-theme="dark"] .bp-camera-scan-status.is-success {
    color: var(--bp-success-ink);
}

[data-theme="dark"] .bp-camera-scan-status.is-error {
    color: var(--bp-danger-ink);
}

/* ============================================================
   COURIER MODULE (2026-10)
   ============================================================ */

/* Read-only value with a copy button (webhook URLs) */
.bp-copy-field {
    display: flex;
    gap: 8px;
    align-items: center;
}

.bp-copy-field .bp-form-control {
    flex: 1 1 auto;
    min-width: 0;
    background: var(--bp-row-hover);
    color: var(--bp-text-2);
    font-size: 12.5px;
}

[data-theme="dark"] .bp-copy-field .bp-form-control {
    background: var(--bp-bg);
    color: var(--bp-text-2);
}

/* Off-screen textarea used by the clipboard fallback */
.bp-visually-hidden-input {
    position: fixed;
    top: -1000px;
    left: -1000px;
    opacity: 0;
}

[data-theme="dark"] .bp-visually-hidden-input {
    opacity: 0;
}

/* ---------- POS product tiles: phones + tablets (< 992px) ----------
   Ratio-based photo box instead of a fixed pixel height, so landscape /
   portrait / square photos keep a predictable crop. No-photo tiles show the
   placeholder whole (contain) as a small centred icon in a short box —
   the old fixed-height box cover-cropped the square placeholder to a strip.
   Desktop (>= 992px) keeps the original tile. */
/* All widths: max-content rows — tiles clip their overflow, so plain auto
   rows get squeezed to fit the scroller once the grid overflows and the
   price line is cut off (the < 992px block already did this). */
.bp-pos-grid {
    grid-auto-rows: max-content;
}

@media (max-width: 991.98px) and (min-height: 501px) {
    .bp-pos-item-img {
        height: auto;
        aspect-ratio: 4 / 3;
    }
}

@media (max-width: 991.98px) {
    .bp-pos-item-img {
        background: var(--bp-row-hover);
    }

    .bp-pos-item-img img {
        object-position: center;
    }

    /* Grows to fill when its grid row is stretched by a photo tile, so the
       name/price line up with the neighbour instead of floating mid-card. */
    .bp-pos-item-noimg .bp-pos-item-img {
        height: auto;
        min-height: 64px;
        flex: 1 0 64px;
        aspect-ratio: auto;
        padding: 6px;
    }

    .bp-pos-item-noimg .bp-pos-item-details {
        flex: 0 0 auto;
    }

    .bp-pos-item-noimg .bp-pos-item-img img {
        width: auto;
        max-width: 100%;
        height: 52px;
        object-fit: contain;
        mix-blend-mode: multiply;
    }

    .bp-pos-item-price {
        font-variant-numeric: tabular-nums;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .bp-pos-variant-badge {
        z-index: 1;
    }

    [data-theme="dark"] .bp-pos-item-img {
        background: var(--bp-row-hover);
    }

    [data-theme="dark"] .bp-pos-item-noimg .bp-pos-item-img img {
        mix-blend-mode: normal;
        opacity: 0.35;
    }
}

/* Assign to Courier dialog (sales list) */
.bp-courier-dialog-target {
    margin-bottom: 14px;
    font-size: 13px;
    color: var(--bp-text-2);
}

.bp-courier-dialog-error {
    margin-bottom: 14px;
    padding: 10px 12px;
    border-radius: var(--bp-radius-md);
    background: var(--bp-danger-bg);
    color: var(--bp-danger-ink);
    font-size: 13px;
}

.bp-courier-location {
    margin-bottom: 12px;
    padding: 12px;
    border: 1px solid var(--bp-border);
    border-radius: var(--bp-radius-md);
    background: var(--bp-row-hover);
}

.bp-courier-location-head {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 4px 12px;
    margin-bottom: 8px;
    font-size: 13px;
    font-weight: 600;
    color: var(--bp-text);
}

.bp-courier-location-head small {
    font-weight: 500;
    color: var(--bp-muted);
}

.bp-courier-bulk-note {
    margin: 0;
    font-size: 12.5px;
    color: var(--bp-muted);
}

.bp-courier-results-summary {
    margin-bottom: 10px;
    font-weight: 600;
    color: var(--bp-text);
}

.bp-courier-results-list {
    max-height: 320px;
    margin: 0;
    padding: 0;
    overflow-y: auto;
    list-style: none;
    border: 1px solid var(--bp-border);
    border-radius: var(--bp-radius-md);
}

.bp-courier-results-list li {
    display: grid;
    grid-template-columns: 18px auto 1fr;
    gap: 8px;
    align-items: baseline;
    padding: 8px 12px;
    border-bottom: 1px solid var(--bp-border-soft);
    font-size: 13px;
    color: var(--bp-text-2);
}

.bp-courier-results-list li:last-child {
    border-bottom: 0;
}

.bp-courier-results-list li.is-success i {
    color: var(--bp-success-ink);
}

.bp-courier-results-list li.is-failed i {
    color: var(--bp-danger-ink);
}

.bp-courier-results-list li strong {
    color: var(--bp-text);
    white-space: nowrap;
}

@media (max-width: 560px) {
    .bp-courier-results-list li {
        grid-template-columns: 18px 1fr;
    }

    .bp-courier-results-list li span {
        grid-column: 2;
    }
}

[data-theme="dark"] .bp-courier-dialog-target {
    color: var(--bp-text-2);
}

[data-theme="dark"] .bp-courier-dialog-error {
    background: var(--bp-danger-bg);
    color: var(--bp-danger-ink);
}

[data-theme="dark"] .bp-courier-location {
    border-color: var(--bp-border);
    background: var(--bp-bg);
}

[data-theme="dark"] .bp-courier-location-head {
    color: var(--bp-text);
}

[data-theme="dark"] .bp-courier-location-head small,
[data-theme="dark"] .bp-courier-bulk-note {
    color: var(--bp-muted);
}

[data-theme="dark"] .bp-courier-results-summary,
[data-theme="dark"] .bp-courier-results-list li strong {
    color: var(--bp-text);
}

[data-theme="dark"] .bp-courier-results-list {
    border-color: var(--bp-border);
}

[data-theme="dark"] .bp-courier-results-list li {
    border-bottom-color: var(--bp-border-soft);
    color: var(--bp-text-2);
}

[data-theme="dark"] .bp-courier-results-list li.is-success i {
    color: var(--bp-success-ink);
}

[data-theme="dark"] .bp-courier-results-list li.is-failed i {
    color: var(--bp-danger-ink);
}

/* ---------- POS: long product names — one line ending in "…" ----------
   Tiles and cart rows never wrap a long title (the full name stays in
   data-name / the cart item and in the title tooltip). min-width: 0 lets
   the ellipsis engage inside the grid/flex children. */
.bp-pos-item,
.bp-pos-item-details,
.bp-pos-item-name,
.bp-pos-cart-item-info,
.bp-pos-cart-item-name,
.bp-held-order-info,
.bp-held-order-name {
    min-width: 0;
}

.bp-pos-item-name,
.bp-pos-cart-item-name,
.bp-held-order-name {
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

[data-theme="dark"] .bp-pos-item-name,
[data-theme="dark"] .bp-pos-cart-item-name,
[data-theme="dark"] .bp-held-order-name {
    text-overflow: ellipsis;
}

/* Couriers module pages */
a.bp-stat-card.bp-courier-kpi {
    color: inherit;
    text-decoration: none;
}

a.bp-stat-card.bp-courier-kpi:hover {
    border-color: var(--bp-primary-100);
}

.bp-courier-wallets,
.bp-courier-providers {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 16px;
}

.bp-courier-wallet-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    margin-bottom: 14px;
}

.bp-courier-wallet-name {
    font-weight: 700;
    color: var(--bp-text);
}

.bp-courier-wallet-label {
    font-size: 13px;
    color: var(--bp-text-2);
}

.bp-courier-wallet-value {
    margin: 2px 0 14px;
    font-size: 26px;
    font-weight: 800;
    color: var(--bp-text);
}

.bp-courier-wallet-value.is-negative,
.bp-courier-negative {
    color: var(--bp-danger-ink);
}

.bp-courier-wallet-stats,
.bp-courier-settings-list {
    display: grid;
    gap: 8px;
    margin: 0;
}

.bp-courier-wallet-stats {
    grid-template-columns: 1fr 1fr;
    padding-top: 12px;
    border-top: 1px solid var(--bp-border-soft);
}

.bp-courier-wallet-stats dt,
.bp-courier-settings-list dt {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: .05em;
    text-transform: uppercase;
    color: var(--bp-muted);
}

.bp-courier-wallet-stats dd,
.bp-courier-settings-list dd {
    margin: 2px 0 0;
    font-size: 13px;
    font-weight: 600;
    color: var(--bp-text);
    overflow-wrap: anywhere;
}

.bp-courier-settings-list {
    gap: 14px;
}

.bp-courier-events {
    margin: 0;
    padding: 0;
    list-style: none;
}

.bp-courier-events li {
    display: grid;
    grid-template-columns: 76px 1fr auto;
    gap: 10px;
    align-items: baseline;
    padding: 9px 0;
    border-bottom: 1px solid var(--bp-border-soft);
    font-size: 13px;
}

.bp-courier-events li:last-child {
    border-bottom: 0;
}

.bp-courier-events-provider {
    font-weight: 600;
    color: var(--bp-primary-ink);
}

.bp-courier-events-text {
    color: var(--bp-text);
    min-width: 0;
}

.bp-courier-events-time {
    font-size: 12px;
    color: var(--bp-muted);
    white-space: nowrap;
}

.bp-courier-customer {
    max-width: 260px;
}

.bp-courier-address,
.bp-courier-log-error {
    max-width: 260px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.bp-courier-flow {
    display: flex;
    gap: 3px;
    margin: 6px 0 0;
    padding: 0;
    list-style: none;
}

.bp-courier-flow li {
    width: 22px;
    height: 4px;
    border-radius: 999px;
    background: var(--bp-border);
}

.bp-courier-flow li.is-done {
    background: var(--bp-success);
}

.bp-courier-actions {
    display: inline-flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 6px;
}

.bp-courier-timeline-row > td {
    background: var(--bp-row-hover);
}

.bp-courier-timeline {
    margin: 4px 0 4px 8px;
}

.bp-courier-inline-filter {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    width: 100%;
}

.bp-courier-inline-filter .bp-form-select {
    width: auto;
    min-width: 180px;
}

.bp-courier-settle {
    display: grid;
    grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr);
    gap: 16px;
    align-items: start;
}

.bp-courier-net {
    display: flex;
    align-items: center;
    height: 40px;
    padding: 0 12px;
    border-radius: var(--bp-radius-md);
    background: var(--bp-success-bg);
    color: var(--bp-success-ink);
    font-weight: 800;
}

.bp-courier-net.is-invalid {
    background: var(--bp-danger-bg);
    color: var(--bp-danger-ink);
}

.bp-courier-scan-row {
    display: flex;
    gap: 10px;
}

.bp-courier-scan-row .bp-form-control {
    flex: 1 1 auto;
    min-width: 0;
    font-size: 15px;
}

.bp-courier-items {
    margin: 0;
    padding-left: 16px;
    font-size: 12.5px;
    color: var(--bp-text-2);
}

.bp-courier-test {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
}

.bp-courier-test-result {
    font-size: 13px;
    color: var(--bp-text-2);
}

.bp-courier-test-result.is-success {
    color: var(--bp-success-ink);
}

.bp-courier-test-result.is-error {
    color: var(--bp-danger-ink);
}

.bp-courier-code {
    padding: 2px 6px;
    border-radius: var(--bp-radius-sm);
    background: var(--bp-primary-50);
    color: var(--bp-primary-ink);
    font-size: 12px;
}

@media (max-width: 1180px) {
    .bp-courier-settle {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 900px) {
    .bp-courier-events li {
        grid-template-columns: 1fr auto;
    }

    .bp-courier-events-provider {
        grid-column: 1 / -1;
    }
}

@media (max-width: 560px) {
    .bp-courier-wallets,
    .bp-courier-providers {
        grid-template-columns: 1fr;
    }

    .bp-courier-scan-row {
        flex-direction: column;
    }

    .bp-courier-events li {
        grid-template-columns: 1fr;
    }

    .bp-courier-inline-filter .bp-form-select {
        width: 100%;
    }
}

[data-theme="dark"] a.bp-stat-card.bp-courier-kpi:hover {
    border-color: var(--bp-primary-100);
}

[data-theme="dark"] .bp-courier-wallet-name,
[data-theme="dark"] .bp-courier-wallet-value,
[data-theme="dark"] .bp-courier-events-text,
[data-theme="dark"] .bp-courier-wallet-stats dd,
[data-theme="dark"] .bp-courier-settings-list dd {
    color: var(--bp-text);
}

[data-theme="dark"] .bp-courier-wallet-label,
[data-theme="dark"] .bp-courier-items,
[data-theme="dark"] .bp-courier-test-result {
    color: var(--bp-text-2);
}

[data-theme="dark"] .bp-courier-wallet-value.is-negative,
[data-theme="dark"] .bp-courier-negative,
[data-theme="dark"] .bp-courier-test-result.is-error {
    color: var(--bp-danger-ink);
}

[data-theme="dark"] .bp-courier-wallet-stats,
[data-theme="dark"] .bp-courier-events li {
    border-color: var(--bp-border-soft);
}

[data-theme="dark"] .bp-courier-wallet-stats dt,
[data-theme="dark"] .bp-courier-settings-list dt,
[data-theme="dark"] .bp-courier-events-time {
    color: var(--bp-muted);
}

[data-theme="dark"] .bp-courier-events-provider {
    color: var(--bp-primary-ink);
}

[data-theme="dark"] .bp-courier-flow li {
    background: var(--bp-border);
}

[data-theme="dark"] .bp-courier-flow li.is-done {
    background: var(--bp-success);
}

[data-theme="dark"] .bp-courier-timeline-row > td {
    background: var(--bp-bg);
}

[data-theme="dark"] .bp-courier-net {
    background: var(--bp-success-bg);
    color: var(--bp-success-ink);
}

[data-theme="dark"] .bp-courier-net.is-invalid {
    background: var(--bp-danger-bg);
    color: var(--bp-danger-ink);
}

[data-theme="dark"] .bp-courier-test-result.is-success {
    color: var(--bp-success-ink);
}

[data-theme="dark"] .bp-courier-code {
    background: var(--bp-primary-50);
    color: var(--bp-primary-ink);
}

/* ==========================================================================
   ADMIN AI ROBOT — chat panel (Modules/AiAssistant/resources/views/robot/admin-panel.blade.php)
   The launcher / robot art / animations live in public/css/bp-robot.css (shared with the
   storefront). The panel lives INSIDE the fixed .bp-robot container so it anchors to the robot.
   Bubbles, chips, history and the typing indicator reuse the .bp-chat-* classes above.
   ========================================================================== */
.bp-robot-panel {
    position: absolute;
    right: 0;
    bottom: calc(100% + 12px);
    z-index: 1;
    display: none;
    flex-direction: column;
    width: 380px;
    height: min(560px, calc(100vh - 140px));
    background-color: var(--bp-surface);
    color: var(--bp-text);
    border: 1px solid var(--bp-border);
    border-radius: 16px;
    box-shadow: 0 12px 40px rgba(15, 23, 42, 0.22);
    overflow: hidden;
    pointer-events: auto;
}

.bp-robot-panel.is-open {
    display: flex;
}

/* The panel opens toward the screen centre, whichever corner the robot is parked in
   (phones get the full-screen sheet below instead). */
@media (min-width: 561px) {
    .bp-robot[data-corner="bl"] .bp-robot-panel,
    .bp-robot[data-corner="tl"] .bp-robot-panel {
        right: auto;
        left: 0;
    }

    .bp-robot[data-corner="tr"] .bp-robot-panel,
    .bp-robot[data-corner="tl"] .bp-robot-panel {
        bottom: auto;
        top: calc(100% - 2px);
        height: min(560px, calc(100dvh - 190px));
    }
}

/* Desktop: the fixed sidebar (z-index 1040) sits above the robot, so a robot parked on the
   left starts to the right of it (follows the collapsed state). */
@media (min-width: 992px) {
    .bp-robot--white[data-corner$="l"] {
        --bp-robot-offset-x: calc(var(--bp-sidebar-width) + 20px);
    }

    .sidebar-collapsed .bp-robot--white[data-corner$="l"] {
        --bp-robot-offset-x: calc(var(--bp-sidebar-collapsed) + 20px);
    }
}

.bp-robot-panel-head {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    background-color: var(--bp-primary-solid);
    color: #fff;
    flex-shrink: 0;
}

.bp-robot-panel-title {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    min-width: 0;
    line-height: 1.25;
}

.bp-robot-panel-title small {
    font-size: 11px;
    opacity: 0.85;
}

.bp-robot-panel-btn {
    width: 30px;
    height: 30px;
    padding: 0;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: inherit;
    cursor: pointer;
}

.bp-robot-panel-btn:hover,
.bp-robot-panel-btn:focus-visible {
    background-color: rgba(255, 255, 255, 0.2);
}

.bp-robot-panel-history {
    max-height: 45%;
    flex: 0 0 auto;
    border-bottom: 1px solid var(--bp-border);
    background-color: var(--bp-gray-100);
}

.bp-robot-panel-history[hidden] {
    display: none;
}

.bp-robot-panel-messages {
    padding: 14px;
}

.bp-robot-panel-messages .bp-chat-empty {
    margin-top: 12px;
}

.bp-robot-panel-messages .bp-chat-bubble {
    max-width: 92%;
}

.bp-robot-panel-form {
    flex-shrink: 0;
}

.bp-robot-panel-form .bp-form-control {
    flex: 1 1 auto;
    min-width: 0;
}

[data-theme="dark"] .bp-robot-panel {
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.6);
}

[data-theme="dark"] .bp-robot-panel-head {
    background-color: var(--bp-primary-dark);
}

/* Collisions: sale create/edit has a fixed full-width totals bar along the bottom;
   the POS terminal has the cart + payment panel on the right and a shortcuts bar. */
body:has(.bp-sale-totals-bar) .bp-robot {
    --bp-robot-offset-y: 96px;
}

/* Phones: the panel becomes a full-screen sheet. */
@media (max-width: 560px) {
    .bp-robot-panel {
        position: fixed;
        inset: 0;
        width: 100%;
        height: 100dvh;
        border: 0;
        border-radius: 0;
    }
}

/* ==========================================================================
   Website content: icon picker, icon chip, section list meta (GadgetX work)
   ========================================================================== */
.bp-icon-picker {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(44px, 1fr));
    gap: 8px;
    max-height: 232px;
    overflow-y: auto;
    padding: 8px;
    border: 1px solid var(--bp-border);
    border-radius: var(--bp-radius-md);
    background: var(--bp-surface);
}

.bp-icon-option {
    position: relative;
    margin: 0;
    cursor: pointer;
}

.bp-icon-option input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.bp-icon-option-box {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    aspect-ratio: 1;
    border: 1px solid var(--bp-border);
    border-radius: var(--bp-radius-sm);
    color: var(--bp-text-2);
    font-size: 16px;
    transition: background-color .15s ease, border-color .15s ease, color .15s ease;
}

.bp-icon-option:hover .bp-icon-option-box {
    background: var(--bp-row-hover);
}

.bp-icon-option input:checked + .bp-icon-option-box {
    background: var(--bp-primary-50);
    border-color: var(--bp-primary);
    color: var(--bp-primary-ink);
}

.bp-icon-option input:focus-visible + .bp-icon-option-box {
    outline: 2px solid var(--bp-primary);
    outline-offset: 2px;
}

.bp-icon-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 32px;
    width: 32px;
    height: 32px;
    border-radius: var(--bp-radius-sm);
    background: var(--bp-primary-50);
    color: var(--bp-primary-ink);
    font-size: 14px;
}

.bp-section-desc {
    display: block;
    margin-top: 2px;
    color: var(--bp-muted);
    font-size: 12px;
    line-height: 1.4;
}

.bp-section-rendered {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    margin-top: 6px;
    color: var(--bp-text-2);
    font-size: 12px;
}

.bp-section-rendered.is-ignored {
    color: var(--bp-warning-ink);
}

.bp-theme-hint {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px 14px;
    border: 1px solid var(--bp-border);
    border-radius: var(--bp-radius-md);
    background: var(--bp-primary-50);
    color: var(--bp-text);
    font-size: 13px;
}

.bp-theme-hint > i {
    margin-top: 2px;
    color: var(--bp-primary-ink);
}

.bp-theme-hint.is-warning {
    background: var(--bp-warning-bg);
}

.bp-theme-hint.is-warning > i {
    color: var(--bp-warning-ink);
}

[data-theme="dark"] .bp-icon-picker {
    background: var(--bp-surface);
    border-color: var(--bp-border);
}

[data-theme="dark"] .bp-icon-option-box {
    border-color: var(--bp-border);
    color: var(--bp-text-2);
}

[data-theme="dark"] .bp-icon-option input:checked + .bp-icon-option-box,
[data-theme="dark"] .bp-icon-chip {
    background: var(--bp-primary-50);
    color: var(--bp-primary-ink);
}

[data-theme="dark"] .bp-section-desc {
    color: var(--bp-muted);
}

[data-theme="dark"] .bp-section-rendered.is-ignored {
    color: var(--bp-warning-ink);
}

[data-theme="dark"] .bp-theme-hint {
    background: var(--bp-primary-50);
    border-color: var(--bp-border);
    color: var(--bp-text);
}

[data-theme="dark"] .bp-theme-hint.is-warning {
    background: var(--bp-warning-bg);
}

/* KPI value that must never be cut off (ledger cards): wraps / scales instead of ellipsis */
.bp-stat-value.bp-stat-value-fit {
    font-size: clamp(16px, 1.7vw, 24px);
    white-space: normal;
    overflow: visible;
    text-overflow: clip;
    overflow-wrap: anywhere;
}

/* ── Refund Advance summary (payments/create, payment_type=advance_return) ── */
.bp-advance-summary-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
}

.bp-advance-summary-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 12px 14px;
    border: 1px solid var(--bp-border);
    border-radius: 8px;
    background: var(--bp-surface);
}

.bp-advance-summary-label {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--bp-text-muted, var(--bp-gray-600));
}

.bp-advance-summary-value {
    font-size: 16px;
    font-weight: 800;
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
    color: var(--bp-text);
}

.bp-advance-summary-remaining {
    background: var(--bp-bg);
    border-color: var(--bp-success);
}

.bp-advance-summary-remaining .bp-advance-summary-value {
    color: var(--bp-success-ink);
    font-size: 20px;
}

.bp-advance-after {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 12px;
    margin-top: 14px;
    font-size: 13px;
    color: var(--bp-text);
}

.bp-advance-after.is-over strong {
    color: var(--bp-danger-ink);
}

.bp-advance-empty {
    text-align: center;
    padding: 32px 16px;
}

.bp-advance-empty > i {
    font-size: 32px;
    color: var(--bp-text-muted, var(--bp-gray-600));
}

.bp-advance-empty h5 {
    margin: 12px 0 4px;
    color: var(--bp-text);
}

.bp-advance-empty p {
    margin-bottom: 16px;
    color: var(--bp-text-muted, var(--bp-gray-600));
}

[data-theme="dark"] .bp-advance-summary-item {
    background: var(--bp-surface);
    border-color: var(--bp-border);
}

[data-theme="dark"] .bp-advance-summary-remaining {
    background: var(--bp-bg);
    border-color: var(--bp-success);
}

@media (max-width: 992px) {
    .bp-advance-summary-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 560px) {
    .bp-advance-summary-grid {
        grid-template-columns: 1fr;
    }
}


/* POS terminal: single-action alert dialog (out-of-stock / sale errors) */
.bp-pos-alert-modal .modal-dialog {
    max-width: 400px;
}

.bp-pos-alert-modal .modal-content {
    border-radius: 16px;
}

.bp-pos-alert-body {
    padding: 28px 24px 24px;
    text-align: center;
}

.bp-pos-alert-icon {
    width: 56px;
    height: 56px;
    margin: 0 auto 14px;
    border-radius: 50%;
    background: var(--bp-danger-bg);
    color: var(--bp-danger-ink);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
}

.bp-pos-alert-title {
    font-size: 18px;
    font-weight: 800;
    color: var(--bp-dark);
    margin-bottom: 8px;
}

.bp-pos-alert-message {
    font-size: 14px;
    line-height: 1.5;
    color: var(--bp-gray-600);
    white-space: pre-line;
    margin-bottom: 20px;
}

.bp-pos-alert-btn {
    min-width: 140px;
    border-radius: 10px;
}

[data-theme="dark"] .bp-pos-alert-icon {
    background: var(--bp-danger-bg);
    color: var(--bp-danger-ink);
}


/* POS cart: actions that need items read as clearly inactive while the cart is empty */
.bp-pos-cart .bp-btn:disabled {
    opacity: 1;
    background: var(--bp-gray-100);
    border-color: var(--bp-gray-200);
    color: var(--bp-gray-400);
}

[data-theme="dark"] .bp-pos-cart .bp-btn:disabled {
    background: var(--bp-gray-100);
    border-color: var(--bp-gray-200);
    color: var(--bp-gray-400);
}

/* POS category bar: slim, soft scrollbar (Bug-248). Chrome 121+ ignores
   ::-webkit-scrollbar once scrollbar-width is set, so the standard
   properties are only used where the webkit pseudo-elements are absent. */
.bp-pos-categories::-webkit-scrollbar {
    height: 4px;
}

.bp-pos-categories::-webkit-scrollbar-track {
    background: transparent;
}

.bp-pos-categories::-webkit-scrollbar-thumb {
    background: var(--bp-gray-300);
    border-radius: 4px;
}

.bp-pos-categories:hover::-webkit-scrollbar-thumb {
    background: var(--bp-gray-400);
}

@supports not selector(::-webkit-scrollbar) {
    .bp-pos-categories {
        scrollbar-width: thin;
        scrollbar-color: var(--bp-gray-300) transparent;
    }
}

/* Numeric table column: right-aligned, tabular figures, single line (Bug-255) */
.bp-table th.bp-num,
.bp-table td.bp-num {
    text-align: right;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

/* Create Order items table: fit a 1366px desktop without a horizontal scrollbar (Bug-244) */
.bp-has-variant-col .bp-col-product {
    min-width: 180px;
}

.bp-has-variant-col .bp-col-variants {
    min-width: 200px;
}

.bp-order-table .bp-line-discount {
    width: 136px;
    max-width: 136px;
    gap: 0 !important;
}

.bp-order-table .bp-line-discount .sale-line-disc-type {
    flex: 0 0 56px;
    width: 56px;
    min-width: 56px;
    padding-left: 8px;
    padding-right: 20px;
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.2;
}

.bp-order-table .bp-line-discount .sale-line-disc-input {
    flex: 1 1 auto;
    min-width: 0;
    margin-left: -1px;
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
}

.bp-order-table .sale-line-qty.bp-input-narrow {
    width: 72px;
    min-width: 72px;
}

.bp-order-table .bp-qline-v-row {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    column-gap: 10px;
}

.bp-order-table .bp-qline-v-price {
    white-space: nowrap;
}

/* Advance summary: one type scale for Previous Due / Advance / Due, Due most prominent (Bug-246) */
.bp-advance-summary .bp-adv-row > span:last-child {
    font-size: 16px;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    text-align: right;
    white-space: nowrap;
}

.bp-advance-summary .bp-adv-row > span:first-child {
    font-size: 14px;
}

.bp-advance-summary .bp-adv-row:last-child {
    padding-top: 12px;
}

.bp-advance-summary .bp-adv-row:last-child > span:first-child {
    font-size: 15px;
    font-weight: 800;
}

.bp-advance-summary .bp-adv-row > span.bp-adv-due {
    font-size: 20px;
    font-weight: 800;
}

/* Multi-select lists (e.g. collection filter rules) must grow with their size attribute instead of the fixed 40px select height */
.bp-form-select[multiple] {
    height: auto;
    padding: 6px 8px;
    cursor: default;
}

.bp-form-select[multiple] option {
    padding: 4px 8px;
    border-radius: var(--bp-radius-sm, 4px);
}

/* Form action bar: Delete on the left, Cancel/Save on the right; stacks full-width on phones */
.bp-form-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    margin-top: 24px;
}

.bp-form-actions-group {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

@media (max-width: 560px) {
    .bp-form-actions,
    .bp-form-actions-group {
        flex-direction: column;
        align-items: stretch;
        width: 100%;
    }

    .bp-form-actions .bp-btn {
        width: 100%;
        justify-content: center;
    }
}

/* Phone: the fixed totals bar wraps to several rows, so the form needs more room beneath the last button */
@media (max-width: 767.98px) {
    .bp-sale-form-wrapper {
        padding-bottom: 200px;
    }
}

/* Read-only text block styled like an input: grows with its content instead of the fixed 40px control height */
.bp-form-control-static {
    height: auto;
    min-height: 40px;
    padding: 10px 12px;
}

.bp-form-actions.bp-form-actions-end {
    justify-content: flex-end;
}

/* Card footer with a note on the left and an action group on the right; wraps and stretches the buttons on phones */
.bp-footer-split {
    flex-wrap: wrap;
    gap: 10px;
}

.bp-footer-split-actions {
    display: flex;
    gap: 8px;
}

@media (max-width: 560px) {
    .bp-footer-split {
        flex-direction: column;
        align-items: stretch !important;
    }

    .bp-footer-split-actions {
        width: 100%;
    }

    .bp-footer-split-actions .bp-btn {
        flex: 1 1 0;
        min-height: 40px;
        justify-content: center;
        white-space: nowrap;
    }
}

/* Purchase return items grid: keep a readable width and scroll sideways on phones instead of crushing the inputs */
.bp-return-items-table {
    min-width: 820px;
}

.bp-return-items-table td.text-end {
    white-space: nowrap;
}

.bp-return-items-table .bp-return-qty {
    min-width: 84px;
}

.bp-return-items-table .bp-form-select {
    min-width: 130px;
}

.bp-po-info {
    gap: 8px 24px;
}

/* Dashboard tables: column headers read as a distinct band (Bug-243) */
.bp-dash-table .bp-table thead th {
    background-color: var(--bp-bg);
    border-top: 1px solid var(--bp-border);
    border-bottom: 1px solid var(--bp-border);
    padding-top: 10px;
    padding-bottom: 10px;
}

[data-theme="dark"] .bp-dash-table .bp-table thead th {
    background-color: var(--bp-bg);
    border-top-color: var(--bp-border);
    border-bottom-color: var(--bp-border);
}

/* Refund Advance - "Max refundable" helper under Total Amount [Bug-291] */
.bp-advance-max-hint {
    margin-top: 4px;
    font-size: 12px;
    color: var(--bp-muted);
}

.bp-advance-max-hint.is-over {
    color: var(--bp-danger-ink);
}

/* Demo-server notice (admin header). Storefront copy lives in website/assets/css/style.css. */
.bp-demo-notice {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border: 1px solid var(--bp-warning);
    border-radius: 999px;
    background: var(--bp-warning-bg);
    color: var(--bp-warning-ink);
    font-size: 12px;
    font-weight: 600;
    line-height: 1.2;
    white-space: nowrap;
}

[data-theme="dark"] .bp-demo-notice {
    border-color: var(--bp-warning-ink);
}

@media (max-width: 560px) {
    .bp-demo-notice span {
        display: none;
    }
}

/* ENH-12: Apply Advance panel (Sales create/edit, POS) — dark mode + small screens */
[data-theme="dark"] .bp-advance-adjust-balance,
[data-theme="dark"] .bp-advance-adjust-info>i {
    color: var(--bp-info);
}

[data-theme="dark"] .bp-advance-toggle-label,
[data-theme="dark"] .bp-advance-adjust-remaining strong {
    color: var(--bp-primary-ink);
}

[data-theme="dark"] .bp-advance-input-group input {
    background: var(--bp-surface);
    color: var(--bp-gray-800);
}

@media (max-width: 560px) {
    .bp-advance-adjust-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .bp-advance-adjust-input-row {
        flex-direction: column;
        align-items: stretch;
    }

    .bp-advance-input-group input {
        width: 100%;
    }

    .bp-advance-adjust-remaining {
        text-align: left;
    }
}


/* ENH-04: Loyalty program settings footer */
.bp-loyalty-settings-footer {
    display: flex;
    justify-content: flex-end;
}

@media (max-width: 560px) {
    .bp-loyalty-settings-footer .bp-btn {
        width: 100%;
        justify-content: center;
    }
}

/* ENH-07: Sell / Dispose asset dialog — gain/loss preview */
.bp-sell-preview {
    border: 1px solid var(--bp-gray-200);
    border-radius: 8px;
    padding: 10px 12px;
    background: var(--bp-gray-100);
}

.bp-sell-preview-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
}

.bp-sell-preview-row+.bp-sell-preview-row {
    margin-top: 6px;
}

[data-theme="dark"] .bp-sell-preview {
    border-color: var(--bp-gray-300);
    background: var(--bp-surface);
}

/* ENH-22: customer due-limit alert (Sales create + POS) — warns, never blocks */
.bp-due-limit-alert {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-top: 8px;
    padding: 10px 12px;
    border: 1px solid var(--bp-border);
    border-radius: var(--bp-radius-md);
    font-size: 13px;
    line-height: 1.45;
}

.bp-due-limit-alert.d-none {
    display: none;
}

.bp-due-limit-icon {
    margin-top: 2px;
}

.bp-due-limit-title {
    display: block;
    font-weight: 700;
}

.bp-due-limit-warning {
    background: var(--bp-warning-bg);
    color: var(--bp-warning-ink);
    border-color: color-mix(in srgb, var(--bp-warning) 35%, transparent);
}

.bp-due-limit-danger {
    background: var(--bp-danger-bg);
    color: var(--bp-danger-ink);
    border-color: color-mix(in srgb, var(--bp-danger) 35%, transparent);
}

.bp-due-limit-modal-icon {
    color: var(--bp-warning);
}

[data-theme="dark"] .bp-due-limit-warning {
    background: var(--bp-warning-bg);
    color: var(--bp-warning-ink);
    border-color: color-mix(in srgb, var(--bp-warning) 45%, transparent);
}

[data-theme="dark"] .bp-due-limit-danger {
    background: var(--bp-danger-bg);
    color: var(--bp-danger-ink);
    border-color: color-mix(in srgb, var(--bp-danger) 45%, transparent);
}

[data-theme="dark"] .bp-due-limit-modal .modal-content {
    background: var(--bp-surface);
    color: var(--bp-text);
}

@media (max-width: 768px) {
    .bp-due-limit-alert {
        font-size: 12.5px;
    }
}

/* Accounting integrity status card (Super Admin dashboard): the stat card as a link */
.bp-integrity-status {
    margin-bottom: 16px;
}

.bp-integrity-link,
.bp-integrity-link:hover {
    color: inherit;
    text-decoration: none;
}

.bp-integrity-link:hover {
    border-color: var(--bp-primary);
}

@media (min-width: 561px) {
    .bp-integrity-link {
        max-width: 420px;
    }
}

/* ── Meta campaign create wizard ─────────────────────────────────────── */
.js-wizard .bp-wizard-step { display: none; }
.js-wizard .bp-wizard-step.is-active { display: block; }
.bp-wizard-nav { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; margin: 0 0 16px; padding: 0; }
.bp-wizard-nav-item { display: flex; align-items: center; gap: 8px; padding: 6px 12px; border: 1px solid var(--bp-border); border-radius: var(--bp-border-radius); background: var(--bp-surface); color: var(--bp-muted); font-size: 13px; font-weight: 600; }
.bp-wizard-nav-item.is-done { cursor: pointer; color: var(--bp-text-2); }
.bp-wizard-nav-item.is-active { border-color: var(--bp-primary); background: var(--bp-primary-50); color: var(--bp-primary-ink); }
.bp-wizard-nav-num { display: inline-flex; align-items: center; justify-content: center; width: 20px; height: 20px; border-radius: 50%; background: var(--bp-border-soft); font-size: 11px; }
.bp-wizard-nav-item.is-active .bp-wizard-nav-num { background: var(--bp-primary-solid); color: #fff; }
.bp-choice-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.bp-choice { position: relative; display: block; margin: 0; cursor: pointer; }
.bp-choice-input { position: absolute; opacity: 0; pointer-events: none; }
.bp-choice-body { display: block; height: 100%; padding: 12px 14px; border: 1px solid var(--bp-border); border-radius: var(--bp-border-radius); background: var(--bp-surface); }
.bp-choice-input:checked + .bp-choice-body { border-color: var(--bp-primary); background: var(--bp-primary-50); }
.bp-choice-input:focus-visible + .bp-choice-body { outline: 2px solid var(--bp-primary); outline-offset: 2px; }
.bp-choice-title { display: block; font-weight: 700; font-size: 14px; color: var(--bp-text); }
.bp-choice-desc { display: block; margin-top: 4px; font-size: 12px; color: var(--bp-muted); }
.bp-choice.is-disabled { cursor: not-allowed; }
.bp-choice.is-disabled .bp-choice-body { opacity: .6; background: var(--bp-bg); }
.bp-wizard-checklist { list-style: none; margin: 0 0 12px; padding: 0; }
.bp-wizard-check { padding: 6px 0; font-size: 13px; }
.bp-wizard-check.is-ok i { color: var(--bp-success-ink); }
.bp-wizard-check.is-warn i { color: var(--bp-warning-ink); }
[data-theme="dark"] .bp-wizard-nav-item.is-active { background: var(--bp-primary-50); }
[data-theme="dark"] .bp-choice-input:checked + .bp-choice-body { background: var(--bp-primary-50); }
[data-theme="dark"] .bp-choice.is-disabled .bp-choice-body { background: var(--bp-bg); }
@media (max-width: 560px) {
    .bp-wizard-nav-label { display: none; }
    .bp-wizard-nav-item.is-active .bp-wizard-nav-label { display: inline; }
}

/* ==========================================================================
   Shared camera barcode scan button — public/js/bp-barcode-scanner.js
   Rendered by core::partials.scan-button. Hidden until the script finds a
   camera (phones/tablets, touch devices, or a desktop with a webcam).
   ========================================================================== */
[data-bp-scan][hidden] {
    display: none !important;
}

.bp-scan-btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    padding: 0;
    border: 1px solid var(--bp-border);
    border-radius: var(--bp-radius-md);
    background: var(--bp-surface);
    color: var(--bp-primary);
    cursor: pointer;
    transition: background-color 0.15s ease, color 0.15s ease;
}

.bp-scan-btn:hover,
.bp-scan-btn:active {
    background: var(--bp-primary-50);
    color: var(--bp-primary-ink);
}

.bp-scan-btn:focus-visible {
    outline: 2px solid var(--bp-primary);
    outline-offset: 1px;
}

/* Product search boxes (Sale, Purchase, Quotation…): camera sits at the end of the input group. */
.bp-product-search.has-scan .bp-form-control,
.bp-sale-product-search.has-scan .bp-form-control {
    border-radius: 0;
}

.bp-product-search .bp-scan-btn,
.bp-sale-product-search .bp-scan-btn {
    width: 46px;
    height: auto;
    border-left: 0;
    border-radius: 0 6px 6px 0;
}

/* List search fields (filter bars, Print Barcodes): icon button inside the right edge. */
.bp-table-search.has-scan input {
    padding-right: 44px;
}

.bp-table-search .bp-scan-btn {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 32px;
    height: 32px;
    border: 0;
    background: transparent;
}

/* Touch: 44px hit area without growing the control. */
@media (pointer: coarse) {
    .bp-scan-btn::after {
        content: "";
        position: absolute;
        inset: -4px;
    }
}

[data-theme="dark"] .bp-scan-btn {
    background: var(--bp-surface);
    border-color: var(--bp-border);
    color: var(--bp-primary-light);
}

[data-theme="dark"] .bp-table-search .bp-scan-btn {
    background: transparent;
}

[data-theme="dark"] .bp-scan-btn:hover,
[data-theme="dark"] .bp-scan-btn:active {
    background: var(--bp-primary-50);
    color: var(--bp-primary-ink);
}

/* ── Meta campaign video upload: "upload too large" page ─────────────── */
.bp-upload-limit { max-width: 560px; margin: 48px auto; padding: 0 16px; }

/* ── Meta campaign video creatives ───────────────────────────────────── */
.bp-creative-thumb.is-video { position: relative; }
.bp-creative-play {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 40px;
    height: 40px;
    margin: -20px 0 0 -20px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background-color: var(--bp-primary-solid);
    color: #fff;
    font-size: 14px;
    pointer-events: none;
}
.bp-video-field { padding: 12px; border: 1px solid var(--bp-border); border-radius: var(--bp-border-radius); background-color: var(--bp-surface); }
[data-theme="dark"] .bp-video-field { background-color: var(--bp-surface); border-color: var(--bp-border); }

/* Meta lead form builder + lead inbox */
.bp-lead-questions { display: flex; flex-wrap: wrap; gap: 8px 20px; padding: 10px 12px; border: 1px solid var(--bp-border); border-radius: var(--bp-border-radius); background-color: var(--bp-surface); }
.bp-lead-question.is-locked { opacity: .75; }
[data-theme="dark"] .bp-lead-questions { background-color: var(--bp-surface); border-color: var(--bp-border); }
.bp-lead-row.is-overdue { background-color: var(--bp-warning-bg, var(--bp-bg)); }
[data-theme="dark"] .bp-lead-row.is-overdue { background-color: var(--bp-bg); }
.bp-lead-answers { margin: 0; padding: 0; list-style: none; font-size: 12px; color: var(--bp-muted); }
.bp-lead-phone { white-space: nowrap; font-weight: 700; }

/* ===== Meta campaigns: Results card (Phase 4) ===== */
.bp-range-links { display: flex; gap: 4px; flex-wrap: wrap; }
.bp-range-link { padding: 3px 10px; border-radius: 6px; font-size: 12px; font-weight: 600; color: var(--bp-muted); text-decoration: none; border: 1px solid var(--bp-border); }
.bp-range-link:hover { color: var(--bp-text); background-color: var(--bp-bg); }
.bp-range-link.active { color: var(--bp-primary-ink, var(--bp-primary)); border-color: var(--bp-primary); background-color: var(--bp-primary-bg, var(--bp-bg)); }
[data-theme="dark"] .bp-range-link { color: var(--bp-muted); border-color: var(--bp-border); }
[data-theme="dark"] .bp-range-link:hover { background-color: var(--bp-surface); }
[data-theme="dark"] .bp-range-link.active { background-color: var(--bp-surface); border-color: var(--bp-primary); }
.bp-result-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin-bottom: 14px; }
.bp-result-item { padding: 10px 12px; border: 1px solid var(--bp-border); border-radius: 8px; background-color: var(--bp-surface); }
.bp-result-main { border-color: var(--bp-primary); }
.bp-result-label { font-size: 12px; color: var(--bp-muted); }
.bp-result-value { font-size: 20px; font-weight: 700; color: var(--bp-text); }
.bp-result-sub { font-size: 11px; color: var(--bp-muted); }
[data-theme="dark"] .bp-result-item { background-color: var(--bp-surface); border-color: var(--bp-border); }
.bp-spark-wrap { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.bp-spark { width: 160px; height: 36px; }
.bp-spark polyline { stroke: var(--bp-primary); }
.bp-lead-funnel { margin-top: 16px; padding-top: 12px; border-top: 1px solid var(--bp-border); }
.bp-result-funnel-title { font-weight: 700; margin-bottom: 10px; }
.bp-result-note { margin-top: 14px; font-size: 12px; color: var(--bp-muted); }
.bp-result-trend td, .bp-result-trend th { white-space: nowrap; }

.bp-expense-hint { margin: 0 0 10px; padding: 8px 12px; border-radius: 8px; font-size: 13px; color: var(--bp-warning-ink, var(--bp-text)); background-color: var(--bp-warning-bg, var(--bp-bg)); border: 1px solid var(--bp-warning, var(--bp-border)); }
[data-theme="dark"] .bp-expense-hint { background-color: var(--bp-surface); color: var(--bp-text); }

.bp-guidance { display: grid; gap: 8px; }
.bp-guidance-item { padding: 8px 12px; border-radius: 8px; font-size: 13px; border: 1px solid var(--bp-border); background-color: var(--bp-surface); color: var(--bp-text); }
.bp-guidance-item.is-warning { border-color: var(--bp-warning, var(--bp-border)); }
[data-theme="dark"] .bp-guidance-item { background-color: var(--bp-surface); border-color: var(--bp-border); color: var(--bp-text); }
[data-theme="dark"] .bp-guidance-item.is-warning { border-color: var(--bp-warning, var(--bp-border)); }

.bp-chip-radius { width: 54px; margin-left: 6px; padding: 0 4px; font-size: 12px; border: 1px solid var(--bp-border); border-radius: 4px; background-color: var(--bp-surface); color: var(--bp-text); }
.bp-chip-radius:focus { outline: 2px solid var(--bp-primary); outline-offset: 1px; }
.bp-chip-radius-label { margin-left: 6px; font-size: 12px; color: var(--bp-muted); }
.bp-chip-unit { margin: 0 4px 0 3px; font-size: 12px; color: var(--bp-muted); }
[data-theme="dark"] .bp-chip-radius { background-color: var(--bp-surface); border-color: var(--bp-border); color: var(--bp-text); }

/* ── Meta campaigns: manual ad copy (form, counters, empty state, live-preview flag) ── */
.bp-copy-form .bp-form-label { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.bp-copy-counter { font-size: 11px; font-weight: 600; color: var(--bp-muted); }
.bp-copy-counter.is-warn { color: var(--bp-warning-ink); }
.bp-copy-counter.is-over { color: var(--bp-danger-ink); }
.bp-copy-error { margin-top: 4px; font-size: 12px; color: var(--bp-danger-ink); }
.bp-copy-empty { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; padding: 14px 16px; font-size: 13px; color: var(--bp-muted); background-color: var(--bp-bg); border: 1px dashed var(--bp-border); border-radius: 8px; }
.bp-copy-text { white-space: pre-line; }
.bp-copy-edit summary { cursor: pointer; font-size: 12px; font-weight: 600; color: var(--bp-primary-ink); }
.bp-copy-edit[open] summary { margin-bottom: 4px; }
.bp-adprev-draft { margin-bottom: 8px; padding: 4px 10px; font-size: 11px; font-weight: 600; color: var(--bp-primary-ink); background-color: var(--bp-bg); border: 1px solid var(--bp-border); border-radius: 6px; }
[data-theme="dark"] .bp-copy-empty { background-color: var(--bp-bg); border-color: var(--bp-border); color: var(--bp-muted); }
[data-theme="dark"] .bp-copy-counter.is-warn { color: var(--bp-warning-ink); }
[data-theme="dark"] .bp-copy-counter.is-over, [data-theme="dark"] .bp-copy-error { color: var(--bp-danger-ink); }
[data-theme="dark"] .bp-copy-edit summary, [data-theme="dark"] .bp-adprev-draft { color: var(--bp-primary-ink); }
[data-theme="dark"] .bp-adprev-draft { background-color: var(--bp-surface); border-color: var(--bp-border); }

/* ── Supplier payment proof (upload field, proof links, Payment History) ── */
.bp-proof-optional { font-weight: 400; color: var(--bp-muted); }
.bp-proof-hint { margin-top: 4px; font-size: 12px; color: var(--bp-muted); }
.bp-proof-hint.is-warning { color: var(--bp-warning-ink); }
.bp-proof-preview { display: flex; align-items: center; gap: 10px; margin-top: 8px; padding: 8px 10px; border: 1px dashed var(--bp-border); border-radius: 8px; background-color: var(--bp-bg); }
.bp-proof-thumb { width: 48px; height: 48px; object-fit: cover; border-radius: 6px; border: 1px solid var(--bp-border); }
.bp-proof-file-icon { font-size: 28px; color: var(--bp-danger-ink); }
.bp-proof-name { font-size: 13px; color: var(--bp-text); word-break: break-all; }
.bp-proof-cell { display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; }
.bp-proof-link { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; color: var(--bp-primary-ink); text-decoration: none; }
.bp-proof-link:hover { text-decoration: underline; }
.bp-proof-link .fa-file-pdf { color: var(--bp-danger-ink); }
.bp-proof-download { font-size: 12px; color: var(--bp-muted); }
.bp-proof-none { font-size: 12px; color: var(--bp-muted); }
.bp-proof-view { display: block; max-width: 100%; max-height: 360px; margin: 0 auto 12px; border: 1px solid var(--bp-border); border-radius: 8px; }
.bp-history-note { max-width: 220px; white-space: normal; word-break: break-word; }
.bp-history-balance-note { margin-bottom: 16px; padding: 8px 12px; border-radius: 8px; font-size: 12px; color: var(--bp-muted); background-color: var(--bp-bg); border: 1px solid var(--bp-border); }
[data-theme="dark"] .bp-proof-preview { background-color: var(--bp-bg); border-color: var(--bp-border); }
[data-theme="dark"] .bp-proof-thumb, [data-theme="dark"] .bp-proof-view { border-color: var(--bp-border); }
[data-theme="dark"] .bp-proof-optional, [data-theme="dark"] .bp-proof-hint, [data-theme="dark"] .bp-proof-download, [data-theme="dark"] .bp-proof-none { color: var(--bp-muted); }
[data-theme="dark"] .bp-proof-hint.is-warning { color: var(--bp-warning-ink); }
[data-theme="dark"] .bp-proof-file-icon, [data-theme="dark"] .bp-proof-link .fa-file-pdf { color: var(--bp-danger-ink); }
[data-theme="dark"] .bp-proof-link { color: var(--bp-primary-ink); }
[data-theme="dark"] .bp-proof-name { color: var(--bp-text); }
[data-theme="dark"] .bp-history-balance-note { background-color: var(--bp-surface); border-color: var(--bp-border); color: var(--bp-muted); }

/* ── ENH-24: sales target widget (Sales create + POS) and shared bp-progress bar ── */
.bp-progress {
    height: 8px;
    overflow: hidden;
    border-radius: 999px;
    background-color: var(--bp-border);
}

.bp-progress-fill {
    display: block;
    width: 0;
    height: 100%;
    border-radius: 999px;
    background-color: var(--bp-primary);
    transition: width .3s ease;
}

.bp-progress-fill.is-success {
    background-color: var(--bp-success);
}

[data-theme="dark"] .bp-progress {
    background-color: var(--bp-border);
}

[data-theme="dark"] .bp-progress-fill {
    background-color: var(--bp-primary);
}

[data-theme="dark"] .bp-progress-fill.is-success {
    background-color: var(--bp-success);
}

.bp-target-widget {
    margin-bottom: 16px;
    padding: 14px 18px;
    border: 1px solid var(--bp-border);
    border-radius: var(--bp-radius-lg);
    background-color: var(--bp-surface);
    box-shadow: var(--bp-shadow-card);
}

.bp-target-widget[hidden],
.bp-target-row[hidden],
.bp-target-row-projection[hidden],
.bp-target-notice[hidden] {
    display: none;
}

.bp-target-widget-head {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
    font-size: 13px;
    font-weight: 700;
    color: var(--bp-text);
}

.bp-target-widget-head .fa-bullseye {
    color: var(--bp-primary-ink);
}

.bp-target-widget-month {
    margin-left: auto;
    font-size: 12px;
    font-weight: 500;
    color: var(--bp-muted);
}

.bp-target-widget-body {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px 28px;
}

.bp-target-row {
    min-width: 0;
}

.bp-target-row-title {
    font-size: 13px;
    font-weight: 700;
    color: var(--bp-text);
    font-variant-numeric: tabular-nums;
}

.bp-target-row-stats {
    margin: 2px 0 8px;
    font-size: 12.5px;
    color: var(--bp-text-2);
    font-variant-numeric: tabular-nums;
}

.bp-target-row-meta {
    margin-top: 6px;
    font-size: 12px;
    color: var(--bp-muted);
}

.bp-target-row-projection {
    margin-top: 4px;
    font-size: 12.5px;
    font-weight: 700;
    color: var(--bp-primary-ink);
}

.bp-target-notice {
    grid-column: 1 / -1;
    font-size: 12.5px;
    color: var(--bp-muted);
}

/* POS: a tighter strip above the customer bar, one column in the narrow cart panel. */
.bp-target-widget.is-compact {
    margin-bottom: 0;
    padding: 10px 14px;
    border-width: 1px 0;
    border-radius: 0;
    box-shadow: none;
}

.bp-target-widget.is-compact .bp-target-widget-body {
    grid-template-columns: 1fr;
    gap: 10px;
}

.bp-target-widget.is-compact .bp-target-widget-head {
    margin-bottom: 6px;
}

.bp-target-widget.is-compact .bp-target-row-title {
    font-size: 12.5px;
}

.bp-target-widget.is-compact .bp-target-row-stats {
    margin-bottom: 6px;
    font-size: 12px;
}

@media (max-width: 767.98px) {
    .bp-target-widget {
        padding: 12px 14px;
    }

    .bp-target-widget-body {
        grid-template-columns: 1fr;
        gap: 12px;
    }
}

[data-theme="dark"] .bp-target-widget {
    background-color: var(--bp-surface);
    border-color: var(--bp-border);
}

[data-theme="dark"] .bp-target-widget-head,
[data-theme="dark"] .bp-target-row-title {
    color: var(--bp-text);
}

[data-theme="dark"] .bp-target-widget-head .fa-bullseye,
[data-theme="dark"] .bp-target-row-projection {
    color: var(--bp-primary-ink);
}

[data-theme="dark"] .bp-target-row-stats {
    color: var(--bp-text-2);
}

[data-theme="dark"] .bp-target-widget-month,
[data-theme="dark"] .bp-target-row-meta,
[data-theme="dark"] .bp-target-notice {
    color: var(--bp-muted);
}

/* ── ENH-24b: "Sales rep" select on the POS cart panel ── */
.bp-pos-rep-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 18px;
    background: var(--bp-gray-100);
    border-bottom: 1px solid var(--bp-gray-200);
}

.bp-pos-rep-bar i {
    color: var(--bp-muted);
}

.bp-pos-rep-label {
    margin: 0;
    white-space: nowrap;
}

.bp-pos-rep-select {
    flex: 1 1 auto;
    min-width: 0;
}

[data-theme="dark"] .bp-pos-rep-bar {
    background: rgba(255, 255, 255, 0.03);
    border-bottom-color: rgba(255, 255, 255, 0.08);
}

[data-theme="dark"] .bp-pos-rep-bar i,
[data-theme="dark"] .bp-pos-rep-label {
    color: var(--bp-text-2);
}

@media (max-width: 767.98px) {
    .bp-pos-rep-bar {
        padding: 6px 12px;
        flex-wrap: wrap;
    }

    .bp-pos-rep-select {
        flex-basis: 100%;
    }
}

/* ── POS Counters (Phase 1) ── */
.bp-filter-group {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.bp-counter-range {
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.bp-counter-unassigned-row td {
    background-color: var(--bp-row-hover);
    font-style: italic;
}

[data-theme="dark"] .bp-counter-unassigned-row td {
    background-color: var(--bp-row-hover);
    color: var(--bp-text-2);
}

@media (max-width: 767.98px) {
    .bp-filter-group,
    .bp-counter-range {
        width: 100%;
    }

    .bp-filter-group .bp-form-select,
    .bp-counter-range .bp-filter-date {
        flex: 1 1 140px;
    }
}

/* ── Phase 3: POS header shows the open register ── */
.bp-pos-register-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-width: 0;
    padding: 4px 10px;
    border: 1px solid var(--bp-border);
    border-radius: 8px;
    background: var(--bp-bg);
    color: var(--bp-text);
    font-size: 12px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.bp-pos-register-chip i { color: var(--bp-primary); }
[data-theme="dark"] .bp-pos-register-chip {
    border-color: var(--bp-border);
    background: var(--bp-bg);
    color: var(--bp-text);
}
@media (max-width: 560px) {
    .bp-pos-register-chip .text-muted { display: none; }
}

/* ── Phase 3: "Received at my counter" on the customer payment page ── */
.bp-at-counter-toggle {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border: 1px solid var(--bp-border);
    border-radius: 8px;
    background: var(--bp-bg);
    color: var(--bp-text);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
}
[data-theme="dark"] .bp-at-counter-toggle {
    border-color: var(--bp-border);
    background: var(--bp-bg);
    color: var(--bp-text);
}

/* ── Phase 6: POS Sales drilldown ── */
.bp-drill-legend {
    margin: 12px 4px 0;
    font-size: 12px;
    line-height: 1.5;
    color: var(--bp-muted);
}

.bp-drill-legend i {
    margin-right: 4px;
}

[data-theme="dark"] .bp-drill-legend {
    color: var(--bp-muted);
}

.bp-drill-search {
    margin-top: 10px;
}

.bp-drill-search .bp-form-control {
    min-width: 200px;
}

@media (max-width: 767.98px) {
    .bp-drill-search .bp-form-control {
        flex: 1 1 100%;
        min-width: 0;
    }
}

.bp-drill-subtitle {
    margin: 0 4px 12px;
    font-size: 13px;
    font-weight: 600;
    color: var(--bp-text-2);
}

.bp-drill-subtitle i {
    margin-right: 4px;
    color: var(--bp-muted);
}

/* Amounts never wrap onto two lines in the drilldown tables (the wrapper scrolls instead). */
#posSalesBranchTable .text-end,
#posSalesCounterTable .text-end,
#posSalesRegisterTable .text-end,
#posSalesOrdersTable .text-end,
#posSaleItemsTable .text-end {
    white-space: nowrap;
}

/* ── POS Sales order list (same look as the Sales list, wider because of the POS columns) ── */
.bp-pos-orders-table {
  width: max-content;
  min-width: 100%;
  table-layout: auto;
}
.bp-table.bp-pos-orders-table th,
.bp-table.bp-pos-orders-table td {
  white-space: nowrap;
}
.bp-table.bp-pos-orders-table td.bp-sale-products,
.bp-table.bp-pos-orders-table td.bp-sale-customer {
  white-space: normal;
  min-width: 180px;
}
.bp-table.bp-pos-orders-table td:nth-child(6),
.bp-table.bp-pos-orders-table td:nth-child(7) {
  white-space: normal;
  min-width: 110px;
}

/* ── Parked offline sales (refused on replay) ── */
.bp-pos-parked-link {
  display: inline-flex;
  align-items: center;
  margin: 0 16px 8px;
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  color: var(--bp-warning-ink);
  background: var(--bp-warning-bg);
  text-decoration: none;
}
.bp-pos-parked-link:hover {
  color: var(--bp-warning-ink);
  text-decoration: underline;
}
.bp-pos-parked-link.d-none {
  display: none;
}
.bp-parked-shell {
  max-width: 1100px;
  margin: 0 auto;
  padding: 24px 16px;
}
.bp-parked-shell-title {
  margin-bottom: 16px;
  color: var(--bp-text);
}
.bp-parked-notice {
  margin-bottom: 16px;
  padding: 12px 14px;
  border-radius: 8px;
  font-size: 13px;
  color: var(--bp-warning-ink);
  background: var(--bp-warning-bg);
}
.bp-parked-empty {
  padding: 24px;
  text-align: center;
  color: var(--bp-muted);
}
.bp-parked-detail {
  margin-top: 16px;
  padding: 16px;
  border: 1px solid var(--bp-border);
  border-radius: 8px;
  background: var(--bp-surface);
}
.bp-parked-detail-title {
  margin-bottom: 12px;
  font-weight: 700;
  color: var(--bp-text);
}
.bp-parked-detail-line {
  margin: 8px 0 0;
  font-size: 13px;
  color: var(--bp-text);
}
.bp-parked-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-top: 12px;
}
.bp-parked-actions textarea {
  flex: 1 1 100%;
}
.bp-parked-error {
  flex: 1 1 100%;
  font-size: 12px;
  color: var(--bp-danger-ink);
}

/* ==========================================================================
   Accounting page styles moved out of Blade <style> blocks (bugs #295-#333).
   Colors use theme tokens, so dark mode follows [data-theme="dark"] automatically.
   ========================================================================== */

/* Balance Sheet (#306,#312,#320,#321) */
/*
 * Balance Sheet report spacing improvements.
 * Scoped to this page so other accounting reports are not affected.
 */
.balance-sheet-page {
    width: 100%;
    min-width: 0;
}

/* Consistent sizing for all three summary cards */
.balance-sheet-page .row.g-3.mb-4 {
    display: flex;
    flex-wrap: wrap;
    align-items: stretch;
}

.balance-sheet-page .row.g-3.mb-4 > [class*="col-"] {
    display: flex;
    min-width: 0;
}

.balance-sheet-page .bp-stat-card {
    display: flex;
    align-items: center;
    gap: 18px;
    width: 100%;
    min-width: 0;
    height: 100%;
    min-height: 132px;
    padding: 24px;
    border-radius: 12px;
    box-sizing: border-box;
}

.balance-sheet-page .bp-stat-icon {
    flex: 0 0 52px;
    width: 52px;
    height: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.balance-sheet-page .bp-stat-content {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    justify-content: center;
    min-width: 0;
    min-height: 84px;
    gap: 6px;
    padding-right: 0;
}

.balance-sheet-page .bp-stat-label {
    min-height: 22px;
    margin: 0;
    line-height: 1.4;
    font-size: 14px;
    font-weight: 600;
}

.balance-sheet-page .bp-stat-value {
    display: block;
    max-width: 100%;
    margin: 0;
    overflow-wrap: anywhere;
    line-height: 1.4;
    font-variant-numeric: tabular-nums;
}

.balance-sheet-page .bp-stat-change {
    min-height: 22px;
    margin-top: 2px;
    line-height: 1.4;
}

.balance-sheet-page .bp-table-wrapper {
    width: 100%;
    overflow-x: auto;
}

.balance-sheet-page .bp-table {
    width: 100%;
    min-width: 0;
    border-collapse: separate;
    border-spacing: 0;
}

.balance-sheet-page .bp-table th,
.balance-sheet-page .bp-table td {
    padding: 13px 20px;
    vertical-align: middle;
}

/* Keep adequate room for account labels while giving amounts a clear column. */
.balance-sheet-page .bp-table th:first-child,
.balance-sheet-page .bp-table td:first-child {
    width: 66%;
    padding-left: 24px;
    padding-right: 24px;
    overflow-wrap: anywhere;
}

.balance-sheet-page .bp-table th:last-child,
.balance-sheet-page .bp-table td:last-child {
    width: 34%;
    padding-left: 18px;
    padding-right: 24px;
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}

.balance-sheet-page .bp-table thead th {
    padding-top: 15px;
    padding-bottom: 15px;
    font-weight: 700;
}

.balance-sheet-page .bp-table .bp-table-group-header td {
    padding-top: 12px;
    padding-bottom: 12px;
}

.balance-sheet-page .bp-table .bp-table-subtotal-row td {
    padding-top: 13px;
    padding-bottom: 13px;
    border-top: 1px solid rgba(100, 116, 139, .18);
}

.balance-sheet-page .bp-table tfoot .bp-table-highlight-row td,
.balance-sheet-page .bp-table tbody .bp-table-highlight-row td {
    padding-top: 17px;
    padding-bottom: 17px;
    background: rgba(100, 116, 139, .08);
    border-top: 1px solid rgba(100, 116, 139, .22);
    border-bottom: 1px solid rgba(100, 116, 139, .22);
}

.balance-sheet-page .bp-table tfoot .bp-table-highlight-row td:first-child,
.balance-sheet-page .bp-table tbody .bp-table-highlight-row td:first-child {
    border-radius: 0 0 0 8px;
}

.balance-sheet-page .bp-table tfoot .bp-table-highlight-row td:last-child,
.balance-sheet-page .bp-table tbody .bp-table-highlight-row td:last-child {
    border-radius: 0 0 8px 0;
}

.balance-sheet-page .bp-table .bp-table-highlight-row td:first-child {
    white-space: normal;
    line-height: 1.45;
}

.balance-sheet-page .bp-table .bp-table-highlight-row td:last-child {
    text-align: right;
}

.balance-sheet-page .bp-card {
    min-width: 0;
    overflow: hidden;
}

.balance-sheet-page .bp-card-header {
    gap: 12px;
    padding: 18px 22px;
}

.balance-sheet-page .bp-card-title {
    min-width: 0;
    line-height: 1.4;
}

@media (max-width: 767.98px) {
    .balance-sheet-page .bp-stat-card {
        min-height: 120px;
        padding: 18px;
        gap: 14px;
    }

    .balance-sheet-page .bp-stat-icon {
        flex-basis: 44px;
        width: 44px;
        height: 44px;
    }

    .balance-sheet-page .bp-stat-content {
        min-height: 80px;
    }

    .balance-sheet-page .bp-table th,
    .balance-sheet-page .bp-table td {
        padding: 12px 14px;
    }

    .balance-sheet-page .bp-table th:first-child,
    .balance-sheet-page .bp-table td:first-child {
        padding-left: 16px;
        padding-right: 12px;
    }

    .balance-sheet-page .bp-table th:last-child,
    .balance-sheet-page .bp-table td:last-child {
        padding-left: 12px;
        padding-right: 16px;
    }

    .balance-sheet-page .bp-table .bp-table-highlight-row td {
        font-size: 12px;
    }

    .balance-sheet-page .bp-card-header {
        padding: 16px;
        flex-wrap: wrap;
    }
}

@media print {
    .balance-sheet-page .bp-stat-card {
        min-height: 100px;
        padding: 14px 18px;
    }

    .balance-sheet-page .bp-table th,
    .balance-sheet-page .bp-table td {
        padding: 8px 12px;
    }
}

/* Cash Flow (#308,#322-#324) */
/* =========================================
   CASH FLOW STATEMENT
   BALANCED CASH IN / CASH OUT DESIGN
========================================= */

.bp-cashflow-page {
    width: 100%;
    min-width: 0;
}

.bp-cashflow-table {
    width: 100%;
    table-layout: fixed;
    border-collapse: collapse;
    margin-bottom: 0;
}

.bp-cashflow-table th,
.bp-cashflow-table td {
    vertical-align: middle;
    overflow-wrap: anywhere;
    box-sizing: border-box;
}

/* =========================================
   EQUAL COLUMN WIDTHS
   CASH IN  = 50%
   CASH OUT = 50%

   Each side:
   Description = 35%
   Amount      = 15%
========================================= */

.bp-cashflow-table th:nth-child(1),
.bp-cashflow-table td:nth-child(1) {
    width: 35%;
}

.bp-cashflow-table th:nth-child(2),
.bp-cashflow-table td:nth-child(2) {
    width: 15%;
}

.bp-cashflow-table th:nth-child(3),
.bp-cashflow-table td:nth-child(3) {
    width: 35%;
}

.bp-cashflow-table th:nth-child(4),
.bp-cashflow-table td:nth-child(4) {
    width: 15%;
}

/* Main Cash In / Cash Out group headers */
.bp-cashflow-table thead tr:first-child th {
    width: 50%;
    padding: 14px 18px;
    text-align: center;
    vertical-align: middle;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    box-sizing: border-box;
}

.bp-cashflow-table thead .bp-cf-header-in {
    background: var(--bp-success-bg);
    color: var(--bp-success-ink);
    border-bottom: 1px solid var(--bp-success-bg);
}

.bp-cashflow-table thead .bp-cf-header-out {
    background: var(--bp-danger-bg);
    color: var(--bp-danger-ink);
    border-bottom: 1px solid var(--bp-danger-bg);
}

/* Column headings */
.bp-cashflow-table thead tr:nth-child(2) th {
    padding: 14px 16px;
    background: var(--bp-row-hover);
    color: var(--bp-text-2);
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    border-bottom: 1px solid var(--bp-border);
}

/* Amount headings and cells */
.bp-cashflow-table .bp-col-amount,
.bp-cashflow-table .bp-cf-amount {
    text-align: right;
    white-space: nowrap;
    padding-right: 24px;
    font-variant-numeric: tabular-nums;
}

/* Transaction rows */
.bp-cashflow-table tbody td {
    padding: 13px 18px;
    border-bottom: 1px solid var(--bp-border-soft);
}

.bp-cashflow-table tbody td:nth-child(1),
.bp-cashflow-table tbody td:nth-child(3) {
    color: var(--bp-text-2);
    font-weight: 500;
}

.bp-cashflow-table tbody td:nth-child(2),
.bp-cashflow-table tbody td:nth-child(4) {
    text-align: right;
    padding-right: 24px;
    white-space: nowrap;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
}

.bp-cashflow-table .bp-cf-icon {
    margin-right: 7px;
    font-size: 12px;
}

/* =========================================
   TOTAL CASH IN / TOTAL CASH OUT
========================================= */

.bp-cashflow-table .bp-cf-total-row td {
    padding: 17px 22px;
    background: var(--bp-row-hover);
    border-top: 2px solid var(--bp-border);
    border-bottom: 1px solid var(--bp-border);
}

.bp-cashflow-table .bp-cf-total-label {
    font-weight: 700;
    color: var(--bp-text-2);
    text-align: left;
}

.bp-cashflow-table .bp-cf-total-amount {
    text-align: right;
    padding-right: 24px;
    white-space: nowrap;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
}

/* =========================================
   OPENING BALANCE / NET CASH FLOW
========================================= */

.bp-cashflow-table .bp-cf-summary-row td {
    padding: 16px 24px;
    background: var(--bp-surface);
    border-bottom: 1px solid var(--bp-border-soft);
}

.bp-cashflow-table .bp-cf-summary-label {
    text-align: right;
    padding-right: 30px;
    font-weight: 600;
    color: var(--bp-text-2);
}

.bp-cashflow-table .bp-cf-summary-amount {
    text-align: right;
    padding-right: 24px;
    white-space: nowrap;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}

.bp-cashflow-table .bp-cf-summary-note {
    display: block;
    margin-top: 5px;
    color: var(--bp-muted);
    font-size: 11px;
    font-weight: 400;
}

/* =========================================
   CLOSING BALANCE
========================================= */

.bp-cashflow-table .bp-cf-closing-row td {
    padding: 20px 24px;
    background: var(--bp-primary-50);
    border-top: 2px solid var(--bp-primary-100);
    border-bottom: 0;
}

.bp-cashflow-table .bp-cf-closing-row .bp-cf-summary-label {
    color: var(--bp-text);
    font-size: 14px;
    font-weight: 800;
}

.bp-cashflow-table .bp-cf-closing-row .bp-cf-summary-amount {
    font-size: 16px;
    font-weight: 800;
    padding-right: 24px;
}

/* Empty state */
.bp-cashflow-table tbody tr td[colspan="4"] {
    text-align: center;
}

/* =========================================
   SUMMARY CARDS
========================================= */

.bp-cashflow-page .bp-stat-card {
    height: 100%;
    min-height: 110px;
}

.bp-cashflow-page .bp-stat-value {
    overflow-wrap: anywhere;
    font-variant-numeric: tabular-nums;
}

/* =========================================
   TABLET / MOBILE
========================================= */

@media (max-width: 767.98px) {
    .bp-cashflow-table {
        min-width: 760px;
    }

    .bp-cashflow-table thead th,
    .bp-cashflow-table tbody td {
        padding: 12px 14px;
    }

    .bp-cashflow-table .bp-cf-total-row td,
    .bp-cashflow-table .bp-cf-summary-row td,
    .bp-cashflow-table .bp-cf-closing-row td {
        padding: 14px 16px;
    }

    .bp-cashflow-table .bp-cf-summary-label {
        padding-right: 18px;
    }

    .bp-cashflow-table .bp-cf-summary-amount,
    .bp-cashflow-table .bp-cf-total-amount,
    .bp-cashflow-table tbody td:nth-child(2),
    .bp-cashflow-table tbody td:nth-child(4) {
        padding-right: 18px;
    }
}

/* =========================================
   PRINT
========================================= */

@media print {
    .bp-cashflow-table {
        width: 100%;
        table-layout: fixed;
    }

    .bp-cashflow-table th,
    .bp-cashflow-table td {
        print-color-adjust: exact;
        -webkit-print-color-adjust: exact;
    }

    .bp-cashflow-table .bp-cf-total-row td,
    .bp-cashflow-table .bp-cf-closing-row td {
        print-color-adjust: exact;
        -webkit-print-color-adjust: exact;
    }
}

/* Credit Note create (#330) */
/* Credit Note Totals - Professional Styling */
#itemsTable tfoot .bp-table-totals-row td {
    padding: 11px 16px;
    font-size: 13px;
    font-weight: 400 !important;
    color: var(--bp-text-2);
    background: var(--bp-surface);
    border-top: 1px solid var(--bp-border-soft);
    vertical-align: middle;
}

#itemsTable tfoot .bp-table-totals-row td:first-child {
    color: var(--bp-muted);
    font-weight: 500 !important;
    letter-spacing: 0.1px;
}

#itemsTable tfoot .bp-table-totals-row td:nth-child(2) {
    color: var(--bp-text-2);
    font-weight: 500 !important;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

/* Subtotal */
#itemsTable tfoot .subtotal-row td {
    border-top: 1px solid var(--bp-border-soft);
}

/* Total Tax */
#itemsTable tfoot .tax-total-row td {
    border-top: 1px solid var(--bp-border-soft);
}

/* Grand Total - subtle emphasis */
#itemsTable tfoot .grand-total-row td {
    background: var(--bp-row-hover);
    border-top: 1px solid var(--bp-border);
    border-bottom: 1px solid var(--bp-border-soft);
    color: var(--bp-text);
    font-weight: 600 !important;
    font-size: 13.5px;
}

#itemsTable tfoot .grand-total-row td:first-child {
    color: var(--bp-text-2);
    font-weight: 600 !important;
}

#itemsTable tfoot .grand-total-row td:nth-child(2) {
    color: var(--bp-text);
    font-weight: 600 !important;
    font-size: 14px;
}

/* Individual line totals */
#itemsTable .line-total {
    color: var(--bp-text-2);
    font-size: 13px;
    font-weight: 500 !important;
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}

#itemsTable .row-number {
    font-weight: 500 !important;
    color: var(--bp-muted);
}

/* Totals table alignment */
#itemsTable tfoot td.text-end {
    text-align: right;
}

@media (max-width: 767px) {
    #itemsTable tfoot .bp-table-totals-row td {
        padding: 10px 12px;
        font-size: 12px;
    }

    #itemsTable tfoot .grand-total-row td:nth-child(2) {
        font-size: 13px;
    }
}

/* Credit Notes list (#326) */
.credit-notes-page {
    --cn-text: var(--bp-text);
    --cn-muted: var(--bp-muted);
    --cn-border: var(--bp-border);
    --cn-input-border: var(--bp-border);
    --cn-surface: var(--bp-surface);
    --cn-focus: var(--bp-primary);
}

/* Statistics */
.credit-notes-page .cn-stats-row {
    row-gap: 16px;
}

.credit-notes-page .bp-stat-card {
    height: 100%;
}

/* Filter card */
.credit-notes-page .cn-filter-card {
    border: 1px solid var(--cn-border);
    border-radius: 12px;
    background: var(--cn-surface);
    overflow: visible;
}

.credit-notes-page .cn-filter-card .bp-card-body {
    padding: 22px 24px;
}

.credit-notes-page .cn-filter-grid {
    row-gap: 18px;
}

.credit-notes-page .cn-filter-field {
    min-width: 0;
}

.credit-notes-page .cn-filter-label {
    display: block;
    margin-bottom: 8px;
    color: var(--cn-text);
    font-size: 13px;
    font-weight: 600;
    line-height: 1.4;
}

.credit-notes-page .cn-filter-control {
    display: block;
    width: 100%;
    min-width: 0;
    height: 44px;
    padding: 10px 12px;
    border: 1px solid var(--cn-input-border);
    border-radius: 8px;
    background-color: var(--bp-surface);
    color: var(--cn-text);
    font-family: inherit;
    font-size: 13px;
    font-weight: 400;
    line-height: 1.4;
    box-shadow: none;
    transition: border-color .2s ease, box-shadow .2s ease;
}

.credit-notes-page .cn-filter-control:hover {
    border-color: var(--bp-muted);
}

.credit-notes-page .cn-filter-control:focus {
    border-color: var(--cn-focus);
    outline: none;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, .12);
}

.credit-notes-page .cn-filter-control::placeholder {
    color: var(--bp-muted);
    opacity: 1;
}

/* Search input */
.credit-notes-page .cn-search-wrap {
    position: relative;
}

.credit-notes-page .cn-search-wrap > i {
    position: absolute;
    top: 50%;
    left: 14px;
    z-index: 2;
    color: var(--cn-muted);
    font-size: 14px;
    transform: translateY(-50%);
    pointer-events: none;
}

.credit-notes-page .cn-search-wrap .cn-filter-control {
    padding-left: 39px;
}

/* Filter buttons */
.credit-notes-page .cn-filter-actions {
    display: flex;
    align-items: flex-end;
    gap: 10px;
    height: 100%;
}

.credit-notes-page .cn-filter-actions .bp-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-width: 0;
    min-height: 44px;
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    line-height: 1.4;
    white-space: nowrap;
    transition: background-color .2s ease, border-color .2s ease;
}

.credit-notes-page .cn-apply-btn {
    flex: 1 1 auto;
}

.credit-notes-page .cn-reset-btn {
    flex: 0 0 auto;
    text-decoration: none;
}

.credit-notes-page .cn-filter-actions .bp-btn:focus-visible {
    outline: 3px solid rgba(99, 102, 241, .2);
    outline-offset: 2px;
}

/* Table */
.credit-notes-page .cn-table-card {
    overflow: visible;
    border-radius: 12px;
}

.credit-notes-page .cn-table-card .bp-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 18px 22px;
}

.credit-notes-page .cn-number-link {
    color: var(--cn-text);
    font-weight: 600;
    text-decoration: none;
}

.credit-notes-page .cn-number-link:hover {
    color: var(--cn-focus);
}

.credit-notes-page .cn-amount {
    padding-right: 18px !important;
    color: var(--cn-text);
    font-size: 13px;
    font-weight: 500 !important;
}

.credit-notes-page .cn-status-cell,
.credit-notes-page .cn-actions-cell {
    text-align: center;
    white-space: nowrap;
}

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

.credit-notes-page .cn-bulk-actions {
    border-top: 1px solid var(--cn-border);
    border-bottom: 1px solid var(--cn-border);
    background: var(--bp-row-hover);
}

.credit-notes-page .cn-bulk-actions[hidden] {
    display: none !important;
}

.credit-notes-page .cn-bulk-count {
    color: var(--cn-text);
    font-size: 13px;
    font-weight: 500;
}

@media (max-width: 1199.98px) {
    .credit-notes-page .cn-filter-actions .bp-btn {
        flex: 1 1 0;
    }
}

@media (max-width: 767.98px) {
    .credit-notes-page .cn-filter-card .bp-card-body {
        padding: 18px 16px;
    }

    .credit-notes-page .cn-filter-grid {
        row-gap: 16px;
    }

    .credit-notes-page .cn-filter-actions {
        margin-top: 2px;
    }

    .credit-notes-page .cn-filter-actions .bp-btn {
        flex: 1 1 0;
    }

    .credit-notes-page .cn-table-card .bp-card-header {
        padding: 16px;
        flex-wrap: wrap;
    }
}

@media (prefers-reduced-motion: reduce) {
    .credit-notes-page .cn-filter-control,
    .credit-notes-page .cn-filter-actions .bp-btn {
        transition: none;
    }
}

/* Credit Note show (#325) */
/* Credit Note Details - Professional Totals Styling */
.credit-note-page {
    --cn-text: var(--bp-text-2);
    --cn-muted: var(--bp-muted);
    --cn-border: var(--bp-border);
    --cn-total-bg: var(--bp-row-hover);
}

.credit-note-page .bp-table {
    margin-bottom: 0;
}

.credit-note-page .bp-table th {
    font-weight: 600;
}

.credit-note-page .bp-table td,
.credit-note-page .bp-table th {
    vertical-align: middle;
}

/* Keep totals readable without excessive boldness */
.credit-note-page .bp-table-totals-row td {
    padding-top: 12px;
    padding-bottom: 12px;
    font-weight: 500 !important;
    color: var(--cn-text);
    border-top: 1px solid var(--cn-border);
}

/* Consistent right-side spacing for final amount column */
.credit-note-page .bp-table thead th:last-child,
.credit-note-page .bp-table tbody td:last-child,
.credit-note-page .bp-table tfoot td:last-child {
    padding-right: 24px !important;
    text-align: right;
    white-space: nowrap;
}

/* Items totals: slightly emphasize only the grand total */
.credit-note-page .items-table tfoot tr:last-child td {
    background: var(--cn-total-bg);
    border-top: 1px solid var(--bp-border);
    font-weight: 600 !important;
}

.credit-note-page .items-table tfoot td:first-child,
.credit-note-page .journal-table tfoot td:first-child {
    padding-right: 20px !important;
    color: var(--cn-text);
}

/* Journal Entry: both amount columns have balanced spacing */
.credit-note-page .journal-table thead th:nth-last-child(-n+2),
.credit-note-page .journal-table tbody td:nth-last-child(-n+2),
.credit-note-page .journal-table tfoot td:nth-last-child(-n+2) {
    padding-left: 14px !important;
    padding-right: 24px !important;
    text-align: right;
    white-space: nowrap;
}

.credit-note-page .journal-table tfoot td {
    background: var(--cn-total-bg);
    border-top: 1px solid var(--bp-border);
    font-weight: 500 !important;
}

.credit-note-page .journal-table tfoot td:first-child {
    font-weight: 600 !important;
}

/* Amount typography */
.credit-note-page .bp-table-totals-row .fw-700,
.credit-note-page .bp-table-totals-row .fw-800 {
    font-weight: inherit !important;
}

.credit-note-page .bp-stat-value {
    font-weight: 600;
}

.credit-note-page .bp-info-value {
    overflow-wrap: anywhere;
}

@media (max-width: 767.98px) {
    .credit-note-page .bp-table {
        min-width: 760px;
    }

    .credit-note-page .journal-table {
        min-width: 900px;
    }

    .credit-note-page .bp-table thead th:last-child,
    .credit-note-page .bp-table tbody td:last-child,
    .credit-note-page .bp-table tfoot td:last-child,
    .credit-note-page .journal-table thead th:nth-last-child(-n+2),
    .credit-note-page .journal-table tbody td:nth-last-child(-n+2),
    .credit-note-page .journal-table tfoot td:nth-last-child(-n+2) {
        padding-right: 24px !important;
    }
}

/* Debit Note create (#328) */
/* Professional Items Totals */
#dnItemsTable tfoot .bp-table-totals-row td {
    padding: 12px 28px 12px 12px;
    font-size: 13px;
    font-weight: 400 !important;
    color: var(--bp-text-2);
    background: var(--bp-surface);
    border-top: 1px solid var(--bp-border-soft);
    vertical-align: middle;
}

/* Totals labels */
#dnItemsTable tfoot .bp-table-totals-row td:first-child {
    color: var(--bp-muted);
    font-weight: 400 !important;
    letter-spacing: 0;
}

/* Totals amounts */
#dnItemsTable tfoot .bp-table-totals-row td:nth-child(2) {
    color: var(--bp-text-2);
    font-weight: 500 !important;
    font-size: 13px;
    text-align: right;
    padding-right: 28px !important;
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}

/* Subtotal */
#dnItemsTable tfoot .dn-subtotal-row td {
    background: var(--bp-surface);
}

/* Total Tax */
#dnItemsTable tfoot .dn-tax-row td {
    background: var(--bp-surface);
    border-top: 1px solid var(--bp-border-soft);
}

/* Grand Total: subtle emphasis */
#dnItemsTable tfoot .dn-grand-total-row td {
    background: var(--bp-row-hover);
    border-top: 1px solid var(--bp-border);
    border-bottom: 1px solid var(--bp-border-soft);
    color: var(--bp-text-2);
    font-weight: 500 !important;
}

#dnItemsTable tfoot .dn-grand-total-row td:first-child {
    color: var(--bp-text-2);
    font-weight: 500 !important;
}

#dnItemsTable tfoot .dn-grand-total-row td:nth-child(2) {
    color: var(--bp-text);
    font-size: 13.5px;
    font-weight: 600 !important;
    padding-right: 28px !important;
}

/* Individual line totals */
#dnItemsTable .dn-line-total {
    color: var(--bp-text-2);
    font-size: 13px;
    font-weight: 400 !important;
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}

#dnItemsTable .dn-row-number {
    color: var(--bp-muted);
    font-weight: 400 !important;
}

@media (max-width: 767px) {
    #dnItemsTable tfoot .bp-table-totals-row td {
        padding: 10px 16px 10px 8px;
        font-size: 12px;
    }

    #dnItemsTable tfoot .bp-table-totals-row td:nth-child(2),
    #dnItemsTable tfoot .dn-grand-total-row td:nth-child(2) {
        padding-right: 20px !important;
        font-size: 12px;
    }
}

/* Debit Notes list (#327) */
.debit-notes-page {
    --dn-text: var(--bp-text);
    --dn-muted: var(--bp-muted);
    --dn-border: var(--bp-border);
    --dn-input-border: var(--bp-border);
    --dn-surface: var(--bp-surface);
    --dn-focus: var(--bp-primary);
}

.debit-notes-page .dn-stats-row {
    row-gap: 16px;
}

.debit-notes-page .bp-stat-card {
    height: 100%;
}

/* Filter Card */
.debit-notes-page .dn-filter-card {
    border: 1px solid var(--dn-border);
    border-radius: 12px;
    background: var(--dn-surface);
    overflow: visible;
}

.debit-notes-page .dn-filter-card .bp-card-body {
    padding: 22px 24px;
}

.debit-notes-page .dn-filter-grid {
    row-gap: 18px;
}

.debit-notes-page .dn-filter-field {
    min-width: 0;
}

.debit-notes-page .dn-filter-label {
    display: block;
    margin-bottom: 8px;
    color: var(--dn-text);
    font-size: 13px;
    font-weight: 600;
    line-height: 1.4;
}

.debit-notes-page .dn-filter-control {
    display: block;
    width: 100%;
    min-width: 0;
    height: 44px;
    padding: 10px 12px;
    border: 1px solid var(--dn-input-border);
    border-radius: 8px;
    background-color: var(--bp-surface);
    color: var(--dn-text);
    font-family: inherit;
    font-size: 13px;
    font-weight: 400;
    line-height: 1.4;
    box-shadow: none;
    transition:
        border-color .2s ease,
        box-shadow .2s ease;
}

.debit-notes-page .dn-filter-control:hover {
    border-color: var(--bp-muted);
}

.debit-notes-page .dn-filter-control:focus {
    border-color: var(--dn-focus);
    outline: none;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, .12);
}

.debit-notes-page .dn-filter-control::placeholder {
    color: var(--bp-muted);
    opacity: 1;
}

.debit-notes-page .dn-search-wrap {
    position: relative;
}

.debit-notes-page .dn-search-wrap > i {
    position: absolute;
    top: 50%;
    left: 14px;
    z-index: 2;
    color: var(--dn-muted);
    font-size: 14px;
    transform: translateY(-50%);
    pointer-events: none;
}

.debit-notes-page .dn-search-wrap .dn-filter-control {
    padding-left: 39px;
}

.debit-notes-page .dn-filter-actions {
    display: flex;
    align-items: flex-end;
    gap: 10px;
    height: 100%;
}

.debit-notes-page .dn-filter-actions .bp-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-width: 0;
    min-height: 44px;
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    line-height: 1.4;
    white-space: nowrap;
    transition:
        background-color .2s ease,
        border-color .2s ease,
        box-shadow .2s ease;
}

.debit-notes-page .dn-apply-btn {
    flex: 1 1 auto;
}

.debit-notes-page .dn-reset-btn {
    flex: 0 0 auto;
    text-decoration: none;
}

.debit-notes-page .dn-filter-actions .bp-btn:focus-visible {
    outline: 3px solid rgba(99, 102, 241, .2);
    outline-offset: 2px;
}

/* Table refinements */
.debit-notes-page .dn-number-link {
    color: var(--dn-text);
    font-weight: 600;
    text-decoration: none;
}

.debit-notes-page .dn-number-link:hover {
    color: var(--dn-focus);
}

.debit-notes-page .dn-amount {
    padding-right: 18px !important;
    color: var(--dn-text);
    font-size: 13px;
    font-weight: 500 !important;
    white-space: nowrap;
}

.debit-notes-page .dn-supplier-name {
    color: var(--dn-text);
    font-weight: 500;
}

.debit-notes-page .dn-supplier-phone {
    margin-top: 3px;
    color: var(--dn-muted);
    font-size: 12px;
}

.debit-notes-page .dn-status-cell {
    text-align: center;
    white-space: nowrap;
}

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

@media (max-width: 1199.98px) {
    .debit-notes-page .dn-filter-actions .bp-btn {
        flex: 1 1 0;
    }
}

@media (max-width: 767.98px) {
    .debit-notes-page .dn-filter-card .bp-card-body {
        padding: 18px 16px;
    }

    .debit-notes-page .dn-filter-grid {
        row-gap: 16px;
    }

    .debit-notes-page .dn-filter-actions {
        margin-top: 2px;
    }

    .debit-notes-page .dn-filter-actions .bp-btn {
        flex: 1 1 0;
    }
}

@media (prefers-reduced-motion: reduce) {
    .debit-notes-page .dn-filter-control,
    .debit-notes-page .dn-filter-actions .bp-btn {
        transition: none;
    }
}

/* Debit Note show (#329) */
/* Professional totals styling - scoped to this debit note page */
.debit-note-page .bp-totals-table tfoot td,
.debit-note-page .bp-journal-table tfoot td {
    padding: 12px 24px 12px 14px;
    font-weight: 500;
    font-size: 13px;
    line-height: 1.5;
    vertical-align: middle;
    white-space: nowrap;
}

.debit-note-page .bp-totals-table tfoot tr + tr td,
.debit-note-page .bp-journal-table tfoot tr td {
    border-top: 1px solid var(--bp-border);
}

.debit-note-page .bp-totals-table tfoot .totals-label,
.debit-note-page .bp-journal-table tfoot .totals-label {
    color: var(--bp-muted);
    font-weight: 500;
}

.debit-note-page .bp-totals-table tfoot .totals-amount,
.debit-note-page .bp-journal-table tfoot .totals-amount {
    color: var(--bp-text-2);
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    padding-right: 28px;
}

.debit-note-page .bp-totals-table tfoot .grand-total-row td {
    background: var(--bp-row-hover);
    color: var(--bp-text);
    font-weight: 600;
    border-top: 1px solid var(--bp-border);
}

.debit-note-page .bp-totals-table tfoot .grand-total-row .totals-amount {
    font-size: 14px;
    color: var(--bp-text);
    padding-right: 28px;
}

.debit-note-page .bp-totals-table,
.debit-note-page .bp-journal-table {
    margin-bottom: 0;
}

@media (max-width: 767.98px) {
    .debit-note-page .bp-totals-table tfoot td,
    .debit-note-page .bp-journal-table tfoot td {
        padding: 10px 16px 10px 10px;
    }

    .debit-note-page .bp-totals-table tfoot .totals-amount,
    .debit-note-page .bp-journal-table tfoot .totals-amount,
    .debit-note-page .bp-totals-table tfoot .grand-total-row .totals-amount {
        padding-right: 18px;
    }
}

/* General Ledger (#302,#313,#314) */
/* ==========================================
   General Ledger Summary Cards
=========================================== */

.gl-summary-cards {
    align-items: stretch;
}

.gl-summary-cards > div {
    display: flex;
    min-width: 0;
}

.gl-summary-cards .gl-stat-card {
    display: flex;
    align-items: center;
    gap: 14px;
    width: 100%;
    min-width: 0;
    min-height: 112px;
    height: 100%;
    padding: 20px;
    box-sizing: border-box;
    overflow: hidden;
}

/* Consistent icon size and alignment */
.gl-summary-cards .bp-stat-icon {
    flex: 0 0 46px;
    width: 46px;
    height: 46px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0;
}

/* Content uses the available width */
.gl-summary-cards .bp-stat-content {
    flex: 1 1 auto;
    width: 0;
    min-width: 0;
}

/* Summary labels */
.gl-summary-cards .bp-stat-label {
    display: block;
    margin: 0 0 8px;
    font-size: 13px;
    line-height: 1.4;
    font-weight: 600;
    color: var(--bp-muted);
}

/* Default numeric values */
.gl-summary-cards .bp-stat-value {
    display: block;
    min-width: 0;
    margin: 0;
    font-size: 20px;
    line-height: 1.45;
    font-weight: 700;
    overflow-wrap: anywhere;
    font-variant-numeric: tabular-nums;
}

/* Account code and name */
.gl-summary-cards .gl-account-value {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    column-gap: 5px;
    row-gap: 2px;
    font-size: 15px;
    line-height: 1.6;
    font-weight: 600;
    overflow-wrap: anywhere;
    word-break: normal;
}

.gl-summary-cards .gl-account-code {
    flex: 0 1 auto;
    min-width: 0;
    font-weight: 800;
    overflow-wrap: anywhere;
}

.gl-summary-cards .gl-account-separator {
    flex: 0 0 auto;
    color: var(--bp-muted);
    font-weight: 500;
}

.gl-summary-cards .gl-account-name {
    flex: 1 1 100%;
    min-width: 0;
    font-weight: 600;
    overflow-wrap: anywhere;
    word-break: normal;
}

/* Amounts */
.gl-summary-cards .gl-amount-value {
    overflow-wrap: anywhere;
    word-break: normal;
}

/* ==========================================
   General Ledger Table
=========================================== */

.bp-table-wrapper {
    width: 100%;
    overflow-x: auto;
}

.bp-table {
    width: 100%;
}

.bp-table th,
.bp-table td {
    vertical-align: middle;
}

/* ==========================================
   Responsive Layout
=========================================== */

@media (max-width: 1199.98px) {
    .gl-summary-cards .gl-stat-card {
        min-height: 108px;
        padding: 18px;
    }
}

@media (max-width: 767.98px) {
    .gl-summary-cards .gl-stat-card {
        min-height: 100px;
        padding: 16px;
        gap: 12px;
    }

    .gl-summary-cards .bp-stat-value {
        font-size: 18px;
    }

    .gl-summary-cards .gl-account-value {
        font-size: 14px;
    }
}

@media (max-width: 575.98px) {
    .gl-summary-cards .gl-stat-card {
        min-height: 92px;
        padding: 14px;
        gap: 10px;
    }

    .gl-summary-cards .bp-stat-icon {
        flex-basis: 40px;
        width: 40px;
        height: 40px;
    }

    .gl-summary-cards .bp-stat-label {
        font-size: 12px;
    }

    .gl-summary-cards .bp-stat-value {
        font-size: 17px;
    }

    .gl-summary-cards .gl-account-value {
        font-size: 13px;
    }
}

/* ==========================================
   Print Layout
=========================================== */

@media print {
    .no-print,
    #btnPrint,
    .bp-sidebar,
    .sidebar,
    .bp-header,
    .bp-navbar,
    nav,
    .breadcrumb,
    .bp-card-footer {
        display: none !important;
    }

    body {
        background: white !important;
    }

    .bp-card,
    .bp-stat-card {
        box-shadow: none !important;
        border: 1px solid silver !important;
    }

    .gl-summary-cards {
        display: flex !important;
        flex-wrap: nowrap !important;
        gap: 8px !important;
    }

    .gl-summary-cards > div {
        display: flex !important;
        flex: 1 1 0 !important;
        width: 25% !important;
        min-width: 0 !important;
    }

    .gl-summary-cards .gl-stat-card {
        min-height: 85px !important;
        height: 100% !important;
        padding: 10px !important;
        gap: 8px !important;
    }

    .gl-summary-cards .bp-stat-icon {
        display: none !important;
    }

    .gl-summary-cards .bp-stat-label {
        font-size: 10px !important;
    }

    .gl-summary-cards .bp-stat-value {
        font-size: 12px !important;
    }

    .gl-summary-cards .gl-account-value {
        font-size: 10px !important;
    }

    .bp-table-wrapper {
        overflow: visible !important;
    }

    .bp-table {
        width: 100% !important;
        font-size: 10px !important;
    }

    .bp-table th,
    .bp-table td {
        padding: 5px !important;
    }

    a {
        color: black !important;
        text-decoration: none !important;
    }
}

/* Journal Entry create (#300,#301) */
#journalEntryForm .bp-card {
    border-radius: 10px;
    border: 1px solid var(--bp-border);
    overflow: visible;
}

#journalEntryForm .bp-card-header {
    padding: 16px 20px;
    border-bottom: 1px solid var(--bp-border-soft);
}

#journalEntryForm .bp-card-title {
    margin: 0;
    font-size: 16px;
    font-weight: 700;
    color: var(--bp-text);
}

#journalEntryForm .bp-card-body {
    padding: 20px;
}

#journalEntryForm .bp-form-label {
    display: block;
    margin-bottom: 7px;
    font-size: 13px;
    font-weight: 600;
    color: var(--bp-text-2);
}

#journalEntryForm .bp-form-control,
#journalEntryForm .bp-form-select {
    min-height: 40px;
    border-radius: 6px;
    box-sizing: border-box;
}

/* Account dropdown & Select2 Proper Fix */
#journalEntryForm .journal-account-cell {
    width: 30%;
    min-width: 240px;
}

.select2-container {
    width: 100% !important;
    display: block;
}

.select2-container--default .select2-selection--single {
    height: 40px !important;
    border: 1px solid var(--bp-border) !important;
    border-radius: 6px !important;
    background-color: var(--bp-surface) !important;
    outline: none !important;
}

.select2-container--default .select2-selection--single .select2-selection__rendered {
    color: var(--bp-text-2) !important;
    font-size: 13px !important;
    line-height: 38px !important;
    padding-left: 12px !important;
    padding-right: 30px !important;
}

.select2-container--default .select2-selection--single .select2-selection__arrow {
    height: 38px !important;
    right: 8px !important;
    top: 1px !important;
}

.select2-container--default .select2-selection--single .select2-selection__clear {
    margin-right: 15px !important;
    height: 38px !important;
    line-height: 38px !important;
}

/* Select2 Dropdown Popup & Text Color Fix */
.select2-dropdown {
    border: 1px solid var(--bp-border) !important;
    border-radius: 6px !important;
    background-color: var(--bp-surface) !important;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1) !important;
    z-index: 99999 !important;
}

.select2-search--dropdown .select2-search__field {
    border: 1px solid var(--bp-border) !important;
    border-radius: 4px !important;
    padding: 6px 10px !important;
    color: var(--bp-text-2) !important;
    font-size: 13px !important;
    outline: none !important;
}

.select2-container--default .select2-results__option {
    color: var(--bp-text-2) !important;
    font-size: 13px !important;
    background-color: var(--bp-surface) !important;
    padding: 8px 12px !important;
}

.select2-container--default .select2-results__option--highlighted[aria-selected] {
    background-color: var(--bp-primary-solid) !important;
    color: var(--bp-on-solid) !important;
}

.select2-container--default .select2-results__group {
    color: var(--bp-text) !important;
    font-weight: 700 !important;
    background-color: var(--bp-row-hover) !important;
    padding: 6px 12px !important;
}

/* Table */
#lineItemsTable {
    width: 100%;
    min-width: 1050px;
    margin-bottom: 0;
    border-collapse: separate;
    border-spacing: 0;
}

#lineItemsTable thead th {
    padding: 14px 12px;
    vertical-align: middle;
    white-space: nowrap;
    font-size: 12px;
    font-weight: 700;
    color: var(--bp-muted);
    background: var(--bp-row-hover);
}

#lineItemsTable tbody td {
    padding: 12px 10px;
    vertical-align: middle;
    background: var(--bp-surface);
}

#lineItemsTable tbody .bp-form-control {
    width: 100%;
    min-width: 100px;
}

#lineItemsTable .row-number {
    font-weight: 700;
    color: var(--bp-text-2);
}

#lineItemsTable .debit-input,
#lineItemsTable .credit-input {
    min-width: 115px;
    font-variant-numeric: tabular-nums;
}

#lineItemsTable .line-description-input {
    min-width: 180px;
}

#journalEntryForm .bp-table-wrapper {
    width: 100%;
    overflow-x: auto;
}

/* Totals */
#lineItemsTable tfoot .journal-totals-row td {
    padding: 17px 20px !important;
    font-size: 13px;
    white-space: nowrap;
    background: var(--bp-row-hover);
    border-top: 1px solid var(--bp-border);
}

#lineItemsTable tfoot .journal-total-amount {
    padding-right: 24px !important;
    font-variant-numeric: tabular-nums;
}

/* Balance difference */
#lineItemsTable tfoot .journal-difference-row td {
    padding: 22px 20px !important;
    vertical-align: middle;
    background: var(--bp-surface);
    border-top: 1px solid var(--bp-border);
    border-bottom: 1px solid var(--bp-border);
}

#lineItemsTable tfoot .journal-difference-label {
    padding-left: 25px !important;
    padding-right: 20px !important;
    font-size: 14px;
    font-weight: 700;
    color: var(--bp-text-2);
    white-space: nowrap;
}

.journal-difference-label i {
    color: var(--bp-muted);
}

#lineItemsTable tfoot .journal-difference-value {
    padding: 18px 24px !important;
    text-align: center;
}

.journal-difference-content {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 46px;
    box-sizing: border-box;
}

.journal-balance-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    max-width: 100%;
    padding: 9px 18px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.5;
    text-align: center;
    white-space: normal;
    overflow-wrap: anywhere;
}

.journal-balance-badge.is-balanced {
    color: var(--bp-success-ink);
    background: var(--bp-success-bg);
}

.journal-balance-badge.is-warning {
    color: var(--bp-warning-ink);
    background: var(--bp-warning-bg);
}

.journal-balance-badge.is-unbalanced {
    color: var(--bp-danger-ink);
    background: var(--bp-danger-bg);
}

/* Attachments */
#journalEntryForm input[type="file"] {
    padding: 8px 10px;
}

/* Actions */
.journal-form-actions {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.journal-form-actions .bp-btn {
    min-height: 40px;
    padding: 9px 16px;
}

#journalEntryForm #postBtn:disabled {
    opacity: .55;
    cursor: not-allowed;
}

@media (max-width: 991.98px) {
    #lineItemsTable tfoot .journal-difference-row td {
        padding: 18px 12px !important;
    }

    #lineItemsTable tfoot .journal-difference-label {
        padding-left: 12px !important;
        padding-right: 10px !important;
    }

    #lineItemsTable tfoot .journal-difference-value {
        padding: 14px 10px !important;
    }
}

@media (max-width: 767.98px) {
    #journalEntryForm .bp-card-header {
        padding: 14px 15px;
    }

    #journalEntryForm .bp-card-body {
        padding: 15px;
    }

    #lineItemsTable {
        min-width: 1050px;
    }

    #lineItemsTable tfoot .journal-totals-row td {
        padding: 14px 12px !important;
    }

    #lineItemsTable tfoot .journal-difference-row td {
        padding: 14px 8px !important;
    }

    #lineItemsTable tfoot .journal-difference-label {
        font-size: 12px;
        white-space: normal;
    }

    .journal-balance-badge {
        min-height: 36px;
        padding: 8px 10px;
        font-size: 12px;
    }

    .journal-form-actions {
        justify-content: stretch;
    }

    .journal-form-actions .bp-btn {
        flex: 1 1 auto;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .journal-form-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .journal-form-actions .bp-btn {
        width: 100%;
    }
}

/* Profit & Loss (#304,#318,#319) */
/* =========================================
   PROFIT & LOSS SUMMARY CARDS
========================================= */

.bp-pl-summary {
    align-items: stretch;
}

.bp-pl-summary > [class*="col-"] {
    display: flex;
    min-width: 0;
}

.bp-pl-summary .bp-pl-stat-card {
    display: flex;
    align-items: center;
    gap: 16px;

    width: 100%;
    height: 100%;
    min-height: 120px;

    padding: 22px 24px;
    margin: 0;

    box-sizing: border-box;
    overflow: hidden;

    border-radius: 12px;
}

/* Consistent icon sizing */
.bp-pl-summary .bp-stat-icon {
    flex: 0 0 48px;

    width: 48px;
    height: 48px;
    min-width: 48px;

    display: flex;
    align-items: center;
    justify-content: center;

    font-size: 21px;
    border-radius: 12px;
    box-sizing: border-box;
}

/* Equal content area */
.bp-pl-summary .bp-stat-content {
    flex: 1 1 auto;
    min-width: 0;
    width: 100%;
}

/* Consistent label alignment */
.bp-pl-summary .bp-stat-label {
    display: block;
    margin: 0 0 8px;

    font-size: 13px;
    font-weight: 600;
    line-height: 1.4;
}

/* Consistent amount styling */
.bp-pl-summary .bp-stat-value {
    display: block;
    margin: 0;

    font-size: clamp(16px, 1.35vw, 21px);
    font-weight: 700;
    line-height: 1.4;

    overflow-wrap: anywhere;
    word-break: normal;
    font-variant-numeric: tabular-nums;
}

/* Net profit margin */
.bp-pl-summary .bp-stat-change {
    margin-top: 5px;
    font-size: 12px;
    line-height: 1.4;
}

/* =========================================
   TABLE COLUMN SIZING
========================================= */

.pl-amount-column,
.pl-total-column {
    width: 180px;
    min-width: 150px;
    white-space: nowrap;
}

/* =========================================
   RESPONSIVE DESIGN
========================================= */

@media (max-width: 1199.98px) {
    .bp-pl-summary .bp-pl-stat-card {
        min-height: 120px;
        padding: 20px;
        gap: 14px;
    }

    .bp-pl-summary .bp-stat-value {
        font-size: 19px;
    }
}

@media (max-width: 767.98px) {
    .bp-pl-summary .bp-pl-stat-card {
        min-height: 112px;
        padding: 18px;
    }

    .bp-pl-summary .bp-stat-value {
        font-size: 18px;
    }
}

@media (max-width: 575.98px) {
    .bp-pl-summary .bp-pl-stat-card {
        min-height: 100px;
        padding: 16px;
        gap: 12px;
    }

    .bp-pl-summary .bp-stat-icon {
        flex-basis: 42px;
        width: 42px;
        height: 42px;
        min-width: 42px;
        font-size: 18px;
    }

    .bp-pl-summary .bp-stat-label {
        font-size: 12px;
        margin-bottom: 6px;
    }

    .bp-pl-summary .bp-stat-value {
        font-size: 17px;
    }
}

/* =========================================
   PRINT STYLING
========================================= */

@media print {
    #btnPrint,
    #btnExportPdf,
    #btnExportExcel,
    .bp-report-filters,
    .bp-pl-summary {
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }

    #btnPrint,
    .bp-report-filters {
        display: none !important;
    }

    .bp-pl-summary {
        display: grid !important;
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: 10px !important;
    }

    .bp-pl-summary > [class*="col-"] {
        width: 100% !important;
        max-width: 100% !important;
    }

    .bp-pl-summary .bp-pl-stat-card {
        min-height: 90px;
        padding: 10px;
        gap: 8px;
        box-shadow: none !important;
    }

    .bp-pl-summary .bp-stat-icon {
        flex-basis: 32px;
        width: 32px;
        height: 32px;
        min-width: 32px;
        font-size: 14px;
    }

    .bp-pl-summary .bp-stat-value {
        font-size: 12px;
    }

    .bp-card {
        box-shadow: none !important;
    }

    .bp-table {
        width: 100%;
    }
}

/* Payment Receipts (#331) */
/* Payment Receipts Filter Layout */
.receipt-filter-page .receipt-filter-grid {
    display: grid;
    grid-template-columns: minmax(180px, 1.4fr) minmax(155px, 1fr)
        minmax(145px, 1fr) minmax(145px, 1fr) auto;
    gap: 16px;
    align-items: end;
    width: 100%;
}

.receipt-filter-page .receipt-filter-field {
    min-width: 0;
    width: 100%;
}

.receipt-filter-page .receipt-filter-field label {
    display: block;
    margin-bottom: 8px;
    white-space: nowrap;
}

.receipt-filter-page .receipt-filter-field input,
.receipt-filter-page .receipt-filter-field select {
    width: 100%;
    min-width: 0;
    max-width: 100%;
    box-sizing: border-box;
}

.receipt-filter-page .receipt-search {
    display: flex;
    align-items: center;
    position: relative;
    width: 100%;
    min-width: 0;
}

.receipt-filter-page .receipt-search > i {
    position: absolute;
    left: 12px;
    z-index: 1;
    pointer-events: none;
}

.receipt-filter-page .receipt-search input {
    padding-left: 36px;
}

.receipt-filter-page .receipt-filter-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
}

.receipt-filter-page .receipt-filter-actions .bp-btn {
    min-width: 42px;
    justify-content: center;
}

.receipt-filter-page .receipt-table-container {
    width: 100%;
    overflow-x: auto;
}

@media (max-width: 1199.98px) {
    .receipt-filter-page .receipt-filter-grid {
        grid-template-columns: minmax(180px, 1.5fr) repeat(2, minmax(140px, 1fr));
    }

    .receipt-filter-page .receipt-filter-actions {
        grid-column: 1 / -1;
    }
}

@media (max-width: 767.98px) {
    .receipt-filter-page .receipt-filter-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 14px;
    }

    .receipt-filter-page .receipt-filter-field {
        min-width: 0;
    }

    .receipt-filter-page .receipt-filter-field:first-child {
        grid-column: 1 / -1;
    }

    .receipt-filter-page .receipt-filter-actions {
        grid-column: 1 / -1;
    }
}

@media (max-width: 420px) {
    .receipt-filter-page .receipt-filter-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .receipt-filter-page .receipt-filter-field:first-child,
    .receipt-filter-page .receipt-filter-actions {
        grid-column: auto;
    }
}

/* Trial Balance (#303,#315-#317) */
/* Trial Balance report styling */
.tb-report {
    border: 1px solid var(--bp-border);
    border-radius: 10px;
    overflow: hidden;
    background: var(--bp-surface);
}

.tb-report .bp-card-header {
    padding: 22px 26px;
    border-bottom: 1px solid var(--bp-border);
    background: var(--bp-surface);
}

.tb-report .bp-card-title {
    margin: 0;
    font-size: 19px;
    font-weight: 800;
    letter-spacing: -0.35px;
    color: var(--bp-text);
}

.tb-report-subtitle {
    margin-top: 7px;
    color: var(--bp-muted);
    font-size: 12px;
    font-weight: 500;
}

.tb-table-wrapper {
    width: 100%;
    overflow-x: auto;
}

.tb-table {
    width: 100%;
    min-width: 700px;
    margin: 0;
    border-collapse: separate;
    border-spacing: 0;
    font-size: 13px;
    color: var(--bp-text-2);
}

.tb-table thead th {
    padding: 15px 20px;
    background: var(--bp-row-hover);
    color: var(--bp-text-2);
    border-bottom: 1px solid var(--bp-border);
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.55px;
    white-space: nowrap;
}

.tb-table tbody td {
    padding: 15px 20px;
    border-bottom: 1px solid var(--bp-border-soft);
    vertical-align: middle;
    font-weight: 500;
}

.tb-table tbody tr:last-child td {
    border-bottom: 1px solid var(--bp-border);
}

.tb-table tbody tr:hover {
    background: var(--bp-row-hover);
}

.tb-table .tb-account-code {
    color: var(--bp-text-2);
    font-size: 12px;
    font-weight: 700;
    background: transparent;
}

.tb-table .tb-account-name {
    color: var(--bp-text);
    font-weight: 700;
}

.tb-table .tb-amount {
    text-align: right;
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
    padding-right: 30px;
    padding-left: 20px;
}

.tb-table .tb-amount-value {
    color: var(--bp-text);
    font-size: 13px;
    font-weight: 700;
}

.tb-table .tb-zero {
    color: var(--bp-muted);
    font-weight: 500;
}

.tb-table tfoot td {
    padding: 19px 20px;
    background: var(--bp-row-hover);
    border-top: 2px solid var(--bp-border);
    color: var(--bp-text);
    font-size: 13px;
    font-weight: 800;
}

.tb-table tfoot .tb-total-label {
    text-align: right;
    text-transform: uppercase;
    letter-spacing: 0.65px;
    font-size: 12px;
    padding-right: 24px;
}

.tb-table tfoot .tb-total-amount {
    text-align: right;
    white-space: nowrap;
    padding-right: 30px;
    padding-left: 20px;
    font-size: 14px;
    font-weight: 900;
    font-variant-numeric: tabular-nums;
    color: var(--bp-text);
}

.tb-report-footer {
    padding: 15px 26px;
    border-top: 1px solid var(--bp-border);
    background: var(--bp-surface);
    color: var(--bp-muted);
    font-size: 12px;
    font-weight: 600;
}

.tb-report .bp-badge {
    font-weight: 700;
    letter-spacing: 0.15px;
}

.tb-filter-card {
    border-radius: 10px;
}

@media (max-width: 767px) {
    .tb-report .bp-card-header {
        padding: 18px;
        align-items: flex-start !important;
        gap: 12px;
    }

    .tb-table thead th,
    .tb-table tbody td {
        padding: 13px 15px;
    }

    .tb-table .tb-amount,
    .tb-table tfoot .tb-total-amount {
        padding-right: 22px;
    }

    .tb-report-footer {
        padding: 14px 18px;
    }
}

@media print {
    @page {
        size: A4 landscape;
        margin: 12mm;
    }

    body {
        background: white !important;
        color: black !important;
        font-size: 11px;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }

    body * {
        visibility: hidden;
    }

    #tbPrintArea,
    #tbPrintArea * {
        visibility: visible;
    }

    #tbPrintArea {
        position: absolute;
        left: 0;
        top: 0;
        width: 100%;
        border: 1px solid silver !important;
        border-radius: 0 !important;
        box-shadow: none !important;
    }

    #tbPrintArea .bp-card-header {
        padding: 15px 18px;
    }

    #tbPrintArea .tb-table {
        min-width: 0;
        font-size: 10px;
    }

    #tbPrintArea .tb-table thead th,
    #tbPrintArea .tb-table tbody td {
        padding: 9px 12px;
    }

    #tbPrintArea .tb-table .tb-amount,
    #tbPrintArea .tb-table tfoot .tb-total-amount {
        padding-right: 20px;
    }

    #tbPrintArea .tb-report-footer {
        padding: 10px 18px;
    }

    .tb-no-print,
    .bp-sidebar,
    .bp-navbar,
    .bp-header,
    nav,
    aside {
        display: none !important;
    }

    .tb-table tbody tr {
        break-inside: avoid;
    }
}

/* Column width helpers (replace inline style="width:..." on <th>) */
.bp-w-40 { width: 40px; }
.bp-w-50 { width: 50px; }
.bp-w-60 { width: 60px; }
.bp-w-90 { width: 90px; }
.bp-w-120 { width: 120px; }
.bp-w-140 { width: 140px; }
.bp-w-160 { width: 160px; }
.bp-w-pct-15 { width: 15%; }
.bp-w-pct-20 { width: 20%; }
.bp-w-pct-22 { width: 22%; }
.bp-w-pct-30 { width: 30%; }
.bp-minw-180 { min-width: 180px; }
.bp-minw-240 { min-width: 240px; }
.bp-th-pad-end { padding-right: 30px; }

/* Balance sheet: keep currency symbol and amount on one line in narrow columns (#312, #320) */
.balance-sheet-page table td.text-end,
.balance-sheet-page table th.text-end {
    white-space: nowrap;
}

/* Counter page: inline void form of a cash float row (reason + button) */
.bp-float-void-form {
    display: flex;
    gap: 6px;
    align-items: center;
    min-width: 220px;
}
.bp-float-void-form .bp-form-control {
    flex: 1 1 auto;
    min-width: 110px;
}
.bp-float-void-form .bp-btn {
    flex: 0 0 auto;
}
[data-theme="dark"] .bp-float-void-form .bp-form-control {
    background: var(--bp-surface);
    border-color: var(--bp-border);
    color: var(--bp-text);
}

/* ── Quotation → Sale conversion step ── */
.bp-quotation-convert { max-width: 720px; }
.bp-quotation-convert-summary { color: var(--bp-text); margin-bottom: 16px; }
.bp-quotation-convert .bp-form-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 16px; }
.bp-quotation-convert .bp-form-row .bp-form-select { flex: 1 1 220px; max-width: 320px; }
.bp-quotation-convert-stock { margin-bottom: 16px; }
[data-theme="dark"] .bp-quotation-convert-summary { color: var(--bp-text); }

/* ── Links inside the invoice/return/quotation hero (white on the solid primary banner) ── */
.bp-invoice-hero a.bp-hero-link { color: #fff; text-decoration: underline; font-weight: 700; }
.bp-invoice-hero a.bp-hero-link:hover { opacity: 0.85; }
[data-theme="dark"] .bp-invoice-hero a.bp-hero-link { color: #fff; }

/* ── POS open register: read-only opening balance of the selected counter ── */
.bp-open-balance-value {
    padding: 10px 14px;
    border: 1px solid var(--bp-border);
    border-radius: 8px;
    background: var(--bp-bg);
    color: var(--bp-text);
    font-weight: 700;
    font-size: 18px;
}

/* ── Accounting: Income page notice ── */
.bp-notice {
    padding: 10px 14px;
    border: 1px solid var(--bp-border);
    border-radius: var(--bp-radius-md);
    background: var(--bp-warning-bg);
    color: var(--bp-warning-ink);
    font-size: 13px;
}
[data-theme="dark"] .bp-notice { border-color: var(--bp-border); }

/* ── POS: branch stock state on tiles, variant rows and restored cart lines ── */
.bp-pos-stock {
    display: inline-block;
    margin-top: 4px;
    padding: 1px 8px;
    border-radius: 999px;
    font-size: 10px;
    font-weight: 700;
    line-height: 1.5;
}
.bp-pos-stock-in { background: var(--bp-success-bg); color: var(--bp-success-ink); }
.bp-pos-stock-low { background: var(--bp-warning-bg); color: var(--bp-warning-ink); }
.bp-pos-stock-out { background: var(--bp-danger-bg); color: var(--bp-danger-ink); }
.bp-pos-item-oos { opacity: 0.6; cursor: not-allowed; }
.bp-variant-option-oos { opacity: 0.55; cursor: not-allowed; }
.bp-pos-cart-item-warn {
    margin-top: 4px;
    font-size: 11px;
    font-weight: 600;
    color: var(--bp-danger-ink);
}
[data-theme="dark"] .bp-pos-stock-in { background: var(--bp-success-bg); color: var(--bp-success-ink); }
[data-theme="dark"] .bp-pos-stock-low { background: var(--bp-warning-bg); color: var(--bp-warning-ink); }
[data-theme="dark"] .bp-pos-stock-out { background: var(--bp-danger-bg); color: var(--bp-danger-ink); }
[data-theme="dark"] .bp-pos-item-oos,
[data-theme="dark"] .bp-variant-option-oos { opacity: 0.5; }
[data-theme="dark"] .bp-pos-cart-item-warn { color: var(--bp-danger-ink); }
/* ==========================================
   SMS Campaign Footer Actions
========================================== */

.sms-campaign-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    flex-wrap: nowrap;
}

.sms-campaign-footer .sms-test-action {
    flex: 0 0 auto;
}

.sms-campaign-actions,
.email-campaign-action-buttons {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    min-width: 0;
    flex-wrap: wrap;
}

.sms-campaign-actions .bp-btn {
    margin: 0 !important;
    white-space: nowrap;
}

/* SMS Campaign Footer - Mobile */
@media (max-width: 767.98px) {
    .sms-campaign-footer {
        display: grid !important;
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
        align-items: center;
        gap: 8px;
        width: 100%;
    }

    .sms-campaign-footer .sms-test-action {
        width: 100%;
        min-width: 0;
    }

    .sms-campaign-footer .sms-test-action .bp-btn {
        width: 100%;
        min-height: 42px;
        display: flex;
        align-items: center;
        justify-content: center;
        white-space: normal;
        text-align: center;
        padding: 8px 5px;
        font-size: 12px;
        margin: 0 !important;
    }

    .sms-campaign-actions {
        display: flex !important;
        flex-direction: column;
        align-items: stretch;
        justify-content: center;
        gap: 7px;
        width: 100%;
        min-width: 0;
    }

    .sms-campaign-actions .bp-btn {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 100%;
        min-width: 0;
        min-height: 40px;
        padding: 8px 5px;
        margin: 0 !important;
        font-size: 12px;
        line-height: 1.3;
        white-space: normal;
        text-align: center;
    }

    .sms-campaign-actions .bp-btn i {
        flex-shrink: 0;
        margin-right: 5px !important;
    }
}


/* Extra Small Mobile Screens */
@media (max-width: 360px) {
    .sms-campaign-footer {
        grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
        gap: 6px;
    }

    .sms-campaign-footer .sms-test-action .bp-btn,
    .sms-campaign-actions .bp-btn {
        font-size: 11px;
        padding: 7px 3px;
    }
}

/* SMS Desktop Button Alignment */
@media (min-width: 768px) {
    .sms-campaign-footer .sms-test-action .bp-btn {
        min-height: 40px;
    }

    .sms-campaign-actions .bp-btn {
        min-height: 40px;
    }
}

/* ==========================================
   Email Campaign Footer Actions
========================================== */

.email-campaign-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.email-campaign-action-buttons {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    flex-wrap: wrap;
}

.email-test-btn,
.email-action-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
    min-height: 40px;
    margin: 0 !important;
}

/* Email Campaign Mobile Responsive */
@media (max-width: 767.98px) {
    .email-campaign-footer {
        display: flex !important;
        flex-direction: column;
        align-items: stretch !important;
        justify-content: flex-start !important;
        gap: 12px;
        padding: 15px;
    }

    .email-test-btn {
        width: 100%;
        min-height: 44px;
        box-sizing: border-box;
    }

    .email-campaign-action-buttons {
        display: flex !important;
        flex-direction: column;
        align-items: stretch;
        justify-content: flex-start;
        width: 100%;
        gap: 8px;
    }

    .email-action-btn {
        display: flex !important;
        align-items: center;
        justify-content: center;
        width: 100%;
        min-height: 44px;
        margin: 0 !important;
        white-space: nowrap;
        box-sizing: border-box;
    }
}

/* Email Small Mobile */
@media (max-width: 380px) {
    .email-campaign-footer {
        padding: 12px;
    }

    .email-action-btn,
    .email-test-btn {
        font-size: 13px;
        min-height: 42px;
    }
}

/* Meta Campaign Budget Alignment */
.meta-campaign-table .meta-budget-cell {
    white-space: nowrap !important;
    vertical-align: middle !important;
}

.meta-campaign-table .meta-budget-amount {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: flex-start;
    flex-wrap: nowrap !important;
    white-space: nowrap !important;
    gap: 3px;
    line-height: 1.4;
}

.meta-campaign-table .meta-budget-cell,
.meta-campaign-table .meta-budget-cell * {
    white-space: nowrap !important;
}

@media (max-width: 767.98px) {
    .meta-campaign-table .meta-budget-cell {
        min-width: 110px;
    }

    .meta-campaign-table .meta-budget-amount {
        display: inline-flex !important;
        flex-direction: row !important;
        align-items: center !important;
        white-space: nowrap !important;
    }
}

/* Flights Table - Mobile Responsive Layout */
@media (max-width: 767.98px) {

    #flightsTable {
        width: 100%;
        border-collapse: separate;
        border-spacing: 0;
    }

    #flightsTable thead {
        display: none;
    }

    #flightsTable tbody,
    #flightsTable tbody tr {
        display: block;
        width: 100%;
    }

    #flightsTable tbody tr {
        margin-bottom: 15px;
        padding: 12px;
        border: 1px solid #dee2e6;
        border-radius: 8px;
        background: #fff;
    }

    #flightsTable tbody tr td {
        display: flex;
        flex-direction: column;
        width: 100%;
        padding: 8px 0;
        border: none;
        text-align: left;
    }

    #flightsTable tbody tr td:nth-child(1)::before {
        content: "Start";
        display: block;
        font-weight: 600;
        margin-bottom: 6px;
    }

    #flightsTable tbody tr td:nth-child(2)::before {
        content: "End (optional)";
        display: block;
        font-weight: 600;
        margin-bottom: 6px;
    }

    #flightsTable tbody tr td:nth-child(3)::before {
        content: "Budget Amount";
        display: block;
        font-weight: 600;
        margin-bottom: 6px;
    }

    #flightsTable tbody tr td:nth-child(4) {
        display: flex;
        flex-direction: row;
        justify-content: flex-end;
        padding-top: 10px;
    }

    #flightsTable tbody tr td input,
    #flightsTable tbody tr td select {
        width: 100% !important;
        max-width: 100%;
        box-sizing: border-box;
    }

    #flightsTable tbody tr td input {
        min-height: 40px;
    }

    #addFlightBtn {
        width: 100%;
        justify-content: center;
    }
}


 /* ========================================
           Employee Form Footer - Desktop
        ======================================== */

        .employee-form-footer {
            display: flex;
            justify-content: space-between;
            align-items: center;
            gap: 12px;
            flex-wrap: wrap;
        }

        .employee-form-footer-actions {
            display: flex;
            align-items: center;
            justify-content: flex-end;
            gap: 10px;
            flex-wrap: wrap;
        }

        .employee-form-footer .bp-btn {
            white-space: nowrap;
        }

        /* ========================================
           Employee Form Footer - Mobile
        ======================================== */

        @media (max-width: 767.98px) {

            .employee-form-footer {
                display: flex !important;
                flex-direction: column !important;
                align-items: stretch !important;
                justify-content: flex-start !important;
                gap: 10px !important;
                width: 100%;
                padding: 12px !important;
                box-sizing: border-box;
            }

            .employee-form-footer > .bp-btn,
            .employee-form-footer-actions,
            .employee-form-footer-actions .bp-btn {
                width: 100% !important;
                max-width: 100% !important;
                min-width: 0 !important;
                box-sizing: border-box;
            }

            .employee-form-footer-actions {
                display: flex !important;
                flex-direction: column !important;
                align-items: stretch !important;
                justify-content: flex-start !important;
                gap: 10px !important;
                margin: 0 !important;
            }

            .employee-form-footer-actions .bp-btn {
                display: flex;
                align-items: center;
                justify-content: center;
                min-height: 42px;
                margin: 0 !important;
                white-space: normal;
            }

            .employee-form-footer > .bp-btn {
                display: flex;
                align-items: center;
                justify-content: center;
                min-height: 42px;
                margin: 0 !important;
                white-space: normal;
            }
        }


.mobile-field-label {
        display: none;
    }

    .attendance-table {
        width: 100%;
        min-width: 900px;
    }

    .attendance-table th,
    .attendance-table td {
        vertical-align: middle;
    }

    .attendance-status {
        min-width: 135px;
    }

    .attendance-note {
        min-width: 150px;
    }

    @media (max-width: 767.98px) {

        /* Bulk action buttons */
        .attendance-bulk-actions {
            flex-wrap: wrap;
        }

        .attendance-bulk-actions .bp-btn {
            flex: 1 1 140px;
            justify-content: center;
        }

        /* Remove horizontal table scrolling */
        .attendance-table-wrapper {
            overflow-x: visible !important;
            padding: 12px;
        }

        .attendance-table {
            display: block;
            width: 100%;
            min-width: 0 !important;
        }

        .attendance-table thead {
            display: none;
        }

        .attendance-table tbody {
            display: block;
            width: 100%;
        }

        /* Employee attendance card */
        .attendance-table tbody tr.attendance-row {
            display: grid !important;
            grid-template-columns: repeat(2, minmax(0, 1fr));
            column-gap: 12px;
            width: 100%;
            margin-bottom: 16px;
            padding: 14px;
            border: 1px solid var(--bs-border-color, #dee2e6);
            border-radius: 10px;
            background: var(--bs-card-bg, #fff);
            box-sizing: border-box;
        }

        .attendance-table tbody tr.attendance-row:last-child {
            margin-bottom: 0;
        }

        .attendance-table tbody tr.attendance-row > td {
            display: block;
            width: 100%;
            min-width: 0;
            padding: 10px 0;
            border: 0;
            border-bottom: 1px solid var(--bs-border-color, #e9ecef);
            white-space: normal;
            box-sizing: border-box;
        }

        /* Employee full width */
        .attendance-table tbody tr.attendance-row > td:nth-child(1) {
            grid-column: 1 / -1;
            padding-top: 0;
            padding-bottom: 12px;
            border-bottom: 1px solid var(--bs-border-color, #e9ecef);
        }

        /* Hide department on mobile */
        .attendance-table tbody tr.attendance-row > td:nth-child(2) {
            display: none;
        }

        /* Status full width */
        .attendance-table tbody tr.attendance-row > td:nth-child(3) {
            grid-column: 1 / -1;
            padding-top: 12px;
        }

        /* Check In and Check Out side by side */
        .attendance-table tbody tr.attendance-row > td:nth-child(4),
        .attendance-table tbody tr.attendance-row > td:nth-child(5) {
            grid-column: auto;
            width: 100%;
            min-width: 0;
            padding: 10px 0;
        }

        .attendance-table tbody tr.attendance-row > td:nth-child(4) {
            padding-right: 2px;
        }

        .attendance-table tbody tr.attendance-row > td:nth-child(5) {
            padding-left: 2px;
        }

        /* Note full width */
        .attendance-table tbody tr.attendance-row > td:nth-child(6) {
            grid-column: 1 / -1;
            width: 100%;
            border-bottom: 0;
            padding-bottom: 0;
        }

        /* Mobile field labels */
        .mobile-field-label {
            display: block;
            font-size: 12px;
            font-weight: 700;
            margin-bottom: 7px;
            color: var(--bs-secondary-color, #6c757d);
        }

        /* Inputs and dropdowns */
        .attendance-table .bp-form-control,
        .attendance-table .bp-form-select {
            display: block;
            width: 100% !important;
            min-width: 0 !important;
            max-width: 100%;
            min-height: 42px;
            font-size: 13px;
            box-sizing: border-box;
        }

        /* Footer buttons */
        .attendance-footer {
            display: flex;
            flex-wrap: wrap;
            gap: 8px;
        }

        .attendance-footer .bp-btn {
            flex: 1 1 130px;
            margin: 0 !important;
            justify-content: center;
        }
    }

 /* Keep Taka symbol and amount on the same line */
    .bp-table td.text-end {
        white-space: nowrap !important;
    }

    .bp-table td.text-end span {
        white-space: nowrap !important;
        display: inline-block;
    }

    @media (max-width: 767.98px) {
        .bp-table {
            min-width: 600px;
        }

        .bp-table-wrapper {
            overflow-x: auto;
            -webkit-overflow-scrolling: touch;
        }
    }   


 /* =====================================================
           ORDER ITEMS - MOBILE RESPONSIVE CARD LAYOUT
           Desktop layout remains unchanged.
        ===================================================== */

        @media (max-width: 767.98px) {

            #orderTable {
                width: 100%;
                min-width: 0 !important;
                border-collapse: separate;
                border-spacing: 0;
            }

            #orderTable thead {
                display: none;
            }

            #orderTable tbody {
                display: block;
                width: 100%;
            }

            /* Each product becomes an individual card */
            #orderTable tbody tr:not(.empty-row) {
                display: grid;
                grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
                grid-template-areas:
                    "image product"
                    "variants variants"
                    "quantity discount"
                    "subtotal actions";
                gap: 12px;
                width: 100%;
                margin: 0 0 14px;
                padding: 14px;
                background: #fff;
                border: 1px solid #e5e7eb;
                border-radius: 10px;
                box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
                box-sizing: border-box;
            }

            #orderTable tbody tr:not(.empty-row) > td {
                display: flex;
                flex-direction: column;
                justify-content: center;
                align-items: flex-start;
                min-width: 0;
                width: 100%;
                padding: 0;
                border: 0;
                background: transparent;
                white-space: normal;
                overflow-wrap: anywhere;
                box-sizing: border-box;
            }

            /* Image */
            #orderTable tbody tr:not(.empty-row) > td:nth-child(1) {
                grid-area: image;
                align-items: flex-start;
                justify-content: center;
            }

            /* Product */
            #orderTable tbody tr:not(.empty-row) > td:nth-child(2) {
                grid-area: product;
            }

            #orderTable tbody tr:not(.empty-row) > td:nth-child(2)::before {
                content: "Product";
                display: block;
                margin-bottom: 5px;
                color: #6b7280;
                font-size: 11px;
                font-weight: 600;
                text-transform: uppercase;
            }

            /* Variant Details */
            #orderTable tbody tr:not(.empty-row) > td:nth-child(3) {
                grid-area: variants;
                padding: 10px;
                background: #f8fafc;
                border-radius: 7px;
            }

            #orderTable tbody tr:not(.empty-row) > td:nth-child(3)::before {
                content: "Variant Details";
                display: block;
                margin-bottom: 7px;
                color: #6b7280;
                font-size: 11px;
                font-weight: 600;
                text-transform: uppercase;
            }

            /* Total Quantity */
            #orderTable tbody tr:not(.empty-row) > td:nth-child(4) {
                grid-area: quantity;
            }

            #orderTable tbody tr:not(.empty-row) > td:nth-child(4)::before {
                content: "Total Quantity";
                display: block;
                margin-bottom: 5px;
                color: #6b7280;
                font-size: 11px;
                font-weight: 600;
                text-transform: uppercase;
            }

            /* Discount */
            #orderTable tbody tr:not(.empty-row) > td:nth-child(5) {
                grid-area: discount;
            }

            #orderTable tbody tr:not(.empty-row) > td:nth-child(5)::before {
                content: "Discount";
                display: block;
                margin-bottom: 5px;
                color: #6b7280;
                font-size: 11px;
                font-weight: 600;
                text-transform: uppercase;
            }

            /* Subtotal */
            #orderTable tbody tr:not(.empty-row) > td:nth-child(6) {
                grid-area: subtotal;
                padding-top: 10px;
                border-top: 1px solid #e5e7eb;
            }

            #orderTable tbody tr:not(.empty-row) > td:nth-child(6)::before {
                content: "Subtotal";
                display: block;
                margin-bottom: 5px;
                color: #6b7280;
                font-size: 11px;
                font-weight: 600;
                text-transform: uppercase;
            }

            /* Actions */
            #orderTable tbody tr:not(.empty-row) > td:nth-child(7) {
                grid-area: actions;
                flex-direction: row;
                align-items: center;
                justify-content: flex-end;
                gap: 6px;
                padding-top: 10px;
                border-top: 1px solid #e5e7eb;
            }

            #orderTable tbody tr:not(.empty-row) > td:nth-child(7)::before {
                content: "Actions";
                margin-right: auto;
                color: #6b7280;
                font-size: 11px;
                font-weight: 600;
                text-transform: uppercase;
            }

            /* Product image */
            #orderTable .bp-line-item-img {
                width: 58px;
                height: 58px;
                max-width: 58px;
                object-fit: cover;
                border-radius: 7px;
            }

            /* Product name */
            #orderTable .bp-col-product .fw-600 {
                font-size: 13px;
                line-height: 1.5;
                word-break: break-word;
            }

            /* Model */
            #orderTable .bp-col-product .fs-12 {
                margin-top: 4px;
                font-size: 11px;
            }

            /* Quantity input */
            #orderTable .sale-line-qty {
                width: 100%;
                max-width: 110px;
                min-height: 36px;
            }

            /* Discount controls */
            #orderTable .bp-line-discount {
                display: flex;
                flex-direction: column;
                align-items: stretch;
                gap: 5px !important;
                width: 100%;
            }

            #orderTable .bp-line-discount .bp-form-select,
            #orderTable .bp-line-discount .bp-form-control {
                width: 100%;
                min-width: 0;
                min-height: 36px;
            }

            /* Variant breakdown */
            #orderTable .bp-qline-variants,
            #orderTable .bp-combo-comp-list {
                width: 100%;
            }

            #orderTable .bp-qline-v-row {
                display: flex;
                flex-wrap: wrap;
                align-items: center;
                justify-content: space-between;
                gap: 5px;
                padding: 5px 0;
            }

            #orderTable .bp-qline-v-name {
                min-width: 0;
                overflow-wrap: anywhere;
            }

            /* Subtotal amount */
            #orderTable .sale-line-subtotal {
                font-size: 14px;
                font-weight: 700;
                white-space: normal !important;
                overflow-wrap: anywhere;
            }

            /* Action buttons */
            #orderTable tbody tr:not(.empty-row) td:nth-child(7) .bp-btn {
                flex-shrink: 0;
                min-width: 34px;
            }

            /* Empty table message */
            #orderTable tbody tr.empty-row {
                display: block;
                width: 100%;
            }

            #orderTable tbody tr.empty-row td {
                display: block;
                width: 100%;
                padding: 18px 12px;
                text-align: center;
                white-space: normal;
            }

            /* Prevent horizontal scrolling */
            .bp-table-wrapper:has(#orderTable) {
                overflow-x: hidden !important;
                width: 100%;
            }

            #orderTable th,
            #orderTable td {
                box-sizing: border-box;
            }
        }


        /* Discount controls - Keep both controls in one row */
#orderTable .bp-line-discount {
    display: grid;
    grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
    align-items: center;
    gap: 6px !important;
    width: 100%;
}

#orderTable .bp-line-discount .bp-form-select,
#orderTable .bp-line-discount .bp-form-control {
    width: 100%;
    min-width: 0;
    min-height: 36px;
    box-sizing: border-box;
}


/* =====================================================
   RETURN ITEMS - MOBILE RESPONSIVE CARD LAYOUT
   Desktop table layout remains unchanged.
===================================================== */

@media (max-width: 767.98px) {

    #returnItemsTable {
        width: 100%;
        min-width: 0 !important;
        border-collapse: separate !important;
        border-spacing: 0;
    }

    #returnItemsTable thead {
        display: none !important;
    }

    #returnItemsTable tbody {
        display: block;
        width: 100%;
        padding: 12px;
    }

    #returnItemsTable tbody tr {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 12px;
        width: 100%;
        position: relative;
        padding: 16px;
        margin-bottom: 14px;
        background: #fff;
        border: 1px solid #e0e5eb;
        border-radius: 12px;
        box-shadow: 0 2px 5px rgba(0, 0, 0, 0.06);
    }

    #returnItemsTable tbody tr:last-child {
        margin-bottom: 0;
    }

    #returnItemsTable tbody td {
        display: block;
        min-width: 0;
        width: 100%;
        padding: 0 !important;
        border: 0 !important;
        text-align: left !important;
        font-size: 13px;
        overflow-wrap: anywhere;
    }

    /* Checkbox */
    #returnItemsTable tbody td:nth-child(1) {
        position: absolute;
        top: 21px;
        left: 16px;
        width: 20px;
        z-index: 2;
    }

    #returnItemsTable tbody td:nth-child(1) input {
        width: 17px;
        height: 17px;
        cursor: pointer;
    }

    /* Product */
    #returnItemsTable tbody td:nth-child(2) {
        grid-column: 1 / -1;
        min-height: 48px;
        padding-left: 38px !important;
        padding-bottom: 13px !important;
        border-bottom: 1px solid #e5e7eb !important;
        font-size: 14px;
        font-weight: 700;
        line-height: 1.5;
    }

    #returnItemsTable tbody td:nth-child(2)::before {
        content: "PRODUCT";
        display: block;
        margin-bottom: 4px;
        color: #64748b;
        font-size: 10px;
        font-weight: 600;
        letter-spacing: .4px;
    }

    /* Field labels */
    #returnItemsTable tbody td:nth-child(n+3):nth-child(-n+9)::before {
        display: block;
        margin-bottom: 6px;
        color: #64748b;
        font-size: 10px;
        font-weight: 600;
        letter-spacing: .35px;
    }

    /* SKU */
    #returnItemsTable tbody td:nth-child(3)::before {
        content: "SKU";
    }

    /* Sold Quantity */
    #returnItemsTable tbody td:nth-child(4)::before {
        content: "SOLD QTY";
    }

    /* Returnable Quantity */
    #returnItemsTable tbody td:nth-child(5)::before {
        content: "RETURNABLE QTY";
    }

    /* Return Quantity */
    #returnItemsTable tbody td:nth-child(6)::before {
        content: "RETURN QUANTITY";
    }

    /* Unit Price */
    #returnItemsTable tbody td:nth-child(7)::before {
        content: "UNIT PRICE";
    }

    /* Condition */
    #returnItemsTable tbody td:nth-child(8)::before {
        content: "CONDITION";
    }

    /* Return Amount */
    #returnItemsTable tbody td:nth-child(9) {
        grid-column: 1 / -1;
        padding-top: 11px !important;
        border-top: 1px solid #e5e7eb !important;
        font-size: 15px;
        font-weight: 800;
        color: #172b4d;
    }

    #returnItemsTable tbody td:nth-child(9)::before {
        content: "RETURN AMOUNT";
    }

    /* Input fields */
    #returnItemsTable .bp-form-control,
    #returnItemsTable .bp-form-select {
        width: 100%;
        min-width: 0;
        min-height: 40px;
        font-size: 13px;
        border-radius: 9px;
    }

    #returnItemsTable .bp-return-qty {
        text-align: left;
    }

    #returnItemsTable .bp-form-select-sm {
        padding: 7px 25px 7px 9px;
    }

    /* SKU */
    #returnItemsTable code {
        font-size: 12px;
        overflow-wrap: anywhere;
    }

    /* Empty table messages */
    #returnItemsTable tbody tr td[colspan] {
        grid-column: 1 / -1;
        text-align: center !important;
        padding: 18px 8px !important;
    }

    /* Table wrapper */
    #returnItemsTable_wrapper,
    .bp-table-wrapper {
        overflow-x: visible !important;
    }
}

/* Sales History Amount - Keep currency and amount together */
    .sales-history-amount {
        white-space: nowrap !important;
        display: inline-flex;
        align-items: center;
        gap: 4px;
    }

    @media (max-width: 767.98px) {
        .sales-history-amount {
            white-space: nowrap !important;
            display: inline-flex !important;
            align-items: center;
            gap: 4px;
        }

        .sales-history-amount-cell {
            white-space: nowrap !important;
        }
    }


    .ledger-amount-cell {
        white-space: nowrap !important;
    }

    .ledger-amount {
        display: inline-flex !important;
        align-items: center;
        gap: 4px;
        white-space: nowrap !important;
    }

    @media (max-width: 767.98px) {
        .ledger-amount-cell {
            white-space: nowrap !important;
        }

        .ledger-amount {
            display: inline-flex !important;
            align-items: center;
            white-space: nowrap !important;
            gap: 4px;
        }
    }


    /* =========================================================
   CUSTOMER DUE RECEIVE - PRINT PREVIEW
   File: public/css/style.css
========================================================= */

.customer-due-print,
.customer-due-print * {
    box-sizing: border-box;
}

.customer-due-print {
    margin: 0;
    padding: 0;
    width: 100%;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 11px;
    color: #000;
    background: #f1f3f5;
}

.customer-due-print .preview-toolbar {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 8px;
    width: 100%;
    padding: 12px 12mm;
    margin: 0;
    background: #fff;
    border-bottom: 1px solid #ddd;
}

.customer-due-print .preview-toolbar button {
    padding: 9px 18px;
    border: none;
    border-radius: 4px;
    font-size: 12px;
    cursor: pointer;
    color: #fff;
}

.customer-due-print .back-btn {
    background: #555;
}

.customer-due-print .print-btn {
    background: #1B4F72;
}

.customer-due-print .preview-toolbar button:hover {
    opacity: .9;
}

/* Report page */
.customer-due-print .report-page {
    width: 100%;
    min-height: calc(100vh - 55px);
    margin: 0 auto;
    padding: 16mm 12mm 20mm;
    background: #fff;
}

/* Letterhead */
.customer-due-print .head-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 10px;
}

.customer-due-print .head-table td {
    vertical-align: middle;
}

.customer-due-print .logo-img {
    width: 170px;
    height: auto;
    display: block;
}

.customer-due-print .logo-name {
    font-size: 20px;
    font-weight: bold;
}

.customer-due-print .title-cell {
    text-align: right;
}

.customer-due-print .doc-title {
    font-size: 18px;
    font-weight: bold;
    letter-spacing: .5px;
    text-transform: uppercase;
}

.customer-due-print .doc-title span {
    border-bottom: 2px dotted #000;
    padding-bottom: 2px;
}

/* Business information */
.customer-due-print .biz-line {
    font-size: 10px;
    color: #333;
    border-bottom: 1px solid #999;
    padding-bottom: 8px;
    margin-bottom: 10px;
}

.customer-due-print .filters-line {
    font-size: 10.5px;
    color: #333;
    margin: 0 0 14px;
    line-height: 1.6;
}

/* Section title */
.customer-due-print .section-title {
    font-size: 13px;
    font-weight: bold;
    margin: 16px 0 6px;
    text-transform: uppercase;
}

/* Summary stats */
.customer-due-print .rpt-stats {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 16px;
}

.customer-due-print .rpt-stats td {
    border: 1px solid #ccc;
    padding: 9px 10px;
    width: 25%;
}

.customer-due-print .rpt-stats .lbl {
    font-size: 9px;
    text-transform: uppercase;
    color: #666;
    margin-bottom: 5px;
}

.customer-due-print .rpt-stats .val {
    font-size: 15px;
    font-weight: bold;
}

/* Customer table */
.customer-due-print .table-responsive {
    display: block;
    width: 100%;
    max-width: 100%;
}

.customer-due-print .table-scroll-hint {
    display: none;
}

.customer-due-print table.rpt-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 2px;
}

.customer-due-print table.rpt-table th {
    background: #1B4F72;
    color: #fff;
    font-size: 9px;
    text-transform: uppercase;
    font-weight: bold;
    padding: 7px 6px;
    border: 1px solid #000;
    text-align: left;
}

.customer-due-print table.rpt-table td {
    padding: 6px;
    border: 1px solid #ccc;
    font-size: 10px;
    vertical-align: middle;
}

.customer-due-print table.rpt-table tbody tr {
    page-break-inside: avoid;
}

.customer-due-print .col-sl {
    width: 5%;
}

.customer-due-print .col-customer {
    width: 23%;
}

.customer-due-print .col-phone {
    width: 13%;
}

.customer-due-print .col-group {
    width: 15%;
}

.customer-due-print .col-purchased {
    width: 15%;
}

.customer-due-print .col-paid {
    width: 14%;
}

.customer-due-print .col-due {
    width: 15%;
}

/* Utility classes */
.customer-due-print .text-end {
    text-align: right;
}

.customer-due-print .text-center {
    text-align: center;
}

.customer-due-print .fw-bold {
    font-weight: bold;
}

.customer-due-print .text-muted {
    color: #666;
}

.customer-due-print .text-success {
    color: #1E8449;
}

.customer-due-print .text-danger {
    color: #C0392B;
}

.customer-due-print .total-row td {
    background: #f0f0f0;
    font-weight: bold;
    border: 1px solid #999 !important;
}

.customer-due-print .customer-name {
    font-weight: bold;
}

.customer-due-print .customer-email {
    display: block;
    margin-top: 3px;
    font-size: 9px;
    color: #666;
    overflow-wrap: anywhere;
}

.customer-due-print .amount-cell {
    white-space: nowrap;
}

.customer-due-print .empty-note {
    padding: 16px;
    text-align: center;
    color: #777;
    border: 1px solid #ccc;
}

/* Signature */
.customer-due-print .report-footer {
    margin-top: 35px;
    width: 100%;
    border-collapse: collapse;
}

.customer-due-print .report-footer td {
    width: 50%;
    text-align: center;
    vertical-align: bottom;
    padding: 0 25px;
}

.customer-due-print .signature-line {
    border-top: 1px solid #333;
    padding-top: 7px;
    margin-top: 35px;
    font-size: 10px;
    font-weight: bold;
}

/* Footer */
.customer-due-print .footer {
    text-align: center;
    font-size: 9px;
    color: #999;
    margin-top: 20px;
    padding-top: 10px;
    border-top: 1px solid #dee2e6;
}

/* =========================================================
   MOBILE RESPONSIVE
========================================================= */

@media screen and (max-width: 767.98px) {

    .customer-due-print {
        width: 100%;
        overflow-x: hidden;
        background: #f1f3f5;
        font-size: 13px;
    }

    /* Toolbar */
    .customer-due-print .preview-toolbar {
        position: sticky;
        top: 0;
        z-index: 100;
        width: 100%;
        padding: 10px 12px;
        gap: 8px;
        background: #fff;
    }

    .customer-due-print .preview-toolbar button {
        padding: 10px 14px;
        font-size: 12px;
        border-radius: 5px;
    }

    /* Report page */
    .customer-due-print .report-page {
        display: block;
        width: 100%;
        min-height: 100vh;
        margin: 0;
        padding: 16px 12px 24px;
        overflow: visible;
        background: #fff;
    }

    /* Letterhead */
    .customer-due-print .head-table {
        width: 100%;
        margin-bottom: 12px;
    }

    .customer-due-print .head-table td {
        vertical-align: middle;
    }

    .customer-due-print .logo-img {
        max-width: 120px;
        width: 100%;
    }

    .customer-due-print .logo-name {
        font-size: 16px;
    }

    .customer-due-print .doc-title {
        font-size: 13px;
        letter-spacing: 0;
    }

    /* Business information */
    .customer-due-print .biz-line {
        font-size: 11px;
        line-height: 1.7;
        padding-bottom: 10px;
        overflow-wrap: anywhere;
    }

    .customer-due-print .filters-line {
        font-size: 11px;
        line-height: 1.8;
        margin-bottom: 12px;
        overflow-wrap: anywhere;
    }

    /* Section title */
    .customer-due-print .section-title {
        font-size: 12px;
        margin: 14px 0 8px;
    }

    /* Summary: 2 columns */
    .customer-due-print .rpt-stats {
        display: block;
        width: 100%;
        margin-bottom: 14px;
    }

    .customer-due-print .rpt-stats tbody {
        display: block;
        width: 100%;
    }

    .customer-due-print .rpt-stats tr {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        width: 100%;
    }

    .customer-due-print .rpt-stats td {
        display: block;
        width: 100%;
        min-width: 0;
        padding: 12px 10px;
    }

    .customer-due-print .rpt-stats .lbl {
        font-size: 10px;
        line-height: 1.4;
    }

    .customer-due-print .rpt-stats .val {
        font-size: 14px;
        overflow-wrap: anywhere;
    }

    /* Table scroll hint */
    .customer-due-print .table-scroll-hint {
        display: block;
        width: 100%;
        margin: 7px 0 10px;
        color: #777;
        font-size: 11px;
        text-align: center;
    }

    /* Horizontal scrolling table */
    .customer-due-print .table-responsive {
        display: block;
        width: 100%;
        max-width: 100%;
        overflow-x: auto;
        overflow-y: hidden;
        -webkit-overflow-scrolling: touch;
        overscroll-behavior-x: contain;
        border: 1px solid #ddd;
    }

    .customer-due-print table.rpt-table {
        display: table;
        width: 850px;
        min-width: 850px;
        table-layout: fixed;
        margin: 0;
    }

    .customer-due-print table.rpt-table th {
        padding: 10px 8px;
        font-size: 11px;
        white-space: nowrap;
    }

    .customer-due-print table.rpt-table td {
        padding: 10px 8px;
        font-size: 11px;
        line-height: 1.5;
    }

    .customer-due-print .customer-name {
        font-size: 11px;
    }

    .customer-due-print .customer-email {
        font-size: 10px;
        overflow-wrap: anywhere;
    }

    /* Signature */
    .customer-due-print .report-footer {
        width: 100%;
        margin-top: 25px;
    }

    .customer-due-print .report-footer td {
        width: 50%;
        padding: 0 8px;
    }

    .customer-due-print .signature-line {
        margin-top: 25px;
        padding-top: 7px;
        font-size: 10px;
    }

    /* Footer */
    .customer-due-print .footer {
        font-size: 10px;
        line-height: 1.6;
        margin-top: 18px;
        overflow-wrap: anywhere;
    }
}

/* Small mobile */
@media screen and (max-width: 380px) {

    .customer-due-print .report-page {
        padding: 12px 9px 20px;
    }

    .customer-due-print .preview-toolbar {
        padding: 9px;
    }

    .customer-due-print .preview-toolbar button {
        padding: 9px 11px;
    }

    .customer-due-print .doc-title {
        font-size: 11px;
    }

    .customer-due-print .rpt-stats .val {
        font-size: 12px;
    }

    .customer-due-print .section-title {
        font-size: 11px;
    }
}

/* =========================================================
   PRINT SETTINGS - A4 LANDSCAPE
========================================================= */

@page {
    size: A4 landscape;
    margin: 16mm 12mm 20mm 12mm;
}

@media print {

    .customer-due-print,
    .customer-due-print html,
    .customer-due-print body {
        width: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
        background: #fff !important;
        overflow: visible !important;
    }

    .customer-due-print .preview-toolbar,
    .customer-due-print .table-scroll-hint {
        display: none !important;
    }

    .customer-due-print .report-page {
        display: block !important;
        width: 100% !important;
        min-height: auto !important;
        margin: 0 !important;
        padding: 0 !important;
        overflow: visible !important;
        background: #fff !important;
    }

    .customer-due-print .table-responsive {
        display: block !important;
        width: 100% !important;
        max-width: none !important;
        overflow: visible !important;
        border: none !important;
    }

    .customer-due-print table.rpt-table {
        display: table !important;
        width: 100% !important;
        min-width: 0 !important;
        table-layout: auto !important;
    }

    .customer-due-print .rpt-stats td,
    .customer-due-print .total-row td,
    .customer-due-print table.rpt-table th {
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
    }

    .customer-due-print thead {
        display: table-header-group;
    }

    .customer-due-print tfoot {
        display: table-row-group;
    }

    .customer-due-print tr {
        page-break-inside: avoid;
    }

    .customer-due-print .report-footer,
    .customer-due-print .footer {
        page-break-inside: avoid;
    }
}

/* =====================================================
   CUSTOMER DUE RECEIVE - PRINT PREVIEW FIX
   ===================================================== */

@media print {

    html,
    body {
        display: block !important;
        visibility: visible !important;
        width: 100% !important;
        height: auto !important;
        min-height: 0 !important;
        margin: 0 !important;
        padding: 0 !important;
        overflow: visible !important;
        background: #fff !important;
    }

    body * {
        visibility: visible !important;
    }

    .preview-toolbar {
        display: none !important;
        visibility: hidden !important;
    }

    .report-page {
        display: block !important;
        position: static !important;
        visibility: visible !important;
        width: 100% !important;
        height: auto !important;
        min-height: 0 !important;
        max-width: none !important;
        margin: 0 !important;
        padding: 0 !important;
        overflow: visible !important;
        background: #fff !important;
        box-shadow: none !important;
    }

    .report-page * {
        visibility: visible !important;
    }

    .table-responsive {
        display: block !important;
        width: 100% !important;
        max-width: none !important;
        height: auto !important;
        overflow: visible !important;
    }

    table.rpt-table {
        display: table !important;
        width: 100% !important;
        min-width: 0 !important;
        height: auto !important;
        table-layout: auto !important;
        border-collapse: collapse !important;
    }

    table.rpt-table thead {
        display: table-header-group !important;
    }

    table.rpt-table tbody {
        display: table-row-group !important;
    }

    table.rpt-table tfoot {
        display: table-row-group !important;
    }

    table.rpt-table tr {
        display: table-row !important;
        page-break-inside: avoid !important;
    }

    table.rpt-table th,
    table.rpt-table td {
        visibility: visible !important;
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
    }

    .rpt-stats,
    .rpt-stats tbody,
    .rpt-stats tr,
    .rpt-stats td {
        visibility: visible !important;
    }

    .report-footer,
    .footer {
        visibility: visible !important;
        page-break-inside: avoid !important;
    }

    .table-scroll-hint {
        display: none !important;
    }

    @page {
        size: A4 landscape;
        margin: 12mm;
    }
}

/* =====================================================
   FILTER BAR - MOBILE RESPONSIVE ALIGNMENT
   Search + Filter + Reset in one row
   Desktop layout remains unchanged.
===================================================== */

@media (max-width: 767.98px) {

    .bp-filter-bar {
        display: flex !important;
        flex-direction: row !important;
        flex-wrap: nowrap !important;
        align-items: center !important;
        gap: 8px !important;
        width: 100% !important;
        min-width: 0 !important;
    }

    /* Search Input */
    .bp-filter-bar .bp-table-search {
        flex: 1 1 0% !important;
        min-width: 0 !important;
        width: auto !important;
        max-width: none !important;
        margin: 0 !important;
    }

    .bp-filter-bar .bp-table-search input {
        width: 100% !important;
        min-width: 0 !important;
        box-sizing: border-box !important;
    }

    /* Additional Filter Fields */
    .bp-filter-bar > select,
    .bp-filter-bar > .form-control,
    .bp-filter-bar > .form-select {
        flex: 0 1 auto !important;
        min-width: 0 !important;
        max-width: 100px !important;
    }

    /* Filter and Reset Buttons */
    .bp-filter-bar > .bp-filter-submit,
    .bp-filter-bar > .bp-filter-reset {
        display: inline-flex !important;
        flex: 0 0 40px !important;
        width: 40px !important;
        min-width: 40px !important;
        max-width: 40px !important;
        height: 40px !important;
        align-items: center !important;
        justify-content: center !important;
        padding: 0 !important;
        margin: 0 !important;
        white-space: nowrap !important;
        position: relative !important;
    }

    .bp-filter-bar > .bp-filter-submit i,
    .bp-filter-bar > .bp-filter-reset i {
        margin: 0 !important;
        font-size: 14px !important;
    }


}

/* =====================================================
   PRICING INPUTS - MOBILE RESPONSIVE FIX
===================================================== */

/* =====================================================
   FILTER BAR - MOBILE RESPONSIVE FIX
   Desktop layout remains unchanged
===================================================== */

.bp-filter-bar {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

/* Search field */
.bp-filter-bar .bp-table-search {
    flex: 1 1 220px;
    min-width: 0;
}

/* Filter and Reset buttons */
.bp-filter-bar .bp-filter-submit,
.bp-filter-bar .bp-filter-reset {
    flex: 0 0 38px;
    width: 38px;
    height: 38px;
    min-width: 38px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
}

/* Additional filter fields */
.bp-filter-bar > select,
.bp-filter-bar > input,
.bp-filter-bar > .form-control,
.bp-filter-bar > .form-select {
    min-width: 0;
}

/* =====================================================
   MOBILE VIEW
===================================================== */

@media (max-width: 767.98px) {

    /* PRICING INPUTS */

    .bp-pricing-price-row {
        display: grid !important;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 12px !important;
        margin: 0;
    }

    .bp-pricing-price-row > [class*="col-"] {
        width: 100% !important;
        max-width: 100% !important;
        flex: none !important;
        padding: 0 !important;
        min-width: 0;
    }

    .bp-pricing-price-row .bp-form-label {
        font-size: 12px;
        line-height: 1.4;
        min-height: 34px;
        margin-bottom: 6px;
    }

    /* Taka symbol and input in same line */
    .bp-pricing-price-row .input-group {
        display: flex !important;
        flex-direction: row !important;
        flex-wrap: nowrap !important;
        align-items: stretch !important;
        width: 100% !important;
    }

    .bp-pricing-price-row .bp-input-addon {
        display: flex !important;
        align-items: center !important;
        justify-content: center;
        flex: 0 0 auto !important;
        width: auto !important;
        white-space: nowrap !important;
    }

    .bp-pricing-price-row .bp-form-control {
        display: block !important;
        flex: 1 1 0% !important;
        width: 1% !important;
        min-width: 0 !important;
        max-width: 100% !important;
    }

    /* FILTER BAR */

    .bp-filter-bar {
        display: flex !important;
        flex-wrap: wrap !important;
        align-items: center !important;
        gap: 8px !important;
        width: 100%;
    }

    /* Search takes full width */
    .bp-filter-bar .bp-table-search {
        flex: 1 1 100% !important;
        width: 100% !important;
        min-width: 100% !important;
        order: 1;
    }

    .bp-filter-bar .bp-table-search input {
        width: 100%;
        min-width: 0;
    }

    /* Additional filters */
    .bp-filter-bar > select,
    .bp-filter-bar > input,
    .bp-filter-bar > .form-control,
    .bp-filter-bar > .form-select {
        flex: 1 1 calc(50% - 8px);
        width: auto;
        max-width: 100%;
        min-width: 0;
        order: 2;
    }

    /* Apply Filter button */
    .bp-filter-bar .bp-filter-submit {
        order: 3;
        flex: 0 0 42px !important;
        width: 42px !important;
        height: 40px !important;
        min-width: 42px !important;
        margin: 0 !important;
    }

    /* Reset button */
    .bp-filter-bar .bp-filter-reset {
        order: 4;
        flex: 0 0 42px !important;
        width: 42px !important;
        height: 40px !important;
        min-width: 42px !important;
        margin: 0 !important;
    }

}



/* =========================================================
   PURCHASE ORDER - MOBILE MULTI ROW PRODUCT LAYOUT
========================================================= */

@media (max-width: 767.98px) {

    /* Main purchase items table */
    #purchaseItemsTable {
        width: 100% !important;
        min-width: 0 !important;
        max-width: 100% !important;
        border-collapse: separate !important;
        border-spacing: 0 12px !important;
        table-layout: fixed !important;
    }

    /* Hide desktop table heading */
    #purchaseItemsTable thead {
        display: none !important;
    }

    /* Each product becomes a separate card */
    #purchaseItemsTable tbody tr {
        display: block !important;
        width: 100% !important;
        min-width: 0 !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
        background: #fff;
        border: 1px solid #e5e7eb;
        border-radius: 10px;
        padding: 10px !important;
        margin-bottom: 12px;
        box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
    }

    /* Each column becomes a separate row */
    #purchaseItemsTable tbody td {
        display: flex !important;
        align-items: center;
        justify-content: space-between;
        gap: 12px;
        width: 100% !important;
        min-width: 0 !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
        padding: 9px 4px !important;
        border: 0 !important;
        border-bottom: 1px solid #f0f0f0 !important;
        text-align: right !important;
        white-space: normal !important;
        overflow-wrap: anywhere;
    }

    /* Product name */
    #purchaseItemsTable tbody td:nth-child(1) {
        display: block !important;
        text-align: left !important;
        padding: 10px 4px !important;
        font-size: 14px;
        border-bottom: 1px solid #e5e7eb !important;
    }

    #purchaseItemsTable tbody td:nth-child(1)::before {
        content: "Product";
        display: block;
        font-size: 11px;
        font-weight: 700;
        color: #6b7280;
        margin-bottom: 5px;
        text-transform: uppercase;
    }

    /* Field labels */
    #purchaseItemsTable tbody td:nth-child(2)::before {
        content: "Variant";
    }

    #purchaseItemsTable tbody td:nth-child(3)::before {
        content: "Qty";
    }

    #purchaseItemsTable tbody td:nth-child(4)::before {
        content: "Unit Price";
    }

    #purchaseItemsTable tbody td:nth-child(5)::before {
        content: "Discount";
    }

    #purchaseItemsTable tbody td:nth-child(6)::before {
        content: "Total";
    }

    #purchaseItemsTable tbody td:nth-child(n+2):nth-child(-n+6)::before {
        display: block;
        font-size: 12px;
        font-weight: 600;
        color: #6b7280;
        text-align: left;
        flex: 1 1 auto;
        min-width: 0;
    }

    /* Input fields */
    #purchaseItemsTable tbody td input.bp-form-control {
        display: block !important;
        width: 130px !important;
        max-width: 55% !important;
        min-width: 0 !important;
        text-align: right;
        flex-shrink: 1;
        box-sizing: border-box !important;
    }

    /* Variant text */
    #purchaseItemsTable tbody td:nth-child(2) span {
        text-align: right;
        min-width: 0;
        overflow-wrap: anywhere;
    }

    /* Discount input - show actual input value */
    #purchaseItemsTable tbody td:nth-child(5) {
        display: flex !important;
        align-items: center !important;
        justify-content: space-between !important;
    }

    #purchaseItemsTable tbody td:nth-child(5) input {
        flex: 0 1 130px !important;
    }

    /* Total amount - IMPORTANT FIX */
    #purchaseItemsTable tbody td:nth-child(6) {
        display: flex !important;
        align-items: center !important;
        justify-content: space-between !important;
        min-height: 42px !important;
        font-size: 14px !important;
        font-weight: 700 !important;
        color: #198754 !important;
        white-space: nowrap !important;
        overflow: visible !important;
        opacity: 1 !important;
        visibility: visible !important;
    }

    #purchaseItemsTable tbody td:nth-child(6)::before {
        content: "Total" !important;
        flex: 1 1 auto !important;
        color: #6b7280 !important;
        font-size: 12px !important;
        font-weight: 600 !important;
        text-align: left !important;
    }

    #purchaseItemsTable tbody td.po-line-total {
        display: flex !important;
        align-items: center !important;
        justify-content: space-between !important;
        width: 100% !important;
        min-width: 0 !important;
        white-space: nowrap !important;
        overflow: visible !important;
    }

    /* Remove button row */
    #purchaseItemsTable tbody td:nth-child(7) {
        justify-content: flex-end !important;
        border-bottom: 0 !important;
        padding-top: 10px !important;
    }

    #purchaseItemsTable tbody td:nth-child(7)::before {
        content: none !important;
        display: none !important;
    }

    #purchaseItemsTable tbody td:nth-child(7) button {
        min-width: 36px;
        min-height: 36px;
    }

    /* Prevent content overflow inside purchase cards */
    #purchaseItemsTable,
    #purchaseItemsTable tbody,
    #purchaseItemsTable tbody tr,
    #purchaseItemsTable tbody td {
        overflow-wrap: anywhere;
    }

    /* Purchase card layout only - never apply globally */
    .bp-table-wrapper:has(#purchaseItemsTable) {
        overflow-x: hidden !important;
        width: 100% !important;
        max-width: 100% !important;
    }

    /* Ensure purchase card body does not overflow */
    .bp-card:has(#purchaseItemsTable),
    .bp-card:has(#purchaseItemsTable) .bp-card-body {
        min-width: 0 !important;
        max-width: 100% !important;
    }

}

/* =========================================================
   GLOBAL TABLE - MOBILE HORIZONTAL SCROLL
   Applies to normal tables only
========================================================= */

@media (max-width: 767.98px) {

    .bp-table-wrapper:not(:has(#purchaseItemsTable)):not(:has(#returnItemsTable)):not(:has(#orderTable)) {
        width: 100%;
        max-width: 100%;
        overflow-x: auto !important;
        overflow-y: hidden !important;
        -webkit-overflow-scrolling: touch;
    }

}

/* =========================================================
   PAYMENT ACCOUNT LEDGER - MOBILE CURRENCY ONE LINE
========================================================= */

@media (max-width: 767.98px) {

    /* Summary Cards */
    .bp-stat-card .ledger-summary-amount {
        display: flex !important;
        flex-direction: row !important;
        align-items: center !important;
        flex-wrap: nowrap !important;
        gap: 5px !important;
        white-space: nowrap !important;
    }

    /* Ledger Table */
    .bp-table-wrapper .bp-table .ledger-currency,
    .bp-table-wrapper .bp-table .ledger-amount {
        display: inline !important;
        white-space: nowrap !important;
        line-height: 1.5 !important;
    }

    /* IN, OUT, BALANCE */
    .bp-table-wrapper .bp-table tbody td:nth-child(5),
    .bp-table-wrapper .bp-table tbody td:nth-child(6),
    .bp-table-wrapper .bp-table tbody td:nth-child(7) {
        white-space: nowrap !important;
        min-width: 100px !important;
        vertical-align: middle !important;
    }

    /* Opening Balance */
    .bp-table-wrapper .bp-table .bp-table-highlight td:nth-child(7) {
        white-space: nowrap !important;
    }
}


/* =========================================================
   PAYMENT RECEIPTS - MOBILE AMOUNT & CURRENCY ALIGNMENT
========================================================= */

@media (max-width: 767.98px) {

    .receipt-filter-page .receipt-table-container .bp-table td.text-end {
        white-space: nowrap !important;
        display: table-cell !important;
        text-align: right !important;
        vertical-align: middle !important;
    }

    .receipt-filter-page .receipt-table-container .bp-table td.text-end,
    .receipt-filter-page .receipt-table-container .bp-table td.text-end * {
        white-space: nowrap !important;
    }

}

/* Payment Receipts - Mobile Header Alignment */
@media (max-width: 767.98px) {

    .receipt-filter-page .receipt-table-container .bp-table th.text-end {
        white-space: nowrap !important;
        text-align: right !important;
    }

    .receipt-filter-page .receipt-table-container .bp-table td.text-end {
        white-space: nowrap !important;
        text-align: right !important;
    }

}

/* =========================================================
   AI CHAT - COMPLETE RESPONSIVE CSS
   History Show / Hide + Maximum 4 Conversations
========================================================= */

.bp-chat-wrapper {
    width: 100%;
    min-width: 0;
    box-sizing: border-box;
}

/* =========================================================
   SHOW / HIDE HISTORY TOOLBAR
========================================================= */

.bp-chat-toolbar {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    width: 100%;
    margin: 15px 0 18px;
    padding: 0 2px;
}

#btnToggleHistory {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-height: 38px;
    padding: 8px 13px;
    font-size: 13px;
    white-space: nowrap;
}

/* =========================================================
   MAIN CHAT LAYOUT
========================================================= */

#aiChat {
    display: grid;
    grid-template-columns: 260px minmax(0, 1fr);
    align-items: start;
    gap: 18px;
    width: 100%;
    min-width: 0;
    margin: 10px 0 35px !important;
    box-sizing: border-box;
}

/* =========================================================
   HISTORY SIDEBAR
========================================================= */

#chatSidebar {
    display: flex !important;
    flex-direction: column !important;
    align-self: start;
    width: 100%;
    min-width: 0;
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    margin: 0;
    overflow: hidden !important;
    box-sizing: border-box;
}

/* Sidebar Header */
#chatSidebar .bp-chat-sidebar-head {
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 100%;
    padding: 15px;
    flex-shrink: 0;
    box-sizing: border-box;
}

/* Language Toggle */
#chatSidebar .bp-chat-lang-toggle {
    display: flex;
    align-items: center;
    width: 100%;
    gap: 5px;
}

/* =========================================================
   HISTORY LIST
   MAXIMUM 4 CONVERSATIONS VISIBLE
========================================================= */

#chatSidebar .bp-chat-history {
    display: block !important;
    position: relative;
    width: 100%;
    height: auto !important;
    min-height: 0 !important;
    max-height: 310px !important;
    flex: 0 1 auto !important;

    overflow-x: hidden !important;
    overflow-y: auto !important;

    padding: 10px 10px 12px !important;
    margin: 0 !important;

    box-sizing: border-box !important;
    scrollbar-width: thin;
    -webkit-overflow-scrolling: touch;
}

/* History Scrollbar */
#chatSidebar .bp-chat-history::-webkit-scrollbar {
    width: 5px;
}

#chatSidebar .bp-chat-history::-webkit-scrollbar-track {
    background: transparent;
}

#chatSidebar .bp-chat-history::-webkit-scrollbar-thumb {
    border-radius: 10px;
}

/* =========================================================
   INDIVIDUAL CONVERSATION
========================================================= */

#chatSidebar .bp-chat-history-item {
    display: flex !important;
    flex-direction: column !important;
    align-items: flex-start;
    justify-content: center;

    position: relative;
    width: 100% !important;
    height: auto !important;
    min-height: 65px !important;

    padding: 12px 10px !important;
    margin: 0 0 5px !important;

    box-sizing: border-box !important;

    white-space: normal !important;
    overflow: visible !important;
    flex-shrink: 0 !important;
}

/* Conversation Title */
#chatSidebar .bp-chat-history-title {
    display: block !important;
    width: 100%;

    white-space: normal !important;
    overflow-wrap: anywhere !important;
    word-break: break-word;
}

/* Conversation Date */
#chatSidebar .bp-chat-history-time {
    display: block !important;
    width: 100%;
    margin-top: 5px !important;
}

/* Empty History */
#chatSidebar .bp-chat-history-empty {
    width: 100%;
    padding: 15px 10px;
    text-align: center;
    box-sizing: border-box;
}

/* =========================================================
   CHAT MAIN AREA
========================================================= */

#aiChat .bp-chat-main {
    display: flex;
    flex-direction: column;

    width: 100%;
    min-width: 0;
    max-width: 100%;
}

/* Messages */
#aiChat .bp-chat-messages {
    width: 100%;
    min-width: 0;
}

/* Chat Note */
#aiChat .bp-chat-note {
    width: 100%;
    margin-top: 8px;
    margin-bottom: 10px;
}

/* Input Bar */
#aiChat .bp-chat-inputbar {
    display: flex;
    align-items: center;
    width: 100%;
    min-width: 0;
    gap: 8px;
}

#aiChat .bp-chat-inputbar .bp-form-control {
    flex: 1 1 auto;
    min-width: 0;
}

/* =========================================================
   HISTORY SHOW / HIDE FIX
========================================================= */

/* History Visible */
#chatSidebar:not(.d-none) {
    display: flex !important;
}

/* History Hidden */
#chatSidebar.d-none {
    display: none !important;
}

/* Full Width Chat */
#aiChat.history-hidden {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 0;
    width: 100%;
}

#aiChat.history-hidden .bp-chat-main {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0;
}

/* =========================================================
   TABLET RESPONSIVE
========================================================= */

@media (min-width: 768px) and (max-width: 991.98px) {

    #aiChat {
        grid-template-columns: 230px minmax(0, 1fr);
        gap: 14px;
    }

    #chatSidebar .bp-chat-history {
        max-height: 310px !important;
    }

}

/* =========================================================
   MOBILE RESPONSIVE
========================================================= */

@media (max-width: 767.98px) {

    /* Toolbar */
    .bp-chat-toolbar {
        margin: 12px 0 16px;
        padding: 0 5px;
    }

    #btnToggleHistory {
        min-height: 38px;
        padding: 8px 12px;
        font-size: 13px;
    }

    /* Main Layout */
    #aiChat {
        display: flex !important;
        flex-direction: column !important;
        align-items: stretch;

        width: 100%;
        gap: 12px;

        margin: 10px 0 35px !important;
    }

    /* Sidebar */
    #chatSidebar:not(.d-none) {
        display: flex !important;
        flex-direction: column !important;

        width: 100%;
        max-width: 100%;

        height: auto !important;
        max-height: none !important;

        margin: 0;
        overflow: hidden !important;
    }

    /* History - Mobile */
    #chatSidebar .bp-chat-history {
        display: block !important;

        width: 100%;
        height: auto !important;

        min-height: 0 !important;
        max-height: 310px !important;

        flex: 0 1 auto !important;

        overflow-y: auto !important;
        overflow-x: hidden !important;

        padding: 10px 10px 12px !important;
        margin: 0 !important;

        box-sizing: border-box !important;
        -webkit-overflow-scrolling: touch;
    }

    /* History Items */
    #chatSidebar .bp-chat-history-item {
        display: flex !important;

        width: 100% !important;
        height: auto !important;
        min-height: 65px !important;

        padding: 12px 10px !important;
        margin-bottom: 5px !important;

        flex-shrink: 0 !important;
    }

    /* Main Chat */
    #aiChat .bp-chat-main {
        display: flex;
        flex-direction: column;

        width: 100%;
        max-width: 100%;
        min-width: 0;
    }

    /* History Hidden */
    #aiChat.history-hidden {
        display: flex !important;
        flex-direction: column !important;
        gap: 0;
        width: 100%;
    }

    #aiChat.history-hidden .bp-chat-main {
        width: 100% !important;
        max-width: 100% !important;
    }

    /* Input */
    #aiChat .bp-chat-inputbar {
        width: 100%;
        gap: 7px;
    }

}

/* =========================================================
   SMALL MOBILE
========================================================= */

@media (max-width: 480px) {

    .bp-chat-toolbar {
        margin-top: 10px;
        margin-bottom: 15px;
    }

    #chatSidebar .bp-chat-sidebar-head {
        padding: 12px;
    }

    /* Maximum 4 standard conversation rows */
    #chatSidebar .bp-chat-history {
        max-height: 310px !important;
        min-height: 0 !important;
        padding: 10px 8px 12px !important;
    }

    #chatSidebar .bp-chat-history-item {
        min-height: 65px !important;
        padding: 12px 10px !important;
    }

}

/* =========================================================
   END - AI CHAT CSS
========================================================= */


/* =====================================================
   ACCOUNTING MODE - FINAL SINGLE SELECT FIX
===================================================== */

.bp-radio-card {
    display: flex !important;
    width: 100%;
    height: 100%;
    padding: 12px 14px !important;
    border: 1px solid #dee2e6 !important;
    border-radius: 9px !important;
    background: #fff !important;
    cursor: pointer;
    transition: border-color .2s ease, background .2s ease;
}

/* Remove inner card border */
.bp-radio-card .bp-radio-card-body {
    width: 100%;
    padding: 0 !important;
    border: none !important;
    outline: none !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
}

/* Selected card only */
.bp-radio-card:has(input[type="radio"]:checked) {
    border: 2px solid #0d6efd !important;
    background: #f5f9ff !important;
}

/* Unselected card */
.bp-radio-card:not(:has(input[type="radio"]:checked)) {
    border: 1px solid #dee2e6 !important;
    background: #fff !important;
}

/* Hover */
.bp-radio-card:hover:not(:has(input[type="radio"]:checked)) {
    border-color: #adb5bd !important;
}

/* Hide native radio */
.bp-radio-card input[type="radio"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

@media (max-width: 767.98px) {
    .debit_credit_line td:nth-child(5),
    .debit_credit_line td:nth-child(6),
    .debit_credit_line tfoot td:nth-child(5),
    .debit_credit_line tfoot td:nth-child(6) {
        white-space: nowrap !important;
        word-break: normal !important;
        overflow-wrap: normal !important;
        font-size: 11px !important;
        text-align: right !important;
    }
}

@media (max-width: 767.98px) {
    .debit_credit_line tfoot td {
        white-space: nowrap !important;
        word-break: normal !important;
        overflow-wrap: normal !important;
        font-size: 11px !important;
    }

    .debit_credit_line tfoot td:first-child {
        white-space: nowrap !important;
        text-align: right !important;
    }

    .debit_credit_line tfoot td:nth-child(5),
    .debit_credit_line tfoot td:nth-child(6) {
        text-align: right !important;
        min-width: 85px !important;
    }
}

/* =========================================================
   GENERAL LEDGER - MOBILE CURRENCY SYMBOL FIX
========================================================= */

@media (max-width: 767.98px) {

    /* Debit, Credit and Balance columns */
    .bp-table td:nth-child(5),
    .bp-table td:nth-child(6),
    .bp-table td:nth-child(7),
    .bp-table th:nth-child(5),
    .bp-table th:nth-child(6),
    .bp-table th:nth-child(7) {
        white-space: nowrap !important;
        min-width: 100px !important;
    }

    /* Keep currency symbol and amount on one line */
    .bp-table td:nth-child(5),
    .bp-table td:nth-child(6),
    .bp-table td:nth-child(7) {
        font-size: 12px !important;
        text-align: right !important;
    }

    /* Summary card amounts */
    .gl-amount-value {
        white-space: nowrap !important;
    }
}

/* =========================================================
   GENERAL LEDGER - CLOSING BALANCE / TOTALS FIX
========================================================= */

@media (max-width: 767.98px) {

    /* Closing Balance / Totals label */
    .bp-table tbody tr.bp-table-group-header:last-child td:first-child {
        white-space: nowrap !important;
        text-align: right !important;
        min-width: 180px !important;
        font-size: 12px !important;
    }

    /* Closing Debit, Credit and Balance amounts */
    .bp-table tbody tr.bp-table-group-header:last-child td:nth-child(2),
    .bp-table tbody tr.bp-table-group-header:last-child td:nth-child(3),
    .bp-table tbody tr.bp-table-group-header:last-child td:nth-child(4) {
        white-space: nowrap !important;
        min-width: 100px !important;
        text-align: right !important;
    }

}

/* ==========================================
   Notification Dropdown - Stable Position Fix
   ========================================== */

#notificationDropdown.bp-notification-list {
    display: none;
    flex-direction: column;
    width: min(360px, calc(100vw - 24px));
    max-width: calc(100vw - 24px);
    max-height: min(520px, calc(100vh - 24px));
    overflow: hidden !important;
    box-sizing: border-box;
}

/* Show only when Bootstrap opens dropdown */
#notificationDropdown.bp-notification-list.show {
    display: flex !important;
}

#notificationDropdown .bp-notif-header,
#notificationDropdown .bp-push-toggle {
    flex: 0 0 auto;
}

#notificationDropdown .bp-notif-body {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
}

#notificationDropdown .bp-notif-footer {
    display: block;
    flex: 0 0 auto;
    position: relative;
    z-index: 5;
    width: 100%;
    padding: 8px 12px;
    background: var(--bp-card, #fff);
    border-top: 1px solid var(--bp-border, #e5e7eb);
}

#notificationDropdown .bp-notif-view-all {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 42px;
    padding: 10px 12px;
    line-height: 1.4;
    text-align: center;
    white-space: normal;
    box-sizing: border-box;
    text-decoration: none;
}

.customer-payment-amount {
        display: inline-flex !important;
        align-items: center !important;
        justify-content: flex-end !important;
        flex-direction: row !important;
        flex-wrap: nowrap !important;
        gap: 4px;
        white-space: nowrap !important;
        vertical-align: middle;
        max-width: none !important;
        width: auto !important;
    }

    .customer-payment-currency {
        display: inline-block !important;
        flex: 0 0 auto !important;
        white-space: nowrap !important;
        line-height: inherit !important;
    }

    .customer-payment-value {
        display: inline-block !important;
        flex: 0 0 auto !important;
        white-space: nowrap !important;
        line-height: inherit !important;
    }

    /* Prevent the Amount table cell from wrapping */
    .customer-payment-amount,
    .customer-payment-amount * {
        word-break: keep-all !important;
        overflow-wrap: normal !important;
    }

    .bp-ajax-tab table td:has(.customer-payment-amount) {
        white-space: nowrap !important;
        vertical-align: middle !important;
    }

    /* Customer Ledger Mobile Currency Fix */
    @media screen and (max-width: 767.98px) {

        #customerLedgerTable table {
            min-width: 700px;
        }

        #customerLedgerTable tbody td:nth-child(4),
        #customerLedgerTable tbody td:nth-child(5),
        #customerLedgerTable tbody td:nth-child(6) {
            white-space: nowrap !important;
            min-width: 110px;
            text-align: right !important;
        }

        #customerLedgerTable .ledger-amount {
            display: inline-flex !important;
            flex-direction: row !important;
            align-items: center !important;
            justify-content: flex-end !important;
            flex-wrap: nowrap !important;
            white-space: nowrap !important;
            gap: 4px;
        }

        #customerLedgerTable .ledger-amount span {
            display: inline !important;
            white-space: nowrap !important;
            flex-shrink: 0 !important;
        }
    }

    /* ==========================================
   Product Tags - Mobile Responsive Fix
   ========================================== */

/* Main Tagify Container */
.tagify {
    display: flex !important;
    flex-wrap: wrap !important;
    align-items: flex-start !important;

    width: 100% !important;
    max-width: 100% !important;

    min-height: 42px !important;
    height: auto !important;

    padding: 6px 8px !important;
    gap: 3px !important;

    box-sizing: border-box !important;
    overflow: visible !important;
}

/* Individual Tags */
.tagify__tag {
    display: inline-flex !important;

    max-width: 100% !important;
    min-width: 0 !important;

    margin: 2px 3px !important;
    box-sizing: border-box !important;
}

/* Tag Text */
.tagify__tag > div {
    display: flex !important;
    align-items: center !important;

    max-width: 100% !important;
    min-width: 0 !important;

    white-space: normal !important;
    overflow-wrap: anywhere !important;
    word-break: break-word !important;

    box-sizing: border-box !important;
}

/* Tag Text Content */
.tagify__tag-text {
    display: inline-block !important;

    max-width: 100% !important;

    white-space: normal !important;
    overflow-wrap: anywhere !important;
    word-break: break-word !important;
}

/* Input Area */
.tagify__input {
    flex: 1 1 120px !important;

    min-width: 80px !important;
    max-width: 100% !important;

    margin: 3px 0 !important;

    white-space: normal !important;
    overflow-wrap: anywhere !important;
}

/* Mobile Responsive */
@media (max-width: 576px) {
    .tagify {
        width: 100% !important;
        min-height: 42px !important;
        height: auto !important;
        padding: 5px 7px !important;
    }

    .tagify__tag {
        max-width: 100% !important;
    }

    .tagify__tag > div {
        max-width: 100% !important;
    }

    .tagify__tag-text {
        white-space: normal !important;
        overflow-wrap: anywhere !important;
        word-break: break-word !important;
    }
}

    /* Loan List - Principal & Repaid Amount */
    .loan-money-amount {
        display: inline-block !important;
        white-space: nowrap !important;
        word-break: normal !important;
        overflow-wrap: normal !important;
        max-width: none !important;
        flex-shrink: 0 !important;
    }

    /* Prevent currency and amount from wrapping */
    .bp-table td:has(.loan-money-amount) {
        white-space: nowrap !important;
        min-width: max-content !important;
    }


    /* Lender Ledger Footer Alignment */
.bp-table tfoot td {
    padding-right: 16px !important;
}

.bp-table tfoot td.text-end {
    text-align: right !important;
    white-space: nowrap;
}

.bp-table tfoot tr td[colspan="2"] {
    text-align: right !important;
    padding-right: 16px !important;
}


/* Only Courier Dashboard styles */

    .bp-courier-dashboard {
        width: 100%;
        min-width: 0;
    }

    .bp-courier-dashboard .bp-dash-pair {
        min-width: 0;
    }

    .bp-courier-dashboard .bp-dash-pair > .bp-card {
        min-width: 0;
        width: 100%;
    }

    /* Today's Parcel Updates Table */

    .bp-courier-dashboard .bp-courier-updates-body {
        min-width: 0;
        width: 100%;
    }

    .bp-courier-dashboard .bp-courier-updates-table {
        width: 100%;
        min-width: 0;
        table-layout: fixed;
        margin-bottom: 0;
    }

    .bp-courier-dashboard .bp-courier-updates-table th,
    .bp-courier-dashboard .bp-courier-updates-table td {
        box-sizing: border-box;
    }

    .bp-courier-dashboard .bp-courier-updates-table th:last-child,
    .bp-courier-dashboard .bp-courier-updates-table td:last-child {
        text-align: right;
    }

    /* Empty State */

    .bp-courier-dashboard .bp-courier-empty-row td {
        padding: 32px 12px !important;
        text-align: center !important;
        vertical-align: middle !important;
    }

    .bp-courier-dashboard .bp-courier-empty-content {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 12px;
        width: 100%;
        min-width: 0;
        text-align: center;
    }

    .bp-courier-dashboard .bp-courier-empty-content i {
        display: block;
        font-size: 28px;
        color: #64748b;
    }

    .bp-courier-dashboard .bp-courier-empty-content span {
        display: block;
        width: 100%;
        text-align: center;
        white-space: normal;
        overflow-wrap: anywhere;
        color: #64748b;
    }

    /* Mobile Responsive */

    @media (max-width: 767.98px) {

        .bp-courier-dashboard {
            width: 100%;
            min-width: 0;
            overflow: visible;
        }

        .bp-courier-dashboard .bp-dash-pair {
            display: grid;
            grid-template-columns: minmax(0, 1fr);
            width: 100%;
            min-width: 0;
            gap: 16px;
        }

        .bp-courier-dashboard .bp-dash-pair > .bp-card {
            width: 100%;
            min-width: 0;
            max-width: 100%;
            margin: 0;
        }

        .bp-courier-dashboard .bp-card-header {
            min-width: 0;
            box-sizing: border-box;
        }

        .bp-courier-dashboard .bp-courier-updates-card .bp-card-header {
            display: flex;
            align-items: center;
            justify-content: flex-start;
            width: 100%;
        }

        .bp-courier-dashboard .bp-courier-updates-card .bp-card-title {
            min-width: 0;
            max-width: 100%;
            white-space: normal;
        }

        .bp-courier-dashboard .bp-courier-updates-body {
            width: 100%;
            min-width: 0;
            overflow: hidden;
        }

        .bp-courier-dashboard .bp-courier-updates-table {
            width: 100% !important;
            min-width: 0 !important;
            max-width: 100%;
            table-layout: fixed;
        }

        .bp-courier-dashboard .bp-courier-updates-table th:first-child,
        .bp-courier-dashboard .bp-courier-updates-table td:first-child {
            width: 65%;
        }

        .bp-courier-dashboard .bp-courier-updates-table th:last-child,
        .bp-courier-dashboard .bp-courier-updates-table td:last-child {
            width: 35%;
            text-align: right !important;
        }

        .bp-courier-dashboard .bp-courier-empty-row td {
            padding: 30px 12px !important;
        }

        .bp-courier-dashboard .bp-courier-empty-content {
            width: 100%;
            align-items: center;
            justify-content: center;
            text-align: center;
        }

        .bp-courier-dashboard .bp-courier-events-card {
            width: 100%;
            min-width: 0;
        }

        .bp-courier-dashboard .bp-courier-events-card .bp-card-header {
            display: flex;
            flex-direction: row;
            align-items: center;
            justify-content: space-between;
            flex-wrap: wrap;
            gap: 8px;
        }

        .bp-courier-dashboard .bp-courier-events-card .bp-card-title {
            min-width: 0;
            white-space: normal;
        }

        .bp-courier-dashboard .bp-courier-events-card .bp-card-body {
            width: 100%;
            min-width: 0;
            box-sizing: border-box;
        }

    }


    * DTS Mobile Currency and Net Cash Position Fix */
    @media (max-width: 767.98px) {

        /* Date header layout */
        .bp-dts-page .bp-dts-date-card .bp-dts-date-content {
            display: flex !important;
            justify-content: space-between !important;
            align-items: center !important;
            gap: 10px !important;
        }

        .bp-dts-page .bp-dts-date-info {
            flex: 1 1 auto !important;
            min-width: 0 !important;
        }

        .bp-dts-page .bp-dts-cash-info {
            flex: 0 0 auto !important;
            min-width: max-content !important;
            text-align: right !important;
        }

        .bp-dts-page .bp-dts-cash-amount {
            display: block !important;
            white-space: nowrap !important;
            word-break: keep-all !important;
            overflow-wrap: normal !important;
            font-size: 16px !important;
            line-height: 1.5 !important;
        }

        .bp-dts-page .dts-currency-value {
            display: inline-block !important;
            white-space: nowrap !important;
        }

        /* Keep all DTS currency amounts on one line */
        .bp-dts-page .bp-dts-currency,
        .bp-dts-page .bp-stat-value,
        .bp-dts-page .bp-info-value,
        .bp-dts-page .bp-cart-summary-row > span:last-child,
        .bp-dts-page .bp-card-header > span {
            white-space: nowrap !important;
            word-break: keep-all !important;
            overflow-wrap: normal !important;
        }

    }


/* =========================================
   AI Chat History Show / Hide
   Desktop + Mobile
========================================= */

#aiChat {
    min-width: 0;
}

/* Sidebar hidden */
#aiChat.bp-chat-history-hidden .bp-chat-sidebar {
    display: none !important;
}

/* Chat area full width */
#aiChat.bp-chat-history-hidden .bp-chat-main {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    flex: 1 1 100% !important;
}

/* Prevent content overflow */
#aiChat .bp-chat-main {
    min-width: 0;
    flex: 1 1 auto;
}

/* History sidebar */
#aiChat .bp-chat-sidebar {
    min-width: 0;
}

/* Smooth transition */
#aiChat .bp-chat-sidebar,
#aiChat .bp-chat-main {
    transition: width 0.2s ease, flex 0.2s ease;
}

/* Mobile */
@media (max-width: 767.98px) {

    #aiChat.bp-chat-history-hidden .bp-chat-sidebar {
        display: none !important;
    }

    #aiChat.bp-chat-history-hidden .bp-chat-main {
        width: 100% !important;
        flex: 1 1 100% !important;
    }

}

/* =========================================
   AI Chat - Hide Only Conversation History
========================================= */

/* Never hide the complete sidebar */
#aiChat .bp-chat-sidebar {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

/* Keep language and new conversation visible */
#aiChat .bp-chat-sidebar-head {
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
}

/* Hide ONLY previous conversation list */
#aiChat .bp-chat-history.bp-history-hidden {
    display: none !important;
}

/* Keep chat messages visible */
#aiChat .bp-chat-main {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

/* Full width chat when history is hidden */
#aiChat .bp-chat-sidebar:has(.bp-history-hidden) {
    flex: 0 0 auto;
}

/* Mobile layout */
@media (max-width: 767.98px) {

    #aiChat .bp-chat-sidebar {
        display: flex !important;
        width: 100%;
        max-width: 100%;
    }

    #aiChat .bp-chat-sidebar-head {
        display: flex !important;
        width: 100%;
    }

    #aiChat .bp-chat-history.bp-history-hidden {
        display: none !important;
    }

    #aiChat .bp-chat-main {
        display: flex !important;
        width: 100%;
        min-width: 0;
    }

}

/* Detail Sales - Prevent currency and amount wrapping on mobile */
@media (max-width: 767.98px) {
    .bp-table td:nth-child(7),
    .bp-table td:nth-child(8),
    .bp-table td:nth-child(9),
    .bp-table tfoot td:nth-child(8),
    .bp-table tfoot td:nth-child(9) {
        white-space: nowrap !important;
        word-break: keep-all !important;
        overflow-wrap: normal !important;
    }
}

.employee-advance-card {
        min-width: 0;
        width: 100%;
        max-width: 100%;
    }

    .employee-advance-header {
        display: flex;
        align-items: center;
        justify-content: space-between;
        flex-wrap: wrap;
        gap: 12px;
        min-width: 0;
    }

    .employee-advance-header .bp-card-title {
        margin: 0;
        min-width: 0;
    }

    .employee-advance-actions {
        display: flex;
        align-items: center;
        justify-content: flex-end;
        flex-wrap: wrap;
        gap: 8px;
        min-width: 0;
        max-width: 100%;
    }

    .employee-advance-actions .bp-btn {
        white-space: nowrap;
        max-width: 100%;
    }

    @media (max-width: 576px) {
        .employee-advance-header {
            flex-direction: column;
            align-items: stretch;
        }

        .employee-advance-actions {
            display: grid;
            grid-template-columns: repeat(2, minmax(0, 1fr));
            width: 100%;
            gap: 8px;
        }

        .employee-advance-actions .bp-btn {
            width: 100%;
            min-width: 0;
            justify-content: center;
            padding-left: 6px;
            padding-right: 6px;
            font-size: 12px;
        }
    }

    /* Payroll Detail - Mobile Responsive Layout */

@media (max-width: 767.98px) {

    .payroll-table-wrapper {
        overflow-x: visible !important;
    }

    .payroll-table-wrapper .bp-table {
        display: block;
        width: 100%;
        min-width: 0 !important;
    }

    .payroll-table-wrapper .bp-table thead {
        display: none;
    }

    .payroll-table-wrapper .bp-table tbody {
        display: block;
        width: 100%;
    }

    .payroll-table-wrapper .bp-table tbody tr {
        display: flex;
        flex-direction: column;
        width: 100%;
        padding: 12px;
        border-bottom: 1px solid var(--bp-border, #e5e7eb);
        gap: 0;
    }

    .payroll-table-wrapper .bp-table tbody tr > td {
        display: flex;
        align-items: center;
        justify-content: space-between;
        width: 100%;
        max-width: 100%;
        padding: 9px 4px !important;
        text-align: right !important;
        border: 0 !important;
        border-bottom: 1px dashed var(--bp-border, #e5e7eb) !important;
        gap: 12px;
        box-sizing: border-box;
    }

    /* Employee information */
    .payroll-table-wrapper .bp-table tbody tr > td:first-child {
        display: block;
        text-align: left !important;
        padding: 10px 4px 12px !important;
        border-bottom: 1px solid var(--bp-border, #e5e7eb) !important;
        margin-bottom: 4px;
    }

    /* Salary field labels */
    .payroll-table-wrapper .bp-table tbody tr > td:nth-child(2)::before {
        content: "Basic Salary";
    }

    .payroll-table-wrapper .bp-table tbody tr > td:nth-child(3)::before {
        content: "Overtime";
    }

    .payroll-table-wrapper .bp-table tbody tr > td:nth-child(4)::before {
        content: "Bonus";
    }

    .payroll-table-wrapper .bp-table tbody tr > td:nth-child(5)::before {
        content: "Commission";
    }

    .payroll-table-wrapper .bp-table tbody tr > td:nth-child(6)::before {
        content: "Advance Deduction";
    }

    .payroll-table-wrapper .bp-table tbody tr > td:nth-child(7)::before {
        content: "Absent Deduction";
    }

    .payroll-table-wrapper .bp-table tbody tr > td:nth-child(8)::before {
        content: "Net Pay";
    }

    .payroll-table-wrapper .bp-table tbody tr > td:nth-child(9)::before {
        content: "Status";
    }

    .payroll-table-wrapper .bp-table tbody tr > td:nth-child(10)::before {
        content: "Actions";
    }

    .payroll-table-wrapper .bp-table tbody tr > td:nth-child(n+2)::before {
        flex: 0 0 42%;
        text-align: left;
        font-size: 12px;
        font-weight: 700;
        color: var(--bp-text-muted, #6b7280);
    }

    /* Salary inputs */
    .payroll-table-wrapper .bp-table tbody tr > td input[type="number"] {
        width: 55%;
        max-width: 160px !important;
        min-width: 0;
        flex: 1;
    }

    /* Advance balance */
    .payroll-table-wrapper .bp-table tbody tr > td:nth-child(6) > div {
        display: flex;
        align-items: center;
        justify-content: flex-end;
        flex-wrap: wrap;
        gap: 5px;
        text-align: right;
    }

    /* Net Pay */
    .payroll-table-wrapper .bp-table tbody tr > td:nth-child(8) {
        font-size: 15px;
        font-weight: 800;
    }

    /* Actions */
    .payroll-table-wrapper .bp-table tbody tr > td:last-child {
        justify-content: flex-start;
        flex-wrap: wrap;
        border-bottom: 0 !important;
        padding-top: 12px !important;
    }

    .payroll-table-wrapper .bp-table tbody tr > td:last-child::before {
        flex-basis: 100%;
        margin-bottom: 5px;
    }

    .payroll-table-wrapper .bp-table tbody tr > td:last-child .d-flex {
        width: 100%;
        flex-wrap: wrap;
    }

    .payroll-table-wrapper .bp-table tfoot {
        display: block;
        width: 100%;
    }

    .payroll-table-wrapper .bp-table tfoot tr {
        display: flex;
        flex-wrap: wrap;
        padding: 12px;
        gap: 8px;
    }

    .payroll-table-wrapper .bp-table tfoot td {
        display: block;
        width: 100%;
        text-align: left !important;
        padding: 6px 0 !important;
        border: 0 !important;
    }
}

/* Table ke auto layout e nin, jate column amount onujayi boro hoy */
        table.bp-sales-table,
        .bp-sales-table table {
            table-layout: auto !important;
        }

        /* Total, Paid, Due: ek line e, duto side e fanka, fixed min width */
        .bp-sales-table th:nth-last-child(-n+3),
        .bp-sales-table td:nth-last-child(-n+3) {
            white-space: nowrap;
            min-width: 150px;
            padding-left: 24px !important;
            padding-right: 24px !important;
        }

        /* Total column ager column theke aro alada */
        .bp-sales-table th:nth-last-child(3),
        .bp-sales-table td:nth-last-child(3) {
            padding-left: 40px !important;
        }

        /* Footer: label ar amount er majhe fanka */
        .bp-sales-table tfoot td[colspan] {
            padding-right: 32px !important;
        }

        /* Upore stat card er amount ek line e */
        .bp-stat-card .bp-stat-value {
            white-space: nowrap;
        }


/* ==========================================
   PROFESSIONAL QUOTATION CART
   Desktop unchanged | Mobile optimized
========================================== */

@media (max-width: 767.98px) {

    /* Cart wrapper */
    #lineItemsTable {
        width: 100% !important;
        min-width: 0 !important;
        border-collapse: separate !important;
        border-spacing: 0 12px !important;
    }

    #lineItemsTable thead {
        display: none !important;
    }

    #lineItemsTable tbody {
        display: block !important;
        width: 100% !important;
    }

    /* Individual product card */
    #lineItemsTable tbody tr {
        display: flex !important;
        flex-direction: column !important;
        width: 100% !important;
        margin: 0 0 14px !important;
        padding: 14px !important;
        background: var(--bp-surface) !important;
        border: 1px solid var(--bp-border) !important;
        border-radius: 12px !important;
        box-shadow: 0 3px 12px rgba(0, 0, 0, 0.045) !important;
        transition: box-shadow .2s ease, border-color .2s ease;
    }

    #lineItemsTable tbody tr:hover {
        border-color: var(--bp-primary) !important;
        box-shadow: 0 5px 16px rgba(0, 0, 0, .07) !important;
    }

    /* Reset table cells */
    #lineItemsTable tbody td {
        display: block !important;
        width: 100% !important;
        padding: 10px 0 !important;
        border: 0 !important;
        text-align: left !important;
        white-space: normal !important;
    }

    /* Product image */
    #lineItemsTable tbody td.bp-col-img {
        display: flex !important;
        align-items: center !important;
        min-height: 78px !important;
        padding: 0 0 12px !important;
        border-bottom: 1px solid var(--bp-border) !important;
    }

    #lineItemsTable .bp-line-item-img {
        width: 68px !important;
        height: 68px !important;
        object-fit: cover !important;
        border-radius: 10px !important;
        border: 1px solid var(--bp-border-soft) !important;
        background: var(--bp-bg) !important;
    }

    /* Product information */
    #lineItemsTable tbody td.bp-col-product {
        padding-top: 13px !important;
    }

    #lineItemsTable tbody td.bp-col-product::before,
    #lineItemsTable tbody td.bp-col-variants::before,
    #lineItemsTable tbody td:nth-child(4)::before,
    #lineItemsTable tbody td:nth-child(5)::before {
        display: block !important;
        margin-bottom: 7px !important;
        color: var(--bp-text-2) !important;
        font-size: 10px !important;
        font-weight: 700 !important;
        letter-spacing: .6px !important;
        text-transform: uppercase !important;
    }

    #lineItemsTable tbody td.bp-col-product::before {
        content: "PRODUCT INFORMATION";
    }

    #lineItemsTable tbody td.bp-col-variants::before {
        content: "VARIANT DETAILS";
    }

    #lineItemsTable tbody td:nth-child(4)::before {
        content: "TOTAL QUANTITY";
    }

    #lineItemsTable tbody td:nth-child(5)::before {
        content: "DISCOUNT";
    }

    #lineItemsTable tbody td.bp-col-product .fw-600 {
        font-size: 14px !important;
        font-weight: 700 !important;
        line-height: 1.5 !important;
    }

    /* Custom note */
    #lineItemsTable .bp-line-item-note {
        margin-top: 8px !important;
    }

    /* Variant details */
    #lineItemsTable .bp-qline-variants {
        width: 100% !important;
        padding: 9px 11px !important;
        background: var(--bp-bg) !important;
        border-radius: 8px !important;
    }

    #lineItemsTable .bp-qline-v-row {
        display: flex !important;
        flex-wrap: wrap !important;
        justify-content: space-between !important;
        align-items: center !important;
        gap: 5px !important;
        padding: 7px 0 !important;
        border-bottom: 1px dashed var(--bp-border) !important;
    }

    #lineItemsTable .bp-qline-v-row:last-child {
        border-bottom: 0 !important;
    }

    /* Quantity input */
    #lineItemsTable .bp-line-item-qty {
        width: 100% !important;
        max-width: 130px !important;
        height: 40px !important;
        font-weight: 600 !important;
        border-radius: 7px !important;
    }

    /* Discount */
    #lineItemsTable .bp-line-discount {
        display: flex !important;
        align-items: center !important;
        gap: 8px !important;
        width: 100% !important;
    }

    #lineItemsTable .bp-line-discount select {
        width: 78px !important;
        flex-shrink: 0 !important;
        height: 40px !important;
        border-radius: 7px !important;
    }

    #lineItemsTable .bp-line-discount input {
        flex: 1 !important;
        min-width: 0 !important;
        height: 40px !important;
        border-radius: 7px !important;
    }

    /* Subtotal section */
    #lineItemsTable tbody td:nth-child(6) {
        display: flex !important;
        justify-content: space-between !important;
        align-items: center !important;
        gap: 10px !important;
        margin-top: 5px !important;
        padding: 13px 11px !important;
        background: var(--bp-bg) !important;
        border-radius: 8px !important;
        border: 1px solid var(--bp-border) !important;
        font-size: 15px !important;
        font-weight: 700 !important;
        color: var(--bp-primary-ink) !important;
    }

    #lineItemsTable tbody td:nth-child(6)::before {
        content: "SUBTOTAL";
        color: var(--bp-text-2) !important;
        font-size: 10px !important;
        font-weight: 700 !important;
        letter-spacing: .6px !important;
    }

    /* Actions */
    #lineItemsTable tbody td:nth-child(7) {
        display: flex !important;
        justify-content: flex-end !important;
        align-items: center !important;
        gap: 8px !important;
        padding: 12px 0 0 !important;
    }

    #lineItemsTable tbody td:nth-child(7) .bp-btn {
        min-width: 38px !important;
        min-height: 38px !important;
        border-radius: 8px !important;
    }

    /* Consistent form controls */
    #lineItemsTable .bp-form-control,
    #lineItemsTable .bp-form-select {
        font-size: 13px !important;
    }

    /* Remove unwanted horizontal overflow */
    .bp-table-wrapper:has(#lineItemsTable) {
        overflow-x: hidden !important;
        padding: 0 10px !important;
    }

}

@media (max-width: 767.98px) {

    /* Quantity and Discount side by side */
    #lineItemsTable tbody tr {
        display: grid !important;
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) !important;
        column-gap: 12px !important;
    }

    /* Keep product, image, variant and subtotal full width */
    #lineItemsTable tbody td:nth-child(1),
    #lineItemsTable tbody td:nth-child(2),
    #lineItemsTable tbody td:nth-child(3),
    #lineItemsTable tbody td:nth-child(6),
    #lineItemsTable tbody td:nth-child(7) {
        grid-column: 1 / -1 !important;
    }

    /* Quantity */
    #lineItemsTable tbody td:nth-child(4) {
        grid-column: 1 !important;
        min-width: 0 !important;
    }

    /* Discount */
    #lineItemsTable tbody td:nth-child(5) {
        grid-column: 2 !important;
        min-width: 0 !important;
    }

    #lineItemsTable .bp-line-item-qty {
        max-width: 100% !important;
        width: 100% !important;
    }

    #lineItemsTable .bp-line-discount {
        gap: 5px !important;
    }

    #lineItemsTable .bp-line-discount select {
        width: 55px !important;
    }
}

@media (max-width: 767.98px) {

    /* Quantity field - half width */
    #lineItemsTable tbody td:nth-child(4) .bp-line-item-qty {
        width: 50% !important;
        max-width: 50% !important;
    }

    /* Discount amount input - larger width */
    #lineItemsTable tbody td:nth-child(5) .bp-line-discount {
        display: flex !important;
        width: 100% !important;
        gap: 6px !important;
    }

    #lineItemsTable tbody td:nth-child(5) .bp-line-discount select {
        width: 48px !important;
        flex: 0 0 48px !important;
    }

    #lineItemsTable tbody td:nth-child(5) .bp-line-discount input {
        width: 100% !important;
        min-width: 0 !important;
        flex: 1 1 auto !important;
    }
}


 /* Keep Total (filtered) currency symbol and amount on one line */
        @media (max-width: 767.98px) {

            .bp-table-total-row td {
                white-space: nowrap !important;
                word-break: normal !important;
                overflow-wrap: normal !important;
            }

            .bp-table-total-row td:nth-child(5) {
                display: table-cell !important;
                white-space: nowrap !important;
                min-width: 110px;
            }

            .bp-table-total-row td:nth-child(5) * {
                white-space: nowrap !important;
                display: inline !important;
            }
        }

/* Inventory Report - Equal Stats Card Height */
.bp-inventory-stats .bp-stat-card {
    width: 100%;
    height: 100%;
    min-height: 110px;
    display: flex;
    align-items: center;
}

/* Inventory Report - Responsive Stats Cards */
@media (max-width: 1499.98px) {
    .bp-inventory-stats .bp-stat-card {
        width: 100%;
        height: 100%;
        min-height: 110px;
    }

    .bp-inventory-stats > .col-xl-3 {
        flex: 0 0 50%;
        max-width: 50%;
    }
}

@media (max-width: 575.98px) {
    .bp-inventory-stats > .col-xl-3 {
        flex: 0 0 50%;
        max-width: 50%;
    }
}

/* Cash Flow filter bar (#514) — moved out of cashflow.blade.php; header rule scoped to this page */
/* Cashflow Filter - Desktop */
.cashflow_filter {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.cashflow_filter .bp-form-control,
.cashflow_filter .bp-form-select {
    min-width: 130px;
}

.cashflow_filter .filtar_btn {
    min-width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* Cashflow Filter - Mobile */
@media (max-width: 767px) {

    .bp-card-header:has(.cashflow_filter) {
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 14px;
    }

    .cashflow_filter {
        display: grid !important;
        grid-template-columns: 1fr 1fr;
        gap: 10px;
        width: 100%;
        align-items: end;
    }

    .cashflow_filter label {
        display: block;
        margin-bottom: 5px !important;
        font-size: 12px;
        font-weight: 600;
    }

    .cashflow_filter input[type="date"],
    .cashflow_filter select {
        width: 100% !important;
        min-width: 0 !important;
        height: 40px;
        box-sizing: border-box;
    }

    /* From Date and To Date */
    .cashflow_filter label:nth-of-type(1),
    .cashflow_filter label:nth-of-type(2) {
        grid-row: 1;
    }

    .cashflow_filter input[name="date_from"] {
        grid-column: 1;
        grid-row: 2;
    }

    .cashflow_filter input[name="date_to"] {
        grid-column: 2;
        grid-row: 2;
    }

    /* Account field */
    .cashflow_filter label:nth-of-type(3) {
        grid-column: 1 / -1;
        grid-row: 3;
    }

    .cashflow_filter select[name="account_id"] {
        grid-column: 1 / -1;
        grid-row: 4;
    }

    /* Filter and Reset buttons */
    .cashflow_filter button,
    .cashflow_filter a {
        width: 100% !important;
        height: 40px;
        margin: 0 !important;
        grid-row: 5;
    }

    .cashflow_filter button {
        grid-column: 1;
    }

    .cashflow_filter a {
        grid-column: 2;
    }
}

/* Small Mobile */
@media (max-width: 380px) {
    .cashflow_filter {
        gap: 8px;
    }

    .cashflow_filter input[type="date"] {
        font-size: 11px;
        padding: 5px;
    }
}

[data-theme="dark"] .cashflow_filter input[type="date"],
[data-theme="dark"] .cashflow_filter select {
    color-scheme: dark;
}

/* Sales list filter bar — responsive fix (#518), moved out of sale index.blade.php. All rules scoped to .bp-sales-table; layout only, no colours, so no dark override needed */

/* ==========================================
   SALES FILTER BAR - RESPONSIVE FIX
========================================== */

/* Common desktop and laptop layout */
.bp-sales-table .bp-table-filter-bar,
.bp-sales-table .bp-filter-bar {
width: 100% !important;
max-width: 100% !important;
min-width: 0 !important;
box-sizing: border-box !important;
overflow: visible !important;
}

.bp-sales-table .bp-table-filter-bar form,
.bp-sales-table .bp-filter-bar form {
width: 100% !important;
max-width: 100% !important;
min-width: 0 !important;
display: flex !important;
align-items: center !important;
justify-content: flex-start !important;
flex-wrap: wrap !important;
gap: 8px !important;
box-sizing: border-box !important;
}

/* Prevent children from expanding outside the container */
.bp-sales-table .bp-table-filter-bar form > *,
.bp-sales-table .bp-filter-bar form > * {
box-sizing: border-box !important;
min-width: 0;
}

/* Search input */
.bp-sales-table .bp-table-filter-bar input:not([type="hidden"]):not(.bp-filter-date),
.bp-sales-table .bp-filter-bar input:not([type="hidden"]):not(.bp-filter-date) {
flex: 1 1 200px !important;
width: auto !important;
min-width: 150px !important;
max-width: 100% !important;
}

/* Date inputs */
.bp-sales-table .bp-table-filter-bar .bp-filter-date,
.bp-sales-table .bp-filter-bar .bp-filter-date {
flex: 1 1 140px !important;
width: 100% !important;
min-width: 120px !important;
max-width: 160px !important;
}

/* Date separator */
.bp-sales-table .bp-table-filter-bar .text-muted,
.bp-sales-table .bp-filter-bar .text-muted {
flex: 0 0 auto !important;
white-space: nowrap !important;
}

/* Select fields */
.bp-sales-table .bp-table-filter-bar select,
.bp-sales-table .bp-filter-bar select {
flex: 1 1 155px !important;
width: auto !important;
min-width: 135px !important;
max-width: 100% !important;
}

/* Buttons */
.bp-sales-table .bp-table-filter-bar button,
.bp-sales-table .bp-filter-bar button,
.bp-sales-table .bp-table-filter-bar a,
.bp-sales-table .bp-filter-bar a {
flex: 0 0 auto !important;
white-space: nowrap !important;
max-width: 100% !important;
}

/* Filter and refresh button alignment */
.bp-sales-table .bp-table-filter-bar .btn-group,
.bp-sales-table .bp-filter-bar .btn-group {
display: flex !important;
align-items: center !important;
flex-direction: row !important;
flex-wrap: nowrap !important;
gap: 8px !important;
flex: 0 0 auto !important;
margin-left: auto !important;
}

/* ==========================================
   LAPTOP: 992px - 1350px
========================================== */

@media screen and (min-width: 992px) and (max-width: 1350px) {

.bp-sales-table .bp-table-filter-bar,
.bp-sales-table .bp-filter-bar {
    width: 100% !important;
    max-width: 100% !important;
    overflow: visible !important;
}

.bp-sales-table .bp-table-filter-bar form,
.bp-sales-table .bp-filter-bar form {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: flex-start !important;
    flex-wrap: wrap !important;
    gap: 7px !important;
    width: 100% !important;
    max-width: 100% !important;
}

/* Search */
.bp-sales-table .bp-table-filter-bar input:not([type="hidden"]):not(.bp-filter-date),
.bp-sales-table .bp-filter-bar input:not([type="hidden"]):not(.bp-filter-date) {
    flex: 1 1 180px !important;
    width: auto !important;
    min-width: 145px !important;
    max-width: 220px !important;
}

/* Date fields */
.bp-sales-table .bp-table-filter-bar .bp-filter-date,
.bp-sales-table .bp-filter-bar .bp-filter-date {
    flex: 1 1 125px !important;
    width: auto !important;
    min-width: 115px !important;
    max-width: 145px !important;
}

/* Select fields */
.bp-sales-table .bp-table-filter-bar select,
.bp-sales-table .bp-filter-bar select {
    flex: 1 1 140px !important;
    width: auto !important;
    min-width: 125px !important;
    max-width: 160px !important;
}

/* Keep date separator compact */
.bp-sales-table .bp-table-filter-bar .text-muted,
.bp-sales-table .bp-filter-bar .text-muted {
    flex: 0 0 auto !important;
    white-space: nowrap !important;
}

/* Filter action buttons */
.bp-sales-table .bp-table-filter-bar button,
.bp-sales-table .bp-filter-bar button {
    flex-shrink: 0 !important;
    white-space: nowrap !important;
}

.bp-sales-table .bp-table-filter-bar .btn-group,
.bp-sales-table .bp-filter-bar .btn-group {
    margin-left: auto !important;
    flex: 0 0 auto !important;
    display: inline-flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    align-items: center !important;
    gap: 7px !important;
}
}

/* ==========================================
   SMALL LAPTOP: 992px - 1150px
========================================== */

@media screen and (min-width: 992px) and (max-width: 1150px) {

.bp-sales-table .bp-table-filter-bar form,
.bp-sales-table .bp-filter-bar form {
    gap: 6px !important;
}

.bp-sales-table .bp-table-filter-bar input:not([type="hidden"]):not(.bp-filter-date),
.bp-sales-table .bp-filter-bar input:not([type="hidden"]):not(.bp-filter-date) {
    flex: 1 1 150px !important;
    min-width: 125px !important;
    max-width: 190px !important;
}

.bp-sales-table .bp-table-filter-bar .bp-filter-date,
.bp-sales-table .bp-filter-bar .bp-filter-date {
    flex: 1 1 115px !important;
    min-width: 105px !important;
    max-width: 130px !important;
}

.bp-sales-table .bp-table-filter-bar select,
.bp-sales-table .bp-filter-bar select {
    flex: 1 1 125px !important;
    min-width: 115px !important;
    max-width: 145px !important;
}
}

/* ==========================================
   TABLET: 768px - 991px
========================================== */

@media screen and (min-width: 768px) and (max-width: 991px) {

.bp-sales-table .bp-table-filter-bar form,
.bp-sales-table .bp-filter-bar form {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 8px !important;
}

.bp-sales-table .bp-table-filter-bar input:not([type="hidden"]),
.bp-sales-table .bp-filter-bar input:not([type="hidden"]) {
    flex: 1 1 180px !important;
    min-width: 140px !important;
    max-width: 100% !important;
}

.bp-sales-table .bp-table-filter-bar select,
.bp-sales-table .bp-filter-bar select {
    flex: 1 1 160px !important;
    min-width: 140px !important;
    max-width: 100% !important;
}

.bp-sales-table .bp-table-filter-bar .btn-group,
.bp-sales-table .bp-filter-bar .btn-group {
    margin-left: 0 !important;
}
}

/* ==========================================
   MOBILE: BELOW 768px
========================================== */

@media screen and (max-width: 767px) {

.bp-sales-table .bp-table-filter-bar,
.bp-sales-table .bp-filter-bar {
    width: 100% !important;
    max-width: 100% !important;
    overflow: visible !important;
}

.bp-sales-table .bp-table-filter-bar form,
.bp-sales-table .bp-filter-bar form {
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    flex-wrap: wrap !important;
    gap: 9px !important;
    width: 100% !important;
}

.bp-sales-table .bp-table-filter-bar input:not([type="hidden"]),
.bp-sales-table .bp-filter-bar input:not([type="hidden"]),
.bp-sales-table .bp-table-filter-bar select,
.bp-sales-table .bp-filter-bar select {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    flex: 1 1 100% !important;
}

.bp-sales-table .bp-table-filter-bar .text-muted,
.bp-sales-table .bp-filter-bar .text-muted {
    display: none !important;
}

.bp-sales-table .bp-table-filter-bar .btn-group,
.bp-sales-table .bp-filter-bar .btn-group {
    width: 100% !important;
    margin-left: 0 !important;
    justify-content: space-between !important;
}
}



/* =========================================================
   CUSTOMER LEDGER — SUMMARY CARDS (customers.ledger)
   Layout comes from .bp-kpis (4 → 2 at 1180px → 1 at 560px).
   Grid items stretch and rows are equal (1fr), so every card
   has the same width and height, incl. Net Balance's note.
   Amounts are always shown in full: the Blade view adds a
   length tier (bp-ledger-amt-s/m/l/xl) and the font scales
   with the card's content width (container query units), so
   only long amounts shrink. As a last resort the value wraps
   at the space after the currency symbol.
   Never ellipsis, never overflow.
   Kept above the "Bug 538" @media block below: that block is
   missing its closing brace, so anything after it only
   applies at ≤767.98px.
   No colours are introduced here — light/dark come from the
   existing .bp-stat-card tokens, so no dark override needed.
========================================================= */
.bp-cust-ledger-kpis {
    grid-auto-rows: 1fr;
    margin-bottom: 1.5rem;
}

.bp-cust-ledger-kpis > .bp-stat-card {
    align-self: stretch;
    min-width: 0;
}

.bp-cust-ledger-kpis .bp-stat-content {
    container-type: inline-size;
}

/* Beats .bp-stat-value-fit, the global ≤768px font-size and the
   ≤767.98px "white-space: nowrap" rule via higher specificity. */
.bp-cust-ledger-kpis .bp-stat-card .bp-stat-value {
    font-size: 24px;
    white-space: normal;
    overflow: visible;
    text-overflow: clip;
    overflow-wrap: anywhere;
}

/* Length tiers (character count of the formatted amount):
   s ≤10, m ≤14, l ≤18, xl >18. Factor ≈ 100 / (0.58 × chars). */
.bp-cust-ledger-kpis .bp-stat-card .bp-stat-value.bp-ledger-amt-s {
    font-size: clamp(16px, 17cqi, 24px);
}

.bp-cust-ledger-kpis .bp-stat-card .bp-stat-value.bp-ledger-amt-m {
    font-size: clamp(15px, 12.3cqi, 24px);
}

.bp-cust-ledger-kpis .bp-stat-card .bp-stat-value.bp-ledger-amt-l {
    font-size: clamp(14px, 9.6cqi, 24px);
}

.bp-cust-ledger-kpis .bp-stat-card .bp-stat-value.bp-ledger-amt-xl {
    font-size: clamp(13px, 7.8cqi, 24px);
}

/* Bug 538: Sales List (narrow screens) - a long customer address wraps inside its column instead of running under the Sale Status select. */
@media (max-width: 767.98px) {
    .bp-sales-table .bp-sale-customer {
        overflow-wrap: anywhere;
    }

    .bp-sales-table .bp-sale-status-cell {
        min-width: 105px;
    }
/* ===========================================
   Top Dues card (dashboard) — moved out of the component view (#340)
=========================================== */

/* Empty State */
.bp-top-dues .bp-top-dues-empty {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: row;
    gap: 9px;

    width: 100%;
    min-height: 140px;

    margin: 0;
    padding: 20px 12px;

    text-align: center;
    box-sizing: border-box;
}

/* Empty State Icon */
.bp-top-dues .bp-top-dues-empty i {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    position: static !important;

    width: auto;
    height: auto;

    margin: 0 !important;
    padding: 0 !important;

    flex: 0 0 auto;

    font-size: 19px;
    line-height: 1;

    color: var(--bp-success);
}

/* Empty State Text */
.bp-top-dues .bp-top-dues-empty-text {
    display: inline-block;

    margin: 0 !important;
    padding: 0 !important;

    font-size: 14px;
    font-weight: 600;
    line-height: 1.5;

    color: var(--bp-muted);
}

/* Prevent unwanted left spacing */
.bp-top-dues .bp-top-dues-empty > * {
    float: none !important;
    left: auto !important;
    right: auto !important;
    transform: none;
}

/* Customer Name */
.bp-top-dues .bp-top-dues-name {
    text-decoration: none;
}

.bp-top-dues .bp-top-dues-name:hover {
    text-decoration: underline;
}

/* Due Amount */
.bp-top-dues .bp-top-dues-due {
    white-space: nowrap;
}

/* Mobile Responsive */
@media (max-width: 560px) {

    .bp-top-dues .bp-top-dues-empty {
        min-height: 120px;
        gap: 8px;
        padding: 18px 10px;
    }

    .bp-top-dues .bp-top-dues-empty i {
        font-size: 17px;
    }

    .bp-top-dues .bp-top-dues-empty-text {
        font-size: 13px;
    }

}


/* Website → Collections → Auto rules: the Brands/Categories dropdowns open above the following cards (bug 188) */
#autoSection,
#autoSection .bp-card-body {
    overflow: visible;
}

.bp-collection-select2-dropdown {
    z-index: 1100;
}

.bp-collection-select2-dropdown .select2-results__options {
    max-height: 280px;
}

.bp-collection-select2-dropdown.select2-dropdown {
    border-bottom: 1px solid var(--bp-border);
    box-shadow: var(--bp-shadow-lg);
}

[data-theme="dark"] .bp-collection-select2-dropdown.select2-dropdown {
    background-color: var(--bp-surface);
    border-color: var(--bp-border);
}

/* Assign to Courier shown but not usable yet (no courier configured) — links to courier settings */
.bp-courier-unconfigured {
    opacity: 0.6;
}

.bp-courier-unconfigured:hover {
    opacity: 0.85;
}

[data-theme="dark"] .bp-courier-unconfigured {
    color: var(--bp-text-2);
    opacity: 0.7;
}

/* Bug 539: Advance requests table - Approve/Reject wrap inside the Action cell and the Status text wraps, so neither overlaps the other. */
.bp-adv-req-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}

.bp-adv-req-status {
    min-width: 110px;
    overflow-wrap: anywhere;
}

.bp-adv-req-action {
    min-width: 150px;
}

/* Bugs 542 / 543: Credit and Debit Note item tables (narrow screens) - the product select keeps a readable width and the table scrolls sideways inside its wrapper. */
@media (max-width: 767.98px) {
    .bp-note-items {
        min-width: 900px;
    }

    .bp-note-items .bp-form-select {
        min-width: 200px;
        text-overflow: ellipsis;
    }
}

/* Sales List - Mobile Customer & Sale Status Fix */
@media (max-width: 767.98px) {

    /* Customer column */
    .bp-sales-table .bp-sale-customer {
        min-width: 200px !important;
        max-width: 220px !important;
        white-space: normal !important;
        overflow: hidden;
        overflow-wrap: anywhere !important;
        word-break: break-word !important;
        vertical-align: top;
    }

    /* Customer name, phone and address */
    .bp-sales-table .bp-sale-customer > div {
        max-width: 100%;
        white-space: normal !important;
        overflow-wrap: anywhere !important;
        word-break: break-word !important;
        line-height: 1.5;
    }

    /* Sale Status column */
    .bp-sales-table .bp-sale-status-cell {
        min-width: 105px !important;
        width: 105px !important;
        white-space: normal !important;
        vertical-align: top;
        overflow: hidden;
    }

    /* Sale Status dropdown */
    .bp-sales-table .bp-sale-status-select {
        display: block;
        width: 100% !important;
        min-width: 90px !important;
        max-width: 100% !important;
        box-sizing: border-box;
        white-space: nowrap;
    }

}
        /* Credit Note Items - Responsive */
    #itemsTable {
        width: 100%;
        min-width: 950px;
    }

    #itemsTable .product-select {
        min-width: 180px;
    }

    #itemsTable .item-description {
        min-width: 140px;
    }

    #itemsTable .line-total {
        white-space: nowrap;
        font-weight: 600;
    }

    #itemsTable .bp-form-control,
    #itemsTable .bp-form-select {
        min-height: 38px;
    }

    /* Mobile */
    @media (max-width: 767.98px) {

        #itemsTable {
            min-width: 950px;
        }

        #itemsTable .product-select {
            min-width: 200px;
            width: 200px;
        }

        #itemsTable .item-description {
            min-width: 160px;
        }

        #itemsTable td {
            vertical-align: middle;
        }

        #itemsTable .row-number {
            min-width: 35px;
        }

        #itemsTable .line-total {
            min-width: 110px;
        }

        #itemsTable tfoot td {
            white-space: nowrap;
            padding: 12px 8px;
        }

        #itemsTable .bp-form-control,
        #itemsTable .bp-form-select {
            font-size: 13px;
        }

        #itemsTable .remove-item-row {
            min-width: 34px;
            min-height: 34px;
        }

        /* Make horizontal scrolling smooth */
        #itemsTable {
            -webkit-overflow-scrolling: touch;
        }

        .bp-card-body.p-0 .bp-table-wrapper {
            overflow-x: auto !important;
            overflow-y: visible !important;
            width: 100%;
        }
    }


    /* =========================================
       Debit Note - Items Table Responsive Fix
    ========================================= */

    #dnItemsTable {
        width: 100%;
        min-width: 1050px;
        table-layout: auto;
    }

    #dnItemsTable th,
    #dnItemsTable td {
        vertical-align: middle;
    }

    #dnItemsTable .dn-product-select {
        width: 100%;
        min-width: 220px;
    }

    #dnItemsTable .dn-description {
        min-width: 170px;
    }

    #dnItemsTable .dn-qty {
        min-width: 75px;
    }

    #dnItemsTable .dn-price,
    #dnItemsTable .dn-tax {
        min-width: 110px;
    }

    #dnItemsTable .dn-line-total {
        min-width: 120px;
        white-space: nowrap;
        font-weight: 600;
    }

    #dnItemsTable .dn-remove-row {
        min-width: 34px;
        min-height: 34px;
    }

    #dnItemsTable tfoot td {
        white-space: nowrap;
    }

    /* Mobile Responsive */
    @media (max-width: 767.98px) {

        #dnItemsTable {
            min-width: 1050px;
        }

        #dnItemsTable .dn-product-select {
            min-width: 220px;
            width: 220px;
        }

        #dnItemsTable .dn-description {
            min-width: 170px;
        }

        #dnItemsTable .dn-qty {
            min-width: 75px;
        }

        #dnItemsTable .dn-price,
        #dnItemsTable .dn-tax {
            min-width: 110px;
        }

        #dnItemsTable .dn-line-total {
            min-width: 120px;
        }

        #dnItemsTable th,
        #dnItemsTable td {
            padding: 8px 7px;
        }

        #dnItemsTable .bp-form-control,
        #dnItemsTable .bp-form-select {
            font-size: 13px;
            min-height: 38px;
        }

        #dnItemsTable tfoot td {
            padding: 12px 8px;
        }

        /* Horizontal scrolling */
        #dnItemsTable {
            margin-bottom: 0;
        }

        #dnItemsTable_wrapper,
        #dnItemsTable_wrapper .bp-table-wrapper,
        .bp-card-body.p-0 .bp-table-wrapper {
            width: 100%;
            max-width: 100%;
            overflow-x: auto !important;
            overflow-y: visible !important;
            -webkit-overflow-scrolling: touch;
        }
    }

/* Debit Note items: Select2 product dropdown keeps a readable width */
@media (max-width: 767.98px) {

    #dnItemsTable .select2-container {
        min-width: 220px !important;
        width: 220px !important;
    }

    #dnItemsTable .select2-selection--single {
        height: 38px !important;
        display: flex;
        align-items: center;
    }

    #dnItemsTable .select2-selection__rendered {
        line-height: 36px !important;
        padding-right: 25px !important;
        white-space: nowrap !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
    }

    #dnItemsTable .select2-dropdown {
        min-width: 250px !important;
    }
}



/* =========================================================
   DASHBOARD - SALES ANALYTICS FULL HEIGHT CHART
   ========================================================= */

/* Keep original dashboard card height and width */
.bp-dash-split > #bp-sales-analytics {
    display: flex;
    flex-direction: column;
    align-self: stretch !important;
    height: 100% !important;
    min-height: 0;
    min-width: 0;
    box-sizing: border-box;
}

/* Header remains at the top */
#bp-sales-analytics > .bp-card-header {
    flex: 0 0 auto;
    justify-content: space-between;
    align-items: center;
}

/* Sales amount remains below header */
#bp-sales-analytics > .bp-chart-meta {
    flex: 0 0 auto;
    margin-top: 12px;
    margin-bottom: 0;
}

/* Chart fills all remaining vertical space */
#bp-sales-analytics > .bp-chart-plot {
    position: relative;
    flex: 1 1 auto !important;
    width: 100%;
    height: auto !important;
    min-height: 220px;
    max-height: none;
    margin-top: 8px;
    margin-bottom: 0;
}

/* Canvas fills chart container */
#bp-sales-analytics #salesChart {
    display: block;
    width: 100% !important;
    height: 100% !important;
}

/* Bug 538: Sales List (narrow screens) - a long customer address wraps inside its column instead of running under the Sale Status select. */
@media (max-width: 767.98px) {
    .bp-sales-table .bp-sale-customer {
        overflow-wrap: anywhere;
    }

    .bp-sales-table .bp-inline-status {
        min-width: 90px;
    }
}

/* ── Sales commission (targets page, commission pages, dashboards, payroll badge) ── */
.bp-commission-lock-banner {
    display: flex;
    align-items: center;
    padding: 10px 14px;
    border: 1px solid var(--bp-border);
    border-radius: var(--bp-border-radius);
    background: var(--bp-warning-bg);
    color: var(--bp-warning-ink);
    font-size: 13px;
    font-weight: 600;
}

.bp-commission-tier-table .bp-amount-affix {
    max-width: 220px;
}

.bp-commission-tier-action-col {
    width: 56px;
    text-align: end;
}

.bp-commission-error,
.bp-commission-warning {
    color: var(--bp-danger-ink);
    font-size: 12px;
    margin-top: 4px;
}

.bp-commission-empty,
.bp-commission-note,
.bp-commission-last {
    color: var(--bp-muted);
    font-size: 12px;
}

.bp-commission-empty {
    padding: 12px 16px;
    margin: 0;
}

.bp-commission-note {
    margin-top: 8px;
    line-height: 1.5;
}

.bp-commission-last {
    border-top: 1px solid var(--bp-border-soft);
    margin-top: 12px;
    padding-top: 10px;
}

.bp-commission-stat {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 12px;
    padding: 4px 0;
    font-size: 13px;
    color: var(--bp-text);
}

.bp-commission-stat > span {
    color: var(--bp-muted);
}

.bp-commission-stat-total {
    border-top: 1px solid var(--bp-border-soft);
    margin-top: 4px;
    padding-top: 8px;
    font-size: 14px;
}

.bp-commission-stat-total > strong {
    color: var(--bp-success-ink);
}

.bp-commission-part + .bp-commission-part {
    border-top: 1px dashed var(--bp-border);
    margin-top: 10px;
    padding-top: 10px;
}

.bp-commission-link {
    font-size: 12px;
    font-weight: 600;
    color: var(--bp-primary-ink);
    text-decoration: none;
}

.bp-commission-link:hover {
    text-decoration: underline;
}

.bp-commission-badge {
    display: inline-block;
    margin-top: 4px;
    padding: 1px 6px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    white-space: nowrap;
}

.bp-commission-badge.is-auto {
    background: var(--bp-success-bg);
    color: var(--bp-success-ink);
}

.bp-commission-badge.is-manual {
    background: var(--bp-warning-bg);
    color: var(--bp-warning-ink);
}

[data-theme="dark"] .bp-commission-lock-banner {
    background: var(--bp-warning-bg);
    color: var(--bp-warning-ink);
    border-color: var(--bp-border);
}

[data-theme="dark"] .bp-commission-error,
[data-theme="dark"] .bp-commission-warning {
    color: var(--bp-danger-ink);
}

[data-theme="dark"] .bp-commission-empty,
[data-theme="dark"] .bp-commission-note,
[data-theme="dark"] .bp-commission-last,
[data-theme="dark"] .bp-commission-stat > span {
    color: var(--bp-muted);
}

[data-theme="dark"] .bp-commission-stat {
    color: var(--bp-text);
}

[data-theme="dark"] .bp-commission-stat-total,
[data-theme="dark"] .bp-commission-last {
    border-color: var(--bp-border-soft);
}

[data-theme="dark"] .bp-commission-part + .bp-commission-part {
    border-color: var(--bp-border);
}

[data-theme="dark"] .bp-commission-stat-total > strong,
[data-theme="dark"] .bp-commission-badge.is-auto {
    color: var(--bp-success-ink);
}

[data-theme="dark"] .bp-commission-badge.is-auto {
    background: var(--bp-success-bg);
}

[data-theme="dark"] .bp-commission-badge.is-manual {
    background: var(--bp-warning-bg);
    color: var(--bp-warning-ink);
}

[data-theme="dark"] .bp-commission-link {
    color: var(--bp-primary-ink);
}

@media (max-width: 767.98px) {
    .bp-commission-tier-table .bp-amount-affix {
        max-width: none;
    }

    .bp-commission-stat {
        font-size: 12px;
    }
}

/* ── Commission summary card (Sales Targets → commission pages; bp-csum-*) ──
   Hero (earned commission) → target / achieved mini cards → achievement (bar capped at 100%, difference stated)
   → tier list. Separate from .bp-commission-* (used by the dashboard card). Tokens only; no gradients. */
.bp-csum-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.bp-csum-content {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.bp-csum-body {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 16px;
}

.bp-csum-main {
    display: flex;
    flex-direction: column;
    gap: 14px;
    min-width: 0;
}

.bp-csum-label,
.bp-csum-section-title {
    font-size: 11px;
    font-weight: 600;
    line-height: 1.3;
    letter-spacing: .07em;
    text-transform: uppercase;
    white-space: nowrap;
    color: var(--bp-muted);
}

.bp-csum-section-title {
    margin-bottom: 8px;
}

/* A. Hero */
.bp-csum-hero {
    padding: 14px 16px;
    border: 1px solid var(--bp-border-soft);
    border-radius: var(--bp-radius-md);
    background: var(--bp-primary-50);
}

.bp-csum-hero.is-earned {
    border-color: transparent;
    background: var(--bp-success-bg);
}

.bp-csum-hero-row {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: space-between;
    gap: 2px 12px;
}

.bp-csum-hero-amount {
    flex: 0 0 auto;
    max-width: 100%;
    font-size: 28px;
    font-weight: 800;
    line-height: 1.2;
    letter-spacing: -0.01em;
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
    color: var(--bp-text);
}

.bp-csum-hero.is-earned .bp-csum-hero-amount,
.bp-csum-hero.is-earned .bp-csum-label {
    color: var(--bp-success-ink);
}

.bp-csum-hero-reason {
    margin-top: 6px;
    font-size: 12.5px;
    line-height: 1.45;
    color: var(--bp-text-2);
}

/* B. Target / achieved mini cards: each at least as wide as its amount, so they stack instead of overlapping. */
.bp-csum-figures {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.bp-csum-figure {
    display: flex;
    flex: 1 1 0;
    flex-direction: column;
    gap: 4px;
    min-width: max-content;
    max-width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--bp-border-soft);
    border-radius: var(--bp-radius-sm);
    background: var(--bp-surface);
}

.bp-csum-figure-value {
    font-size: 16px;
    font-weight: 700;
    line-height: 1.25;
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
    color: var(--bp-text);
}

/* C. Achievement */
.bp-csum-achievement {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.bp-csum-row {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: space-between;
    gap: 2px 12px;
}

.bp-csum-row-label {
    font-size: 13px;
    font-weight: 600;
    color: var(--bp-text-2);
}

.bp-csum-pct {
    font-size: 20px;
    font-weight: 800;
    line-height: 1.2;
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
    color: var(--bp-text);
}

.bp-csum-bar {
    height: 10px;
}

.bp-csum-delta {
    font-size: 12.5px;
    font-weight: 600;
    color: var(--bp-text-2);
}

.bp-csum-delta > span {
    white-space: nowrap;
}

.bp-csum-delta.is-above,
.bp-csum-delta.is-on {
    color: var(--bp-success-ink);
}

.bp-csum-delta.is-below {
    color: var(--bp-warning-ink);
}

.bp-csum-delta-amount {
    font-variant-numeric: tabular-nums;
}

/* D. Tier list */
.bp-csum-tiers {
    min-width: 0;
}

.bp-csum-empty {
    font-size: 12.5px;
    color: var(--bp-muted);
}

.bp-csum-ladder {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.bp-csum-tier {
    display: grid;
    grid-template-columns: 22px auto minmax(0, 1fr) auto;
    grid-template-areas: "no threshold amount state" ". hint hint hint";
    align-items: center;
    column-gap: 10px;
    padding: 8px 10px;
    border: 1px solid transparent;
    border-radius: var(--bp-radius-sm);
    font-size: 13px;
    color: var(--bp-text-2);
}

.bp-csum-tier-no {
    grid-area: no;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    border-radius: 999px;
    background: var(--bp-border-soft);
    font-size: 11px;
    font-weight: 700;
    color: var(--bp-muted);
}

.bp-csum-tier-threshold {
    grid-area: threshold;
    font-weight: 600;
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}

.bp-csum-tier-amount {
    grid-area: amount;
    justify-self: end;
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}

.bp-csum-tier-state {
    grid-area: state;
    padding: 1px 8px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 600;
    white-space: nowrap;
    background: var(--bp-border-soft);
    color: var(--bp-muted);
}

.bp-csum-tier-hint {
    grid-area: hint;
    margin-top: 2px;
    font-size: 11.5px;
    color: var(--bp-primary-ink);
}

.bp-csum-tier.is-reached .bp-csum-tier-state {
    background: var(--bp-success-bg);
    color: var(--bp-success-ink);
}

.bp-csum-tier.is-applied {
    border-color: var(--bp-success);
    background: var(--bp-success-bg);
    font-weight: 700;
    color: var(--bp-success-ink);
}

.bp-csum-tier.is-applied .bp-csum-tier-no,
.bp-csum-tier.is-applied .bp-csum-tier-state {
    background: var(--bp-success-solid);
    color: var(--bp-on-solid);
}

.bp-csum-tier.is-next {
    border-color: var(--bp-border);
    background: var(--bp-primary-50);
    color: var(--bp-text);
}

.bp-csum-tier.is-next .bp-csum-tier-state {
    background: var(--bp-primary-100);
    color: var(--bp-primary-ink);
}

.bp-csum-tier.is-upcoming {
    color: var(--bp-muted);
}

/* E. How achievement is calculated */
.bp-csum-details {
    padding-top: 12px;
    border-top: 1px solid var(--bp-border-soft);
    font-size: 12px;
    color: var(--bp-muted);
}

.bp-csum-details > summary {
    cursor: pointer;
    font-size: 12.5px;
    font-weight: 600;
    color: var(--bp-text-2);
}

.bp-csum-details > p {
    margin-top: 8px;
    line-height: 1.55;
}

/* Tablet: the summary sits full width below the form; result on the left, tiers on the right. */
@media (min-width: 768px) and (max-width: 1199.98px) {
    .bp-csum-body {
        grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
        gap: 24px;
        align-items: start;
    }
}

/* Desktop: the narrow col-xl-4 sidebar. A slightly smaller hero amount keeps it on the same line as its label. */
@media (min-width: 1200px) {
    .bp-csum-hero-amount {
        font-size: 24px;
    }
}

@media (max-width: 359.98px) {
    .bp-csum-hero-amount {
        font-size: 24px;
    }

    .bp-csum-tier {
        grid-template-columns: 22px auto minmax(0, 1fr);
        grid-template-areas: "no threshold amount" ". state state" ". hint hint";
        row-gap: 4px;
    }

    .bp-csum-tier-state {
        justify-self: start;
    }
}

/* Dark mode */
[data-theme="dark"] .bp-csum-label,
[data-theme="dark"] .bp-csum-section-title,
[data-theme="dark"] .bp-csum-empty,
[data-theme="dark"] .bp-csum-details,
[data-theme="dark"] .bp-csum-tier.is-upcoming {
    color: var(--bp-muted);
}

[data-theme="dark"] .bp-csum-hero {
    border-color: var(--bp-border-soft);
    background: var(--bp-primary-50);
}

[data-theme="dark"] .bp-csum-hero.is-earned {
    border-color: transparent;
    background: var(--bp-success-bg);
}

[data-theme="dark"] .bp-csum-hero-amount,
[data-theme="dark"] .bp-csum-figure-value,
[data-theme="dark"] .bp-csum-pct,
[data-theme="dark"] .bp-csum-tier.is-next {
    color: var(--bp-text);
}

[data-theme="dark"] .bp-csum-hero.is-earned .bp-csum-hero-amount,
[data-theme="dark"] .bp-csum-hero.is-earned .bp-csum-label,
[data-theme="dark"] .bp-csum-delta.is-above,
[data-theme="dark"] .bp-csum-delta.is-on,
[data-theme="dark"] .bp-csum-tier.is-applied,
[data-theme="dark"] .bp-csum-tier.is-reached .bp-csum-tier-state {
    color: var(--bp-success-ink);
}

[data-theme="dark"] .bp-csum-delta.is-below {
    color: var(--bp-warning-ink);
}

[data-theme="dark"] .bp-csum-hero-reason,
[data-theme="dark"] .bp-csum-row-label,
[data-theme="dark"] .bp-csum-delta,
[data-theme="dark"] .bp-csum-tier,
[data-theme="dark"] .bp-csum-details > summary {
    color: var(--bp-text-2);
}

[data-theme="dark"] .bp-csum-figure {
    border-color: var(--bp-border-soft);
    background: var(--bp-surface);
}

[data-theme="dark"] .bp-csum-tier-no,
[data-theme="dark"] .bp-csum-tier-state {
    background: var(--bp-border-soft);
    color: var(--bp-muted);
}

[data-theme="dark"] .bp-csum-tier.is-reached .bp-csum-tier-state {
    background: var(--bp-success-bg);
}

[data-theme="dark"] .bp-csum-tier.is-applied {
    border-color: var(--bp-success);
    background: var(--bp-success-bg);
}

[data-theme="dark"] .bp-csum-tier.is-applied .bp-csum-tier-no,
[data-theme="dark"] .bp-csum-tier.is-applied .bp-csum-tier-state {
    background: var(--bp-success-solid);
    color: var(--bp-on-solid);
}

[data-theme="dark"] .bp-csum-tier.is-next {
    border-color: var(--bp-border);
    background: var(--bp-primary-50);
}

[data-theme="dark"] .bp-csum-tier.is-next .bp-csum-tier-state {
    background: var(--bp-primary-100);
    color: var(--bp-primary-ink);
}

[data-theme="dark"] .bp-csum-tier-hint {
    color: var(--bp-primary-ink);
}

[data-theme="dark"] .bp-csum-details {
    border-top-color: var(--bp-border-soft);
}

/* KPI value centered in its card (POS counter "Open Register"). Alignment only: theme-neutral, no dark override needed */
.bp-stat-value.bp-stat-value-center {
    text-align: center;
}

/* Support-view banner (Path App impersonation). Rendered by core::partials.impersonation-banner, silent elsewhere. */
.bp-impersonation-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 8px 16px;
    background: var(--bp-warning-bg);
    color: var(--bp-warning-ink);
}

.bp-impersonation-banner form {
    margin: 0;
}

[data-theme="dark"] .bp-impersonation-banner {
    background: var(--bp-warning-bg);
    color: var(--bp-warning-ink);
}

@media (max-width: 560px) {
    .bp-impersonation-banner {
        flex-wrap: wrap;
    }
}
