/* ============================================================
   NexaGrid - Dashboard Overview (index.html)
   ============================================================ */

/* ================= Chart box ================= */
.chart-box {
  position: relative;
  height: 260px;
}

.chart-box canvas {
  width: 100% !important;
}

.legend-dot {
  width: 8px;
  height: 8px;
  border-radius: 3px;
  flex-shrink: 0;
}

.legend-item {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 11.5px;
  font-weight: 700;
  color: var(--muted);
}

.legend-item b {
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}

/* ================= Revenue overview ================= */
.revenue-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.revenue-title-row h2 {
  font-size: 15px;
  font-weight: 700;
  color: var(--ink);
}

.revenue-title-row p {
  font-size: 12px;
  color: var(--muted);
  margin-top: 4px;
}

.revenue-summary {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}

.revenue-metric .legend-item {
  font-size: 12px;
}

.revenue-metric b {
  display: block;
  font-size: 20px;
  font-weight: 600;
  color: var(--ink);
  margin-left: 15px;
  margin-top: 1px;
  font-variant-numeric: tabular-nums;
}

/* ================= Goal ring ================= */
.goal-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  text-align: center;
  padding: 6px 0 2px;
}

.goal-ring {
  position: relative;
  width: 168px;
  height: 168px;
}

.goal-ring svg {
  width: 168px;
  height: 168px;
  transform: rotate(-90deg);
  display: block;
}

.goal-ring .ring-track {
  fill: none;
  stroke: var(--canvas-1);
  stroke-width: 14;
}

.goal-ring .ring-value {
  fill: none;
  stroke: var(--accent);
  stroke-width: 14;
  stroke-linecap: round;
  stroke-dasharray: 477.5;
}

.goal-ring .ring-center {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
}

.goal-ring .ring-center b {
  font-size: 26px;
  font-weight: 600;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}

.goal-ring .ring-center span {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}

.goal-facts {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.goal-fact {
  padding: 12px 8px;
  background: var(--canvas);
  border-radius: var(--radius-md);
}

.goal-fact span {
  display: block;
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
}

.goal-fact b {
  display: block;
  font-size: 16px;
  font-weight: 600;
  color: var(--ink);
  margin-top: 3px;
  font-variant-numeric: tabular-nums;
}

/* ================= Recent projects ================= */
.project-progress {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 120px;
}

.project-progress .stat-track {
  flex: 1;
}

.support-pct {
  min-width: 44px;
  text-align: right;
  font-weight: 600;
  font-size: 11.5px;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}

.project-due {
  font-size: 12px;
  font-weight: 600;
  color: var(--ink);
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.team-stack {
  display: flex;
  align-items: center;
}

.team-avatar {
  width: 28px;
  height: 28px;
  border-radius: var(--radius-round);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.02em;
  border: 2px solid var(--surface);
  margin-left: -7px;
}

.team-avatar:first-child {
  margin-left: 0;
}

.team-more {
  background: var(--surface-inset);
  color: var(--muted);
}

.row-link-btn {
  width: 32px;
  height: 32px;
  border-radius: 9px;
  border: none;
  background: transparent;
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.12s ease, color 0.12s ease;
}

.row-link-btn:hover {
  background: var(--accent-soft);
  color: var(--accent);
}

.row-link-btn svg {
  width: 15px;
  height: 15px;
}

/* ================= Table footer / pager ================= */
.widget-table-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding-top: 14px;
  margin-top: 4px;
  border-top: 1px solid var(--surface-inset);
}

.widget-table-foot .foot-caption {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.pager {
  display: flex;
  align-items: center;
  gap: 4px;
}

.pager button {
  min-width: 30px;
  height: 30px;
  padding: 0 8px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--muted);
  border-radius: 8px;
  font-size: 11.5px;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 0.12s ease, color 0.12s ease, border-color 0.12s ease;
}

.pager button:hover:not(.current) {
  background: var(--accent-soft);
  color: var(--accent);
  border-color: transparent;
}

.pager button.current {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
  cursor: default;
}

.pager button.ghost {
  border: none;
  background: transparent;
  color: var(--muted);
}

/* ================= Responsive ================= */
@media (max-width: 1024px) {
  .goal-facts {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 640px) {
  .goal-facts {
    grid-template-columns: 1fr;
  }

  .chart-box {
    height: 220px;
  }
}
