/* Dashboard presentation only. Shell alignment is limited to the loaded overview. */
@media (min-width: 1060px) {
  body.fx-shell-active .fx-shell[data-admin-reference]:has(.fx-admin[data-admin-tab="overview"] .nd-dashboard) {
    --admin-gutter: 32px;
  }
  body.fx-shell-active .fx-shell[data-admin-reference]:has(.nd-dashboard) .fx-shell__top {
    min-height: 56px;
    padding-block: 5px;
  }
  body.fx-shell-active .fx-shell[data-admin-reference]:has(.nd-dashboard) .fx-shell__pagehead {
    display: grid;
    grid-template-columns: auto minmax(0,1fr);
    align-items: start;
    column-gap: 10px;
    padding-block: 32px 0;
  }
  body.fx-shell-active .fx-shell[data-admin-reference]:has(.nd-dashboard) .fx-shell__page-icon {
    width: 24px;
    height: 30px;
    border: 0;
    border-radius: 0;
    background: transparent;
  }
  body.fx-shell-active .fx-shell[data-admin-reference]:has(.nd-dashboard) .fx-shell__page-icon .fx-shell__icon { width: 24px; height: 24px; }
  body.fx-shell-active .fx-shell[data-admin-reference]:has(.nd-dashboard) .fx-shell__page-titles { display: contents; }
  body.fx-shell-active .fx-shell[data-admin-reference]:has(.nd-dashboard) .fx-shell__title { font-size: 22px; line-height: 30px; }
  body.fx-shell-active .fx-shell[data-admin-reference]:has(.nd-dashboard) .fx-shell__desc {
    grid-column: 1 / -1;
    margin-top: 2px;
    font-size: 14px;
    line-height: 21px;
  }
}
.fx-shell[data-admin-reference] .fx-admin[data-admin-tab="overview"]:not([aria-busy="true"]):has(.nd-service-status time) > .fx-admin__hint[role="status"] { display: none; }
.fx-shell[data-admin-reference] .fx-admin[data-admin-tab="overview"]:has(.nd-dashboard) > .fx-admin__hint { margin-bottom: 8px; }

.fx-shell .nd-dashboard {
  --nd-mint: #19c997;
  --nd-blue: #64a9ff;
  --nd-amber: #fbbf24;
  --nd-red: #ff3131;
  --nd-good: #22c99a;
  --nd-bad: #fb8c94;
  --nd-cyan: #38d5eb;
  --nd-axis: rgb(161 161 173 / .44);
  display: flex;
  flex-direction: column;
  gap: 24px;
  min-width: 0;
  color: var(--admin-ink);
}
html.light .fx-shell .nd-dashboard {
  --nd-mint: #08785c;
  --nd-blue: #1d62b5;
  --nd-amber: #875500;
  --nd-red: #b71c1c;
  --nd-good: #08785c;
  --nd-bad: #ad2739;
  --nd-cyan: #087687;
  --nd-axis: rgb(96 97 110 / .46);
}
.fx-shell .nd-service-note,
.fx-shell .nd-kpi,
.fx-shell .nd-panel {
  min-width: 0;
  border: 1px solid var(--admin-line);
  border-radius: 12px;
  background: var(--admin-surface);
}
.fx-shell .nd-service-note { display: flex; align-items: center; gap: 14px; min-height: 86px; padding: 18px 20px; border-radius: 16px; }
.fx-shell .nd-service-icon { display: grid; place-items: center; width: 44px; height: 44px; flex: none; border-radius: 12px; border: 1px solid rgb(255 0 0 / .2); background: rgb(255 0 0 / .08); color: var(--nd-red); }
.fx-shell .nd-service-note svg { width: 23px; height: 23px; }
.fx-shell .nd-service-note > div { flex: 1; min-width: 0; }
.fx-shell .nd-service-note b { display: block; font-size: 15px; font-weight: 600; }
.fx-shell .nd-service-note small { display: block; color: var(--admin-muted); font-size: 12px; margin-top: 2px; }
.fx-shell .nd-service-status { flex: none; padding: 8px 12px; border: 1px solid var(--admin-line); border-radius: 8px; color: var(--admin-muted); font-size: 12px; }
.fx-shell .nd-service-status time { color: var(--admin-ink); font-variant-numeric: tabular-nums; }

.fx-shell .nd-kpis { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 16px; }
.fx-shell .nd-kpi { min-height: 184px; padding: 20px; display: flex; flex-direction: column; }
.fx-shell .nd-kpi-top { display: flex; align-items: center; justify-content: space-between; gap: 5px; margin-bottom: 8px; }
.fx-shell .nd-kpi-icon { display: grid; place-items: center; flex: none; width: 32px; height: 32px; border-radius: 8px; background: rgb(16 185 129 / .11); color: var(--nd-mint); }
.fx-shell .nd-kpi-icon svg { width: 17px; height: 17px; }
.fx-shell .nd-kpi[data-tone="indigo"] .nd-kpi-icon { background: rgb(99 102 241 / .13); color: #8c91ff; }
.fx-shell .nd-kpi[data-tone="red"] .nd-kpi-icon { background: rgb(255 0 0 / .09); color: var(--nd-red); }
.fx-shell .nd-kpi[data-tone="blue"] .nd-kpi-icon { background: rgb(49 131 247 / .12); color: var(--nd-blue); }
.fx-shell .nd-kpi[data-tone="cyan"] .nd-kpi-icon { background: rgb(6 182 212 / .11); color: var(--nd-cyan); }
.fx-shell .nd-kpi[data-tone="gold"] .nd-kpi-icon { background: rgb(245 158 11 / .12); color: var(--nd-amber); }
.fx-shell .nd-kpi[data-tone="violet"] .nd-kpi-icon { background: rgb(168 85 247 / .14); color: #c084fc; }
.fx-shell .nd-kpi[data-tone="orange"] .nd-kpi-icon { background: rgb(249 115 22 / .12); color: #fb923c; }
html.light .fx-shell .nd-kpi[data-tone="indigo"] .nd-kpi-icon { color: #4744b0; }
html.light .fx-shell .nd-kpi[data-tone="violet"] .nd-kpi-icon { color: #7439a8; }
html.light .fx-shell .nd-kpi[data-tone="orange"] .nd-kpi-icon { color: #a14813; }
.fx-shell .nd-chip { padding: 2px 7px; border-radius: 6px; font-size: 11px; line-height: 1.5; font-variant-numeric: tabular-nums; text-align: center; overflow-wrap: anywhere; color: var(--admin-muted); background: var(--admin-surface-muted); }
.fx-shell .nd-chip[data-tone="good"] { color: var(--nd-good); background: rgb(16 185 129 / .12); }
.fx-shell .nd-chip[data-tone="bad"] { color: var(--nd-bad); background: rgb(238 57 72 / .12); }
.fx-shell .nd-chip[data-tone="blue"] { color: var(--nd-blue); background: rgb(49 131 247 / .12); }
.fx-shell .nd-chip[data-tone="cyan"] { color: var(--nd-cyan); background: rgb(6 182 212 / .11); }
.fx-shell .nd-chip[data-tone="gold"] { color: var(--nd-amber); background: rgb(245 158 11 / .12); }
.fx-shell .nd-kpi p { margin: 0; color: var(--admin-muted); font-size: 14px; line-height: 1.5; }
.fx-shell .nd-kpi > strong { margin-top: 5px; font-size: 24px; font-weight: 600; line-height: 1.33; letter-spacing: -.02em; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.fx-shell .nd-kpi > strong span { color: var(--admin-muted); font-size: 13px; font-weight: 400; letter-spacing: 0; }
.fx-shell .nd-kpi > small { margin-top: 10px; font-size: 11px; line-height: 1.55; }
.fx-shell .nd-kpi .nd-muted { margin-top: 2px; color: var(--admin-muted); font-size: 11px; line-height: 1.55; }

.fx-shell .nd-grid-2 { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 16px; }
.fx-shell .nd-panel { padding: 20px; }
.fx-shell .nd-panel > header { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.fx-shell .nd-panel > header > div:first-child { min-width: 0; }
.fx-shell .fx-admin .nd-panel h2 { margin: 0; font-size: 16px; font-weight: 600; line-height: 1.5; }
.fx-shell .nd-panel > header p { margin-top: 3px; color: var(--admin-muted); font-size: 12px; }
.fx-shell .nd-panel > header > a { padding: 4px 8px; border: 1px solid var(--admin-line); border-radius: 7px; white-space: nowrap; font-size: 11px; }
.fx-shell .nd-empty { padding: 24px 12px; border: 1px dashed var(--admin-line); border-radius: 8px; color: var(--admin-muted); font-size: 13px; text-align: center; }
.fx-shell .nd-stat-chart > header { align-items: center; flex-wrap: wrap; }
.fx-shell .nd-stat-chart h2 { display: flex; align-items: center; gap: 8px; }
.fx-shell .nd-stat-chart h2 svg { width: 17px; height: 17px; flex: none; color: var(--nd-red); }
.fx-shell .nd-chart-toolbar { display: flex; flex-wrap: wrap; gap: 8px; }
.fx-shell .nd-chart-toolbar > div { display: flex; flex-wrap: wrap; gap: 2px; padding: 2px; border: 1px solid var(--admin-line-strong); border-radius: 8px; background: var(--admin-surface-muted); }
.fx-shell .nd-chart-toolbar button { min-height: 24px; padding: 3px 9px; border: 0; border-radius: 5px; background: transparent; color: var(--admin-muted); font: inherit; font-size: 11px; line-height: 1.5; cursor: pointer; }
.fx-shell .nd-chart-toolbar button[aria-pressed="true"] { background: #e00000; color: #fff; }
@media (hover: hover) {
  .fx-shell .nd-chart-toolbar button[aria-pressed="false"]:hover { color: var(--admin-ink); }
}
.fx-shell .nd-chart-metrics { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 8px; }
.fx-shell .nd-chart-metrics > div { min-width: 0; padding: 8px 12px; border: 1px solid var(--admin-line); border-radius: 8px; background: var(--admin-surface-muted); }
.fx-shell .nd-chart-metrics small { display: block; color: var(--admin-muted); font-size: 11px; line-height: 1.55; }
.fx-shell .nd-chart-metrics b { display: block; margin-top: 3px; font-size: 15px; font-weight: 600; overflow-wrap: anywhere; }
.fx-shell .nd-mint { color: var(--nd-mint); }
.fx-shell .nd-blue { color: var(--nd-blue); }
.fx-shell .nd-amber { color: var(--nd-amber); }
.fx-shell .nd-chart-legend { display: flex; justify-content: center; flex-wrap: wrap; gap: 8px 20px; padding: 22px 0 14px; font-size: 11px; }
.fx-shell .nd-chart-legend span { display: inline-flex; align-items: center; gap: 5px; }
.fx-shell .nd-chart-legend i { width: 12px; height: 12px; border-radius: 50%; background: currentColor; }
.fx-shell .nd-plot { display: grid; grid-template-columns: max-content minmax(0,1fr); grid-template-rows: clamp(164px,22vw,260px) 22px; column-gap: 9px; padding-inline-end: 6px; }
.fx-shell .nd-y-axis { display: flex; flex-direction: column; position: relative; min-width: 24px; text-align: end; color: var(--admin-muted); font-size: 10px; line-height: 0; font-variant-numeric: tabular-nums; }
.fx-shell .nd-y-axis span { position: relative; height: 0; white-space: nowrap; }
.fx-shell .nd-x-axis { position: relative; grid-column: 2; font-size: 10px; color: var(--admin-muted); font-variant-numeric: tabular-nums; }
.fx-shell .nd-x-axis span { position: absolute; top: 5px; white-space: nowrap; transform: translateX(-50%); }
.fx-shell .nd-x-axis .is-first { transform: none; }
.fx-shell .nd-x-axis .is-last { transform: translateX(-100%); }
.fx-shell .nd-line-chart { display: block; width: 100%; height: 100%; overflow: visible; }
.fx-shell .nd-chart-grid line { stroke: var(--nd-axis); stroke-width: 1; stroke-dasharray: 2 4; }
.fx-shell .nd-series-sales, .fx-shell .nd-chart-area-sales { color: var(--nd-mint); }
.fx-shell .nd-series-topups, .fx-shell .nd-chart-area-topups { color: var(--nd-blue); }
.fx-shell .nd-chart-area { fill: currentColor; fill-opacity: .24; }
.fx-shell .nd-chart-area-topups { fill-opacity: .17; }
.fx-shell :is(.nd-chart-sales,.nd-chart-topups,.nd-chart-point) { fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.fx-shell .nd-chart-point { stroke-width: 5; }
.fx-shell .nd-chart-data { margin-top: 7px; font-size: 12px; color: var(--admin-muted); }
.fx-shell .nd-chart-data summary { width: fit-content; cursor: pointer; padding: 6px 0; }
.fx-shell .nd-chart-data summary:focus-visible { outline: 2px solid var(--admin-focus); outline-offset: 3px; }
.fx-shell .nd-chart-data .nd-table-scroll { margin-top: 5px; max-height: 260px; }

.fx-shell .nd-table-scroll { overflow: auto; max-width: 100%; border: 1px solid var(--admin-line); border-radius: 8px; scrollbar-width: thin; }
.fx-shell .nd-dashboard table { width: 100%; border-collapse: collapse; font-size: 13px; line-height: 1.5; }
.fx-shell .nd-dashboard th { text-align: start; color: var(--admin-muted); font-size: 11px; font-weight: 500; padding: 9px 10px; border-bottom: 1px solid var(--admin-line); background: var(--admin-surface-muted); }
.fx-shell .nd-dashboard td { padding: 10px; border-bottom: 1px solid var(--admin-line); vertical-align: middle; }
.fx-shell .nd-dashboard tr:last-child td { border-bottom: 0; }
.fx-shell .nd-dashboard td b { display: block; font-weight: 500; overflow-wrap: anywhere; }
.fx-shell .nd-dashboard td small { display: block; max-width: 26ch; overflow-wrap: anywhere; color: var(--admin-muted); font-size: 11px; margin-top: 3px; }
.fx-shell .nd-dashboard :is(th,td):last-child { text-align: end; white-space: nowrap; font-variant-numeric: tabular-nums; }

.fx-shell :is(.nd-ranking,.nd-distribution,.nd-low-stock) { margin: 0; padding: 0; list-style: none; }
.fx-shell :is(.nd-ranking,.nd-low-stock) li { display: flex; gap: 10px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--admin-line); }
.fx-shell :is(.nd-ranking,.nd-low-stock) li:last-child { border-bottom: 0; }
.fx-shell :is(.nd-ranking,.nd-low-stock) li > div { flex: 1; min-width: 0; }
.fx-shell :is(.nd-ranking,.nd-low-stock) b { display: block; font-size: 13px; font-weight: 500; overflow-wrap: anywhere; }
.fx-shell :is(.nd-ranking,.nd-low-stock) small { display: block; color: var(--admin-muted); font-size: 11px; margin-top: 3px; }
.fx-shell .nd-rank { display: grid; place-items: center; width: 26px; height: 26px; flex: none; border-radius: 7px; background: var(--admin-surface-muted); color: var(--admin-muted); font-size: 11px; }
.fx-shell .nd-ranking strong { color: var(--nd-mint); font-size: 13px; font-weight: 600; white-space: nowrap; }
.fx-shell .nd-low-stock strong { color: var(--nd-amber); font-size: 16px; }
.fx-shell .nd-distribution { display: grid; gap: 15px; }
.fx-shell .nd-distribution li > div:first-child { display: flex; justify-content: space-between; gap: 10px; font-size: 13px; overflow-wrap: anywhere; }
.fx-shell .nd-distribution strong { font-weight: 500; white-space: nowrap; }
.fx-shell .nd-distribution small { color: var(--admin-muted); font-size: 11px; }
.fx-shell .nd-progress { height: 7px; overflow: hidden; margin: 6px 0 3px; border-radius: 6px; background: var(--admin-surface-muted); }
.fx-shell .nd-progress i { display: block; height: 100%; border-radius: 6px; background: var(--nd-mint); }
.fx-shell .nd-progress i[data-color="1"] { background: var(--nd-blue); }
.fx-shell .nd-progress i[data-color="2"] { background: #a47af3; }
.fx-shell .nd-progress i[data-color="3"] { background: var(--nd-amber); }
.fx-shell .nd-hour-label { color: var(--admin-muted); font-size: 12px; margin-bottom: 12px; }
.fx-shell .nd-hours { display: flex; gap: 3px; height: 142px; padding-top: 6px; }
.fx-shell .nd-hours > span { position: relative; display: flex; flex: 1; align-items: flex-end; min-width: 0; padding-bottom: 19px; border-bottom: 1px solid var(--admin-line); }
.fx-shell .nd-hours i { display: block; width: 100%; max-height: 100%; border-radius: 3px 3px 0 0; background: var(--nd-mint); }
.fx-shell .nd-hours small { position: absolute; bottom: 0; left: 0; color: var(--admin-muted); font-size: 9px; }
.fx-shell .nd-order-types { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; }
.fx-shell .nd-order-types > div { padding: 16px 8px; border: 1px solid var(--admin-line); border-radius: 8px; background: var(--admin-surface-muted); text-align: center; }
.fx-shell .nd-order-types strong { display: block; font-size: 24px; line-height: 1.4; }
.fx-shell .nd-order-types span { display: block; color: var(--admin-muted); font-size: 12px; }
.fx-shell .nd-footnote { color: var(--admin-muted); font-size: 11px; line-height: 1.65; }

@media (min-width: 900px) and (max-width: 1099px), (max-width: 767px) {
  .fx-shell .nd-kpis { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
@media (max-width: 767px) {
  .fx-shell .nd-dashboard { gap: 16px; }
  .fx-shell .nd-grid-2 { grid-template-columns: minmax(0,1fr); gap: 12px; }
  .fx-shell .nd-kpis { gap: 10px; }
  .fx-shell .nd-kpi { min-height: 158px; padding: 13px; }
  .fx-shell .nd-kpi p { font-size: 12px; }
  .fx-shell .nd-kpi > strong { font-size: 21px; }
  .fx-shell .nd-kpi > strong span { font-size: 11px; }
  .fx-shell .nd-panel { padding: 14px; }
  .fx-shell .fx-admin .nd-panel h2 { font-size: 15px; }
  .fx-shell .nd-chart-toolbar button { min-height: 36px; }
  .fx-shell .nd-service-note { padding: 13px; gap: 10px; }
  .fx-shell .nd-service-icon { width: 36px; height: 36px; }
  .fx-shell .nd-service-note svg { width: 18px; height: 18px; }
  .fx-shell .nd-service-status { padding: 4px 6px; }
}
@media (max-width: 520px) {
  .fx-shell .nd-service-note { display: grid; grid-template-columns: auto minmax(0,1fr); }
  .fx-shell .nd-service-status { grid-column: 2; justify-self: start; }
  .fx-shell .nd-chart-toolbar { display: grid; width: 100%; }
  .fx-shell .nd-chart-toolbar button { flex: 1 1 auto; padding-inline: 6px; }
  .fx-shell .nd-chart-metrics { grid-template-columns: minmax(0,1fr); gap: 5px; }
  .fx-shell .nd-chart-metrics > div { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 5px 8px; }
  .fx-shell .nd-chart-metrics b { margin: 0; font-size: 13px; text-align: end; }
  .fx-shell .nd-chart-legend { padding-top: 14px; }
  .fx-shell .nd-plot { column-gap: 5px; }
  .fx-shell .nd-x-axis .is-odd { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .fx-shell .nd-dashboard * { scroll-behavior: auto !important; transition: none !important; animation: none !important; }
}
