/* dashboard module styles — Home (overview + My day) and Reports.
   Tokens from app.css only (var(--surface), var(--red-ink)…), never raw hex. */

.dash-stack { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.dash-block { margin-bottom: 16px; }
.dash .section { margin-top: 28px; }
.dash .section-title { font-size: 12.5px; }

/* ── KPI tiles: two across on a phone, as many as fit on a desk */
.dash-kpis { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
@media (min-width: 1300px) { .dash-kpis { grid-template-columns: repeat(6, minmax(0, 1fr)); } }
.dash-kpis .stat { min-height: 104px; }
.dash-kpis .stat-sub { line-height: 1.35; }

/* ── announcement + profile nudge */
.dash-announce { align-items: center; font-weight: 500; }
.dash-announce-icon { display: inline-flex; color: var(--red-ink); flex: none; }
.dash-announce.is-amber { background: var(--amber-soft); border-color: color-mix(in srgb, var(--amber) 40%, transparent); }
.dash-announce.is-amber .dash-announce-icon { color: var(--amber-ink); }
.dash-announce.is-green { background: var(--green-soft); border-color: color-mix(in srgb, var(--green) 40%, transparent); }
.dash-announce.is-green .dash-announce-icon { color: var(--green-ink); }
.dash-announce.is-blue { background: var(--blue-soft); border-color: color-mix(in srgb, var(--blue) 40%, transparent); }
.dash-announce.is-blue .dash-announce-icon { color: var(--blue-ink); }
.dash-announce.is-violet { background: var(--violet-soft); border-color: color-mix(in srgb, var(--violet) 40%, transparent); }
.dash-announce.is-violet .dash-announce-icon { color: var(--violet-ink); }
.dash-announce.is-gray { background: var(--gray-soft); border-color: var(--border-strong); }
.dash-announce.is-gray .dash-announce-icon { color: var(--muted); }

.dash-nudge {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 12px 14px; margin-bottom: 18px;
  border-radius: var(--radius); border: 1px dashed var(--border-strong); background: var(--surface);
}
.dash-nudge .grow { min-width: 200px; font-size: 13.5px; }

/* ── rows used by every list on this screen */
.dash-ico { width: 28px; height: 28px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; flex: none; }
.dash-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.dash-row { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--border); min-width: 0; }
.dash-row.top { align-items: flex-start; }
.dash-row:last-child { border-bottom: 0; }
.dash-row-title { display: block; font-weight: 600; font-size: 13.5px; line-height: 1.35; text-decoration: none; overflow-wrap: anywhere; }
a.dash-row-title:hover, a.dash-row-title:focus-visible { text-decoration-line: underline; }
.dash-row-sub { color: var(--muted); font-size: 12px; margin-top: 2px; line-height: 1.35; overflow-wrap: anywhere; }
.dash-row-badges { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; flex: none; }
.dash-date { font: 500 11px/1.2 var(--mono); color: var(--muted); width: 46px; flex: none; text-transform: uppercase; letter-spacing: 0.04em; }
.dash-more { margin-top: 8px; }
.dash-card-foot { margin-top: 10px; font-size: 12.5px; }
.dash-note {
  margin-top: 6px; padding: 7px 9px; border-radius: var(--radius-sm); background: var(--red-soft); color: var(--text-2);
  font-size: 12.5px; white-space: pre-wrap; overflow-wrap: anywhere;
}
.dash-footnote { max-width: 90ch; line-height: 1.5; }

/* scrollable lists (upcoming, the last 30 days) */
.dash-scroll { max-height: 440px; overflow-y: auto; margin-right: -8px; padding-right: 8px; scrollbar-width: thin; }
.dash-scroll-lg { max-height: 380px; border-top: 1px solid var(--border); margin-top: 12px; }
.dash-scroll:focus-visible { outline-offset: 4px; }

/* day groups */
.dash-day + .dash-day { margin-top: 10px; }
.dash-day-head { display: flex; align-items: baseline; gap: 8px; padding: 4px 0 2px; position: sticky; top: 0; background: var(--surface); z-index: 1; }
.dash-day-label { font: 600 11px/1.2 var(--mono); text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); }
.dash-day-label.is-today { color: var(--red-ink); }
.dash-day-date { font-size: 12px; color: var(--faint); }

/* ── the last 30 days: counts row */
.dash-mini { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 8px; }
.dash-mini-stat { display: flex; flex-direction: column; gap: 4px; padding: 10px 12px; border-radius: var(--radius-sm); background: var(--surface-2); border: 1px solid var(--border); min-width: 0; }
.dash-mini-num { font-size: 20px; font-weight: 800; font-variation-settings: 'wdth' 108; font-variant-numeric: tabular-nums; line-height: 1.1; letter-spacing: -0.01em; }
.dash-mini-label { display: inline-flex; align-items: center; gap: 5px; font: 500 10.5px/1.2 var(--mono); text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); white-space: nowrap; }

/* ── production chips */
.dash-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.dash-chip {
  display: inline-flex; align-items: center; gap: 7px; height: 32px; padding: 0 10px; border-radius: 999px;
  border: 1px solid var(--border); background: var(--surface-2); text-decoration: none; font-size: 12.5px; font-weight: 600; color: var(--text);
}
a.dash-chip { text-decoration: none; }
.dash-chip:hover { border-color: var(--border-strong); background: var(--surface-3); }
.dash-chip.is-zero { opacity: 0.55; }
.dash-chip-n { font: 600 11.5px/1 var(--mono); color: var(--text-2); }

/* ── revenue bars */
.dash-rev { padding-top: 6px; }
.dash-rev .minibars { gap: 4px; }

/* ── My day: tasks */
.dash-group + .dash-group { margin-top: 12px; }
.dash-group-head { display: flex; align-items: center; gap: 8px; padding-bottom: 2px; }
.dash-group-empty { padding: 4px 0 2px; }
.dash-task-title { white-space: normal; overflow: visible; overflow-wrap: anywhere; text-decoration: none; line-height: 1.35; }
.dash-task-title:hover { text-decoration: underline; }
.dash-task-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; margin-top: 3px; font-size: 12px; color: var(--muted); }
.dash-task-meta a { color: var(--text-2); }
.task-row .btn { flex: none; }

/* ── My day: shoots */
.dash-shoots { display: flex; flex-direction: column; }
.dash-shoot { display: flex; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--border); }
.dash-shoot:first-child { padding-top: 2px; }
.dash-shoot:last-child { border-bottom: 0; padding-bottom: 0; }
.dash-shoot-date {
  width: 52px; flex: none; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px;
  padding: 6px 0; border-radius: var(--radius-sm); background: var(--surface-2); border: 1px solid var(--border);
  font: 500 10px/1.1 var(--mono); text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); align-self: flex-start;
}
.dash-shoot-date strong { font: 800 20px/1.1 var(--font); color: var(--text); letter-spacing: -0.01em; font-variant-numeric: tabular-nums; }
.dash-shoot-date.is-today { background: var(--red-soft); border-color: color-mix(in srgb, var(--red) 45%, transparent); }
.dash-shoot-date.is-today span { color: var(--red-ink); }
.dash-shoot-body { display: flex; flex-direction: column; gap: 6px; }
.dash-shoot-actions { margin-top: 2px; }
.dash-map { font-size: 12.5px; gap: 5px; overflow-wrap: anywhere; }

/* ── reports */
.dash-range { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; margin-bottom: 16px; }
.dash-range-presets { max-width: 100%; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.dash-range-presets::-webkit-scrollbar { display: none; }
.dash-range-custom { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 8px; }
.dash-range-field { display: flex; flex-direction: column; gap: 4px; }
.dash-range-field .input { width: 160px; height: 32px; }
.dash-range-label { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--muted); }
.dash .card-head, .dash-reports .card-head { flex-wrap: wrap; }
.dash-reports .card-actions .search-input { width: 220px; max-width: 100%; }
.dash-reports .card-actions .search-input .input { height: 30px; }

.dash-funnel { display: flex; flex-direction: column; gap: 12px; }
.dash-funnel-row { display: flex; flex-direction: column; gap: 6px; font-size: 13px; }
.dash-funnel-row .progress-bar.tone-blue { background: var(--faint); }

/* ── small screens */
@media (max-width: 640px) {
  .dash-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .dash-kpis .stat { min-height: 0; padding: 12px; }
  .dash-kpis .stat-label { font-size: 10px; }
  .dash-mini { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .dash-mini-stat { padding: 8px; }
  .dash-mini-num { font-size: 18px; }
  .dash-mini-label { font-size: 9.5px; white-space: normal; }
  .dash-rev .mb-val { display: none; }
  .dash-rev .mb-label { font-size: 9.5px; }
  .dash-date { width: 40px; }
  .dash-scroll { max-height: 360px; }
  .dash-range-field .input { width: 140px; }
  .dash-reports .card-actions { width: 100%; }
  .dash-reports .card-actions .search-input { flex: 1 1 auto; width: auto; }
  .dash-nudge .btn-sm span { display: inline; }
}
