:root {
  --bg-top: #1a2e28;
  --bg-bottom: #0d1613;
  --panel: rgba(236, 242, 236, 0.94);
  --ink: #14201c;
  --muted: #4a5c55;
  --accent: #2f6f5e;
  --accent-strong: #1f4f42;
  --danger: #8b2e2e;
  --track: #c5d2cc;
  --radius: 18px;
  --shadow: 0 24px 60px rgba(0, 0, 0, 0.28);
  font-family: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background:
    radial-gradient(circle at 15% 20%, rgba(90, 160, 130, 0.35), transparent 42%),
    radial-gradient(circle at 85% 10%, rgba(40, 90, 70, 0.4), transparent 35%),
    linear-gradient(160deg, var(--bg-top), var(--bg-bottom));
}

.shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 2rem 1.25rem;
}

.panel {
  width: min(560px, 100%);
  background: var(--panel);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 2rem 2.1rem 2.2rem;
}

.brand {
  margin: 0;
  font-size: 0.85rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent-strong);
  font-weight: 700;
}

h1 {
  margin: 0.55rem 0 0.4rem;
  font-size: clamp(1.7rem, 4vw, 2.15rem);
  line-height: 1.15;
}

.lede {
  margin: 0 0 1.6rem;
  color: var(--muted);
  line-height: 1.45;
}

.top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.4rem;
}

.form {
  display: grid;
  gap: 1rem;
}

label {
  display: grid;
  gap: 0.4rem;
  font-size: 0.95rem;
}

input[type="text"],
input[type="password"] {
  width: 100%;
  border: 1px solid #b7c6bf;
  border-radius: 10px;
  padding: 0.75rem 0.85rem;
  font: inherit;
  background: #fff;
}

button {
  border: 0;
  border-radius: 999px;
  padding: 0.8rem 1.2rem;
  background: var(--accent);
  color: #f4faf7;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

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

button.ghost {
  background: transparent;
  color: var(--muted);
  border: 1px solid #b7c6bf;
  padding: 0.45rem 0.9rem;
  font-size: 0.9rem;
}

button.ghost:hover {
  color: var(--ink);
  border-color: var(--accent);
}

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

.flash li {
  padding: 0.7rem 0.85rem;
  border-radius: 10px;
  background: #f6e4e4;
  color: var(--danger);
}

.toggle-block {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
  padding: 1.1rem 1.15rem;
  border-radius: 14px;
  background: #e7efea;
}

.toggle-label {
  margin: 0 0 0.25rem;
  font-weight: 700;
}

.toggle-hint {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.switch {
  position: relative;
  display: inline-block;
  width: 58px;
  height: 32px;
  flex-shrink: 0;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  inset: 0;
  cursor: pointer;
  background: var(--track);
  border-radius: 999px;
  transition: 0.2s ease;
}

.slider::before {
  content: "";
  position: absolute;
  height: 24px;
  width: 24px;
  left: 4px;
  top: 4px;
  background: #fff;
  border-radius: 50%;
  transition: 0.2s ease;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

.switch input:checked + .slider {
  background: var(--accent);
}

.switch input:checked + .slider::before {
  transform: translateX(26px);
}

.switch input:disabled + .slider {
  opacity: 0.6;
  cursor: wait;
}

.status {
  margin: 1rem 0 0;
  color: var(--danger);
}

@media (max-width: 520px) {
  .panel {
    padding: 1.5rem 1.2rem 1.7rem;
  }

  .toggle-block {
    flex-direction: column;
    align-items: flex-start;
  }
}
