/* co dashboard: ops-2.css. Moved out of the Python modules (design-system's
   tokens plan, step 1, 2026-11-12); served by co_web at /static/css/ops-2.css. */
.refresh-note { color: var(--muted); font-size: 11px; text-align: right; margin-top: 12px; }
@media (max-width: 900px) {
  .grid-4, .grid-2, .grid { grid-template-columns: 1fr !important; }
  /* the six stat tiles: 6 wide, then 3 (a workspace panel, ~520px), 2 (phones), 1 */
  .grid-6 { grid-template-columns: repeat(3, 1fr) !important; gap: 10px !important; }
  .grid-6 .card { padding: 12px 12px; }
  .container { padding: 12px 16px; }
  /* Stack header: centered title over centered wrapping nav; hide the
     nav-spacer so the auth pill flows inline instead of floating to an edge. */
  header .container { flex-direction: column; align-items: stretch; gap: .5rem; }
  header h1 { font-size: 14px; text-align: center; }
  header .subtitle { font-size: 11px; text-align: center; }
  header nav { margin-left: 0; width: 100%; justify-content: center; flex-wrap: wrap; gap: 8px 14px; margin-top: 0; font-size: 13px; }
  header nav .nav-spacer { display: none; }
  .stat-value { font-size: 22px; }
  .card { padding: 12px; }
  .card h2 { font-size: 11px; }
  .controls { flex-wrap: wrap; }
  .chart-container { height: 35vh; min-height: 220px; }
  .tool-bar .name { width: 90px; font-size: 11px; }
  table.agents { font-size: 12px; }
  table.agents th, table.agents td { padding: 4px 6px; }
}
@media (max-width: 500px) {
  .grid-4 { grid-template-columns: 1fr 1fr !important; }
  .grid-2 { grid-template-columns: 1fr !important; }
  .stat-value { font-size: 18px; }
}
@media (max-width: 460px) {
  .grid-6 { grid-template-columns: 1fr 1fr !important; }
}
@media (max-width: 300px) {
  .grid-6 { grid-template-columns: 1fr !important; }
  header nav { gap: 8px; font-size: 12px; }
  .chart-container { height: 35vh; min-height: 200px; }
  .tool-bar .name { width: 70px; font-size: 10px; }
  /* On tablet hide model + disk to keep status/turns/tokens visible */
  table.agents td:nth-child(3), table.agents th:nth-child(3),
  table.agents td:nth-child(7), table.agents th:nth-child(7) { display: none; }
}
@media (max-width: 600px) {
  /* On phone keep agent, status, ctx tokens, win %, last active */
  table.agents td:nth-child(4), table.agents th:nth-child(4) { display: none; }
  /* Phone: each agent is a two-line row instead of a 10-column table (which
     was 431px wide in a 311px card and scrolled the page sideways).
     Line 1: dot + name + badges, status on the right.
     Line 2 (small, grey): ctx tokens, window %, last active.
     Columns: 1 agent, 2 status, 3 model, 4 turns, 5 ctx, 6 win %,
     7 memory, 8 disk, 9 last active. */
  table.agents, table.agents tbody { display: block; }
  table.agents thead { display: none; }
  table.agents tr:not(.section-label) { display: grid; grid-template-columns: auto auto minmax(0,1fr) auto;
      column-gap: 10px; row-gap: 2px; padding: 8px 6px; border-bottom: 1px solid var(--border); align-items: baseline; }
  table.agents tr:not(.section-label):last-child { border-bottom: none; }
  table.agents tr:not(.section-label) > td { display: none; padding: 0; border: 0; }
  table.agents tr:not(.section-label) > td:nth-child(1) { display: block; grid-column: 1 / 4; grid-row: 1;
      font-weight: 600; min-width: 0; overflow-wrap: anywhere; }
  table.agents tr:not(.section-label) > td:nth-child(2) { display: block; grid-column: 4; grid-row: 1; text-align: right; }
  table.agents tr:not(.section-label) > td:nth-child(5),
  table.agents tr:not(.section-label) > td:nth-child(6),
  table.agents tr:not(.section-label) > td:nth-child(9) { display: block; grid-row: 2; font-size: 12px;
      text-align: left; white-space: nowrap; }
  table.agents tr:not(.section-label) > td:nth-child(5) { grid-column: 1; }
  table.agents tr:not(.section-label) > td:nth-child(6) { grid-column: 2; }
  table.agents tr:not(.section-label) > td:nth-child(9) { grid-column: 3 / 5; text-align: right; }
  /* keep each cell's own colour (ctx / window % warnings, as on desktop);
     only the labels are grey */
  table.agents tr:not(.section-label) > td:nth-child(6)::before { content: "ctx "; color: var(--muted); font-weight: normal; }
  table.agents tr:not(.section-label) > td:nth-child(7)::before { content: "win "; color: var(--muted); font-weight: normal; }
  table.agents .section-label, table.agents .section-label td { display: block; }
}
