/* euromodel.cloud — minimalist, no emojis, MDI icons */
:root {
  --bg: #0f1117;
  --surface: #1a1d28;
  --surface-hover: #222636;
  --border: #2a2e3f;
  --text: #e4e7ec;
  --text-dim: #8b909e;
  --accent: #5b9fff;
  --accent-dim: #3a6db8;
  --green: #4ade80;
  --orange: #fbbf24;
  --red: #f87171;
  --radius: 8px;
  --max-width: 1400px;
}

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

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

#app {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 20px 40px;
}

/* ── Header ──────────────────────────────────────────── */
header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(15, 17, 23, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
  margin: 0 -20px;
  padding: 0 20px;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 56px;
  max-width: var(--max-width);
  margin: 0 auto;
}

.logo {
  color: var(--text);
  text-decoration: none;
  font-size: 18px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 6px;
}

.logo .mdi { font-size: 22px; color: var(--accent); }
.logo-dot { color: var(--text-dim); font-weight: 400; }

.stats {
  display: flex;
  gap: 16px;
  font-size: 12px;
  color: var(--text-dim);
}

.stats strong { color: var(--text); font-weight: 600; }

/* ── Hero ───────────────────────────────────────────── */
.hero {
  text-align: center;
  padding: 48px 0 32px;
}

.hero h1 {
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.5px;
  margin-bottom: 8px;
}

.subtitle {
  color: var(--text-dim);
  font-size: 15px;
}

/* ── Filters ────────────────────────────────────────── */
.filters {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 16px;
  align-items: flex-end;
}

.filter-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.filter-group label {
  font-size: 11px;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.filter-group select,
.filter-group input {
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 8px 12px;
  border-radius: var(--radius);
  font-size: 13px;
  outline: none;
  transition: border-color 0.15s;
}

.filter-group select:focus,
.filter-group input:focus {
  border-color: var(--accent);
}

.filter-group input {
  min-width: 200px;
}

/* ── Table ───────────────────────────────────────────── */
.table-container {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
}

table {
  width: 100%;
  border-collapse: collapse;
  white-space: nowrap;
}

thead th {
  background: #161924;
  color: var(--text-dim);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 600;
  padding: 10px 12px;
  text-align: left;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 56px;
  z-index: 10;
}

tbody tr {
  border-bottom: 1px solid var(--border);
  transition: background 0.1s;
}

tbody tr:last-child { border-bottom: none; }

tbody tr:hover { background: var(--surface-hover); }

td {
  padding: 10px 12px;
  font-size: 13px;
}

.loading, .empty {
  text-align: center;
  color: var(--text-dim);
  padding: 32px;
}

/* ── Cell formatting ────────────────────────────────── */
.model-name {
  font-weight: 600;
  color: var(--text);
}

.lab-name { color: var(--text-dim); }

.supplier-name {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.supplier-flag {
  font-size: 10px;
  background: var(--border);
  padding: 1px 5px;
  border-radius: 3px;
  color: var(--text-dim);
}

.price { font-variant-numeric: tabular-nums; color: var(--accent); }
.price-dim { color: var(--text-dim); }

.intel-score {
  font-weight: 700;
  font-size: 14px;
}

.intel-bar {
  width: 48px;
  height: 4px;
  background: var(--border);
  border-radius: 2px;
  margin-top: 2px;
  overflow: hidden;
}

.intel-bar-fill {
  height: 100%;
  background: var(--accent);
  border-radius: 2px;
}

.speed-val { color: var(--text-dim); font-variant-numeric: tabular-nums; }

/* ── Availability badge ─────────────────────────────── */
.avail {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  cursor: pointer;
  font-size: 12px;
  padding: 3px 8px;
  border-radius: 4px;
  border: 1px solid var(--border);
  background: transparent;
  transition: all 0.15s;
}

.avail:hover { background: var(--surface-hover); }

.avail-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
}

.avail-green .avail-dot { background: var(--green); }
.avail-orange .avail-dot { background: var(--orange); }
.avail-red .avail-dot { background: var(--red); }
.avail-none .avail-dot { background: var(--text-dim); opacity: 0.3; }

/* ── Vote modal ─────────────────────────────────────── */
.vote-modal {
  position: fixed;
  top: 0; left: 0;
  width: 100vw; height: 100vh;
  background: rgba(0,0,0,0.6);
  z-index: 1000;
  display: flex;
  justify-content: center;
  align-items: center;
}

.vote-modal.hidden { display: none; }

.vote-panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 24px;
  max-width: 400px;
  width: 90%;
}

.vote-panel h3 {
  font-size: 16px;
  margin-bottom: 4px;
}

.vote-panel p {
  color: var(--text-dim);
  font-size: 13px;
  margin-bottom: 16px;
}

.vote-options {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
}

.vote-btn {
  flex: 1;
  padding: 12px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  border-radius: var(--radius);
  cursor: pointer;
  font-size: 13px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  transition: all 0.15s;
}

.vote-btn:hover { background: var(--surface-hover); border-color: var(--accent); }

.vote-btn .avail-dot { width: 12px; height: 12px; }

.vote-close {
  width: 100%;
  padding: 8px;
  background: transparent;
  border: none;
  color: var(--text-dim);
  cursor: pointer;
  font-size: 13px;
}

/* ── Link ────────────────────────────────────────────── */
.model-link {
  color: var(--accent);
  text-decoration: none;
  font-size: 18px;
}

.model-link:hover { color: #7eb5ff; }

/* ── Footer ─────────────────────────────────────────── */
footer {
  margin-top: 32px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
  color: var(--text-dim);
  font-size: 12px;
  text-align: center;
}

footer .mdi { vertical-align: -2px; }

.footer-links a {
  color: var(--accent);
  text-decoration: none;
}

/* ── Responsive ──────────────────────────────────────── */
@media (max-width: 768px) {
  .hero h1 { font-size: 22px; }
  .stats { display: none; }
  .filters { gap: 8px; }
  .filter-group input { min-width: 140px; }
  th, td { padding: 8px 6px; font-size: 12px; }
  .th-elo, .th-speed { display: none; }
  td:nth-child(6), td:nth-child(9) { display: none; }
}
