@keyframes progress-slide {
  0% {
    transform: translateX(-200%);
  }
  100% {
    transform: translateX(400%);
  }
}
.row-pulling {
  background: rgba(59, 130, 246, 0.05) !important;
}
.row-destroying {
  opacity: 0.3;
  transition: opacity 0.5s;
}

/* Nav — sticky with frosted glass */
#dashboard > nav {
  background: rgba(10, 10, 10, 0.8);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  position: sticky;
  top: 0;
  z-index: 40;
}

/* Mini cards — subtle border change on hover, no scale/glow */
#minis-grid > div {
  transition: border-color 0.15s ease;
}

/* Table rows */
tbody tr {
  transition: background 0.12s ease;
}
tbody tr:hover {
  background: rgba(255, 255, 255, 0.03);
}

/* Scrollable chart wrappers — canvas grows wider than the container as data accumulates,
   and the user can drag/scroll horizontally to inspect older points. */
.chart-scroll {
  overflow-x: auto;
  overflow-y: hidden;
  overscroll-behavior-x: contain;
}
.chart-scroll canvas {
  display: block;
  max-width: none;
}

/* Modals — shared shell. Wrap the backdrop in .uc-modal and the panel
   in .uc-modal-card; layouts can still override max-w via inline class. */
.uc-modal {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
}
.uc-modal.hidden {
  display: none;
}
.uc-modal-card {
  position: relative;
  width: 100%;
  max-height: 88vh;
  overflow: hidden;
  background: #141414;
  border: 1px solid #262626;
  border-radius: 1rem;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.55);
  display: flex;
  flex-direction: column;
}
.uc-modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.1rem 1.25rem;
  border-bottom: 1px solid rgba(38, 38, 38, 0.7);
}
.uc-modal-title {
  font-size: 1rem;
  font-weight: 600;
  color: #fff;
  line-height: 1.25;
}
.uc-modal-subtitle {
  font-size: 0.8125rem;
  color: #a3a3a3;
  margin-top: 0.25rem;
}
.uc-modal-close {
  color: #a3a3a3;
  font-size: 1.25rem;
  line-height: 1;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0 0.25rem;
}
.uc-modal-close:hover {
  color: #fff;
}
.uc-modal-body {
  padding: 1.25rem;
  overflow-y: auto;
  flex: 1 1 auto;
}
.uc-modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
  padding: 0.875rem 1.25rem;
  border-top: 1px solid rgba(38, 38, 38, 0.7);
}

/* Toast notifications */
#toast-container {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}
.toast {
  pointer-events: auto;
  background: #141414;
  border: 1px solid #262626;
  border-radius: 8px;
  padding: 10px 16px;
  font-size: 13px;
  color: #e5e5e5;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.5);
  animation: toast-in 0.3s ease forwards;
  max-width: 360px;
}
.toast.toast-success {
  border-color: #22c55e40;
}
.toast.toast-error {
  border-color: #ef444440;
}
.toast.toast-info {
  border-color: #3b82f640;
}
.toast.removing {
  animation: toast-out 0.25s ease forwards;
}
@keyframes toast-in {
  from {
    opacity: 0;
    transform: translateX(80px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}
@keyframes toast-out {
  from {
    opacity: 1;
    transform: translateX(0);
  }
  to {
    opacity: 0;
    transform: translateX(80px);
  }
}
