* { box-sizing: border-box; }

body {
  font-family: var(--font-ui);
  background: var(--bg);
  color: var(--text);
  margin: 0;
  min-height: 100vh;
  padding: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  -webkit-font-smoothing: antialiased;
}

.shell { width: 100%; max-width: 400px; position: relative; }

.shell::before {
  content: '';
  position: absolute;
  inset: -200px -100px auto;
  height: 440px;
  z-index: -1;
  background: radial-gradient(ellipse 55% 60% at 50% 30%, var(--sage-soft), transparent 72%);
}

.wordmark { display: block; text-align: center; font-size: 27px; margin: 0 0 24px; }

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: 36px 32px;
}

h1 {
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 700;
  margin: 0 0 6px;
  letter-spacing: -0.01em;
}

.sub { color: var(--text-muted); font-size: 13.5px; margin-bottom: 26px; }

.field { margin-bottom: 16px; }
.field label { display: block; font-size: 12px; color: var(--text-muted); margin-bottom: 6px; letter-spacing: 0.02em; }
.field input, .field select, .field textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-family: inherit;
  background: var(--surface-2);
  color: var(--text);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.field input::placeholder { color: var(--text-faint); }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none;
  border-color: var(--sage);
  box-shadow: 0 0 0 3px var(--sage-soft);
}

.password-control { position: relative; }
.password-control input { padding-right: 46px; }
.password-toggle {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  width: 34px;
  height: 34px;
  border: none;
  border-radius: 50%;
  background: transparent;
  color: var(--text-muted);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}
.password-toggle:hover { background: color-mix(in srgb, var(--text-muted) 14%, transparent); color: var(--text); }
.password-toggle:focus-visible { outline: 2px solid var(--sage); outline-offset: 2px; }
.password-toggle svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.password-toggle .icon-eye-off { display: none; }
.password-toggle[aria-pressed="true"] .icon-eye { display: none; }
.password-toggle[aria-pressed="true"] .icon-eye-off { display: block; }

.btn {
  width: 100%;
  padding: 13px;
  border-radius: var(--radius-pill);
  border: none;
  background: var(--sage);
  color: var(--on-sage);
  font-size: 14px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  margin-top: 8px;
  transition: background 0.15s ease, transform 0.1s ease;
}
.btn:hover { background: var(--sage-deep); }
.btn:active { transform: translateY(1px); }

.error { color: var(--danger); font-size: 13px; margin-top: 10px; min-height: 16px; }

.notice {
  color: var(--ok);
  font-size: 13px;
  margin-bottom: 16px;
  padding: 11px 14px;
  border-radius: var(--radius-sm);
  background: var(--sage-soft);
}
.notice.warn { color: var(--warn); background: color-mix(in srgb, var(--warn) 12%, transparent); }
.notice a { color: inherit; }

.link-row { text-align: center; margin-top: 20px; font-size: 13px; color: var(--text-muted); }
.link-row a { color: var(--sage); font-weight: 600; text-decoration: none; }
.link-row a:hover { text-decoration: underline; }

.forgot-row { text-align: right; font-size: 12px; margin: -8px 0 14px; }
.forgot-row a { color: var(--text-muted); text-decoration: none; }
.forgot-row a:hover { color: var(--sage); text-decoration: underline; }

.lang-row { text-align: center; margin-top: 14px; }
.lang-row select {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 5px 9px;
  font-size: 12px;
  color: var(--text-muted);
  background: var(--surface-2);
  font-family: inherit;
}
