:root {
  --bg-primary: #0f0f0f;
  --bg-secondary: #111827;
  --bg-card: #171717;
  --border-muted: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.12);
  --text-primary: #ffffff;
  --text-secondary: #d4d4d4;
  --text-muted: #9ca3af;
  --accent: #f97316;
  --accent-strong: #ea580c;
}

body {
  background-color: var(--bg-primary);
  color: var(--text-primary);
}

.section-card {
  background: var(--bg-card);
  border: 1px solid var(--border-muted);
  color: var(--text-primary);
  border-radius: 1.5rem;
}

.section-card--soft {
  background: #111111;
  border: 1px solid var(--border-muted);
}

.section-card__muted {
  color: var(--text-muted);
}

.badge-accent {
  background: var(--accent);
  color: #0b0b0b;
}

.badge-soft {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-primary);
  border: 1px solid var(--border-muted);
}

.text-secondary { color: var(--text-secondary); }
.text-muted { color: var(--text-muted); }
.border-muted { border-color: var(--border-muted); }
.bg-card { background: var(--bg-card); }
.bg-secondary { background: var(--bg-secondary); }
.bg-primary-strong { background: var(--accent); color: #0b0b0b; }

input, select, textarea {
  background-color: #0f172a;
  color: var(--text-primary);
  border: 1px solid var(--border-muted);
}

/* Выпадающий список: опции в тёмной теме (без белого фона) */
select option {
  background: var(--bg-card);
  color: var(--text-primary);
}
select option:checked {
  background: var(--accent);
  color: #0b0b0b;
}

input::placeholder, textarea::placeholder {
  color: var(--text-muted);
}

a { color: inherit; }
a:hover { color: var(--accent); }

.table-dark th { color: var(--text-muted); font-weight: 600; }
.table-dark td { color: var(--text-secondary); }

/* Utility for light cards that must stay white */
.card-light {
  background: #ffffff;
  color: #0f172a;
  border: 1px solid #e5e7eb;
}

/* Global overrides to dark-theme legacy Tailwind classes */
.bg-white,
.bg-gray-50,
.bg-gray-100,
.bg-gray-200 {
  background-color: #171717 !important;
  color: #f5f5f5 !important;
  border-color: var(--border-muted) !important;
}

.hover\:bg-gray-50:hover,
.hover\:bg-gray-100:hover {
  background-color: #1f1f1f !important;
  color: #f5f5f5 !important;
}

.text-gray-900 { color: #f8fafc !important; }
.text-gray-800 { color: #e5e7eb !important; }
.text-gray-700 { color: #d4d4d8 !important; }
.text-gray-600 { color: #a1a1aa !important; }
.text-gray-500 { color: #9ca3af !important; }
.text-gray-400 { color: #9ca3af !important; }
.text-gray-300 { color: #d1d5db !important; }

.border-gray-100,
.border-gray-200,
.border-gray-300 {
  border-color: var(--border-muted) !important;
}

.bg-orange-100 {
  background-color: rgba(249, 115, 22, 0.15) !important;
  color: #fb923c !important;
  border-color: rgba(249, 115, 22, 0.35) !important;
}

.text-orange-800 { color: #fdba74 !important; }
.text-red-800 { color: #fca5a5 !important; }
.text-red-600 { color: #f87171 !important; }

.bg-yellow-50,
.bg-red-50 { background-color: #1f1f1f !important; }
.border-red-300,
.border-yellow-300 { border-color: var(--border-muted) !important; }
