:root {
  --bg: #0f1419;
  --surface: #1a222c;
  --surface-hover: #232d39;
  --border: #2e3a48;
  --text: #e8eef4;
  --muted: #8b9aab;
  --accent: #3d9cf0;
  --accent-soft: rgba(61, 156, 240, 0.14);
  --ok: #3ecf8e;
  --ok-soft: rgba(62, 207, 142, 0.14);
  --warn: #f0b429;
  --warn-soft: rgba(240, 180, 41, 0.14);
  --danger: #f07178;
  --danger-soft: rgba(240, 113, 120, 0.14);
  --radius: 10px;
  --font: "IBM Plex Sans", "Segoe UI", sans-serif;
  --mono: "IBM Plex Mono", "SF Mono", ui-monospace, monospace;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  background:
    radial-gradient(1200px 600px at 10% -10%, #1a2a3d 0%, transparent 55%),
    radial-gradient(900px 500px at 100% 0%, #1a2830 0%, transparent 50%),
    var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.45;
}

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

a:hover {
  text-decoration: underline;
}

.page {
  max-width: 1100px;
  margin: 0 auto;
  padding: 2rem 1.25rem 3rem;
}

.header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.75rem;
}

.brand {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 650;
  letter-spacing: -0.02em;
}

.tagline {
  margin: 0.25rem 0 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.btn {
  appearance: none;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  border-radius: 8px;
  padding: 0.5rem 0.9rem;
  font: inherit;
  cursor: pointer;
}

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

.btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.link-btn {
  appearance: none;
  border: 0;
  background: none;
  color: var(--accent);
  font: inherit;
  padding: 0;
  cursor: pointer;
}

.link-btn:hover {
  text-decoration: underline;
}

.panel {
  background: color-mix(in srgb, var(--surface) 92%, transparent);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.panel-header {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem 1.25rem;
  padding: 1rem 1.15rem;
  border-bottom: 1px solid var(--border);
}

.panel-header h1 {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 600;
}

.meta {
  color: var(--muted);
  font-size: 0.9rem;
}

.status {
  padding: 2.5rem 1.25rem;
  text-align: center;
  color: var(--muted);
}

.status.error {
  color: var(--danger);
}

.table-wrap {
  overflow-x: auto;
}

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

th,
td {
  padding: 0.75rem 1rem;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--border);
}

th {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  background: rgba(0, 0, 0, 0.18);
  white-space: nowrap;
}

tbody tr:last-child td {
  border-bottom: 0;
}

tbody tr.clickable {
  cursor: pointer;
}

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

.slug {
  font-family: var(--mono);
  font-size: 0.9rem;
  font-weight: 500;
}

.dest,
.ua,
.query {
  color: var(--muted);
  font-size: 0.88rem;
  max-width: 28rem;
  word-break: break-word;
}

.mono {
  font-family: var(--mono);
  font-size: 0.85rem;
}

.num {
  font-variant-numeric: tabular-nums;
  font-weight: 600;
}

.badge {
  display: inline-block;
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.badge.active {
  color: var(--ok);
  background: var(--ok-soft);
}

.badge.inactive {
  color: var(--warn);
  background: var(--warn-soft);
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 0.75rem;
  padding: 1rem 1.15rem;
  border-bottom: 1px solid var(--border);
}

.stat-card {
  background: var(--accent-soft);
  border: 1px solid color-mix(in srgb, var(--accent) 30%, var(--border));
  border-radius: 8px;
  padding: 0.85rem 1rem;
}

.stat-card .label {
  margin: 0;
  color: var(--muted);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.stat-card .value {
  margin: 0.35rem 0 0;
  font-size: 1.6rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.detail-meta {
  display: grid;
  gap: 0.35rem;
  padding: 0 1.15rem 1rem;
  color: var(--muted);
  font-size: 0.9rem;
}

.detail-meta strong {
  color: var(--text);
  font-weight: 500;
}

.section-title {
  margin: 0;
  padding: 1rem 1.15rem 0.35rem;
  font-size: 0.95rem;
  font-weight: 600;
}

@media (max-width: 720px) {
  .page {
    padding: 1.25rem 0.85rem 2rem;
  }

  th,
  td {
    padding: 0.65rem 0.75rem;
  }

  .dest {
    max-width: 14rem;
  }
}
