.dashboard {
    background: #f4f6fb;
}

.dashboard .breadcrumbs {
    display: none;
}

.dashboard .sidebar {
    background: #121f36;
    border-right: 1px solid #223452;
    color: #d8e0ef;
}

.dashboard .sx-sidebar-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 16px 14px;
    border-bottom: 1px solid #223452;
    margin-bottom: 8px;
}

.dashboard .sx-sidebar-brand-icon {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    background: #e1b74b;
    color: #11182a;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.dashboard .sx-sidebar-brand-title {
    color: #f4f7ff;
    font-size: 16px;
    font-weight: 700;
    letter-spacing: .02em;
}

.dashboard .sx-sidebar-brand-subtitle {
    color: #9eadc9;
    font-size: 10px;
    letter-spacing: .12em;
}

.dashboard .sidebar-title,
.dashboard .sidebar-title-link {
    color: #8292af !important;
    text-transform: uppercase;
    letter-spacing: .12em;
    font-size: 10px;
}

.dashboard .sidebar-link {
    color: #d8e0ef;
    border-radius: 10px;
}

.dashboard .sidebar-link:hover,
.dashboard .sidebar-link.current-model {
    background: #1d2e4f;
    color: #fff;
}

.dashboard #content.sx-dashboard-page > h1 {
    display: none;
}

.dashboard .sx-dashboard-topbar {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 16px;
    margin: 0 0 16px;
    padding: 6px 0 4px;
}

.dashboard .sx-kicker {
    color: #6a7489;
    text-transform: uppercase;
    letter-spacing: .14em;
    font-size: 11px;
    font-weight: 700;
}

.dashboard .sx-dashboard-topbar-title h2 {
    margin: 0;
    color: #101a2c;
    font-size: 30px;
    line-height: 1.1;
}

.dashboard .sx-dashboard-search-wrap {
    position: relative;
}

.dashboard .sx-dashboard-search-wrap i {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #7f899f;
    font-size: 14px;
}

.dashboard .sx-dashboard-search-wrap kbd {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    border: 1px solid #d4dce8;
    border-radius: 7px;
    background: #fff;
    color: #768098;
    font-size: 10px;
    padding: 2px 6px;
    font-family: inherit;
}

.dashboard input.sx-dashboard-search {
    width: 100%;
    height: 44px;
    border: 1px solid #d8dee8;
    border-radius: 12px;
    background: #fff;
    padding: 0 65px 0 34px;
    color: #111c2e;
}

.dashboard .sx-dashboard-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.dashboard .sx-top-action,
.dashboard .sx-top-icon,
.dashboard .sx-user-pill {
    border: 1px solid #d6ddea;
    border-radius: 10px;
    background: #fff;
}

.dashboard .sx-top-action {
    height: 38px;
    padding: 0 13px;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    color: #17243d;
    font-size: 13px;
    font-weight: 700;
}

.dashboard .sx-top-action-primary {
    background: #e1b74b;
    border-color: #c59b2f;
    color: #16120b;
}

.dashboard .sx-top-icon {
    width: 38px;
    height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #58647d;
}

.dashboard .sx-user-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 4px 10px 4px 5px;
    color: #12203b;
}

.dashboard .sx-user-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #1e3258;
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.dashboard .sx-user-meta {
    display: inline-flex;
    flex-direction: column;
    line-height: 1.1;
}

.dashboard .sx-user-name {
    font-weight: 700;
    font-size: 12px;
}

.dashboard .sx-user-client {
    color: #727d94;
    font-size: 11px;
}

.dashboard .dashboard-item-header {
    padding: 6px 14px;
}

.dashboard .dashboard-item-header-title {
    font-size: 12px;
    letter-spacing: .14em;
    color: #5f6a81;
}

.dashboard .dashboard-item-content.sx-card {
    border: 1px solid #d8dee8;
    border-radius: 18px;
    background: #fff;
    color: #14233f;
    box-shadow: 0 1px 0 rgba(16, 24, 40, .02);
    padding: 16px;
    height: auto !important;
}

.dashboard .sx-profile-card .sx-profile-header {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 10px;
    align-items: center;
    margin-bottom: 14px;
}

.dashboard .sx-profile-card .sx-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #21375f;
    color: #fff;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
}

.dashboard .sx-profile-card .sx-profile-name {
    margin: 0;
    font-size: 18px;
    line-height: 1.1;
    color: #121b2c;
}

.dashboard .sx-profile-card .sx-profile-company {
    color: #59637a;
    font-size: 12px;
    margin-top: 2px;
}

.dashboard .sx-profile-card .sx-chip-link {
    border: 1px solid #d4dce8;
    border-radius: 10px;
    color: #22304a;
    font-weight: 600;
    padding: 7px 11px;
    font-size: 12px;
}

.dashboard .sx-profile-card .sx-profile-meta {
    display: grid;
    gap: 7px;
    margin-bottom: 14px;
    color: #42506a;
    font-size: 13px;
}

.dashboard .sx-profile-card .sx-meta-row i {
    margin-right: 8px;
    width: 12px;
    text-align: center;
}

.dashboard .sx-profile-card .sx-credit {
    color: #22304a;
    margin-left: 4px;
    font-weight: 600;
}

.dashboard .sx-profile-card .sx-credit-negative {
    color: #d63f35;
}

.dashboard .sx-quick-actions-grid,
.dashboard .sx-metric-grid {
    display: grid;
    gap: 10px;
}

.dashboard .sx-quick-actions-grid {
    grid-template-columns: 1fr 1fr;
}

.dashboard .sx-quick-action {
    border: 1px solid #d8dee8;
    border-radius: 12px;
    min-height: 54px;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    font-size: 13px;
    font-weight: 600;
    color: #131c2b;
    background: #fff;
}

.dashboard .sx-quick-action-primary {
    background: #e1b74b;
    border-color: #c59b2f;
}

.dashboard .sx-metric-grid {
    margin-bottom: 14px;
}

.dashboard .sx-metric-grid-one {
    grid-template-columns: 1fr;
}

.dashboard .sx-metric-grid-two {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.dashboard .sx-metric-grid-three {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.dashboard .sx-metric-grid-four {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.dashboard .sx-metric-grid-five {
    grid-template-columns: repeat(5, minmax(0, 1fr));
}

.dashboard .sx-metric-tile {
    border: 1px solid #d8dee8;
    border-radius: 12px;
    padding: 10px 12px;
    color: #131c2b;
    background: #f9fbff;
    display: block;
}

.dashboard .sx-metric-value {
    display: block;
    font-size: 30px;
    line-height: 1;
    color: #0f1a2e;
    margin-bottom: 6px;
    font-weight: 700;
}

.dashboard .sx-metric-label {
    display: block;
    color: #5f6a81;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.dashboard .sx-table-wrap {
    border: 1px solid #e1e6ef;
    border-radius: 12px;
    overflow: hidden;
    background: #fff;
}

.dashboard table.sx-table {
    margin-top: 0 !important;
}

.dashboard table.sx-table tr.dashboard_table_header td {
    background: #f4f6fb;
    color: #192848;
    font-weight: 700;
    text-align: left;
}

.dashboard table.sx-table tr td {
    padding: 10px 8px;
    border-bottom: 1px solid #edf1f7;
    vertical-align: middle;
}

.dashboard .sx-more-link {
    text-align: center;
    background: #fbfcff;
}

.dashboard .sx-status-dot-cell {
    width: 8px;
}

.dashboard .sx-status-dot {
    display: inline-block;
    width: 9px;
    height: 9px;
    border-radius: 50%;
}

.dashboard .sx-status-dot-online {
    background: #24b35a;
}

.dashboard .sx-status-dot-offline {
    background: #b7bfcd;
}

.dashboard .sx-status-dot-warning {
    background: #d18b1d;
}

.dashboard .sx-last-activity {
    text-align: right;
    white-space: nowrap;
}

.dashboard .sx-chart {
    height: 232px;
    background: #fff;
    border: 1px solid #e1e6ef;
    border-radius: 12px;
}

@media (max-width: 1200px) {
    .dashboard .sx-dashboard-topbar {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 1024px) {
    .dashboard .sx-dashboard-actions {
        flex-wrap: wrap;
    }

    .dashboard .sx-quick-actions-grid {
        grid-template-columns: 1fr;
    }

    .dashboard .sx-metric-grid-three,
    .dashboard .sx-metric-grid-four,
    .dashboard .sx-metric-grid-five {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

/* ============================================================
   Dashboard overhaul — top-row KPI strip + 2-col layout below
   ============================================================ */

.dashboard .dashboard-container.sx-dashboard-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 360px);
    grid-template-areas:
        "top top"
        "main side";
    gap: 16px;
}

.dashboard .sx-dashboard-toprow {
    grid-area: top;
    min-width: 0;
}

.dashboard .sx-dashboard-main {
    grid-area: main;
    min-width: 0;
}

.dashboard .sx-dashboard-side {
    grid-area: side;
    min-width: 0;
}

@media (max-width: 1100px) {
    .dashboard .dashboard-container.sx-dashboard-grid {
        grid-template-columns: 1fr;
        grid-template-areas: "top" "main" "side";
    }
}

/* The top-row module wrapper should not look like a card itself */
.dashboard .sx-dashboard-toprow .dashboard-item-content {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    padding: 0 !important;
}
.dashboard .sx-dashboard-toprow .dashboard-item-header {
    display: none;
}

/* ---------- KPI cards (top strip) ---------- */
.dashboard .sx-kpi-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
}

@media (max-width: 1280px) {
    .dashboard .sx-kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 700px) {
    .dashboard .sx-kpi-grid { grid-template-columns: 1fr; }
}

.dashboard .sx-kpi-card {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 140px;
    padding: 18px 20px;
    border-radius: 18px;
    background: #fff;
    border: 1px solid #e2e6ef;
    color: #131f38;
    text-decoration: none;
    box-shadow: 0 1px 0 rgba(16, 24, 40, .02);
    transition: transform .15s ease, box-shadow .15s ease;
}
.dashboard .sx-kpi-card:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 24px rgba(16, 24, 40, .06);
}

.dashboard .sx-kpi-card-dark {
    background: linear-gradient(155deg, #0e1a31 0%, #14233f 100%);
    color: #f4f7ff;
    border-color: #14233f;
}
.dashboard .sx-kpi-card-dark .sx-kpi-kicker { color: #b6c2dd; }
.dashboard .sx-kpi-card-dark .sx-kpi-sub { color: #9faecc; }

.dashboard .sx-kpi-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.dashboard .sx-kpi-kicker {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: #6a7489;
}

.dashboard .sx-kpi-change {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    border-radius: 999px;
    padding: 3px 10px;
    font-size: 12px;
    font-weight: 700;
    line-height: 1;
}
.dashboard .sx-kpi-change.up   { background: #e8f7ec; color: #1e9447; }
.dashboard .sx-kpi-change.down { background: #fdecec; color: #c4392f; }

.dashboard .sx-kpi-card-dark .sx-kpi-change.up   { background: rgba(36, 179, 90, .18); color: #5be08a; }
.dashboard .sx-kpi-card-dark .sx-kpi-change.down { background: rgba(214, 63, 53, .2);  color: #ff8b80; }

.dashboard .sx-kpi-value {
    font-size: 42px;
    font-weight: 700;
    line-height: 1.05;
    letter-spacing: -.01em;
    margin: 10px 0 4px;
}
.dashboard .sx-kpi-card-dark .sx-kpi-value { color: #ffffff; }

.dashboard .sx-kpi-sub {
    font-size: 12px;
    color: #6a7489;
    font-weight: 500;
}

/* ---------- Operations by status (colored icon tiles) ---------- */
.dashboard .sx-status-tiles {
    gap: 12px;
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
    width: 100%;
}

.dashboard .sx-status-tile {
    display: flex;
    align-items: center;
    gap: 12px;
    background: #f9fbff;
    border: 1px solid #e2e6ef;
    border-radius: 14px;
    padding: 12px 14px;
    text-decoration: none;
    color: #131c2b;
    transition: background .15s ease, border-color .15s ease;
    min-width: 0;
    overflow: hidden;
}
.dashboard .sx-status-tile:hover {
    background: #fff;
    border-color: #d4dbe8;
}

.dashboard .sx-status-icon {
    width: 36px;
    height: 36px;
    flex: 0 0 36px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    background: #f0f3f9;
    color: #4d5a76;
}
.dashboard .sx-status-icon-new  { background: #fff4d6; color: #b48312; }
.dashboard .sx-status-icon-pen  { background: #eef1f7; color: #545d72; }
.dashboard .sx-status-icon-proc { background: #e1ecff; color: #2c63bf; }
.dashboard .sx-status-icon-pack { background: #ffe7d4; color: #c66215; }
.dashboard .sx-status-icon-ok   { background: #dff6e6; color: #1e9447; }

.dashboard .sx-status-tile-body {
    display: flex;
    flex-direction: column;
    line-height: 1.1;
    min-width: 0;
}

.dashboard .sx-status-tile-value {
    font-size: 22px;
    font-weight: 700;
    color: #0f1a2e;
}
.dashboard .sx-status-tile-label {
    font-size: 12px;
    color: #5f6a81;
    font-weight: 600;
    margin-top: 2px;
    line-height: 1.25;
    white-space: normal;
    overflow-wrap: anywhere;
}

/* ---------- Operations by action (tiles + area chart) ---------- */
.dashboard .sx-section-toolbar {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 10px;
}

.dashboard .sx-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 12px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
    color: #4d5a76;
    background: #f0f3f9;
    border: 1px solid #e2e6ef;
}
.dashboard .sx-pill-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #24b35a;
    display: inline-block;
}

.dashboard .sx-action-tiles {
    gap: 12px;
}

.dashboard .sx-action-tile {
    display: flex;
    align-items: center;
    gap: 12px;
    background: #f9fbff;
    border: 1px solid #e2e6ef;
    border-radius: 14px;
    padding: 12px 14px;
    text-decoration: none;
    color: #131c2b;
}

.dashboard .sx-action-icon {
    width: 36px;
    height: 36px;
    flex: 0 0 36px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
}
.dashboard .sx-action-icon-today    { background: #eef1f7; color: #4d5a76; }
.dashboard .sx-action-icon-purchase { background: #e1ecff; color: #2c63bf; }
.dashboard .sx-action-icon-return   { background: #fdecec; color: #c4392f; }
.dashboard .sx-action-icon-sales    { background: #fff4d6; color: #b48312; }

.dashboard .sx-action-body {
    display: flex;
    flex-direction: column;
    line-height: 1.1;
}
.dashboard .sx-action-label {
    font-size: 12px;
    color: #5f6a81;
    font-weight: 600;
}
.dashboard .sx-action-value {
    font-size: 22px;
    font-weight: 700;
    margin-top: 2px;
    color: #0f1a2e;
}

.dashboard .sx-chart.sx-chart-area {
    height: 240px;
    border: none;
    background: transparent;
}

/* ---------- Quick Actions card (4 buttons) ---------- */
.dashboard .sx-quick-actions-card .sx-quick-actions-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.dashboard .sx-quick-action {
    flex-direction: row;
    align-items: center;
    gap: 10px;
    min-height: 64px;
    padding: 12px 14px;
    text-decoration: none;
}

.dashboard .sx-quick-action-icon {
    width: 28px;
    height: 28px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #f0f3f9;
    color: #4d5a76;
    font-size: 12px;
}

.dashboard .sx-quick-action-primary .sx-quick-action-icon {
    background: rgba(255, 255, 255, .35);
    color: #16120b;
}

/* ---------- Users card (icon tiles + list) ---------- */
.dashboard .sx-users-tiles {
    gap: 10px;
}

.dashboard .sx-users-tile {
    display: flex;
    align-items: center;
    gap: 10px;
    background: #f9fbff;
    border: 1px solid #e2e6ef;
    border-radius: 14px;
    padding: 10px 12px;
    text-decoration: none;
    color: #131c2b;
}

.dashboard .sx-users-icon {
    width: 34px;
    height: 34px;
    flex: 0 0 34px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
}
.dashboard .sx-users-icon-total   { background: #eef1f7; color: #4d5a76; }
.dashboard .sx-users-icon-online  { background: #dff6e6; color: #1e9447; }
.dashboard .sx-users-icon-offline { background: #fff0d8; color: #c08418; }

.dashboard .sx-users-body {
    display: flex;
    flex-direction: column;
    line-height: 1.1;
}

.dashboard .sx-users-value {
    font-size: 20px;
    font-weight: 700;
    color: #0f1a2e;
}
.dashboard .sx-users-label {
    font-size: 11px;
    color: #5f6a81;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .06em;
    margin-top: 2px;
}

.dashboard .sx-users-list {
    margin-top: 12px;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.dashboard .sx-user-row {
    display: grid;
    grid-template-columns: 14px 1fr auto;
    align-items: center;
    gap: 10px;
    padding: 8px 4px;
    border-bottom: 1px solid #f1f4fa;
    color: #14233f;
    text-decoration: none;
    font-size: 13px;
}
.dashboard .sx-user-row:last-child {
    border-bottom: none;
}
.dashboard .sx-user-row-name {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.dashboard .sx-user-row-last {
    color: #828ca3;
    font-size: 12px;
    white-space: nowrap;
}

/* ---------- Section title polish on Jet card headers ---------- */
.dashboard .dashboard-item-header-title {
    text-transform: uppercase;
}

/* =============================================================
   Stockisimo modern app shell — sidebar + topbar (v4)
   Replaces jet's default chrome with a clean Lovable-style layout
   ============================================================= */
:root {
    --sx-sidebar-w: 272px;
    --sx-submenu-panel-w: 260px;
    --sx-topbar-h: 76px;
    --sx-bg: #f5f6f9;
    --sx-surface: #ffffff;
    --sx-ink: #0c1424;
    --sx-ink-soft: #65718a;
    --sx-line: #e7eaf0;
    --sx-brand: #f0b429;
    --sx-brand-ink: #1a1304;
    --sx-dark: #0c1424;
}

html, body.sx-app-shell { background: var(--sx-bg) !important; }
body.sx-app-shell { font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important; }

/* --- Hide jet's default chrome when our shell is active --- */
body.sx-app-shell #header,
body.sx-app-shell .breadcrumbs,
body.sx-app-shell .sidebar.sidebar-dependent,
body.sx-app-shell .sidebar-header-wrapper,
body.sx-app-shell .sidebar-header,
body.sx-app-shell #footer { display: none !important; }

/* Move main jet container to the right of our sidebar, below our topbar */
body.sx-app-shell #container {
    margin-left: var(--sx-sidebar-w) !important;
    padding: var(--sx-topbar-h) 0 0 0 !important;
    background: var(--sx-bg) !important;
    min-height: 100vh;
    box-sizing: border-box;
}
body.sx-app-shell.sx-submenu-panel-open #container {
    margin-left: calc(var(--sx-sidebar-w) + var(--sx-submenu-panel-w)) !important;
}
body.sx-app-shell #content {
    padding: 24px 32px 32px 32px !important;
    background: var(--sx-bg) !important;
    margin: 0 !important;
    max-width: none !important;
}

/* --- Sidebar --- */
.sx-app-sidebar {
    position: fixed; top: 0; left: 0; bottom: 0;
    width: var(--sx-sidebar-w);
    background: var(--sx-dark);
    color: #cfd6e4;
    z-index: 1000;
    display: flex; flex-direction: column;
    overflow-y: auto;
    overflow-x: visible;
    padding-bottom: 24px;
    scrollbar-width: thin;
    scrollbar-color: rgba(240, 180, 41, 0.55) rgba(255, 255, 255, 0.06);
}
.sx-app-sidebar::-webkit-scrollbar {
    width: 10px;
}
.sx-app-sidebar::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.06);
    border-radius: 999px;
}
.sx-app-sidebar::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, rgba(240, 180, 41, 0.9), rgba(224, 165, 29, 0.9));
    border-radius: 999px;
    border: 2px solid rgba(12, 20, 36, 0.65);
}
.sx-app-sidebar::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, rgba(240, 180, 41, 1), rgba(224, 165, 29, 1));
}
.sx-app-sidebar__brand {
    padding: 20px 20px 24px 20px;
    border-bottom: 1px solid rgba(255,255,255,0.06);
    margin-bottom: 10px;
}
.sx-app-sidebar__logo { display:flex; align-items:center; gap:12px; text-decoration:none; color:#fff; }
.sx-app-sidebar__logo-icon {
    width: 40px; height: 40px; border-radius: 12px;
    background: var(--sx-brand);
    display:flex; align-items:center; justify-content:center;
    color: var(--sx-brand-ink); font-size: 18px;
}
.sx-app-sidebar__logo-text { display:flex; flex-direction:column; line-height:1.15; }
.sx-app-sidebar__logo-title { font-weight:700; font-size:14px; letter-spacing:0.06em; color:#fff; }
.sx-app-sidebar__logo-sub { font-size:10px; color:#65718a; letter-spacing:0.12em; text-transform:uppercase; margin-top:2px;}

.sx-app-sidebar__nav { display:flex; flex-direction:column; padding: 4px 12px; gap: 2px; }
.sx-app-nav__section {
    padding: 16px 12px 6px 12px;
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: #56607a;
    font-weight: 600;
}
.sx-app-nav__item {
    display:flex; align-items:center; gap:12px;
    padding: 10px 12px;
    border-radius: 10px;
    color: #cfd6e4 !important;
    text-decoration: none !important;
    font-size: 14px;
    font-weight: 500;
    transition: all .15s ease;
}
.sx-app-nav__item i { width: 18px; text-align: center; color: #8794ac; font-size: 14px; }
.sx-app-nav__item:hover { background: rgba(255,255,255,0.05); color: #fff !important; }
.sx-app-nav__item:hover i { color: #fff; }
.sx-app-nav__item.is-active { background: #ffffff; color: var(--sx-ink) !important; }
.sx-app-nav__item.is-active i { color: var(--sx-ink); }

.sx-nav-group {
    position: relative;
}

.sx-nav-group__submenu {
    position: static;
    min-width: 0;
    width: 100%;
    background: #111b2d;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 12px;
    box-shadow: none;
    padding: 8px;
    z-index: 1100;
    display: none;
    margin: 6px 0 0;
}

.sx-nav-group:hover .sx-nav-group__submenu,
.sx-nav-group:focus-within .sx-nav-group__submenu,
.sx-nav-group.is-open .sx-nav-group__submenu {
    display: none;
}

.sx-nav-group.is-open .sx-nav-group__submenu {
    display: block;
}

.sx-app-nav__subitem {
    display: flex;
    align-items: center;
    padding: 8px 10px;
    border-radius: 8px;
    color: #d8e0ef !important;
    text-decoration: none !important;
    font-size: 13px;
    line-height: 1.25;
}

.sx-app-nav__subitem:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #fff !important;
}

.sx-submenu-panel {
    position: fixed;
    top: 0;
    left: var(--sx-sidebar-w);
    bottom: 0;
    width: var(--sx-submenu-panel-w);
    background: #121d31;
    border-left: 1px solid rgba(255, 255, 255, 0.06);
    border-right: 1px solid rgba(255, 255, 255, 0.06);
    box-shadow: 12px 0 22px rgba(12, 20, 36, 0.24);
    z-index: 1001;
    transform: translateX(-105%);
    opacity: 0;
    pointer-events: none;
    transition: transform .2s ease, opacity .2s ease;
    display: flex;
    flex-direction: column;
}
.sx-submenu-panel.is-visible {
    transform: translateX(0);
    opacity: 1;
    pointer-events: auto;
}
.sx-submenu-panel__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    color: #fff;
    font-size: 14px;
}
.sx-submenu-panel__close {
    width: 28px;
    height: 28px;
    border: 0;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    cursor: pointer;
}
.sx-submenu-panel__body {
    padding: 12px;
    overflow-y: auto;
}
.sx-submenu-panel__body .sx-app-nav__subitem {
    margin-bottom: 4px;
}

@media (min-width: 1081px) {
    .sx-nav-group__submenu,
    .sx-nav-group.is-open .sx-nav-group__submenu {
        display: none !important;
    }
}

/* --- Topbar --- */
.sx-app-topbar {
    position: fixed; top: 0; right: 0;
    left: var(--sx-sidebar-w);
    height: var(--sx-topbar-h);
    background: #fff;
    border-bottom: 1px solid var(--sx-line);
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 0 24px;
    z-index: 999;
    box-sizing: border-box;
}
.sx-app-topbar__title { display:flex; flex-direction:column; line-height:1.2; min-width: 180px; }
.sx-app-topbar__eyebrow {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: var(--sx-ink-soft);
    font-weight: 600;
}
.sx-app-topbar__page { font-size: 18px; color: var(--sx-ink); font-weight: 600; }

.sx-app-topbar__search {
    flex: 1;
    max-width: 520px;
    position: relative;
    display:flex; align-items:center;
}
.sx-app-topbar__search input {
    width: 100%;
    border: 1px solid var(--sx-line);
    background: #f7f8fb;
    border-radius: 10px;
    padding: 10px 56px 10px 38px;
    font-size: 13px;
    color: var(--sx-ink);
    outline: none;
    transition: border-color .15s, background .15s;
}
.sx-app-topbar__search input:focus { border-color: var(--sx-brand); background: #fff; }
.sx-app-topbar__search-icon { position:absolute; left:14px; top:50%; transform:translateY(-50%); color: var(--sx-ink-soft); font-size:12px; }
.sx-app-topbar__search-kbd {
    position:absolute; right:10px; top:50%; transform:translateY(-50%);
    font-size: 11px; padding: 2px 6px; border:1px solid var(--sx-line); border-radius:6px;
    color: var(--sx-ink-soft); background:#fff;
}

.sx-app-topbar__actions { display:flex; align-items:center; gap:10px; }

/* shared button styles for topbar */
.sx-btn {
    display:inline-flex; align-items:center; gap:8px;
    padding: 9px 14px;
    border-radius: 10px;
    font-size: 13px; font-weight: 600;
    text-decoration: none !important;
    border: 1px solid var(--sx-line);
    background: #fff;
    color: var(--sx-ink) !important;
    cursor: pointer;
    transition: all .15s ease;
    white-space: nowrap;
}
.sx-btn:hover { background:#f3f4f8; }
.sx-btn--primary { background: var(--sx-brand); border-color: var(--sx-brand); color: var(--sx-brand-ink) !important; }
.sx-btn--primary:hover { background: #e0a51d; }
.sx-btn--ghost { background:#fff; }

.sx-app-topbar__icon-btn {
    width: 38px; height: 38px;
    border-radius: 10px;
    border:1px solid var(--sx-line);
    background:#fff;
    color: var(--sx-ink-soft);
    display:flex; align-items:center; justify-content:center;
    cursor:pointer;
    text-decoration:none !important;
    position: relative;
}
.sx-app-topbar__icon-btn:hover { background:#f3f4f8; color: var(--sx-ink); }
.sx-app-topbar__badge-dot {
    position:absolute; top:8px; right:9px;
    width:8px; height:8px; border-radius:50%;
    background: var(--sx-brand);
    border: 2px solid #fff;
}
.sx-app-topbar__user {
    display:flex; align-items:center; gap:10px;
    padding: 4px 10px 4px 4px;
    border:1px solid var(--sx-line);
    border-radius:12px;
    background:#fff;
}
.sx-app-topbar__avatar {
    width:32px; height:32px; border-radius: 9px;
    background: var(--sx-dark); color:#fff;
    display:flex; align-items:center; justify-content:center;
    font-size: 12px; font-weight: 700; letter-spacing:0.04em;
}
.sx-app-topbar__user-meta { display:flex; flex-direction:column; line-height:1.15; }
.sx-app-topbar__user-name { font-size:13px; font-weight:600; color: var(--sx-ink); }
.sx-app-topbar__user-sub { font-size:11px; color: var(--sx-ink-soft); }
.sx-app-topbar__user-logout {
    color: var(--sx-ink-soft); text-decoration:none !important;
    padding: 6px; border-radius:8px;
}
.sx-app-topbar__user-logout:hover { background:#f3f4f8; color: var(--sx-ink); }

.sx-app-topbar__menu-btn {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    border: 1px solid var(--sx-line);
    background: #fff;
    color: var(--sx-ink-soft);
    display: none;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}
.sx-app-topbar__menu-btn:hover { background:#f3f4f8; color: var(--sx-ink); }

.sx-app-overlay {
    position: fixed;
    inset: 0;
    background: rgba(8, 15, 28, 0.45);
    z-index: 998;
    display: none;
}

.sx-mobile-bottom-nav {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1001;
    display: none;
    align-items: stretch;
    justify-content: flex-start;
    gap: 0;
    background: #fff;
    border-top: 1px solid var(--sx-line);
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}
.sx-mobile-bottom-nav__item {
    min-width: 72px;
    flex: 1 0 auto;
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 8px 6px 10px 6px;
    color: var(--sx-ink-soft) !important;
    text-decoration: none !important;
    font-size: 10px;
    font-weight: 600;
    white-space: nowrap;
}
.sx-mobile-bottom-nav__item i {
    font-size: 15px;
}
.sx-mobile-bottom-nav__item.is-active {
    color: var(--sx-ink) !important;
}

/* --- Strip jet dashboard module wrappers visually (dashboard only) --- */
body.sx-app-shell.dashboard .dashboard .dashboard-item {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    margin: 0 0 18px 0 !important;
    padding: 0 !important;
}
body.sx-app-shell.dashboard .dashboard .dashboard-item-header {
    display: none !important;
}
body.sx-app-shell.dashboard .dashboard .dashboard-item-content {
    background: var(--sx-surface);
    border: 1px solid var(--sx-line);
    border-radius: 16px;
    padding: 18px 20px !important;
    box-shadow: 0 1px 2px rgba(12,20,36,0.04);
}

/* Keep dashboard inner status widgets contained and evenly distributed */
body.sx-app-shell.dashboard .dashboard .dashboard-item-content .padding.center {
    padding: 0 !important;
}
body.sx-app-shell.dashboard .dashboard .dashboard-item-content ul.inline.bordered {
    display: grid !important;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 12px;
    width: 100%;
    margin: 0 !important;
    padding: 12px !important;
    list-style: none;
}
body.sx-app-shell.dashboard .dashboard .dashboard-item-content ul.inline.bordered li {
    margin: 0 !important;
    min-width: 0;
    min-height: 82px;
    padding: 12px !important;
    border: 1px solid var(--sx-line) !important;
    border-left: 1px solid var(--sx-line) !important;
    border-radius: 12px;
    background: #ffffff;
    display: flex !important;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    overflow: hidden;
}
body.sx-app-shell.dashboard .dashboard .dashboard-item-content ul.inline.bordered li:first-child {
    border-left: 1px solid var(--sx-line) !important;
}
body.sx-app-shell.dashboard .dashboard .dashboard-item-content ul.inline.bordered li .big {
    line-height: 1.1;
}
body.sx-app-shell.dashboard .dashboard .dashboard-item-content ul.inline.bordered li .dim {
    margin-top: 6px;
    line-height: 1.25;
    white-space: normal;
}

/* TopKPI / QuickActions / Profile modules: no card wrapper (their templates have their own cards) */
body.sx-app-shell.dashboard .sx-dashboard-toprow .dashboard-item-content,
body.sx-app-shell.dashboard .dashboard .dashboard-item-content:has(> .sx-kpi-grid),
body.sx-app-shell.dashboard .dashboard .dashboard-item-content:has(> .sx-quick-actions-card),
body.sx-app-shell.dashboard .dashboard .dashboard-item-content:has(> .sx-card) {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    padding: 0 !important;
}

/* Tighten breadcrumb-removed gap on dashboard */
body.sx-app-shell.dashboard .dashboard { margin-top: 0 !important; padding: 0 !important; }
body.sx-app-shell.dashboard #content > h1 { display: none; } /* hide page title h1 only on dashboard */

/* Compatibility: on non-dashboard pages keep jet's content visible & legible */
body.sx-app-shell.change-list #content,
body.sx-app-shell.change-form #content,
body.sx-app-shell #content {
    background: var(--sx-bg) !important;
}
body.sx-app-shell .breadcrumbs { display: none !important; } /* always hidden – topbar shows title */
body.sx-app-shell #changelist,
body.sx-app-shell .module,
body.sx-app-shell .submit-row,
body.sx-app-shell fieldset.module {
    background: #ffffff;
    border: 1px solid var(--sx-line);
    border-radius: 12px;
    box-shadow: 0 1px 2px rgba(12,20,36,0.04);
}
body.sx-app-shell #content h1,
body.sx-app-shell #content h2 { color: var(--sx-dark); }

/* ============================================================
   Global colors for non-dashboard admin subpages
   ============================================================ */
body.sx-app-shell #content a { color: #2458b5; }
body.sx-app-shell #content a:hover { color: #183f86; }

body.sx-app-shell.change-list #changelist table thead th {
    background: var(--sx-dark) !important;
    color: #f8fbff !important;
    border-bottom: 1px solid #0a101e !important;
}
body.sx-app-shell.change-list #changelist table thead th a {
    color: #f8fbff !important;
}
body.sx-app-shell.change-list #changelist table tbody tr {
    background: #ffffff !important;
}
body.sx-app-shell.change-list #changelist table tbody tr:nth-child(even) {
    background: #ffffff !important;
}
body.sx-app-shell.change-list #changelist table tbody tr:hover {
    background: #f8faff !important;
}
body.sx-app-shell.change-list #changelist table tbody td,
body.sx-app-shell.change-list #changelist table tbody th {
    border-bottom: 1px solid #d8e4f8 !important;
    color: #18345f !important;
}

body.sx-app-shell #changelist-filter {
    background: #ffffff !important;
    border: 1px solid var(--sx-line) !important;
    border-radius: 12px !important;
    box-shadow: 0 1px 2px rgba(12, 20, 36, 0.04);
}
body.sx-app-shell #changelist-filter h2,
body.sx-app-shell #changelist-filter h3 {
    background: var(--sx-dark) !important;
    color: #f8fbff !important;
    border-radius: 10px;
    padding: 8px 10px;
}

body.sx-app-shell input[type="text"],
body.sx-app-shell input[type="number"],
body.sx-app-shell input[type="email"],
body.sx-app-shell input[type="url"],
body.sx-app-shell input[type="password"],
body.sx-app-shell input[type="search"],
body.sx-app-shell input[type="date"],
body.sx-app-shell input[type="datetime-local"],
body.sx-app-shell textarea,
body.sx-app-shell select {
    background: #ffffff !important;
    color: #12335f !important;
    border: 1px solid #d9e0ea !important;
    border-radius: 9px !important;
}
body.sx-app-shell input:focus,
body.sx-app-shell textarea:focus,
body.sx-app-shell select:focus {
    border-color: var(--sx-brand) !important;
    box-shadow: 0 0 0 3px rgba(240, 180, 41, 0.18) !important;
}

body.sx-app-shell .selector,
body.sx-app-shell .selector-available,
body.sx-app-shell .selector-chosen,
body.sx-app-shell .selector .selector-filter {
    background: #ffffff !important;
    border-color: var(--sx-line) !important;
}

body.sx-app-shell .paginator,
body.sx-app-shell .pagination {
    color: #52627d !important;
}
body.sx-app-shell .paginator a,
body.sx-app-shell .pagination a {
    color: #1f4ea3 !important;
}

body.sx-app-shell .object-tools a,
body.sx-app-shell .addlink,
body.sx-app-shell .changelink,
body.sx-app-shell .button,
body.sx-app-shell input[type="submit"],
body.sx-app-shell input[type="button"],
body.sx-app-shell button {
    background: #ffffff !important;
    color: #163d78 !important;
    border: 1px solid var(--sx-line) !important;
    border-radius: 10px !important;
}
body.sx-app-shell .object-tools a:hover,
body.sx-app-shell .addlink:hover,
body.sx-app-shell .changelink:hover,
body.sx-app-shell .button:hover,
body.sx-app-shell input[type="submit"]:hover,
body.sx-app-shell input[type="button"]:hover,
body.sx-app-shell button:hover {
    background: #f3f6fb !important;
}

body.sx-app-shell .module h2,
body.sx-app-shell .inline-group h2 {
    background: var(--sx-dark) !important;
    color: #f8fbff !important;
    border-radius: 10px 10px 0 0;
}
body.sx-app-shell .submit-row input.default,
body.sx-app-shell .submit-row button.default,
body.sx-app-shell .object-tools a.addlink,
body.sx-app-shell .object-tools a.viewsitelink {
    background: var(--sx-brand) !important;
    color: var(--sx-brand-ink) !important;
    border-color: var(--sx-brand) !important;
}
body.sx-app-shell .submit-row input.default:hover,
body.sx-app-shell .submit-row button.default:hover,
body.sx-app-shell .object-tools a.addlink:hover,
body.sx-app-shell .object-tools a.viewsitelink:hover {
    background: #e0a51d !important;
}

body.sx-app-shell ul.messagelist li {
    background: #fff6da !important;
    border: 1px solid #f0d27f !important;
    color: #6a4a00 !important;
    border-radius: 10px !important;
}

/* ============================================================
   Statistics page polish
   ============================================================ */
body.sx-app-shell #content .tiles {
    display: grid !important;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)) !important;
    gap: 14px !important;
    margin: 8px 0 22px 0 !important;
}
body.sx-app-shell #content .tile {
    background: #fff !important;
    border: 1px solid var(--sx-line) !important;
    border-radius: 14px !important;
    box-shadow: 0 2px 10px rgba(12, 20, 36, 0.05) !important;
    padding: 14px !important;
}
body.sx-app-shell #content .tile h2 {
    color: var(--sx-dark) !important;
    font-weight: 700 !important;
    font-size: 14px !important;
}
body.sx-app-shell #content .tile .button,
body.sx-app-shell #content .tile a.button {
    background: var(--sx-brand) !important;
    border: 1px solid var(--sx-brand) !important;
    color: var(--sx-brand-ink) !important;
    border-radius: 10px !important;
    font-weight: 700 !important;
}
body.sx-app-shell #content .tile .button:hover,
body.sx-app-shell #content .tile a.button:hover {
    background: #e0a51d !important;
}
body.sx-app-shell #content .charts-container,
body.sx-app-shell #content .chart-section {
    background: #fff !important;
    border: 1px solid var(--sx-line) !important;
    border-radius: 12px !important;
}
body.sx-app-shell #content .chart-section {
    padding: 12px !important;
}

/* Responsive collapse */
@media (max-width: 1080px) {
    body.sx-app-shell.sx-submenu-panel-open #container { margin-left: 0 !important; }
    .sx-submenu-panel { display: none; }
    body.sx-app-shell #container { margin-left: 0 !important; }
    body.sx-app-shell #content { padding: 18px 14px 20px 14px !important; }
    .sx-app-sidebar { transform: translateX(-100%); transition: transform .25s; }
    .sx-app-topbar { left: 0; }
    .sx-app-topbar__title { display: none; }
    .sx-app-topbar__search { max-width: none; }
    .sx-app-topbar__menu-btn { display: inline-flex; flex: 0 0 auto; }
    .sx-app-topbar__actions { margin-left: auto; }
    .sx-app-topbar__user-meta { display: none; }
    body.sx-sidebar-open .sx-app-sidebar { transform: translateX(0); }
    body.sx-sidebar-open .sx-app-overlay { display: block; }
    body.sx-sidebar-open { overflow: hidden; }
}

@media (max-width: 900px) {
    .sx-mobile-bottom-nav { display: flex; }
    body.sx-app-shell #container { padding-bottom: 64px !important; }
}

@media (max-width: 760px) {
    :root { --sx-topbar-h: 64px; }
    .sx-app-topbar {
        gap: 8px;
        padding: 0 10px;
    }
    .sx-app-topbar__search {
        min-width: 0;
    }
    .sx-app-topbar__search input {
        padding: 9px 34px 9px 32px;
        font-size: 12px;
    }
    .sx-app-topbar__search-kbd { display: none; }
    .sx-app-topbar__actions .sx-btn { display: none; }
    .sx-app-topbar__icon-btn { width: 34px; height: 34px; }
    .sx-app-topbar__user {
        padding-right: 6px;
        gap: 6px;
    }
    .sx-app-topbar__avatar {
        width: 28px;
        height: 28px;
        font-size: 11px;
    }
    .sx-app-nav__item { padding: 11px 12px; }
    .sx-nav-group__submenu { display: none !important; }
    .sx-nav-group.is-open .sx-nav-group__submenu {
        position: static;
        min-width: 0;
        width: 100%;
        margin: 6px 0 0;
        border-radius: 10px;
        box-shadow: none;
        border-color: rgba(255, 255, 255, 0.08);
        display: block !important;
    }
    .sx-app-sidebar { width: min(86vw, var(--sx-sidebar-w)); }
}

/* ============================================================
   Final layout fixes (v=6):
   - Jet's .columns_3 forces wrappers to 33% width; override to fill grid cells
   - Hide jet's per-module drag/collapse/edit chrome on dashboard
   ============================================================ */
body.sx-app-shell.dashboard .dashboard-container.columns_3 .dashboard-column-wrapper,
body.sx-app-shell.dashboard .dashboard-container .sx-dashboard-toprow,
body.sx-app-shell.dashboard .dashboard-container .sx-dashboard-main,
body.sx-app-shell.dashboard .dashboard-container .sx-dashboard-side {
    width: auto !important;
    float: none !important;
    display: block !important;
}

body.sx-app-shell.dashboard .sx-dashboard-main .dashboard-column,
body.sx-app-shell.dashboard .sx-dashboard-side .dashboard-column,
body.sx-app-shell.dashboard .sx-dashboard-toprow .dashboard-column {
    width: 100% !important;
    display: block !important;
    padding: 0 !important;
    margin: 0 !important;
}

body.sx-app-shell.dashboard .dashboard-item {
    width: 100% !important;
    display: block !important;
    float: none !important;
    margin: 0 0 18px 0 !important;
    padding: 0 !important;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
}

body.sx-app-shell.dashboard .dashboard-item-header,
body.sx-app-shell.dashboard .dashboard-item-header-drag,
body.sx-app-shell.dashboard .dashboard-item-header-buttons,
body.sx-app-shell.dashboard .dashboard-item-header-title,
body.sx-app-shell.dashboard .dashboard-item-remove,
body.sx-app-shell.dashboard .dashboard-item-collapse,
body.sx-app-shell.dashboard .dashboard-item-header-collapse-button {
    display: none !important;
}

body.sx-app-shell.dashboard .dashboard-item-content {
    background: var(--sx-surface);
    border: 1px solid var(--sx-line);
    border-radius: 16px;
    padding: 18px 20px;
    box-shadow: 0 1px 2px rgba(12,20,36,0.04);
    width: 100%;
    min-height: 0;
    height: auto !important;
}

/* Modules whose template already provides a card wrapper: strip outer wrapper */
body.sx-app-shell.dashboard .sx-dashboard-toprow .dashboard-item-content,
body.sx-app-shell.dashboard .dashboard-item-content:has(> .sx-kpi-strip),
body.sx-app-shell.dashboard .dashboard-item-content:has(> .sx-quick-actions-card),
body.sx-app-shell.dashboard .dashboard-item-content:has(> .sx-card),
body.sx-app-shell.dashboard .dashboard-item-content:has(> .sx-tasks-card),
body.sx-app-shell.dashboard .dashboard-item-content:has(> .sx-status-grid),
body.sx-app-shell.dashboard .dashboard-item-content:has(> .sx-users-card) {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    padding: 0 !important;
}

body.sx-app-shell.dashboard #add-dashboard-module-form,
body.sx-app-shell.dashboard #reset-dashboard-form,
body.sx-app-shell.dashboard .dashboard-add-module {
    display: none !important;
}

body.sx-app-shell.dashboard .dashboard-column-wrapper {
    border: none !important;
    padding: 0 !important;
    background: transparent !important;
}
