/* CostGuard AI — Shared Styles */
:root {
  --bg: #0f1117;
  --surface: #1a1d27;
  --surface-hover: #22263a;
  --border: #2a2e3d;
  --text: #e4e6eb;
  --text-muted: #8b8fa3;
  --accent: #6c5ce7;
  --accent-light: #a29bfe;
  --green: #00b894;
  --red: #e17055;
  --orange: #fdcb6e;
  --radius: 12px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
}

a { color: var(--accent-light); text-decoration: none; }
a:hover { text-decoration: underline; }

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ---- Navigation ---- */
nav {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 16px 0;
}
nav .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
nav .logo {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--text);
}
nav .logo span { color: var(--accent-light); }
nav .nav-links a {
  margin-left: 24px;
  color: var(--text-muted);
  font-size: 0.95rem;
}
nav .nav-links a:hover { color: var(--text); text-decoration: none; }

/* ---- Buttons ---- */
.btn {
  display: inline-block;
  padding: 12px 28px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  border: none;
  transition: background 0.2s, transform 0.1s;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary {
  background: var(--accent);
  color: #fff;
}
.btn-primary:hover { background: var(--accent-light); color: #000; text-decoration: none; }
.btn-outline {
  background: transparent;
  color: var(--accent-light);
  border: 1px solid var(--accent);
}

/* ---- Cards ---- */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
}

/* ---- Stat Cards Grid ---- */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}
.stat-card {
  text-align: center;
}
.stat-card .label {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 4px;
}
.stat-card .value {
  font-size: 1.8rem;
  font-weight: 700;
}
.stat-card .value.green { color: var(--green); }
.stat-card .value.red { color: var(--red); }
.stat-card .value.orange { color: var(--orange); }
.stat-card .value.accent { color: var(--accent-light); }

/* ---- Chart Container ---- */
.chart-container {
  position: relative;
  height: 320px;
  margin-bottom: 24px;
}

/* ---- Models Table ---- */
.models-table {
  width: 100%;
  border-collapse: collapse;
}
.models-table th, .models-table td {
  padding: 12px 16px;
  text-align: left;
  border-bottom: 1px solid var(--border);
}
.models-table th {
  color: var(--text-muted);
  font-size: 0.85rem;
  text-transform: uppercase;
  font-weight: 600;
}
.models-table td { font-size: 0.95rem; }
.provider-badge {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
}
.provider-badge.openai { background: #10a37f22; color: #10a37f; }
.provider-badge.anthropic { background: #d4a27422; color: #d4a274; }

/* ---- Bar (pct) ---- */
.pct-bar-bg {
  background: var(--border);
  border-radius: 4px;
  height: 8px;
  width: 100%;
  max-width: 120px;
}
.pct-bar {
  height: 100%;
  border-radius: 4px;
  background: var(--accent);
}

/* ---- Alert Form ---- */
.alert-form {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
}
.alert-form input {
  padding: 10px 14px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  font-size: 1rem;
  width: 160px;
}
.alert-form input:focus { outline: none; border-color: var(--accent); }

/* ---- Controls ---- */
.controls {
  display: flex;
  gap: 12px;
  margin-bottom: 24px;
  flex-wrap: wrap;
  align-items: center;
}
.controls select {
  padding: 8px 14px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font-size: 0.9rem;
}
.controls select:focus { outline: none; border-color: var(--accent); }

/* ---- Hero (Landing) ---- */
.hero {
  text-align: center;
  padding: 80px 0 60px;
}
.hero h1 {
  font-size: 2.8rem;
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 20px;
}
.hero h1 span { color: var(--accent-light); }
.hero p {
  font-size: 1.2rem;
  color: var(--text-muted);
  max-width: 600px;
  margin: 0 auto 32px;
}

/* ---- Features Grid ---- */
.features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
  padding: 40px 0 80px;
}
.features .card h3 {
  margin-bottom: 8px;
  font-size: 1.1rem;
}
.features .card p {
  color: var(--text-muted);
  font-size: 0.95rem;
}
.features .card .icon {
  font-size: 2rem;
  margin-bottom: 12px;
}

/* ---- Footer ---- */
footer {
  border-top: 1px solid var(--border);
  padding: 24px 0;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.85rem;
}

/* ---- Section Headers ---- */
.section-header {
  margin-bottom: 16px;
}
.section-header h2 {
  font-size: 1.2rem;
  font-weight: 600;
}

/* ---- Dashboard Layout ---- */
.dash-section { margin-bottom: 32px; }

/* ---- Responsive ---- */
@media (max-width: 600px) {
  .hero h1 { font-size: 2rem; }
  .chart-container { height: 240px; }
}
