:root {
  color-scheme: light dark;
  --bg: #f5f6f8;
  --card-bg: #ffffff;
  --text: #1a1d21;
  --muted: #6b7280;
  --border: #e2e4e8;
  --accent: #2563eb;
  --accent-text: #ffffff;
  --error: #dc2626;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 2rem 1rem;
}

.card {
  width: 100%;
  max-width: 900px;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.5rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

h1 {
  font-size: 1.4rem;
  margin: 0 0 1rem;
}

.login-card {
  max-width: 360px;
  margin-top: 15vh;
}

.wide-card {
  max-width: 1400px;
}

input[type='password'],
.login-card input[type='text'] {
  width: 100%;
  padding: 0.65rem 0.75rem;
  font-size: 1rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg);
  color: var(--text);
}

button {
  margin-top: 0.75rem;
  width: 100%;
  padding: 0.65rem 0.75rem;
  font-size: 1rem;
  font-weight: 600;
  border: none;
  border-radius: 8px;
  background: var(--accent);
  color: var(--accent-text);
  cursor: pointer;
}

button:hover {
  opacity: 0.92;
}

.error {
  color: var(--error);
  margin-top: 0.75rem;
  font-size: 0.9rem;
  display: none;
}

.status {
  color: var(--muted);
  font-size: 0.9rem;
  margin-bottom: 1rem;
}

#results {
  font-size: 0.85rem;
  white-space: nowrap;
}

#results tfoot input[type='text'] {
  width: 100%;
  box-sizing: border-box;
  padding: 0.25rem 0.4rem;
  font-size: 0.8rem;
  border: 1px solid var(--border);
  border-radius: 4px;
}

#results tbody tr {
  cursor: pointer;
}

#results tbody tr:hover {
  background: var(--bg);
}

.detail-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  align-items: center;
  justify-content: center;
  padding: 1rem;
  z-index: 100;
}

.detail-overlay:not([hidden]) {
  display: flex;
}

.detail-card {
  width: 100%;
  max-width: 480px;
  max-height: 85vh;
  overflow-y: auto;
  background: var(--card-bg);
  border-radius: 12px;
  padding: 1.5rem;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
}

.detail-card h2 {
  font-size: 1.15rem;
  margin: 0;
}

.detail-close {
  background: none;
  border: none;
  font-size: 1.5rem;
  line-height: 1;
  color: var(--muted);
  cursor: pointer;
  padding: 0;
  width: auto;
  margin: 0;
}

.detail-fields {
  margin: 0.5rem 0 0;
}

.detail-fields dt {
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  margin-top: 0.75rem;
}

.detail-fields dd {
  margin: 0.15rem 0 0;
  font-size: 1rem;
}

.top-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.logout-link {
  color: var(--muted);
  font-size: 0.85rem;
  text-decoration: none;
}

.logout-link:hover {
  text-decoration: underline;
}
