/* ================================================================
   RSB-4220 poller - additions on top of the WEBSTYLE base
   ================================================================ */

/* value cell: mono, one constant colour for every data type - only the text updates, never the
   colour (no flash, no red on a dropped read, no on/off colour). */
td.value { color: var(--text-primary); font-weight: 600; text-align: right; }
td.value .units { color: var(--text-muted); font-size: 11px; margin-left: 4px; font-weight: 400; }
td.num { text-align: right; }

/* bucket badge colour accents in the sidebar/nav */
.badge.ain { color: var(--info); }
.badge.bin { color: #ab47bc; }
.badge.ao  { color: var(--accent); }
.badge.bo  { color: var(--warning); }

/* device detail rows in the sidebar */
.kv { display: flex; justify-content: space-between; gap: 8px; padding: 4px 0; font-size: 12px; }
.kv .k { color: var(--text-muted); }
.kv .v { color: var(--text-primary); font-family: var(--font-mono); text-align: right; word-break: break-all; }

/* panel with no rows yet */
.bucket-empty { color: var(--text-muted); font-size: 12px; padding: 14px 16px; }

/* keep the id column tight */
td.id, th.id { width: 52px; color: var(--accent); }
td.inst, th.inst { width: 56px; text-align: right; }

/* command controls on output rows */
td.cmd { white-space: nowrap; text-align: right; }
th.cmdh { text-align: right; }
td.cmd .cmd-inp {
  width: 120px; padding: 2px 8px; margin-right: 4px;
  background: var(--bg-tertiary); border: 1px solid var(--border); border-radius: 4px;
  color: var(--text-primary); font-family: var(--font-mono); font-size: 12px; text-align: right;
}
td.cmd .cmd-inp:focus { outline: none; border-color: var(--accent); }
/* remove the number spinner arrows */
td.cmd .cmd-inp::-webkit-outer-spin-button,
td.cmd .cmd-inp::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
td.cmd .cmd-inp { -moz-appearance: textfield; appearance: textfield; }
td.cmd .btn { padding: 2px 10px; }

/* two-column panel layout so all buckets fit without scrolling */
.content-area { padding: 12px; }
#panels {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  align-items: start;
}
#panels .panel { margin-bottom: 0; }
#panels table th { padding: 4px 10px; }
#panels table td { padding: 3px 10px; }
#panels .panel-header { padding: 8px 12px; }
@media (max-width: 760px) { #panels { grid-template-columns: 1fr; } }
