/* Dashboard shell — Tailwind handles most layout; these support app.js + Chart.js */

.material-symbols-outlined {
  font-variation-settings: "FILL" 0, "wght" 400, "GRAD" 0, "opsz" 24;
  display: inline-block;
  line-height: 1;
  vertical-align: middle;
}

.glass-panel {
  background: rgba(24, 24, 27, 0.65);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.lock-container {
  position: relative;
}

/* Admin toolbar — clear locked vs unlocked */
.admin-btn--lock[data-admin-state="locked"] {
  background: rgba(245, 158, 11, 0.12);
  border-color: rgba(245, 158, 11, 0.45);
  color: #fbbf24;
}

.admin-btn--lock[data-admin-state="unlocked"] {
  background: rgba(34, 197, 94, 0.12);
  border-color: rgba(34, 197, 94, 0.45);
  color: #4ade80;
}

.admin-btn--refresh:disabled,
.admin-btn--run:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  filter: grayscale(0.4);
}

.admin-btn--refresh:not(:disabled) {
  display: inline-flex;
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.12);
}

.admin-btn--run:not(:disabled) {
  box-shadow: 0 0 0 1px rgba(173, 198, 255, 0.35);
}

.action-status--locked {
  color: #fbbf24;
  border-color: rgba(245, 158, 11, 0.35);
  background: rgba(245, 158, 11, 0.08);
}

.action-status--unlocked {
  color: #4ade80;
  border-color: rgba(34, 197, 94, 0.35);
  background: rgba(34, 197, 94, 0.08);
}

.action-status--busy {
  color: #adc6ff;
  border-color: rgba(77, 142, 255, 0.45);
  background: rgba(77, 142, 255, 0.12);
  animation: pulse-live 1.5s ease-in-out infinite;
}

.action-status--error {
  color: #f87171;
  border-color: rgba(239, 68, 68, 0.4);
  background: rgba(239, 68, 68, 0.1);
}

#race-status-badge.race--pending {
  color: #fbbf24;
  border-color: rgba(245, 158, 11, 0.35);
}

#race-status-badge.race--active {
  color: #4ade80;
  border-color: rgba(34, 197, 94, 0.35);
}

#race-status-badge.race--ended,
#race-status-badge.race--won {
  color: #adc6ff;
  border-color: rgba(173, 198, 255, 0.35);
}

#lock-verify-msg.ok {
  color: #4ade80;
}

#lock-verify-msg.err {
  color: #f87171;
}

.lock-popup {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 100;
  min-width: 260px;
  padding: 14px;
  background: #201f22;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5);
}

.lock-popup.hidden,
.hidden {
  display: none !important;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.custom-scrollbar::-webkit-scrollbar {
  width: 4px;
}
.custom-scrollbar::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.12);
  border-radius: 10px;
}

.chart-wrap {
  position: relative;
  height: 200px;
}

.ledger-row:hover {
  background: rgba(255, 255, 255, 0.03);
}

#btn-refresh.hidden {
  display: none !important;
}

#btn-refresh:not(.hidden) {
  display: inline-flex;
}

.schedule-chip.is-live,
#schedule-hint.is-live {
  color: #4edea3;
  animation: pulse-live 1.5s ease-in-out infinite;
}

@keyframes pulse-live {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.55; }
}

.tick-up {
  color: #22c55e !important;
  transition: color 0.35s ease;
}

.tick-down {
  color: #ef4444 !important;
  transition: color 0.35s ease;
}

.eod-report-markdown h2,
.eod-report-markdown h3 {
  font-size: 1rem;
  font-weight: 600;
  margin: 1rem 0 0.5rem;
}

.eod-report-markdown p,
.eod-report-markdown li {
  font-size: 0.875rem;
  color: #c2c6d6;
  line-height: 1.6;
}

.eod-report-markdown ul {
  margin-left: 1.25rem;
  list-style: disc;
}

@media (prefers-reduced-motion: reduce) {
  .schedule-chip.is-live,
  #schedule-hint.is-live {
    animation: none;
  }
  .tick-up,
  .tick-down {
    transition: none;
  }
}
