* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  color: #1a1a1a;
  background: #f5f5f5;
  line-height: 1.5;
}

header {
  background: #1db954;
  color: #fff;
  padding: 12px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

header h1 {
  font-size: 18px;
  font-weight: 600;
}

header nav a {
  color: #fff;
  text-decoration: none;
  margin-left: 16px;
  font-size: 14px;
}

header nav a:hover {
  text-decoration: underline;
}

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

.card {
  background: #fff;
  border-radius: 8px;
  padding: 24px;
  margin-bottom: 24px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.card h2 {
  font-size: 16px;
  margin-bottom: 16px;
  color: #333;
}

/* Login form */
.login-container {
  max-width: 400px;
  margin: 80px auto;
}

.login-container h2 {
  text-align: center;
  margin-bottom: 24px;
}

/* Filter form */
.filter-form {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 12px;
  align-items: end;
}

.form-group {
  display: flex;
  flex-direction: column;
}

.form-group label {
  font-size: 13px;
  font-weight: 500;
  margin-bottom: 4px;
  color: #555;
}

.form-group input,
.form-group select {
  padding: 8px 10px;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-size: 14px;
}

.form-group input:focus,
.form-group select:focus {
  outline: none;
  border-color: #1db954;
}

.btn {
  padding: 8px 20px;
  border: none;
  border-radius: 4px;
  font-size: 14px;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
  text-align: center;
}

.btn-primary {
  background: #1db954;
  color: #fff;
}

.btn-primary:hover {
  background: #1aa34a;
}

.btn-secondary {
  background: #e0e0e0;
  color: #333;
}

.btn-secondary:hover {
  background: #d0d0d0;
}

/* Summary table */
.summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 16px;
}

.summary-item {
  text-align: center;
}

.summary-item .value {
  font-size: 24px;
  font-weight: 700;
  color: #1db954;
}

.summary-item .label {
  font-size: 13px;
  color: #777;
  margin-top: 4px;
}

/* Data table */
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

thead th {
  background: #f9f9f9;
  padding: 10px 12px;
  text-align: left;
  font-weight: 600;
  border-bottom: 2px solid #e0e0e0;
  white-space: nowrap;
}

tbody td {
  padding: 8px 12px;
  border-bottom: 1px solid #eee;
}

tbody tr:hover {
  background: #f9f9f9;
}

td.number {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

/* Pagination */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 16px;
}

.pagination a,
.pagination span {
  padding: 6px 12px;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-size: 14px;
  text-decoration: none;
  color: #333;
}

.pagination a:hover {
  background: #f0f0f0;
}

.pagination .current {
  background: #1db954;
  color: #fff;
  border-color: #1db954;
}

.pagination .disabled {
  color: #ccc;
  cursor: default;
}

/* Toolbar */
.toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.toolbar .result-count {
  font-size: 14px;
  color: #777;
}

/* Error / alert */
.alert {
  padding: 12px 16px;
  border-radius: 4px;
  margin-bottom: 16px;
  font-size: 14px;
}

.alert-error {
  background: #fce4ec;
  color: #c62828;
  border: 1px solid #ef9a9a;
}

.alert-info {
  background: #e3f2fd;
  color: #1565c0;
  border: 1px solid #90caf9;
}

/* Loading indicator */
.btn-loading {
  opacity: 0.7;
  cursor: wait;
}

.loading-card {
  text-align: center;
  padding: 48px 16px;
  color: #777;
}

.loading-card p {
  font-size: 15px;
  margin-top: 16px;
}

.spinner {
  width: 32px;
  height: 32px;
  margin: 0 auto;
  border: 3px solid #e0e0e0;
  border-top-color: #1db954;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Empty state */
.empty-state {
  text-align: center;
  padding: 48px 16px;
  color: #999;
}

.empty-state p {
  font-size: 15px;
}
