/* Reusable UI component styling: stat cards, progress, badges, toasts, skeletons, empty states. */

.mt-stat-card {
  border-radius: 0.85rem;
  padding: 1.1rem 1.25rem;
  height: 100%;
}

.mt-stat-card .mt-stat-label {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
}

.mt-stat-card .mt-stat-value {
  font-size: 1.6rem;
  font-weight: 700;
  margin-top: 0.15rem;
}

.mt-stat-card .mt-stat-icon {
  width: 42px;
  height: 42px;
  border-radius: 0.6rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--brand-glow);
  color: var(--brand);
  font-size: 1.2rem;
}

.mt-progress {
  height: 8px;
  border-radius: 4px;
  background-color: var(--bg-hover);
  overflow: hidden;
}

.mt-progress > span {
  display: block;
  height: 100%;
  background-color: var(--brand);
  border-radius: 4px;
  transition: width 0.3s ease;
}

.mt-progress.warn > span {
  background-color: var(--warning);
}

.mt-progress.danger > span {
  background-color: var(--danger);
}

.mt-badge-status {
  font-size: 0.72rem;
  padding: 0.3em 0.6em;
  border-radius: 999px;
  font-weight: 600;
}

.mt-empty-state {
  text-align: center;
  padding: 3rem 1rem;
  color: var(--text-muted);
}

.mt-empty-state i {
  font-size: 2.4rem;
  color: var(--brand);
  opacity: 0.6;
  margin-bottom: 0.75rem;
  display: block;
}

.mt-skeleton {
  background: linear-gradient(90deg, var(--bg-hover) 25%, var(--border) 37%, var(--bg-hover) 63%);
  background-size: 400% 100%;
  animation: mt-skeleton-shine 1.4s ease infinite;
  border-radius: 0.5rem;
}

@keyframes mt-skeleton-shine {
  0% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0 50%;
  }
}

#toast-container {
  position: fixed;
  top: 1rem;
  right: 1rem;
  z-index: 1080;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.mt-alert-banner {
  border-left: 4px solid var(--warning);
  background-color: var(--bg-card);
  border-radius: 0.5rem;
  padding: 0.75rem 1rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.mt-alert-banner.danger {
  border-left-color: var(--danger);
}

.mt-fab {
  position: fixed;
  right: 1.25rem;
  bottom: 5.5rem;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background-color: var(--brand);
  color: #fff;
  display: none;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  box-shadow: var(--shadow);
  z-index: 1040;
  border: none;
}

@media (max-width: 991.98px) {
  .mt-fab {
    display: flex;
  }
}

/* ============================================================
   Dashboard: Modern App-Like Layout with Scrollable Cards
   ============================================================ */

/* Horizontal scrollable KPI cards wrapper */
.mt-dashboard-scroll-wrapper {
  overflow-x: auto;
  overflow-y: hidden;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 0.5rem;
}

.mt-dashboard-scroll {
  display: flex;
  gap: 1rem;
  flex-wrap: nowrap;
  min-width: min-content;
  padding: 0.25rem 0;
}

.mt-dashboard-scroll::-webkit-scrollbar {
  height: 4px;
}

.mt-dashboard-scroll::-webkit-scrollbar-track {
  background: transparent;
}

.mt-dashboard-scroll::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 2px;
}

.mt-dashboard-scroll::-webkit-scrollbar-thumb:hover {
  background: var(--text-muted);
}

.mt-dashboard-scroll-card {
  flex-shrink: 0;
  min-width: 220px;
}

/* Modern stat card styling */
.mt-stat-card-modern {
  display: flex;
  flex-direction: column;
  height: 100%;
  border-radius: 0.85rem;
  position: relative;
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.mt-stat-card-modern:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-hover);
}

.mt-stat-card-modern .mt-stat-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  font-weight: 600;
}

.mt-stat-card-modern .mt-stat-value {
  font-size: 1.75rem;
  font-weight: 700;
  line-height: 1.2;
}

.mt-stat-icon-modern {
  position: absolute;
  top: 0.5rem;
  right: 0.75rem;
  font-size: 1.8rem;
  opacity: 0.3;
}

/* Compact stat icon for secondary cards */
.mt-stat-icon-compact {
  font-size: 1.5rem;
  opacity: 0.8;
}

/* Dashboard chart containers */
#dashboard-chart-1,
#dashboard-chart-2,
#dashboard-chart-3 {
  max-height: 100%;
}
