:root {
  --bg: #f5f6f8;
  --surface: #ffffff;
  --text: #1d1f24;
  --muted: #6b7280;
  --border: #e3e5ea;
  --accent: #2563eb;
  --green: #15803d;
  --green-bg: #dcfce7;
  --red: #b91c1c;
  --red-bg: #fee2e2;
  --grey: #4b5563;
  --grey-bg: #e5e7eb;
  --radius: 10px;
  font-family: system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f1115;
    --surface: #181b22;
    --text: #e5e7eb;
    --muted: #9ca3af;
    --border: #2a2f3a;
    --green-bg: #14532d;
    --red-bg: #7f1d1d;
    --grey-bg: #374151;
  }
}

body {
  margin: 0;
  padding: 0 16px;
  line-height: 1.5;
  background-color: var(--bg);
  color: var(--text);
}

.container {
  max-width: 960px;
  margin: 0 auto;
}

nav {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  padding: 12px 0;
}

nav a.active {
  font-weight: bold;
  color: var(--accent);
}

.card {
  display: block;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
  margin-bottom: 12px;
  color: inherit;
  text-decoration: none;
}

.card:hover {
  border-color: var(--accent);
}

.badge {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 600;
}

.badge-cumpara {
  background-color: var(--green-bg);
  color: var(--green);
}

.badge-vinde {
  background-color: var(--red-bg);
  color: var(--red);
}

.badge-stai {
  background-color: var(--grey-bg);
  color: var(--grey);
}

.pagination {
  display: flex;
  justify-content: space-between;
  gap: 8px;
}

form .row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

input, select {
  padding: 6px 10px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--surface);
  color: var(--text);
}

.analiza-text {
  white-space: pre-wrap;
  word-wrap: break-word;
  background: var(--surface);
  padding: 16px;
  border-radius: var(--radius);
  font-family: ui-monospace, monospace;
  font-size: 0.95rem;
}

table {
  width: 100%;
  border-collapse: collapse;
}

td, th {
  padding: 6px 8px;
  border-bottom: 1px solid var(--border);
}

th {
  text-align: left;
  color: var(--muted);
}

.chart-wrap {
  position: relative;
  height: 360px;
  width: 100%;
}

.muted {
  color: var(--muted);
}

@media (max-width: 600px) {
  h1 {
    font-size: 1.4rem;
  }
}

.rezumat-stiri {
  border-left: 3px solid var(--accent);
}
