/* INVOXA: Dashboard 2.0 */

.dashboard-shell {
  color: #0f172a;
}

.dashboard-hero-panel,
.dashboard-panel,
.dashboard-kpis article {
  border: 1px solid #e5e7eb;
  border-radius: 1rem;
  background: #fff;
  box-shadow: 0 18px 42px rgba(15, 23, 42, .055);
}

.dashboard-hero-panel {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1.25rem;
  padding: 1.45rem;
  background:
    linear-gradient(135deg, rgba(255,255,255,.96), rgba(239,246,255,.92)),
    radial-gradient(circle at 12% 20%, rgba(79,70,229,.14), transparent 34%);
}

.dashboard-hero-panel span {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  color: #4338ca;
  font-size: .85rem;
  font-weight: 900;
}

.dashboard-hero-panel h1 {
  margin-top: .75rem;
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 950;
  line-height: 1.04;
  letter-spacing: 0;
}

.dashboard-hero-panel p {
  margin-top: .45rem;
  color: #64748b;
  font-weight: 750;
}

.dashboard-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: .65rem;
  justify-content: flex-end;
}

.dashboard-hero-actions a,
.dashboard-hero-actions button,
.dashboard-secondary-btn {
  display: inline-flex;
  min-height: 2.75rem;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  border-radius: .875rem;
  border: 1px solid #e5e7eb;
  background: #fff;
  color: #334155;
  padding: .72rem .95rem;
  font-weight: 900;
  transition: .18s ease;
}

.dashboard-hero-actions button {
  cursor: pointer;
}

.dashboard-hero-actions a:first-child {
  border-color: #4f46e5;
  background: #4f46e5;
  color: #fff;
  box-shadow: 0 12px 26px rgba(79, 70, 229, .23);
}

.dashboard-hero-actions a:hover,
.dashboard-hero-actions button:hover,
.dashboard-secondary-btn:hover {
  border-color: #c7d2fe;
  background: #eef2ff;
  color: #3730a3;
}

.dashboard-kpis {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: .85rem;
  margin-top: 1rem;
}

.dashboard-module-section {
  margin-top: 1rem;
  border: 1px solid #e5e7eb;
  border-radius: 1rem;
  background: #fff;
  padding: 1rem;
  box-shadow: 0 18px 42px rgba(15, 23, 42, .055);
}

.dashboard-section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: .9rem;
}

.dashboard-section-head span {
  color: #6366f1;
  font-size: .7rem;
  font-weight: 900;
  letter-spacing: .07em;
  text-transform: uppercase;
}

.dashboard-section-head h2 {
  margin-top: .15rem;
  color: #0f172a;
  font-size: 1.12rem;
  font-weight: 950;
}

.dashboard-section-head small {
  color: #64748b;
  font-size: .76rem;
  font-weight: 800;
}

.dashboard-module-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: .7rem;
}

.dashboard-module-card {
  --module-color: #4f46e5;
  --module-soft: #eef2ff;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: .75rem;
  min-width: 0;
  border: 1px solid #eef2f7;
  border-radius: .9rem;
  background: linear-gradient(135deg, #fff, #f8fafc);
  padding: .82rem;
  transition: border-color .16s ease, box-shadow .16s ease, transform .16s ease;
}

.dashboard-module-card.is-emerald { --module-color: #059669; --module-soft: #ecfdf5; }
.dashboard-module-card.is-amber { --module-color: #d97706; --module-soft: #fffbeb; }
.dashboard-module-card.is-violet { --module-color: #7c3aed; --module-soft: #f5f3ff; }
.dashboard-module-card.is-cyan { --module-color: #0891b2; --module-soft: #ecfeff; }
.dashboard-module-card.is-slate { --module-color: #475569; --module-soft: #f1f5f9; }

.dashboard-module-card:hover {
  border-color: color-mix(in srgb, var(--module-color) 35%, #e5e7eb);
  box-shadow: 0 12px 25px color-mix(in srgb, var(--module-color) 12%, transparent);
  transform: translateY(-2px);
}

.dashboard-module-card > span {
  display: inline-flex;
  width: 2.45rem;
  height: 2.45rem;
  align-items: center;
  justify-content: center;
  border-radius: .78rem;
  background: var(--module-soft);
  color: var(--module-color);
}

.dashboard-module-card strong,
.dashboard-module-card small {
  display: block;
}

.dashboard-module-card strong {
  overflow: hidden;
  color: #1e293b;
  font-size: .84rem;
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dashboard-module-card small {
  margin-top: .15rem;
  color: #64748b;
  font-size: .71rem;
  font-weight: 750;
}

.dashboard-module-card > i {
  color: #94a3b8;
  font-size: .72rem;
  transition: color .16s ease, transform .16s ease;
}

.dashboard-module-card:hover > i {
  color: var(--module-color);
  transform: translateX(2px);
}

.dashboard-kpis article {
  display: flex;
  align-items: flex-start;
  gap: .85rem;
  padding: 1rem;
}

.dashboard-kpis article > span {
  display: inline-flex;
  width: 2.65rem;
  height: 2.65rem;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  border-radius: .85rem;
  background: #eef2ff;
  color: #4f46e5;
}

.dashboard-kpis article.is-income > span { background: #ecfdf5; color: #059669; }
.dashboard-kpis article.is-expense > span { background: #fff7ed; color: #ea580c; }
.dashboard-kpis article.is-profit > span { background: #ecfeff; color: #0891b2; }
.dashboard-kpis article.is-negative > span { background: #fef2f2; color: #dc2626; }
.dashboard-kpis article.is-tax > span { background: #fffbeb; color: #d97706; }
.dashboard-kpis article.is-negative strong { color: #dc2626; }

.dashboard-kpis p {
  color: #64748b;
  font-size: .76rem;
  font-weight: 900;
}

.dashboard-kpis strong {
  display: block;
  margin-top: .2rem;
  color: #0f172a;
  font-size: 1.22rem;
  font-weight: 950;
}

.dashboard-kpis small {
  color: #64748b;
  font-weight: 800;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}

.dashboard-panel {
  padding: 1rem;
}

.dashboard-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: .85rem;
}

.dashboard-panel-head strong {
  color: #111827;
  font-size: 1rem;
  font-weight: 950;
}

.dashboard-panel-head span {
  border-radius: 999px;
  background: #f1f5f9;
  color: #64748b;
  font-size: .72rem;
  font-weight: 900;
  padding: .3rem .6rem;
}

.dashboard-open-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .65rem;
}

.dashboard-open-grid div,
.dashboard-task-list div,
.dashboard-task-list a,
.dashboard-activity div,
.dashboard-activity a,
.dashboard-roadmap div,
.dashboard-bars div {
  border: 1px solid #eef2f7;
  border-radius: .9rem;
  background: #fff;
}

.dashboard-open-grid div {
  padding: .82rem;
}

.dashboard-open-grid span,
.dashboard-open-grid small {
  display: block;
  color: #64748b;
  font-size: .78rem;
  font-weight: 850;
}

.dashboard-open-grid strong {
  display: block;
  margin: .25rem 0;
  color: #0f172a;
  font-size: 1.1rem;
  font-weight: 950;
}

.dashboard-open-grid .is-receivable strong { color: #2563eb; }
.dashboard-open-grid .is-payable strong { color: #d97706; }
.dashboard-open-grid .is-cashflow strong { color: #059669; }
.dashboard-open-grid .is-negative strong,
.dashboard-open-grid .is-overdue strong { color: #dc2626; }

.dashboard-task-list,
.dashboard-bars,
.dashboard-activity,
.dashboard-roadmap {
  display: grid;
  gap: .62rem;
}

.dashboard-task-list div,
.dashboard-task-list a {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: .7rem;
  padding: .78rem;
}

.dashboard-task-list a:hover,
.dashboard-activity a:hover {
  border-color: #c7d2fe;
  background: #f8fafc;
}

.dashboard-task-list a > i:last-child {
  color: #94a3b8;
  font-size: .7rem;
}

.dashboard-task-list i {
  color: #4f46e5;
}

.dashboard-task-list .is-danger i { color: #dc2626; }
.dashboard-task-list .is-warning i { color: #d97706; }
.dashboard-task-list .is-success i { color: #059669; }

.dashboard-task-list strong,
.dashboard-activity strong,
.dashboard-roadmap span,
.dashboard-bars span {
  display: block;
  color: #334155;
  font-weight: 900;
}

.dashboard-task-list small,
.dashboard-activity small {
  display: block;
  color: #64748b;
  font-size: .78rem;
  font-weight: 750;
}

.dashboard-bars div {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: .35rem .8rem;
  padding: .78rem;
}

.dashboard-bars strong {
  color: #0f172a;
  font-weight: 950;
}

.dashboard-bars em {
  grid-column: 1 / -1;
  display: block;
  height: .48rem;
  overflow: hidden;
  border-radius: 999px;
  background: #e2e8f0;
}

.dashboard-bars i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #4f46e5, #22c55e);
}

.dashboard-activity div,
.dashboard-activity a {
  display: grid;
  grid-template-columns: 2.35rem minmax(0, 1fr) auto;
  align-items: center;
  gap: .7rem;
  padding: .72rem;
}

.dashboard-updated {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: .4rem;
  margin-top: 1rem;
  color: #64748b;
  font-size: .72rem;
  font-weight: 750;
}

.dashboard-updated i { color: #10b981; }

.dashboard-activity i,
.dashboard-roadmap i {
  display: inline-flex;
  width: 2.25rem;
  height: 2.25rem;
  align-items: center;
  justify-content: center;
  border-radius: .8rem;
  background: #eef2ff;
  color: #4f46e5;
}

.dashboard-activity b {
  color: #0f172a;
  font-weight: 950;
}

.dashboard-roadmap div {
  display: flex;
  align-items: flex-start;
  gap: .7rem;
  padding: .78rem;
}

.dashboard-forecast,
.dashboard-management-summary { display: grid; gap: .65rem; margin-bottom: .9rem; }
.dashboard-forecast > div,
.dashboard-management-summary > div { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .78rem; border-radius: .85rem; background: #f8fafc; }
.dashboard-forecast span,
.dashboard-management-summary span { display: grid; gap: .15rem; color: #64748b; font-size: .76rem; }
.dashboard-forecast strong { color: #0f172a; font-size: .86rem; }
.dashboard-forecast b,
.dashboard-management-summary strong { font-weight: 950; text-align: right; }
.dashboard-forecast b.is-positive,
.dashboard-management-summary > div:first-child strong { color: #15803d; }
.dashboard-forecast b.is-negative { color: #dc2626; }
.dashboard-forecast b.is-neutral { color: #475569; }
.dashboard-management-summary > div:last-child strong { color: #334155; }

.dashboard-empty,
.dashboard-soft-state,
.dashboard-error-state {
  min-height: 12rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: .55rem;
  color: #64748b;
  text-align: center;
  font-weight: 800;
}

.dashboard-soft-state i,
.dashboard-error-state i {
  display: inline-flex;
  width: 2.75rem;
  height: 2.75rem;
  align-items: center;
  justify-content: center;
  border-radius: .9rem;
  background: #eef2ff;
  color: #4f46e5;
}

.dashboard-error-state i {
  background: #fef2f2;
  color: #dc2626;
}

.dashboard-soft-state strong,
.dashboard-error-state strong {
  color: #0f172a;
  font-weight: 950;
}

@media (max-width: 980px) {
  .dashboard-kpis,
  .dashboard-grid,
  .dashboard-open-grid,
  .dashboard-module-grid {
    grid-template-columns: 1fr;
  }

  .dashboard-hero-panel {
    align-items: flex-start;
    flex-direction: column;
  }

  .dashboard-hero-actions,
  .dashboard-hero-actions a,
  .dashboard-hero-actions button {
    width: 100%;
  }

  .dashboard-section-head {
    align-items: flex-start;
    flex-direction: column;
  }
}
