* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  background: #0f172a;
  color: #e2e8f0;
  line-height: 1.5;
}

main {
  max-width: 1100px;
  margin: 0 auto;
  padding: 2rem 1.25rem 3rem;
}

h1 {
  margin: 0 0 1.5rem;
  font-size: 1.75rem;
}

h2 {
  margin: 0 0 0.75rem;
  font-size: 1.1rem;
  color: #94a3b8;
}

section {
  background: #1e293b;
  border: 1px solid #334155;
  border-radius: 12px;
  padding: 1.25rem;
  margin-bottom: 1.25rem;
}

.url-box code {
  display: block;
  padding: 0.85rem 1rem;
  background: #0f172a;
  border-radius: 8px;
  word-break: break-all;
  color: #38bdf8;
}

.hint {
  margin: 0.75rem 0 0;
  color: #94a3b8;
  font-size: 0.9rem;
}

.filter-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1rem;
  align-items: end;
}

.filter-grid label {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  font-size: 0.85rem;
  color: #94a3b8;
}

.filter-grid select,
.filter-grid input[type='date'] {
  width: 100%;
  padding: 0.6rem 0.75rem;
  border: 1px solid #334155;
  border-radius: 8px;
  background: #0f172a;
  color: #e2e8f0;
  font-size: 0.95rem;
}

.filter-actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.summary-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 1rem;
  padding: 0;
  background: transparent;
  border: 0;
}

.card {
  background: #1e293b;
  border: 1px solid #334155;
  border-radius: 12px;
  padding: 1rem 1.25rem;
}

.card .label {
  display: block;
  color: #94a3b8;
  font-size: 0.85rem;
  margin-bottom: 0.35rem;
}

.card strong {
  font-size: 1.75rem;
  font-variant-numeric: tabular-nums;
}

.header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.75rem;
}

button {
  border: 0;
  background: #2563eb;
  color: #fff;
  padding: 0.5rem 1rem;
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.9rem;
}

button:hover {
  background: #1d4ed8;
}

button.secondary {
  background: #334155;
}

button.secondary:hover {
  background: #475569;
}

table {
  width: 100%;
  border-collapse: collapse;
}

th,
td {
  text-align: left;
  padding: 0.75rem 0.5rem;
  border-bottom: 1px solid #334155;
}

th {
  color: #94a3b8;
  font-weight: 600;
  font-size: 0.85rem;
}

td.empty {
  color: #64748b;
  text-align: center;
}

td.count {
  font-variant-numeric: tabular-nums;
  font-weight: 600;
}

td.truncate {
  max-width: 260px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@media (max-width: 640px) {
  .header-row {
    flex-direction: column;
    align-items: stretch;
  }

  td.truncate {
    max-width: 140px;
  }
}
