/* =====================================================================
   BAS ERP - web portal styles
   Works on top of the DevExpress "Office365" theme (Web.config).
   Colours are defined once as variables below - change them to re-brand.
   ===================================================================== */

:root {
    --bas-primary: #2563eb;
    --bas-primary-dark: #1d4ed8;
    --bas-primary-soft: #eff4ff;
    --bas-sidebar: #0f1b2d;
    --bas-sidebar-2: #15243a;
    --bas-sidebar-text: #a9b6c9;
    --bas-sidebar-active: #ffffff;
    --bas-bg: #f3f5f9;
    --bas-card: #ffffff;
    --bas-border: #e3e7ee;
    --bas-border-strong: #cfd6e1;
    --bas-text: #1b2533;
    --bas-muted: #66748a;
    --bas-success: #10915b;
    --bas-success-soft: #e7f6ef;
    --bas-warning: #b26a00;
    --bas-warning-soft: #fff4e0;
    --bas-danger: #d0342c;
    --bas-danger-soft: #fdecea;
    --bas-info: #2563eb;
    --bas-info-soft: #eaf1ff;
    --bas-radius: 10px;
    --bas-radius-sm: 7px;
    --bas-shadow: 0 1px 2px rgba(16, 24, 40, .05), 0 1px 3px rgba(16, 24, 40, .06);
    --bas-shadow-lg: 0 12px 32px rgba(16, 24, 40, .14);
    --bas-sidebar-w: 248px;
    --bas-header-h: 60px;
    --bas-font: "Segoe UI", -apple-system, BlinkMacSystemFont, Roboto, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
    font-family: var(--bas-font);
    font-size: 14px;
    color: var(--bas-text);
    background: var(--bas-bg);
    -webkit-font-smoothing: antialiased;
}
a { color: var(--bas-primary); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { margin: 0; font-weight: 600; color: var(--bas-text); }
.ico { flex: none; vertical-align: middle; }

/* ---------------------------------------------------------------- shell */
.app { display: flex; min-height: 100vh; }

.sidebar {
    position: fixed; top: 0; left: 0; bottom: 0; width: var(--bas-sidebar-w);
    background: linear-gradient(180deg, var(--bas-sidebar) 0%, var(--bas-sidebar-2) 100%);
    color: var(--bas-sidebar-text);
    display: flex; flex-direction: column; z-index: 40;
    transition: width .2s ease, transform .2s ease;
}
.brand {
    height: var(--bas-header-h); display: flex; align-items: center; gap: 10px;
    padding: 0 18px; border-bottom: 1px solid rgba(255, 255, 255, .06); flex: none;
}
.brand-mark {
    width: 34px; height: 34px; border-radius: 9px; flex: none;
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
    color: #fff; font-weight: 700; font-size: 13px; letter-spacing: .5px;
    display: flex; align-items: center; justify-content: center;
    box-shadow: 0 4px 12px rgba(37, 99, 235, .35);
}
.brand-name { color: #fff; font-weight: 600; font-size: 16px; line-height: 1.1; white-space: nowrap; }
.brand-sub { font-size: 11px; color: var(--bas-sidebar-text); white-space: nowrap; }

.nav { flex: 1; overflow-y: auto; padding: 14px 10px 20px; }
.nav::-webkit-scrollbar { width: 6px; }
.nav::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, .12); border-radius: 3px; }
.nav-group { margin-bottom: 18px; }
.nav-group-title {
    font-size: 11px; text-transform: uppercase; letter-spacing: .08em;
    color: #6f7f96; padding: 0 12px 6px; white-space: nowrap;
}
.nav-link {
    display: flex; align-items: center; gap: 11px;
    padding: 9px 12px; margin: 1px 0; border-radius: 8px;
    color: var(--bas-sidebar-text); font-size: 13.5px; white-space: nowrap;
    transition: background .15s, color .15s;
}
.nav-link:hover { background: rgba(255, 255, 255, .06); color: #fff; text-decoration: none; }
.nav-link.active { background: rgba(59, 130, 246, .18); color: var(--bas-sidebar-active); }
.nav-link.active .nav-ico { color: #60a5fa; }
.nav-text { flex: 1; overflow: hidden; text-overflow: ellipsis; }
.nav-badge {
    background: #ef4444; color: #fff; font-size: 11px; font-weight: 600;
    min-width: 20px; height: 20px; border-radius: 10px; padding: 0 6px;
    display: inline-flex; align-items: center; justify-content: center;
}
.sidebar-foot {
    flex: none; padding: 12px 18px; font-size: 11px; color: #5d6c82;
    border-top: 1px solid rgba(255, 255, 255, .06); white-space: nowrap;
}

.main { flex: 1; margin-left: var(--bas-sidebar-w); min-width: 0; display: flex; flex-direction: column; transition: margin-left .2s ease; }

.topbar {
    position: sticky; top: 0; z-index: 30; height: var(--bas-header-h);
    background: rgba(255, 255, 255, .92); backdrop-filter: saturate(180%) blur(8px);
    border-bottom: 1px solid var(--bas-border);
    display: flex; align-items: center; gap: 14px; padding: 0 22px;
}
.icon-btn {
    width: 38px; height: 38px; border-radius: 9px; border: 1px solid transparent;
    display: inline-flex; align-items: center; justify-content: center;
    background: transparent; color: var(--bas-muted); cursor: pointer; position: relative;
}
.icon-btn:hover { background: #f1f4f9; color: var(--bas-text); text-decoration: none; }
.icon-btn .dot {
    position: absolute; top: 5px; right: 5px; min-width: 17px; height: 17px; padding: 0 4px;
    border-radius: 9px; background: #ef4444; color: #fff; font-size: 10px; font-weight: 700;
    display: flex; align-items: center; justify-content: center; border: 2px solid #fff;
}
.topbar-title { font-size: 16px; font-weight: 600; flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar-right { display: flex; align-items: center; gap: 8px; }

.dropdown { position: relative; }
.dropdown-toggle {
    display: inline-flex; align-items: center; gap: 8px; height: 38px; padding: 0 10px;
    border: 1px solid var(--bas-border); border-radius: 9px; background: #fff;
    color: var(--bas-text); cursor: pointer; font: inherit; font-size: 13px;
}
.dropdown-toggle:hover { border-color: var(--bas-border-strong); text-decoration: none; }
.dropdown-toggle.plain { border-color: transparent; background: transparent; }
.dropdown-toggle.plain:hover { background: #f1f4f9; }
.dropdown-menu {
    display: none; position: absolute; right: 0; top: calc(100% + 6px); min-width: 230px;
    background: #fff; border: 1px solid var(--bas-border); border-radius: 10px;
    box-shadow: var(--bas-shadow-lg); padding: 6px; z-index: 60;
}
.dropdown.open .dropdown-menu { display: block; }
.dropdown-head { padding: 10px 12px 8px; border-bottom: 1px solid var(--bas-border); margin-bottom: 4px; }
.dropdown-head .n { font-weight: 600; }
.dropdown-head .m { font-size: 12px; color: var(--bas-muted); }
.dropdown-item {
    display: flex; align-items: center; gap: 10px; padding: 8px 12px; border-radius: 7px;
    color: var(--bas-text); font-size: 13.5px;
}
.dropdown-item:hover { background: #f3f6fb; text-decoration: none; }
.dropdown-item.active { background: var(--bas-primary-soft); color: var(--bas-primary); font-weight: 600; }
.dropdown-item .sub { font-size: 12px; color: var(--bas-muted); margin-left: auto; }
.dropdown-sep { height: 1px; background: var(--bas-border); margin: 4px 0; }

.avatar {
    width: 30px; height: 30px; border-radius: 50%; flex: none;
    background: linear-gradient(135deg, #6366f1, #2563eb); color: #fff;
    font-size: 12px; font-weight: 600; display: inline-flex; align-items: center; justify-content: center;
}
.chip-branch { font-size: 12px; color: var(--bas-muted); }
.chip-branch b { color: var(--bas-text); font-weight: 600; }

.content { padding: 24px 26px 40px; flex: 1; }
.content-inner { max-width: 1480px; margin: 0 auto; }

/* collapsed sidebar (desktop) */
body.nav-collapsed .sidebar { width: 72px; }
body.nav-collapsed .main { margin-left: 72px; }
body.nav-collapsed .brand-text, body.nav-collapsed .nav-text, body.nav-collapsed .nav-group-title,
body.nav-collapsed .sidebar-foot, body.nav-collapsed .nav-badge { display: none; }
body.nav-collapsed .nav-link { justify-content: center; padding: 10px 0; }
body.nav-collapsed .brand { justify-content: center; padding: 0; }

.backdrop { display: none; }

/* ---------------------------------------------------------------- side menu: search, quick links, module rail + fly-out */
.nav { display: flex; flex-direction: column; padding-top: 12px; }
.nav-search { position: relative; margin: 0 2px 12px; flex: none; }
.nav-search input {
    width: 100%; height: 36px; padding: 0 52px 0 34px; border-radius: 9px; border: 1px solid rgba(255, 255, 255, .08);
    background: rgba(255, 255, 255, .06); color: #fff; font: inherit; font-size: 13px; outline: none; transition: background .15s, border-color .15s;
}
.nav-search input::placeholder { color: #7d8ca3; }
.nav-search input:focus { background: rgba(255, 255, 255, .1); border-color: rgba(96, 165, 250, .6); }
.nav-search input::-webkit-search-cancel-button { display: none; }
.nav-search .nav-search-ico { position: absolute; left: 11px; top: 10px; color: #7d8ca3; pointer-events: none; }
.nav-search kbd {
    position: absolute; right: 8px; top: 8px; height: 20px; padding: 0 6px; border-radius: 5px; border: 1px solid rgba(255, 255, 255, .12);
    color: #7d8ca3; font-size: 10.5px; font-weight: 600; line-height: 18px; font-family: inherit; pointer-events: none;
}
.nav-search input:focus + kbd { display: none; }
.nav-search-btn { display: none !important; }
.nav-body { flex: 1; }
.nav-quick { margin-bottom: 14px; }
.nav-mods { display: flex; flex-direction: column; gap: 1px; }

.nav-mod-btn {
    display: flex; align-items: center; gap: 11px; padding: 8px 10px 8px 12px; border-radius: 8px;
    color: var(--bas-sidebar-text); font-size: 13.5px; white-space: nowrap; transition: background .15s, color .15s; position: relative;
}
.nav-mod-btn:hover, .nav-mod.open > .nav-mod-btn { background: rgba(255, 255, 255, .07); color: #fff; text-decoration: none; }
.nav-mod-btn .nav-text { min-width: 0; }
.nav-mod-btn .nav-text small { display: block; font-size: 11px; color: #7ea6e0; overflow: hidden; text-overflow: ellipsis; margin-top: 1px; }
.nav-count { font-size: 11px; font-weight: 600; color: #6f7f96; min-width: 18px; text-align: right; }
.nav-chev { color: #5d6c82; transition: transform .15s, color .15s; flex: none; }
.nav-mod.open > .nav-mod-btn .nav-chev { color: #fff; transform: translateX(2px); }
.nav-mod.active > .nav-mod-btn { background: rgba(59, 130, 246, .16); color: #fff; }
.nav-mod.active > .nav-mod-btn:before { content: ""; position: absolute; left: 0; top: 8px; bottom: 8px; width: 3px; border-radius: 2px; background: #60a5fa; }
.nav-mod.active > .nav-mod-btn .nav-ico { color: #60a5fa; }

/* the fly-out (desktop: fixed panel to the right of the menu, placed by bas.js) */
.nav-fly {
    display: none; position: fixed; left: var(--bas-sidebar-w); top: 70px; z-index: 70; width: 340px;
    max-height: calc(100vh - 24px); overflow-y: auto; background: #fff; color: var(--bas-text);
    border: 1px solid var(--bas-border); border-radius: 12px; box-shadow: 0 18px 50px rgba(15, 27, 45, .22), 0 2px 6px rgba(15, 27, 45, .08);
    padding: 6px; animation: navFly .12s ease-out;
}
.nav-fly:before { content: ""; position: absolute; left: -16px; top: 0; bottom: 0; width: 16px; }
.nav-fly-body.two { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 4px; }
.nav-mod.has-two .nav-fly { width: 620px; }
.nav-mod.open > .nav-fly { display: block; }
@keyframes navFly { from { opacity: 0; transform: translateX(-6px); } to { opacity: 1; transform: none; } }
.nav-fly-head { display: flex; align-items: center; gap: 9px; padding: 10px 12px 10px; border-bottom: 1px solid #eef1f5; margin-bottom: 4px; color: #1f2937; }
.nav-fly-head svg { color: #2563eb; }
.nav-fly-head b { font-size: 14px; font-weight: 600; }
.nav-fly-head small { margin-left: auto; font-size: 11.5px; color: #98a2b3; }
.nav-fly-link { display: flex; align-items: flex-start; gap: 11px; padding: 9px 10px; border-radius: 8px; color: #344054; }
.nav-fly-link:hover, .nav-fly-link:focus { background: #f2f6ff; text-decoration: none; color: #1f2937; outline: none; }
.nav-fly-link .nav-fly-ico { color: #98a2b3; margin-top: 1px; flex: none; }
.nav-fly-link:hover .nav-fly-ico, .nav-fly-link:focus .nav-fly-ico { color: #2563eb; }
.nav-fly-link b { display: block; font-size: 13px; font-weight: 600; line-height: 1.3; }
.nav-fly-link small { display: block; font-size: 11.5px; color: #66748a; line-height: 1.35; margin-top: 2px;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.nav-fly-link.active { background: #eef2ff; }
.nav-fly-link.active b { color: #3730a3; }
.nav-fly-link.active .nav-fly-ico { color: #4f46e5; }

/* menu search results (and the recently opened pages) */
.nav-results { flex: 1; }
.nav-results[hidden] { display: none; }
.nav-res-h { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: #6f7f96; padding: 4px 12px 6px; display: flex; justify-content: space-between; }
.nav-res-h a { color: #7ea6e0; text-transform: none; letter-spacing: 0; cursor: pointer; }
.nav-res { display: flex; align-items: center; gap: 10px; padding: 8px 12px; border-radius: 8px; color: var(--bas-sidebar-text); font-size: 13px; }
.nav-res:hover, .nav-res.on { background: rgba(255, 255, 255, .08); color: #fff; text-decoration: none; }
.nav-res span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nav-res mark { background: none; color: #93c5fd; font-weight: 700; }
.nav-res small { font-size: 10.5px; color: #6f7f96; border: 1px solid rgba(255, 255, 255, .1); border-radius: 5px; padding: 0 5px; white-space: nowrap; }
.nav-res-none { padding: 18px 12px; color: #6f7f96; font-size: 12.5px; text-align: center; }

/* collapsed rail */
body.nav-collapsed .nav-search, body.nav-collapsed .nav-count, body.nav-collapsed .nav-chev, body.nav-collapsed .nav-results { display: none !important; }
body.nav-collapsed .nav-search-btn { display: flex !important; margin-bottom: 10px; }
body.nav-collapsed .nav-mod-btn { justify-content: center; padding: 10px 0; }
body.nav-collapsed .nav-mod.active > .nav-mod-btn:before { left: -10px; }
body.nav-collapsed .nav-body { display: block !important; }
body.nav-collapsed .nav-quick .nav-link { position: relative; }
body.nav-collapsed .nav-quick .nav-badge { display: inline-flex; position: absolute; top: 2px; right: 9px; min-width: 16px; height: 16px; padding: 0 4px; font-size: 10px; }

/* ---------------------------------------------------------------- page header */
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 18px; flex-wrap: wrap; }
.crumbs { font-size: 12px; color: var(--bas-muted); margin-bottom: 4px; display: flex; align-items: center; gap: 4px; }
.crumbs a { color: var(--bas-muted); }
.page-head h1 { font-size: 22px; letter-spacing: -.01em; }
.page-head .sub { margin: 4px 0 0; color: var(--bas-muted); font-size: 13.5px; }
.head-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

/* ---------------------------------------------------------------- cards */
.card {
    background: var(--bas-card); border: 1px solid var(--bas-border); border-radius: var(--bas-radius);
    box-shadow: var(--bas-shadow); margin-bottom: 18px;
}
.card-head {
    display: flex; align-items: center; justify-content: space-between; gap: 12px;
    padding: 14px 18px; border-bottom: 1px solid var(--bas-border); flex-wrap: wrap;
}
.card-head h3 { font-size: 15px; display: flex; align-items: center; gap: 8px; }
.card-head .hint { font-size: 12.5px; color: var(--bas-muted); font-weight: 400; }
.card-body { padding: 18px; }
.card-body.flush { padding: 0; }
.card-foot {
    padding: 12px 18px; border-top: 1px solid var(--bas-border); background: #fafbfd;
    border-radius: 0 0 var(--bas-radius) var(--bas-radius);
    display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; align-items: center;
}
.card-foot .spacer { flex: 1; }
.section-title {
    font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em;
    color: var(--bas-muted); margin: 6px 0 12px; display: flex; align-items: center; gap: 8px;
}
.section-title:after { content: ""; flex: 1; height: 1px; background: var(--bas-border); }

.toolbar { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; padding: 12px 18px; border-bottom: 1px solid var(--bas-border); }
.toolbar .spacer { flex: 1; }

/* ---------------------------------------------------------------- buttons */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 7px;
    height: 36px; padding: 0 14px; border-radius: var(--bas-radius-sm);
    border: 1px solid var(--bas-border-strong); background: #fff; color: var(--bas-text);
    font: inherit; font-size: 13.5px; font-weight: 500; cursor: pointer; white-space: nowrap;
    transition: background .15s, border-color .15s, box-shadow .15s, color .15s;
    text-decoration: none !important; user-select: none;
}
.btn:hover { background: #f6f8fb; border-color: #b9c3d2; }
.btn:focus-visible { outline: none; box-shadow: 0 0 0 3px rgba(37, 99, 235, .25); }
.btn-primary { background: var(--bas-primary); border-color: var(--bas-primary); color: #fff; }
.btn-primary:hover { background: var(--bas-primary-dark); border-color: var(--bas-primary-dark); color: #fff; }
.btn-success { background: var(--bas-success); border-color: var(--bas-success); color: #fff; }
.btn-success:hover { background: #0b7a4b; border-color: #0b7a4b; color: #fff; }
.btn-danger { background: #fff; border-color: #f1b5b1; color: var(--bas-danger); }
.btn-danger:hover { background: var(--bas-danger-soft); border-color: var(--bas-danger); }
.btn-danger-solid { background: var(--bas-danger); border-color: var(--bas-danger); color: #fff; }
.btn-danger-solid:hover { background: #b42820; border-color: #b42820; color: #fff; }
.btn-ghost { border-color: transparent; background: transparent; color: var(--bas-muted); }
.btn-ghost:hover { background: #eef2f7; border-color: transparent; color: var(--bas-text); }
.btn-sm { height: 30px; padding: 0 10px; font-size: 12.5px; }
.btn-lg { height: 44px; padding: 0 20px; font-size: 15px; }
.btn-block { width: 100%; }
.btn[disabled], .btn.aspNetDisabled { opacity: .5; pointer-events: none; }

.link-act { display: inline-flex; align-items: center; gap: 4px; color: var(--bas-primary); font-weight: 500; cursor: pointer; }
.link-act.danger { color: var(--bas-danger); }
.row-icon {
    width: 30px; height: 30px; border-radius: 7px; display: inline-flex; align-items: center; justify-content: center;
    color: var(--bas-muted); cursor: pointer;
}
.row-icon:hover { background: var(--bas-primary-soft); color: var(--bas-primary); text-decoration: none; }
.row-icon.danger:hover { background: var(--bas-danger-soft); color: var(--bas-danger); }

/* segmented tabs */
.seg { display: inline-flex; background: #eef1f6; border-radius: 9px; padding: 3px; gap: 2px; }
.seg a {
    display: inline-flex; align-items: center; gap: 6px; padding: 6px 14px; border-radius: 7px;
    color: var(--bas-muted); font-weight: 500; font-size: 13px; text-decoration: none !important;
}
.seg a:hover { color: var(--bas-text); }
.seg a.on { background: #fff; color: var(--bas-text); box-shadow: 0 1px 2px rgba(16, 24, 40, .1); }
.seg .count { background: #dfe5ee; color: var(--bas-text); border-radius: 10px; padding: 0 7px; font-size: 11.5px; }
.seg a.on .count { background: var(--bas-primary); color: #fff; }

/* ---------------------------------------------------------------- forms */
.form-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 14px 18px; }
.col-12 { grid-column: span 12; } .col-9 { grid-column: span 9; } .col-8 { grid-column: span 8; }
.col-6 { grid-column: span 6; } .col-4 { grid-column: span 4; } .col-3 { grid-column: span 3; } .col-2 { grid-column: span 2; } .col-5 { grid-column: span 5; } .col-7 { grid-column: span 7; }
.field label, .field .lbl { display: block; font-size: 12.5px; font-weight: 600; color: #3b4859; margin-bottom: 6px; }
.field .req { color: var(--bas-danger); margin-left: 2px; }
.field .help { font-size: 12px; color: var(--bas-muted); margin-top: 5px; }
.field .help.warn { color: var(--bas-warning); }
.field .help.err { color: var(--bas-danger); }
.checks { display: flex; flex-wrap: wrap; gap: 10px 26px; align-items: center; padding-top: 4px; }
.lock-note {
    display: flex; gap: 8px; align-items: flex-start; padding: 10px 12px; border-radius: 8px;
    background: var(--bas-warning-soft); color: #7a4a00; font-size: 12.5px; margin-bottom: 14px;
}
.info-note {
    display: flex; gap: 8px; align-items: flex-start; padding: 10px 12px; border-radius: 8px;
    background: var(--bas-info-soft); color: #1e3a8a; font-size: 12.5px; margin-bottom: 14px;
}
.rtl input { direction: rtl; text-align: right; }

/* inline entry row for sub-lists (units, recipients) */
.entry-row {
    display: grid; gap: 10px; align-items: end; padding: 14px; border: 1px dashed var(--bas-border-strong);
    border-radius: 9px; background: #fafbfd; margin-bottom: 14px;
}

/* simple data tables (sub-lists) */
.tbl { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 13px; }
.tbl th {
    text-align: left; font-weight: 600; color: var(--bas-muted); font-size: 12px; text-transform: uppercase; letter-spacing: .04em;
    padding: 9px 12px; background: #f7f9fc; border-bottom: 1px solid var(--bas-border);
}
.tbl td { padding: 9px 12px; border-bottom: 1px solid #eef1f5; vertical-align: middle; }
.tbl tr:last-child td { border-bottom: none; }
.tbl tr:hover td { background: #fafcff; }
.tbl .num { text-align: right; font-variant-numeric: tabular-nums; }
.tbl .act { width: 80px; text-align: right; white-space: nowrap; }
.tbl-wrap { border: 1px solid var(--bas-border); border-radius: 9px; overflow: hidden; }
.empty { padding: 26px; text-align: center; color: var(--bas-muted); font-size: 13px; }
.empty .ico { color: #b5c0cf; display: block; margin: 0 auto 8px; }

/* ---------------------------------------------------------------- badges */
.badge {
    display: inline-flex; align-items: center; gap: 5px; height: 22px; padding: 0 9px; border-radius: 11px;
    font-size: 11.5px; font-weight: 600; white-space: nowrap;
}
.badge:before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: .8; }
.badge-success { background: var(--bas-success-soft); color: var(--bas-success); }
.badge-warning { background: var(--bas-warning-soft); color: var(--bas-warning); }
.badge-danger { background: var(--bas-danger-soft); color: var(--bas-danger); }
.badge-info { background: var(--bas-info-soft); color: var(--bas-info); }
.badge-muted { background: #eef1f5; color: #5d6b80; }
.tag { display: inline-block; padding: 1px 7px; border-radius: 5px; font-size: 11px; font-weight: 600; background: #eef1f5; color: #4a5768; margin-right: 4px; }
.tag.sys { background: #fff1e0; color: #a35b00; }
.tag.ctl { background: #ece9fe; color: #5b3fd1; }
.mono { font-family: Consolas, "SFMono-Regular", Menlo, monospace; }

/* ---------------------------------------------------------------- KPI / dashboard */
.kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-bottom: 18px; }
.kpi {
    background: #fff; border: 1px solid var(--bas-border); border-radius: var(--bas-radius); box-shadow: var(--bas-shadow);
    padding: 16px 18px; display: flex; gap: 14px; align-items: center; color: inherit;
}
a.kpi:hover { text-decoration: none; border-color: #c7d4ea; }
.kpi-ico { width: 44px; height: 44px; border-radius: 11px; display: flex; align-items: center; justify-content: center; flex: none; }
.kpi-ico.blue { background: #eaf1ff; color: #2563eb; }
.kpi-ico.amber { background: #fff4e0; color: #c27400; }
.kpi-ico.green { background: #e7f6ef; color: #10915b; }
.kpi-ico.violet { background: #f0edff; color: #6d4ae6; }
.kpi .v { font-size: 24px; font-weight: 700; line-height: 1.1; }
.kpi .l { font-size: 12.5px; color: var(--bas-muted); margin-top: 2px; }

.grid-2 { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 18px; }
.grid-split { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 18px; align-items: start; }

.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 12px; }
.tile {
    display: flex; gap: 12px; align-items: flex-start; padding: 14px; border: 1px solid var(--bas-border);
    border-radius: 10px; color: var(--bas-text); background: #fff; transition: border-color .15s, box-shadow .15s;
}
.tile:hover { border-color: #bcd0f5; box-shadow: 0 4px 14px rgba(37, 99, 235, .08); text-decoration: none; }
.tile .ti { width: 36px; height: 36px; border-radius: 9px; background: var(--bas-primary-soft); color: var(--bas-primary); display: flex; align-items: center; justify-content: center; flex: none; }
.tile .tt { font-weight: 600; font-size: 13.5px; }
.tile .td { font-size: 12px; color: var(--bas-muted); margin-top: 2px; }

.welcome {
    border-radius: 14px; padding: 22px 24px; margin-bottom: 18px; color: #fff;
    background: radial-gradient(1200px 300px at 100% 0%, rgba(96, 165, 250, .35), transparent 60%), linear-gradient(120deg, #0f1b2d, #1e3a6b);
    display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap;
}
.welcome h2 { color: #fff; font-size: 20px; }
.welcome p { margin: 6px 0 0; color: #c3d2ea; }
.welcome .meta { display: flex; gap: 22px; flex-wrap: wrap; }
.welcome .meta div { font-size: 12px; color: #9fb3d3; }
.welcome .meta b { display: block; color: #fff; font-size: 14px; font-weight: 600; }

.list-row { display: flex; align-items: center; gap: 12px; padding: 12px 18px; border-bottom: 1px solid #eef1f5; color: inherit; }
.list-row:last-child { border-bottom: none; }
a.list-row:hover { background: #fafcff; text-decoration: none; }
.list-row .main-t { font-weight: 600; font-size: 13.5px; }
.list-row .sub-t { font-size: 12px; color: var(--bas-muted); }
.list-row .grow { flex: 1; min-width: 0; }
.list-row .amt { font-weight: 600; font-variant-numeric: tabular-nums; }

/* ---------------------------------------------------------------- approvals */
.doc-head { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; flex-wrap: wrap; }
.doc-head .t { font-size: 18px; font-weight: 700; }
.doc-head .s { color: var(--bas-muted); font-size: 13px; margin-top: 2px; }
.facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin: 16px 0 4px; }
.fact { background: #f7f9fc; border-radius: 9px; padding: 10px 12px; }
.fact .k { font-size: 11.5px; color: var(--bas-muted); text-transform: uppercase; letter-spacing: .04em; }
.fact .v { font-weight: 600; margin-top: 3px; word-break: break-word; }
.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li { position: relative; padding: 0 0 16px 30px; }
.timeline li:before { content: ""; position: absolute; left: 9px; top: 20px; bottom: 0; width: 2px; background: var(--bas-border); }
.timeline li:last-child:before { display: none; }
.timeline .tdot {
    position: absolute; left: 0; top: 1px; width: 20px; height: 20px; border-radius: 50%;
    background: #eef1f5; color: #7a879a; display: flex; align-items: center; justify-content: center; font-size: 10px; font-weight: 700;
}
.timeline .st-Approved .tdot { background: var(--bas-success); color: #fff; }
.timeline .st-Rejected .tdot { background: var(--bas-danger); color: #fff; }
.timeline .st-Pending .tdot { background: #f59e0b; color: #fff; box-shadow: 0 0 0 4px rgba(245, 158, 11, .18); }
.timeline .tl-t { font-weight: 600; font-size: 13.5px; }
.timeline .tl-s { font-size: 12px; color: var(--bas-muted); margin-top: 2px; }
.timeline .tl-c { font-size: 12.5px; margin-top: 6px; background: #f7f9fc; border-radius: 7px; padding: 7px 10px; color: #3b4859; }
.decision { border-top: 1px solid var(--bas-border); padding-top: 16px; margin-top: 6px; }
.changed { color: var(--bas-warning); font-size: 11.5px; display: block; }

/* ---------------------------------------------------------------- toasts */
.toast-wrap { position: fixed; top: 74px; right: 22px; z-index: 9999; display: flex; flex-direction: column; gap: 10px; width: 380px; max-width: calc(100vw - 32px); }
.toast {
    display: flex; gap: 12px; padding: 13px 14px; border-radius: 11px; background: #fff;
    border: 1px solid var(--bas-border); box-shadow: var(--bas-shadow-lg);
    animation: toastIn .25s ease; border-left: 4px solid var(--bas-info);
}
.toast.hide { animation: toastOut .25s ease forwards; }
.toast .ti { flex: none; margin-top: 1px; }
.toast .tt { font-weight: 600; font-size: 13.5px; }
.toast .tm { font-size: 13px; color: #3b4859; margin-top: 2px; white-space: pre-line; word-break: break-word; }
.toast .tx { margin-left: auto; color: #98a3b3; cursor: pointer; flex: none; }
.toast-success { border-left-color: var(--bas-success); } .toast-success .ti { color: var(--bas-success); }
.toast-error { border-left-color: var(--bas-danger); } .toast-error .ti { color: var(--bas-danger); }
.toast-warning { border-left-color: #f59e0b; } .toast-warning .ti { color: #d68400; }
.toast-info .ti { color: var(--bas-info); }
@keyframes toastIn { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }
@keyframes toastOut { to { opacity: 0; transform: translateX(20px); } }

/* page loading bar shown while a postback is running */
.busy-bar { position: fixed; top: 0; left: 0; height: 3px; width: 0; background: var(--bas-primary); z-index: 10000; transition: width 2s ease; }
body.is-busy .busy-bar { width: 85%; }

/* ---------------------------------------------------------------- DevExpress touches */
.bas-grid { border-radius: 0 0 var(--bas-radius) var(--bas-radius); }
.bas-grid [class*="dxgvHeader"] { font-weight: 600; color: #4a5768; background: #f7f9fc !important; }
.bas-grid [class*="dxgvDataRow"] td { padding-top: 9px !important; padding-bottom: 9px !important; }
.bas-grid [class*="dxgvFocusedRow"] td, .bas-tree [class*="dxtlFocusedNode"] td { background: #eaf1ff !important; color: var(--bas-text) !important; }
.bas-grid [class*="dxgvControl"], .bas-tree [class*="dxtlControl"] { border: none !important; }
.bas-grid [class*="dxgvSearchPanel"] { padding: 12px 14px !important; background: #fff !important; }
.bas-tree [class*="dxtlHeader"] { font-weight: 600; color: #4a5768; background: #f7f9fc !important; }
.bas-tree [class*="dxtlNode"] td { padding-top: 8px !important; padding-bottom: 8px !important; }
.dxeErrorFrameSys .dxeErrorCellSys { font-size: 12px; }

/* ---------------------------------------------------------------- login */
.login-page { min-height: 100vh; display: grid; grid-template-columns: 1.05fr 1fr; background: #fff; }
.login-brand {
    position: relative; overflow: hidden; color: #fff; padding: 48px 56px; display: flex; flex-direction: column; justify-content: space-between;
    background: radial-gradient(900px 500px at 0% 100%, rgba(59, 130, 246, .35), transparent 60%),
                radial-gradient(700px 400px at 100% 0%, rgba(99, 102, 241, .30), transparent 60%),
                linear-gradient(150deg, #0b1626 0%, #13284a 60%, #183463 100%);
}
.login-brand:after {
    content: ""; position: absolute; inset: 0; opacity: .07; pointer-events: none;
    background-image: linear-gradient(rgba(255,255,255,.6) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.6) 1px, transparent 1px);
    background-size: 44px 44px;
}
.login-brand .top { display: flex; align-items: center; gap: 12px; position: relative; z-index: 1; }
.login-brand .brand-mark { width: 42px; height: 42px; font-size: 15px; border-radius: 11px; }
.login-brand .bn { font-size: 20px; font-weight: 700; }
.login-brand .mid { position: relative; z-index: 1; max-width: 480px; }
.login-brand h1 { color: #fff; font-size: 36px; line-height: 1.15; letter-spacing: -.02em; font-weight: 700; }
.login-brand .lead { color: #b9c9e3; font-size: 15.5px; margin-top: 14px; line-height: 1.6; }
.feat { list-style: none; padding: 0; margin: 28px 0 0; display: grid; gap: 12px; }
.feat li { display: flex; gap: 12px; align-items: center; color: #dbe6f7; font-size: 14px; }
.feat .fi { width: 32px; height: 32px; border-radius: 9px; background: rgba(255, 255, 255, .08); display: flex; align-items: center; justify-content: center; color: #93c5fd; flex: none; }
.login-brand .foot { position: relative; z-index: 1; font-size: 12px; color: #7f93b3; }

.login-form-side { display: flex; align-items: center; justify-content: center; padding: 40px 24px; background: #fff; }
.login-card { width: 100%; max-width: 400px; }
.login-card h2 { font-size: 26px; letter-spacing: -.01em; }
.login-card .lsub { color: var(--bas-muted); margin: 6px 0 26px; }
.lf { margin-bottom: 16px; }
.lf label { display: block; font-size: 13px; font-weight: 600; color: #344054; margin-bottom: 7px; }
.input {
    width: 100%; height: 44px; padding: 0 14px; border: 1px solid #d0d5dd; border-radius: 9px; font: inherit; font-size: 14.5px;
    color: var(--bas-text); background: #fff; transition: border-color .15s, box-shadow .15s; outline: none;
}
.input:focus { border-color: #84adff; box-shadow: 0 0 0 4px rgba(37, 99, 235, .12); }
.input.code { letter-spacing: .45em; text-align: center; font-size: 22px; font-weight: 600; height: 54px; font-family: Consolas, monospace; }
.pw-wrap { position: relative; }
.pw-wrap .input { padding-right: 46px; }
.pw-eye { position: absolute; right: 6px; top: 6px; width: 34px; height: 32px; border: none; background: transparent; color: #8a96a8; cursor: pointer; border-radius: 7px; }
.pw-eye:hover { background: #f2f4f7; color: #344054; }
.alert { display: flex; gap: 10px; padding: 11px 13px; border-radius: 9px; font-size: 13px; margin-bottom: 16px; align-items: flex-start; }
.alert-error { background: var(--bas-danger-soft); color: #9f1d17; border: 1px solid #f7c8c4; }
.alert-info { background: var(--bas-info-soft); color: #1e3a8a; border: 1px solid #c8d8fb; }
.alert-success { background: var(--bas-success-soft); color: #0b6b43; border: 1px solid #bfe6d3; }
.captcha-row { display: flex; gap: 10px; align-items: center; margin-bottom: 10px; }
.captcha-row img { height: 50px; border: 1px solid #d0d5dd; border-radius: 9px; flex: 1; min-width: 0; object-fit: cover; }
.login-muted { color: var(--bas-muted); font-size: 12.5px; text-align: center; margin-top: 22px; }
.tfa-box { display: flex; gap: 18px; align-items: center; background: #f7f9fc; border: 1px solid var(--bas-border); border-radius: 12px; padding: 16px; margin-bottom: 18px; }
.tfa-box img { width: 150px; height: 150px; background: #fff; border-radius: 8px; flex: none; }
.tfa-key { font-family: Consolas, monospace; font-size: 15px; font-weight: 600; letter-spacing: .06em; word-break: break-all; background: #fff; border: 1px dashed #c5cedb; border-radius: 7px; padding: 8px 10px; margin-top: 8px; }
.steps-small { margin: 0; padding-left: 18px; color: #3b4859; font-size: 13px; line-height: 1.7; }
.back-link { display: inline-flex; align-items: center; gap: 6px; color: var(--bas-muted); font-size: 13px; margin-top: 14px; }

/* simple centered pages (access denied, error) */
.center-page { max-width: 520px; margin: 60px auto; text-align: center; }
.center-page .big-ico { width: 64px; height: 64px; border-radius: 16px; margin: 0 auto 18px; display: flex; align-items: center; justify-content: center; }

/* ---------------------------------------------------------------- responsive */
/* ---------- invoice totals + sticky action bar (Sales Invoice and later document pages) ---------- */
.tbl.totals { width: 100%; border-collapse: collapse; }
.tbl.totals td { padding: 7px 4px; border-bottom: 1px dashed var(--bas-border); font-size: 13.5px; }
.tbl.totals td:last-child { text-align: right; font-variant-numeric: tabular-nums; font-weight: 600; }
.tbl.totals td .dxeEditArea_Office365, .tbl.totals td input { text-align: right; }
.tbl.totals tr.grand td { border-top: 2px solid var(--bas-text); border-bottom: none; font-size: 16px; font-weight: 700; padding-top: 10px; }
.tbl.totals tr.due td { background: var(--bas-warning-soft); color: var(--bas-warning); font-weight: 700; border-bottom: none; border-radius: 6px; }
.tbl.totals tr.due.zero td { background: var(--bas-success-soft); color: var(--bas-success); }
.action-bar {
    position: sticky; bottom: 0; z-index: 20; margin-top: 16px;
    display: flex; flex-wrap: wrap; align-items: center; gap: 8px; justify-content: flex-end;
    background: rgba(255, 255, 255, .96); border: 1px solid var(--bas-border); border-radius: var(--bas-radius);
    box-shadow: 0 -4px 16px rgba(16, 24, 40, .08); padding: 10px 14px;
}
.action-bar .spacer { flex: 1 1 auto; }

/* ---------- key/value strip + return footer (Sales Return) ---------- */
.kv-strip { display: flex; flex-wrap: wrap; gap: 10px 28px; margin-top: 14px; padding: 12px 14px; background: #f7f9fc; border: 1px solid var(--bas-border); border-radius: var(--bas-radius-sm); }
.kv-strip > div { display: flex; flex-direction: column; gap: 2px; }
.kv-strip span { font-size: 11.5px; color: var(--bas-muted); text-transform: uppercase; letter-spacing: .3px; font-weight: 600; }
.kv-strip b { font-size: 14.5px; }
.ret-foot { display: flex; flex-wrap: wrap; gap: 16px; align-items: flex-start; justify-content: space-between; margin-top: 16px; }

/* ---------- POS terminal (Sales/POS.aspx) ---------- */
body.pos-mode .content { padding: 12px 14px 0; }
body.pos-mode .content-inner { max-width: none; }
body.pos-busy { cursor: progress; }
.pos-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 10px; }
.pos-title { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.pos-title h1 { font-size: 19px; margin: 0; }
.pos-meta { display: inline-flex; align-items: center; gap: 5px; color: var(--bas-muted); font-size: 13px; }
.pos-pill { display: inline-flex; align-items: center; gap: 5px; border-radius: 20px; padding: 3px 10px; font-size: 12.5px; font-weight: 600; }
.pos-pill.ok { background: var(--bas-success-soft); color: var(--bas-success); }
.pos-pill.bad { background: var(--bas-danger-soft); color: var(--bas-danger); }
.pos-top-actions { display: flex; gap: 8px; }

.pos { display: grid; grid-template-columns: minmax(360px, 1.05fr) minmax(0, 1.55fr) minmax(290px, 330px); gap: 12px;
       height: calc(100vh - 210px); min-height: 520px; }
.pos-col { background: var(--bas-card); border: 1px solid var(--bas-border); border-radius: var(--bas-radius); box-shadow: var(--bas-shadow);
           display: flex; flex-direction: column; min-height: 0; overflow: hidden; }

/* cart */
.pos-scan { display: flex; gap: 10px; padding: 12px; border-bottom: 1px solid var(--bas-border); align-items: flex-end; }
.pos-scan-box { flex: 1; display: flex; align-items: center; gap: 8px; border: 2px solid var(--bas-primary); border-radius: 9px; padding: 0 10px; height: 46px; color: var(--bas-primary); }
.pos-scan-box input { border: 0; outline: 0; flex: 1; font-size: 16px; height: 100%; background: transparent; color: var(--bas-text); min-width: 0; }
.pos-qty { display: flex; align-items: flex-end; gap: 6px; }
.pos-qty-box label { display: block; font-size: 11px; color: var(--bas-muted); font-weight: 600; text-transform: uppercase; margin-bottom: 3px; }
.pos-qbtn { width: 40px; height: 40px; border-radius: 9px; border: 1px solid var(--bas-border-strong); background: #fff; font-size: 20px; font-weight: 700; cursor: pointer; }
.pos-qbtn:active { background: var(--bas-primary-soft); }
.pos-cart-list { flex: 1; overflow-y: auto; padding: 6px; }
.pos-line { display: grid; grid-template-columns: minmax(0, 1fr) auto 76px 92px; align-items: center; gap: 8px; padding: 9px 10px; border-radius: 8px;
            cursor: pointer; border: 1px solid transparent; transition: background .15s; }
.pos-line:nth-child(even) { background: #f7f8fa; }
.pos-line.sel { background: #fff3e0; border-color: #ffcc80; }
.pos-line.flash { background: #e3f2fd; }
.pos-line .t b { display: block; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pos-line .t small { color: var(--bas-muted); font-size: 11.5px; }
.pos-line .q { font-weight: 700; font-size: 14px; }
.pos-line .d input { width: 100%; height: 30px; border: 1px solid var(--bas-border); border-radius: 6px; text-align: right; padding: 0 6px; font-size: 12.5px; }
.pos-line .a { text-align: right; font-weight: 700; font-variant-numeric: tabular-nums; }
.pos-cart-tools { display: flex; gap: 8px; padding: 8px 12px; border-top: 1px solid var(--bas-border); }
.pos-totals { background: #1b2533; color: #cfd6e1; padding: 10px 14px; font-variant-numeric: tabular-nums; }
.pos-totals > div { display: flex; justify-content: space-between; padding: 3px 0; font-size: 13px; }
.pos-totals b { color: #fff; }
.pos-totals .grand { font-size: 20px; padding: 6px 0; border-top: 1px solid rgba(255,255,255,.15); margin-top: 4px; }
.pos-totals .grand b { color: #ffd54f; }
.pos-totals .due b { color: #ef9a9a; font-size: 16px; }
.pos-totals .due.zero b { color: #a5d6a7; }

/* products */
.pos-cats { display: flex; gap: 6px; padding: 10px; overflow-x: auto; border-bottom: 1px solid var(--bas-border); flex-shrink: 0; }
.pos-chip { --c: #37474f; border: 0; border-radius: 9px; padding: 0 16px; height: 42px; background: var(--c); color: #fff; font-weight: 700; font-size: 13px;
            white-space: nowrap; cursor: pointer; opacity: .78; flex-shrink: 0; }
.pos-chip.on { opacity: 1; box-shadow: 0 0 0 3px rgba(0,0,0,.12) inset, 0 2px 6px rgba(0,0,0,.18); }
.pos-find { display: flex; align-items: center; gap: 8px; margin: 10px 10px 0; padding: 0 10px; height: 38px; border: 1px solid var(--bas-border); border-radius: 8px; color: var(--bas-muted); }
.pos-find input { border: 0; outline: 0; flex: 1; font-size: 14px; background: transparent; min-width: 0; }
.pos-tiles { flex: 1; overflow-y: auto; padding: 10px; display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; align-content: start; }
.pos-tile { --c: #607d8b; display: flex; flex-direction: column; text-align: left; border: 1px solid var(--bas-border); border-radius: 10px; background: #fff;
            padding: 0; overflow: hidden; cursor: pointer; min-height: 112px; transition: transform .08s, box-shadow .15s; }
.pos-tile:hover { box-shadow: 0 4px 14px rgba(16,24,40,.12); }
.pos-tile:active { transform: scale(.97); }
.pos-tile .cat { background: var(--c); color: #fff; font-size: 10.5px; font-weight: 700; text-align: center; padding: 4px 6px; text-transform: uppercase; letter-spacing: .3px;
                 white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pos-tile .nm { flex: 1; padding: 8px 10px 4px; font-weight: 700; font-size: 13.5px; line-height: 1.3; color: var(--bas-text); }
.pos-tile .pr { padding: 0 10px 9px; color: #2e7d32; font-weight: 800; font-size: 15px; }
.pos-tile .pr small { color: var(--bas-muted); font-weight: 500; font-size: 11px; margin-left: 4px; }
.pos-more { grid-column: 1 / -1; text-align: center; color: var(--bas-muted); font-size: 12.5px; padding: 6px; }
.pos-empty { grid-column: 1 / -1; display: flex; flex-direction: column; align-items: center; gap: 4px; color: var(--bas-muted); padding: 40px 10px; text-align: center; }
.pos-empty small { font-size: 12px; }

/* customer / payment / keypad */
.pos-pay { overflow-y: auto; }
.pos-block { padding: 12px; border-bottom: 1px solid var(--bas-border); }
.pos-block > label { display: block; font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .4px; color: var(--bas-muted); margin-bottom: 7px; }
.pos-cust-info { font-size: 12.5px; color: var(--bas-muted); margin-top: 6px; min-height: 16px; }
.pos-cust-info.warn { color: var(--bas-danger); font-weight: 600; }
.pos-payrow { display: grid; grid-template-columns: 42px minmax(0, 1fr) 100px; gap: 6px; align-items: center; margin-bottom: 6px; }
.pos-payrow .m { font-weight: 700; font-size: 13px; }
.pos-exact { width: 100%; justify-content: center; margin-top: 4px; }
.pos-keypad .keys { display: grid; grid-template-columns: repeat(3, 1fr); gap: 7px; }
.pos-keypad .keys button { height: 52px; border-radius: 10px; border: 1px solid var(--bas-border-strong); background: #fff; font-size: 21px; font-weight: 700; cursor: pointer; }
.pos-keypad .keys button:active { background: var(--bas-primary-soft); }
.pos-keypad .keys .back { background: #fdecea; color: var(--bas-danger); }

/* bottom actions */
.pos-actions { display: grid; grid-template-columns: 1fr 1fr 1fr 2fr; gap: 10px; padding: 10px 0 12px; }
.pos-act { display: flex; align-items: center; justify-content: center; gap: 9px; height: 60px; border: 0; border-radius: 11px; color: #fff; font-size: 15px; font-weight: 700; cursor: pointer; }
.pos-act kbd { font: inherit; font-size: 11px; opacity: .75; border: 1px solid rgba(255,255,255,.5); border-radius: 4px; padding: 0 4px; margin-left: 4px; }
.pos-act:active { transform: translateY(1px); }
.pos-act:disabled { opacity: .45; cursor: not-allowed; }
.pos-act.hold { background: #6a1b9a; } .pos-act.disc { background: #e65100; } .pos-act.void { background: #c62828; }
.pos-act.pay { background: #2e7d32; font-size: 18px; }
.pos-act.pay b { background: rgba(0,0,0,.18); border-radius: 8px; padding: 4px 10px; margin-left: 6px; font-variant-numeric: tabular-nums; }

/* parked sales dialog */
.pos-modal { position: fixed; inset: 0; background: rgba(15, 27, 45, .45); z-index: 9000; align-items: center; justify-content: center; padding: 16px; }
.pos-modal-box { background: #fff; border-radius: 12px; width: 100%; max-width: 520px; max-height: 80vh; display: flex; flex-direction: column; box-shadow: var(--bas-shadow-lg); }
.pos-modal-head { display: flex; justify-content: space-between; align-items: center; padding: 12px 16px; border-bottom: 1px solid var(--bas-border); }
.pos-modal-head h3 { margin: 0; font-size: 16px; }
.pos-modal-body { overflow-y: auto; padding: 10px; display: flex; flex-direction: column; gap: 8px; }
.pos-parked { display: grid; grid-template-columns: auto 1fr; gap: 2px 12px; text-align: left; border: 1px solid var(--bas-border); border-radius: 9px; background: #fff; padding: 10px 12px; cursor: pointer; }
.pos-parked:hover { background: var(--bas-primary-soft); }
.pos-parked small { grid-column: 1 / -1; color: var(--bas-muted); }

@media (max-width: 1280px) {
    .pos { grid-template-columns: minmax(330px, 1fr) minmax(0, 1.2fr); height: auto; }
    .pos-pay { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .pos-cart, .pos-products { height: calc(100vh - 230px); }
}
@media (max-width: 860px) {
    .pos { grid-template-columns: 1fr; }
    .pos-pay { grid-template-columns: 1fr; }
    .pos-actions { grid-template-columns: 1fr 1fr; }
    .pos-cart, .pos-products { height: 70vh; }
}

@media (max-width: 1200px) {
    .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .grid-2, .grid-split { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 992px) {
    .sidebar { transform: translateX(-100%); width: var(--bas-sidebar-w) !important; }
    .main { margin-left: 0 !important; }
    body.nav-open .sidebar { transform: none; box-shadow: var(--bas-shadow-lg); }
    body.nav-open .backdrop { display: block; position: fixed; inset: 0; background: rgba(15, 23, 42, .4); z-index: 35; }
    body.nav-collapsed .brand-text, body.nav-collapsed .nav-text, body.nav-collapsed .nav-group-title, body.nav-collapsed .sidebar-foot { display: initial; }
    body.nav-collapsed .nav-search, body.nav-collapsed .nav-count, body.nav-collapsed .nav-chev { display: initial !important; }
    body.nav-collapsed .nav-search { display: block !important; }
    body.nav-collapsed .nav-search-btn { display: none !important; }
    body.nav-collapsed .nav-mod-btn { justify-content: flex-start; padding: 8px 10px 8px 12px; }
    body.nav-collapsed .nav-link { justify-content: flex-start; padding: 9px 12px; }
    body.nav-collapsed .nav-quick .nav-badge { position: static; min-width: 20px; height: 20px; font-size: 11px; padding: 0 6px; }
    body.nav-collapsed .brand { justify-content: flex-start; padding: 0 18px; }
    body.nav-collapsed .nav-mod.active > .nav-mod-btn:before { left: 0; }
    .nav-fly { position: static; display: none; width: auto !important; max-height: none; margin: 2px 0 8px 22px; box-shadow: none; border: 0;
               background: transparent; padding: 0 0 0 8px; border-left: 1px solid rgba(255, 255, 255, .1); border-radius: 0; animation: none; }
    .nav-fly:before, .nav-fly-head { display: none; }
    .nav-fly-body.two { display: block; }
    .nav-fly-link { color: var(--bas-sidebar-text); padding: 7px 10px; }
    .nav-fly-link:hover, .nav-fly-link:focus { background: rgba(255, 255, 255, .06); color: #fff; }
    .nav-fly-link b { font-weight: 500; }
    .nav-fly-link small { display: none; }
    .nav-fly-link.active { background: rgba(59, 130, 246, .18); }
    .nav-fly-link.active b { color: #fff; }
    .nav-mod.open > .nav-mod-btn .nav-chev { transform: rotate(90deg); }
    .login-page { grid-template-columns: 1fr; }
    .login-brand { display: none; }
    .col-3, .col-2 { grid-column: span 6; }
    .col-4 { grid-column: span 6; }
    .facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .chip-branch .lbl-long { display: none; }
}
@media (max-width: 640px) {
    .content { padding: 16px 14px 30px; }
    .topbar { padding: 0 12px; gap: 8px; }
    .kpis { grid-template-columns: minmax(0, 1fr); }
    .col-9, .col-8, .col-7, .col-6, .col-5, .col-4, .col-3, .col-2 { grid-column: span 12; }
    .facts { grid-template-columns: minmax(0, 1fr); }
    .user-name-long { display: none; }
    .tfa-box { flex-direction: column; text-align: center; }
}
