/* Usage page
   ------------------------------------------------------------ */

.usage-page {
  max-width: 1100px;
}

/* Shared header styles (consistent with API keys) */

.page-header h1 {
  margin-bottom: 0.25rem;
}

.page-subtext {
  color: var(--text-muted);
  font-size: 0.95rem;
}

/* Top block: metrics + limit */

.usage-top {
  margin-top: 2rem;
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 1.2fr);
  gap: 1.75rem;
}

/* Metric cards */

.usage-metrics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1rem;
}

.usage-card {
  background: var(--card);
  border-radius: var(--radius-lg);
  border: 1px solid var(--outline);
  padding: 1.25rem 1.4rem;
  box-shadow: 0 0 14px rgba(0, 0, 0, 0.4);
}

.usage-card h3 {
  margin-bottom: 0.35rem;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.usage-number {
  font-size: 1.6rem;
  font-weight: 700;
}

.usage-label {
  margin-top: 0.25rem;
  color: var(--text-muted);
  font-size: 0.85rem;
}

/* Rate limit card */

.usage-limit-card {
  background: var(--bg-muted);
  border-radius: var(--radius-lg);
  border: 1px solid var(--outline);
  padding: 1.4rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}

.limit-header {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  align-items: center;
}

.limit-header h2 {
  font-size: 1.05rem;
}

.limit-pill {
  padding: 0.25rem 0.75rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* Progress bar */

.progress-wrapper {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.progress-track {
  width: 100%;
  height: 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.progress-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--primary), var(--primary-light));
  box-shadow: 0 0 12px rgba(255, 102, 0, 0.6);
}

/* Default fill for the usage progress bar */
.progress-bar-32 {
  width: 32%;
}


.progress-meta {
  display: flex;
  justify-content: space-between;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.progress-footnote {
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* Chart section */

.usage-chart-section {
  margin-top: 2.5rem;
}

.chart-card {
  background: var(--card);
  border-radius: var(--radius-lg);
  border: 1px solid var(--outline);
  padding: 1.75rem 1.75rem 1.4rem;
  box-shadow: 0 0 16px rgba(0, 0, 0, 0.45);
}

.chart-header {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: flex-start;
  margin-bottom: 1.4rem;
}

.chart-header h2 {
  margin-bottom: 0.25rem;
}

.chart-subtext {
  color: var(--text-muted);
  font-size: 0.9rem;
}

.chart-config-btn {
  font-size: 0.85rem;
  opacity: 0.7;
  cursor: default;
}

/* Placeholder "chart" visual */

.chart-placeholder {
  position: relative;
  border-radius: var(--radius-lg);
  border: 1px dashed rgba(255, 255, 255, 0.26);
  background: linear-gradient(
    135deg,
    rgba(255, 102, 0, 0.06),
    rgba(0, 0, 0, 0.5)
  );
  padding: 1.75rem 1.5rem;
  overflow: hidden;
}

.chart-grid {
  position: absolute;
  inset: 0.8rem 0.9rem 1.3rem 0.9rem;
  display: grid;
  grid-template-rows: repeat(4, 1fr);
  pointer-events: none;
}

.chart-grid-line {
  border-top: 1px dashed rgba(255, 255, 255, 0.1);
}

.chart-curve {
  position: absolute;
  inset: 1.4rem 1.2rem 2.4rem;
  border-radius: 999px;
  border: 2px solid rgba(255, 132, 35, 0.8);
  box-shadow: 0 0 22px rgba(255, 102, 0, 0.6);
  transform: skewX(-6deg) scaleY(0.9);
}

.chart-placeholder-label {
  position: relative;
  display: inline-flex;
  margin-top: 3.1rem;
  padding: 0.3rem 0.7rem;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.6);
  font-size: 0.78rem;
  color: var(--text-muted);
}

/* Responsive */

@media (max-width: 980px) {
  .usage-top {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 720px) {
  .chart-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .progress-meta {
    flex-direction: column;
    gap: 0.15rem;
  }
}
/* HARD QUOTA STOP (FREE TIER CUTOFF) */

.progress-bar.limit-hit {
  background: #c62828;
  box-shadow: 0 0 14px rgba(198, 40, 40, 0.7);
}

.limit-hit-text {
  color: #c62828;
  font-weight: 700;
}
