body {
  font-family: 'Special Elite', cursive;
  background-color: #0A0E1A;
  color: #E6E6FA;
  margin: 0;
  padding: 0;
  min-height: 100vh;
}

.usage-container {
  max-width: 1400px;
  margin: 20px auto;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

/* ── Page Header ─────────────────────────────────────── */

.usage-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

.usage-title {
  font-size: 2.2em;
  color: #00D4FF;
  margin: 0;
}

.usage-meta {
  font-size: 0.85em;
  color: #888;
}

/* ── Reconcile Controls ──────────────────────────────── */

.reconcile-bar {
  background: #1A1F33;
  border-radius: 8px;
  padding: 16px 20px;
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.reconcile-bar label {
  font-size: 0.95em;
  color: #00D4FF;
}

.reconcile-bar input[type="date"] {
  background: #2A2F44;
  border: 1px solid #3A3F55;
  color: #E6E6FA;
  padding: 6px 10px;
  border-radius: 4px;
  font-family: inherit;
  font-size: 0.9em;
}

.btn-reconcile {
  background: #00D4FF;
  color: #000;
  border: none;
  padding: 8px 18px;
  border-radius: 4px;
  cursor: pointer;
  font-family: inherit;
  font-size: 0.95em;
  font-weight: bold;
  transition: opacity 0.2s;
}

.btn-reconcile:hover { opacity: 0.85; }
.btn-reconcile:disabled { opacity: 0.4; cursor: not-allowed; }

.reconcile-status {
  font-size: 0.85em;
  padding: 4px 10px;
  border-radius: 4px;
}

.reconcile-status.status-running  { color: #FFD700; background: rgba(255,215,0,0.1); }
.reconcile-status.status-success  { color: #00FF00; background: rgba(0,255,0,0.08); }
.reconcile-status.status-error    { color: #FF4500; background: rgba(255,69,0,0.1); }

/* ── Summary Stats Row ───────────────────────────────── */

.stats-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.stat-card {
  background: #1A1F33;
  border-radius: 8px;
  padding: 18px 20px;
  text-align: center;
  border-top: 3px solid #2A2F44;
}

.stat-card.accent-blue  { border-top-color: #00D4FF; }
.stat-card.accent-gold  { border-top-color: #FFD700; }
.stat-card.accent-green { border-top-color: #00FF00; }
.stat-card.accent-purple { border-top-color: #9B59B6; }

.stat-label {
  font-size: 0.8em;
  color: #888;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 6px;
}

.stat-value {
  font-size: 1.9em;
  color: #E6E6FA;
  font-weight: bold;
}

/* ── Provider Cards ──────────────────────────────────── */

.provider-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.provider-card {
  background: #1A1F33;
  border-radius: 8px;
  padding: 16px 18px;
}

.provider-name {
  font-size: 0.8em;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 8px;
}

.provider-name.openai    { color: #74AA9C; }
.provider-name.anthropic { color: #D4AC87; }
.provider-name.grok      { color: #1DA1F2; }
.provider-name.replicate { color: #9B59B6; }
.provider-name.unknown   { color: #888; }

.provider-cost {
  font-size: 1.7em;
  color: #E6E6FA;
  margin-bottom: 6px;
}

.provider-meta {
  font-size: 0.78em;
  color: #888;
  margin-bottom: 10px;
}

.provider-bar-track {
  height: 4px;
  background: #2A2F44;
  border-radius: 2px;
  overflow: hidden;
}

.provider-bar-fill {
  height: 100%;
  border-radius: 2px;
  transition: width 0.4s;
}

.provider-bar-fill.openai    { background: #74AA9C; }
.provider-bar-fill.anthropic { background: #D4AC87; }
.provider-bar-fill.grok      { background: #1DA1F2; }
.provider-bar-fill.replicate { background: #9B59B6; }
.provider-bar-fill.unknown   { background: #888; }

.provider-card--inactive {
  opacity: 0.5;
  border: 1px dashed #2A2F44;
}

.provider-cost--na {
  color: #555;
}

.provider-hint {
  font-size: 0.72em;
  color: #666;
  line-height: 1.4;
  margin-top: 4px;
}

/* ── 30-Day Trend Chart ──────────────────────────────── */

.chart-card {
  background: #1A1F33;
  border-radius: 8px;
  padding: 20px;
}

.chart-card h2 {
  font-size: 1em;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #00D4FF;
  margin: 0 0 16px;
}

.trend-chart {
  display: flex;
  align-items: flex-end;
  height: 110px;
  gap: 3px;
}

.bar-col {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  height: 100%;
}

.bar-fill {
  width: 100%;
  background: linear-gradient(to top, #00D4FF, #007A99);
  border-radius: 2px 2px 0 0;
  min-height: 2px;
}

.bar-date {
  font-size: 0.6em;
  color: #555;
  margin-top: 4px;
  white-space: nowrap;
  height: 14px;
  line-height: 14px;
}

/* ── Shared Table Styles ─────────────────────────────── */

.section-card {
  background: #1A1F33;
  border-radius: 8px;
  padding: 20px;
}

.section-card h2 {
  font-size: 1em;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #00D4FF;
  margin: 0 0 14px;
}

.table-scroll {
  overflow-x: auto;
  max-height: 380px;
  overflow-y: auto;
}

.usage-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 600px;
  font-size: 0.85em;
}

.usage-table th {
  background: #2A2F44;
  color: #00D4FF;
  padding: 10px 12px;
  text-align: left;
  position: sticky;
  top: 0;
  z-index: 1;
  white-space: nowrap;
}

.usage-table td {
  padding: 9px 12px;
  border-bottom: 1px solid #1E2338;
  color: #E6E6FA;
}

.usage-table tr:hover td { background: rgba(0, 212, 255, 0.04); }

.usage-table .no-data {
  text-align: center;
  color: #555;
  padding: 24px;
}

.badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 0.8em;
  font-weight: bold;
}

.badge.openai    { background: rgba(116,170,156,0.15); color: #74AA9C; }
.badge.anthropic { background: rgba(212,172,135,0.15); color: #D4AC87; }
.badge.grok      { background: rgba(29,161,242,0.15);  color: #1DA1F2; }
.badge.replicate { background: rgba(155,89,182,0.15);  color: #9B59B6; }

.cost-cell { color: #FFD700; font-weight: bold; }
.zero-cost { color: #555; }

/* ── No Data State ───────────────────────────────────── */

.empty-state {
  text-align: center;
  padding: 40px;
  color: #555;
}

/* ── Mobile ──────────────────────────────────────────── */

@media (max-width: 900px) {
  .stats-row    { grid-template-columns: repeat(2, 1fr); }
  .provider-row { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 600px) {
  .stats-row    { grid-template-columns: 1fr 1fr; }
  .provider-row { grid-template-columns: 1fr 1fr; }
  .usage-title  { font-size: 1.6em; }
  .stat-value   { font-size: 1.4em; }

  .reconcile-bar { flex-direction: column; align-items: stretch; }
  .btn-reconcile  { width: 100%; }
}
