:root {
  --bg: #F5F5F4;
  --surface: #FFFFFF;
  --border: #D6D3D1;
  --border-strong: #A8A29E;
  --border-light: #E7E5E4;
  --text-primary: #1C1917;
  --text-secondary: #57534E;
  --text-tertiary: #A8A29E;
  --accent: #1C1917;
  --accent-text: #FFFFFF;
  --green: #15803D;
  --green-bg: #DCFCE7;
  --orange: #C2410C;
  --orange-bg: #FFEDD5;
  --red: #B91C1C;
  --red-bg: #FECACA;
  --amber: #92400E;
  --amber-bg: #FEF3C7;
  --tag-bg: #E7E5E4;
  --row-zebra: #FAFAF9;
  --header-bg: #292524;
  --radius: 6px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { overflow-y: scroll; }

body {
  font-family: 'DM Sans', sans-serif;
  background: var(--bg);
  color: var(--text-primary);
  font-size: 13px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

nav {
  max-width: 1200px;
  margin: 0 auto;
  padding: 14px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.01em;
  text-decoration: none;
  color: var(--text-primary);
}

.nav-right {
  display: flex;
  gap: 22px;
  align-items: center;
  font-size: 13px;
}

.nav-right a {
  color: var(--text-secondary);
  text-decoration: none;
  font-weight: 500;
}

.nav-right a:hover { color: var(--text-primary); }

.nav-right .stat {
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  color: var(--text-tertiary);
}

.nav-right .stat strong { color: var(--text-primary); font-weight: 600; }

main { max-width: 1200px; margin: 0 auto; padding: 0 20px 24px; }

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  padding: 10px 0 14px;
}

.filter-pill {
  padding: 5px 12px;
  font-size: 12px;
  font-weight: 500;
  color: var(--text-secondary);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 100px;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.12s;
  font-family: inherit;
  white-space: nowrap;
}

.filter-pill:hover {
  background: var(--bg);
  color: var(--text-primary);
  border-color: var(--border-strong);
}

.filter-pill.active {
  background: var(--accent);
  color: var(--accent-text);
  border-color: var(--accent);
}

.filter-sep {
  width: 1px;
  height: 18px;
  background: var(--border);
  margin: 0 6px;
}

.sort {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--text-tertiary);
}

.sort select {
  padding: 5px 26px 5px 10px;
  font-size: 12px;
  font-family: inherit;
  color: var(--text-primary);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  outline: none;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23A8A29E' stroke-width='2'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right 6px center;
  background-size: 12px;
}

.table-wrap {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 1px 0 rgba(0,0,0,0.02);
}

table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
}

thead th {
  text-align: left;
  padding: 10px 14px;
  font-size: 11px;
  color: #D6D3D1;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 600;
  background: var(--header-bg);
  white-space: nowrap;
  cursor: pointer;
  user-select: none;
  border-bottom: 2px solid var(--header-bg);
  border-right: 1px solid #44403C;
}

thead th:last-child { border-right: none; }
thead th:hover { color: white; }
thead th.last { cursor: default; text-align: right; }
thead th.last:hover { color: #D6D3D1; }
thead th.num-col { text-align: right; }
thead th.center-col { text-align: center; }

.sort-arrow {
  display: inline-block;
  margin-left: 2px;
  font-size: 9px;
  opacity: 0.6;
}

th.sorted { color: white; }
th.sorted .sort-arrow { opacity: 1; }

tbody td {
  padding: 12px 14px;
  vertical-align: middle;
  font-size: 13px;
  border-bottom: 1px solid var(--border-light);
  border-right: 1px solid var(--border-light);
}

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

tbody tr { transition: background 0.08s; }
tbody tr:nth-child(even) { background: var(--row-zebra); }
tbody tr:hover { background: #FEF3C7 !important; }

.domain {
  font-size: 14px;
  color: var(--text-primary);
  text-decoration: none;
  font-weight: 600;
}

.domain:hover { color: var(--orange); text-decoration: underline; }

.age-cell {
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  color: var(--text-secondary);
  font-weight: 500;
  white-space: nowrap;
}
.age-cell .yrs { color: var(--text-tertiary); margin-left: 4px; }

.badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 100px;
  white-space: nowrap;
  border: 1px solid transparent;
}

.badge::before {
  content: '●';
  margin-right: 5px;
  font-size: 7px;
}

.badge.today { color: var(--red); background: var(--red-bg); border-color: #FCA5A5; }
.badge.soon { color: var(--orange); background: var(--orange-bg); border-color: #FDBA74; }
.badge.week { color: var(--amber); background: var(--amber-bg); border-color: #FCD34D; }
.badge.month { color: var(--text-secondary); background: var(--tag-bg); border-color: var(--border); }
.badge.live { color: var(--green); background: var(--green-bg); border-color: #86EFAC; }

.num {
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  color: var(--text-secondary);
  font-weight: 500;
  text-align: right;
}
.num.zero { color: var(--text-tertiary); }
.num.bold { color: var(--text-primary); font-weight: 600; }

.center { text-align: center; }

.registrar {
  display: inline-block;
  padding: 2px 8px;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-secondary);
  background: var(--tag-bg);
  border: 1px solid var(--border);
  border-radius: 4px;
  letter-spacing: 0.02em;
}

.actions { text-align: right; white-space: nowrap; }

.btn {
  padding: 5px 11px;
  font-family: inherit;
  font-size: 12px;
  font-weight: 600;
  border-radius: 5px;
  text-decoration: none;
  cursor: pointer;
  border: 1px solid transparent;
  display: inline-block;
  margin-left: 4px;
  transition: all 0.12s;
}

.btn-watch {
  background: var(--surface);
  color: var(--text-primary);
  border-color: var(--border-strong);
}

.btn-watch:hover {
  background: var(--accent);
  color: var(--accent-text);
  border-color: var(--accent);
}

.btn-watch.on {
  background: var(--green-bg);
  color: var(--green);
  border-color: #86EFAC;
}

.btn-register {
  background: var(--orange);
  color: white;
  border-color: var(--orange);
}

.btn-register:hover { background: #9A3412; border-color: #9A3412; }

.pagination {
  padding: 16px 0 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  color: var(--text-tertiary);
}

.pagination .info { font-variant-numeric: tabular-nums; }
.pagination .info strong { color: var(--text-primary); font-weight: 600; }

.page-controls { display: flex; gap: 4px; }

.page-btn {
  min-width: 30px;
  height: 30px;
  padding: 0 8px;
  font-size: 12px;
  font-weight: 500;
  font-family: inherit;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 5px;
  color: var(--text-primary);
  cursor: pointer;
}

.page-btn:hover { background: var(--bg); border-color: var(--border-strong); }
.page-btn.active { background: var(--accent); color: var(--accent-text); border-color: var(--accent); }
.page-btn:disabled { opacity: 0.4; cursor: not-allowed; }

footer {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  color: var(--text-tertiary);
  font-size: 12px;
}

footer a {
  color: var(--text-secondary);
  text-decoration: none;
  margin-right: 18px;
}

footer a:hover { color: var(--text-primary); }

@media (max-width: 900px) {
  th:nth-child(4), td:nth-child(4),
  th:nth-child(5), td:nth-child(5) { display: none; }
  .nav-right .stat { display: none; }
}

@media (max-width: 700px) {
  th:nth-child(6), td:nth-child(6),
  th:nth-child(7), td:nth-child(7) { display: none; }
  .sort { width: 100%; margin-top: 8px; }
}
