:root {
  --bg: #f7f8fa;
  --surface: #ffffff;
  --surface-2: #f0f2f5;
  --border: #e2e6ea;
  --text: #1a1f26;
  --muted: #66707c;
  --accent: #2563eb;
  --accent-weak: #e8f0fe;
  --good: #0f9d58;
  --warn: #b26a00;
  --radius: 10px;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.05), 0 4px 12px rgba(0, 0, 0, 0.04);
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0e1116;
    --surface: #171b22;
    --surface-2: #1e242d;
    --border: #2a313b;
    --text: #e6e9ee;
    --muted: #97a1ad;
    --accent: #4f8cff;
    --accent-weak: #17263f;
    --good: #3ddc84;
    --warn: #f0b232;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 6px 18px rgba(0, 0, 0, 0.25);
  }
}

* { box-sizing: border-box; }
body {
  margin: 0;
  font: 15px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

.site-header {
  display: flex;
  align-items: baseline;
  gap: 12px;
  padding: 16px 24px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}
.site-header h1 { font-size: 19px; margin: 0; letter-spacing: -0.01em; }
.site-header .tag { color: var(--muted); font-size: 13px; }

.layout { display: flex; gap: 20px; padding: 20px 24px; align-items: flex-start; }
.filters {
  flex: 0 0 260px;
  position: sticky;
  top: 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: var(--shadow);
}
.results { flex: 1 1 auto; min-width: 0; }

.filters h2 { font-size: 12px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); margin: 0 0 12px; }
.field { margin-bottom: 14px; }
.field label { display: block; font-size: 12px; color: var(--muted); margin-bottom: 4px; }
.field input, .field select {
  width: 100%;
  padding: 7px 9px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  font-size: 14px;
}
.field .row { display: flex; gap: 8px; }
.btn {
  display: inline-block;
  padding: 8px 14px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--text);
  cursor: pointer;
  font-size: 14px;
}
.btn-primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn-block { width: 100%; }

.toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}
.count { color: var(--muted); font-size: 14px; }
.htmx-indicator { opacity: 0; transition: opacity 0.2s; }
.htmx-request .htmx-indicator, .htmx-request.htmx-indicator { opacity: 1; }

.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); }
table.servers { width: 100%; border-collapse: collapse; font-size: 14px; }
table.servers th, table.servers td { padding: 10px 12px; text-align: left; white-space: nowrap; }
table.servers thead th { background: var(--surface-2); color: var(--muted); font-weight: 600; font-size: 12px; text-transform: uppercase; letter-spacing: 0.04em; border-bottom: 1px solid var(--border); }
table.servers tbody tr { border-top: 1px solid var(--border); }
table.servers tbody tr:hover { background: var(--accent-weak); }
table.servers th a { color: inherit; }
table.servers th a.active { color: var(--accent); }

.badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  background: var(--surface-2);
  color: var(--muted);
  border: 1px solid var(--border);
}
.badge.vps { background: var(--accent-weak); color: var(--accent); border-color: transparent; }
.badge.dedicated { background: #f0e6ff; color: #7a3ff0; border-color: transparent; }
.price { font-weight: 700; }
.price .eur { font-weight: 400; color: var(--muted); font-size: 12px; }
.muted { color: var(--muted); }

.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); }
.detail-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 14px; margin: 16px 0; }
.spec { background: var(--surface-2); border-radius: 8px; padding: 10px 12px; }
.spec .k { font-size: 11px; text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted); }
.spec .v { font-size: 16px; font-weight: 600; margin-top: 2px; }
.empty { padding: 40px; text-align: center; color: var(--muted); }
.freshness { font-size: 12px; color: var(--muted); }

@media (max-width: 760px) {
  .layout { flex-direction: column; }
  .filters { position: static; flex-basis: auto; width: 100%; }
}
