:root {
  --bg: #fbfbfa;
  --panel: #fff;
  --ink: #1a1a19;
  --muted: #6b6b68;
  --line: #e4e4e1;
  --accent: #2f6f4f;
  --bad: #b3261e;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #161614;
    --panel: #1e1e1c;
    --ink: #ededea;
    --muted: #9a9a95;
    --line: #33332f;
    --accent: #6fbf90;
    --bad: #f2b8b5;
  }
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 15px/1.5 ui-sans-serif, system-ui, -apple-system, sans-serif;
}

header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.5rem;
  border-bottom: 1px solid var(--line);
}

h1 { font-size: 1.1rem; margin: 0; letter-spacing: -0.01em; }
h2 { font-size: 0.95rem; margin: 0 0 0.75rem; }

main { max-width: 860px; margin: 0 auto; padding: 1.5rem; }

.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 1.25rem;
  margin-bottom: 1.25rem;
}

.hint { color: var(--muted); font-size: 0.85rem; margin: -0.25rem 0 0.75rem; }

label {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  font-size: 0.8rem;
  color: var(--muted);
  margin-bottom: 0.6rem;
}

input {
  padding: 0.5rem 0.6rem;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--bg);
  color: var(--ink);
  font-size: 0.9rem;
  font-family: inherit;
}

input:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 0 0.75rem;
}

.row { display: flex; gap: 0.5rem; }

button {
  padding: 0.5rem 0.9rem;
  border: 1px solid var(--accent);
  border-radius: 6px;
  background: var(--accent);
  color: var(--bg);
  font: inherit;
  font-size: 0.85rem;
  cursor: pointer;
}

button.secondary { background: transparent; color: var(--accent); }
button:disabled { opacity: 0.5; cursor: not-allowed; }

fieldset { border: 1px solid var(--line); border-radius: 6px; margin: 0.5rem 0 0.9rem; }
legend { font-size: 0.8rem; color: var(--muted); padding: 0 0.35rem; }

.list { list-style: none; margin: 0; padding: 0; }

.list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.7rem 0;
  border-bottom: 1px solid var(--line);
}

.list li:last-child { border-bottom: 0; }

.list .meta { font-size: 0.8rem; color: var(--muted); }

.status { font-size: 0.8rem; color: var(--muted); margin-left: 0.6rem; }
.error { color: var(--bad); font-size: 0.85rem; }
.ok { color: var(--accent); }

.tag {
  font-size: 0.7rem;
  padding: 0.1rem 0.4rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
}

details summary { cursor: pointer; font-size: 0.85rem; color: var(--accent); }
details[open] summary { margin-bottom: 0.75rem; }

@media (max-width: 520px) {
  .list li { flex-direction: column; align-items: flex-start; }
}
