@charset "UTF-8";
/* =============================================================================
   HAJI NAZEER KIRAYANA — POS / INVENTORY / LEDGER  ·  UI DESIGN SYSTEM  v1.0
   -----------------------------------------------------------------------------
   Scope: presentation layer only. This file (plus app.js) re-skins the existing
   Laravel + Bootstrap 5 markup. It defines no business rules and must never be
   used to change workflow behaviour, validation, calculations or routing.

   Identity: taken from the shop logo — deep bottle green + antique gold on ink.
   Structure:
     1  Tokens                  9  Forms              17 Utilities
     2  Base + typography       10 Buttons             18 Accessibility
     3  App shell (fixed nav)   11 Badges / status    19 Bootstrap compat layer
     4  Brand block             12 Alerts / toasts    20 Responsive
     5  Navigation              13 Modals             21 Print screen helpers
     6  Page head / toolbar     14 Empty / loading
     7  Cards / stats           15 Data tables
     8  Filters                 16 POS module
   ========================================================================== */

/* Self-hosted brand typeface (Inter, latin subset) — no external font request,
   so the UI renders identically offline / on slow shop connections. */
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 400; font-display: swap;
  src: url('../vendor/inter/inter-latin-400-normal.woff2') format('woff2'); }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 500; font-display: swap;
  src: url('../vendor/inter/inter-latin-500-normal.woff2') format('woff2'); }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 600; font-display: swap;
  src: url('../vendor/inter/inter-latin-600-normal.woff2') format('woff2'); }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 700; font-display: swap;
  src: url('../vendor/inter/inter-latin-700-normal.woff2') format('woff2'); }

/* ===================================================================== 1. TOKENS */
:root {
    /* brand ramp — deep green (logo "Nazeer") */
    --hn-green-950: #03130C;
    --hn-green-900: #062018;
    --hn-green-850: #07281D;
    --hn-green-800: #0A3325;
    --hn-green-700: #0E4A33;
    --hn-green-600: #116344;
    --hn-green-500: #16804F;
    --hn-green-400: #2AA168;
    --hn-green-300: #5CC494;
    --hn-green-100: #CDEBDA;
    --hn-green-50:  #ECF8F1;

    /* accent ramp — antique gold (logo "Haji") */
    --hn-gold-700: #93650A;
    --hn-gold-600: #C08A15;
    --hn-gold-500: #E0A924;
    --hn-gold-400: #EDC15A;
    --hn-gold-300: #F6D98D;
    --hn-gold-100: #F8EAC4;
    --hn-gold-50:  #FDF7E8;

    /* semantics */
    --hn-success: #16804F;
    --hn-success-soft: #E7F6ED;
    --hn-danger: #C22D3B;
    --hn-danger-soft: #FCEBEC;
    --hn-warning: #B26A05;
    --hn-warning-soft: #FCF2E3;
    --hn-info: #0E6E86;
    --hn-info-soft: #E6F4F8;
    --hn-neutral: #4F6259;
    --hn-neutral-soft: #EEF2EF;

    /* surfaces + text */
    --hn-page: #F2F5F2;
    --hn-page-grad: radial-gradient(1200px 600px at 100% -10%, rgba(224, 169, 36, .07), transparent 60%), radial-gradient(1000px 500px at -10% 0%, rgba(22, 128, 79, .07), transparent 55%), #F2F5F2;
    --hn-surface: #FFFFFF;
    --hn-surface-2: #F8FAF8;
    --hn-surface-3: #F1F4F1;
    --hn-border: #E1E7E2;
    --hn-border-strong: #CBD5CE;
    --hn-text: #0F1F18;
    --hn-text-2: #35473E;
    --hn-muted: #67796F;
    --hn-muted-2: #8A9A90;

    /* shell metrics */
    --hn-header-h: 62px;
    --hn-sidebar-w: 258px;
    --hn-sidebar-w-rail: 74px;
    --hn-radius-sm: 8px;
    --hn-radius: 12px;
    --hn-radius-lg: 16px;
    --hn-radius-xl: 22px;

    /* elevation */
    --hn-shadow-xs: 0 1px 2px rgba(10, 32, 23, .06);
    --hn-shadow-sm: 0 1px 2px rgba(10, 32, 23, .05), 0 2px 6px rgba(10, 32, 23, .05);
    --hn-shadow: 0 2px 4px rgba(10, 32, 23, .04), 0 8px 24px -8px rgba(10, 32, 23, .12);
    --hn-shadow-lg: 0 4px 8px rgba(10, 32, 23, .05), 0 20px 48px -12px rgba(10, 32, 23, .22);
    --hn-shadow-inset: inset 0 1px 0 rgba(255, 255, 255, .06);

    /* misc */
    --hn-ease: cubic-bezier(.22, .61, .36, 1);
    --hn-fast: 120ms var(--hn-ease);
    --hn-med: 200ms var(--hn-ease);
    --hn-font: 'Inter', 'Segoe UI', system-ui, -apple-system, 'Helvetica Neue', Arial, sans-serif;
    --hn-mono: 'SFMono-Regular', 'JetBrains Mono', Menlo, Consolas, monospace;
}

/* ============================================================== 2. BASE + TYPE */
* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
    margin: 0;
    font-family: var(--hn-font);
    font-size: 14.5px;
    line-height: 1.5;
    color: var(--hn-text);
    background: var(--hn-page-grad) fixed;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    font-feature-settings: "cv05" 1, "ss01" 1;
    text-rendering: optimizeLegibility;
}

h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    letter-spacing: -.018em;
    color: var(--hn-text);
    line-height: 1.25;
    margin: 0 0 .5rem;
}
h1 { font-size: 1.6rem; }
h2 { font-size: 1.32rem; }
h3 { font-size: 1.14rem; }
h4, .h4 { font-size: 1.06rem; letter-spacing: -.015em; }
h5, .h5 { font-size: .96rem; }
h6, .h6 { font-size: .84rem; text-transform: uppercase; letter-spacing: .06em; color: var(--hn-muted); font-weight: 700; }

p { margin: 0 0 .8rem; }
a { color: var(--hn-green-600); text-decoration: none; transition: color var(--hn-fast); }
a:hover { color: var(--hn-green-500); text-decoration: none; }

small, .small { font-size: 12.5px; }
.text-muted { color: var(--hn-muted) !important; }
.fw-bold, .fw-semibold, strong, b { letter-spacing: -.01em; }
hr { border: 0; border-top: 1px solid var(--hn-border); opacity: 1; margin: 1rem 0; }

/* figures: always monospaced-align so money columns never jitter */
.num, .money, td.text-end, .table td.text-end {
    font-variant-numeric: tabular-nums;
    font-feature-settings: "tnum" 1;
}
::-moz-selection { background: var(--hn-gold-300); color: var(--hn-green-950); }
::selection { background: var(--hn-gold-300); color: var(--hn-green-950); }

/* scrollbars — thin, quiet, present only where needed */
* { scrollbar-width: thin; scrollbar-color: var(--hn-border-strong) transparent; }
*::-webkit-scrollbar { width: 10px; height: 10px; }
*::-webkit-scrollbar-track { background: transparent; }
*::-webkit-scrollbar-thumb { background: var(--hn-border-strong); border-radius: 999px; border: 3px solid transparent; background-clip: content-box; }
*::-webkit-scrollbar-thumb:hover { background: var(--hn-muted-2); background-clip: content-box; border: 3px solid transparent; }

/* =========================================================== 3. APP SHELL */
/* Fixed header + independently scrolling sidebar, one page scrollbar only. */
.app-shell { display: flex; min-height: 100vh; align-items: flex-start; }

.app-sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    width: var(--hn-sidebar-w);
    display: flex;
    flex-direction: column;
    background: linear-gradient(178deg, var(--hn-green-900) 0%, var(--hn-green-950) 100%);
    color: #D8E5DE;
    z-index: 1045;
    box-shadow: 1px 0 0 rgba(255, 255, 255, .04), 10px 0 40px -18px rgba(3, 19, 12, .5);
}
.app-sidebar::after {
    /* hairline gold edge, brand signature */
    content: "";
    position: absolute;
    inset: 0 0 0 auto;
    width: 1px;
    background: linear-gradient(180deg, transparent, rgba(224, 169, 36, .35) 22%, rgba(224, 169, 36, .12) 70%, transparent);
    pointer-events: none;
}

.sidebar-scroll {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 6px 10px 22px;
    overscroll-behavior: contain;
    scrollbar-color: rgba(255, 255, 255, .18) transparent;
}
.sidebar-scroll::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, .16); background-clip: content-box; border: 3px solid transparent; }
.sidebar-scroll::-webkit-scrollbar { width: 8px; }

.app-main {
    flex: 1 1 auto;
    min-width: 0;
    margin-left: var(--hn-sidebar-w);
    display: flex;
    flex-direction: column;
    transition: margin-left var(--hn-med);
}

.app-header {
    position: sticky;
    top: 0;
    z-index: 1035;
    height: var(--hn-header-h);
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0 clamp(10px, 1.6vw, 22px);
    background: rgba(255, 255, 255, .88);
    -webkit-backdrop-filter: saturate(1.4) blur(14px);
    backdrop-filter: saturate(1.4) blur(14px);
    border-bottom: 1px solid var(--hn-border);
    box-shadow: 0 1px 0 rgba(255, 255, 255, .6) inset;
}
.app-header.is-scrolled { box-shadow: var(--hn-shadow-sm); }

.app-content {
    flex: 1 1 auto;
    min-width: 0;
    width: 100%;
    padding: clamp(14px, 2.1vw, 26px) clamp(12px, 2.1vw, 26px) 40px;
    max-width: 1780px;
}

/* collapsed (desktop) → icon rail */
body.nav-rail { --hn-sidebar-w: var(--hn-sidebar-w-rail); }
body.nav-rail .brand-text,
body.nav-rail .nav-link-text,
body.nav-link-label,
body.nav-rail .nav-group-label,
body.nav-rail .sidebar-foot,
body.nav-rail .nav-link .caret { display: none; }
body.nav-rail .app-sidebar .nav-link { justify-content: center; padding: 10px 0; }
body.nav-rail .app-sidebar .nav-link i { width: auto; font-size: 19px; }
body.nav-rail .nav-section { display: none; }
body.nav-rail .submenu { display: none !important; }

/* ================================================================= 4. BRAND */
.brand {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    min-height: 64px;
    background: linear-gradient(180deg, rgba(255, 255, 255, .045), transparent);
    border-bottom: 1px solid rgba(255, 255, 255, .07);
    position: relative;
}
.brand-mark {
    width: 38px; height: 38px;
    flex: 0 0 38px;
    border-radius: 11px;
    display: grid;
    place-items: center;
    background: linear-gradient(150deg, var(--hn-gold-400), var(--hn-gold-600) 55%, var(--hn-green-700));
    color: var(--hn-green-950);
    font-weight: 800;
    font-size: 15px;
    letter-spacing: -.04em;
    box-shadow: 0 2px 10px rgba(224, 169, 36, .28), var(--hn-shadow-inset);
}
.brand-mark svg { width: 22px; height: 22px; display: block; }
.brand-logo {
    display: block;
    max-width: 100%;
    max-height: 75px;
    /*max-height: 44px;*/
    width: auto;
    height: auto;
    object-fit: contain;
    /* the supplied logo ships on a black plate — blend it into the dark brand bar */
    mix-blend-mode: screen;
    filter: brightness(1.06);
}
.brand-text { min-width: 0; }
.brand-name {
    display: block;
    font-weight: 700;
    font-size: 15.5px;
    letter-spacing: -.02em;
    color: #FFF;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.brand-sub {
    display: block;
    font-size: 10.5px;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--hn-gold-400);
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.brand-close { margin-left: auto; }

/* ============================================================== 5. NAVIGATION */
.nav-group-label {
    display: block;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .13em;
    text-transform: uppercase;
    color: rgba(205, 226, 214, .45);
    padding: 16px 12px 6px;
}

.app-sidebar .nav-link {
    position: relative;
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 9px 12px;
    margin: 1px 0;
    border-radius: 10px;
    color: #BFD3C7;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.35;
    transition: background var(--hn-fast), color var(--hn-fast), transform var(--hn-fast);
}
.app-sidebar .nav-link > i:first-child,
.app-sidebar .nav-link .nav-ico {
    width: 20px;
    flex: 0 0 20px;
    text-align: center;
    font-size: 16px;
    opacity: .82;
    transition: opacity var(--hn-fast), color var(--hn-fast);
}
.app-sidebar .nav-link:hover {
    background: rgba(255, 255, 255, .07);
    color: #FFF;
    text-decoration: none;
}
.app-sidebar .nav-link:hover > i:first-child { opacity: 1; }
.app-sidebar .nav-link:active { transform: scale(.985); }

.app-sidebar .nav-link.active {
    background: linear-gradient(90deg, rgba(22, 128, 79, .42), rgba(22, 128, 79, .12) 70%, transparent);
    color: #FFF;
    font-weight: 600;
    box-shadow: inset 0 0 0 1px rgba(92, 196, 148, .18);
}
.app-sidebar .nav-link.active > i:first-child { opacity: 1; color: var(--hn-gold-400); }
.app-sidebar .nav-link.active::before {
    /* active indicator bar */
    content: "";
    position: absolute;
    left: -10px;
    top: 7px;
    bottom: 7px;
    width: 3px;
    border-radius: 0 3px 3px 0;
    background: linear-gradient(180deg, var(--hn-gold-400), var(--hn-gold-600));
    box-shadow: 0 0 12px rgba(224, 169, 36, .55);
}
.app-sidebar .nav-link .caret {
    margin-left: auto;
    font-size: 11px;
    opacity: .6;
    transition: transform var(--hn-med);
}
.app-sidebar .nav-link[aria-expanded="true"] .caret { transform: rotate(180deg); }

.submenu { padding: 2px 0 6px 0; list-style: none; margin: 0; }
.app-sidebar .submenu .nav-link {
    padding: 7px 12px 7px 43px;
    font-size: 13.3px;
    color: #A9C1B3;
}
.app-sidebar .submenu .nav-link::after {
    content: "";
    position: absolute;
    left: 27px;
    top: 50%;
    width: 5px; height: 5px;
    margin-top: -2.5px;
    border-radius: 50%;
    background: rgba(190, 214, 199, .4);
    transition: background var(--hn-fast), transform var(--hn-fast);
}
.app-sidebar .submenu .nav-link:hover::after,
.app-sidebar .submenu .nav-link.active::after { background: var(--hn-gold-500); transform: scale(1.25); }
.app-sidebar .submenu .nav-link.active { background: rgba(255, 255, 255, .06); color: #FFF; font-weight: 600; box-shadow: none; }
.app-sidebar .submenu .nav-link.active::before { display: none; }

.nav-badge {
    margin-left: auto;
    font-size: 10.5px;
    font-weight: 700;
    padding: 1px 7px;
    border-radius: 999px;
    background: rgba(224, 169, 36, .16);
    color: var(--hn-gold-300);
    letter-spacing: .02em;
}
.sidebar-foot {
    flex: 0 0 auto;
    padding: 10px 14px 14px;
    border-top: 1px solid rgba(255, 255, 255, .07);
    font-size: 11.5px;
    color: rgba(190, 214, 199, .62);
}
.sidebar-store {
    display: flex; align-items: center; gap: 8px;
    padding: 8px 12px; margin: 4px 0 0;
    border-radius: 10px;
    background: rgba(255, 255, 255, .045);
}
.dot-live { width: 7px; height: 7px; border-radius: 50%; background: var(--hn-green-400); box-shadow: 0 0 0 3px rgba(42, 161, 104, .18); flex: 0 0 7px; }
.dot-live.closed { background: var(--hn-danger); box-shadow: 0 0 0 3px rgba(194, 45, 59, .2); }

/* header bits */
.hdr-btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 7px;
    height: 38px; padding: 0 12px;
    border: 1px solid var(--hn-border);
    border-radius: 10px;
    background: #FFF;
    color: var(--hn-text-2);
    font-size: 13.5px; font-weight: 600;
    cursor: pointer;
    transition: background var(--hn-fast), border-color var(--hn-fast), color var(--hn-fast), box-shadow var(--hn-fast), transform var(--hn-fast);
    white-space: nowrap;
}
.hdr-btn:hover { border-color: var(--hn-green-300); color: var(--hn-green-700); background: var(--hn-green-50); box-shadow: var(--hn-shadow-xs); }
.hdr-btn:active { transform: translateY(1px); }
.hdr-btn.icon-only { width: 38px; padding: 0; }
.hdr-btn.primary { background: var(--hn-green-600); border-color: var(--hn-green-600); color: #FFF; }
.hdr-btn.primary:hover { background: var(--hn-green-500); border-color: var(--hn-green-500); color: #FFF; }
.hdr-btn.gold { background: linear-gradient(180deg, var(--hn-gold-500), var(--hn-gold-600)); border-color: var(--hn-gold-600); color: #2B1E02; }
.hdr-btn.gold:hover { filter: brightness(1.05); color: #2B1E02; }
.hdr-btn .badge { font-size: 10px; }

.hdr-search { position: relative; flex: 1 1 auto; max-width: 560px; min-width: 0; }
.hdr-search .input-group {
    background: var(--hn-surface-3);
    border: 1px solid var(--hn-border);
    border-radius: 11px;
    overflow: hidden;
    transition: box-shadow var(--hn-fast), border-color var(--hn-fast), background var(--hn-fast);
}
.hdr-search .input-group:focus-within {
    background: #FFF;
    border-color: var(--hn-green-400);
    box-shadow: 0 0 0 3px rgba(22, 128, 79, .12);
}
.hdr-search .input-group-text { background: transparent; border: 0; color: var(--hn-muted); padding: 0 0 0 11px; }
.hdr-search input, .hdr-search .form-control { border: 0 !important; background: transparent !important; box-shadow: none !important; padding: 8px 10px; font-size: 13.5px; height: auto; }
.hdr-search input::placeholder { color: var(--hn-muted-2); }
.hdr-search .btn-search-go {
    border: 0; border-radius: 0; background: var(--hn-green-700); color: #FFF;
    font-size: 13px; font-weight: 600; padding: 0 15px;
    transition: background var(--hn-fast);
}
.hdr-search .btn-search-go:hover { background: var(--hn-green-600); }
.search-kbd { position: absolute; right: 96px; top: 50%; transform: translateY(-50%); pointer-events: none; }
.search-kbd kbd {
    font-family: var(--hn-font); font-size: 10.5px; font-weight: 600;
    background: #FFF; border: 1px solid var(--hn-border); border-bottom-width: 2px;
    border-radius: 5px; padding: 1px 5px; color: var(--hn-muted);
}

.suggest {
    position: absolute;
    top: calc(100% + 7px);
    left: 0; right: 0;
    z-index: 1060;
    background: #FFF;
    border: 1px solid var(--hn-border);
    border-radius: var(--hn-radius);
    box-shadow: var(--hn-shadow-lg);
    max-height: min(420px, 62vh);
    overflow-y: auto;
    padding: 6px;
}
.suggest:empty { display: none; }
.suggest .list-group-item, .suggest a {
    display: block;
    padding: 8px 10px;
    border: 0;
    border-radius: 8px;
    font-size: 13.5px;
    color: var(--hn-text-2);
}
.suggest a:hover, .suggest .list-group-item:hover, .suggest .active { background: var(--hn-green-50); color: var(--hn-green-700); box-shadow: none; }
.suggest .s-empty { padding: 14px 12px; color: var(--hn-muted); font-size: 13px; text-align: center; }

/* dropdown menus (header + in-page) */
.dropdown-menu {
    border: 1px solid var(--hn-border);
    border-radius: var(--hn-radius);
    box-shadow: var(--hn-shadow-lg);
    padding: 6px;
    font-size: 13.5px;
    --bs-dropdown-link-active-bg: var(--hn-green-600);
    --bs-dropdown-link-active-color: #fff;
    --bs-dropdown-padding-y: .35rem;
    z-index: 1070;
}
.dropdown-menu.show { animation: menuIn .16s var(--hn-ease); }
.dropdown-item {
    border-radius: 8px;
    padding: 7px 10px;
    display: flex;
    align-items: center;
    gap: 9px;
    color: var(--hn-text-2);
    font-weight: 500;
    white-space: nowrap;
}
.dropdown-item i { width: 17px; text-align: center; color: var(--hn-muted); font-size: 14px; }
.dropdown-item:hover i { color: inherit; }
.dropdown-item:active { background: var(--hn-green-600); }
.dropdown-header { font-size: 10px; letter-spacing: .1em; text-transform: uppercase; color: var(--hn-muted-2); font-weight: 700; padding: 8px 10px 4px; }
.dropdown-divider { margin: 5px 6px; border-color: var(--hn-border); }
@keyframes menuIn { from { opacity: 0; transform: translateY(-4px) scale(.985); } to { opacity: 1; transform: none; } }

/* ============================================================== 6. PAGE HEAD */
.page-head {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
    padding: 13px 16px;
    margin: 0 0 16px;
    background: linear-gradient(120deg, #FFF 0%, #FBFDFB 62%, var(--hn-gold-50) 100%);
    border: 1px solid var(--hn-border);
    border-radius: var(--hn-radius-lg);
    box-shadow: var(--hn-shadow-xs);
    position: relative;
    overflow: hidden;
}
.page-head::before {
    content: "";
    position: absolute; left: 0; top: 0; bottom: 0; width: 4px;
    background: linear-gradient(180deg, var(--hn-gold-500), var(--hn-green-600));
}
.page-head h1, .page-head h2, .page-head h4 { margin: 0; font-size: 1.18rem; }
.page-head .page-title { display: flex; align-items: center; gap: 11px; min-width: 0; }
.page-head .page-ico {
    width: 36px; height: 36px; flex: 0 0 36px;
    display: grid; place-items: center;
    border-radius: 10px;
    background: var(--hn-green-600);
    color: #FFF; font-size: 17px;
    box-shadow: 0 4px 12px -4px rgba(17, 99, 68, .55);
}
.page-head .page-sub { display: block; font-size: 12.5px; font-weight: 500; color: var(--hn-muted); letter-spacing: 0; }
.page-head .page-actions { margin-left: auto; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.page-head .badge { align-self: center; }

/* filters / search bar */
.filters {
    display: flex;
    align-items: flex-end;
    gap: 10px;
    flex-wrap: wrap;
    padding: 12px 14px;
    margin: 0 0 14px;
    background: var(--hn-surface);
    border: 1px solid var(--hn-border);
    border-radius: var(--hn-radius);
    box-shadow: var(--hn-shadow-xs);
}
.filters .fld { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.filters .fld > label, .filters .form-label { margin: 0; font-size: 11px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--hn-muted); }
.filters .form-control, .filters .form-select { height: 36px; font-size: 13.5px; min-width: 120px; }
.filters .fld-grow { flex: 1 1 210px; }
.filters .spacer { flex: 1 1 auto; }

/* ============================================================= 7. CARDS */
.card {
    --hn-card-pad: 16px;
    border: 1px solid var(--hn-border);
    border-radius: var(--hn-radius-lg);
    background: var(--hn-surface);
    box-shadow: var(--hn-shadow-sm);
    margin-bottom: 16px;
    transition: box-shadow var(--hn-med), border-color var(--hn-med), transform var(--hn-med);
}
.card > .card-body { padding: var(--hn-card-pad); }
.card > .card-header {
    padding: 12px 16px;
    background: linear-gradient(180deg, #FFF, var(--hn-surface-2));
    border-bottom: 1px solid var(--hn-border);
    font-weight: 700;
    font-size: 14.5px;
    letter-spacing: -.01em;
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    border-radius: var(--hn-radius-lg) var(--hn-radius-lg) 0 0 !important;
}
.card > .card-header > strong, .card > .card-header > h1, .card > .card-header > h2, .card > .card-header > h3, .card > .card-header > h4 { margin: 0; font-size: 14.5px; font-weight: 700; }
.card > .card-header i { color: var(--hn-green-600); }
.card > .card-header .btn, .card > .card-header .hdr-btn { margin-left: auto; }
.card > .card-footer {
    padding: 12px 16px;
    background: var(--hn-surface-2);
    border-top: 1px solid var(--hn-border);
    border-radius: 0 0 var(--hn-radius-lg) var(--hn-radius-lg);
}
.card.card-hover:hover { box-shadow: var(--hn-shadow); border-color: var(--hn-border-strong); }

/* the "panel" primitive used by redesigned screens */
.panel { background: var(--hn-surface); border: 1px solid var(--hn-border); border-radius: var(--hn-radius-lg); box-shadow: var(--hn-shadow-sm); margin-bottom: 16px; overflow: clip; }
.panel-head { padding: 12px 16px; border-bottom: 1px solid var(--hn-border); background: linear-gradient(180deg, #FFF, var(--hn-surface-2)); display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.panel-head .t { font-weight: 700; font-size: 14.5px; display: flex; align-items: center; gap: 9px; }
.panel-head .t i { color: var(--hn-green-600); font-size: 16px; }
.panel-head .actions { margin-left: auto; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.panel-body { padding: 16px; }
.panel-body.tight { padding: 0; }
.panel-foot { padding: 12px 16px; border-top: 1px solid var(--hn-border); background: var(--hn-surface-2); }

/* stat cards */
.card-stat, .stat {
    position: relative;
    padding: 14px 16px;
    border: 1px solid var(--hn-border);
    border-radius: var(--hn-radius-lg);
    background: var(--hn-surface);
    box-shadow: var(--hn-shadow-xs);
    overflow: hidden;
    height: 100%;
    margin-bottom: 0;
    transition: transform var(--hn-med), box-shadow var(--hn-med), border-color var(--hn-med);
}
.stat:hover { transform: translateY(-2px); box-shadow: var(--hn-shadow); border-color: var(--hn-border-strong); }
.stat::after {
    content: "";
    position: absolute; inset: 0 0 auto 0; height: 3px;
    background: linear-gradient(90deg, var(--hn-accent, var(--hn-green-500)), transparent 78%);
    opacity: .85;
}
.stat .stat-label {
    font-size: 11px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase;
    color: var(--hn-muted); margin: 0 0 6px; display: flex; align-items: center; gap: 6px;
}
.stat .stat-value { font-size: 1.45rem; font-weight: 700; letter-spacing: -.03em; line-height: 1.1; font-variant-numeric: tabular-nums; color: var(--hn-text); }
.stat .stat-value.sm { font-size: 1.16rem; }
.stat .stat-meta { font-size: 12px; color: var(--hn-muted); margin-top: 4px; display: flex; align-items: center; gap: 6px; }
.stat .icon, .stat-ico {
    width: 40px; height: 40px; flex: 0 0 40px; border-radius: 11px;
    display: grid; place-items: center; font-size: 18px;
    background: var(--hn-accent-soft, var(--hn-green-50));
    color: var(--hn-accent, var(--hn-green-600));
    box-shadow: inset 0 0 0 1px rgba(15, 40, 28, .05);
}
.stat-row { display: flex; align-items: center; gap: 12px; }
.stat-row .stat-txt { min-width: 0; }
.stat.gold { --hn-accent: var(--hn-gold-600); --hn-accent-soft: var(--hn-gold-50); }
.stat.red  { --hn-accent: var(--hn-danger); --hn-accent-soft: var(--hn-danger-soft); }
.stat.blue { --hn-accent: var(--hn-info); --hn-accent-soft: var(--hn-info-soft); }
.stat.green { --hn-accent: var(--hn-success); --hn-accent-soft: var(--hn-success-soft); }
.stat.amber { --hn-accent: var(--hn-warning); --hn-accent-soft: var(--hn-warning-soft); }

/* quick action tiles (dashboard) */
.qa-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(184px, 1fr)); gap: 10px; }
.qa {
    display: flex; align-items: center; gap: 11px;
    padding: 12px 13px; border-radius: var(--hn-radius);
    border: 1px solid var(--hn-border); background: #FFF;
    color: var(--hn-text-2); font-weight: 600; font-size: 13.5px;
    box-shadow: var(--hn-shadow-xs);
    transition: transform var(--hn-fast), box-shadow var(--hn-fast), border-color var(--hn-fast), background var(--hn-fast);
}
.qa:hover { transform: translateY(-1px); border-color: var(--hn-green-300); background: var(--hn-green-50); color: var(--hn-green-700); box-shadow: var(--hn-shadow-sm); }
.qa .icon { width: 34px; height: 34px; flex: 0 0 34px; border-radius: 9px; display: grid; place-items: center; background: var(--hn-green-600); color: #FFF; font-size: 15px; }
.qa .sub { display: block; font-size: 11.5px; font-weight: 500; color: var(--hn-muted); }

/* ============================================================= 9. FORMS */
.form-label, .lbl {
    font-size: 12px;
    font-weight: 600;
    letter-spacing: .02em;
    color: var(--hn-text-2);
    margin-bottom: 5px;
}
.form-label .req, .lbl .req { color: var(--hn-danger); font-weight: 700; }
.form-label .hint, .field-hint { display: block; font-size: 11.5px; font-weight: 500; color: var(--hn-muted-2); margin-top: 4px; }

.form-control, .form-select, textarea.form-control {
    border: 1px solid var(--hn-border-strong);
    border-radius: 10px;
    background: #FFF;
    padding: 8px 11px;
    font-size: 14px;
    line-height: 1.45;
    color: var(--hn-text);
    box-shadow: none;
    transition: border-color var(--hn-fast), box-shadow var(--hn-fast), background var(--hn-fast);
}
.form-control::placeholder { color: var(--hn-muted-2); opacity: 1; }
.form-control:hover:not(:disabled), .form-select:hover:not(:disabled) { border-color: var(--hn-muted-2); }
.form-control:focus, .form-select:focus {
    border-color: var(--hn-green-500);
    box-shadow: 0 0 0 3px rgba(22, 128, 79, .14);
    outline: 0;
}
.form-control:disabled, .form-control[readonly], .form-select:disabled {
    background: var(--hn-surface-3);
    color: var(--hn-muted);
    border-color: var(--hn-border);
    opacity: 1;
}
.form-control.is-invalid, .form-select.is-invalid { border-color: var(--hn-danger); }
.form-control.is-invalid:focus, .form-select.is-invalid:focus { box-shadow: 0 0 0 3px rgba(194, 45, 59, .14); }
.invalid-feedback, .text-danger.small { font-size: 11.5px; font-weight: 500; color: var(--hn-danger); }
.form-select {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%2367796F' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.6' d='m2 5.5 6 6 6-6'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right .6rem center;
    background-size: 15px 15px;
    padding-right: 2rem;
}
.form-control-sm { border-radius: 8px; padding: 5px 8px; font-size: 13px; }
.form-select-sm { border-radius: 8px; padding: 5px 26px 5px 8px; font-size: 13px; background-size: 13px 13px; }
.form-control-lg { border-radius: 12px; padding: 11px 14px; font-size: 15.5px; }
.form-check-input { border-color: var(--hn-border-strong); border-radius: 5px; width: 1.08em; height: 1.08em; margin-top: .12em; }
.form-check-input:checked { background-color: var(--hn-green-600); border-color: var(--hn-green-600); }
.form-check-input:focus { box-shadow: 0 0 0 3px rgba(22, 128, 79, .14); border-color: var(--hn-green-400); }
.form-check-label { font-size: 13.5px; color: var(--hn-text-2); }
.form-switch .form-check-input { width: 2.1em; height: 1.15em; border-radius: 999px; }
.input-group-text {
    background: var(--hn-surface-3);
    border: 1px solid var(--hn-border-strong);
    border-right: 0;
    color: var(--hn-muted);
    font-size: 13px;
    border-radius: 10px 0 0 10px;
}
.input-group > :not(:first-child):not(.btn):not(.dropdown-menu):not(.valid-tooltip) { border-radius: 0 10px 10px 0; }
.input-group .btn { border-radius: 0 10px 10px 0; }
.input-group .quick-add-btn {
    border: 1px solid var(--hn-green-600);
    background: var(--hn-green-600);
    color: #FFF;
    border-left: 0;
    border-radius: 0 10px 10px 0;
    padding: 0 11px;
    transition: background var(--hn-fast);
}
.input-group .quick-add-btn:hover { background: var(--hn-green-500); color: #FFF; }
.form-control.bg-light, .form-control[readonly].bg-light { background: var(--hn-surface-3) !important; }

fieldset { border: 0; padding: 0; margin: 0 0 4px; min-width: 0; }
legend, .fieldset-title {
    font-size: 11px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
    color: var(--hn-muted); padding: 0 0 6px; width: 100%;
    display: flex; align-items: center; gap: 8px;
}
legend::after, .fieldset-title::after { content: ""; flex: 1; height: 1px; background: var(--hn-border); }

/* number inputs: spinners get out of the cashier's way */
input[type=number]::-webkit-outer-spin-button,
input[type=number]::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
input[type=number] { -moz-appearance: textfield; appearance: textfield; }
input[type=date], input[type=time], input[type=datetime-local] { min-height: 38px; }

/* ============================================================== 10. BUTTONS */
.btn {
    --bs-btn-padding-y: 8px;
    --bs-btn-padding-x: 14px;
    --bs-btn-font-size: 14px;
    --bs-btn-border-radius: 10px;
    --bs-btn-font-weight: 600;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    line-height: 1.35;
    letter-spacing: -.005em;
    border: 1px solid transparent;
    padding: 8px 14px;
    font-size: 14px;
    font-weight: 600;
    border-radius: 10px;
    cursor: pointer;
    text-decoration: none;
    white-space: nowrap;
    transition: background var(--hn-fast), color var(--hn-fast), border-color var(--hn-fast), box-shadow var(--hn-fast), transform var(--hn-fast), filter var(--hn-fast);
}
.btn i { font-size: 1.02em; line-height: 0; }
.btn:active { transform: translateY(1px); }
.btn:focus-visible { outline: 2px solid var(--hn-green-500); outline-offset: 2px; box-shadow: none; }
.btn[disabled], .btn:disabled { opacity: .55; pointer-events: none; }

.btn-primary, .btn-success {
    background: var(--hn-green-600);
    border-color: var(--hn-green-600);
    color: #FFF;
    box-shadow: 0 1px 2px rgba(11, 63, 43, .28);
}
.btn-primary:hover, .btn-success:hover { background: var(--hn-green-500); border-color: var(--hn-green-500); color: #FFF; box-shadow: 0 4px 14px -4px rgba(17, 99, 68, .5); }
.btn-primary:active, .btn-success:active { background: var(--hn-green-700); color: #FFF; }
.btn-outline-primary, .btn-outline-success { color: var(--hn-green-700); border-color: var(--hn-green-300); background: #FFF; }
.btn-outline-primary:hover, .btn-outline-success:hover { background: var(--hn-green-600); border-color: var(--hn-green-600); color: #FFF; }
.btn-danger { background: var(--hn-danger); border-color: var(--hn-danger); color: #FFF; }
.btn-danger:hover { background: #A82431; border-color: #A82431; color: #FFF; }
.btn-outline-danger { color: var(--hn-danger); border-color: #E9BEC2; background: #FFF; }
.btn-outline-danger:hover { background: var(--hn-danger); border-color: var(--hn-danger); color: #FFF; }
.btn-warning { background: var(--hn-gold-500); border-color: var(--hn-gold-600); color: #2B1E02; }
.btn-warning:hover { background: var(--hn-gold-400); color: #2B1E02; }
.btn-secondary, .btn-outline-secondary { background: #FFF; border-color: var(--hn-border-strong); color: var(--hn-text-2); }
.btn-secondary:hover, .btn-outline-secondary:hover { background: var(--hn-surface-3); border-color: var(--hn-muted-2); color: var(--hn-text); }
.btn-info { background: var(--hn-info-soft); border-color: #BEDDE6; color: #0B5566; }
.btn-dark { background: var(--hn-green-900); border-color: var(--hn-green-900); color: #FFF; }
.btn-dark:hover { background: var(--hn-green-800); color: #FFF; }
.btn-link { color: var(--hn-green-600); text-decoration: none; font-weight: 600; }
.btn-link:hover { color: var(--hn-green-500); text-decoration: underline; }

.btn-gold { background: linear-gradient(180deg, var(--hn-gold-500), var(--hn-gold-600)); border-color: var(--hn-gold-600); color: #2B1E02; box-shadow: 0 2px 10px -3px rgba(192, 138, 21, .6); }
.btn-gold:hover { filter: brightness(1.06); color: #2B1E02; box-shadow: 0 6px 18px -6px rgba(192, 138, 21, .7); }
.btn-soft { background: var(--hn-surface-3); border-color: transparent; color: var(--hn-text-2); }
.btn-soft:hover { background: #E5EAE6; color: var(--hn-text); }
.btn-ghost { background: transparent; border-color: transparent; color: var(--hn-muted); }
.btn-ghost:hover { background: var(--hn-surface-3); color: var(--hn-text); }

.btn-sm { --bs-btn-padding-y: 5px; --bs-btn-padding-x: 10px; --bs-btn-font-size: 13px; padding: 5px 10px; font-size: 13px; border-radius: 8px; gap: 6px; }
.btn-lg { --bs-btn-padding-y: 12px; --bs-btn-padding-x: 20px; --bs-btn-font-size: 15.5px; padding: 12px 20px; font-size: 15.5px; border-radius: 12px; gap: 9px; }
.btn-lg-action { padding: 8px 14px; font-size: 14px; }
.btn-icon { width: 34px; height: 34px; padding: 0; border-radius: 9px; }
.btn-icon.btn-sm { width: 29px; height: 29px; border-radius: 8px; }
.btn-icon.btn-lg { width: 44px; height: 44px; border-radius: 11px; }

/* touch targets for cashiers (also used on tablets) */
@media (pointer: coarse) {
    .btn { min-height: 42px; }
    .btn-sm { min-height: 36px; }
    .form-control, .form-select { min-height: 42px; }
    .form-control-sm, .form-select-sm { min-height: 36px; }
}

/* table row action clusters stay quiet until needed */
.row-actions { display: inline-flex; gap: 5px; align-items: center; white-space: nowrap; }
.row-actions .btn { padding: 3px 8px; font-size: 12.5px; border-radius: 7px; }
.btn-hair { border-color: var(--hn-border); background: #FFF; color: var(--hn-muted); }
.btn-hair:hover { border-color: var(--hn-green-300); color: var(--hn-green-700); background: var(--hn-green-50); }

/* ==================================================== 11. BADGES / STATUS */
.badge {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .03em;
    padding: 3px 8px;
    border-radius: 999px;
    line-height: 1.5;
}
.badge.bg-secondary { background: var(--hn-neutral-soft) !important; color: #3C4A43 !important; border: 1px solid #DCE4DE; }
.badge.bg-success { background: var(--hn-success-soft) !important; color: #0E6239 !important; border: 1px solid #BFE4CD; }
.badge.bg-danger { background: var(--hn-danger-soft) !important; color: #9E2130 !important; border: 1px solid #F0C8CC; }
.badge.bg-warning { background: var(--hn-warning-soft) !important; color: #8A5104 !important; border: 1px solid #EFDCB4; }
.badge.bg-info { background: var(--hn-info-soft) !important; color: #0B5566 !important; border: 1px solid #BEDDE6; }
.badge.bg-primary { background: var(--hn-green-50) !important; color: var(--hn-green-700) !important; border: 1px solid var(--hn-green-100); }
.badge.bg-dark { background: var(--hn-green-900) !important; color: #D9E8DF !important; }
.badge.bg-light { background: var(--hn-surface-3) !important; color: var(--hn-text-2) !important; border: 1px solid var(--hn-border); }
.badge.bg-gold { background: var(--hn-gold-50) !important; color: var(--hn-gold-700) !important; border: 1px solid var(--hn-gold-100); }

.pill {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 3px 9px 3px 8px; border-radius: 999px;
    font-size: 11.5px; font-weight: 700; letter-spacing: .02em;
    background: var(--hn-surface-3); color: var(--hn-text-2);
    border: 1px solid var(--hn-border);
    white-space: nowrap;
}
.pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: .85; }
.pill.no-dot::before { display: none; }
.pill.green { background: var(--hn-success-soft); color: #0E6239; border-color: #BFE4CD; }
.pill.red { background: var(--hn-danger-soft); color: #9E2130; border-color: #F0C8CC; }
.pill.amber { background: var(--hn-warning-soft); color: #8A5104; border-color: #EFDCB4; }
.pill.blue { background: var(--hn-info-soft); color: #0B5566; border-color: #BEDDE6; }
.pill.grey { background: var(--hn-neutral-soft); color: #3C4A43; border-color: #DCE4DE; }
.pill.gold { background: var(--hn-gold-50); color: var(--hn-gold-700); border-color: var(--hn-gold-100); }

.chip {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 2px 9px; border-radius: 7px; font-size: 11.5px; font-weight: 600;
    background: var(--hn-surface-3); color: var(--hn-muted); border: 1px solid var(--hn-border);
}
.chip.inv { background: var(--hn-green-50); color: var(--hn-green-700); border-color: var(--hn-green-100); }
.chip.cust { background: var(--hn-gold-50); color: var(--hn-gold-700); border-color: var(--hn-gold-100); }

/* ========================================================= 12. ALERTS/TOAST */
.alert {
    display: flex; align-items: flex-start; gap: 10px;
    border: 1px solid var(--hn-border);
    border-left: 3px solid var(--hn-muted-2);
    border-radius: var(--hn-radius);
    background: #FFF;
    padding: 11px 14px;
    font-size: 13.8px;
    margin-bottom: 14px;
    box-shadow: var(--hn-shadow-xs);
    color: var(--hn-text-2);
}
.alert i:first-child { font-size: 16px; margin-top: 1px; }
.alert .btn-close { margin: 2px -4px 0 auto; padding: 9px; }
.alert-success { background: #F1FAF4; border-color: #C6E7D3; border-left-color: var(--hn-success); color: #0E5231; }
.alert-danger, .alert-error { background: #FEF4F5; border-color: #F2CFD3; border-left-color: var(--hn-danger); color: #8E202C; }
.alert-warning { background: #FEF8EC; border-color: #F1DFB9; border-left-color: var(--hn-warning); color: #7A4A05; }
.alert-info { background: #F0F8FA; border-color: #C6E2EA; border-left-color: var(--hn-info); color: #0A5364; }
.alert ul { margin: 4px 0 0; padding-left: 18px; }
.alert strong { font-weight: 700; }

.toast-stack { position: fixed; right: 16px; bottom: 16px; z-index: 1090; display: flex; flex-direction: column; gap: 9px; width: min(370px, calc(100vw - 32px)); pointer-events: none; }
.pos-toast {
    pointer-events: auto;
    display: flex; align-items: flex-start; gap: 10px;
    padding: 11px 12px;
    border-radius: var(--hn-radius);
    background: rgba(255, 255, 255, .97);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    border: 1px solid var(--hn-border);
    border-left: 3px solid var(--hn-success);
    box-shadow: var(--hn-shadow-lg);
    font-size: 13.5px;
    color: var(--hn-text-2);
    animation: toastIn .22s var(--hn-ease);
}
.pos-toast .ti { font-size: 16px; line-height: 1.2; color: var(--hn-success); }
.pos-toast .tx { flex: 1; min-width: 0; }
.pos-toast .tx b { display: block; font-size: 13px; color: var(--hn-text); }
.pos-toast .close-x { border: 0; background: transparent; color: var(--hn-muted-2); cursor: pointer; padding: 0 2px; font-size: 15px; line-height: 1; }
.pos-toast .close-x:hover { color: var(--hn-text); }
.pos-toast.err { border-left-color: var(--hn-danger); } .pos-toast.err .ti { color: var(--hn-danger); }
.pos-toast.warn { border-left-color: var(--hn-warning); } .pos-toast.warn .ti { color: var(--hn-warning); }
.pos-toast.info { border-left-color: var(--hn-info); } .pos-toast.info .ti { color: var(--hn-info); }
.pos-toast.hide { animation: toastOut .2s var(--hn-ease) forwards; }
@keyframes toastIn { from { opacity: 0; transform: translateY(10px) scale(.97); } to { opacity: 1; transform: none; } }
@keyframes toastOut { to { opacity: 0; transform: translateX(14px) scale(.97); } }

/* ============================================================= 13. MODALS */
.modal-content {
    border: 1px solid var(--hn-border);
    border-radius: var(--hn-radius-lg);
    box-shadow: var(--hn-shadow-lg);
    overflow: hidden;
}
.modal-header {
    padding: 14px 18px;
    border-bottom: 1px solid var(--hn-border);
    background: linear-gradient(180deg, #FFF, var(--hn-surface-2));
}
.modal-title { font-size: 15.5px; font-weight: 700; letter-spacing: -.015em; display: flex; align-items: center; gap: 9px; }
.modal-title i { color: var(--hn-green-600); }
.modal-body { padding: 18px; font-size: 14px; }
.modal-footer { padding: 12px 18px; background: var(--hn-surface-2); border-top: 1px solid var(--hn-border); gap: 8px; }
.modal-backdrop.show { opacity: .48; background: #06201A; }
.modal.fade { transition-duration: .18s; }
.modal.show .modal-dialog { transform: none; }
.modal-dialog { border: 0; }
.modal-lg, .modal-xl { --bs-modal-width: 92%; }
@media (min-width: 992px) { .modal-lg { --bs-modal-width: 780px; } .modal-xl { --bs-modal-width: 1080px; } }

.offcanvas { border: 0; box-shadow: var(--hn-shadow-lg); }
.offcanvas-header { background: linear-gradient(180deg, var(--hn-green-900), var(--hn-green-950)); color: #FFF; border-bottom: 1px solid rgba(255, 255, 255, .08); padding: 12px 14px; }
.offcanvas-title { font-size: 14.5px; font-weight: 700; }
.offcanvas-body { padding: 8px 10px 24px; }

/* confirm dialog (replaces jarring native confirm()) */
.hn-confirm { position: fixed; inset: 0; z-index: 1095; display: none; place-items: center; padding: 18px; }
.hn-confirm.show { display: grid; }
.hn-confirm .veil { position: absolute; inset: 0; background: rgba(6, 32, 26, .5); -webkit-backdrop-filter: blur(2px); backdrop-filter: blur(2px); }
.hn-confirm .box {
    position: relative; width: min(430px, 100%);
    background: #FFF; border-radius: var(--hn-radius-lg); box-shadow: var(--hn-shadow-lg);
    padding: 20px; animation: toastIn .18s var(--hn-ease); text-align: left;
}
.hn-confirm .ic { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; font-size: 19px; background: var(--hn-danger-soft); color: var(--hn-danger); margin-bottom: 12px; }
.hn-confirm h5 { margin: 0 0 6px; font-size: 16px; }
.hn-confirm p { margin: 0; color: var(--hn-muted); font-size: 13.5px; }
.hn-confirm .acts { display: flex; gap: 8px; justify-content: flex-end; margin-top: 16px; }

/* ================================================== 14. EMPTY / LOADING */
.empty { padding: 38px 18px; text-align: center; color: var(--hn-muted); }
.empty .ic {
    width: 54px; height: 54px; margin: 0 auto 12px; border-radius: 16px;
    display: grid; place-items: center; font-size: 24px;
    background: var(--hn-surface-3); color: var(--hn-muted-2);
    border: 1px solid var(--hn-border);
}
.empty .t { font-weight: 700; color: var(--hn-text-2); font-size: 14.5px; margin-bottom: 3px; }
.empty .s { font-size: 13px; }
.empty-inline { padding: 20px; text-align: center; color: var(--hn-muted-2); font-size: 13.5px; }

.skeleton { background: linear-gradient(90deg, #EEF1EE 25%, #F6F8F6 37%, #EEF1EE 63%); background-size: 400% 100%; animation: shimmer 1.4s ease infinite; border-radius: 7px; height: 11px; }
@keyframes shimmer { 0% { background-position: 100% 0; } 100% { background-position: 0 0; } }

.spinner { width: 15px; height: 15px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: spin .7s linear infinite; display: inline-block; vertical-align: -2px; }
@keyframes spin { to { transform: rotate(360deg); } }
.is-busy { position: relative; overflow: hidden; }
.is-busy::after { content: ""; position: absolute; inset: 0; background: repeating-linear-gradient(115deg, rgba(255,255,255,.28) 0 12px, transparent 12px 24px); animation: slide .7s linear infinite; pointer-events: none; }
@keyframes slide { to { transform: translateX(-24px); } }

/* ============================================================ 15. TABLES */
.table-wrap, .table-responsive { border-radius: inherit; }
.table {
    --bs-table-bg: transparent;
    width: 100%;
    margin: 0;
    color: var(--hn-text-2);
    font-size: 13.6px;
    border-collapse: separate;
    border-spacing: 0;
}
.table > thead th {
    position: sticky;
    top: 0;
    z-index: 2;
    background: var(--hn-surface-3);
    color: var(--hn-muted);
    font-size: 10.8px;
    font-weight: 700;
    letter-spacing: .07em;
    text-transform: uppercase;
    white-space: nowrap;
    padding: 9px 11px;
    border-bottom: 1px solid var(--hn-border-strong);
    border-top: 0;
}
.table > thead th:first-child { padding-left: 16px; }
.table > thead th:last-child { padding-right: 16px; }
.table > tbody td {
    padding: 9px 11px;
    border-bottom: 1px solid var(--hn-border);
    vertical-align: middle;
    transition: background var(--hn-fast);
}
.table > tbody td:first-child { padding-left: 16px; }
.table > tbody td:last-child { padding-right: 16px; }
.table > tbody tr:last-child > td { border-bottom: 0; }
.table > tbody tr:hover > td { background: #F7FAF7; }
.table > tbody tr.is-draft > td { background: #FFFDF3; }
.table > tfoot td { padding: 10px 11px; background: var(--hn-surface-2); border-top: 1px solid var(--hn-border-strong); font-weight: 700; font-size: 13.5px; }
.table > tfoot td:first-child { padding-left: 16px; }
.table > tfoot td:last-child { padding-right: 16px; }
.table-sm > thead th { padding: 8px 9px; font-size: 10.4px; }
.table-sm > tbody td { padding: 6px 9px; font-size: 13.2px; }
.table-sm > tfoot td { padding: 8px 9px; }
.table thead th.text-end, .table td.text-end { text-align: right; }
.table td.col-main { font-weight: 600; color: var(--hn-text); }
.table .t-sub { display: block; font-size: 11.5px; font-weight: 500; color: var(--hn-muted); }
.table a.bill-link { font-weight: 700; font-variant-numeric: tabular-nums; color: var(--hn-green-700); }
.table a.bill-link:hover { color: var(--hn-green-500); text-decoration: underline; text-underline-offset: 2px; }
.table-striped > tbody > tr:nth-of-type(odd) > * { background: transparent; --bs-table-accent-bg: transparent; }
.card > .table-responsive, .panel > .table-responsive { border-top: 1px solid var(--hn-border); }
.table-scroll { overflow: auto; max-height: min(66vh, 760px); }
.table-scroll > .table > thead th { box-shadow: inset 0 -1px 0 var(--hn-border-strong); }
/* keep the row identifier visible while scrolling wide tables sideways */
.table-sticky-cols > thead th:first-child, .table-sticky-cols > tbody td:first-child {
    position: sticky; left: 0; z-index: 1; background: #FFF;
    box-shadow: 1px 0 0 var(--hn-border);
}
.table-sticky-cols > thead th:first-child { background: var(--hn-surface-3); z-index: 3; }
.table-sticky-cols > tbody tr:hover td:first-child { background: #F7FAF7; }

/* pagination */
.pagination { gap: 4px; margin: 0; flex-wrap: wrap; }
.pagination svg, .pager svg { width: 1.05em; height: 1.05em; flex: 0 0 auto; }
.page-link {
    min-width: 33px; height: 33px;
    display: inline-flex; align-items: center; justify-content: center;
    border: 1px solid var(--hn-border);
    border-radius: 9px !important;
    color: var(--hn-text-2);
    font-size: 13px; font-weight: 600;
    background: #FFF;
    padding: 0 8px;
    transition: background var(--hn-fast), color var(--hn-fast), border-color var(--hn-fast);
}
.page-link:hover { background: var(--hn-green-50); border-color: var(--hn-green-300); color: var(--hn-green-700); }
.page-item.active .page-link { background: var(--hn-green-600); border-color: var(--hn-green-600); color: #FFF; }
.page-item.disabled .page-link { color: var(--hn-muted-2); background: var(--hn-surface-2); border-color: var(--hn-border); opacity: 1; }
.pager {
    display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
    padding: 11px 16px; border-top: 1px solid var(--hn-border); background: var(--hn-surface-2);
    font-size: 12.8px; color: var(--hn-muted);
}
.pager .links { margin-left: auto; }
.table-foot-note { font-size: 12.5px; color: var(--hn-muted); padding: 9px 16px; border-top: 1px solid var(--hn-border); background: var(--hn-surface-2); }

/* ================================================================ 16. POS */
/* Two-pane billing workspace: catalogue+cart on the left, sticky totals right. */
.pos-shell { display: grid; grid-template-columns: minmax(0, 1fr) 372px; gap: 16px; align-items: start; }
.pos-shell.pos-no-aside { grid-template-columns: minmax(0, 1fr); }
.pos-side { position: sticky; top: calc(var(--hn-header-h) + 16px); align-self: start; }

.pos-catalog {
    background: linear-gradient(180deg, var(--hn-green-900), var(--hn-green-950));
    color: #DAE8DF;
    border-radius: var(--hn-radius-lg);
    border: 1px solid rgba(255, 255, 255, .07);
    box-shadow: var(--hn-shadow);
    overflow: hidden;
    margin-bottom: 14px;
}
.pos-catalog .pc-head { padding: 13px 15px 11px; border-bottom: 1px solid rgba(255, 255, 255, .08); }
.pos-catalog .pc-title { display: flex; align-items: center; gap: 9px; font-size: 14px; font-weight: 700; color: #FFF; }
.pos-catalog .pc-title i { color: var(--hn-gold-400); }
.pos-catalog .pc-sub { font-size: 11.5px; color: rgba(206, 226, 214, .62); margin-top: 3px; }
.pos-catalog .pc-body { padding: 12px 15px 14px; }

.pos-search { position: relative; }
.pos-search input {
    width: 100%;
    height: 44px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, .14);
    background: rgba(255, 255, 255, .07);
    color: #FFF;
    padding: 0 40px 0 40px;
    font-size: 14.5px;
    font-weight: 500;
    transition: border-color var(--hn-fast), background var(--hn-fast), box-shadow var(--hn-fast);
}
.pos-search input::placeholder { color: rgba(214, 233, 222, .55); }
.pos-search input:focus { outline: 0; border-color: var(--hn-gold-400); background: rgba(255, 255, 255, .11); box-shadow: 0 0 0 3px rgba(224, 169, 36, .16); }
.pos-search .si { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); color: rgba(224, 169, 36, .9); font-size: 15px; pointer-events: none; }
.pos-search .s-clear { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); border: 0; background: rgba(255, 255, 255, .1); color: #DAE8DF; width: 26px; height: 26px; border-radius: 8px; cursor: pointer; display: none; }
.pos-search.has-value .s-clear { display: block; }
.pos-search .s-clear:hover { background: rgba(255, 255, 255, .2); }

.pos-suggest {
    position: absolute; top: calc(100% + 7px); left: 0; right: 0; z-index: 1060;
    background: #FFF; color: var(--hn-text);
    border: 1px solid var(--hn-border); border-radius: var(--hn-radius);
    box-shadow: var(--hn-shadow-lg);
    max-height: 336px; overflow-y: auto; padding: 6px;
}
.pos-suggest .rowx {
    display: flex; align-items: center; gap: 10px; width: 100%; text-align: left;
    padding: 8px 9px; border: 0; border-radius: 9px; background: transparent; cursor: pointer;
    font-size: 13.5px; color: var(--hn-text-2);
}
.pos-suggest .rowx:hover, .pos-suggest .rowx.hl { background: var(--hn-green-50); }
.pos-suggest .rowx .nm { font-weight: 600; color: var(--hn-text); }
.pos-suggest .rowx .mt { font-size: 11.5px; color: var(--hn-muted); }
.pos-suggest .rowx .av { margin-left: auto; text-align: right; }
.pos-suggest .rowx .av b { display: block; font-variant-numeric: tabular-nums; font-size: 13px; color: var(--hn-green-700); }
.pos-suggest .none { padding: 14px 12px; text-align: center; color: var(--hn-muted); font-size: 13px; }

.pos-filters { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 10px; }
.pos-filters select { height: 32px; font-size: 12.5px; padding: 0 26px 0 9px; border-radius: 9px; border: 1px solid rgba(255, 255, 255, .16); background: rgba(255, 255, 255, .07); color: #E7F2EB; -webkit-appearance: none; appearance: none; }
.pos-filters select option { color: var(--hn-text); }
.pos-filters select:focus { outline: 0; border-color: var(--hn-gold-400); }
.pos-filters .lbl2 { font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: rgba(206, 226, 214, .5); font-weight: 700; align-self: center; }

.pos-chips { display: flex; gap: 7px; overflow-x: auto; padding: 2px 0 4px; margin-top: 8px; scrollbar-width: thin; }
.pos-chips .chipx {
    flex: 0 0 auto; min-height: 40px;
    display: flex; align-items: center; gap: 8px;
    padding: 6px 11px; border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, .13);
    background: rgba(255, 255, 255, .05);
    color: #E7F2EB; font-size: 12.8px; font-weight: 600; cursor: pointer;
    transition: background var(--hn-fast), border-color var(--hn-fast), transform var(--hn-fast);
}
.pos-chips .chipx:hover { background: rgba(255, 255, 255, .12); border-color: var(--hn-gold-400); transform: translateY(-1px); }
.pos-chips .chipx:active { transform: scale(.98); }
.pos-chips .chipx .kk { font-size: 10.5px; color: var(--hn-gold-400); font-variant-numeric: tabular-nums; }
.pos-chips .chipx .low { color: var(--hn-gold-300); font-size: 11px; }
.pos-chips .chipx.empty-yet { opacity: .55; pointer-events: none; }
.pos-chips .more {
    flex: 0 0 auto; min-height: 40px; display: flex; align-items: center; padding: 6px 11px;
    border-radius: 10px; border: 1px dashed rgba(255, 255, 255, .18); color: rgba(231, 242, 235, .7);
    font-size: 12.3px; font-weight: 600; background: transparent; cursor: pointer;
}
.pos-chips .more:hover { color: #FFF; border-color: var(--hn-gold-400); }

/* the cart table itself */
.pos-cart { background: #FFF; border: 1px solid var(--hn-border); border-radius: var(--hn-radius-lg); box-shadow: var(--hn-shadow-sm); overflow: hidden; }
.pos-cart .cart-head { display: flex; align-items: center; gap: 10px; padding: 11px 14px; border-bottom: 1px solid var(--hn-border); background: linear-gradient(180deg, #FFF, var(--hn-surface-2)); flex-wrap: wrap; }
.pos-cart .cart-head .t { display: flex; align-items: center; gap: 9px; font-weight: 700; font-size: 14.5px; }
.pos-cart .cart-head .t i { color: var(--hn-green-600); }
.pos-cart .cart-head .count { font-size: 11.5px; font-weight: 700; background: var(--hn-green-50); color: var(--hn-green-700); border: 1px solid var(--hn-green-100); border-radius: 999px; padding: 2px 8px; }
.pos-cart .cart-tools { margin-left: auto; display: flex; gap: 7px; align-items: center; flex-wrap: wrap; }
.pos-cart .hint { font-size: 11.8px; color: var(--hn-muted-2); padding: 8px 14px 0; }

.cart-table { width: 100%; font-size: 13.2px; border-collapse: separate; border-spacing: 0; }
.cart-table th {
    background: var(--hn-surface-3);
    font-size: 10.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--hn-muted);
    padding: 8px 8px; text-align: left; white-space: nowrap; border-bottom: 1px solid var(--hn-border-strong);
}
.cart-table td { padding: 7px 8px; border-bottom: 1px solid var(--hn-border); vertical-align: middle; }
.cart-table tbody tr { transition: background var(--hn-fast); }
.cart-table tbody tr:hover { background: #FAFCFA; }
.cart-table tbody tr.row-custom { background: #FFFDF4; }
.cart-table tbody tr.row-custom:hover { background: #FFF9E9; }
.cart-table tbody tr.row-combo { background: #F4FAFF; }
.cart-table tbody tr:last-child td { border-bottom: 0; }
.cart-table td.c-prod { min-width: 200px; }
.cart-table .prod-name { font-weight: 650; color: var(--hn-text); font-size: 13.4px; display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }
.cart-table .prod-meta { font-size: 11.4px; color: var(--hn-muted); margin-top: 2px; display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.cart-table input.form-control, .cart-table select.form-select { font-variant-numeric: tabular-nums; text-align: right; }
.cart-table input.qty, .cart-table input.weight { text-align: right; }
.cart-table .cell-num { width: 96px; }
.cart-table .cell-num input { padding: 4px 7px; height: 32px; font-size: 13.2px; }
.cart-table .amt { font-weight: 700; font-size: 13.6px; text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; color: var(--hn-text); }
.cart-table .cell-del { width: 34px; text-align: center; }
.cart-table .del-row { width: 28px; height: 28px; padding: 0; border-radius: 8px; border: 1px solid transparent; background: transparent; color: var(--hn-muted-2); cursor: pointer; display: inline-grid; place-items: center; transition: all var(--hn-fast); }
.cart-table .del-row:hover { background: var(--hn-danger-soft); color: var(--hn-danger); border-color: #F0C8CC; }
.cart-table .avail { font-size: 11.5px; color: var(--hn-muted); text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.cart-table .avail.low { color: var(--hn-warning); font-weight: 600; }
.cart-table .readonly-cell { color: var(--hn-muted); background: var(--hn-surface-3); border-radius: 7px; padding: 4px 7px; display: block; text-align: right; font-variant-numeric: tabular-nums; min-height: 32px; }
.cart-table tr.row-err > td { background: #FEF4F5; }
.cart-table .expand-btn { border: 0; background: transparent; color: var(--hn-green-600); font-size: 11.5px; font-weight: 700; cursor: pointer; padding: 1px 4px; border-radius: 6px; display: inline-flex; align-items: center; gap: 3px; }
.cart-table .expand-btn:hover { background: var(--hn-green-50); }
/* secondary columns live inside a slide-down detail strip per row */
.cart-table .extra-row > td { padding: 0 8px 9px; border-bottom: 1px solid var(--hn-border); background: #FCFDFC; }
.cart-table .extra-row .grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(126px, 1fr)); gap: 8px; padding: 9px 10px; border: 1px dashed var(--hn-border-strong); border-radius: 10px; background: #FFF; }
.cart-table .extra-row label { display: block; font-size: 10.4px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--hn-muted); margin-bottom: 3px; }
.cart-table .extra-row .form-control, .cart-table .extra-row .form-select { height: 31px; font-size: 12.8px; padding: 3px 7px; }
.cart-table .extra-row .readonly-cell { min-height: 0; padding: 5px 7px; }
body.pos-wide .cart-table .extra-row { display: table-row !important; }
.cart-table .extra-row { display: none; }
.pos-cols-full .cart-table .extra-row { display: table-row; }

.cart-empty { padding: 40px 20px; text-align: center; }
.cart-empty .ic { width: 58px; height: 58px; margin: 0 auto 12px; border-radius: 18px; display: grid; place-items: center; font-size: 26px; background: var(--hn-surface-3); border: 1px solid var(--hn-border); color: var(--hn-muted-2); }
.cart-empty .t { font-weight: 700; font-size: 15px; color: var(--hn-text-2); }
.cart-empty .s { font-size: 13px; color: var(--hn-muted); margin-top: 3px; }
.cart-empty kbd { font-family: var(--hn-font); background: #FFF; border: 1px solid var(--hn-border); border-bottom-width: 2px; border-radius: 5px; padding: 1px 5px; font-size: 11px; color: var(--hn-text-2); font-weight: 600; }

.cart-foot { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-top: 1px solid var(--hn-border); background: var(--hn-surface-2); flex-wrap: wrap; }
.cart-foot .kpi { display: flex; align-items: baseline; gap: 6px; font-size: 12.5px; color: var(--hn-muted); }
.cart-foot .kpi b { font-size: 14.5px; color: var(--hn-text); font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.cart-foot .sep { width: 1px; height: 22px; background: var(--hn-border); }

/* totals / checkout */
.tally { background: #FFF; border: 1px solid var(--hn-border); border-radius: var(--hn-radius-lg); box-shadow: var(--hn-shadow-sm); overflow: hidden; }
.tally .t-head { padding: 13px 15px 11px; background: linear-gradient(178deg, var(--hn-green-900), var(--hn-green-950)); color: #FFF; }
.tally .t-head .lbl { font-size: 10.5px; letter-spacing: .12em; text-transform: uppercase; color: rgba(214, 233, 222, .6); font-weight: 700; }
.tally .t-head .amt { font-size: 1.95rem; font-weight: 700; letter-spacing: -.035em; line-height: 1.05; font-variant-numeric: tabular-nums; margin-top: 3px; }
.tally .t-head .amt .cur { font-size: .95rem; font-weight: 600; color: var(--hn-gold-400); margin-right: 5px; letter-spacing: .02em; }
.tally .t-head .sub { font-size: 12px; color: rgba(214, 233, 222, .72); margin-top: 5px; display: flex; gap: 10px; flex-wrap: wrap; }
.tally .rows { padding: 4px 0; }
.tally .r { display: flex; align-items: center; gap: 10px; padding: 6px 15px; font-size: 13.2px; color: var(--hn-text-2); }
.tally .r + .r { border-top: 1px dashed var(--hn-border); }
.tally .r .k { color: var(--hn-muted); }
.tally .r .v { margin-left: auto; font-variant-numeric: tabular-nums; font-weight: 600; }
.tally .r.neg .v { color: var(--hn-danger); }
.tally .r.pos .v { color: var(--hn-success); }
.tally .r.strong { background: var(--hn-surface-2); font-weight: 700; }
.tally .edit { display: flex; align-items: center; gap: 6px; padding: 5px 15px 7px; }
.tally .edit .form-control { height: 31px; font-size: 13px; padding: 3px 8px; text-align: right; font-variant-numeric: tabular-nums; }
.tally .edit label { font-size: 11px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--hn-muted); flex: 1; margin: 0; }
.tally .acts { padding: 12px 15px 15px; border-top: 1px solid var(--hn-border); background: linear-gradient(180deg, #FFF, var(--hn-surface-2)); display: grid; gap: 8px; }
.tally .acts .btn { width: 100%; justify-content: center; min-height: 44px; font-size: 15px; }
.tally .acts .row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.tally .acts .row2 .btn { min-height: 38px; font-size: 13.5px; }
.tally .save-state { font-size: 11.5px; color: var(--hn-muted-2); text-align: center; }
.tally .save-state kbd { font-family: var(--hn-font); background: var(--hn-surface-3); border: 1px solid var(--hn-border); border-radius: 5px; padding: 0 4px; font-size: 10.5px; font-weight: 600; color: var(--hn-text-2); }

/* compact meta grid above the cart */
.pos-meta { display: grid; grid-template-columns: repeat(auto-fit, minmax(178px, 1fr)); gap: 10px 12px; }
.pos-meta .fld { min-width: 0; }
.pos-meta .fld.wide { grid-column: 1 / -1; }
.pos-meta .form-control, .pos-meta .form-select { height: 38px; }
.pos-meta label { font-size: 11px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--hn-muted); margin-bottom: 4px; }

/* payment strip */
.pay-strip { display: flex; gap: 6px; flex-wrap: wrap; }
.pay-strip .pay-opt {
    flex: 1 1 0; min-width: 84px; min-height: 40px;
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px;
    border: 1px solid var(--hn-border-strong); border-radius: 10px; background: #FFF;
    font-size: 12.2px; font-weight: 650; color: var(--hn-text-2); cursor: pointer;
    transition: all var(--hn-fast);
}
.pay-strip .pay-opt i { font-size: 15px; opacity: .8; }
.pay-strip .pay-opt:hover { border-color: var(--hn-green-400); background: var(--hn-green-50); }
.pay-strip .pay-opt.on { border-color: var(--hn-green-600); background: var(--hn-green-600); color: #FFF; box-shadow: 0 2px 10px -3px rgba(17, 99, 68, .5); }
/* keep the real <select> in the DOM (the form contract) but visually driven by the strip */
.pay-strip-sync { position: absolute; opacity: 0; height: 0; pointer-events: none; }

/* ========================================================== 17. UTILITIES */
.u-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.u-between { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.u-col { display: flex; flex-direction: column; gap: 8px; }
.u-grow { flex: 1 1 auto; min-width: 0; }
.u-right { margin-left: auto; }
.u-tnum { font-variant-numeric: tabular-nums; }
.u-nowrap { white-space: nowrap; }
.u-tight { margin-bottom: 0 !important; }
.u-mt0 { margin-top: 0 !important; } .u-mt1 { margin-top: 6px !important; } .u-mt2 { margin-top: 12px !important; } .u-mt3 { margin-top: 18px !important; }
.u-mb0 { margin-bottom: 0 !important; } .u-mb1 { margin-bottom: 6px !important; } .u-mb2 { margin-bottom: 12px !important; } .u-mb3 { margin-bottom: 18px !important; }
.u-gap0 { gap: 0 !important; } .u-gap1 { gap: 5px !important; } .u-gap2 { gap: 10px !important; } .u-gap3 { gap: 16px !important; }
.u-dim { color: var(--hn-muted); }
.u-strong { color: var(--hn-text); font-weight: 700; }
.u-xsm { font-size: 11.5px; }
.u-sm { font-size: 12.6px; }
.u-sep { display: inline-block; width: 1px; height: 14px; background: var(--hn-border-strong); vertical-align: -2px; margin: 0 2px; }
.u-divide > * + * { padding-top: 10px; margin-top: 10px; border-top: 1px solid var(--hn-border); }
.u-cardflat { box-shadow: none !important; }
.u-scrollx { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.u-hide { display: none !important; }
.grid-auto { display: grid; grid-template-columns: repeat(auto-fill, minmax(var(--gmin, 220px), 1fr)); gap: 12px; }
.divider-label { display: flex; align-items: center; gap: 10px; color: var(--hn-muted-2); font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; margin: 2px 0; }
.divider-label::before, .divider-label::after { content: ""; flex: 1; height: 1px; background: var(--hn-border); }

/* ======================================================== 18. A11Y / MOTION */
:focus-visible { outline: 2px solid var(--hn-green-500); outline-offset: 2px; border-radius: 6px; }
.visually-hidden, .sr-only {
    position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; border: 0;
}
.skip-link { position: absolute; left: 8px; top: -46px; z-index: 1100; background: var(--hn-green-700); color: #FFF; padding: 8px 14px; border-radius: 0 0 10px 10px; font-weight: 600; transition: top var(--hn-fast); }
.skip-link:focus { top: 0; color: #FFF; }
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
    .stat:hover, .qa:hover, .btn:active { transform: none !important; }
}

/* ============================================ 19. BOOTSTRAP COMPATIBILITY */
/* Re-point Bootstrap's own palette at the Haji Nazeer brand so that every
   existing view (which uses bg-primary / text-success / border-danger …) picks
   up the new identity without any markup change. Semantics stay identical:
   success is still success, danger is still danger. */
:root {
    --bs-primary: var(--hn-green-600);
    --bs-primary-rgb: 17, 99, 68;
    --bs-success: var(--hn-success);
    --bs-success-rgb: 22, 128, 79;
    --bs-danger: var(--hn-danger);
    --bs-danger-rgb: 194, 45, 59;
    --bs-warning: var(--hn-gold-500);
    --bs-warning-rgb: 224, 169, 36;
    --bs-info: var(--hn-info);
    --bs-info-rgb: 14, 110, 134;
    --bs-secondary: var(--hn-neutral);
    --bs-secondary-rgb: 79, 98, 89;
    --bs-dark: var(--hn-green-900);
    --bs-dark-rgb: 6, 32, 24;
    --bs-body-font-family: var(--hn-font);
    --bs-body-color: var(--hn-text-2);
    --bs-body-bg: var(--hn-page);
    --bs-border-color: var(--hn-border);
    --bs-border-radius: 10px;
    --bs-border-radius-sm: 8px;
    --bs-border-radius-lg: 14px;
    --bs-link-color: var(--hn-green-700);
    --bs-link-hover-color: var(--hn-green-500);
    --bs-link-color-rgb: 14, 74, 51;
    --bs-emphasis-color: var(--hn-text);
    --bs-gray-600: var(--hn-muted);
    --bs-gray-700: var(--hn-text-2);
}
.text-primary { color: var(--hn-green-700) !important; }
.text-success { color: #0E6239 !important; }
.text-danger { color: var(--hn-danger) !important; }
.text-warning { color: var(--hn-gold-700) !important; }
.text-info { color: var(--hn-info) !important; }
.text-muted { color: var(--hn-muted) !important; }
.text-body { color: var(--hn-text-2) !important; }
/* Respect Bootstrap's opacity mechanism (bg-primary + bg-opacity-10 is used by
   the stat icons) instead of flattening it to a solid swatch. */
.bg-primary { background-color: rgba(var(--bs-primary-rgb), var(--bs-bg-opacity, 1)) !important; }
.bg-success { background-color: rgba(var(--bs-success-rgb), var(--bs-bg-opacity, 1)) !important; }
.bg-danger { background-color: rgba(var(--bs-danger-rgb), var(--bs-bg-opacity, 1)) !important; }
.bg-warning { background-color: rgba(var(--bs-warning-rgb), var(--bs-bg-opacity, 1)) !important; }
.bg-info { background-color: rgba(var(--bs-info-rgb), var(--bs-bg-opacity, 1)) !important; }
.bg-secondary { background-color: rgba(var(--bs-secondary-rgb), var(--bs-bg-opacity, 1)) !important; }
.bg-dark { background-color: rgba(var(--bs-dark-rgb), var(--bs-bg-opacity, 1)) !important; }
.bg-gold { background-color: var(--hn-gold-500) !important; }
.text-gold { color: var(--hn-gold-600) !important; }
.bg-light { background-color: var(--hn-surface-3) !important; }
.bg-body { background-color: var(--hn-surface) !important; }
.border-primary { border-color: var(--hn-green-300) !important; }
.border-success { border-color: var(--hn-green-300) !important; }
.border-danger { border-color: #E9BEC2 !important; }
.border-warning { border-color: var(--hn-gold-300) !important; }
.border-secondary { border-color: var(--hn-border-strong) !important; }
.border-dark { border-color: var(--hn-green-900) !important; }
.border { border-color: var(--hn-border) !important; }
.border-top, .border-bottom { border-color: var(--hn-border) !important; }
.text-bg-success, .text-bg-primary { color: #FFF !important; }
.bg-opacity-10 { --bs-bg-opacity: .1; }

/* legacy page-header pattern (kept working on pages that were not restructured) */
.app-content > div.d-flex.justify-content-between.align-items-center:first-child:not(.page-head) {
    gap: 12px;
    padding: 12px 15px;
    margin-bottom: 16px !important;
    background: linear-gradient(120deg, #FFF 0%, #FBFDFB 62%, var(--hn-gold-50) 100%);
    border: 1px solid var(--hn-border);
    border-left: 4px solid var(--hn-green-600);
    border-radius: var(--hn-radius-lg);
    box-shadow: var(--hn-shadow-xs);
}
.app-content > div.d-flex.justify-content-between.align-items-center:first-child:not(.page-head) h4,
.app-content > div.d-flex.justify-content-between.align-items-center:first-child:not(.page-head) h5 { margin: 0; font-size: 1.14rem; }
.app-content > div.d-flex.justify-content-between.align-items-center:first-child:not(.page-head) h4 i,
.app-content > div.d-flex.justify-content-between.align-items-center:first-child:not(.page-head) h5 i { color: var(--hn-green-600); }

/* legacy grid rows inside cards: give them breathing room consistent with the new scale */
.card .row.g-2, .card .row.g-3 { --bs-gutter-y: .78rem; --bs-gutter-x: .85rem; }
.row.g-3 { --bs-gutter-y: 1rem; --bs-gutter-x: 1rem; }
.row.g-2 { --bs-gutter-y: .6rem; --bs-gutter-x: .7rem; }

/* list-group (search suggestions, party pickers) */
.list-group { border-radius: var(--hn-radius); overflow: hidden; }
.list-group-item {
    border-color: var(--hn-border);
    padding: 9px 12px;
    font-size: 13.5px;
    color: var(--hn-text-2);
    background: #FFF;
}
.list-group-item:first-child { border-radius: var(--hn-radius) var(--hn-radius) 0 0; }
.list-group-item:last-child { border-radius: 0 0 var(--hn-radius) var(--hn-radius); }
.list-group-item-action:hover { background: var(--hn-green-50); color: var(--hn-green-700); }
.list-group-item.active { background: var(--hn-green-600); border-color: var(--hn-green-600); }

/* tabs / pills */
.nav-tabs { border-bottom-color: var(--hn-border); gap: 4px; }
.nav-tabs .nav-link {
    border: 1px solid transparent; border-radius: 10px 10px 0 0;
    color: var(--hn-muted); font-weight: 600; font-size: 13.5px; padding: 8px 14px;
}
.nav-tabs .nav-link:hover { border-color: transparent; background: var(--hn-surface-3); color: var(--hn-text); }
.nav-tabs .nav-link.active { color: var(--hn-green-700); background: #FFF; border-color: var(--hn-border) var(--hn-border) #FFF; }
.nav-pills .nav-link { border-radius: 9px; font-weight: 600; font-size: 13.5px; color: var(--hn-text-2); padding: 7px 13px; }
.nav-pills .nav-link.active { background: var(--hn-green-600); color: #FFF; }

/* misc element retint */
code, kbd, pre { font-family: var(--hn-mono); font-size: .88em; }
.img-thumbnail { border: 1px solid var(--hn-border); border-radius: 10px; padding: 4px; background: #FFF; }
.figure-caption, .text-lowercase { color: var(--hn-muted); }
.progress { border-radius: 999px; background: var(--hn-surface-3); height: 7px; overflow: hidden; }
.progress-bar { background: linear-gradient(90deg, var(--hn-green-600), var(--hn-green-400)); }

/* ========================================================== 20. RESPONSIVE */
/* < 1440: narrow the sidebar slightly so wide POS tables keep their columns */
@media (max-width: 1439.98px) {
    :root { --hn-sidebar-w: 232px; }
    .pos-shell { grid-template-columns: minmax(0, 1fr) 336px; }
}

/* < 1200: sidebar becomes an overlay drawer; POS summary flows under the cart */
@media (max-width: 1199.98px) {
    .app-sidebar {
        transform: translateX(-102%);
        transition: transform .22s var(--hn-ease);
        width: 272px;
        box-shadow: none;
    }
    body.nav-open .app-sidebar { transform: none; box-shadow: 24px 0 60px -18px rgba(3, 19, 12, .55); }
    .nav-scrim {
        position: fixed; inset: 0; z-index: 1044; background: rgba(6, 32, 26, .45);
        opacity: 0; pointer-events: none; transition: opacity var(--hn-med);
    }
    body.nav-open .nav-scrim { opacity: 1; pointer-events: auto; }
    .app-main { margin-left: 0; }
    body.nav-rail { --hn-sidebar-w: 232px; }
    body.nav-rail .brand-text, body.nav-rail .nav-link-text, body.nav-rail .nav-group-label,
    body.nav-rail .sidebar-foot, body.nav-rail .submenu { display: revert; }
    body.nav-rail .app-sidebar .nav-link { justify-content: flex-start; padding: 9px 12px; }
    body.nav-rail .app-sidebar .nav-link i { font-size: 16px; }
    .pos-shell { grid-template-columns: minmax(0, 1fr); }
    .pos-side { position: static; }
    .tally .t-head .amt { font-size: 1.7rem; }
    .tally { display: grid; grid-template-columns: minmax(220px, 1fr) minmax(260px, 1fr); }
    .tally .rows { grid-column: 2; grid-row: 1 / span 2; border-left: 1px solid var(--hn-border); }
    .tally .t-head { grid-column: 1; }
    .tally .acts { grid-column: 1 / -1; }
}

/* < 992: tablet / small laptop */
@media (max-width: 991.98px) {
    :root { --hn-header-h: 58px; }
    .app-content { padding: 12px 12px 34px; }
    .page-head { padding: 11px 13px; }
    .page-head .page-actions { width: 100%; }
    .page-head .hdr-btn, .page-head .btn { flex: 1 1 auto; }
    .filters { padding: 11px 12px; }
    .filters .fld { flex: 1 1 148px; }
    .filters .form-control, .filters .form-select { min-width: 0; width: 100%; }
    .hdr-btn .btn-label { display: none; }
    .hdr-btn { padding: 0 10px; }
}

/* < 768: phones — one column, stacked tables, thumb-friendly controls */
@media (max-width: 767.98px) {
    body { font-size: 14.5px; }
    .app-content { padding: 10px 10px 30px; }
    .card, .panel, .pos-cart, .tally { border-radius: 14px; }
    .page-head { padding: 10px 12px; gap: 10px; }
    .page-head h1, .page-head h2, .page-head h4 { font-size: 1.04rem; }
    .page-head .page-ico { width: 31px; height: 31px; flex-basis: 31px; font-size: 15px; border-radius: 9px; }
    .tally { grid-template-columns: 1fr; }
    .tally .rows { grid-column: 1; grid-row: auto; border-left: 0; border-top: 1px solid var(--hn-border); }
    .tally .t-head .amt { font-size: 1.62rem; }
    .pos-meta { grid-template-columns: 1fr 1fr; }
    .pos-meta .fld.wide, .pos-meta .fld.span2 { grid-column: 1 / -1; }
    .modal-dialog { margin: 8px; }
    .modal-body { padding: 14px; }
    .stat .stat-value { font-size: 1.24rem; }
    .table > thead th { font-size: 10px; padding: 8px 9px; }
    .table > tbody td { padding: 8px 9px; }
    .table > tbody td:first-child, .table > thead th:first-child { padding-left: 11px; }
    .table-responsive { margin-inline: -10px; width: calc(100% + 20px); padding-inline: 0; }
    .card > .table-responsive { border-radius: 0; }
    .qa-grid { grid-template-columns: 1fr 1fr; }
    .toast-stack { left: 10px; right: 10px; width: auto; bottom: 10px; }
}

@media (max-width: 479.98px) {
    .pos-meta { grid-template-columns: 1fr; }
    .qa-grid { grid-template-columns: 1fr; }
    .hdr-search { display: none; }
    .app-header.has-search .hdr-search { display: flex; position: absolute; left: 8px; right: 8px; top: 100%; padding: 8px; background: #FFF; border-bottom: 1px solid var(--hn-border); box-shadow: var(--hn-shadow); }
}

/* very small heights (landscape phones / projectors): keep the header compact */
@media (max-height: 560px) {
    :root { --hn-header-h: 52px; }
    .sidebar-scroll { padding-bottom: 40px; }
}

/* ==================================================== 21. PRINT (SCREEN) */
@media print {
    body { background: #FFF !important; font-size: 11pt; }
    .app-sidebar, .app-header, .nav-scrim, .no-print, .toast-stack, .page-head .page-actions,
    .filters, .pager, .sidebar-foot, .skip-link { display: none !important; }
    .app-main { margin-left: 0 !important; }
    .app-content { padding: 0 !important; max-width: none !important; }
    .card, .panel, .pos-cart, .tally, .table, .stat { box-shadow: none !important; border-color: #BBB !important; break-inside: avoid; }
    .page-head { border: 0 !important; padding: 0 0 8px !important; background: none !important; box-shadow: none !important; }
    .table > thead th { position: static !important; background: #EEE !important; }
    a[href]::after { content: ""; }
    .table-responsive, .table-scroll { overflow: visible !important; max-height: none !important; }
    tr, td, th { break-inside: avoid; }
    .no-print, .row-actions, .cart-tools, .pos-catalog, .cart-foot .btn { display: none !important; }
}
@page { margin: 12mm 10mm; }

/* ------------------------------------------- screenshot capture (html2canvas) */
/* Used by takeScreenshot()/captureRow(): the clone is rendered off-screen while
   these classes strip UI chrome out of the exported image. */
body.capturing .no-capture { visibility: hidden !important; }
body.capturing .shot-hidden { display: none !important; }
.shot-target { background: #FFF; border-radius: var(--hn-radius-lg); }
.has-overflow::after { content: ""; position: sticky; }
.table-responsive.has-overflow { position: relative; }
.table-responsive.has-overflow > table { min-width: 100%; }

/* form-level busy cue (set by app.js while a bill is being saved) */
form.hn-submitting [type=submit] { cursor: progress; }
form.hn-submitting [type=submit]:not(.is-busy) { opacity: .6; }

/* header title / breadcrumb + brand lockup (added with the fixed header) */
.hdr-crumb { align-items: center; color: var(--hn-border-strong); font-size: 12px; }
.hdr-crumb:empty { display: none; }
.hdr-title {
    margin: 0; font-size: 14.5px; font-weight: 700; letter-spacing: -.01em;
    color: var(--hn-text); max-width: 26vw;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.hdr-title::before { content: ""; }
.brand-lockup { display: flex; align-items: center; gap: 10px; min-width: 0; flex: 1; color: inherit; }
.brand-lockup:hover { color: inherit; }
.sidebar-foot .sidebar-store i { color: var(--hn-green-400); font-size: 13px; }
.sidebar-foot .sidebar-store { color: rgba(214, 233, 222, .78); font-size: 11.5px; }
.sidebar-foot .sidebar-store span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* system footer (admin-editable website footer) */
.sys-footer { margin-top: 22px; padding: 12px 4px 0; font-size: 11.8px; border-top: 1px solid var(--hn-border); }
/* ==========================================================================
   22. POS / bill-entry screens (sales create-edit, purchase create-edit)
   Shared grid so the two order screens line up identically.
   ========================================================================== */
    /* totals panel: the readonly inputs ARE the display, so no layout shift */
    .tally-amount {
        display: block; width: 100%; border: 0; background: transparent; padding: 0;
        font: inherit; font-size: 1.95rem; font-weight: 700; letter-spacing: -.035em;
        font-variant-numeric: tabular-nums; color: #FFF; margin-top: 3px;
    }
    .tally-amount:focus { outline: none; }
    .tally-inline {
        border: 0; background: transparent; padding: 0; margin: 0; width: 110px; text-align: right;
        font: inherit; font-weight: 700; font-variant-numeric: tabular-nums; color: var(--hn-text);
    }
    .tally-inline:focus { outline: none; }
    .tally .edit + .edit { border-top: 0; }
    .ta-r { text-align: right; }
    .cart-cols {
        display: grid; gap: 8px; padding: 8px 14px; background: var(--hn-surface-3);
        border-bottom: 1px solid var(--hn-border);
        font-size: 10.4px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--hn-muted);
        grid-template-columns: minmax(150px, 2.4fr) 92px 116px 84px 96px 96px minmax(96px, 1fr) 56px;
    }
    .sale-row .line-grid {
        display: grid; gap: 8px; padding: 9px 14px; align-items: center;
        grid-template-columns: minmax(150px, 2.4fr) 92px 116px 84px 96px 96px minmax(96px, 1fr) 56px;
    }
    .sale-row + .sale-row { border-top: 1px solid var(--hn-border); }
    .sale-row:hover { background: #FAFCFA; }
    .sale-row .cell-num { min-width: 0; }
    .sale-row .cell-num .form-control { text-align: right; }
    .sale-row .amount-view {
        text-align: right; font-weight: 700; font-variant-numeric: tabular-nums; font-size: 13.6px;
        color: var(--hn-text); background: var(--hn-surface-3); border: 1px solid var(--hn-border);
        border-radius: 8px; padding: 4px 7px; min-width: 0;
    }
    .sale-row .prod-line { display: flex; align-items: flex-start; gap: 8px; min-width: 0; }
    .sale-row .prod-line .grow { min-width: 0; flex: 1; }
    .sale-row .prod-title { font-weight: 650; font-size: 13.4px; color: var(--hn-text); overflow-wrap: anywhere; }
    .sale-row .prod-sub { font-size: 11.3px; color: var(--hn-muted); display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-top: 1px; }
    .sale-row .line-extra {
        display: none; gap: 8px; flex-wrap: wrap; padding: 9px 14px 11px;
        margin: 0 14px 9px; border: 1px dashed var(--hn-border-strong); border-radius: 10px; background: #FCFDFC;
    }
    body.pos-wide .sale-row .line-extra, .sale-row.is-open .line-extra { display: flex; }
    .sale-row .line-extra .fx { flex: 1 1 132px; min-width: 0; }
    .sale-row .line-extra .fx.wide { flex-basis: 100%; }
    .sale-row .line-extra label { display: block; font-size: 10.2px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--hn-muted); margin-bottom: 3px; }
    .sale-row .line-extra .form-control, .sale-row .line-extra .form-select { height: 31px; font-size: 12.8px; padding: 3px 7px; }
    .sale-row .row-toggle { border: 0; background: transparent; color: var(--hn-green-600); font-size: 11.4px; font-weight: 700; cursor: pointer; padding: 2px 4px; border-radius: 6px; white-space: nowrap; }
    .sale-row .row-toggle:hover { background: var(--hn-green-50); }
    .sale-row .cell-del { display: flex; justify-content: flex-end; gap: 3px; align-items: center; }
    .sale-row .del-row { width: 28px; height: 28px; padding: 0; border-radius: 8px; border: 1px solid transparent;
        background: transparent; color: var(--hn-muted-2); cursor: pointer; display: inline-grid; place-items: center;
        font-size: 13px; transition: all var(--hn-fast); }
    .sale-row .del-row:hover { background: var(--hn-danger-soft); color: var(--hn-danger); border-color: #F0C8CC; }
    .sale-row.is-open .row-toggle i { transform: rotate(180deg); }
    .sale-row .row-toggle i { transition: transform var(--hn-fast); display: inline-block; }
    .sale-row .prod-cell .form-control { margin-bottom: 2px; }
    /* Column templates are sized so the fixed sum + gaps always fits the
       container: at every breakpoint the row grid has zero overflow. */
    @media (max-width: 1399.98px) {
        .cart-cols, .sale-row .line-grid { grid-template-columns: minmax(120px, 2fr) 74px 98px 70px 80px 80px minmax(78px, 1fr) 44px; gap: 7px; }
        .cart-cols { font-size: 9.6px; }
    }
    @media (max-width: 1199.98px) {
        .cart-cols, .sale-row .line-grid { grid-template-columns: minmax(104px, 1.7fr) 64px 86px 62px 72px 72px minmax(68px, 1fr) 40px; gap: 6px; }
        .sale-row .line-grid { padding-inline: 10px; }
        .cart-cols { padding-inline: 10px; }
        .sale-row .line-grid .pill { font-size: 10.4px; }
    }
    @media (max-width: 999.98px) {
        .cart-cols { display: none; }
        .sale-row .line-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
        .sale-row .line-grid .prod-cell { grid-column: 1 / -1; }
        .sale-row .line-grid .del-cell { grid-column: 1 / -1; justify-content: flex-start; }
        .sale-row .cell-num .form-control, .sale-row .cell-num .form-select { height: 34px; }
        .sale-row .amount-view { padding: 6px 8px; }
    }
    @media (max-width: 767.98px) {
        .sale-row .line-grid .del-cell { justify-content: space-between; }
    }
    .pos-chip {
        flex: 0 1 auto; min-height: 40px; display: flex; align-items: center; gap: 8px;
        padding: 6px 11px; border-radius: 10px; border: 1px solid rgba(255,255,255,.13);
        background: rgba(255,255,255,.05); color: #E7F2EB; font-size: 12.6px; font-weight: 600; cursor: pointer;
        transition: background var(--hn-fast), border-color var(--hn-fast), transform var(--hn-fast);
        text-align: left;
    }
    .pos-chip:hover { background: rgba(255,255,255,.13); border-color: var(--hn-gold-400); color: #fff; transform: translateY(-1px); }
    .pos-chip .kg { display: block; font-size: 10.6px; font-weight: 600; color: var(--hn-gold-400); font-variant-numeric: tabular-nums; }
    .pos-chips { flex-wrap: wrap; max-height: 152px; padding-right: 4px; }
    .pos-chip .nm { display: block; max-width: 190px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    .pos-chip.low .kg { color: #F0A5A9; }
    .pay-strip { display: flex; gap: 7px; overflow-x: auto; padding-bottom: 3px; scrollbar-width: thin; }
    .pay-opt { position: relative; flex: 0 0 auto; min-width: 0; padding: 7px 11px; font-size: 12.2px; gap: 6px; }
    .pay-opt span { white-space: nowrap; }
    .pay-strip-sync { position: absolute !important; width: 1px; height: 1px; opacity: 0; visibility: hidden; pointer-events: none; border: 0; padding: 0; margin: -1px; overflow: hidden; }
    .pay-opt .bi { font-size: 13px; }
    .form-label { margin-bottom: 4px; }

/* purchase inward rows: labelled wrapping fields (never overflows) */
.buy-row { padding: 10px 14px; }
.buy-row + .buy-row { border-top: 1px solid var(--hn-border); }
.buy-row:hover { background: #FAFCFA; }
.buy-grid { display: flex; flex-wrap: wrap; gap: 9px 10px; align-items: flex-end; }
.buy-grid .fx { min-width: 0; }
.buy-grid label { display: block; font-size: 10.2px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--hn-muted); margin-bottom: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.buy-grid .form-control, .buy-grid .form-select { height: 33px; font-size: 13px; padding: 4px 8px; }
.buy-grid .req { color: var(--hn-danger); }
.picker-row { display: flex; gap: 8px; flex-wrap: wrap; }
.picker-row .pk { flex: 1 1 150px; min-width: 0; }
.picker-row .pk-unit { flex: 0 1 128px; }
.qa-mini { flex: 0 0 auto; width: 30px; padding: 0; display: inline-grid; place-items: center; border: 1px solid var(--hn-border-strong); background: var(--hn-surface-2); color: var(--hn-green-700); border-radius: 0 8px 8px 0; font-size: 12px; }
.qa-mini:hover { background: var(--hn-green-50); border-color: var(--hn-green-500); }
.calc-cells { display: flex; gap: 7px; flex: 1 1 260px; }
.calc-cells .cc { flex: 1; min-width: 74px; border: 1px solid var(--hn-border); background: var(--hn-surface-3); border-radius: 9px; padding: 4px 8px 5px; }
.calc-cells .cc span { display: block; font-size: 9.6px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--hn-muted); }
.calc-cells .cc b { font-size: 13.4px; font-weight: 700; font-variant-numeric: tabular-nums; }
.calc-cells .cc i { font-style: normal; font-size: 10px; color: var(--hn-muted); margin-left: 2px; }
.calc-cells .cc.amount { background: #F2F7F3; border-color: #CFE0D3; }
.calc-cells .cc.amount b { color: var(--hn-green-800); }
.row-act { flex: 0 0 auto; display: flex; align-items: center; }
.row-act .del-row { width: 31px; height: 31px; padding: 0; border-radius: 8px; border: 1px solid var(--hn-border); background: var(--hn-surface); color: var(--hn-muted-2); cursor: pointer; display: inline-grid; place-items: center; font-size: 13px; transition: all var(--hn-fast); }
.row-act .del-row:hover { background: var(--hn-danger-soft); color: var(--hn-danger); border-color: #F0C8CC; }
@media (max-width: 767.98px) {
    .buy-grid .fx { flex: 1 1 100% !important; }
    .calc-cells .cc { flex: 1 1 0; }
}
.sale-row .amount-view {
    height: 31px; display: flex; align-items: center; justify-content: flex-end; gap: 4px;
    padding: 0 7px; font-size: 13.2px; font-weight: 700; font-variant-numeric: tabular-nums;
    color: var(--hn-text); background: var(--hn-surface-3); border: 1px solid var(--hn-border);
    border-radius: 8px; min-width: 0; overflow: hidden; white-space: nowrap;
}
@media (max-width: 1199.98px) { .sale-row .amount-view { height: 30px; font-size: 12.4px; } }

/* ─────────────────────────────────────────────────────────────────────────────
   23. Form controls that Bootstrap leaves to the browser: file pickers and
   fieldset legends. Nothing here changes markup, names or submit behaviour.
   ──────────────────────────────────────────────────────────────────────────── */
input[type="file"] {
    width: 100%;
    font: inherit;
    font-size: 13px;
    color: var(--hn-text-2);
    background: var(--hn-surface);
    border: 1px dashed #C9D6CE;
    border-radius: 10px;
    padding: 7px 9px;
    transition: border-color var(--hn-fast), background var(--hn-fast), box-shadow var(--hn-fast);
}
input[type="file"]:hover { border-color: var(--hn-green-500); background: #FBFDFC; }
input[type="file"]:focus-visible { outline: none; border-style: solid; border-color: var(--hn-green-600); box-shadow: var(--hn-focus); }
input[type="file"]::file-selector-button {
    font: inherit;
    font-size: 12.4px;
    font-weight: 650;
    color: var(--hn-green-800);
    background: var(--hn-green-50);
    border: 1px solid #D5E5D9;
    border-radius: 8px;
    padding: 5px 11px;
    margin-inline-end: 10px;
    cursor: pointer;
    transition: background var(--hn-fast), color var(--hn-fast), border-color var(--hn-fast);
}
input[type="file"]::file-selector-button:hover { background: var(--hn-green-700); color: #fff; border-color: var(--hn-green-700); }
input[type="file"].form-control,
.form-control input[type="file"] { padding-top: 6px; }

/* Help text under a field, used by the settings screens */
.form-text { font-size: 11.8px; color: var(--hn-muted-2); margin-top: 4px; }

/* Long, unbreakable values (URLs, image paths, emails) must never push a card wider
   than its column. `break-word` (not `anywhere`) is deliberate: it only breaks a token
   that cannot fit a line on its own, so figures such as 225,152.50 stay intact. */
.app-content td, .app-content th, .app-content .card-body, .app-content .panel-body { overflow-wrap: break-word; }
.app-content table { max-width: 100%; }

/* Money columns: figures never wrap and always line up on the decimal. Overflow,
   when a table is wider than its column, is handled by the .table-responsive scroll. */
.table td.text-end, .table td.num, .table td.money, .table th.text-end { white-space: nowrap; }

/* Dense variant for the wide read-only ledger tables (bill detail, khata lines).
   Tighter metrics are what lets all 16 columns fit a laptop screen without the
   Amount column being pushed out of sight. */
.table-dense { font-size: 12.7px; }
.table-dense > thead th { padding: 8px 7px; font-size: 10.4px; letter-spacing: .05em; }
.table-dense > tbody td { padding: 6px 7px; }
.table-dense > tfoot td { padding: 7px; font-size: 12.9px; }
.table-dense .pill { padding: 2px 7px; font-size: 10.6px; }
.table td.text-end { font-weight: 560; }
.table tfoot td { border-top: 1px solid var(--hn-border); }
