:root {
  --bg: #f6f7f4;
  --card: #ffffff;
  --text: #111111;
  --muted: #6d726b;
  --line: #d8ddd5;
  --accent: #2f7d1f;
  --accent-strong: #215b16;
  --danger: #b42318;
  --success: #215b16;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at top, rgba(47, 125, 31, 0.1), transparent 28rem),
    linear-gradient(180deg, #f8faf6 0%, var(--bg) 100%);
  color: var(--text);
  font-family: "Segoe UI", "Helvetica Neue", Arial, sans-serif;
}

button,
input,
select {
  font: inherit;
}

.topbar {
  display: flex;
  justify-content: flex-end;
  padding: 1rem;
}

.screen {
  min-height: calc(100vh - 4rem);
  display: grid;
  place-items: center;
  padding: 1rem;
}

.card {
  width: min(100%, 420px);
  display: grid;
  gap: 0.9rem;
  padding: 2rem;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--card);
  box-shadow: 0 18px 40px rgba(17, 17, 17, 0.06);
}

.card h1 {
  margin: 0 0 0.35rem;
  font-size: 1.5rem;
  font-weight: 700;
}

.field,
input[type="password"],
.file-field {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #ffffff;
}

input[type="password"] {
  padding: 0.9rem 1rem;
}

.field {
  display: grid;
  gap: 0.35rem;
  padding: 0.75rem 1rem;
}

.field span {
  color: var(--muted);
  font-size: 0.82rem;
}

.field select {
  width: 100%;
  border: 0;
  background: transparent;
  color: var(--text);
  outline: 0;
}

input[type="password"]:focus,
.field:focus-within,
.file-field:focus-within {
  outline: 2px solid rgba(47, 125, 31, 0.18);
  outline-offset: 2px;
}

.file-field {
  position: relative;
  padding: 0.95rem 1rem;
  cursor: pointer;
}

.file-field input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.file-label {
  display: block;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.button,
.link-button {
  appearance: none;
  border: 0;
  cursor: pointer;
}

.button {
  padding: 0.95rem 1rem;
  border-radius: 12px;
  background: var(--accent);
  color: #ffffff;
  font-weight: 600;
}

.button:hover {
  background: var(--accent-strong);
}

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

.link-button {
  background: transparent;
  color: var(--muted);
  padding: 0.25rem 0;
}

.message {
  min-height: 1.3rem;
  margin: 0;
  color: var(--muted);
  font-size: 0.94rem;
}

.message.error {
  color: var(--danger);
}

.message.success {
  color: var(--success);
}

@media (max-width: 480px) {
  .card {
    padding: 1.4rem;
    border-radius: 16px;
  }
}
