/* NubixPOS design system. Colours follow the NubixLabs brand (see NubixposMobile app_colors.dart). */
:root {
    --brand: #161FDC;
    --brand-dark: #0F17B3;
    --brand-light: #3D47FF;
    --brand-50: #F1F2FF;
    --brand-100: #E4E6FF;
    --brand-200: #C9CCFF;
    --accent: #50C878;
    --accent-dark: #1F8A4C;
    --accent-50: #E9F9EF;
    --ink: #10133A;
    --ink-2: #2D3748;
    --muted: #64708A;
    --muted-2: #A0AEC0;
    --line: #E6E8F2;
    --line-2: #F1F3F9;
    --surface: #FFFFFF;
    --canvas: #F6F7FC;
    --navy: #0A0D3F;
    --navy-2: #12165A;
    --danger: #DC2F3C;
    --danger-50: #FDECEE;
    --warning: #B7680A;
    --warning-50: #FFF4E3;
    --info: #1F6FC2;
    --info-50: #E8F2FC;
    --radius: 14px;
    --radius-sm: 10px;
    --shadow-sm: 0 1px 2px rgba(16, 19, 58, .05);
    --shadow: 0 1px 3px rgba(16, 19, 58, .06), 0 8px 24px -12px rgba(16, 19, 58, .12);
    --shadow-lg: 0 24px 60px -16px rgba(16, 19, 58, .3);
    --sidebar-w: 256px;
    --ease: cubic-bezier(.2, .7, .2, 1);

    --bs-primary: #161FDC;
    --bs-primary-rgb: 22, 31, 220;
    --bs-body-font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
    --bs-body-color: #2D3748;
    --bs-link-color: #161FDC;
    --bs-link-hover-color: #0F17B3;
    --bs-link-color-rgb: 22, 31, 220;
    --bs-border-color: #E6E8F2;
}

/* Smooth cross-fade between pages where the browser supports it */
@view-transition { navigation: auto; }
::view-transition-old(root), ::view-transition-new(root) { animation-duration: .16s; }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { font-family: var(--bs-body-font-family); background: var(--canvas); color: var(--ink-2); font-size: .925rem; -webkit-font-smoothing: antialiased; }
h1, h2, h3, h4, h5 { color: var(--ink); font-weight: 700; letter-spacing: -.01em; }
a { text-decoration: none; }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
::selection { background: var(--brand-100); }
[x-cloak], [hidden] { display: none !important; }

/* Top progress bar */
#nx-progress { position: fixed; inset: 0 0 auto 0; height: 3px; z-index: 2000; pointer-events: none; opacity: 0; transition: opacity .2s; }
#nx-progress.is-active { opacity: 1; }
#nx-progress > span { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--brand), var(--accent)); box-shadow: 0 0 10px rgba(22, 31, 220, .5); transition: width .3s var(--ease); }

/* App shell */
.nx-sidebar { position: fixed; inset: 0 auto 0 0; width: var(--sidebar-w); background: linear-gradient(180deg, var(--navy) 0%, var(--navy-2) 100%); color: #fff; display: flex; flex-direction: column; z-index: 1040; transition: transform .25s var(--ease); }
.nx-brand { display: flex; align-items: center; gap: .65rem; padding: 1.15rem 1.25rem; color: #fff; }
.nx-brand:hover { color: #fff; }
.nx-brand-mark { width: 34px; height: 34px; border-radius: 10px; background: linear-gradient(135deg, var(--brand-light), var(--brand)); display: grid; place-items: center; font-weight: 800; font-size: 1rem; box-shadow: 0 6px 14px -4px rgba(61, 71, 255, .7); flex: none; overflow: hidden; }
.nx-brand-mark img { width: 100%; height: 100%; object-fit: cover; }
.nx-brand-name { font-weight: 800; font-size: 1.1rem; letter-spacing: -.02em; line-height: 1.1; }
.nx-brand-name span { color: var(--accent); }
.nx-brand-sub { display: block; font-size: .7rem; font-weight: 500; color: rgba(255, 255, 255, .55); letter-spacing: 0; max-width: 170px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nx-nav { flex: 1; overflow-y: auto; padding: .25rem .75rem 1rem; scrollbar-width: thin; scrollbar-color: rgba(255, 255, 255, .2) transparent; }
.nx-nav-label { font-size: .67rem; font-weight: 700; letter-spacing: .09em; text-transform: uppercase; color: rgba(255, 255, 255, .4); padding: 1rem .75rem .4rem; }
.nx-nav a { display: flex; align-items: center; gap: .7rem; padding: .58rem .75rem; margin-bottom: 2px; border-radius: var(--radius-sm); color: rgba(255, 255, 255, .72); font-weight: 500; transition: background .15s, color .15s; }
.nx-nav a i { font-size: 1.05rem; width: 1.15rem; text-align: center; }
.nx-nav a:hover { background: rgba(255, 255, 255, .07); color: #fff; }
.nx-nav a.active { background: var(--brand); color: #fff; box-shadow: 0 8px 18px -8px rgba(61, 71, 255, .9); }
.nx-nav .nx-nav-pill { margin-left: auto; background: var(--accent); color: var(--navy); font-size: .68rem; font-weight: 700; padding: .05rem .45rem; border-radius: 99px; }
.nx-sidebar-foot { padding: .75rem 1.25rem; border-top: 1px solid rgba(255, 255, 255, .08); font-size: .72rem; color: rgba(255, 255, 255, .45); }
.nx-backdrop { display: none; position: fixed; inset: 0; background: rgba(10, 13, 63, .5); z-index: 1035; }
.nx-main { margin-left: var(--sidebar-w); min-height: 100vh; display: flex; flex-direction: column; }
.nx-topbar { position: sticky; top: 0; z-index: 1020; display: flex; align-items: center; gap: .75rem; padding: .7rem 1.5rem; background: rgba(246, 247, 252, .85); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.nx-topbar h1 { font-size: 1.15rem; margin: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nx-icon-btn.nx-menu-btn { display: none; }
.nx-content { padding: 1.5rem; flex: 1; animation: nx-rise .28s var(--ease); }
@keyframes nx-rise { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.nx-icon-btn { width: 38px; height: 38px; display: inline-grid; place-items: center; border-radius: var(--radius-sm); border: 1px solid var(--line); background: var(--surface); color: var(--ink-2); position: relative; transition: border-color .15s, color .15s, background .15s; }
.nx-icon-btn:hover { border-color: var(--brand-200); color: var(--brand); }
.nx-icon-btn .nx-dot { position: absolute; top: -5px; right: -5px; min-width: 18px; height: 18px; padding: 0 4px; border-radius: 99px; background: var(--danger); color: #fff; font-size: .65rem; font-weight: 700; display: grid; place-items: center; border: 2px solid var(--canvas); }
.nx-avatar { width: 38px; height: 38px; border-radius: 50%; background: var(--brand); color: #fff; display: grid; place-items: center; font-weight: 700; border: 0; flex: none; }
.nx-avatar.sm { width: 30px; height: 30px; font-size: .8rem; }
.dropdown-menu { border: 1px solid var(--line); border-radius: var(--radius-sm); box-shadow: var(--shadow); padding: .35rem; font-size: .9rem; }
.dropdown-item { border-radius: 7px; padding: .45rem .7rem; }
.dropdown-item:active, .dropdown-item.active { background: var(--brand); }

/* Page parts */
.nx-page-head { display: flex; align-items: center; justify-content: space-between; gap: .75rem; flex-wrap: wrap; margin-bottom: 1.25rem; }
.nx-page-head p { margin: 0; color: var(--muted); }
.nx-actions { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; }
.nx-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm); }
.nx-card-head { display: flex; align-items: center; justify-content: space-between; gap: .75rem; padding: .95rem 1.15rem; border-bottom: 1px solid var(--line-2); }
.nx-card-head h2, .nx-card-head h3 { font-size: .98rem; margin: 0; }
.nx-card-body { padding: 1.15rem; }
.nx-grid { display: grid; gap: 1rem; }
.nx-stats { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); margin-bottom: 1.25rem; }
.nx-split { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); align-items: start; }
.nx-stat { padding: 1.05rem 1.15rem; }
.nx-stat-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: .55rem; }
.nx-stat-label { font-size: .8rem; font-weight: 500; color: var(--muted); }
.nx-stat-icon { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: var(--brand-50); color: var(--brand); font-size: 1rem; }
.nx-stat-icon.green { background: var(--accent-50); color: var(--accent-dark); }
.nx-stat-icon.amber { background: var(--warning-50); color: var(--warning); }
.nx-stat-icon.red { background: var(--danger-50); color: var(--danger); }
.nx-stat-value { font-size: 1.55rem; font-weight: 800; color: var(--ink); letter-spacing: -.02em; line-height: 1.15; font-variant-numeric: tabular-nums; }
.nx-stat-meta { margin-top: .3rem; font-size: .78rem; color: var(--muted); }
.nx-up { color: var(--accent-dark); font-weight: 600; }
.nx-down { color: var(--danger); font-weight: 600; }

/* Buttons */
.nx-btn { display: inline-flex; align-items: center; justify-content: center; gap: .45rem; padding: .55rem .95rem; border-radius: var(--radius-sm); border: 1px solid transparent; font-weight: 600; font-size: .875rem; line-height: 1.25; cursor: pointer; white-space: nowrap; transition: background .15s, color .15s, border-color .15s, box-shadow .15s, transform .08s; }
.nx-btn:active { transform: translateY(1px); }
.nx-btn:disabled, .nx-btn.is-loading { opacity: .65; pointer-events: none; }
.nx-btn-primary { background: var(--brand); color: #fff; box-shadow: 0 6px 14px -8px rgba(22, 31, 220, .9); }
.nx-btn-primary:hover { background: var(--brand-dark); color: #fff; }
.nx-btn-accent { background: var(--accent-dark); color: #fff; }
.nx-btn-accent:hover { background: #18703D; color: #fff; }
.nx-btn-ghost { background: var(--surface); color: var(--ink-2); border-color: var(--line); }
.nx-btn-ghost:hover { border-color: var(--brand-200); color: var(--brand); background: var(--brand-50); }
.nx-btn-danger { background: var(--danger); color: #fff; }
.nx-btn-danger:hover { background: #B8232F; color: #fff; }
.nx-btn-sm { padding: .36rem .65rem; font-size: .8rem; border-radius: 8px; }
.nx-btn-lg { padding: .8rem 1.25rem; font-size: 1rem; }
.nx-btn-block { width: 100%; }
.nx-btn-icon { width: 32px; height: 32px; padding: 0; border-radius: 8px; }
.nx-btn-icon.danger:hover { color: var(--danger); border-color: var(--danger); background: var(--danger-50); }
.nx-spinner { width: 1em; height: 1em; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; display: inline-block; animation: nx-spin .6s linear infinite; }
@keyframes nx-spin { to { transform: rotate(360deg); } }

/* Forms */
.form-control, .form-select { border-color: var(--line); border-radius: var(--radius-sm); padding: .55rem .8rem; font-size: .9rem; color: var(--ink-2); transition: border-color .15s, box-shadow .15s; }
.form-select { padding-right: 2.25rem; }
.form-control:focus, .form-select:focus { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-100); }
.form-label { font-size: .82rem; font-weight: 600; color: var(--ink-2); margin-bottom: .3rem; }
.form-text { color: var(--muted); font-size: .77rem; }
.form-check-input:checked { background-color: var(--brand); border-color: var(--brand); }
.form-check-input:focus { box-shadow: 0 0 0 3px var(--brand-100); border-color: var(--brand); }
.nx-field-error { color: var(--danger); font-size: .78rem; font-weight: 500; margin-top: .3rem; animation: nx-rise .16s var(--ease); }
.nx-field.has-error .form-control, .nx-field.has-error .form-select { border-color: var(--danger); }
.nx-field.has-error .form-control:focus, .nx-field.has-error .form-select:focus { box-shadow: 0 0 0 3px var(--danger-50); }
.nx-field.has-success .form-control, .nx-field.has-success .form-select { border-color: var(--accent-dark); }
.nx-field.has-success .form-control:focus, .nx-field.has-success .form-select:focus { box-shadow: 0 0 0 3px var(--accent-50); }
.nx-pw-wrap { position: relative; }
input[data-password] { padding-right: 2.6rem; }
input::-ms-reveal, input::-ms-clear { display: none; }
.nx-filters { display: flex; gap: .55rem; flex-wrap: wrap; align-items: center; margin-bottom: 1rem; }
.nx-filters .nx-search { flex: 1 1 240px; position: relative; }
.nx-filters .nx-search i { position: absolute; left: .8rem; top: 50%; transform: translateY(-50%); color: var(--muted-2); pointer-events: none; }
.nx-filters .nx-search input { padding-left: 2.2rem; }
.nx-filters .form-select, .nx-filters input[type=date] { width: auto; }

/* Tables */
.nx-table-wrap { overflow-x: auto; }
.nx-table { width: 100%; border-collapse: collapse; }
.nx-table th { font-size: .73rem; font-weight: 600; letter-spacing: .03em; text-transform: uppercase; color: var(--muted); padding: .7rem 1.15rem; border-bottom: 1px solid var(--line); white-space: nowrap; background: #FBFBFE; text-align: left; }
.nx-table td { padding: .75rem 1.15rem; border-bottom: 1px solid var(--line-2); vertical-align: middle; }
.nx-table tbody tr { transition: background .12s; }
.nx-table tbody tr:hover { background: #FAFAFF; }
.nx-table tbody tr:last-child td { border-bottom: 0; }
.nx-num { font-variant-numeric: tabular-nums; font-weight: 600; color: var(--ink); white-space: nowrap; }
.nx-table .nx-right { text-align: right; }
.nx-thumb { width: 40px; height: 40px; border-radius: 9px; object-fit: cover; background: var(--line-2); display: grid; place-items: center; color: var(--muted-2); flex: none; }
.nx-cell { display: flex; align-items: center; gap: .7rem; min-width: 0; }
.nx-strong { font-weight: 600; color: var(--ink); }
.nx-sub { font-size: .77rem; color: var(--muted); }

/* Badges */
.nx-badge { display: inline-flex; align-items: center; gap: .3rem; padding: .18rem .55rem; border-radius: 99px; font-size: .73rem; font-weight: 600; white-space: nowrap; background: var(--line-2); color: var(--ink-2); }
.nx-badge.green { background: var(--accent-50); color: var(--accent-dark); }
.nx-badge.amber { background: var(--warning-50); color: var(--warning); }
.nx-badge.red { background: var(--danger-50); color: var(--danger); }
.nx-badge.blue { background: var(--brand-50); color: var(--brand); }
.nx-badge.info { background: var(--info-50); color: var(--info); }

/* Empty, alerts */
.nx-empty { text-align: center; padding: 2.75rem 1rem; color: var(--muted); }
.nx-empty i { display: inline-grid; place-items: center; width: 56px; height: 56px; border-radius: 16px; background: var(--brand-50); color: var(--brand); font-size: 1.45rem; margin-bottom: .75rem; }
.nx-empty h3 { font-size: 1rem; margin-bottom: .25rem; }
.nx-empty p { margin-bottom: .9rem; }
.nx-alert { display: flex; gap: .6rem; align-items: flex-start; padding: .75rem 1rem; border-radius: var(--radius-sm); margin-bottom: 1rem; font-size: .875rem; background: var(--brand-50); color: var(--brand-dark); }
.nx-alert.amber { background: var(--warning-50); color: #8A4E08; }
.nx-alert.red { background: var(--danger-50); color: #A51F2B; }
.nx-alert.green { background: var(--accent-50); color: #17693A; }
.nx-alert ul { margin: .25rem 0 0; padding-left: 1.1rem; }
.pagination { --bs-pagination-color: var(--ink-2); --bs-pagination-active-bg: var(--brand); --bs-pagination-active-border-color: var(--brand); --bs-pagination-hover-color: var(--brand); --bs-pagination-focus-box-shadow: 0 0 0 3px var(--brand-100); --bs-pagination-border-color: var(--line); margin: 0; font-size: .85rem; }
.nx-pager { padding: .85rem 1.15rem; border-top: 1px solid var(--line-2); }
.nx-pager nav > div:first-child { display: none !important; }
.nx-pager nav > div:last-child { display: flex !important; flex-wrap: wrap; gap: .5rem; align-items: center; justify-content: space-between; width: 100%; }
.nx-pager p { margin: 0; color: var(--muted); font-size: .8rem; }

/* Skeleton loaders */
.nx-skel { display: block; border-radius: 7px; background: linear-gradient(90deg, #ECEEF6 25%, #F6F7FC 45%, #ECEEF6 65%); background-size: 300% 100%; animation: nx-shimmer 1.3s ease-in-out infinite; color: transparent !important; user-select: none; }
.nx-skel-line { height: .9rem; margin-bottom: .55rem; }
@keyframes nx-shimmer { from { background-position: 100% 0; } to { background-position: -100% 0; } }
.is-updating { opacity: .55; transition: opacity .15s; pointer-events: none; }

/* Modals */
.modal-content { border: 0; border-radius: 16px; box-shadow: var(--shadow-lg); }
.modal-header { border-bottom: 1px solid var(--line-2); padding: 1rem 1.25rem; }
.modal-title { font-size: 1.02rem; font-weight: 700; color: var(--ink); }
.modal-body { padding: 1.25rem; }
.modal-footer { border-top: 1px solid var(--line-2); padding: .85rem 1.25rem; gap: .5rem; }
.modal-footer > * { margin: 0; }
.modal.fade .modal-dialog { transform: translateY(14px) scale(.985); transition: transform .2s var(--ease); }
.modal.show .modal-dialog { transform: none; }
.modal-backdrop.show { opacity: .4; background: var(--navy); }

/* SweetAlert2 in the NubixLabs theme */
.swal2-popup { font-family: inherit; border-radius: 16px; color: var(--ink-2); }
.swal2-title { color: var(--ink); font-size: 1.2rem; font-weight: 700; }
.swal2-html-container { color: var(--muted); font-size: .92rem; }
.swal2-actions { gap: .5rem; }
.swal2-actions .nx-btn { margin: 0; min-width: 96px; }
.swal2-container.swal2-backdrop-show { background: rgba(10, 13, 63, .45); }
.swal2-input { border-radius: var(--radius-sm); border: 1px solid var(--line); font-size: .9rem; height: 2.6rem; box-shadow: none; }
.swal2-input:focus { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-100); }
.swal2-validation-message { background: var(--danger-50); color: #A51F2B; font-size: .85rem; }
.swal2-popup.swal2-toast { padding: .7rem .9rem; border-radius: 12px; box-shadow: var(--shadow-lg); }
.swal2-popup.swal2-toast .swal2-title { font-size: .875rem; font-weight: 600; margin: 0 .4rem; }
.swal2-timer-progress-bar { background: var(--brand-200); }
.swal2-icon.swal2-success [class^=swal2-success-line] { background-color: var(--accent-dark); }
.swal2-icon.swal2-success .swal2-success-ring { border-color: rgba(31, 138, 76, .3); }
.swal2-icon.swal2-info, .swal2-icon.swal2-question { border-color: var(--brand-200); color: var(--brand); }
.nx-sale-done-total { font-size: 1.9rem; font-weight: 800; color: var(--ink); letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.nx-sale-done-links { display: grid; gap: .5rem; margin-top: 1rem; }

/* Lists */
.nx-list-item { display: flex; align-items: center; justify-content: space-between; gap: .75rem; padding: .7rem 0; border-bottom: 1px solid var(--line-2); }
.nx-list-item:last-child { border-bottom: 0; padding-bottom: 0; }
.nx-list-item:first-child { padding-top: 0; }
.nx-bar { height: 6px; border-radius: 99px; background: var(--line-2); overflow: hidden; margin-top: .3rem; }
.nx-bar > span { display: block; height: 100%; border-radius: 99px; background: var(--brand); transition: width .4s var(--ease); }
.nx-kv { display: flex; justify-content: space-between; gap: 1rem; padding: .5rem 0; border-bottom: 1px dashed var(--line); }
.nx-kv:last-child { border-bottom: 0; }
.nx-kv span:first-child { color: var(--muted); }
.nx-kv.total { font-size: 1.1rem; font-weight: 800; color: var(--ink); border-top: 2px solid var(--ink); border-bottom: 0; margin-top: .25rem; padding-top: .65rem; }
.nx-kv.total span:first-child { color: var(--ink); }

/* Checklist */
.nx-check { display: flex; align-items: center; gap: .6rem; padding: .55rem .7rem; border-radius: var(--radius-sm); color: var(--ink-2); font-weight: 500; }
.nx-check:hover { background: var(--brand-50); color: var(--brand); }
.nx-check i { font-size: 1.1rem; color: var(--muted-2); }
.nx-check.done { color: var(--muted); text-decoration: line-through; }
.nx-check.done i { color: var(--accent-dark); }

/* POS register */
.pos { display: grid; grid-template-columns: minmax(0, 1fr) 390px; height: calc(100vh - 59px); }
.pos-catalog { padding: 1rem 1.25rem 1.25rem; overflow-y: auto; }
.pos-toolbar { display: flex; gap: .55rem; margin-bottom: .75rem; position: sticky; top: 0; z-index: 3; background: var(--canvas); padding-bottom: .55rem; flex-wrap: wrap; }
.pos-search { position: relative; flex: 1 1 240px; }
.pos-search i { position: absolute; left: .85rem; top: 50%; transform: translateY(-50%); color: var(--brand); font-size: 1.05rem; }
.pos-search input { padding: .68rem .9rem .68rem 2.45rem; font-size: .95rem; border-radius: 12px; }
.pos-cats { display: flex; gap: .4rem; overflow-x: auto; padding-bottom: .65rem; scrollbar-width: none; }
.pos-cats::-webkit-scrollbar { display: none; }
.pos-cat { flex: none; padding: .38rem .85rem; border-radius: 99px; border: 1px solid var(--line); background: var(--surface); font-weight: 500; font-size: .82rem; color: var(--ink-2); transition: all .15s; cursor: pointer; }
.pos-cat:hover { border-color: var(--brand-200); color: var(--brand); }
.pos-cat.active { background: var(--brand); border-color: var(--brand); color: #fff; }
.pos-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(145px, 1fr)); gap: .7rem; }
.pos-item { text-align: left; background: var(--surface); border: 1px solid var(--line); border-radius: 13px; padding: 0; overflow: hidden; cursor: pointer; display: flex; flex-direction: column; position: relative; transition: transform .12s var(--ease), box-shadow .12s, border-color .12s; }
.pos-item:hover { transform: translateY(-2px); box-shadow: var(--shadow); border-color: var(--brand-200); }
.pos-item:active { transform: scale(.98); }
.pos-item:disabled { opacity: .5; cursor: not-allowed; transform: none; box-shadow: none; }
.pos-item-img { aspect-ratio: 16 / 11; background: var(--brand-50); display: grid; place-items: center; color: var(--brand); font-size: 1.5rem; font-weight: 700; overflow: hidden; }
.pos-item-img img { width: 100%; height: 100%; object-fit: cover; }
.pos-item-body { padding: .55rem .7rem .65rem; }
.pos-item-name { font-size: .83rem; font-weight: 600; color: var(--ink); line-height: 1.25; height: 2.08rem; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.pos-item-price { color: var(--brand); font-weight: 800; font-size: .95rem; margin-top: .2rem; font-variant-numeric: tabular-nums; }
.pos-item-stock { font-size: .7rem; color: var(--muted); }
.pos-item-stock.low { color: var(--warning); font-weight: 600; }
.pos-item-count { position: absolute; top: .4rem; right: .4rem; min-width: 24px; height: 24px; padding: 0 .4rem; background: var(--brand); color: #fff; border-radius: 99px; font-size: .75rem; font-weight: 700; display: grid; place-items: center; box-shadow: 0 0 0 2px #fff; animation: nx-pop .18s var(--ease); }
@keyframes nx-pop { from { transform: scale(.5); } to { transform: scale(1); } }
.pos-cart { background: var(--surface); border-left: 1px solid var(--line); display: flex; flex-direction: column; min-height: 0; }
.pos-cart-head { display: flex; align-items: center; justify-content: space-between; padding: .8rem 1rem; border-bottom: 1px solid var(--line-2); }
.pos-cart-head h2 { font-size: .98rem; margin: 0; }
.pos-cart-items { flex: 1; overflow-y: auto; padding: .35rem .75rem; min-height: 80px; }
.pos-line { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: .2rem .6rem; padding: .6rem .25rem; border-bottom: 1px solid var(--line-2); animation: nx-rise .16s var(--ease); }
.pos-line-name { font-weight: 600; color: var(--ink); font-size: .85rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pos-line-total { font-weight: 700; color: var(--ink); text-align: right; font-size: .88rem; font-variant-numeric: tabular-nums; }
.pos-line-price { color: var(--muted); font-size: .76rem; align-self: center; }
.pos-qty { display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; justify-self: end; }
.pos-qty button { width: 28px; height: 26px; border: 0; background: var(--surface); color: var(--ink-2); font-weight: 700; line-height: 1; cursor: pointer; }
.pos-qty button:hover { background: var(--brand-50); color: var(--brand); }
.pos-qty span { min-width: 30px; text-align: center; font-weight: 600; font-size: .82rem; font-variant-numeric: tabular-nums; }
.pos-cart-foot { padding: .8rem 1rem 1rem; border-top: 1px solid var(--line); background: #FBFBFE; }
.pos-pay { display: grid; grid-template-columns: repeat(4, 1fr); gap: .4rem; }
.pos-pay button { padding: .55rem .2rem; border: 1.5px solid var(--line); background: var(--surface); border-radius: 10px; font-size: .75rem; font-weight: 600; color: var(--ink-2); cursor: pointer; transition: all .12s; }
.pos-pay button i { display: block; font-size: 1.15rem; margin-bottom: .1rem; }
.pos-pay button:hover { border-color: var(--brand-200); }
.pos-pay button.active { border-color: var(--brand); background: var(--brand-50); color: var(--brand); }
.pos-quick { display: flex; gap: .35rem; flex-wrap: wrap; margin-top: .4rem; }
.pos-quick button { flex: 1 1 auto; padding: .28rem .4rem; font-size: .75rem; font-weight: 600; border: 1px solid var(--line); border-radius: 7px; background: var(--surface); cursor: pointer; }
.pos-quick button:hover { border-color: var(--brand); color: var(--brand); }
.pos-cart-toggle { display: none; }

/* Auth */
.nx-auth { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); background: var(--surface); }
.nx-auth-side { background: radial-gradient(900px 500px at 15% 0%, var(--brand-light) 0%, transparent 60%), radial-gradient(700px 400px at 100% 100%, rgba(80, 200, 120, .35) 0%, transparent 60%), var(--navy); color: #fff; padding: 3rem; display: flex; flex-direction: column; justify-content: space-between; }
.nx-auth-side h2 { color: #fff; font-size: 2.1rem; font-weight: 800; line-height: 1.15; letter-spacing: -.02em; margin-bottom: 1rem; }
.nx-auth-side p { color: rgba(255, 255, 255, .78); max-width: 26rem; }
.nx-auth-points { list-style: none; padding: 0; margin: 1.5rem 0 0; }
.nx-auth-points li { display: flex; gap: .6rem; padding: .35rem 0; color: rgba(255, 255, 255, .88); }
.nx-auth-points i { color: var(--accent); }
.nx-auth-form { display: flex; align-items: center; justify-content: center; padding: 2rem 1.5rem; }
.nx-auth-card { width: 100%; max-width: 410px; animation: nx-rise .3s var(--ease); }
.nx-auth-card h1 { font-size: 1.6rem; font-weight: 800; margin-bottom: .3rem; }
.nx-auth-card > p { color: var(--muted); margin-bottom: 1.5rem; }
.nx-input-icon { position: relative; }
.nx-input-icon > i { position: absolute; left: .85rem; top: 50%; transform: translateY(-50%); color: var(--muted-2); pointer-events: none; }
.nx-input-icon input { padding-left: 2.4rem; }
.nx-pw-toggle { position: absolute; right: .35rem; top: 50%; transform: translateY(-50%); border: 0; background: none; color: var(--muted); padding: .3rem .5rem; cursor: pointer; border-radius: 6px; line-height: 1; }
.nx-pw-toggle:hover { color: var(--brand); }
.nx-auth-foot { text-align: center; margin-top: 1.25rem; color: var(--muted); }

/* Marketing and content pages share the brand through these */
.nx-public-brand { font-weight: 800; font-size: 1.3rem; color: var(--ink); letter-spacing: -.02em; }
.nx-public-brand span { color: var(--brand); }

/* Responsive */
@media (max-width: 1199px) {
    .pos { grid-template-columns: minmax(0, 1fr) 340px; }
    .nx-split { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 991px) {
    .nx-sidebar { transform: translateX(-100%); }
    .nx-sidebar.is-open { transform: none; box-shadow: var(--shadow-lg); }
    .nx-sidebar.is-open ~ .nx-backdrop { display: block; }
    .nx-main { margin-left: 0; }
    .nx-icon-btn.nx-menu-btn { display: inline-grid; }
    .nx-auth { grid-template-columns: minmax(0, 1fr); }
    .nx-auth-side { display: none; }
}
@media (max-width: 767px) {
    .nx-content { padding: 1rem; }
    .nx-topbar { padding: .6rem 1rem; }
    .nx-hide-sm { display: none !important; }
    .pos { grid-template-columns: minmax(0, 1fr); height: auto; min-height: calc(100vh - 59px); padding-bottom: 72px; }
    .pos-catalog { overflow: visible; padding: .75rem; }
    .pos-toolbar { top: 59px; }
    .pos-grid { grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); }
    .pos-cart { position: fixed; inset: 0; z-index: 1030; transform: translateY(100%); transition: transform .25s var(--ease); border-left: 0; }
    .pos-cart.is-open { transform: none; }
    .pos-cart-toggle { display: flex; position: fixed; left: .75rem; right: .75rem; bottom: .75rem; z-index: 1025; justify-content: space-between; padding: .85rem 1.1rem; box-shadow: var(--shadow-lg); }
    .nx-stat-value { font-size: 1.3rem; }
}
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
    @view-transition { navigation: none; }
}
@media print {
    .nx-sidebar, .nx-topbar, .nx-actions, .swal2-container, #nx-progress { display: none !important; }
    .nx-main { margin: 0; }
}
