/* Dashboard tenant — layout limpio y responsive */
.dash {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  max-width: 1200px;
}

.dash__head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem 1rem;
}

.dash__title {
  margin: 0;
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.dash__subtitle {
  margin: 0.2rem 0 0;
  font-size: 0.85rem;
  color: var(--color-text-muted, #94a3b8);
}

.dash__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
}

.dash__range {
  margin: 0;
  font-size: 0.78rem;
  color: var(--color-text-muted, #94a3b8);
}

.dash-filters {
  display: inline-flex;
  padding: 3px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.45);
  border: 1px solid rgba(148, 163, 184, 0.22);
}

.dash-filter {
  border: none;
  background: transparent;
  color: #cbd5e1;
  font: inherit;
  font-size: 0.78rem;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}

.dash-filter:hover {
  color: #f8fafc;
}

.dash-filter.is-active {
  background: rgba(56, 189, 248, 0.22);
  color: #e0f2fe;
  font-weight: 600;
}

.dash-loading,
.dash-empty {
  margin: 0;
  padding: 1.25rem;
  text-align: center;
  color: var(--color-text-muted, #94a3b8);
  font-size: 0.88rem;
}

.dash-kpis {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.65rem;
}

.dash-kpi {
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 0.85rem;
  padding: 0.85rem 0.9rem;
  background: rgba(15, 23, 42, 0.35);
  min-height: 5.5rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.dash-kpi__label {
  margin: 0;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #94a3b8;
  line-height: 1.25;
}

.dash-kpi__value {
  margin: 0.35rem 0 0;
  font-size: 1.35rem;
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.02em;
}

.dash-kpi__hint {
  margin: 0.3rem 0 0;
  font-size: 0.72rem;
  color: #64748b;
}

.dash-kpi--emerald .dash-kpi__value { color: #6ee7b7; }
.dash-kpi--amber .dash-kpi__value { color: #fcd34d; }
.dash-kpi--sky .dash-kpi__value { color: #7dd3fc; }
.dash-kpi--violet .dash-kpi__value { color: #c4b5fd; }
.dash-kpi--rose .dash-kpi__value { color: #fda4af; }
.dash-kpi--orange .dash-kpi__value { color: #fdba74; }
.dash-kpi--teal .dash-kpi__value { color: #5eead4; }
.dash-kpi--slate .dash-kpi__value { color: #e2e8f0; font-size: 1.15rem; }

.dash-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
  padding: 0.55rem 0.75rem;
  border-radius: 0.65rem;
  background: rgba(15, 23, 42, 0.28);
  border: 1px dashed rgba(148, 163, 184, 0.18);
  font-size: 0.78rem;
  color: #94a3b8;
}

.dash-meta__item strong {
  color: #e2e8f0;
  font-weight: 600;
  margin-right: 0.25rem;
}

.dash-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 0.75rem;
}

.dash-panel {
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 0.85rem;
  padding: 0.85rem 0.95rem 1rem;
  background: rgba(15, 23, 42, 0.35);
}

.dash-panel__title {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 600;
}

.dash-panel__desc {
  margin: 0.2rem 0 0.65rem;
  font-size: 0.75rem;
  color: #94a3b8;
}

.dash-panel__canvas {
  position: relative;
  height: 240px;
}

.dash-panel__canvas--sm {
  height: 220px;
}

.dash-progress-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.dash-progress__head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.5rem;
}

.dash-progress__num {
  font-size: 0.78rem;
  font-weight: 700;
  color: #7dd3fc;
  letter-spacing: 0.02em;
}

.dash-progress__pct {
  font-size: 0.85rem;
  font-weight: 700;
  color: #6ee7b7;
}

.dash-progress__name {
  margin: 0.2rem 0 0.45rem;
  font-size: 0.82rem;
  color: #e2e8f0;
  line-height: 1.3;
}

.dash-progress__track {
  height: 7px;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.18);
  overflow: hidden;
}

.dash-progress__fill {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #34d399, #38bdf8);
}

.dash-progress__debt {
  margin: 0.35rem 0 0;
  font-size: 0.72rem;
  color: #94a3b8;
}

@media (max-width: 1100px) {
  .dash-kpis {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .dash-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 520px) {
  .dash-kpis {
    grid-template-columns: 1fr;
  }
  .dash-kpi__value {
    font-size: 1.2rem;
  }
  .dash__actions {
    width: 100%;
    justify-content: space-between;
  }
}
