@import url("../brand/color-tokens.css");
@import url("../public-ui/fonts.css");
@import url("sizing.css?v=808");
/*
 * Hassoud POS Design System 4.4
 * Shared visual contract for the application shell, legacy Bootstrap,
 * DaisyUI, DataTables, Select2, modals, status feedback and reusable UI.
 */
:root {
    --hpos-shell-header-bg: linear-gradient(120deg, var(--hpos-brand-800), var(--hpos-brand-900));
    --hpos-navigation-hover-bg: var(--hpos-surface-subtle);
    --hpos-navigation-active-bg: linear-gradient(90deg, rgba(48, 186, 209, .16), rgba(48, 186, 209, .05));
    --hpos-font-arabic: "Changa", "Cairo", Tahoma, Arial, sans-serif;
    --hpos-font-latin: "Changa", Tahoma, Arial, sans-serif;
    --hpos-font-data: "Changa", Tahoma, Arial, sans-serif;
    --hpos-space-1: 4px;
    --hpos-space-2: 8px;
    --hpos-space-3: 12px;
    --hpos-space-4: 16px;
    --hpos-space-5: 20px;
    --hpos-space-6: 24px;
    --hpos-space-8: 32px;
    --hpos-space-10: 40px;
    --hpos-space-12: 48px;
    --hpos-radius-xs: 6px;
    --hpos-radius-sm: 8px;
    --hpos-radius-md: 12px;
    --hpos-radius-lg: 16px;
    --hpos-radius-xl: 20px;
    --hpos-control-sm: var(--hpos-ui-small);
    --hpos-control-md: var(--hpos-ui-control);
    --hpos-control-lg: var(--hpos-ui-large);
    --hpos-shadow-xs: 0 1px 2px rgba(6, 37, 63, .05);
    --hpos-shadow-sm: 0 5px 16px rgba(6, 37, 63, .07);
    --hpos-shadow-md: 0 14px 34px rgba(6, 37, 63, .11);
    --hpos-shadow-lg: 0 28px 70px rgba(6, 37, 63, .16);
    --hpos-motion-fast: 140ms;
    --hpos-motion-standard: 200ms;
    --hpos-motion-slow: 280ms;
    --hpos-ease: cubic-bezier(.2, .75, .25, 1);
    --hpos-layer-dropdown: 1050;
    --hpos-layer-sticky: 1070;
    --hpos-layer-modal: 1090;
    --hpos-layer-toast: 1120;
}

html:lang(ar), html[dir="rtl"] { --hpos-font-interface: var(--hpos-font-arabic); }
html:not([dir="rtl"]) { --hpos-font-interface: var(--hpos-font-latin); }

/* Module forms share the same responsive settings navigation and shell. */
.hpos-app .side-bar { position: sticky; top: 0; height: 100dvh; max-height: 100dvh; overflow: hidden; overscroll-behavior: contain; isolation: isolate; }
/* The header is outside the single scroll viewport. Sticky children inside a
   scrolling flex sidebar can lose their painted text while the block remains. */
.hpos-app .side-bar > a:first-of-type { position: relative; z-index: 2; flex: 0 0 auto; }
@media screen and (max-width: 1023.98px) {
    .hpos-app .side-bar.small-view-side-active {
        position: fixed;
        inset-block: 0;
        inset-inline-start: 0;
        display: flex !important;
        flex-direction: column;
        max-width: calc(100vw - 32px);
        z-index: 1000;
    }
}
.hpos-app .pos-tab-container { min-width: 0; }
/* Settings navigation is a quiet secondary control, with a clear selected state. */
.hpos-app .pos-tab-menu .list-group { display: grid; gap: 8px; margin: 0; }
.hpos-app .pos-tab-menu .list-group-item {
    display: flex; align-items: center; min-height: 48px; margin: 0;
    padding: 12px 16px; border: 1px solid var(--hpos-border); border-radius: 10px;
    background: var(--hpos-surface); color: var(--hpos-text); text-align: start;
    font-size: 13px; font-weight: 600; line-height: 1.8; white-space: normal;
}
.hpos-app .pos-tab-menu .list-group-item::after { display: none; }
.hpos-app .pos-tab-menu .list-group-item:hover { background: var(--hpos-surface-subtle); border-color: var(--hpos-accent-700); }
.hpos-app .pos-tab-menu .list-group-item.active { color: #fff; }
/* A decorative addon must never force a settings field onto another line. */
.hpos-app .pos-tab .input-group { flex-wrap: nowrap; }
.hpos-app .pos-tab .input-group > :is(.form-control,.select2-container) { min-width: 0; min-inline-size: 0; flex-basis: 0; }
.hpos-app .hpos-account-select { min-width: 0; }
.hpos-pos .hpos-pos-totals-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 160px), 1fr)); gap: 8px; }
.hpos-pos .hpos-pos-totals-row > div { min-width: 0; padding: 8px; white-space: normal; overflow-wrap: anywhere; }
.hpos-pos .pos-form-actions { position: fixed; inset-inline: 0; width: auto; max-width: 100%; }
.hpos-pos #pos_header_more_options { min-width: 0; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
.hpos-pos #scrollable-container { padding-block-end: calc(var(--hpos-pos-actions-height, 140px) + 20px + env(safe-area-inset-bottom)); }
/* Gradient action utilities receive paired text/background states in color-states.css. */
.hpos-app [class~="tw-bg-[#646EE4]"], .hpos-app .bg-purple { background-color: var(--hpos-brand-900) !important; }
.hpos-app [class~="tw-text-[#646EE4]"] { color: var(--hpos-accent-700) !important; }
.hpos-app .bi-kpi-modern.profit { background: var(--hpos-success); }
.hpos-app .bi-kpi-modern:is(.products, .transactions) { color: var(--hpos-text); }
.hpos-app .hpos-standalone-fragment > .modal { display: block; position: static; opacity: 1; overflow: visible; }
.hpos-app .hpos-standalone-fragment > .modal > .modal-dialog { transform: none; }
.hpos-app .hpos-standalone-fragment > .modal-dialog { max-width: 100%; margin-inline: auto; }
.hpos-app .hpos-account-select input[type="search"] { margin-block-end: 6px; }
.hpos-app .pos-tab-menu .list-group-item.active { background: var(--hpos-brand-900) !important; border-color: var(--hpos-brand-900) !important; }
.hpos-app :is(.btn, .tw-dw-btn, button) { overflow-wrap: break-word; }
.hpos-app .table-responsive { max-width: 100%; overscroll-behavior-inline: contain; }
.hpos-app .hpos-table-scroll { width: 100%; max-width: 100%; overflow-x: auto; }
.hpos-app .hpos-table-scroll > table { margin-block-end: 0; }
.hpos-app .content-header h1 { overflow-wrap: anywhere; }
@media (max-width: 767px) {
    .hpos-app .pos-tab-container { display: flex; flex-direction: column; }
    .hpos-app .pos-tab-container > .box-body { display: flex; flex-direction: column; }
    .hpos-app .pos-tab-menu, .hpos-app .pos-tab { float: none !important; width: 100% !important; max-width: 100%; }
    .hpos-app .pos-tab-menu { padding-inline: 0; margin-block-end: 16px; }
    .hpos-app .pos-tab-menu .list-group { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; }
    .hpos-app .pos-tab-menu .list-group-item { flex: 1 1 130px; border: 1px solid var(--hpos-border); border-radius: var(--hpos-radius-sm); white-space: normal; min-height: 44px; }
    .hpos-app .pos-tab { padding-inline: 0; }
    .hpos-app .pos-tab > .pos-tab-content { padding: 12px; }
    .hpos-app .modal-dialog { width: auto; margin: 12px; }
    .hpos-app :is(.btn-xs, .btn-sm, .tw-dw-btn-xs) { min-height: 36px; }
    .hpos-app :is(.input-group, .select2-container) { max-width: 100%; }
    .hpos-app .tox-tinymce { max-width: 100%; }
}
@media (max-height: 480px) and (orientation: landscape) {
    .hpos-pos .pos-form-actions, .hpos-pos .pos-form-actions button { max-width: 100%; }
    .hpos-pos .pos-form-actions { flex-wrap: wrap; }
}
@media print { .hpos-app .side-bar { display: none !important; } }

/* Match the specificity of legacy body.skin-* rules. These skin presets are
 * application chrome, rather than tenant-supplied brand settings. */
body.hpos-app { --business-primary: var(--hpos-brand-900); }

.hpos-app {
    min-width: 320px;
    background: var(--hpos-canvas);
    color: var(--hpos-text);
    font-family: var(--hpos-font-interface);
    font-size: 14px;
    line-height: 1.6;
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
}

.hpos-app *, .hpos-app *::before, .hpos-app *::after { box-sizing: border-box; }
.hpos-app :is(button, input, select, textarea) { font: inherit; }
.hpos-app .hpos-filter-toggle { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 4px 8px; background: transparent; border: 0; color: var(--hpos-accent-700); cursor: pointer; text-align: start; }
.hpos-app :is(h1, h2, h3, h4, h5, h6, .btn, .tw-dw-btn, .select2-container, .dataTables_wrapper, .swal-modal) { font-family: var(--hpos-font-interface); }
.hpos-app :is([data-money], .display_currency, .input_number, .input_quantity, .currency, .percentage) {
    direction: ltr;
    unicode-bidi: isolate;
    font-family: var(--hpos-font-data);
    font-variant-numeric: tabular-nums;
}
.hpos-app :is(a[href^="tel:"], [data-phone-number]) { direction: ltr; unicode-bidi: isolate; }
.hpos-app ::selection { background: rgba(48, 186, 209, .25); color: var(--hpos-brand-950); }
.hpos-app :where(a, button, input, select, textarea, summary, [tabindex]):focus-visible {
    outline: 2px solid var(--hpos-accent-700) !important;
    outline-offset: 2px !important;
    box-shadow: var(--hpos-focus) !important;
}
.hpos-skip-link { position: fixed; inset-block-start: 8px; inset-inline-start: 8px; z-index: 1200; padding: 10px 16px; border-radius: var(--hpos-radius-sm); background: var(--hpos-surface); color: var(--hpos-brand-900); font-weight: 800; box-shadow: var(--hpos-shadow-md); transform: translateY(-160%); transition: transform var(--hpos-motion-fast); }
.hpos-skip-link:focus { transform: none; }
.hpos-loading-indicator { width: 16px; height: 16px; flex: 0 0 auto; border: 2px solid currentColor; border-inline-end-color: transparent; border-radius: 50%; animation: hpos-spin .7s linear infinite; }
.hpos-is-loading { cursor: progress !important; }
@keyframes hpos-spin { to { transform: rotate(360deg); } }

/* Application shell and navigation */
.hpos-delegation-bar { position:sticky;top:0;z-index:1020;display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap;padding:8px 20px;min-height:52px;background:#e2f3f5;color:#083b49;border-bottom:1px solid #a8d5dc;font-family:var(--hpos-font-interface);font-size:13px;line-height:1.7; }
.hpos-delegation-bar ~ .thetop .side-bar.small-view-side-active { top:var(--hpos-delegation-height,52px) !important;max-height:calc(100dvh - var(--hpos-delegation-height,52px)); }
.hpos-delegation-context { display:flex;align-items:center;gap:10px;min-width:0;overflow-wrap:anywhere; }
.hpos-delegation-bar form { margin:0; }
.hpos-delegation-bar button { display:inline-flex;align-items:center;justify-content:center;gap:8px;min-height:40px;padding:7px 14px;border:1px solid #08788c;border-radius:8px;background:#fff;color:#075568;font:600 13px/1.7 var(--hpos-font-interface); }
.hpos-delegation-bar button:hover { background:#ccebf0; }
.hpos-delegation-bar button:focus-visible { outline:3px solid #08788c;outline-offset:3px; }
@media (max-width:480px) { .hpos-delegation-bar { padding:8px 12px;gap:6px; }.hpos-delegation-bar form { margin-inline-start:auto; } }
@media (max-width:600px) {
    .hpos-spreadsheet .content > .container-fluid > .row:has(#import-excel-file) {
        display:flex;flex-wrap:wrap;align-items:center;gap:10px;margin-inline:0;
    }
    .hpos-spreadsheet .content > .container-fluid > .row:has(#import-excel-file)::before,
    .hpos-spreadsheet .content > .container-fluid > .row:has(#import-excel-file)::after { content:none; }
    .hpos-spreadsheet .content > .container-fluid > .row:has(#import-excel-file) > div {
        float:none;width:auto;min-width:0;padding-inline:0;
    }
    .hpos-spreadsheet .content > .container-fluid > .row:has(#import-excel-file) > div:first-child { flex:0 0 auto; }
    .hpos-spreadsheet .content > .container-fluid > .row:has(#import-excel-file) > div:nth-child(2) { flex:1 1 100%;order:2; }
    .hpos-spreadsheet .content > .container-fluid > .row:has(#import-excel-file) > div:nth-child(3) { flex:1 1 auto;order:1;display:flex;align-items:center;justify-content:flex-end;flex-wrap:wrap;gap:8px; }
    .hpos-spreadsheet .content > .container-fluid > .row:has(#import-excel-file) > div:has(> .spreadsheet) { flex:1 1 100%;width:100%;order:3; }
    .hpos-spreadsheet #spreadsheet { display:flex;flex-wrap:wrap;justify-content:flex-end;gap:8px;margin:0; }
    .hpos-spreadsheet #spreadsheet button { float:none;min-height:44px;margin:0; }
    .hpos-spreadsheet .downloadSheet { float:none;min-height:44px;margin:0 !important; }
    .hpos-spreadsheet #import-excel-file { width:100%;min-width:0;min-height:44px;direction:ltr; }
}
.hpos-app:not(.hpos-public):not(.hpos-landing) main { background: var(--hpos-canvas) !important; }
.hpos-app #scrollable-container, .hpos-app .content-wrapper { background: var(--hpos-canvas); }
.hpos-app .content { padding: 0 22px 28px; }
.hpos-app .content-header { padding: 24px 22px 14px; margin: 0; }
.hpos-app .content-header > :is(h1, .tw-text-xl) { color: var(--hpos-brand-900) !important; }
.hpos-app .content-header small { color: var(--hpos-text-muted) !important; font-weight: 500 !important; }
.hpos-app .side-bar {
    border-inline-end: 1px solid rgba(215, 227, 230, .86) !important;
    background: var(--hpos-surface) !important;
    box-shadow: 5px 0 22px rgba(6, 37, 63, .04);
}
.hpos-app .side-bar > a:first-of-type,
.hpos-app .hpos-shell-header {
    background-color: var(--hpos-brand-900) !important;
    background-image: var(--hpos-shell-header-bg) !important;
    border-color: rgba(140, 222, 234, .18) !important;
}
.hpos-app .side-bar-heading { margin: 0; font-weight: 700 !important; letter-spacing: .01em; line-height: 1.5; overflow-wrap: anywhere; }
.hpos-app .side-bar > a:first-of-type { height: auto; min-height: 64px; padding: 12px; }
.hpos-app .hpos-sidebar-nav { flex: 1 1 0; min-width: 0; min-height: 0; overflow-x: hidden; overflow-y: auto; overscroll-behavior-y: contain; scrollbar-gutter: stable; scroll-padding-block: 12px; }
.hpos-app .side-bar .hpos-sidebar-link { min-width: 0; max-width: 100%; min-height: 44px; white-space: normal; }
.hpos-app .hpos-sidebar-label { flex: 1 1 0; min-width: 0; padding-block: 2px; white-space: normal; overflow: visible; overflow-wrap: anywhere; text-overflow: clip; line-height: 1.7; }
.hpos-app .hpos-sidebar-icon { display: inline-flex; flex: 0 0 20px; width: 20px; height: 20px; align-items: center; justify-content: center; font-size: 18px; line-height: 1; }
.hpos-app .hpos-sidebar-icon > svg { width: 20px; height: 20px; }
.hpos-app .hpos-sidebar-chevron { flex: 0 0 16px; width: 16px; height: 16px; margin-inline-start: auto; }
html[dir="ltr"] .hpos-app .hpos-sidebar-chevron { transform: scaleX(-1); }
.hpos-app .side-bar .chiled { padding-inline: 32px 12px; }
.hpos-app .side-bar .chiled a { min-width: 0; width: 100%; gap: 8px; padding: 8px; white-space: normal; overflow: visible; }
.hpos-app .side-bar .chiled a > span { min-width: 0; overflow-wrap: anywhere; }
[dir="rtl"] .hpos-app .side-bar .chiled > .tw-absolute { left: auto; right: 20px; }
.hpos-app .main-sidebar .sidebar-menu,
.hpos-app .side-bar :is(.sidebar-menu, .menu) { padding: 10px 8px 20px; }
.hpos-app .main-sidebar .sidebar-menu a,
.hpos-app .side-bar :is(.sidebar-menu, .menu) a,
.hpos-app .chiled a {
    min-height: 40px;
    margin-block: 2px;
    border-radius: var(--hpos-radius-sm);
    color: #425b6a;
    font-weight: 600;
    transition: color var(--hpos-motion-fast), background var(--hpos-motion-fast), transform var(--hpos-motion-fast);
}
.hpos-app .main-sidebar .sidebar-menu a:hover,
.hpos-app .side-bar :is(.sidebar-menu, .menu) a:hover,
.hpos-app .chiled a:hover { background: var(--hpos-navigation-hover-bg); color: var(--hpos-brand-900); }
.hpos-app .main-sidebar .sidebar-menu .active > a,
.hpos-app .side-bar :is(.sidebar-menu, .menu) .active > a {
    background: var(--hpos-navigation-active-bg);
    color: var(--hpos-brand-900);
    box-shadow: inset 3px 0 0 var(--hpos-accent-500);
}
[dir="rtl"] .hpos-app .main-sidebar .sidebar-menu .active > a,
[dir="rtl"] .hpos-app .side-bar :is(.sidebar-menu, .menu) .active > a { box-shadow: inset -3px 0 0 var(--hpos-accent-500); }
.hpos-app .app-header-dropdown,
.hpos-app :is(.dropdown-menu, .tw-dw-dropdown-content) {
    padding: 7px !important;
    border: 1px solid var(--hpos-border) !important;
    border-radius: var(--hpos-radius-md) !important;
    background: var(--hpos-surface) !important;
    box-shadow: var(--hpos-shadow-md) !important;
    color: var(--hpos-text);
    z-index: var(--hpos-layer-dropdown);
}
.hpos-app :is(.dropdown-menu, .tw-dw-dropdown-content) :is(a, button, [role="menuitem"]) {
    min-height: 38px;
    border-radius: var(--hpos-radius-sm);
}
.hpos-app :is(.dropdown-menu, .tw-dw-dropdown-content) :is(a, button, [role="menuitem"]):hover {
    background: var(--hpos-surface-subtle) !important;
    color: var(--hpos-brand-900) !important;
}

/* Surfaces, cards and information hierarchy */
.hpos-app :is(.box, .card, .tw-dw-card, .well, .panel) {
    border: 1px solid var(--hpos-border);
    border-radius: var(--hpos-radius-lg);
    background: var(--hpos-surface);
    box-shadow: var(--hpos-shadow-xs);
}
.hpos-app .box { margin-bottom: 20px; border-top: 1px solid var(--hpos-border); }
.hpos-app .box-header, .hpos-app .panel-heading, .hpos-app .card-header {
    min-height: 56px;
    padding: 14px 18px;
    border-bottom: 1px solid var(--hpos-border);
    border-radius: var(--hpos-radius-lg) var(--hpos-radius-lg) 0 0;
    background: transparent;
}
.hpos-app .box-title, .hpos-app .panel-title, .hpos-app .card-title {
    color: var(--hpos-brand-900);
    font-weight: 700;
    line-height: 1.45;
}
.hpos-app :is(.box-body, .panel-body, .card-body) { padding: 18px; }
.hpos-app :is(.box-footer, .panel-footer, .card-footer) {
    padding: 14px 18px;
    border-top: 1px solid var(--hpos-border);
    border-radius: 0 0 var(--hpos-radius-lg) var(--hpos-radius-lg);
    background: #fafcfc;
}
.hpos-app .small-box { overflow: hidden; border: 0; border-radius: var(--hpos-radius-lg); box-shadow: var(--hpos-shadow-sm); }
.hpos-app .small-box > .inner { padding: 18px; }
.hpos-app .small-box h3 { font-family: var(--hpos-font-data); font-variant-numeric: tabular-nums; }
.hpos-app .small-box-footer { min-height: 40px; display: flex; align-items: center; justify-content: center; }

/* Tailwind compatibility: map the legacy primary/indigo action palette to Hassoud. */
.hpos-app :is(.tw-bg-primary-700, .tw-bg-primary-800) {
    background-color: var(--hpos-brand-900) !important;
}
.hpos-app :is(.tw-text-primary-800) { color: var(--hpos-brand-900) !important; }
.hpos-app :is(.tw-border-primary-400, .tw-border-primary-500, .tw-border-primary-500\/30) {
    border-color: var(--hpos-accent-500) !important;
}
.hpos-app :is(.tw-ring-primary-300, .tw-ring-primary-300\/50, .tw-ring-primary-500) {
    --tw-ring-color: rgba(8, 127, 148, .42) !important;
}
.hpos-app :is(.tw-from-primary-800, .tw-from-indigo-500, .tw-from-indigo-600, .tw-from-indigo-700) {
    --tw-gradient-from: var(--hpos-brand-800) var(--tw-gradient-from-position) !important;
    --tw-gradient-to: rgba(11, 48, 78, 0) var(--tw-gradient-to-position) !important;
    --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to) !important;
}
.hpos-app :is(.tw-to-primary-900, .tw-to-blue-500, .tw-to-blue-600, .tw-to-blue-700) {
    --tw-gradient-to: var(--hpos-accent-700) var(--tw-gradient-to-position) !important;
}

/* Buttons: Bootstrap, DaisyUI, native actions and DataTables */
.hpos-app :is(.btn, .tw-dw-btn, .dt-button, .hpos-btn, button.hpos-action) {
    min-height: var(--hpos-control-md);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 8px 16px;
    border: 1px solid transparent;
    border-radius: var(--hpos-radius-sm) !important;
    font-weight: 700;
    line-height: 1.2;
    text-decoration: none;
    box-shadow: var(--hpos-shadow-xs);
    transition: transform var(--hpos-motion-fast) var(--hpos-ease), background-color var(--hpos-motion-fast), border-color var(--hpos-motion-fast), box-shadow var(--hpos-motion-fast);
}
.hpos-app :is(.btn, .tw-dw-btn, .dt-button, .hpos-btn, button.hpos-action):hover { transform: translateY(-1px); }
.hpos-app :is(.btn, .tw-dw-btn, .dt-button, .hpos-btn, button.hpos-action):active { transform: translateY(0); }
.hpos-app :is(.btn-xs, .tw-dw-btn-xs, .hpos-btn--xs) { min-height: var(--hpos-control-sm); padding: 5px 10px; font-size: 12px; }
.hpos-app :is(.btn-sm, .tw-dw-btn-sm, .hpos-btn--sm) { min-height: 38px; padding: 7px 13px; font-size: 13px; }
.hpos-app :is(.btn-lg, .tw-dw-btn-lg, .hpos-btn--lg) { min-height: var(--hpos-control-lg); padding: 10px 20px; }
.hpos-app :is(.btn-primary, .tw-dw-btn-primary, .hpos-btn--primary) {
    border-color: var(--business-primary, var(--hpos-brand-900)) !important;
    background: var(--business-primary, var(--hpos-brand-900)) !important;
    color: #fff !important;
}
.hpos-app :is(.btn-primary, .tw-dw-btn-primary, .hpos-btn--primary):hover { filter: brightness(.92); box-shadow: 0 8px 18px rgba(6, 37, 63, .18); }
.hpos-app :is(.btn-default, .tw-dw-btn-outline, .hpos-btn--secondary, .dt-button) {
    border-color: var(--hpos-border-strong) !important;
    background: var(--hpos-surface) !important;
    color: var(--hpos-brand-900) !important;
}
.hpos-app :is(.btn-default, .tw-dw-btn-outline, .hpos-btn--secondary, .dt-button):hover { background: var(--hpos-surface-subtle) !important; border-color: var(--hpos-accent-300) !important; }
.hpos-app :is(.btn-success, .tw-dw-btn-success, .hpos-btn--success) { background: var(--hpos-success) !important; border-color: var(--hpos-success) !important; color: #fff !important; }
.hpos-app :is(.btn-danger, .tw-dw-btn-error, .hpos-btn--danger) { background: var(--hpos-danger) !important; border-color: var(--hpos-danger) !important; color: #fff !important; }
.hpos-app :is(.btn-warning, .tw-dw-btn-warning, .hpos-btn--warning) { background: var(--hpos-warning) !important; border-color: var(--hpos-warning) !important; color: #fff !important; }
.hpos-app :is(.btn-info, .tw-dw-btn-info, .hpos-btn--info) { background: var(--hpos-info) !important; border-color: var(--hpos-info) !important; color: #fff !important; }
.hpos-app :is(.btn-link, .tw-dw-btn-ghost, .hpos-btn--quiet) { background: transparent !important; border-color: transparent !important; color: var(--hpos-brand-700) !important; box-shadow: none; }
.hpos-app .btn-group { display: inline-flex; align-items: stretch; }
/* Bootstrap's table cells cannot contain flex addons without splitting rows.
 * Use one shrinkable field and intrinsic-width actions in both directions. */
.hpos-app .input-group { display: flex; align-items: stretch; width: 100%; }
.hpos-app .input-group > :is(.form-control, .select2-container) {
    flex: 1 1 14ch; width: 0 !important; min-width: min(100%, calc(14ch + 26px)); float: none;
}
.hpos-app .input-group { flex-wrap: wrap; }
.hpos-app :is(input.input_number, input.input_quantity, input.form-control[type="number"]) {
    min-inline-size: min(100%, calc(18ch + 26px));
    max-inline-size: 100%;
}
.hpos-app .multi-input { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 6px 0; }
.hpos-app .multi-input > label { flex: 0 0 auto; max-width: calc(100% - 24px); }
.hpos-app .multi-input > br { display: block; width: 100%; content: ''; }
.hpos-app .multi-input > .form-control { flex: 1 1 0; min-width: 0; float: none; }
/* Editable tables must scroll rather than squeeze numbers between fixed-size
 * addons. Keep space for grouped amounts, decimals and a minus sign. */
.hpos-app table :is(input.form-control:not([type="hidden"]):not([type="checkbox"]):not([type="radio"]), select.form-control) {
    min-inline-size: calc(18ch + 26px);
}
.hpos-app table .input-group { flex-wrap: nowrap; min-inline-size: max-content; }
.hpos-app table .input-group > input.form-control {
    flex-basis: calc(18ch + 26px);
    min-inline-size: calc(18ch + 26px);
}
.hpos-app :is(.table-responsive, .hpos-table-scroll) > table.table { display: table; }
.hpos-app .hpos-table-scroll { min-width: 0; }
.hpos-app .input-group > :is(.input-group-addon, .input-group-btn) {
    display: inline-flex; flex: 0 0 auto; align-items: center; justify-content: center;
    width: auto; white-space: nowrap;
}
.hpos-app .input-group-btn > .btn {
    width: auto; min-width: var(--hpos-control-md); height: auto;
    align-self: stretch; margin: 0 !important; padding-inline: 12px;
}
.hpos-app .input-group > .input-group-btn { align-items: stretch; font-size: 14px; }
.hpos-app :is(.btn, .tw-dw-btn) { height: auto; white-space: normal; flex-shrink: 0; }
.hpos-app :is(.btn, .tw-dw-btn) > :is(i, svg) { flex-shrink: 0; }
.hpos-app .input-group .btn { font-size: 14px; }
.hpos-app .input-group > :is(.form-control, .select2-container) { height: auto; }
.hpos-app .file-caption-main { flex-wrap: wrap; gap: 6px; }
.hpos-app .file-caption-main > .file-caption { flex: 1 1 220px; width: auto; min-width: 0; min-height: var(--hpos-control-md); }
.hpos-app .file-caption-main > .input-group-btn { flex: 0 1 auto; gap: 6px; }
.hpos-app .file-caption-main .btn-file { flex: 0 0 auto; background: var(--hpos-accent-700); color: #fff; }
.hpos-app .file-caption-main .btn-file > span { display: inline !important; }
.hpos-app .hpos-sale-editor #pos_table { min-width: 760px; }
.hpos-app .hpos-sale-editor #pos_table tbody td { vertical-align: top; }
.hpos-app .hpos-sale-editor .hpos-line-notes { margin-block-start: 8px; }
.hpos-app .hpos-line-notes > summary { min-height: 44px; padding: 10px 4px; color: var(--hpos-accent-700); cursor: pointer; }
.hpos-app .hpos-line-notes > summary:focus-visible { outline: 2px solid var(--hpos-focus-color); outline-offset: 2px; border-radius: 4px; }
.hpos-app .hpos-line-notes textarea { min-height: 72px; }
.hpos-app .hpos-sale-editor .table-responsive { overflow-x: auto; }
.hpos-app .hpos-sale-actions { display: flex; flex-wrap: wrap; gap: 12px; justify-content: flex-end; padding: 16px; border: 1px solid var(--hpos-border); border-radius: var(--hpos-radius-md); background: var(--hpos-surface); margin-block: 16px; }
.hpos-app .hpos-sale-actions > button { min-width: 140px; min-height: 48px; }
.hpos-app .hpos-sale-location { width: 100%; max-width: 380px; }
/* A grid prevents long customer addresses from trapping floated fields below
 * them, and gives tablet fields enough room for their addons and labels. */
.hpos-app .hpos-sale-details .tw-py-2 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: start; gap: 4px 20px; }
.hpos-app .hpos-sale-details .tw-py-2 > [class*="col-"] { width: 100%; min-width: 0; padding-inline: 0; float: none; }
.hpos-app .hpos-sale-details .tw-py-2 > .clearfix { display: none; }
.hpos-app .hpos-sale-details #restaurant_module_span { grid-column: 1 / -1; min-width: 0; }
.hpos-app .hpos-sale-details .hpos-sale-attachment { grid-column: 1 / -1; }
.hpos-app .hpos-sale-addresses { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-block: 0 16px; }
.hpos-app .hpos-sale-addresses > div { min-width: 0; padding: 12px 16px; border-radius: var(--hpos-radius-sm); background: var(--hpos-surface-subtle); overflow-wrap: anywhere; }
.hpos-app .hpos-sale-addresses strong { display: block; margin-block-end: 6px; color: var(--hpos-brand-900); }
.hpos-app .hpos-sale-addresses :is(#billing_address_div, #shipping_address_div) { color: var(--hpos-text-muted); line-height: 1.7; }
.hpos-app .hpos-sale-addresses :is(#billing_address_div, #shipping_address_div) > div { white-space: pre-line; }
.hpos-app .hpos-paired-controls { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 8px; margin-block-start: 5px; }
.hpos-app .hpos-paired-controls > .form-control { min-width: 0; width: 100%; float: none; }
.hpos-app .hpos-sale-details .form-group { margin-bottom: 16px; }
.hpos-app .hpos-sale-editor .app-page-widget-header { margin-block-end: 16px; padding-block: 12px; }
.hpos-app .hpos-sale-editor :is(.hpos-sale-section,.hpos-sale-payment) .app-page-widget-header { padding: 12px 16px; border-radius: var(--hpos-radius-sm); background: var(--hpos-brand-900); color: #fff; }
.hpos-app .hpos-sale-editor :is(.hpos-sale-section,.hpos-sale-payment) .app-page-widget-title { color: #fff; }
.hpos-app .hpos-sale-editor .hpos-product-lookup { width: 100%; margin-block-end: 16px; }
.hpos-app .hpos-sale-products .tw-py-2 > .row { margin-inline: 0; }
.hpos-app .hpos-sale-section .tw-py-2 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: start; gap: 8px 20px; }
.hpos-app .hpos-sale-section .tw-py-2 > [class*="col-"] { width: auto; float: none; padding-inline: 0; margin-inline: 0; min-width: 0; }
.hpos-app .hpos-sale-section .tw-py-2 > :is(.col-md-12, .col-sm-12) { grid-column: 1 / -1; }
.hpos-app .hpos-sale-section .tw-py-2 > .clearfix { display: none; }
.hpos-app .hpos-sale-section .tw-py-2 > [class*="col-"] > br:first-child { display: none; }
.hpos-app .multi-input .form-control.width-40 { width: 40%; }
.hpos-app .multi-input .form-control.width-60 { width: 60%; }
@media (min-width: 768px) and (max-width: 1199px) {
    .hpos-app :is(.hpos-sale-details, .hpos-sale-section) .tw-py-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 767px) {
    .hpos-app :is(.hpos-sale-details, .hpos-sale-section) .tw-py-2, .hpos-app .hpos-sale-addresses { grid-template-columns: minmax(0, 1fr); }
    .hpos-app .hpos-sale-actions > button { flex: 1 1 140px; }
    .hpos-app .hpos-sale-editor .help-block { overflow-wrap: anywhere; }
    .hpos-app .file-caption-main > .file-caption { flex-basis: 100%; }
    .hpos-app .file-caption-main > .input-group-btn { flex: 1 1 auto; }
    .hpos-app .file-caption-main .btn-file { flex: 1 1 auto; }
}
.hpos-app .btn-group > .btn { border-radius: 0 !important; }
.hpos-app .btn-group > .btn:first-child { border-start-start-radius: var(--hpos-radius-sm) !important; border-end-start-radius: var(--hpos-radius-sm) !important; }
.hpos-app .btn-group > .btn:last-child { border-start-end-radius: var(--hpos-radius-sm) !important; border-end-end-radius: var(--hpos-radius-sm) !important; }

/* Forms and selection controls */
.hpos-app .form-group { margin-bottom: 18px; }
.hpos-app :is(.form-group > label, .control-label, fieldset > legend) { color: var(--hpos-text); font-weight: 700; }
.hpos-app fieldset > legend { padding-bottom: 10px; border-bottom-color: var(--hpos-border); color: var(--hpos-brand-900); font-size: 17px; }
.hpos-app :is(.form-control, .input-sm, .input-lg, select.form-control, textarea.form-control, .hpos-field) {
    width: 100%;
    min-height: var(--hpos-control-md);
    padding: 8px 12px;
    border: 1px solid var(--hpos-border-strong);
    border-radius: var(--hpos-radius-sm) !important;
    background: var(--hpos-surface);
    color: var(--hpos-text);
    box-shadow: none;
    transition: border-color var(--hpos-motion-fast), box-shadow var(--hpos-motion-fast), background var(--hpos-motion-fast);
}
.hpos-app textarea.form-control { min-height: 104px; resize: vertical; }
.hpos-app :is(.form-control, .hpos-field)::placeholder { color: #82929b; opacity: 1; }
.hpos-app :is(.form-control, .hpos-field):focus {
    border-color: var(--hpos-accent-700);
    outline: 0;
    box-shadow: var(--hpos-focus);
}
.hpos-app :is(.form-control, .hpos-field)[readonly] { background: #f7f9fa; color: var(--hpos-text-muted); }
.hpos-app :is(.form-control, .hpos-field):disabled { background: #edf1f2; color: #63727c; border-color: #cbd6d9; opacity: 1; }
.hpos-app .has-error :is(.form-control, .select2-selection), .hpos-app [aria-invalid="true"] { border-color: var(--hpos-danger) !important; }
.hpos-app .has-success :is(.form-control, .select2-selection) { border-color: var(--hpos-success) !important; }
.hpos-app :is(.help-block, .form-text, .text-muted) { color: var(--hpos-text-muted) !important; }
.hpos-app .has-error :is(.help-block, .control-label, label.error) { color: var(--hpos-danger) !important; }
.hpos-app .input-group-addon {
    min-width: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-color: var(--hpos-border-strong);
    background: var(--hpos-surface-subtle);
    color: var(--hpos-text-muted);
}
.hpos-app :is(input[type="checkbox"], input[type="radio"]) { accent-color: var(--hpos-accent-700); }
.hpos-app :is(.checkbox label, .radio label) { min-height: 32px; display: inline-flex; align-items: center; gap: 8px; }
.hpos-app .select2-container { max-width: 100%; }
.hpos-app .select2-container .select2-selection--single,
.hpos-app .select2-container .select2-selection--multiple {
    min-height: var(--hpos-control-md);
    border: 1px solid var(--hpos-border-strong) !important;
    border-radius: var(--hpos-radius-sm) !important;
    background: var(--hpos-surface) !important;
    color: var(--hpos-text) !important;
}
.hpos-app .select2-container--default.select2-container--focus .select2-selection--multiple,
.hpos-app .select2-container--open .select2-selection--single { border-color: var(--hpos-accent-700) !important; box-shadow: var(--hpos-focus); }
.hpos-app .select2-selection__rendered { min-height: 40px; line-height: 40px !important; padding-inline: 12px 34px !important; color: var(--hpos-text) !important; }
.hpos-app .select2-selection--multiple .select2-selection__rendered { display: flex; flex-wrap: wrap; gap: 5px; align-items: center; padding: 5px 8px !important; line-height: 1.4 !important; }
.hpos-app .select2-selection__choice { margin: 0 !important; padding: 4px 9px !important; border: 0 !important; border-radius: 999px !important; background: var(--hpos-surface-subtle) !important; color: var(--hpos-brand-800) !important; }
.hpos-app .select2-dropdown { overflow: hidden; border: 1px solid var(--hpos-border) !important; border-radius: var(--hpos-radius-md) !important; box-shadow: var(--hpos-shadow-md); }
.hpos-app .select2-search__field { min-height: 38px; border: 1px solid var(--hpos-border-strong) !important; border-radius: var(--hpos-radius-sm); }
.hpos-app .select2-results__option { min-height: 38px; padding: 8px 12px; }
.hpos-app .select2-results__option--highlighted[aria-selected] { background: var(--hpos-brand-900) !important; color: #fff !important; }

/* Tabs, breadcrumbs, pagination and progress */
.hpos-app .nav-tabs { display: flex; gap: 4px; overflow-x: auto; border-bottom: 1px solid var(--hpos-border); scrollbar-width: thin; }
.hpos-app .nav-tabs > li { float: none; flex: 0 0 auto; margin: 0; }
.hpos-app .nav-tabs > li > a { min-height: 42px; display: flex; align-items: center; margin: 0; padding: 9px 14px; border: 0 !important; border-radius: var(--hpos-radius-sm) var(--hpos-radius-sm) 0 0; color: var(--hpos-text-muted); font-weight: 700; }
.hpos-app .nav-tabs > li > a:hover { background: var(--hpos-surface-subtle); color: var(--hpos-brand-900); }
.hpos-app .nav-tabs > li.active > a { background: var(--hpos-surface); color: var(--hpos-brand-900); box-shadow: inset 0 -3px 0 var(--hpos-accent-500); }
.hpos-app .tab-content { padding-top: 16px; }
.hpos-app .breadcrumb { display: flex; flex-wrap: wrap; gap: 6px; padding: 0; background: transparent; color: var(--hpos-text-muted); }
.hpos-app .pagination { display: inline-flex; gap: 4px; }
.hpos-app .pagination > li > :is(a, span) { min-width: 38px; min-height: 38px; display: grid; place-items: center; padding: 6px 10px; border: 1px solid var(--hpos-border); border-radius: var(--hpos-radius-sm) !important; background: var(--hpos-surface); color: var(--hpos-brand-800); }
.hpos-app .pagination > .active > :is(a, span) { border-color: var(--hpos-brand-900); background: var(--hpos-brand-900); color: #fff; }
.hpos-app .progress { height: 9px; overflow: hidden; border-radius: 999px; background: #e6ecee; box-shadow: none; }
.hpos-app .progress-bar { background: var(--hpos-accent-600); box-shadow: none; }

/* Tables and dense business data */
.hpos-app .table-responsive, .hpos-app .dataTables_scroll, .hpos-app .hpos-table-wrap {
    max-width: 100%;
    overflow: auto;
    border: 1px solid var(--hpos-border);
    border-radius: var(--hpos-radius-md);
    background: var(--hpos-surface);
}
.hpos-app table { color: var(--hpos-text); }
.hpos-app .table { margin-bottom: 0; background: var(--hpos-surface); }
.hpos-app #users_table { width: 100% !important; min-width: 720px; }
.hpos-app #users_table .hpos-user-actions { min-width: 240px; }
.hpos-app #users_table .hpos-user-actions :is(a, button) { margin-block: 4px; }
.hpos-app .table > thead > tr > th,
.hpos-app table.dataTable > thead > tr > th {
    min-height: 44px;
    padding: 12px 14px;
    border-bottom: 1px solid var(--hpos-border) !important;
    background: #f7fafb;
    color: #526977;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .01em;
    text-align: start;
    vertical-align: middle;
    white-space: nowrap;
}
.hpos-app .table > tbody > tr > td,
.hpos-app table.dataTable > tbody > tr > td {
    min-height: 44px;
    padding: 11px 14px;
    border-top: 1px solid #e7edef;
    vertical-align: middle;
}
.hpos-app .table-striped > tbody > tr:nth-of-type(odd) { background: rgba(238, 246, 247, .4); }
.hpos-app .table-hover > tbody > tr:hover,
.hpos-app table.dataTable.hover tbody tr:hover { background: #edf7f8 !important; }
.hpos-app table.dataTable tbody tr.selected { background: #dff1f4 !important; box-shadow: inset 3px 0 0 var(--hpos-accent-600); }
.hpos-app div.dataTables_wrapper :is(.dataTables_info, .dataTables_length) { color: var(--hpos-text-muted); }
.hpos-app div.dataTables_wrapper .dataTables_info { min-width: 0; max-width: 100%; white-space: normal; overflow-wrap: anywhere; }
.hpos-app div.dataTables_wrapper .hpos-data-table-toolbar { display: flex; width: 100%; min-width: 0; flex: 0 0 100%; align-items: center; flex-wrap: wrap; gap: 12px 16px; margin-block-end: 16px; text-align: start; }
.hpos-app div.dataTables_wrapper .hpos-data-table-length { flex: 0 1 auto; }
.hpos-app div.dataTables_wrapper .hpos-data-table-actions { flex: 1 1 360px; min-width: 0; }
.hpos-app div.dataTables_wrapper .hpos-data-table-search { flex: 1 1 210px; min-width: 0; }
.hpos-app div.dataTables_wrapper .hpos-data-table-toolbar :is(.dataTables_length, .dataTables_filter, .dt-buttons) { float: none !important; margin: 0; width: auto; text-align: start; }
.hpos-app div.dataTables_wrapper .hpos-data-table-toolbar label { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin: 0; }
.hpos-app div.dataTables_wrapper .hpos-data-table-toolbar .dataTables_filter input { flex: 1; min-width: 0; width: 100%; margin: 0; }
.hpos-app div.dataTables_wrapper .hpos-data-table-actions .dt-buttons { display: flex; flex-wrap: wrap; gap: 8px; }
.hpos-app div.dataTables_wrapper .hpos-data-table-actions .dt-buttons :is(button, .dt-button, .tw-dw-btn) { min-height: 44px; margin: 0 !important; }
.hpos-app div.dataTables_wrapper .hpos-data-table-footer { display: flex; width: 100%; min-width: 0; flex: 0 0 100%; align-items: center; flex-wrap: wrap; justify-content: space-between; gap: 12px; margin-block-start: 16px; }
.hpos-app div.dataTables_wrapper .hpos-data-table-footer > :is(.dataTables_info, .dataTables_paginate) { float: none; padding: 0; }
.hpos-app div.dataTables_wrapper .hpos-data-table-footer :is(.dataTables_paginate, .dataTables_paginate > span, .pagination) { display: flex; flex-wrap: wrap; gap: 4px; max-width: 100%; margin: 0; }
.hpos-app div.dataTables_wrapper .hpos-data-table-footer .dataTables_paginate a { display: inline-flex; align-items: center; justify-content: center; min-width: 44px; min-height: 44px; }
.hpos-app .nav-tabs > li > a { display: inline-flex; align-items: center; gap: 8px; }
.hpos-app .nav-tabs > li > a > :is(i, svg) { flex-shrink: 0; }
@media (max-width: 767px) {
    .hpos-app div.dataTables_wrapper .hpos-data-table-search { order: -1; flex-basis: 100%; }
    .hpos-app div.dataTables_wrapper .hpos-data-table-actions { flex-basis: 100%; }
    .hpos-app :is(input:not([type="checkbox"]):not([type="radio"]), select, textarea) { font-size: max(16px, 1em); }
}
.hpos-app div.dataTables_wrapper .dataTables_paginate { padding-top: 10px; }
.hpos-app div.dataTables_processing { border: 1px solid var(--hpos-border); border-radius: var(--hpos-radius-md); background: rgba(255, 255, 255, .94); box-shadow: var(--hpos-shadow-md); color: var(--hpos-brand-900); }

/* Feedback, badges and empty states */
.hpos-app :is(.alert, .callout, .hpos-alert) { padding: 14px 16px; border: 1px solid var(--hpos-border); border-radius: var(--hpos-radius-md); box-shadow: none; }
.hpos-app :is(.alert-info, .callout-info, .hpos-alert--info) { border-color: #c9e3ef; background: var(--hpos-info-soft); color: #174f70; }
.hpos-app :is(.alert-success, .callout-success, .hpos-alert--success) { border-color: #c5e6d5; background: var(--hpos-success-soft); color: #115b40; }
.hpos-app :is(.alert-warning, .callout-warning, .hpos-alert--warning) { border-color: #eed9aa; background: var(--hpos-warning-soft); color: #754b00; }
.hpos-app :is(.alert-danger, .callout-danger, .hpos-alert--danger) { border-color: #ecc9cd; background: var(--hpos-danger-soft); color: #8a2933; }
.hpos-app :is(.label, .badge, .tw-dw-badge, .hpos-badge) { min-height: 24px; display: inline-flex; align-items: center; gap: 5px; padding: 3px 9px; border: 0; border-radius: 999px; background: #e9eef0; color: #4d626e; font-size: 11px; font-weight: 800; line-height: 1.25; }
.hpos-app :is(.label-success, .badge-success, .tw-dw-badge-success, .hpos-badge--success) { background: var(--hpos-success-soft); color: var(--hpos-success); }
.hpos-app :is(.label-warning, .badge-warning, .tw-dw-badge-warning, .hpos-badge--warning) { background: var(--hpos-warning-soft); color: var(--hpos-warning); }
.hpos-app :is(.label-danger, .badge-danger, .tw-dw-badge-error, .hpos-badge--danger) { background: var(--hpos-danger-soft); color: var(--hpos-danger); }
.hpos-app :is(.label-info, .badge-info, .tw-dw-badge-info, .hpos-badge--info) { background: var(--hpos-info-soft); color: var(--hpos-info); }
.hpos-empty-state { min-height: 220px; display: grid; place-items: center; align-content: center; gap: 10px; padding: 32px; border: 1px dashed var(--hpos-border-strong); border-radius: var(--hpos-radius-lg); background: #fbfdfd; color: var(--hpos-text-muted); text-align: center; }
.hpos-empty-state__icon { width: 48px; height: 48px; display: grid; place-items: center; border-radius: 14px; background: var(--hpos-surface-subtle); color: var(--hpos-accent-700); font-size: 22px; }
.hpos-empty-state h3 { margin: 0; color: var(--hpos-brand-900); font-size: 18px; }
.hpos-empty-state p { max-width: 520px; margin: 0; }
.hpos-skeleton { position: relative; overflow: hidden; border-radius: var(--hpos-radius-sm); background: #e9eff1; color: transparent !important; }
.hpos-skeleton::after { position: absolute; inset: 0; background: linear-gradient(90deg, transparent, rgba(255,255,255,.72), transparent); content: ""; animation: hpos-shimmer 1.25s infinite; }
@keyframes hpos-shimmer { to { transform: translateX(100%); } }

/* Header height follows its wrapped tools, including the impersonation return. */
.hpos-app .hpos-search-row { display: flex; align-items: center; gap: 8px; }
.hpos-app .hpos-search-field { flex: 1 1 auto; }
.hpos-app .hpos-search-field input { min-height: 44px; margin: 0; }
.hpos-app .hpos-search-field > span { top: 0; bottom: 0; }
.hpos-app .hpos-search-options { flex: 0 0 auto; }
.hpos-app .hpos-search-options > summary {
    display: flex; align-items: center; gap: 8px; min-height: 44px; padding: 8px 12px;
    border: 1px solid var(--hpos-border-strong); border-radius: var(--hpos-radius-sm);
    background: var(--hpos-surface); color: var(--hpos-text); cursor: pointer;
    font-size: 12px; font-weight: 600; list-style: none;
}
.hpos-app .hpos-search-options > summary::-webkit-details-marker { display: none; }
.hpos-app .hpos-search-options[open] > summary > svg { transform: rotate(180deg); }
.hpos-app .hpos-search-options > .searchbox-inline-toolbar {
    position: absolute; inset-inline-end: 0; top: calc(100% + 8px); z-index: 65;
    width: min(460px, calc(100vw - 48px)); max-height: min(320px, 60dvh); overflow-y: auto;
    display: flex; flex-wrap: wrap; gap: 12px; padding: 16px; margin: 0;
    background: var(--hpos-surface); border: 1px solid var(--hpos-border); border-radius: 12px;
    box-shadow: var(--hpos-shadow-md);
}
.hpos-app .hpos-search-options:not([open]) > .searchbox-inline-toolbar { display: none; }
.hpos-app .searchbox-inline-toolbar :is(button, select, label) { min-height: 44px; }
.hpos-app .searchbox-inline-toolbar select { border: 1px solid var(--hpos-border-strong); }
.hpos-app #mobile_search_overlay .modal-content > div:first-child { background: var(--hpos-brand-900) !important; }
.hpos-app #mobile_search_overlay { overscroll-behavior: contain; }
.hpos-app #mobile_search_btn.hpos-search-redundant { display: none !important; }
.hpos-app #mobile_search_results { max-height: 55dvh; }
.hpos-app .hpos-shell-header { height: auto; min-height: 68px; overflow: visible; }
.hpos-app .hpos-header-inner { padding-block: 12px; }
.hpos-app .hpos-header-row { flex-wrap: wrap; align-items: center; gap: 10px 16px; min-width: 0; }
.hpos-app #searchbox-desktop-float:not([data-sb-mounted="1"]) { top: calc(var(--hpos-header-bottom, 68px) + 8px) !important; }
.hpos-app #searchbox-desktop-float[data-sb-mounted="1"] {
    position: relative; inset: auto !important; transform: none;
    width: 100%; max-width: none; padding: 0;
}
@media (max-width: 767px) {
    .hpos-app #searchbox-header-search-row { display: none; }
}
.hpos-app .hpos-header-row > * { min-width: 0; max-width: 100%; }
.hpos-app .hpos-header-actions { flex: 1 1 440px; min-width: 0; gap: 8px; }
.hpos-app .hpos-header-actions > :is(button, a),
.hpos-app .hpos-header-actions > details > summary,
.hpos-app .hpos-header-row > div:first-child > button {
    min-height: 40px; align-items: center; margin: 0; border-radius: 8px;
}
.hpos-app .hpos-header-actions > :is(button, a),
.hpos-app .hpos-header-actions > details > summary {
    background: #124663; color: #fff; border: 1px solid rgba(255,255,255,.18);
}
.hpos-app .hpos-header-actions > :is(button, a):hover,
.hpos-app .hpos-header-actions > details > summary:hover { background: #1b5877; color: #fff; }
.hpos-app .hpos-header-profile { max-width: min(230px, 40vw); }
.hpos-app .hpos-header-profile > span:not(.tw-sr-only) { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hpos-app .hpos-header-profile > svg { flex-shrink: 0; }
.hpos-app .hpos-header-return { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; margin: 0; max-width: 100%; white-space: normal; overflow-wrap: anywhere; }
.hpos-app .hpos-shell-header :is(button, summary, a):focus-visible { outline: 3px solid #8cdeea; outline-offset: 3px; }
.hpos-app .hpos-header-notifications { flex: 0 0 auto; }
.hpos-app .hpos-header-notifications > .dropdown-toggle {
    display: inline-flex; position: relative; width: 44px; height: 44px; padding: 10px;
    border: 1px solid rgba(255,255,255,.22); border-radius: 8px; background: #124663; color: #fff;
}
.hpos-app .hpos-header-notifications > .dropdown-toggle:hover,
.hpos-app .hpos-header-notifications.open > .dropdown-toggle { background: #1b5877; color: #fff; }
.hpos-app .hpos-header-notifications .notifications_count {
    position: absolute; inset-block-start: -3px; inset-inline-end: -3px; display: inline-flex;
    align-items: center; justify-content: center; min-width: 20px; height: 20px; padding: 0 4px;
    border: 2px solid #0b304e; border-radius: 10px; background: #ffcf66; color: #142f43;
    font-size: 10px; line-height: 16px; font-weight: 700; font-variant-numeric: tabular-nums; pointer-events: none;
}
.hpos-app .hpos-header-notifications .notifications_count:empty { display: none; }
.hpos-app .hpos-header-notifications > .dropdown-toggle[aria-busy="true"] { opacity: .7; cursor: progress; }
.hpos-app .hpos-header-notifications > .dropdown-toggle > svg { flex: 0 0 auto; }
.hpos-app .hpos-header-notifications > .dropdown-toggle[aria-busy="true"] > svg { visibility: hidden; }
.hpos-app .hpos-header-notifications > .dropdown-toggle > .hpos-loading-indicator { position: absolute; inset: 12px; width: 20px; height: 20px; margin: 0; }
.hpos-app .hpos-header-notifications .dropdown-menu { width: min(320px, calc(100vw - 24px)); max-width: calc(100vw - 24px); max-height: min(70vh, 560px); }
.hpos-app .hpos-notification-error { padding: 12px; color: #ad3540; white-space: normal; }
@media (max-width: 767px) {
    .hpos-app .hpos-header-inner { padding-inline: 12px; }
    .hpos-app .hpos-header-actions { flex-basis: 100%; gap: 8px; }
    .hpos-app .hpos-header-profile { max-width: 160px; }
}

/* Modals, popovers, tooltips and notifications */
.hpos-app .modal { z-index: var(--hpos-layer-modal); }
.hpos-app .modal-backdrop { background: var(--hpos-brand-950); }
.hpos-app .modal-backdrop.in { opacity: .58; }
.hpos-app .modal-content { overflow: hidden; border: 1px solid var(--hpos-border); border-radius: var(--hpos-radius-lg); box-shadow: var(--hpos-shadow-lg); }
.hpos-app .modal-header { min-height: 60px; padding: 16px 20px; border-bottom: 1px solid var(--hpos-border); background: #fbfdfd; }
.hpos-app .modal-title { color: var(--hpos-brand-900); font-weight: 800; }
.hpos-app .modal-body { padding: 20px; }
.hpos-app .modal-footer { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; padding: 14px 20px; border-top: 1px solid var(--hpos-border); background: #fbfdfd; }
.hpos-app .modal-footer::before, .hpos-app .modal-footer::after { display: none; }
.hpos-app .close { min-width: 38px; min-height: 38px; display: grid; place-items: center; border-radius: var(--hpos-radius-sm); color: var(--hpos-text-muted); opacity: 1; font-size: 22px; line-height: 1; }
.hpos-app :is(.popover, .tooltip-inner) { border-radius: var(--hpos-radius-sm); }
.hpos-app .popover { border-color: var(--hpos-border); box-shadow: var(--hpos-shadow-md); }
.hpos-app .popover-title { border-bottom-color: var(--hpos-border); background: var(--hpos-surface-subtle); color: var(--hpos-brand-900); font-weight: 700; }
.hpos-app .toast, .hpos-app .toast-container { z-index: var(--hpos-layer-toast); }
.hpos-app .swal-modal { border-radius: var(--hpos-radius-lg); box-shadow: var(--hpos-shadow-lg); }
.hpos-app .swal-title { color: var(--hpos-brand-900); font-family: var(--hpos-font-interface); }
.hpos-app .swal-text { color: var(--hpos-text-muted); font-family: var(--hpos-font-interface); text-align: start; }
.hpos-app .swal-footer { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; border-top: 1px solid var(--hpos-border); background: #fbfdfd; }
.hpos-app .swal-button { min-height: var(--hpos-control-md); border-radius: var(--hpos-radius-sm); background: var(--hpos-brand-900); font-family: var(--hpos-font-interface); font-size: 14px; font-weight: 600; line-height: 1.5; }
.hpos-app .swal-button--danger { background: var(--hpos-danger); }
.hpos-app .swal-button--cancel { background: #e9eef0; color: var(--hpos-text); }

/* Reusable first-party components */
.hpos-card { overflow: hidden; border: 1px solid var(--hpos-border); border-radius: var(--hpos-radius-lg); background: var(--hpos-surface); box-shadow: var(--hpos-shadow-xs); }
.hpos-card__header, .hpos-card__body, .hpos-card__footer { padding: 18px; }
.hpos-card__header { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; border-bottom: 1px solid var(--hpos-border); }
.hpos-card__header h3 { margin: 0; color: var(--hpos-brand-900); font-size: 17px; }
.hpos-card__header p { margin: 4px 0 0; color: var(--hpos-text-muted); }
.hpos-card__footer { border-top: 1px solid var(--hpos-border); background: #fbfdfd; }
.hpos-metric-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.hpos-metric { min-width: 0; padding: 18px; border: 1px solid var(--hpos-border); border-radius: var(--hpos-radius-md); background: var(--hpos-surface); }
.hpos-metric__label { color: var(--hpos-text-muted); font-size: 12px; font-weight: 700; }
.hpos-metric__value { display: block; margin-top: 12px; color: var(--hpos-brand-900); font-family: var(--hpos-font-data); font-size: 26px; font-weight: 800; font-variant-numeric: tabular-nums; }
.hpos-metric__trend { display: inline-flex; margin-top: 4px; color: var(--hpos-success); font-size: 12px; font-weight: 700; }
.hpos-toolbar { min-height: 58px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 14px; border: 1px solid var(--hpos-border); border-radius: var(--hpos-radius-md); background: var(--hpos-surface); }
.hpos-toolbar__group { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }

/* Responsive density and safe overflow */
.hpos-app img, .hpos-app svg, .hpos-app canvas { max-width: 100%; }
.hpos-app :is(.row, .content, .box-body, .modal-body, .tab-content) { min-width: 0; }
.hpos-app pre, .hpos-app code { max-width: 100%; overflow-wrap: anywhere; }
@media (max-width: 991px) {
    .hpos-app .content { padding-inline: 16px; }
    .hpos-app .content-header { padding-inline: 16px; }
    .hpos-metric-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .hpos-app .modal-dialog { width: auto; margin: 16px; }
}
@media (max-width: 767px) {
    .hpos-app { font-size: 14px; }
    .hpos-app .content { padding-inline: 12px; padding-bottom: 20px; }
    .hpos-app .content-header { padding: 18px 12px 12px; }
    .hpos-app :is(.box-header, .box-body, .box-footer, .panel-heading, .panel-body, .panel-footer) { padding-inline: 14px; }
    .hpos-app :is(.btn:not(.btn-xs), .tw-dw-btn:not(.tw-dw-btn-xs), .hpos-btn) { min-height: var(--hpos-ui-control); }
    .hpos-app .form-control, .hpos-app .select2-container .select2-selection--single { min-height: 44px; }
    .hpos-app .table-responsive { border-inline: 0; border-radius: 0; }
    .hpos-app .modal-dialog { margin: 8px; }
    .hpos-app .modal-body { padding: 16px; }
    .hpos-app .modal-footer > :is(.btn, .tw-dw-btn) { flex: 1 1 auto; }
    .hpos-metric-grid { grid-template-columns: 1fr; }
    .hpos-toolbar, .hpos-toolbar__group { align-items: stretch; }
    .hpos-toolbar__group { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
    .hpos-app *, .hpos-app *::before, .hpos-app *::after {
        scroll-behavior: auto !important;
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .01ms !important;
    }
}

@media (forced-colors: active) {
    .hpos-app :where(.box, .card, .modal-content, .form-control, .select2-selection, .btn) { border: 1px solid CanvasText !important; }
    .hpos-app :where(.btn-primary, .btn-success, .btn-danger, .btn-warning, .btn-info) { forced-color-adjust: none; }
}

@media print {
    .hpos-app { background: #fff !important; color: #000 !important; }
    .hpos-app :is(.box, .card, .panel, .table-responsive) { border-color: #bbb; border-radius: 0; box-shadow: none; }
    .hpos-app :is(.no-print, .modal, .dropdown-menu, .tooltip, .popover) { display: none !important; }
    .hpos-app .print_section, .hpos-app #receipt_section { color: #000; }
}
.hpos-app .tour-backdrop { max-width: 100vw; }
.hpos-app .bg-olive,
.hpos-app .pos-form-actions [class*="tw-bg-[rgb(40,183,123)]"] { background-color: #166b49 !important; color: #fff !important; }
.hpos-app .hpos-product-bulk-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding-block: 14px; }
.hpos-app .hpos-product-bulk-actions form { margin: 0; }
.hpos-app .nav-tabs.nav-justified { flex-wrap: wrap; overflow: visible; }
.hpos-app .nav-tabs.nav-justified > li { flex: 1 1 120px; width: auto; min-width: 0; }
.hpos-app .nav-tabs.nav-justified > li > a { width: auto; white-space: normal; overflow-wrap: anywhere; }
.hpos-app .pos-tab-menu .list-group-item { white-space: normal; overflow-wrap: anywhere; }

.hpos-app .nav-tabs > li { width: auto !important; }
.hpos-app .nav-tabs > li > a { width: auto !important; white-space: normal; }

/* Keep editor footer actions reachable without changing prose links. */
.hpos-app .tox-statusbar__path-item,
.hpos-app .tox-statusbar__wordcount,
.hpos-app .tox-statusbar__branding a { min-height:24px; display:inline-flex; align-items:center; }

/* Public invoice previews need readable summaries on phones; paper keeps its columns. */
@media screen and (max-width: 480px) {
    .hpos-invoice-preview #invoice_content > .row > .col-xs-6 {
        float: none;
        width: 100%;
        margin-block-end: 16px;
    }
}

/* Initial setup is independent of optional business add-ons. */
.hpos-app .registration-setup-notice { margin:16px 24px; padding:12px 16px; border:1px solid #9ed1dc; background:#eaf7fa; border-radius:10px; display:flex; justify-content:space-between; flex-wrap:wrap; gap:8px; }
