:root {
  color-scheme: light;
  --bg: #050b1f;
  --overlay: rgba(255, 255, 255, 0.95);
  --muted: #5d6786;
  --heading: #101a33;
  --accent: #0f8c5a;
  --accent-muted: rgba(15, 140, 90, 0.12);
  --danger: #c0392b;
  --danger-muted: rgba(192, 57, 43, 0.12);
  --input-border: rgba(3, 16, 48, 0.12);
  --input-border-focus: rgba(15, 140, 90, 0.45);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg) url('images/kallavesi.jpg') no-repeat center/cover fixed;
  font-family: 'Segoe UI', system-ui, -apple-system, BlinkMacSystemFont, 'Helvetica Neue', sans-serif;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(1rem, 3vw, 2.5rem);
}

main {
  width: min(500px, 100%);
}

.card {
  background: var(--overlay);
  border-radius: 20px;
  padding: clamp(1.75rem, 4vw, 2.75rem);
  box-shadow: 0 25px 55px rgba(5, 11, 31, 0.35);
  border-top: 4px solid var(--accent);
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

h1, h2 {
  margin: 0;
  color: var(--heading);
  font-weight: 600;
}

p {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
  font-size: 0.98rem;
}

form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

label {
  display: block;
  font-weight: 600;
  color: var(--heading);
  font-size: 0.92rem;
  margin-bottom: 0.35rem;
}

input {
  display: block;
  width: 100%;
  border-radius: 12px;
  border: 1px solid var(--input-border);
  padding: 0.9rem 1rem;
  font-size: 1rem;
  transition: border-color 140ms ease;
  font-family: inherit;
}

input:focus {
  outline: none;
  border-color: var(--input-border-focus);
  box-shadow: 0 0 0 3px rgba(15, 140, 90, 0.15);
}

button {
  border: none;
  border-radius: 12px;
  padding: 0.95rem 1.25rem;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform 140ms ease, box-shadow 140ms ease;
  font-family: inherit;
}

.btn-primary {
  background: linear-gradient(120deg, #0f8c5a, #14b075);
  color: #fff;
  box-shadow: 0 10px 25px rgba(9, 90, 60, 0.25);
}

.btn-secondary {
  background: #eff2fb;
  color: var(--heading);
  border: 1px solid rgba(5, 11, 31, 0.05);
}

.btn-link {
  background: transparent;
  color: var(--heading);
  text-decoration: underline;
  padding: 0;
  border-radius: 0;
  box-shadow: none;
}

button:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

button:not(:disabled):active {
  transform: translateY(1px);
}

a {
  color: var(--accent);
  font-weight: 600;
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

.status {
  border-radius: 12px;
  padding: 0.85rem 1rem;
  font-size: 0.95rem;
  display: none;
}

.status--info {
  display: block;
  background: var(--accent-muted);
  color: var(--heading);
}

.status--error {
  display: block;
  background: var(--danger-muted);
  color: var(--danger);
}

.status--success {
  display: block;
  background: rgba(15, 140, 90, 0.18);
  color: var(--accent);
}

.captcha-box {
  min-height: 90px;
  border-radius: 12px;
  border: 1px dashed rgba(5, 11, 31, 0.15);
  background: rgba(5, 11, 31, 0.02);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem;
}

.captcha-helper {
  margin: 0.4rem 0 0;
  font-size: 0.85rem;
  color: var(--muted);
}

.helper-row {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
  font-size: 0.92rem;
}

.panel-title {
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 700;
  color: var(--muted);
  margin-bottom: 0.4rem;
}

.lang-switcher {
  display: flex;
  justify-content: center;
  gap: 0.25rem;
  padding-top: 0.75rem;
  border-top: 1px solid rgba(5, 11, 31, 0.08);
}

.lang-switcher button {
  background: none;
  border: none;
  padding: 0.2rem 0.5rem;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--muted);
  cursor: pointer;
  border-radius: 6px;
  transition: color 120ms ease, background 120ms ease;
}

.lang-switcher button:hover:not(.active) {
  color: var(--heading);
  background: rgba(5, 11, 31, 0.05);
}

.lang-switcher button.active {
  color: var(--accent);
  background: var(--accent-muted);
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}
