:root {
  --ink: #172d36;
  --muted: #667d84;
  --line: rgba(23, 45, 54, 0.16);
  --canvas: #edf4f3;
  --teal: #087b72;
  --teal-dark: #06665f;
  color-scheme: light;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { min-width: 320px; min-height: 100%; margin: 0; }
body {
  display: grid;
  min-height: 100vh;
  place-items: center;
  padding: 28px 18px;
  background: var(--canvas);
  color: var(--ink);
  font-family: "Inter", system-ui, sans-serif;
  letter-spacing: 0;
}

.auth-page { width: min(100%, 480px); }
.brand {
  display: block;
  margin-bottom: 20px;
  color: var(--teal-dark);
  font-family: "Playfair Display", serif;
  font-size: 30px;
  font-weight: 800;
  text-decoration: none;
}

.auth-panel {
  padding: 30px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 16px 38px rgba(31, 61, 69, 0.1);
}

.eyebrow {
  color: var(--teal);
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
}

h1 { margin: 8px 0 10px; font-family: "Playfair Display", serif; font-size: 32px; }
p { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.6; }
form { display: grid; gap: 16px; margin-top: 24px; }
label { display: grid; gap: 7px; color: var(--ink); font-size: 12px; font-weight: 700; }
input {
  width: 100%;
  min-height: 46px;
  padding: 0 13px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: #fff;
  color: var(--ink);
  font: inherit;
}
input:focus { border-color: var(--teal); outline: 2px solid rgba(8, 123, 114, 0.12); }
button {
  min-height: 44px;
  border: 0;
  border-radius: 5px;
  background: var(--teal);
  color: #fff;
  font: inherit;
  font-weight: 750;
  cursor: pointer;
}
button:hover { background: var(--teal-dark); }
button:disabled { cursor: wait; opacity: 0.65; }
.form-message { min-height: 20px; font-size: 12px; }
.form-message.is-error { color: #a63e32; }
.form-message.is-success { color: var(--teal-dark); }
.back-link { display: inline-block; margin-top: 16px; color: var(--teal-dark); font-size: 12px; font-weight: 700; }

@media (max-width: 520px) {
  .auth-panel { padding: 24px 18px; }
  h1 { font-size: 28px; }
}

.lang-switch { display: flex; justify-content: flex-end; gap: 6px; margin: 0 0 12px; }
.lang-switch button { width: auto; min-width: 44px; min-height: 40px; padding: 6px 10px; }
.lang-switch button.is-active { outline: 2px solid currentColor; outline-offset: 1px; }
