/* THE CONSOLE IS A DESKTOP PAGE and sizes itself to a bench monitor, not a phone. It inherits the
   field app's palette so the two read as one family, and adds only what a wide data view needs. */
.dash { color-scheme: light dark; }
.dash body { background: var(--bg); color: var(--text); }
.dash [hidden] { display: none !important; }

/* ---- chrome ---- */
.dash-top {
  display: flex; align-items: center; gap: var(--space-2); flex-wrap: wrap;
  padding: var(--space-2) var(--space-3);
  background: var(--panel); border-bottom: var(--line-width) solid var(--line);
  position: sticky; top: 0; z-index: 20;
}
.dash-brand { font-size: 1.05rem; letter-spacing: -.01em; }
.dash-brand b { font-weight: var(--font-weight-heading); }
.dash-croppick { display: flex; align-items: center; gap: var(--space-1); margin-left: var(--space-2); }
.dash-croppick span { color: var(--muted); font-size: .85rem; }
.dash-who { margin-left: auto; color: var(--muted); font-size: .85rem; white-space: nowrap; }
.dash-out { width: auto; margin: 0; }

#status { margin: 0; padding: 0 var(--space-3); color: var(--muted); font-size: .9rem; min-height: 1.5rem; line-height: 1.5rem; }
#status:empty { display: none; }
#status.error { color: var(--danger); }

.dash select, .dash input[type=search] {
  font: inherit; color: var(--text); background: var(--panel);
  border: var(--line-width) solid var(--line); border-radius: var(--radius);
  padding: 6px 9px; min-height: 36px;
}
.dash button { min-height: 36px; }

/* ---- shell ---- */
.dash-wrap {
  display: grid; grid-template-columns: 330px minmax(0, 1fr);
  gap: var(--space-3); padding: var(--space-3); align-items: start;
}
@media (max-width: 1000px) { .dash-wrap { grid-template-columns: 1fr; } }

.dash-card {
  background: var(--panel); border: var(--line-width) solid var(--line);
  border-radius: var(--radius); overflow: hidden;
}
.dash-card > header {
  padding: var(--space-2); border-bottom: var(--line-width) solid var(--line);
}
.dash-card > header h2 { margin: 0; font-size: 1rem; }
.dash-card > header p { margin: 4px 0 0; color: var(--muted); font-size: .82rem; line-height: 1.45; max-width: 60ch; }
.dash-card .body { padding: var(--space-2); }

/* ---- queue rail ---- */
.dash-rail { position: sticky; top: 72px; }
.dash-sort { display: flex; align-items: center; gap: var(--space-1); margin-top: var(--space-2); flex-wrap: wrap; }
.dash-sort label { color: var(--muted); font-size: .8rem; }
.dash-sort select { flex: 1; min-width: 7rem; }
.dash-list { max-height: calc(100vh - 230px); overflow-y: auto; }
.dash-group {
  font-size: .68rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted);
  font-weight: var(--font-weight-heading);
  padding: var(--space-2) var(--space-2) 4px; position: sticky; top: 0; background: var(--panel);
  border-bottom: var(--line-width) solid var(--line);
}
.dash-file {
  display: block; width: 100%; text-align: left; background: none; border: 0;
  border-left: 3px solid transparent; cursor: pointer;
  padding: 9px var(--space-2); line-height: 1.35; min-height: 0;
}
.dash-file:hover { background: var(--panel-2); }
.dash-file[aria-current="true"] { background: var(--accent-soft, var(--panel-2)); border-left-color: var(--accent-fill); }
.dash-file .fn { display: block; font-size: .8rem; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.dash-file[aria-current="true"] .fn { font-weight: var(--font-weight-heading); }
.dash-file .fm { display: block; font-size: .74rem; color: var(--muted); margin-top: 2px; }
.dash-empty { padding: var(--space-2); color: var(--muted); font-size: .85rem; line-height: 1.5; }

/* ---- content ---- */
.dash-main { min-width: 0; display: flex; flex-direction: column; gap: var(--space-2); }
.dash-head h1 { margin: 0; font-size: 1.25rem; overflow-wrap: anywhere; }
.dash-head p { margin: 3px 0 0; color: var(--muted); font-size: .85rem; }

.dash-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 150px), 1fr)); gap: var(--space-2); }
.dash-tile { border: var(--line-width) solid var(--line); border-radius: var(--radius); padding: 11px 13px; }
.dash-tile b { display: block; font-size: 1.35rem; line-height: 1.2; font-variant-numeric: tabular-nums; }
.dash-tile span { font-size: .78rem; color: var(--muted); }
.dash-tile.good b { color: var(--green); }
.dash-tile.bad b { color: var(--danger); }
.dash-tile.hold b { color: var(--warn); }

.dash-scroll { overflow-x: auto; }
.dash-table { border-collapse: collapse; width: 100%; font-size: .85rem; }
.dash-table th, .dash-table td {
  text-align: left; padding: 8px 12px; white-space: nowrap;
  border-bottom: var(--line-width) solid var(--line);
}
.dash-table th {
  font-size: .68rem; text-transform: uppercase; letter-spacing: .06em;
  color: var(--muted); font-weight: var(--font-weight-heading);
  position: sticky; top: 0; background: var(--panel);
}
.dash-table tbody tr:last-child td { border-bottom: 0; }
.dash-table tbody tr:hover { background: var(--panel-2); }
.dash-table td.num { text-align: right; font-variant-numeric: tabular-nums; }
.dash-tall { max-height: 60vh; overflow: auto; }

.pill {
  display: inline-block; font-size: .72rem; font-weight: var(--font-weight-heading);
  padding: 2px 8px; border-radius: 999px; white-space: nowrap;
}
.pill.good { background: var(--accent-soft, var(--panel-2)); color: var(--green); }
.pill.flat { background: var(--panel-2); color: var(--muted); }
.pill.bad { background: var(--panel-2); color: var(--danger); }
.pill.hold { background: var(--panel-2); color: var(--warn); }

.dash-note {
  border-left: 3px solid var(--line); background: var(--panel-2);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 11px 14px; font-size: .85rem; line-height: 1.5;
}
.dash-note.good { border-left-color: var(--green); }
.dash-note.warn { border-left-color: var(--warn); }
.dash-note.bad { border-left-color: var(--danger); }
.dash-note p { margin: 0 0 7px; }
.dash-note p:last-child { margin: 0; }

.dash-plot svg { display: block; width: 100%; height: auto; max-width: 100%; }
.dash-legend { display: flex; gap: var(--space-2); flex-wrap: wrap; font-size: .76rem; color: var(--muted); margin-top: 8px; }
.dash-legend i { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 5px; vertical-align: -1px; }

.dash-ev { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr)); gap: var(--space-2); }
.dash-evcard { border: var(--line-width) solid var(--line); border-radius: var(--radius); padding: 12px 13px; }
.dash-evcard h4 { margin: 0 0 8px; font-size: .82rem; }
.dash-evcard .mini { width: 100%; font-size: .8rem; border-collapse: collapse; }
.dash-evcard .mini td { padding: 4px 0; border-bottom: var(--line-width) solid var(--line); white-space: nowrap; }
.dash-evcard .mini tr:last-child td { border-bottom: 0; }
.dash-evcard .mini td.num { text-align: right; font-variant-numeric: tabular-nums; }
.dash-evcard .mini tr.self td { font-weight: var(--font-weight-heading); color: var(--green); }
.dash-evnote { margin: 8px 0 0; font-size: .76rem; color: var(--muted); line-height: 1.45; }

.dash-row { display: flex; gap: var(--space-1); flex-wrap: wrap; align-items: center; }
.dash-row .grow { margin-right: auto; color: var(--muted); font-size: .85rem; }
.dash-row button { width: auto; margin: 0; }
.btn-small { padding: 5px 11px; min-height: 32px; font-size: .82rem; width: auto; margin: 0; }
.btn-small[aria-pressed="true"] { border-color: var(--accent-edge); color: var(--green); font-weight: var(--font-weight-heading); }

.dash-login { width: min(100%, 460px); margin: var(--space-3) auto; }
.dash-spin { color: var(--muted); font-size: .85rem; padding: var(--space-3); text-align: center; }
