:root {
  --bg: #f4f5f7;
  --surface: #ffffff;
  --border: #d9dde2;
  --text: #1a1f24;
  --muted: #6b7280;
  --accent: #0f5448;
  --accent-hover: #0a3d36;
  --error: #b3261e;
  --ok: #1e7d32;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, 'Liberation Mono', monospace;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  min-height: 100svh;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  font-size: 15px;
  line-height: 1.5;
}

button, input, textarea { font: inherit; }

button:focus-visible, .input:focus-visible, .list-box:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.topbar {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}

.topbar-inner {
  max-width: 920px;
  margin: 0 auto;
  padding: 0 1.25rem;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.topbar-brand {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 600;
  font-size: 0.95rem;
}

.topbar-brand svg {
  width: 18px;
  height: 18px;
  color: var(--accent);
}

.container {
  max-width: 920px;
  margin: 0 auto;
  padding: 2rem 1.25rem 4rem;
}

h1 {
  font-size: 1.35rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.sub {
  color: var(--muted);
  font-size: 0.9rem;
  margin-top: 0.15rem;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1.5rem;
}

.card-narrow {
  max-width: 400px;
  margin: 3rem auto 0;
}

#login-form {
  display: flex;
  flex-direction: column;
  margin-top: 1.25rem;
}

#login-form label {
  font-size: 0.85rem;
  font-weight: 500;
  margin: 0.8rem 0 0.3rem;
}

.input {
  width: 100%;
  padding: 0.6rem 0.75rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text);
}

.input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(15, 84, 72, 0.12);
}

#login-form .btn {
  margin-top: 1.2rem;
  align-self: flex-start;
}

.btn {
  padding: 0.55rem 1rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text);
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.btn:hover { background: #f0f1f3; }

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

.btn.primary:hover {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
}

.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.toolbar {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 0.9rem;
}

.page-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.list-box {
  width: 100%;
  min-height: 320px;
  resize: vertical;
  background: #fbfbfc;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 0.75rem 0.85rem;
  font-family: var(--mono);
  font-size: 0.9rem;
  line-height: 1.7;
  color: var(--text);
}

.list-box:focus {
  outline: none;
  border-color: var(--accent);
}

.note {
  margin-top: 0.75rem;
  font-size: 0.85rem;
  color: var(--muted);
  min-height: 1.1em;
}

.note.error { color: var(--error); }
.note.ok { color: var(--ok); }

.note.boot { text-align: center; margin-top: 3rem; }

@media (max-width: 520px) {
  .container { padding: 1.25rem 1rem 3rem; }
  .page-head { flex-direction: column; align-items: flex-start; }
  .card-narrow { margin-top: 1.5rem; }
  #login-form .btn, .toolbar .btn { width: 100%; }
}
