:root {
  --bg: #e8f2ec;
  --bg-soft: #f2f8f4;
  --surface: #fefffe;
  --border: rgba(74, 124, 98, 0.14);
  --text: #2a3f34;
  --muted: #5c7a6a;
  --accent: #4a8f6f;
  --accent-hover: #3d7a5e;
  --accent-soft: rgba(74, 143, 111, 0.12);
  --danger: #c44d4d;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 20px 48px rgba(42, 95, 72, 0.08);
  --font: "DM Sans", system-ui, sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.5;
  color: var(--text);
  background: var(--bg);
  background-image: radial-gradient(
      ellipse 120% 80% at 50% -20%,
      #d4eadc 0%,
      transparent 55%
    ),
    radial-gradient(
      ellipse 90% 60% at 100% 100%,
      rgba(180, 220, 200, 0.45) 0%,
      transparent 50%
    ),
    radial-gradient(
      ellipse 70% 50% at 0% 80%,
      rgba(200, 230, 210, 0.5) 0%,
      transparent 45%
    );
  -webkit-font-smoothing: antialiased;
}

.login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(1.25rem, 4vw, 2.5rem);
}

.login-panel {
  width: 100%;
  max-width: 360px;
  padding: clamp(2rem, 5vw, 2.75rem) clamp(1.5rem, 4vw, 2.25rem);
  text-align: center;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.brand {
  margin: 0 0 clamp(1.75rem, 4vw, 2.25rem);
  font-size: clamp(1.65rem, 4.5vw, 1.95rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--text);
}

.form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  text-align: left;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.label {
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--muted);
}

.input {
  width: 100%;
  padding: 0.7rem 0.9rem;
  font: inherit;
  color: var(--text);
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s, background 0.15s;
}

.input::placeholder {
  color: #8aa898;
}

.input:hover {
  border-color: rgba(74, 124, 98, 0.22);
  background: #fff;
}

.input:focus {
  border-color: rgba(74, 143, 111, 0.45);
  background: #fff;
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.input.invalid {
  border-color: rgba(196, 77, 77, 0.45);
  background: #fff8f8;
}

.field-error {
  min-height: 1.1em;
  margin: 0;
  font-size: 0.78rem;
  color: var(--danger);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  margin-top: 0.35rem;
  padding: 0.78rem 1.2rem;
  font: inherit;
  font-weight: 600;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background 0.15s, transform 0.1s;
}

.btn:active {
  transform: scale(0.99);
}

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

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

.btn--primary:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
}
