.refresh-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-left: 12px;
  padding: 4px 10px;
  border: 1px solid #e2e8f0;
  background: #ffffff;
  border-radius: 999px;
  font-size: 12px;
  color: #475569;
  min-height: 28px;
  line-height: 1;
}

.refresh-status .spinner {
  width: 12px;
  height: 12px;
  border: 2px solid rgba(100, 116, 139, 0.25);
  border-top-color: #3b82f6;
  border-radius: 50%;
  animation: tb-spin 0.8s linear infinite;
}

@keyframes tb-spin {
  to { transform: rotate(360deg); }
}

/* Make negative (out-of-limit) rows more obvious without changing global styles */
#openOrdersTable tr.negative td {
  background: #fff1f2;
}

#openOrdersTable tr.negative:hover td {
  background: #ffe4e6;
}

/* Subtle buy/sell delineation (works alongside negative highlighting). */
#openOrdersTable tr.buy td:first-child,
#completedTable tr.buy td:first-child {
  box-shadow: inset 3px 0 0 rgba(16, 185, 129, 0.7);
}

#openOrdersTable tr.sell td:first-child,
#completedTable tr.sell td:first-child {
  box-shadow: inset 3px 0 0 rgba(239, 68, 68, 0.7);
}

#openOrdersTable tr.buy td:nth-child(2),
#completedTable tr.buy td:nth-child(2) {
  color: #047857;
  font-weight: 700;
}

#openOrdersTable tr.sell td:nth-child(2),
#completedTable tr.sell td:nth-child(2) {
  color: #b91c1c;
  font-weight: 700;
}

/* Slightly denser summary cards on this page */
.dashboard-cards .stat-card {
  padding: 12px 14px;
}
.dashboard-cards .stat-value {
  font-size: 1.25rem;
  letter-spacing: -0.01em;
}

/* Analysts can view the blotter, but hide sensitive internal IDs. */
body[data-role="analyst"] .col-order-id {
  display: none;
}

/* Sortable headers */
.coverage-table th.sortable {
  cursor: pointer;
  user-select: none;
}

.coverage-table th.sortable:hover {
  background: #f8fafc;
}

.coverage-table th.sortable.sorted.asc::after {
  content: " ▲";
  font-size: 0.65rem;
  color: #64748b;
}

.coverage-table th.sortable.sorted.desc::after {
  content: " ▼";
  font-size: 0.65rem;
  color: #64748b;
}

.coverage-table th.num-col,
.coverage-table td.num-cell {
  text-align: center;
  font-variant-numeric: tabular-nums;
}

.coverage-table td.filled-cell {
  min-width: 78px;
}

.fill-bar {
  position: relative;
  height: 20px;
  min-width: 68px;
  overflow: hidden;
  border: 1px solid #cbd5e1;
  border-radius: 4px;
  background: #f8fafc;
}

.fill-bar::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: var(--fill-pct, 0%);
  background: #bfdbfe;
}

.fill-bar span {
  position: relative;
  z-index: 1;
  display: block;
  color: #0f172a;
  font-size: 11px;
  font-weight: 700;
  line-height: 18px;
}
