:root {
    --sidebar: 238px;
    --top: 54px;
    --status: 27px;
    --bg: #f3f5f8;
    --panel: #fff;
    --text: #263448;
    --muted: #8390a0;
    --line: #e5e9ef;
    --blue: #3978ed;
    --nav: #192637;
    --green: #20a675;
    --radius: 5px
}

* {
    box-sizing: border-box
}

body {
    margin: 0;
    font-family: Inter, "Segoe UI", Arial, sans-serif;
    font-size: 12px;
    color: var(--text);
    background: var(--bg)
}

button,
input,
select {
    font: inherit
}

button,
a,
input,
select {
    outline-offset: 3px
}

button {
    cursor: pointer
}

a {
    text-decoration: none
}

button {
    color: inherit
}

button:disabled {
    opacity: .45;
    cursor: default
}

.bi {
    font-size: 15px
}

.topbar {
    height: var(--top);
    position: fixed;
    inset: 0 0 auto;
    display: flex;
    align-items: center;
    background: var(--panel);
    border-bottom: 1px solid var(--line);
    z-index: 30
}

.brand {
    width: var(--sidebar);
    padding: 0 20px;
    display: flex;
    gap: 10px;
    align-items: center;
    font-size: 17px;
    font-weight: 700;
    letter-spacing: -.5px
}

.brand-mark {
    display: grid;
    place-items: center;
    width: 29px;
    height: 29px;
    background: var(--blue);
    color: #fff;
    border-radius: 6px
}

.brand-mark .bi {
    font-size: 20px
}

.top-actions {
    display: flex;
    align-items: center;
    gap: 4px;
    padding-left: 17px
}

.toolbar-button,
.icon-button {
    border: 0;
    background: transparent;
    border-radius: 4px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: 7px 10px;
    font-size: 11px;
    font-weight: 500;
    white-space: nowrap
}

.toolbar-button:hover,
.icon-button:hover {
    background: var(--bg)
}

.top-actions .bi {
    color: var(--muted)
}

.top-right {
    display: flex;
    align-items: center;
    gap: 9px;
    margin-left: auto;
    padding-right: 20px
}

.separator {
    height: 23px;
    width: 1px;
    background: var(--line);
    margin: 0 5px
}

.avatar {
    width: 29px;
    height: 29px;
    display: grid;
    place-items: center;
    background: #e8eefb;
    border-radius: 50%;
    font-size: 10px;
    font-weight: 700;
    color: #4772b9
}

.user-label {
    font-size: 11px
}

.user-label small {
    display: block;
    color: var(--muted);
    font-size: 10px
}

.notification-dot {
    width: 5px;
    height: 5px;
    position: absolute;
    background: #f07765;
    border: 1px solid white;
    border-radius: 50%;
    top: 5px;
    right: 8px
}

.sidebar {
    position: fixed;
    top: var(--top);
    bottom: var(--status);
    width: var(--sidebar);
    background: var(--nav);
    color: #a7b4c7;
    display: flex;
    flex-direction: column;
    z-index: 25;
    transition: width .15s
}

.company {
    margin: 17px 14px 14px;
    padding: 11px 10px;
    border: 1px solid #344052;
    border-radius: 5px;
    display: flex;
    align-items: center;
    gap: 10px
}

.company-icon {
    background: #2c3b4f;
    padding: 7px;
    border-radius: 4px;
    color: #d8e0ec
}

.company strong {
    color: #e5ebf4;
    font-size: 11px;
    display: block
}

.company small {
    font-size: 10px;
    color: #8391a6
}

.company>.bi {
    margin-left: auto;
    font-size: 10px
}

.navigation {
    padding: 0 11px;
    overflow-y: auto;
    flex: 1;
    scrollbar-width: thin;
    scrollbar-color: #344052 transparent
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 11px;
    color: #aebacc;
    background: transparent;
    border: 0;
    width: 100%;
    padding: 8px 12px;
    border-radius: 4px;
    font-size: 11px;
    text-align: left;
    min-height: 33px
}

.nav-item:hover {
    background: #26354a;
    color: white
}

.nav-item.active {
    background: #111b28;
    color: #fff
}

.nav-item .badge {
    margin-left: auto;
    font-size: 9px;
    background: #344156;
    font-weight: 500;
    color: #c9d3e1
}

.nav-item.active .badge {
    background: #ffffff25
}

.nav-group {
    margin-top: 15px
}

.group-label {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border: 0;
    background: none;
    color: #71829b;
    letter-spacing: 1.15px;
    font-weight: 600;
    font-size: 9px;
    padding: 0 12px 6px;
    text-align: left
}

.group-label .bi {
    font-size: 9px
}

.sidebar-bottom {
    padding: 11px 15px;
    border-top: 1px solid #2b384b;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 10px
}

.sidebar-bottom button {
    color: #a9b8cb
}

.sidebar-bottom .online-dot {
    margin-right: 5px
}

.online-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    display: inline-block;
    background: var(--green)
}

.main {
    position: fixed;
    top: var(--top);
    left: var(--sidebar);
    right: 0;
    bottom: var(--status);
    display: flex;
    flex-direction: column;
    transition: left .15s
}

.workspace {
    overflow: auto;
    padding: 22px 25px 16px;
    flex: 1
}

.page-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    gap: 12px
}

.eyebrow {
    font-size: 10px;
    color: var(--muted);
    margin-bottom: 5px
}

.eyebrow span {
    margin: 0 7px
}

h1 {
    font-size: 23px;
    font-weight: 650;
    letter-spacing: -.65px;
    margin: 0 0 6px
}

h2 {
    font-size: 12px;
    font-weight: 650;
    margin: 0
}

p {
    margin: 0
}

.subtitle {
    font-size: 11px;
    color: var(--muted)
}

.heading-actions {
    display: flex;
    gap: 8px;
    align-items: center
}

.btn {
    font-size: 11px;
    border-radius: 4px;
    padding: 7px 11px;
    display: inline-flex;
    gap: 7px;
    align-items: center;
    justify-content: center;
    font-weight: 500
}

.btn .bi {
    font-size: 12px
}

.btn-primary {
    background: var(--blue);
    border-color: var(--blue)
}

.btn-light {
    background: var(--panel);
    border-color: #dfe5ed;
    color: #536176
}

.kpi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 12px;
    margin-bottom: 17px
}

.kpi {
    padding: 14px 15px 11px;
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: var(--radius)
}

.kpi-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: #68788c;
    font-size: 10px
}

.kpi-icon {
    display: grid;
    place-items: center;
    width: 26px;
    height: 26px;
    background: #ecf2ff;
    color: #5483e1;
    border-radius: 5px
}

.kpi:nth-child(2) .kpi-icon {
    background: #f2edff;
    color: #9673d6
}

.kpi:nth-child(3) .kpi-icon {
    background: #fff3e7;
    color: #d7a059
}

.kpi:nth-child(4) .kpi-icon {
    background: #e9f7f2;
    color: #4baf8d
}

.kpi:nth-child(5) .kpi-icon {
    background: #edf2ff;
    color: #728dde
}

.kpi:nth-child(6) .kpi-icon {
    background: #fceef2;
    color: #c37b94
}

.kpi-value {
    font-size: 13px;
    font-weight: 650;
    letter-spacing: -.7px;
    margin: 8px 0 6px;
    font-variant-numeric: tabular-nums
}

.kpi-foot {
    font-size: 9px;
    color: #92a0b0;
    white-space: nowrap
}

.trend {
    color: var(--green);
    margin-right: 4px;
    font-weight: 600
}

.trend .bi {
    font-size: 10px
}

.panel {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--panel);
    overflow: hidden
}

.panel-head {
    min-height: 48px;
    padding: 12px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    border-bottom: 1px solid var(--line)
}

.panel-head .sub {
    font-size: 10px;
    color: var(--muted);
    margin-top: 4px
}

.panel-link {
    border: 0;
    background: none;
    color: var(--blue);
    font-size: 10px;
    display: flex;
    gap: 7px;
    align-items: center
}

.panel-link .bi {
    font-size: 11px
}

.chart-row {
    display: grid;
    grid-template-columns: 1.95fr 1fr;
    gap: 17px;
    margin-bottom: 17px
}

.chart-legend {
    display: flex;
    align-items: center;
    gap: 16px;
    color: #7a8798;
    font-size: 10px
}

.legend-dot {
    height: 7px;
    width: 7px;
    display: inline-block;
    border-radius: 50%;
    margin-right: 5px;
    background: var(--blue)
}

.legend-dot.purple {
    background: #a3adca
}

.segment {
    display: flex;
    border: 1px solid var(--line);
    border-radius: 4px;
    padding: 2px;
    gap: 2px
}

.segment button {
    border: 0;
    background: transparent;
    padding: 4px 8px;
    font-size: 9px;
    color: #8290a2;
    border-radius: 3px
}

.segment button.active {
    color: var(--blue);
    background: #edf3ff
}

.chart-container {
    padding: 17px 17px 2px;
    height: 218px;
    position: relative
}

.sales-chart {
    width: 100%;
    height: 100%;
    overflow: visible
}

.sales-chart text {
    font-size: 10px;
    fill: #92a0b1
}

.chart-grid {
    stroke: #e9edf3;
    stroke-dasharray: 3 4
}

.chart-total {
    padding: 11px 17px 13px;
    border-top: 1px solid var(--line);
    display: flex;
    gap: 27px
}

.chart-total span {
    font-size: 10px;
    color: var(--muted)
}

.chart-total strong {
    margin-left: 8px;
    font-size: 11px;
    font-weight: 600
}

.stock-body {
    padding: 19px 18px 14px;
    display: flex;
    align-items: center;
    gap: 24px;
    justify-content: center
}

.donut {
    width: 136px;
    height: 136px;
    flex-shrink: 0;
    border-radius: 50%;
    background: conic-gradient(#477eed 0 77%, #f4b756 77% 89%, #e47b80 89% 95%, #9b8bd4 95% 100%);
    display: grid;
    place-items: center;
    transform: rotate(-90deg)
}

.donut-hole {
    width: 111px;
    height: 111px;
    border-radius: 50%;
    background: var(--panel);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transform: rotate(90deg)
}

.donut-hole strong {
    font-size: 24px;
    letter-spacing: -.7px
}

.donut-hole span {
    color: var(--muted);
    font-size: 9px
}

.stock-legend {
    flex: 1;
    max-width: 175px
}

.stock-legend p {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 10px;
    margin: 15px 0
}

.stock-legend p span {
    color: #7b889a
}

.stock-legend i {
    width: 6px;
    height: 6px;
    display: inline-block;
    margin-right: 7px;
    border-radius: 50%;
    background: #477eed
}

.stock-legend p:nth-child(2) i {
    background: #f4b756
}

.stock-legend p:nth-child(3) i {
    background: #e47b80
}

.stock-legend p:nth-child(4) i {
    background: #9b8bd4
}

.stock-alert {
    background: #fffbf1;
    border: 1px solid #f5eaca;
    border-radius: 4px;
    margin: 2px 17px 14px;
    padding: 9px 10px;
    font-size: 10px;
    color: #aa8946;
    display: flex;
    align-items: center;
    gap: 7px
}

.stock-alert button {
    margin-left: auto;
    background: none;
    border: 0;
    color: #a7863d;
    font-size: 10px
}

.table-wrap {
    overflow: auto
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    white-space: nowrap;
    font-size: 10px
}

.data-table th {
    background: #f8fafc;
    color: #8190a2;
    font-size: 9px;
    font-weight: 500;
    padding: 10px 15px;
    border-bottom: 1px solid var(--line);
    text-align: left
}

.data-table td {
    padding: 10px 15px;
    border-bottom: 1px solid #eef1f5;
    color: #627086;
    height: 40px;
    font-variant-numeric: tabular-nums
}

.data-table tbody tr:last-child td {
    border-bottom: 0
}

.data-table tbody tr:hover {
    background: #f7faff
}

.data-table tbody tr.selected {
    background: #edf4ff
}

.data-table th button {
    border: 0;
    background: none;
    color: inherit;
    padding: 0
}

.data-table .name {
    font-weight: 550;
    color: #36445a
}

.data-table .link {
    color: #5183d5;
    font-weight: 500
}

.data-table .num {
    text-align: right
}

.data-table .danger {
    color: #dc7979
}

.badge-status {
    padding: 3px 7px;
    border-radius: 4px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 9px;
    font-weight: 500;
    background: #eaf6f0;
    color: #38a479
}

.badge-status:before {
    content: "";
    width: 4px;
    height: 4px;
    background: currentColor;
    border-radius: 50%
}

.badge-status.warning {
    background: #fff5e4;
    color: #cb9a47
}

.badge-status.danger {
    background: #fdefef;
    color: #d97777
}

.badge-status.purple {
    background: #f2eefb;
    color: #9176c0
}

.table-footer {
    border-top: 1px solid var(--line);
    padding: 10px 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--muted);
    font-size: 9px
}

.pagination-controls {
    display: flex;
    align-items: center;
    gap: 4px
}

.pagination-controls button {
    height: 23px;
    min-width: 23px;
    border: 1px solid var(--line);
    background: var(--panel);
    border-radius: 3px;
    font-size: 10px
}

.pagination-controls button.active {
    background: #edf3ff;
    color: var(--blue);
    border-color: #d6e3fc
}

.recent-panel {
    margin-bottom: 17px
}

.lower-row {
    display: grid;
    grid-template-columns: 1.12fr 1fr;
    gap: 17px
}

.lower-row .data-table td,
.lower-row .data-table th {
    padding-left: 12px;
    padding-right: 12px
}

.count-badge {
    font-size: 9px;
    font-weight: 500;
    color: #c59848;
    background: #fff5e5;
    padding: 2px 6px;
    margin-left: 6px;
    border-radius: 4px
}

.product-cell {
    display: flex;
    align-items: center;
    gap: 9px
}

.product-thumb {
    width: 28px;
    height: 29px;
    display: grid;
    place-items: center;
    background: #f3f0e9;
    color: #a99a77;
    border-radius: 4px
}

.product-thumb .bi {
    font-size: 18px
}

.product-cell small {
    display: block;
    font-size: 9px;
    color: #9ba5b3;
    margin-top: 2px
}

.workspace-foot {
    display: flex;
    justify-content: space-between;
    color: #98a4b4;
    font-size: 9px;
    padding-top: 14px
}

.statusbar {
    position: fixed;
    bottom: 0;
    height: var(--status);
    left: 0;
    right: 0;
    background: var(--panel);
    border-top: 1px solid var(--line);
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 0 17px;
    color: #8592a3;
    font-size: 9px;
    z-index: 40
}

.statusbar .status-right {
    margin-left: auto;
    display: flex;
    gap: 20px
}

.statusbar .bi {
    font-size: 10px;
    margin-right: 4px
}

.statusbar .online-dot {
    margin-right: 5px
}

.filters {
    display: flex;
    gap: 10px;
    align-items: center;
    padding: 14px 16px;
    border-bottom: 1px solid var(--line)
}

.form-control,
.form-select {
    font-size: 11px;
    border-radius: 4px;
    border-color: #dfe5ed;
    padding: 7px 10px;
    color: var(--text);
    background-color: var(--panel)
}

.filters .form-select {
    width: 145px
}

.search-field {
    position: relative;
    max-width: 290px;
    flex: 1
}

.search-field>.bi {
    position: absolute;
    top: 8px;
    left: 10px;
    color: var(--muted);
    font-size: 13px
}

.search-field input {
    padding-left: 31px
}

.filters .filter-summary {
    margin-left: auto;
    font-size: 10px;
    color: var(--muted)
}

input[type=checkbox] {
    accent-color: var(--blue);
    width: 13px;
    height: 13px
}

.row-actions {
    display: flex;
    gap: 2px
}

.row-actions .icon-button {
    padding: 3px 5px
}

.row-actions .bi {
    font-size: 12px
}

.modal-content {
    border-radius: 6px;
    border: 1px solid #d9e0ea;
    box-shadow: 0 15px 60px #15233b26;
    background: var(--panel)
}

.modal-header {
    padding: 14px 20px;
    background: var(--bg)
}

.modal-title {
    font-size: 14px;
    font-weight: 600
}

.modal-body {
    padding: 18px 20px
}

.modal-footer {
    padding: 11px 20px;
    background: var(--bg)
}

.form-section {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: .8px;
    color: #8391a3;
    border-bottom: 1px solid var(--line);
    padding-bottom: 8px;
    margin-bottom: 12px;
    margin-top: 16px
}

.form-section:first-child {
    margin-top: 0
}

.form-label {
    font-size: 10px;
    font-weight: 500;
    margin-bottom: 5px
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px
}

.field-wide {
    grid-column: span 2
}

.dropdown-menu {
    font-size: 11px;
    border-color: var(--line);
    box-shadow: 0 5px 18px #20304712;
    border-radius: 5px;
    padding: 5px;
    min-width: 190px;
    background: var(--panel)
}

.dropdown-item {
    padding: 8px;
    border-radius: 3px;
    font-size: 11px;
    color: var(--text)
}

.dropdown-item .bi {
    margin-right: 8px;
    font-size: 13px
}

.dropdown-item kbd {
    float: right;
    margin-left: 20px;
    font-size: 9px;
    background: var(--bg);
    color: var(--muted)
}

.dropdown-header {
    font-size: 10px
}

.toast-container {
    z-index: 2000;
    margin-bottom: 25px
}

.toast {
    background: var(--panel);
    font-size: 12px;
    border: 1px solid var(--line)
}

.context-menu {
    position: fixed;
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 4px;
    z-index: 100;
    box-shadow: 0 5px 20px #15233b20;
    padding: 5px;
    min-width: 150px
}

.context-menu button {
    display: block;
    border: 0;
    background: none;
    padding: 8px;
    width: 100%;
    text-align: left
}

.context-menu button:hover {
    background: var(--bg)
}

.collapsed {
    --sidebar: 62px
}

.collapsed .brand {
    padding: 0 16px
}

.collapsed .brand-text,
.collapsed .company,
.collapsed .nav-text,
.collapsed .nav-item .badge,
.collapsed .group-label,
.collapsed .sidebar-bottom span {
    display: none
}

.collapsed .navigation {
    padding: 15px 8px
}

.collapsed .nav-item {
    justify-content: center;
    padding: 9px
}

.collapsed .nav-group {
    margin-top: 8px
}

.collapsed .sidebar-bottom {
    padding: 10px;
    justify-content: center
}

.empty-state {
    padding: 50px;
    text-align: center;
    color: var(--muted)
}

.detail-stats {
    display: flex;
    gap: 15px;
    margin: 18px 0
}

.detail-stats>div {
    flex: 1;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 4px
}

.detail-stats strong {
    display: block;
    font-size: 20px;
    margin-top: 6px
}

.dark {
    --bg: #1b2635;
    --panel: #222f40;
    --text: #d2dceb;
    --muted: #8c9aaf;
    --line: #354255
}

.dark .dark .data-table th {
    background: #202c3d
}

.dark .data-table td {
    color: #aab7cb;
    border-color: var(--line)
}

.dark .data-table .name {
    color: #e1e9f6
}

.dark .data-table tbody tr:hover {
    background: #2a3a50
}

.dark .donut-hole {
    background: var(--panel)
}

.dark .stock-alert {
    background: #3b3427;
    border-color: #544632
}

.dark .kpi-icon {
    background: #34435a
}

.dark .btn-light {
    color: #d0dcec;
    border-color: var(--line)
}

.dark .data-table tbody tr.selected {
    background: #2a405c
}

.dark .chart-grid {
    stroke: #3a4657
}

@media(min-width:1650px) {
    .workspace {
        padding: 25px 30px
    }

    .kpi {
        padding: 18px
    }

    .chart-container {
        height: 255px
    }

    .data-table td {
        height: 44px;
        padding-top: 12px;
        padding-bottom: 12px
    }

    .navigation .nav-item {
        padding-top: 9px;
        padding-bottom: 9px
    }
}

@media(max-width:1200px) {
    :root {
        --sidebar: 214px
    }

    .workspace {
        padding: 18px
    }

    .kpi-grid {
        gap: 8px
    }

    .kpi {
        padding: 11px
    }

    .kpi-value {
        font-size: 20px
    }

    .kpi-foot {
        font-size: 8px
    }

    .stock-body {
        gap: 12px;
        padding: 19px 13px
    }

    .donut {
        width: 115px;
        height: 115px
    }

    .donut-hole {
        width: 94px;
        height: 94px
    }

    .top-actions {
        gap: 0;
        padding-left: 5px
    }

    .toolbar-button {
        padding: 7px
    }

    .lower-row {
        grid-template-columns: 1fr
    }

    .chart-legend {
        gap: 8px
    }

    .filters {
        flex-wrap: wrap
    }
}

@media(max-width:950px) {

    .brand-text,
    .top-actions .toolbar-button span,
    .user-label {
        display: none
    }

    .brand {
        width: 62px;
        padding-left: 17px
    }

    .kpi-grid {
        grid-template-columns: repeat(3, 1fr)
    }

    .chart-row {
        grid-template-columns: 1fr
    }

    .chart-container {
        height: 230px
    }

    .stock-body {
        justify-content: flex-start
    }

    .stock-legend {
        max-width: none
    }

    .lower-row {
        grid-template-columns: 1fr
    }

    .heading-actions {
        flex-wrap: wrap;
        justify-content: end
    }

    .page-heading {
        align-items: flex-start
    }

    .sidebar {
        width: 62px
    }

    .sidebar .company,
    .sidebar .nav-text,
    .sidebar .badge,
    .sidebar .group-label,
    .sidebar-bottom span {
        display: none
    }

    .navigation {
        padding: 15px 8px
    }

    .nav-item {
        justify-content: center;
        padding: 9px
    }

    .main {
        left: 62px
    }

    .sidebar-bottom {
        padding: 10px
    }

    .statusbar {
        gap: 10px
    }

    .statusbar .status-right span:first-child {
        display: none
    }
}

@media(max-width:600px) {
    .top-right {
        gap: 2px;
        padding-right: 8px
    }

    .top-actions {
        display: none
    }

    .top-right .separator {
        display: none
    }

    .workspace {
        padding: 12px
    }

    .kpi-grid {
        grid-template-columns: repeat(2, 1fr)
    }

    .page-heading {
        flex-direction: column
    }

    .chart-legend {
        display: none
    }

    .heading-actions {
        justify-content: start
    }

    .statusbar>span:nth-child(n+2) {
        display: none
    }

    .form-grid {
        grid-template-columns: 1fr 1fr
    }

    .filters .form-select {
        width: 130px
    }

    .workspace-foot {
        gap: 15px
    }

    .status-right {
        gap: 8px !important
    }
}

@media print {

    .topbar,
    .sidebar,
    .statusbar,
    .heading-actions,
    .filters,
    .row-actions,
    .workspace-foot {
        display: none !important
    }

    .main {
        position: static
    }

    .workspace {
        overflow: visible;
        padding: 0
    }

    .panel {
        break-inside: avoid
    }

    .data-table {
        font-size: 9px
    }

    body {
        background: white
    }

    .table-wrap {
        overflow: visible
    }
}