/* Alloy-inspired dashboard canvas and chart widget, using Knight Command styling. */
.dashboard-canvas {
  height: calc(100vh - 128px);
  min-height: 0;
  display: flex;
  align-items: flex-start;
  gap: 18px;
  overflow: auto;
  padding: 14px 18px 22px;
  background: #f3f4f6;
}

.chart-card.location-widget {
  width: min(590px, 100%);
  min-height: 536px;
  display: flex;
  flex: 0 0 min(590px, 100%);
  flex-direction: column;
  overflow: hidden;
  border: 1px solid #dce3eb;
  border-radius: 9px;
  background: #fff;
  box-shadow: 0 3px 14px rgba(39, 74, 111, .12);
}

.location-widget .chart-title {
  min-height: 58px;
  height: 58px;
  padding: 0 18px 0 20px;
  border-bottom: 1px solid #d9dee5;
  color: #272d33;
  font-size: 16px;
  font-weight: 500;
}

.chart-refresh {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  color: #59636d;
  padding: 10px;
  border-radius: 4px;
  flex: 0 0 44px;
}

.chart-refresh svg,
.dashboard-customize svg {
  width: 23px;
  height: 23px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.chart-refresh:hover,
.dashboard-customize:hover {
  background: #edf2f7;
  color: #1e65a6;
}

.chart-widget-body {
  display: flex;
  flex: 1 1 auto;
  min-height: 0;
  align-items: flex-start;
  padding: 14px 13px 12px;
}

.location-chart-svg {
  display: block;
  width: 100%;
  height: auto;
  overflow: visible;
}

.location-chart-svg .chart-grid line {
  stroke: #d9dde2;
  stroke-width: .8;
}

.location-chart-svg .chart-grid text {
  fill: #68717a;
  font: 12px "Segoe UI", Arial, sans-serif;
}

.location-chart-svg .chart-bars rect {
  transition: opacity 120ms ease;
}

.location-chart-svg .chart-bars a:hover rect {
  opacity: .78;
}

.location-chart-svg .chart-category {
  fill: #646d76;
  font: 11px "Segoe UI", Arial, sans-serif;
}

.location-chart-svg .chart-legend text {
  fill: #343a40;
  font: 13px "Segoe UI", Arial, sans-serif;
}

.location-chart-svg .chart-legend .chart-legend-value {
  fill: #252c33;
  font-size: 14px;
  font-weight: 700;
}

.chart-card.dashboard-status {
  width: min(340px, 100%);
  min-height: 0;
  overflow: hidden;
  border: 1px solid #dce3eb;
  border-radius: 9px;
  background: #fff;
  box-shadow: 0 3px 14px rgba(39, 74, 111, .12);
}

.status-widget-body { padding: 4px 16px; }
.dashboard-status .status-summary { min-height: 52px; align-items: center; padding: 10px 4px; color: #3b434b; }
.dashboard-status .status-summary b { min-width: 32px; padding: 4px 8px; border-radius: 12px; background: #eff4f8; color: #315c85; text-align: center; font-size: 12px; }
.status-summary > span { display: inline-flex; align-items: center; gap: 10px; }
.status-dot { width: 9px; height: 9px; border-radius: 50%; background: #568e69; }
.status-dot-1 { background: #298bc3; }
.status-dot-2 { background: #df9952; }
.status-dot-3 { background: #8e949b; }

:root[data-kc-theme="dark"] .dashboard-canvas { background: #111213; }
:root[data-kc-theme="dark"] .chart-card.location-widget,
:root[data-kc-theme="dark"] .chart-card.dashboard-status { border-color: #383a3d; background: #191a1c; box-shadow: 0 3px 14px rgba(0, 0, 0, .22); }
:root[data-kc-theme="dark"] .location-widget .chart-title { border-color: #383a3d; color: #e5e7e9; }
:root[data-kc-theme="dark"] .chart-refresh { color: #c2c7cc; }
:root[data-kc-theme="dark"] .chart-refresh:hover,
:root[data-kc-theme="dark"] .dashboard-customize:hover { background: #303438; color: #8bc9f1; }
:root[data-kc-theme="dark"] .location-chart-svg .chart-grid line { stroke: #414448; }
:root[data-kc-theme="dark"] .location-chart-svg .chart-grid text,
:root[data-kc-theme="dark"] .location-chart-svg .chart-category { fill: #b4b9be; }
:root[data-kc-theme="dark"] .location-chart-svg .chart-legend text { fill: #e0e3e6; }
:root[data-kc-theme="dark"] .location-chart-svg .chart-legend .chart-legend-value { fill: #f1f3f5; }
:root[data-kc-theme="dark"] .dashboard-status .status-summary { color: #e0e3e6; }
:root[data-kc-theme="dark"] .dashboard-status .status-summary b { background: #263849; color: #b7dafa; }

@media (max-width: 700px) {
  .dashboard-canvas { height: calc(100vh - 112px); padding: 10px; }
  .chart-card.location-widget { min-height: 460px; flex-basis: min(590px, 100%); }
  .location-widget .chart-title { padding-inline: 12px; font-size: 14px; }
  .chart-widget-body { padding: 10px 5px; }
}
