:root {
  --border: #d9dde3;
  --accent: #2563eb;
  --danger: #dc2626;
  --bg-muted: #f4f6f8;
  color-scheme: light;
}

* { box-sizing: border-box; }

body {
  font-family: -apple-system, "Hiragino Kaku Gothic ProN", "Yu Gothic", sans-serif;
  margin: 0;
  background: #fafbfc;
  color: #1f2430;
}

header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 24px;
  border-bottom: 1px solid var(--border);
  background: white;
}

header nav a { margin-left: 16px; color: var(--accent); text-decoration: none; }

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

#login-view {
  max-width: 320px;
  margin: 80px auto;
  padding: 24px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: white;
}

.hidden { display: none !important; }

.filter-form {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  padding: 16px;
  background: white;
  border: 1px solid var(--border);
  border-radius: 8px;
  margin-bottom: 16px;
}

.filter-form label { display: flex; flex-direction: column; font-size: 12px; color: #555; gap: 4px; }
.filter-form input, .filter-form select { padding: 6px 8px; border: 1px solid var(--border); border-radius: 4px; }
.filter-form .checkbox-row { flex-direction: row; align-items: center; gap: 6px; }
.filter-form .actions { grid-column: 1 / -1; display: flex; gap: 8px; align-items: center; }

button {
  padding: 8px 16px;
  border: none;
  border-radius: 6px;
  background: var(--accent);
  color: white;
  cursor: pointer;
  font-size: 14px;
}
button.secondary { background: #6b7280; }
button.danger { background: var(--danger); }
button:disabled { opacity: 0.5; cursor: not-allowed; }

table { width: 100%; border-collapse: collapse; background: white; }
th, td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--border); font-size: 13px; }
th { background: var(--bg-muted); position: sticky; top: 0; }

.badge { padding: 2px 8px; border-radius: 12px; font-size: 11px; background: var(--bg-muted); }
.badge.found { background: #dcfce7; color: #166534; }
.badge.not_found { background: #fee2e2; color: #991b1b; }
.badge.pending, .badge.not_attempted { background: var(--bg-muted); color: #555; }

.note { font-size: 12px; color: #666; margin: 4px 0 12px; }
.error { color: var(--danger); font-size: 13px; margin: 8px 0; }
.error:empty { display: none; }
.result-bar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }

#enrich-progress { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.progress-bar { flex: 1; max-width: 300px; height: 8px; background: var(--bg-muted); border-radius: 4px; overflow: hidden; }
.progress-bar-fill { height: 100%; background: var(--accent); width: 0%; transition: width 0.3s; }
