:root {
  color-scheme: light;
  --bg: #f7f9fc;
  --card: #ffffff;
  --text: #1a1f2b;
  --muted: #5f6b7a;
  --accent: #1769ff;
  --accent-muted: #c1d6ff;
  --border: #dce3ee;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  color: var(--text);
  background: var(--bg);
}

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

.header {
  display: grid;
  gap: 8px;
}

h1 {
  margin: 0;
  font-size: 1.8rem;
}

.description,
.note,
#status {
  color: var(--muted);
}

.back-link {
  width: fit-content;
  text-decoration: none;
  color: var(--accent);
  font-weight: 600;
}

.controls {
  margin: 20px 0;
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.control {
  display: grid;
  gap: 6px;
  min-width: 220px;
}

label {
  font-size: 0.92rem;
  color: var(--muted);
}

select {
  min-height: 40px;
  border-radius: 8px;
  border: 1px solid var(--border);
  padding: 8px 10px;
  background: #fff;
  color: var(--text);
}

.downloads {
  margin: 16px 0;
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
}

.downloads a {
  text-decoration: none;
  color: #fff;
  background: var(--accent);
  padding: 10px 14px;
  border-radius: 8px;
  font-weight: 600;
}

.downloads a.is-disabled {
  background: var(--accent-muted);
  pointer-events: none;
  cursor: not-allowed;
}

.table-wrap {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  max-height: 70vh;
  overflow: auto;
}

#status {
  margin: 0;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
}

table {
  width: 100%;
  border-collapse: collapse;
}

th,
td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
  text-align: left;
}

th {
  background: #f0f4fa;
  position: sticky;
  top: 0;
  z-index: 1;
}
