/* Dashboard only. Status tones and business values remain owned by components. */
.so-dashboard { color:var(--so-text,#1e293b); background:var(--so-bg,#f5f7fb); min-width:0; }
.so-dashboard-content { min-height:0; padding:var(--so-page-padding,16px); }
.so-dashboard-top-cards { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; align-items:stretch; }
.so-dashboard-top-cards>* { min-width:0; }
.so-dashboard-period-card { min-height:104px; min-width:0; width:100%; padding:10px; text-align:start; background:var(--so-surface,#fff); border-color:var(--so-border,#e2e8f0); border-radius:var(--so-radius-card,12px); }
.so-dashboard-period-card {
  display:grid;
  grid-template-columns:minmax(65px,.9fr) minmax(0,1.6fr);
  grid-template-rows:auto auto 1fr auto;
  align-items:start;
  gap:6px 8px;
  container-type:inline-size;
  container-name:so-dashboard-period;
}
.so-dashboard-period-heading { display:flex; grid-column:1/-1; align-items:center; gap:8px; min-width:0; color:var(--so-muted,#64748b); font-size:11px; font-weight:650; line-height:1.3; letter-spacing:.025em; text-transform:uppercase; overflow-wrap:anywhere; }
.so-dashboard-period-icon { width:20px; height:20px; display:grid; place-items:center; flex-shrink:0; border-radius:6px; background:#eff6ff; color:var(--so-primary,#4354c7); }
.so-dashboard-period-body { display:contents; }
.so-dashboard-period-pending { min-width:0; display:flex; flex-direction:column; gap:2px; }
.so-dashboard-period-pending-orders { grid-area:2/1; margin-block-start:4px; }
.so-dashboard-period-pending-positions { grid-area:3/1; align-self:end; }
.so-dashboard-pending-count { font-size:26px; line-height:1.05; font-weight:750; font-variant-numeric:tabular-nums; color:var(--so-primary,#4354c7); }
.so-dashboard-period-metrics { display:grid; grid-area:4/1/5/-1; grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px; min-width:0; padding-block-start:6px; border-block-start:1px solid var(--so-border,#e2e8f0); }
.so-dashboard-period-metric { display:flex; flex-direction:column; justify-content:center; gap:2px; min-width:0; }
.so-dashboard-period-label,.so-dashboard-period-hint { color:var(--so-muted,#64748b); font-size:11px; line-height:1.2; overflow-wrap:anywhere; }
.so-dashboard-period-amount { color:var(--so-text,#1e293b); font-size:16px; line-height:1.2; font-variant-numeric:tabular-nums; overflow-wrap:anywhere; }
.so-dashboard-week-chart {
  --so-week-chart-plot-height:74px;
  display:grid;
  grid-area:2/2/4/3;
  place-self:center;
  gap:5px;
  inline-size:100%;
  max-inline-size:228px;
  min-inline-size:0;
  text-align:center;
}
.so-dashboard-week-chart-heading {
  color:var(--so-muted,#64748b);
  font-size:10px;
  font-weight:650;
  line-height:1.15;
  overflow-wrap:anywhere;
}
.so-dashboard-week-chart-plot {
  position:relative;
  display:grid;
  grid-template-columns:repeat(7,minmax(0,1fr));
  gap:2px;
}
.so-dashboard-week-chart-plot::before {
  position:absolute;
  inset-block-start:0;
  inset-inline:0;
  block-size:var(--so-week-chart-plot-height);
  background:repeating-linear-gradient(to top,transparent 0 23px,var(--so-border,#e2e8f0) 23px 24px);
  pointer-events:none;
  content:"";
}
.so-dashboard-week-chart-day {
  position:relative;
  display:grid;
  grid-template-rows:var(--so-week-chart-plot-height) auto;
  gap:3px;
  min-inline-size:0;
}
.so-dashboard-week-chart-track {
  display:flex;
  align-items:end;
  justify-content:center;
  padding-inline:2px;
  border-block-end:1px solid var(--so-border,#e2e8f0);
}
.so-dashboard-week-chart-bar {
  display:block;
  inline-size:min(100%,18px);
  block-size:var(--so-day-height,0px);
  border-radius:3px 3px 0 0;
  background:color-mix(in srgb,var(--so-primary,#4354c7) 82%,var(--so-surface,#fff));
}
.so-dashboard-week-chart-day[data-state="value"] .so-dashboard-week-chart-bar { min-block-size:3px; }
.so-dashboard-week-chart-day[data-state="zero"] .so-dashboard-week-chart-bar { block-size:3px; }
.so-dashboard-week-chart-day[data-state="future"] .so-dashboard-week-chart-bar {
  block-size:5px;
  border:1px dashed var(--so-muted,#64748b);
  border-radius:2px 2px 0 0;
  background:transparent;
}
.so-dashboard-week-chart-day[data-state="unavailable"] .so-dashboard-week-chart-bar {
  inline-size:min(65%,10px);
  block-size:2px;
  background:var(--so-border,#e2e8f0);
}
.so-dashboard-week-chart-tick {
  overflow:hidden;
  color:var(--so-muted,#64748b);
  font-size:9px;
  line-height:1.2;
  text-overflow:ellipsis;
  white-space:nowrap;
}
.so-dashboard-week-chart-status {
  position:absolute;
  inset-inline:0;
  inset-block-start:calc(var(--so-week-chart-plot-height) / 2 - 7px);
  justify-self:center;
  padding-inline:4px;
  background:var(--so-surface,#fff);
  color:var(--so-muted,#64748b);
  font-size:11px;
  line-height:1.2;
  overflow-wrap:anywhere;
  pointer-events:none;
}
.so-dashboard-feed-body { max-height:276px; overscroll-behavior:contain; }
.so-dashboard-feed-all { min-height:32px; padding:4px 8px; border-radius:var(--so-radius-control,8px); color:var(--so-primary,#4354c7); font-size:12px; line-height:1.3; white-space:normal; }
.so-dashboard-feed-all:hover { background:#eff6ff; }
.so-dashboard-feed-all:focus-visible { outline:2px solid var(--so-primary,#4354c7); outline-offset:2px; }
.so-dashboard-feed-item .so-feed-title { font-size:13px; }
.so-dashboard-toolbar { min-height:40px; padding:4px 16px; }
.so-dashboard-toolbar>button,.so-dashboard-toolbar select { min-height:32px; height:auto; padding-block:4px; font-size:13px; line-height:1.3; }
.so-dashboard-toolbar>div:last-child { margin-inline-start:auto; margin-inline-end:0; }
@container so-dashboard-period (max-width:380px) {
  .so-dashboard-period-amount { font-size:14px; }
}
@media(min-width:1200px) {
  .so-dashboard-top-cards { grid-template-columns:minmax(0,1fr) minmax(0,1.8fr) minmax(0,1fr) minmax(0,1fr); }
  .so-dashboard-top-cards.has-new-customers {
    grid-template-columns:minmax(0,1.2fr) minmax(322px,1.8fr) minmax(0,1fr) minmax(0,1fr);
    grid-auto-rows:minmax(208px,auto);
  }
  .has-new-customers .so-dashboard-period-card {
    grid-template-columns:minmax(78px,1fr) minmax(116px,1.5fr) minmax(88px,1.12fr);
    grid-template-rows:auto minmax(0,1fr) auto;
    row-gap:4px;
  }
  .has-new-customers .so-dashboard-period-metrics { display:contents; }
  .has-new-customers .so-dashboard-period-heading { grid-area:1/1/2/3; }
  .has-new-customers .so-dashboard-week-chart { --so-week-chart-plot-height:84px; }
  .has-new-customers .so-dashboard-period-metric { grid-column:3; }
  .has-new-customers [data-order-period="today"] { grid-row:1; }
  .has-new-customers [data-order-period="week"] { grid-row:3; align-self:end; }
}
@container so-dashboard-period (max-width:350px) {
  .has-new-customers .so-dashboard-week-chart { --so-week-chart-plot-height:74px; }
}
@media(max-width:767px) {
  .so-dashboard-top-cards { grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px; }
  .so-dashboard-toolbar { padding:4px 12px; gap:4px; }
  .so-dashboard-toolbar>button,.so-dashboard-toolbar select,.so-dashboard-feed-all { min-height:44px; }
  .so-dashboard-toolbar>div:first-child { width:100%; }
  .so-dashboard-period-card { padding:10px; }
  .has-new-customers>.so-dashboard-new-customers,
  .has-new-customers>.so-dashboard-period-card { grid-column:1/-1; }
}
