:root {
    --ink: #18212f;
    --muted: #667085;
    --line: #e7ebf2;
    --accent: #0ea5a4;
    --accent-dark: #087b78;
    --sun: #f5b84b;
    --rose: #e85d75;
    --side: #111827;
}

body {
    min-height: 100vh;
    background: #f6f8fb;
    color: var(--ink);
    font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.app-shell { display: grid; grid-template-columns: 270px minmax(0, 1fr); min-height: 100vh; }
.sidebar { background: var(--side); color: #fff; padding: 24px 18px; position: sticky; top: 0; z-index: 1020; height: 100vh; height: 100dvh; min-height: 0; display: flex; flex-direction: column; overflow-y: auto; overflow-x: hidden; scrollbar-gutter: stable; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; scrollbar-width: thin; }
.brand { display: flex; align-items: center; gap: 12px; font-weight: 800; font-size: 1.25rem; margin-bottom: 28px; flex: 0 0 auto; }
.brand-mark { width: 42px; height: 42px; border-radius: 8px; background: var(--accent); display: grid; place-items: center; }
.sidebar .nav-link { color: #cbd5e1; border-radius: 8px; padding: 11px 12px; display: flex; align-items: center; gap: 12px; }
.sidebar .nav-link:hover, .sidebar .nav-link.active { background: #1f2937; color: #fff; }
.sidebar .nav { min-height: 0; flex: 1 1 auto; overflow: visible; padding-right: 4px; display: flex; flex-direction: column !important; flex-wrap: nowrap !important; align-items: stretch; }
.sidebar .nav > * { width: 100%; flex: 0 0 auto; }
.nav-link-toggle { width: 100%; justify-content: space-between; border: 0; background: transparent; }
.nav-link-toggle > span { display: flex; align-items: center; gap: 12px; }
.reports-group { width: 100%; display: flex; flex-direction: column; align-items: stretch; }
.reports-group .collapse, .reports-group .collapsing { width: 100%; }
.reports-subnav { display: grid; grid-template-columns: 1fr; gap: 6px; padding: 6px 8px 8px 30px; }
.reports-subnav a { color: #9aa9c2; text-decoration: none; font-size: .9rem; overflow-wrap: anywhere; display: block; width: 100%; }
.reports-subnav a.active, .reports-subnav a:hover { color: #fff; }
.module-subnav { padding: 4px 8px 8px 30px; }
.module-subnav a { color: #9aa9c2; text-decoration: none; font-size: .9rem; display: block; }
.module-subnav a.active, .module-subnav a:hover { color: #fff; }
.content { padding: 28px; min-width: 0; }
.mobile-menu-fab {
    position: fixed;
    left: 14px;
    top: 14px;
    z-index: 1060;
    display: none;
    align-items: center;
    gap: 8px;
    min-height: 44px;
    border: 1px solid #0b918f;
    border-radius: 999px;
    background: var(--accent);
    color: #fff;
    padding: 9px 14px;
    font-weight: 850;
    box-shadow: 0 18px 45px rgba(15,23,42,.22);
}
.mobile-menu-fab:hover,
.mobile-menu-fab:focus {
    background: var(--accent-dark);
    color: #fff;
    outline: 0;
    box-shadow: 0 0 0 .2rem rgba(14,165,164,.22), 0 18px 45px rgba(15,23,42,.22);
}
.mobile-menu-fab i { font-size: 1.15rem; line-height: 1; }
body.sidebar-hidden .mobile-menu-fab { display: inline-flex; }
body.sales-full .mobile-menu-fab,
body.dos-mode .mobile-menu-fab { display: none !important; }
.topbar { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: 22px; }
.topbar-tools { display: flex; align-items: center; gap: 8px; }
.topbar h1 { font-size: clamp(1.5rem, 2vw, 2.1rem); margin: 0; font-weight: 800; letter-spacing: 0; }
.eyebrow { color: var(--accent-dark); text-transform: uppercase; font-size: .75rem; font-weight: 800; letter-spacing: .08em; }
.user-pill { background: #fff; border: 1px solid var(--line); border-radius: 999px; padding: 10px 14px; display: flex; align-items: center; gap: 9px; box-shadow: 0 10px 24px rgba(15,23,42,.05); }
.metric { background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 20px; min-height: 132px; box-shadow: 0 18px 45px rgba(15,23,42,.05); display: block; width: 100%; text-align: left; color: inherit; text-decoration: none; }
.metric:hover { color: inherit; text-decoration: none; }
.metric .icon { width: 42px; height: 42px; border-radius: 8px; display: grid; place-items: center; color: #fff; background: var(--accent); }
.metric strong { font-size: 1.65rem; display: block; margin-top: 12px; }
.panel { background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 18px; box-shadow: 0 18px 45px rgba(15,23,42,.05); }
.panel-title { font-weight: 800; margin-bottom: 14px; }
.dashboard-hero { display: flex; justify-content: space-between; align-items: center; gap: 18px; background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 22px; margin-bottom: 18px; box-shadow: 0 18px 45px rgba(15,23,42,.05); }
.dashboard-hero h2 { margin: 0; font-size: 1.55rem; font-weight: 850; letter-spacing: 0; }
.dashboard-kicker, .panel-eyebrow { color: var(--accent-dark); text-transform: uppercase; font-weight: 850; font-size: .72rem; letter-spacing: .08em; }
.dashboard-actions { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; }
.dashboard-today-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; margin-bottom: 14px; }
.today-card { min-height: 118px; border: 1px solid var(--line); border-radius: 8px; background: #fff; color: var(--ink); text-decoration: none; padding: 18px; display: flex; align-items: center; gap: 16px; box-shadow: 0 18px 45px rgba(15,23,42,.05); transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease; }
.today-card:hover { color: var(--ink); transform: translateY(-2px); box-shadow: 0 24px 52px rgba(15,23,42,.08); border-color: #cbd5e1; }
.today-card span { width: 48px; height: 48px; border-radius: 8px; display: grid; place-items: center; color: #fff; flex: 0 0 auto; }
.today-card small { display: block; color: var(--muted); font-size: .86rem; font-weight: 800; margin-bottom: 5px; }
.today-card strong { display: block; font-size: clamp(1.45rem, 2.2vw, 2.1rem); line-height: 1.05; font-weight: 850; letter-spacing: 0; }
.today-sales span { background: var(--accent); }
.today-purchases span { background: var(--sun); color: #332200; }
.today-expenses span { background: var(--rose); }
.dashboard-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 14px; }
.dash-kpi { position: relative; overflow: hidden; min-height: 156px; border: 1px solid var(--line); border-radius: 8px; background: #fff; color: var(--ink); text-decoration: none; padding: 18px; display: grid; align-content: space-between; box-shadow: 0 18px 45px rgba(15,23,42,.05); transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease; }
.dash-kpi:hover { color: var(--ink); transform: translateY(-2px); box-shadow: 0 24px 52px rgba(15,23,42,.08); border-color: #cbd5e1; }
.dash-kpi::after { content: ""; position: absolute; right: -34px; top: -38px; width: 116px; height: 116px; border-radius: 999px; background: rgba(14,165,164,.08); }
.dash-kpi-amber::after { background: rgba(245,184,75,.14); }
.dash-kpi-rose::after { background: rgba(232,93,117,.12); }
.dash-kpi-indigo::after { background: rgba(89,101,243,.11); }
.dash-kpi-icon { width: 42px; height: 42px; border-radius: 8px; display: grid; place-items: center; color: #fff; background: var(--accent); position: relative; z-index: 1; }
.dash-kpi-amber .dash-kpi-icon { background: var(--sun); color: #332200; }
.dash-kpi-rose .dash-kpi-icon { background: var(--rose); }
.dash-kpi-indigo .dash-kpi-icon { background: #5965f3; }
.dash-kpi-label { color: var(--muted); font-size: .88rem; font-weight: 700; margin-top: 12px; }
.dash-kpi strong { display: block; font-size: clamp(1.45rem, 2.1vw, 2rem); line-height: 1.08; font-weight: 850; letter-spacing: 0; }
.dash-kpi small { color: var(--muted); line-height: 1.35; }
.dashboard-main-grid { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 14px; margin-bottom: 14px; align-items: stretch; }
.dashboard-chart-panel { background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 18px; box-shadow: 0 18px 45px rgba(15,23,42,.05); min-width: 0; }
.panel-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; margin-bottom: 14px; }
.panel-head.compact { align-items: center; }
.panel-head h3 { font-size: 1.05rem; margin: 2px 0 0; font-weight: 850; letter-spacing: 0; }
.dash-segment { display: inline-flex; gap: 4px; padding: 4px; background: #f1f5f9; border: 1px solid #e2e8f0; border-radius: 8px; }
.dash-segment a { color: #64748b; text-decoration: none; font-size: .82rem; font-weight: 750; padding: 7px 10px; border-radius: 6px; white-space: nowrap; }
.dash-segment a.active, .dash-segment a:hover { background: #fff; color: var(--accent-dark); box-shadow: 0 6px 18px rgba(15,23,42,.06); }
.chart-shell { height: 300px; min-height: 300px; }
.dashboard-balance-strip { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin-top: 16px; }
.dashboard-balance-strip div { background: #f8fafc; border: 1px solid #e6ebf2; border-radius: 8px; padding: 10px; min-width: 0; }
.dashboard-balance-strip span { display: block; color: var(--muted); font-size: .78rem; font-weight: 750; }
.dashboard-balance-strip strong { display: block; margin-top: 3px; font-size: .96rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dashboard-side-stack { display: grid; gap: 14px; align-content: stretch; }
.risk-card { border: 1px solid var(--line); border-radius: 8px; background: #fff; min-height: 128px; padding: 16px; text-align: left; box-shadow: 0 18px 45px rgba(15,23,42,.05); display: grid; align-content: space-between; transition: transform .16s ease, box-shadow .16s ease; }
.risk-card:hover { transform: translateY(-2px); box-shadow: 0 24px 52px rgba(15,23,42,.08); }
.risk-card span { width: 38px; height: 38px; border-radius: 8px; display: grid; place-items: center; }
.risk-warning span { background: #fff7e6; color: #b45309; }
.risk-danger span { background: #fff1f2; color: #be123c; }
.risk-card strong { font-size: 2rem; line-height: 1; }
.risk-card small { color: var(--muted); font-weight: 750; }
.ops-health { background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 16px; box-shadow: 0 18px 45px rgba(15,23,42,.05); }
.ops-health .progress { height: 10px; background: #e7eef7; border-radius: 999px; }
.ops-health .progress-bar { background: var(--accent); border-radius: 999px; }
.dashboard-lower-grid { display: grid; grid-template-columns: repeat(2, minmax(260px, 360px)) minmax(0, 1fr); gap: 14px; align-items: start; }
.dash-list-panel, .dash-activity-panel { min-width: 0; }
.watch-row { display: flex; justify-content: space-between; gap: 12px; align-items: center; border-top: 1px solid #eef2f7; padding: 11px 0; }
.watch-row:first-of-type { border-top: 0; }
.watch-row strong, .watch-row span { display: block; }
.watch-row span { color: var(--muted); font-size: .82rem; margin-top: 2px; }
.watch-row em { font-style: normal; background: #fff7e6; color: #92400e; border: 1px solid #fed7aa; border-radius: 999px; padding: 4px 9px; font-size: .8rem; font-weight: 850; white-space: nowrap; }
.watch-row.danger em { background: #fff1f2; color: #be123c; border-color: #fecdd3; }
.table { vertical-align: middle; }
.table thead th { color: var(--muted); text-transform: uppercase; font-size: .74rem; letter-spacing: .06em; background: #f8fafc; }
.permission-table .permission-group-row td {
    background: #eef8f7;
    color: var(--accent-dark);
    font-weight: 850;
    text-transform: uppercase;
    letter-spacing: .06em;
    font-size: .74rem;
    border-top: 1px solid #c8ece8;
    border-bottom: 1px solid #c8ece8;
}
.datatable-wrapper .datatable-top, .datatable-wrapper .datatable-bottom { padding: 0 0 12px; }
.datatable-wrapper .datatable-bottom { padding: 12px 0 0; }
.datatable-selector, .datatable-input { border: 1px solid #b8c4d5; border-radius: 8px; min-height: 38px; padding: 6px 10px; background: #fff; color: var(--ink); box-shadow: inset 0 1px 2px rgba(15,23,42,.04); }
.datatable-selector:focus, .datatable-input:focus { border-color: var(--accent); outline: 0; box-shadow: 0 0 0 .18rem rgba(14,165,164,.16); }
.datatable-pagination a { border-radius: 6px; color: var(--accent-dark); }
.datatable-pagination .datatable-active a { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn-primary { --bs-btn-bg: var(--accent); --bs-btn-border-color: var(--accent); --bs-btn-hover-bg: var(--accent-dark); --bs-btn-hover-border-color: var(--accent-dark); }
.badge-soft { background: #e7faf8; color: var(--accent-dark); border: 1px solid #b7efea; }
.auth-page { min-height: 100vh; display: grid; grid-template-columns: 1.1fr .9fr; }
.auth-art { background: linear-gradient(135deg, #111827, #0f766e); color: #fff; padding: 8vw; display: flex; flex-direction: column; justify-content: center; }
.auth-card { display: grid; place-items: center; padding: 32px; }
.auth-card form { width: min(430px, 100%); background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 28px; box-shadow: 0 22px 70px rgba(15,23,42,.12); }
.form-label { color: #344054; font-size: .86rem; font-weight: 750; margin-bottom: 6px; }
.form-control, .form-select {
    border-radius: 8px;
    min-height: 44px;
    border: 1px solid #b8c4d5;
    background-color: #fff;
    color: var(--ink);
    box-shadow: inset 0 1px 2px rgba(15,23,42,.04);
    transition: border-color .16s ease, box-shadow .16s ease, background-color .16s ease;
}
.form-control:hover, .form-select:hover { border-color: #93a4ba; }
.form-control:focus, .form-select:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 .2rem rgba(14,165,164,.16), inset 0 1px 2px rgba(15,23,42,.04);
}
.form-control::placeholder { color: #8b98aa; opacity: 1; }
.form-control:disabled, .form-control[readonly], .form-select:disabled { background-color: #eef3f8; color: #667085; border-color: #c9d3df; opacity: 1; }
textarea.form-control { min-height: 96px; line-height: 1.45; }
.form-control,
.form-select,
.datatable-input,
.datatable-selector {
    caret-color: var(--accent-dark);
}
.form-control:focus,
.form-select:focus,
.datatable-input:focus,
.datatable-selector:focus {
    color: #111827;
    background-color: #fff;
}
.input-group .form-control { border-right: 0; }
.input-group .btn { min-height: 44px; }
.form-check-input { border-color: #9aa8ba; box-shadow: 0 1px 2px rgba(15,23,42,.06); }
.form-check-input:focus { border-color: var(--accent); box-shadow: 0 0 0 .18rem rgba(14,165,164,.16); }
.form-check-input:checked { background-color: var(--accent); border-color: var(--accent); }
.modal-content { border-radius: 8px; border: 0; box-shadow: 0 28px 80px rgba(15,23,42,.22); }
.modal-header { border-bottom-color: #e2e8f0; background: #f8fafc; }
.modal-footer { border-top-color: #e2e8f0; background: #f8fafc; }
.modal-title { font-weight: 850; letter-spacing: 0; }
.panel .row.g-2, .panel .row.g-3, .modal-body.row { align-items: end; }
.report-filter .form-control, .report-filter .form-select,
.panel form .form-control, .panel form .form-select {
    background-color: #fbfdff;
}
.pos-screen { display: block; }
.pos-notice { background: #fff8dd; border: 1px solid #f4e7aa; color: #8a6a22; border-radius: 4px; padding: 16px; margin-bottom: 26px; font-weight: 700; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.pos-grid { display: grid; grid-template-columns: minmax(0, 1fr) 508px; gap: 16px; align-items: start; }
.pos-left, .pos-checkout { min-width: 0; }
.pos-searchbar { background: #fff; border-radius: 6px; padding: 20px; display: grid; grid-template-columns: 52px minmax(180px, 1fr) minmax(120px, auto) minmax(120px, auto); gap: 0; box-shadow: 0 8px 24px rgba(15,23,42,.04); }
.pos-searchbar .form-control { border-radius: 0; border-left: 0; border-right: 0; background: #fff; }
.pos-search-field { position: relative; min-width: 0; }
.pos-search-field .form-control { width: 100%; height: 100%; }
.product-search-results { position: absolute; left: 0; right: 0; top: calc(100% + 6px); z-index: 1080; background: #fff; border: 1px solid #cbd5e1; border-radius: 8px; box-shadow: 0 20px 50px rgba(15,23,42,.16); max-height: 340px; overflow-y: auto; padding: 6px; }
.product-search-option { width: 100%; border: 0; background: transparent; color: var(--ink); display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 14px; align-items: center; text-align: left; padding: 10px 12px; border-radius: 7px; }
.product-search-option:hover, .product-search-option.active { background: #e7faf8; }
.product-search-option strong, .product-search-option span { display: block; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.product-search-option small { display: block; color: var(--muted); margin-top: 2px; }
.product-search-price { font-weight: 850; color: var(--accent-dark); white-space: nowrap; }
.list-group[data-kit-search-results] {
    background: #fff;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    padding: 6px;
}
.list-group[data-kit-search-results] .list-group-item {
    background: #fff;
    color: #111827;
    border: 0;
    border-radius: 7px;
    margin-bottom: 2px;
}
.list-group[data-kit-search-results] .list-group-item:hover,
.list-group[data-kit-search-results] .list-group-item:focus {
    background: #e7faf8;
    color: #0f172a;
}
.list-group[data-kit-search-results] strong {
    color: #111827;
}
.list-group[data-kit-search-results] .text-muted {
    color: #64748b !important;
}
.square-btn { border-radius: 4px 0 0 4px; width: 52px; }
.pos-searchbar .dropdown { display: flex; min-height: 44px; }
.pos-searchbar .dropdown > .btn { height: 100%; border-radius: 0; white-space: nowrap; }
.pos-searchbar > .btn { min-height: 44px; white-space: nowrap; }
.pos-searchbar > .mode-button { height: 100%; border-radius: 0; }
.pos-searchbar .btn:last-child { border-radius: 0 4px 4px 0; }
.pos-ticket { margin-top: 8px; background: #fff; border-radius: 6px; overflow: hidden; box-shadow: 0 8px 24px rgba(15,23,42,.04); position: relative; }
.pos-ticket::after, .pos-checkout::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 8px; background: linear-gradient(135deg, transparent 6px, #fff 0) left bottom / 14px 8px repeat-x; }
.pos-table thead th { text-transform: none; letter-spacing: 0; color: #272d37; font-size: .95rem; font-weight: 500; padding: 16px 14px; }
.pos-table td { padding: 12px 14px; border-color: #e6ebf2; }
.pos-table a, .pos-table .btn-link { text-decoration: none; border-bottom: 1px dotted currentColor; }
.pos-table tr.pos-stock-warning td { background: #fff1f2; border-top-color: #fecdd3; border-bottom-color: #fecdd3; }
.pos-table tr.pos-stock-warning .pos-inline-input { background: #fff; border-bottom-color: #dc2626; color: #b91c1c; font-weight: 700; }
.pos-inline-input {
    width: 76px;
    min-height: 34px;
    border: 1px solid #a8c0dd;
    border-radius: 6px;
    color: #155b9f;
    text-align: center;
    outline: 0;
    background: #f8fbff;
    font-weight: 700;
}
.pos-inline-input:focus {
    border-color: #2563eb;
    background: #fff;
    box-shadow: 0 0 0 .16rem rgba(37,99,235,.14);
}
.pos-line-tier {
    width: min(180px, 100%);
    min-height: 30px;
    border-color: #b9cadf;
    background-color: #f8fbff;
    color: #1f3b57;
    font-size: .78rem;
}
.pos-checkout { background: #fff; border-radius: 6px; overflow: hidden; box-shadow: 0 8px 24px rgba(15,23,42,.04); position: sticky; top: 24px; }
.pos-checkout .form-control, .pos-checkout .form-select { min-height: 40px; }
.pos-checkout .form-label { font-size: .78rem; margin-bottom: 4px; }
.checkout-actions { display: flex; justify-content: flex-end; gap: 10px; padding: 16px 16px 14px; border-bottom: 1px solid #e6ebf2; }
.customer-box { display: grid; grid-template-columns: 46px 1fr; padding: 14px 16px 8px; }
.customer-box span, .customer-add-button { background: #4a9ee6; color: #fff; display: grid; place-items: center; border-radius: 4px 0 0 4px; border: 0; }
.customer-box .form-control { border-radius: 0 4px 4px 0; }
.customer-box .search-select { min-width: 0; }
.search-select { position: relative; }
.search-select-native { position: absolute !important; width: 1px !important; height: 1px !important; opacity: 0 !important; pointer-events: none !important; }
.search-select-input { border-radius: 0 4px 4px 0; }
.search-select-menu { position: absolute; z-index: 1080; left: 0; right: 0; top: calc(100% + 4px); max-height: 260px; overflow-y: auto; background: #fff; border: 1px solid #cbd5e1; border-radius: 8px; box-shadow: 0 18px 45px rgba(15, 23, 42, .14); padding: 6px; }
.search-select-menu button { width: 100%; border: 0; background: transparent; text-align: left; padding: 9px 10px; border-radius: 6px; color: var(--ink); font-weight: 650; }
.search-select-menu button:hover, .search-select-menu button:focus { background: #eaf6ff; color: var(--accent-dark); outline: 0; }
.search-select-empty { padding: 10px; color: var(--muted); font-size: .9rem; }
.checkout-compact-grid { display: grid; gap: 8px; padding: 10px 14px; border-bottom: 1px dashed #d8dee8; }
.checkout-compact-grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.checkout-compact-grid-2 { grid-template-columns: minmax(0, 1.25fr) minmax(150px, .75fr); align-items: stretch; }
.checkout-compact-grid .currency-box, .checkout-compact-grid .comment-box, .checkout-compact-grid .sale-date-box { padding: 0; border-bottom: 0; }
.checkout-compact-grid .form-select { padding-left: 8px; padding-right: 28px; font-size: .88rem; }
.discount-box { border-top: 1px solid #e6ebf2; border-bottom: 1px solid #e6ebf2; padding: 9px 14px; color: #6b7280; font-size: .86rem; }
.discount-box div, .subtotal-row { display: flex; justify-content: space-between; gap: 12px; align-items: center; }
.subtotal-row { background: #effbe8; border-bottom: 1px dashed #c9dfbf; padding: 8px 14px; font-size: .88rem; }
.subtotal-row a { text-decoration: none; }
.tax-breakdown { padding: 8px 14px; border-bottom: 1px dashed #d9e3ef; color: #5b6472; font-size: .82rem; }
.tax-breakdown div { display: flex; justify-content: space-between; gap: 12px; padding: 2px 0; }
.total-band { display: grid; grid-template-columns: 1fr 1fr; border-bottom: 1px dashed #cbd5e1; }
.total-band > div { padding: 9px 14px; min-height: 62px; }
.total-band > div:first-child { border-right: 1px dashed #cbd5e1; }
.total-band span { display: block; color: #626874; font-size: .95rem; }
.total-band strong { display: block; font-size: 1.36rem; text-align: center; font-weight: 650; }
.payment-box, .comment-box, .sale-date-box, .currency-box { padding: 11px 14px; border-bottom: 1px dashed #d8dee8; }
.sale-flat-discount {
    width: 108px;
    min-height: 34px;
    border: 1px solid #f0a6b5;
    border-radius: 6px;
    color: #b4233b;
    background: #fff7f9;
    text-align: right;
    outline: 0;
    padding: 4px 8px;
    font-weight: 700;
}
.sale-flat-discount:focus { border-color: #e85d75; background: #fff; box-shadow: 0 0 0 .16rem rgba(232,93,117,.14); }
.payment-methods { display: flex; flex-wrap: wrap; gap: 5px; }
.payment-methods .btn { border-radius: 4px; }
.notify-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-top: 10px; }
.notify-card { background: #f8fafc; border: 1px solid #e6ebf2; border-radius: 8px; padding: 8px; min-width: 0; }
.notify-card .form-check { margin-bottom: 6px; font-size: .86rem; font-weight: 700; }
.notify-card .form-select { font-size: .82rem; min-height: 36px; padding-top: 5px; padding-bottom: 5px; }
.payment-list { display: grid; gap: 6px; }
.payment-line { display: flex; justify-content: space-between; align-items: center; gap: 8px; background: #f8fafc; border: 1px solid #e6ebf2; border-radius: 6px; padding: 7px 9px; font-size: .9rem; }
.payment-line button { border: 0; background: transparent; color: #e85d75; }
.comment-box textarea.form-control { min-height: 72px; resize: vertical; }
.sale-date-box { display: grid; align-content: start; }
.complete-sale { border-radius: 0; min-height: 54px; }
.exchange-hint { margin-top: 6px; font-size: .82rem; color: #9a3412; display: none; }
.exchange-hint.show { display: block; }
.product-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; }
.product-tile { border: 1px solid #dce3ee; background: #fff; border-radius: 8px; min-height: 132px; padding: 14px; text-align: left; display: flex; flex-direction: column; justify-content: space-between; transition: .16s ease; }
.product-tile:hover { border-color: var(--accent); box-shadow: 0 14px 28px rgba(15,23,42,.08); transform: translateY(-1px); }
.product-tile span { font-weight: 800; }
.product-tile small { color: var(--muted); }
.product-tile strong { color: var(--accent-dark); }
.print-heading { display: none; }
.report-company { text-align: center; border-bottom: 1px solid #d7dce5; padding-bottom: 10px; }
.report-company h2 { font-size: 1.35rem; font-weight: 850; letter-spacing: 0; }
.report-section { margin-bottom: 18px; }
.report-filter, .report-section, .report-section .table, .report-section h6, .report-section .panel-title { color: var(--ink); }
.report-section.panel, .report-section .metric, .report-section table { background: #fff; }
.report-section .text-muted { color: var(--muted) !important; }
.report-section .panel-title { gap: 12px; flex-wrap: wrap; }
.pnl-report { overflow: hidden; }
.pnl-report-heading { padding: 6px 0 18px; border-bottom: 1px solid var(--line); }
.pnl-kpis { padding: 16px 0; }
.pnl-kpi { min-height: 92px; border: 1px solid var(--line); border-radius: 7px; padding: 12px 14px; background: #fff; display: flex; flex-direction: column; gap: 3px; }
.pnl-kpi span, .pnl-kpi small { color: var(--muted); }
.pnl-kpi strong { font-size: 1.1rem; }
.pnl-table th { font-size: .78rem; text-transform: uppercase; color: var(--muted); }
.pnl-table .pnl-section-row td { background: #eef4f7; color: #22303d; font-weight: 800; text-transform: uppercase; font-size: .76rem; letter-spacing: 0; padding-top: 9px; padding-bottom: 9px; }
.pnl-table .pnl-subtotal td { border-top: 1px solid #8898a8; font-weight: 700; }
.pnl-table .pnl-major-total td { border-top: 2px solid #354657; border-bottom: 2px solid #354657; font-weight: 800; }
.pnl-table .pnl-net-total td { background: #e9f7f1; border-top: 2px solid #18785d; border-bottom: 3px double #18785d; font-size: 1rem; font-weight: 800; }
.pnl-table .pnl-disclosure-heading td { background: #f5f7f9; color: #52606d; }
.pnl-table .pnl-disclosure-row td { background: #fbfcfd; border-bottom: 1px solid var(--line); }
.pnl-footnote { padding-top: 12px; color: var(--muted); font-size: .78rem; }
.trial-balance-report { overflow: hidden; }
.trial-report-heading { padding: 6px 0 18px; border-bottom: 1px solid var(--line); }
.trial-summary { padding: 16px 0; }
.trial-summary-item { min-height: 78px; border: 1px solid var(--line); border-radius: 7px; padding: 11px 13px; background: #fff; display: flex; flex-direction: column; gap: 5px; }
.trial-summary-item span { color: var(--muted); font-size: .78rem; }
.trial-summary-item strong { font-size: 1rem; }
.trial-balance-table { min-width: 1020px; font-size: .84rem; }
.trial-balance-table thead th { background: #edf2f6; border-color: #c8d1da; color: #273544; vertical-align: middle; }
.trial-balance-table .trial-total-row td { background: #e9f7f1; border-top: 2px solid #18785d; border-bottom: 3px double #18785d; font-weight: 800; }
.trial-control-note { padding-top: 12px; color: var(--muted); font-size: .78rem; }
.financial-disclosure { margin-top: 12px; padding: 12px 14px; border-left: 3px solid #3d7b91; background: #f4f8fa; color: #334553; font-size: .82rem; }
.financial-disclosure-title { font-weight: 800; color: #263b49; }
.financial-disclosure .row span, .financial-disclosure .row strong, .financial-disclosure .row small { display: block; }
.financial-disclosure .row span { color: #5a6874; }
.financial-disclosure .row strong { margin: 2px 0; color: #172d3b; font-size: .96rem; }
.financial-disclosure small { color: var(--muted); }
.financial-year-panel { overflow: hidden; }
.financial-year-stat { border-top: 1px solid var(--line); padding: 10px 0 2px; display: flex; flex-direction: column; gap: 2px; }
.financial-year-stat span { color: var(--muted); font-size: .78rem; }
.financial-year-stat strong { color: var(--ink); }
.report-tools .btn { white-space: nowrap; }
.report-column-menu { max-height: 320px; overflow-y: auto; min-width: 230px; }
.report-column-menu .dropdown-item { font-size: .88rem; border-radius: 6px; }
body.sidebar-hidden .app-shell { grid-template-columns: minmax(0, 1fr); min-height: 100vh; }
body.sidebar-hidden .sidebar { display: none !important; }
body.sidebar-hidden .content { width: 100%; max-width: none; padding: 20px; }
body.sidebar-hidden .pos-grid { grid-template-columns: minmax(0, 1fr) 500px; }
body.sales-full .topbar, body.sales-full .sidebar { display: none; }
body.sales-full .content { padding: 8px; }
body.sales-full .pos-screen .pos-grid { grid-template-columns: minmax(0, 1fr) 480px; }
body.dos-mode { background: #030804; color: #57ff80; font-family: "Courier New", Courier, monospace; }
body.dos-mode .panel, body.dos-mode .metric, body.dos-mode .pos-searchbar, body.dos-mode .pos-ticket, body.dos-mode .pos-checkout, body.dos-mode .topbar, body.dos-mode .user-pill { background: #050b05; border-color: #1b5f1b; box-shadow: none; color: #57ff80; }
body.dos-mode .table, body.dos-mode .table thead th, body.dos-mode .text-muted, body.dos-mode .form-label { color: #80c98f !important; }
body.dos-mode .form-control, body.dos-mode .form-select, body.dos-mode .datatable-selector, body.dos-mode .datatable-input {
    background: #071107;
    color: #57ff80;
    border-color: #249424;
    box-shadow: none;
    caret-color: #57ff80;
}
body.dos-mode .form-control:focus, body.dos-mode .form-select:focus, body.dos-mode .datatable-selector:focus, body.dos-mode .datatable-input:focus {
    border-color: #57ff80;
    box-shadow: 0 0 0 .16rem rgba(87,255,128,.18);
    background: #071107;
    color: #57ff80;
}
body.dos-mode .product-search-results,
body.dos-mode .list-group[data-kit-search-results] {
    background: #071107;
    border-color: #249424;
}
body.dos-mode .product-search-option,
body.dos-mode .list-group[data-kit-search-results] .list-group-item {
    background: #071107;
    color: #57ff80;
}
body.dos-mode .product-search-option:hover,
body.dos-mode .product-search-option.active,
body.dos-mode .list-group[data-kit-search-results] .list-group-item:hover,
body.dos-mode .list-group[data-kit-search-results] .list-group-item:focus {
    background: #103510;
    color: #baffc8;
}
body.dos-mode .list-group[data-kit-search-results] strong {
    color: #baffc8;
}

.kit-wizard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    margin-bottom: 14px;
}
.kit-wizard-header h3 {
    color: #3498db;
    font-weight: 400;
    letter-spacing: 0;
}
.kit-stepper {
    display: grid;
    grid-template-columns: repeat(5, minmax(120px, 1fr));
    gap: 0;
    background: #f8fafc;
    border: 1px solid #d8e0ea;
    padding: 6px;
    margin-bottom: 18px;
    overflow-x: auto;
}
.kit-step {
    position: relative;
    min-height: 42px;
    border: 0;
    background: #e5e7eb;
    color: #3f4652;
    font-weight: 700;
    padding: 0 28px;
    clip-path: polygon(0 0, calc(100% - 22px) 0, 100% 50%, calc(100% - 22px) 100%, 0 100%, 22px 50%);
}
.kit-step:first-child {
    clip-path: polygon(0 0, calc(100% - 22px) 0, 100% 50%, calc(100% - 22px) 100%, 0 100%);
}
.kit-step.active {
    background: #459fe3;
    color: #fff;
}
.kit-section-title {
    display: flex;
    align-items: center;
    gap: 6px;
    color: #3f4652;
    font-size: 1rem;
    font-weight: 800;
    border-bottom: 1px solid #e5e7eb;
    padding-bottom: 12px;
    margin-bottom: 10px;
}
.kit-section-title small {
    font-size: .72rem;
    font-weight: 600;
    color: #667085;
}
.kit-step-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 24px;
}
.kit-empty-step {
    min-height: 260px;
    display: grid;
    place-items: center;
    align-content: center;
    gap: 8px;
    color: #667085;
    text-align: center;
}
.kit-empty-step i {
    font-size: 2.4rem;
    color: #459fe3;
}
@media (max-width: 900px) {
    .kit-wizard-header { align-items: flex-start; }
    .kit-stepper { grid-template-columns: repeat(5, minmax(150px, 1fr)); }
}
.ui-recover {
    position: fixed;
    right: 14px;
    bottom: 14px;
    z-index: 2000;
    display: none;
    gap: 8px;
}
body.dos-mode .ui-recover,
body.sales-full .ui-recover,
body.sidebar-hidden .ui-recover { display: flex; }
body.dos-mode .ui-recover {
    left: 10px;
    right: auto;
    top: 10px;
    bottom: auto;
    background: #0b1b0b;
    border: 1px solid #27b527;
    padding: 6px;
    border-radius: 6px;
}
body.dos-mode .ui-recover .btn {
    background: #031003;
    color: #7cff7c;
    border-color: #27b527;
}
@media (max-width: 1280px) {
    .dashboard-today-grid { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
    .dashboard-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .dashboard-main-grid { grid-template-columns: 1fr; }
    .dashboard-side-stack { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .dashboard-lower-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .dash-activity-panel { grid-column: 1 / -1; }
}
@media (max-width: 720px) {
    .dashboard-hero { align-items: stretch; flex-direction: column; padding: 16px; }
    .dashboard-actions { justify-content: stretch; }
    .dashboard-actions .btn { flex: 1 1 150px; }
    .dashboard-today-grid, .dashboard-kpis, .dashboard-side-stack, .dashboard-lower-grid, .dashboard-balance-strip { grid-template-columns: 1fr; }
    .dash-kpi { min-height: 138px; }
    .panel-head { flex-direction: column; align-items: stretch; }
    .panel-head.compact { align-items: stretch; }
    .dash-segment { width: 100%; justify-content: space-between; }
    .dash-segment a { flex: 1; text-align: center; }
    .chart-shell { height: 240px; min-height: 240px; }
}
@media (max-width: 920px) {
    .app-shell { grid-template-columns: 1fr; }
    .sidebar { position: fixed; inset: 0 auto 0 0; z-index: 1040; width: min(86vw, 310px); transform: translateX(0); transition: transform .18s ease; box-shadow: 20px 0 50px rgba(15,23,42,.22); }
    .sidebar .nav { display: flex; flex-direction: column; }
    body.sidebar-hidden .sidebar { display: flex !important; transform: translateX(-105%); pointer-events: none; }
    body:not(.sidebar-hidden)::after { content: ""; position: fixed; inset: 0; background: rgba(15, 23, 42, .42); z-index: 1030; }
    body:not(.sidebar-hidden) .mobile-menu-fab { display: none; }
    .content { padding: 18px; }
    .topbar { align-items: flex-start; flex-direction: column; }
    .topbar-tools { width: 100%; justify-content: flex-start; flex-wrap: wrap; gap: 8px; }
    .topbar-tools .form-select { max-width: 100%; }
    .user-pill { max-width: 100%; padding: 8px 11px; }
    .auth-page { grid-template-columns: 1fr; }
    .auth-art { min-height: 280px; padding: 36px; }
    .pos-grid { grid-template-columns: 1fr; }
    body.sidebar-hidden .pos-grid { grid-template-columns: 1fr; }
    .pos-checkout { position: static; }
    .checkout-compact-grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .pos-searchbar { grid-template-columns: 48px 1fr; }
    .pos-searchbar .btn, .pos-searchbar .dropdown { grid-column: span 1; border-radius: 4px; margin-top: 8px; }
    .pos-notice { align-items: flex-start; flex-direction: column; }
    body.sidebar-hidden .ui-recover { display: none; }
}
@media (max-width: 620px) {
    .checkout-compact-grid-3, .checkout-compact-grid-2, .notify-grid { grid-template-columns: 1fr; }
}
@media (max-width: 768px) {
    body { overflow-x: hidden; }
    .content { padding: 14px; }
    .topbar h1 { font-size: 1.45rem; line-height: 1.15; overflow-wrap: anywhere; }
    .eyebrow { font-size: .68rem; }
    .topbar-tools > * { flex: 0 1 auto; }
    .topbar-tools .badge,
    .topbar-tools .user-pill,
    .topbar-tools form { max-width: 100%; }
    .topbar-tools .btn { min-width: 40px; min-height: 38px; }
    .mobile-menu-fab { left: 12px; top: 12px; }
    .panel { padding: 14px; }
    .panel-title, .panel-head { gap: 10px; }
    .panel-title.d-flex,
    .panel-head { flex-wrap: wrap; }
    .report-filter { align-items: stretch !important; }
    .report-filter > div,
    .report-filter > button,
    .report-filter > .btn { width: 100%; margin-left: 0 !important; }
    .table-responsive { overflow-x: auto; -webkit-overflow-scrolling: touch; }
    .table { min-width: 680px; }
    .table.permission-table { min-width: 760px; }
    .datatable-wrapper .datatable-top,
    .datatable-wrapper .datatable-bottom {
        display: grid;
        grid-template-columns: 1fr;
        gap: 10px;
    }
    .datatable-dropdown,
    .datatable-search,
    .datatable-input,
    .datatable-selector { width: 100%; }
    .datatable-pagination ul { flex-wrap: wrap; justify-content: flex-start; }
    .modal-dialog { margin: .75rem; }
    .modal-dialog.modal-lg,
    .modal-dialog.modal-xl { max-width: calc(100vw - 1.5rem); }
    .modal-body.row > [class*="col-"] { width: 100%; }
    .auth-card { padding: 18px; }
    .auth-card form { padding: 22px; }
    .auth-art { padding: 28px 18px; min-height: 220px; }
    .dashboard-hero h2 { font-size: 1.28rem; }
    .today-card,
    .dash-kpi { padding: 14px; }
    .today-card { min-height: 104px; }
    .today-card span { width: 42px; height: 42px; }
    .today-card strong,
    .dash-kpi strong { font-size: 1.35rem; overflow-wrap: anywhere; }
    .dashboard-chart-panel { padding: 14px; }
    .chart-shell { height: 220px; min-height: 220px; }
    .watch-row { align-items: flex-start; }

    .pos-notice { margin-bottom: 14px; padding: 12px; }
    .pos-searchbar {
        padding: 12px;
        grid-template-columns: 44px minmax(0, 1fr);
        gap: 8px;
    }
    .pos-searchbar .form-control {
        border: 1px solid #b8c4d5;
        border-radius: 4px;
    }
    .pos-searchbar .square-btn {
        width: 44px;
        border-radius: 4px;
    }
    .pos-searchbar > .mode-button,
    .pos-searchbar > .btn:not(.square-btn),
    .pos-searchbar .dropdown {
        grid-column: span 1;
        width: 100%;
        margin-top: 0;
        min-height: 42px;
    }
    .pos-searchbar .btn i { margin-right: 0 !important; }
    .pos-searchbar .btn span,
    .pos-searchbar > .btn:not(.mode-button):not(.square-btn) { font-size: .9rem; }
    .product-search-results {
        position: fixed;
        left: 12px;
        right: 12px;
        top: auto;
        max-height: min(52vh, 360px);
        z-index: 2050;
    }
    .product-search-option { grid-template-columns: 1fr; gap: 4px; }
    .product-search-price { white-space: normal; }
    .pos-ticket { overflow-x: auto; -webkit-overflow-scrolling: touch; }
    .pos-table { min-width: 620px; }
    .pos-table thead th,
    .pos-table td { padding: 10px 9px; }
    .pos-inline-input { width: 68px; }
    .checkout-actions {
        justify-content: stretch;
        padding: 12px;
    }
    .checkout-actions .btn { flex: 1 1 auto; }
    .customer-box {
        grid-template-columns: 42px 1fr;
        padding: 12px 12px 6px;
    }
    .discount-box div,
    .subtotal-row,
    .tax-breakdown div,
    .payment-line { align-items: flex-start; }
    .total-band { grid-template-columns: 1fr; }
    .total-band > div:first-child { border-right: 0; border-bottom: 1px dashed #cbd5e1; }
    .total-band strong { text-align: left; }
    .payment-methods .btn { flex: 1 1 calc(50% - 5px); }
    .payment-box .input-group { display: grid; grid-template-columns: 1fr; }
    .payment-box .input-group .form-control,
    .payment-box .input-group .btn {
        width: 100%;
        border-radius: 8px !important;
        border: 1px solid #b8c4d5;
    }
    .payment-box .input-group .btn { margin-top: 8px; }
    .complete-sale { position: sticky; bottom: 0; z-index: 10; }
    .product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
    .product-tile { min-height: 118px; padding: 12px; }
    .kit-wizard-header { flex-direction: column; align-items: stretch; }
    .kit-stepper { grid-template-columns: repeat(5, minmax(135px, 1fr)); }
}
.transfer-request-approval-list {
    max-height: 70vh;
    overflow-y: auto;
}
.transfer-request-approval-list table {
    margin-bottom: 0;
}
@media (max-width: 420px) {
    .content { padding: 10px; }
    .sidebar { width: min(90vw, 300px); padding: 18px 14px; }
    .mobile-menu-fab { left: 10px; top: 10px; min-height: 42px; padding: 8px 12px; }
    .brand { font-size: 1.05rem; margin-bottom: 18px; }
    .sidebar .nav-link { padding: 10px; }
    .topbar-tools { gap: 6px; }
    .topbar-tools .badge { width: 100%; justify-content: flex-start; }
    .pos-searchbar { grid-template-columns: 40px minmax(0, 1fr); padding: 10px; }
    .pos-searchbar .square-btn { width: 40px; }
    .pos-searchbar > .mode-button,
    .pos-searchbar > .btn:not(.square-btn) { grid-column: 1 / -1; }
    .payment-methods .btn { flex-basis: 100%; }
    .product-grid { grid-template-columns: 1fr; }
    .metric,
    .today-card,
    .dash-kpi,
    .panel { border-radius: 7px; }
}
@media print {
    @page { margin: 10mm; }
    html, body { background: #fff !important; color: #111827 !important; font-size: 11px; -webkit-print-color-adjust: economy; print-color-adjust: economy; }
    *, *::before, *::after { text-shadow: none !important; box-shadow: none !important; background-image: none !important; filter: none !important; opacity: 1 !important; }
    body *, .table * { color: #111827 !important; }
    body::before, body::after, .app-shell::before, .app-shell::after, .content::before, .content::after, .dash-kpi::after, .pos-ticket::after, .pos-checkout::after { content: none !important; display: none !important; background: transparent !important; }
    .panel, .metric, .table, .table th, .table td, .print-heading, .report-section, .content, .app-shell { background: #fff !important; }
    .sidebar, .topbar, .report-filter, .report-tools, .datatable-top, .datatable-bottom, .btn, .modal, .modal-backdrop, .offcanvas-backdrop, .ui-recover, .mobile-menu-fab { display: none !important; }
    .app-shell { display: block; }
    .content { padding: 0; }
    .print-heading { display: block; }
    .metric, .panel { box-shadow: none; border: 1px solid #d7dce5; break-inside: avoid; }
    .metric { min-height: auto; padding: 10px; }
    .metric strong { font-size: 1rem; }
    .report-section { break-inside: avoid; page-break-inside: avoid; margin-bottom: 12px; }
    [data-report-section$="-chart"] { display: none !important; }
    body[data-print-report] .report-section { display: none !important; }
    body[data-print-report="sales-chart"] [data-report-section="sales-chart"],
    body[data-print-report="summary"] [data-report-section="summary"],
    body[data-print-report="sales"] [data-report-section="sales"],
    body[data-print-report="purchases"] [data-report-section="purchases"],
    body[data-print-report="product-requests"] [data-report-section="product-requests"],
    body[data-print-report="customers"] [data-report-section="customers"],
    body[data-print-report="customers-summary"] [data-report-section="customers-summary"],
    body[data-print-report="suppliers"] [data-report-section="suppliers"],
    body[data-print-report="suppliers-summary"] [data-report-section="suppliers-summary"],
    body[data-print-report="expenses"] [data-report-section="expenses"],
    body[data-print-report="inventory"] [data-report-section="inventory"],
    body[data-print-report="product-expiry"] [data-report-section="product-expiry"],
    body[data-print-report="low-stock"] [data-report-section="low-stock"],
    body[data-print-report="near-expiry"] [data-report-section="near-expiry"],
    body[data-print-report="bank-balances"] [data-report-section="bank-balances"],
    body[data-print-report="customer-balances"] [data-report-section="customer-balances"],
    body[data-print-report="supplier-balances"] [data-report-section="supplier-balances"],
    body[data-print-report="trial-balance"] [data-report-section="trial-balance"],
    body[data-print-report="balance-sheet"] [data-report-section="balance-sheet"],
    body[data-print-report="ledger"] [data-report-section="ledger"] { display: block !important; }
    body[data-print-report$="-chart"] [data-report-section$="-chart"] { display: block !important; }
    body[data-print-report$="-chart"] canvas { display: block !important; }
    .table { font-size: 10px; }
    .table th, .table td { border-color: #9ca3af !important; }
    .table thead th, .table tfoot td { background: #f3f4f6 !important; font-weight: 700; }
    canvas { max-height: 220px !important; }
    body:not([data-print-report$="-chart"]) canvas { display: none !important; }
}
