:root {
  color-scheme: light;
  --bg: #f5f6f8;
  --panel: #ffffff;
  --text: #1f2328;
  --muted: #6b7280;
  --accent: #0b5fff;
  --border: #e2e8f0;
}

* {
  box-sizing: border-box;
}

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

.container {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

header h1 {
  margin: 0 0 4px;
  font-size: 20px;
}

header p {
  margin: 0;
  color: var(--muted);
}

.panel {
  background: var(--panel);
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.panel h2 {
  margin: 0 0 12px;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
}

.row {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 12px;
}

.row:last-child {
  margin-bottom: 0;
}

.inline {
  display: flex;
  gap: 8px;
}

input[type="text"] {
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid var(--border);
  width: 80px;
}

input[type="file"] {
  padding: 8px 0;
}

button {
  border: 1px solid var(--border);
  background: #ffffff;
  padding: 8px 12px;
  border-radius: 8px;
  cursor: pointer;
}

button.primary {
  background: var(--accent);
  color: #ffffff;
  border: none;
}

button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.hint {
  margin: 0;
  font-size: 12px;
  color: var(--muted);
}

.status {
  margin: 8px 0 0;
  font-size: 13px;
  color: var(--muted);
}

.progress {
  margin-top: 10px;
}

progress {
  width: 100%;
  height: 8px;
  border-radius: 4px;
}

.table {
  max-height: 220px;
  overflow: auto;
  border: 1px solid var(--border);
  border-radius: 8px;
}

.loading-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.35);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 120ms ease-out;
  z-index: 999;
}

.loading-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.spinner {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 4px solid rgba(255, 255, 255, 0.4);
  border-top-color: #ffffff;
  animation: spin 0.9s linear infinite;
}

.loading-text {
  color: #ffffff;
  font-weight: 600;
}

.toast {
  position: fixed;
  right: 16px;
  bottom: 16px;
  background: #111827;
  color: #ffffff;
  padding: 10px 14px;
  border-radius: 10px;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.2);
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 160ms ease-out, transform 160ms ease-out;
  pointer-events: none;
  font-size: 13px;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

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

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}

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

th {
  position: sticky;
  top: 0;
  background: #f8fafc;
}

.checkbox label {
  display: flex;
  align-items: center;
  gap: 8px;
}
