:root {
  --bg: #0f1115;
  --panel: #171a21;
  --border: #262b36;
  --text: #e7e9ee;
  --subtle: #8a90a2;
  --accent: #4f8cff;
  --error: #ff6b6b;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
}
a { color: var(--accent); text-decoration: none; }
.subtle { color: var(--subtle); }
.error { color: var(--error); font-size: 14px; margin: 0; }

.flash {
  background: #2a2f3a;
  border-bottom: 1px solid var(--border);
  padding: 10px 16px;
  font-size: 14px;
}

.login-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
}
.login-card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 32px;
  width: 320px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.login-card h1 { margin: 0; font-size: 22px; }
.login-card label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 13px;
  color: var(--subtle);
}
input, select, button {
  font: inherit;
  color: var(--text);
  background: #1d2129;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 12px;
}
button {
  background: var(--accent);
  color: white;
  border: none;
  cursor: pointer;
  font-weight: 600;
}
button.small {
  padding: 6px 10px;
  font-size: 13px;
  font-weight: 500;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 24px;
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
  gap: 10px;
}
.brand { font-weight: 700; font-size: 18px; }
.topbar-right { display: flex; gap: 16px; align-items: center; }

.container { padding: 24px; max-width: 1000px; margin: 0 auto; }

.controls {
  display: flex;
  gap: 10px;
  margin-bottom: 16px;
}
.controls #q { flex: 1; }

table { width: 100%; border-collapse: collapse; margin-bottom: 24px; }
th, td {
  text-align: left;
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  font-size: 14px;
}
th { color: var(--subtle); font-weight: 600; font-size: 12px; text-transform: uppercase; }

.user-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
  max-width: 420px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 24px;
  margin-bottom: 32px;
}
.user-form label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 13px;
  color: var(--subtle);
}
.checkbox-label {
  flex-direction: row !important;
  align-items: center;
  gap: 8px !important;
}
.checkbox-label input { width: auto; }

#player {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  width: 100%;
  background: var(--panel);
  border-top: 1px solid var(--border);
}

.scan-banner {
  background: #2a3245;
  border-bottom: 1px solid var(--border);
  color: var(--subtle);
  padding: 8px 16px;
  font-size: 13px;
  text-align: center;
}

.controls { flex-wrap: wrap; }
.controls select, .controls input[type="date"] { flex: 0 0 auto; }

#results-body tr.playing {
  background: rgba(79, 140, 255, 0.16);
}
#results-body tr.playing td:first-child {
  box-shadow: inset 3px 0 0 var(--accent);
}

.pagination {
  display: flex;
  align-items: center;
  gap: 14px;
  justify-content: center;
  padding: 12px 0 80px;
  font-size: 13px;
}

.row-actions { display: flex; gap: 10px; align-items: center; }
.link-button {
  background: none;
  border: none;
  color: var(--accent);
  cursor: pointer;
  padding: 0;
  font: inherit;
  font-weight: 500;
}
