:root {
  --bg: #f5f7fa;
  --surface: #ffffff;
  --text: #0f172a;
  --muted: #64748b;
  --border: #e2e8f0;
  --accent: #0d7a5f;
  --accent-soft: #e3f4ee;
  --shadow: 0 10px 30px -12px rgba(15, 23, 42, 0.18);
}

[data-theme="dark"] {
  --bg: #0b1220;
  --surface: #131c2e;
  --text: #e8eef7;
  --muted: #94a3b8;
  --border: #243149;
  --accent: #3ddc97;
  --accent-soft: #16342a;
  --shadow: 0 10px 30px -12px rgba(0, 0, 0, 0.6);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  transition: background .3s ease, color .3s ease;
}

.wrap { max-width: 960px; margin: 0 auto; padding: 24px 16px 64px; }

header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  padding: 8px 0 20px;
}

h1 { margin: 0; font-size: 1.35rem; letter-spacing: -.02em; }
header p { margin: 4px 0 0; color: var(--muted); font-size: .85rem; }

.toggle {
  flex-shrink: 0;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  border-radius: 999px;
  padding: 10px 16px;
  font-size: .85rem;
  font-weight: 600;
  cursor: pointer;
  box-shadow: var(--shadow);
  transition: background .3s, border-color .3s, color .3s;
}
.toggle:hover { border-color: var(--accent); }

.search {
  width: 100%;
  padding: 14px 16px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font-size: 1rem;
  box-shadow: var(--shadow);
  outline: none;
  transition: background .3s, border-color .2s;
}
.search:focus { border-color: var(--accent); }

section { margin-top: 32px; }

h2 {
  font-size: .8rem;
  text-transform: uppercase;
  letter-spacing: .12em;
  color: var(--accent);
  margin: 0 0 12px;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 18px;
  box-shadow: var(--shadow);
  overflow: hidden;
  transition: background .3s, border-color .3s;
}

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

th, td {
  text-align: left;
  padding: 14px 18px;
  font-size: .95rem;
  border-bottom: 1px solid var(--border);
}

th {
  font-size: .72rem;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--muted);
  background: var(--accent-soft);
}

tbody tr:last-child td { border-bottom: none; }
tbody tr:hover { background: var(--accent-soft); }

td.id {
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  width: 110px;
  color: var(--accent);
}

.empty { padding: 24px; text-align: center; color: var(--muted); font-size: .9rem; }

@media (max-width: 520px) {
  td.id { width: 80px; }
  th, td { padding: 12px; }
}