/* Styles specific to the dashboard view. Shared rules live in base.css. */

/* --- Sub-tab bar (Overview / SOP / Users) inside the Dashboard page --- */
.subtabs {
  display: flex;
  gap: 8px;
  margin: 0 0 16px;
}

.subtab {
  border: 1px solid var(--border);
  background: #fff;
  color: var(--muted);
  border-radius: 999px;
  padding: 7px 16px;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

.subtab:hover {
  border-color: #b9c3cf;
}

.subtab.is-active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.dash__view {
  display: grid;
  gap: 16px;
}

/* --- Overview toolbar: user filter + date-range buttons --- */
.ov {
  display: grid;
  gap: 16px;
}

.ov-userfilter {
  min-width: 260px;
}

/* Replace the native dropdown arrow with a custom chevron so we can inset it
   from the right border (padding-right alone can't move the native arrow). */
.ov-userfilter select {
  appearance: none;
  -webkit-appearance: none;
  padding-right: 34px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='M2 4l4 4 4-4' fill='none' stroke='%23667085' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 12px 12px;
}

.ov-range {
  display: inline-flex;
  gap: 6px;
}

.ov-range__btn.is-active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

/* --- Line chart (Chart.js canvas) --- */
.ov-chart {
  position: relative;
  width: 100%;
  height: 320px;
}

.ov-chart canvas {
  display: block;
}

.ov-nodata {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
}

.ov-nodata[hidden] {
  display: none;
}

.ov-hint {
  margin-top: 10px;
  font-size: 13px;
}

/* --- Count tables --- */
.ov-tables {
  align-items: start;
}

.ov-num {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.ov-row {
  cursor: pointer;
}

.ov-row:hover td {
  background: #f4f8ff;
}

.ov-row.is-selected td {
  background: #e6f0ff;
}

.ov-row.is-selected td:first-child {
  box-shadow: inset 3px 0 0 var(--accent);
}

.ov-qfilter {
  margin: -6px 0 12px;
  font-size: 13px;
}
