.page-dashboards .dashboard-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.25rem;
}

.page-dashboards .dashboard-filters .btn.active {
  border-color: var(--gold);
  color: var(--gold-light);
}

.dashboard-flow {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: nowrap;
  gap: 0.35rem 0.5rem;
  margin-bottom: 1.25rem;
  padding: 1.25rem 1.5rem;
  background: var(--surface-raised);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius);
  background-image: linear-gradient(
    135deg,
    rgba(201, 162, 39, 0.06) 0%,
    transparent 55%
  );
}

.dashboard-flow-step {
  display: flex;
  flex: 1 1 0;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 0.4rem;
  min-width: 5.75rem;
  max-width: 9.5rem;
  padding: 0 0.35rem;
  text-align: center;
}

.dashboard-flow-icon {
  flex-shrink: 0;
  width: 2.75rem;
  height: 2.75rem;
  color: #c9a227;
  display: flex;
  align-items: center;
  justify-content: center;
}

.dashboard-flow-icon svg {
  width: 100%;
  height: 100%;
  display: block;
}

.dashboard-flow-value {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1.15;
}

.dashboard-flow-label {
  margin: 0;
  font-size: 0.78rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  line-height: 1.35;
  max-width: 100%;
  text-wrap: balance;
}

.dashboard-flow-connector {
  flex: 0 0 auto;
  align-self: center;
  width: 2.75rem;
  color: #c9a227;
  opacity: 0.65;
}

.dashboard-flow-connector svg {
  width: 100%;
  height: auto;
  display: block;
}

@media (max-width: 640px) {
  .dashboard-flow {
    flex-wrap: nowrap;
    justify-content: flex-start;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding: 1.25rem 1rem;
    scroll-snap-type: x proximity;
  }

  .dashboard-flow-step {
    flex: 0 0 auto;
    min-width: 7.5rem;
    max-width: 9.5rem;
    scroll-snap-align: center;
  }

  .dashboard-flow-connector {
    width: 2rem;
    flex-shrink: 0;
  }
}

@media (max-width: 400px) {
  .dashboard-flow {
    flex-direction: column;
    align-items: center;
    overflow-x: visible;
    scroll-snap-type: none;
    gap: 0.5rem;
  }

  .dashboard-flow-step {
    flex: 0 0 auto;
    min-width: 8rem;
    max-width: 14rem;
  }

  .dashboard-flow-connector {
    width: 1.5rem;
    transform: rotate(90deg);
  }
}

.dashboard-kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.dashboard-time-hero {
  margin-bottom: 1.75rem;
}

.dashboard-time-hero-inner {
  position: relative;
  overflow: hidden;
  padding: 2rem 1.75rem 1.65rem;
  border-radius: calc(var(--radius) + 4px);
  border: 1px solid rgba(201, 162, 39, 0.4);
  background:
    radial-gradient(ellipse 90% 70% at 50% -20%, rgba(201, 162, 39, 0.22) 0%, transparent 58%),
    radial-gradient(ellipse 70% 55% at 100% 0%, rgba(201, 162, 39, 0.12) 0%, transparent 52%),
    radial-gradient(ellipse 55% 45% at 0% 100%, rgba(201, 162, 39, 0.08) 0%, transparent 48%),
    linear-gradient(165deg, rgba(201, 162, 39, 0.09) 0%, transparent 45%),
    var(--surface-raised);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.05) inset,
    0 12px 40px rgba(0, 0, 0, 0.18),
    0 0 48px rgba(201, 162, 39, 0.08);
}

.dashboard-time-hero-inner::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(circle at 50% 0%, rgba(229, 193, 113, 0.12) 0%, transparent 42%);
  opacity: 0.9;
}

.dashboard-time-hero-header {
  position: relative;
  text-align: center;
  margin-bottom: 1.5rem;
  padding-bottom: 0.15rem;
}

.dashboard-time-hero-eyebrow {
  margin: 0 0 0.85rem;
  max-width: 28rem;
  margin-left: auto;
  margin-right: auto;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--gold-light, #e5c171);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  line-height: 1.45;
}

.dashboard-time-hero-value {
  margin: 0;
  font-size: clamp(2.65rem, 6.2vw, 3.75rem);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.03em;
  color: var(--gold-light, #e5c171);
  background: linear-gradient(180deg, #f0d48a 0%, #e5c171 42%, #c9a227 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 0 28px rgba(201, 162, 39, 0.45));
}

.dashboard-time-hero-bar {
  position: relative;
  max-width: 36rem;
  margin: 0 auto 1.5rem;
}

.dashboard-time-hero-bar-track {
  width: 100%;
  height: 0.5rem;
  border-radius: 999px;
  background: linear-gradient(90deg, #a8841f 0%, #e5c171 55%, #f0d48a 100%);
  border: 1px solid rgba(201, 162, 39, 0.25);
  box-shadow: 0 0 14px rgba(201, 162, 39, 0.35);
}

.dashboard-time-hero-metrics {
  position: relative;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: stretch;
  gap: 0;
  padding-top: 1.35rem;
  border-top: 1px solid rgba(201, 162, 39, 0.2);
}

.dashboard-time-hero-divider {
  width: 1px;
  margin: 0.15rem 1.25rem;
  background: linear-gradient(
    180deg,
    transparent 0%,
    rgba(201, 162, 39, 0.28) 20%,
    rgba(201, 162, 39, 0.28) 80%,
    transparent 100%
  );
}

.dashboard-time-hero-metric {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.65rem;
  min-width: 0;
  padding: 0.15rem 0.25rem;
  text-align: center;
}

.dashboard-time-hero-metric-body {
  text-align: center;
}

.dashboard-time-hero-metric-icon {
  flex-shrink: 0;
  width: 1.85rem;
  height: 1.85rem;
  color: #c9a227;
  opacity: 0.55;
}

.dashboard-time-hero-metric-icon svg {
  width: 100%;
  height: 100%;
  display: block;
}

.dashboard-time-hero-metric-label {
  margin: 0 0 0.35rem;
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--muted);
  text-transform: none;
  letter-spacing: 0.01em;
  line-height: 1.35;
}

.dashboard-time-hero-metric-value {
  margin: 0;
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--text);
  opacity: 0.88;
  line-height: 1.25;
}

@media (max-width: 820px) {
  .dashboard-time-hero-inner {
    padding: 1.65rem 1.25rem 1.4rem;
  }

  .dashboard-time-hero-metrics {
    grid-template-columns: 1fr;
    gap: 1.1rem;
  }

  .dashboard-time-hero-divider {
    display: none;
  }
}

.dashboard-kpi-grid--single {
  grid-template-columns: minmax(14rem, 22rem);
  justify-content: center;
}

.dashboard-kpi {
  background: var(--surface-raised);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius);
  padding: 1rem 1.1rem;
}

.dashboard-kpi-label {
  margin: 0 0 0.35rem;
  font-size: 0.82rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.dashboard-kpi-value {
  margin: 0;
  font-size: 1.65rem;
  font-weight: 700;
  color: var(--text);
}

.dashboard-kpi-sub {
  margin: 0.35rem 0 0;
  font-size: 0.85rem;
  color: var(--muted);
}

.dashboard-charts-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-auto-rows: 1fr;
  align-items: stretch;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

@media (max-width: 720px) {
  .dashboard-charts-grid {
    grid-template-columns: 1fr;
    grid-auto-rows: auto;
  }
}

.page-dashboards .dashboard-charts-grid .dashboard-chart-card {
  margin-top: 0;
  display: flex;
  flex-direction: column;
  align-self: stretch;
  min-height: 16rem;
  height: 100%;
}

.page-dashboards .dashboard-chart-card h2 {
  flex-shrink: 0;
}

.chart-canvas-wrap {
  position: relative;
  flex: 1 1 0;
  min-height: 14rem;
  display: flex;
  flex-direction: column;
}

.chart-canvas-wrap canvas {
  display: block;
  flex: 1 1 0;
  width: 100% !important;
  max-width: 100%;
  min-height: 14rem;
}

.page-dashboards .dashboard-activity-card {
  margin-top: 0;
}

.chart-error {
  margin: 0;
  padding: 2.5rem 1rem;
  text-align: center;
  color: var(--error, #e57373);
  font-size: 0.92rem;
}

.chart-empty {
  margin: 0;
  padding: 3rem 1rem;
  text-align: center;
  color: var(--muted);
  font-size: 0.92rem;
}

.chart-canvas-wrap.chart-has-data .chart-empty {
  display: none;
}

.dashboard-activity-table-wrap {
  overflow-x: auto;
}

.dashboard-activity-table {
  width: 100%;
  border-collapse: collapse;
}

.dashboard-activity-table th,
.dashboard-activity-table td {
  padding: 0.65rem 0.75rem;
  border-bottom: 1px solid var(--border-subtle);
  text-align: left;
  font-size: 0.92rem;
}

.dashboard-activity-table th {
  color: var(--muted);
  font-weight: 600;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.dashboard-empty {
  color: var(--muted);
  padding: 2rem 1rem;
  text-align: center;
}

.dashboard-loading {
  color: var(--muted);
  padding: 1rem 0;
}

.dashboard-widgets-loading .dashboard-flow,
.dashboard-widgets-loading .dashboard-time-hero,
.dashboard-widgets-loading .dashboard-charts-grid,
.dashboard-widgets-loading .dashboard-activity-card {
  opacity: 0.72;
  transition: opacity 0.15s ease;
}

.chart-loading {
  margin: 0;
  padding: 3rem 1rem;
  text-align: center;
  color: var(--muted);
  font-size: 0.92rem;
}

.chart-canvas-wrap.chart-has-data .chart-loading {
  display: none;
}

.user-mgmt-col-dashboard {
  width: 8.5rem;
}

.user-mgmt-dashboard-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.88rem;
}
