:root {
  --blue: #2457f5;
  --ink: #13213c;
  --muted: #667085;
  --line: #d6ddeb;
}

* { box-sizing: border-box; }

body {
  display: grid;
  grid-template-rows: auto 1fr;
  min-height: 100vh;
  margin: 0;
  background: #f6f8fc;
  color: var(--ink);
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 88px;
  padding: 18px clamp(20px, 6vw, 84px);
  border-bottom: 1px solid #e7ebf2;
  background: #fff;
}

.brand {
  color: var(--ink);
  font-size: clamp(18.72px, 2.34vw, 28.08px);
  font-weight: 800;
  line-height: 1.15;
  text-decoration: none;
}

.brand span { display: block; }

.language-toggle {
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--muted);
  font-size: 14px;
  white-space: nowrap;
}

.language-toggle a { color: inherit; text-decoration: none; }
.language-toggle a[aria-current="page"] { color: var(--blue); font-weight: 700; }

.auth-main {
  display: grid;
  place-items: center;
  min-height: 0;
  padding: 36px 20px;
}

.auth-panel {
  width: min(100%, 420px);
  padding: 28px;
  border: 1px solid #e2e7f0;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 12px 36px rgba(19, 33, 60, .08);
}

h1 { margin: 0 0 8px; font-size: 28px; letter-spacing: 0; }
.lead { margin: 0 0 24px; color: var(--muted); line-height: 1.6; }

label {
  display: block;
  margin: 16px 0 7px;
  font-size: 14px;
  font-weight: 700;
}

input {
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: var(--ink);
  font: inherit;
}

input:focus { border-color: var(--blue); outline: 2px solid rgba(36, 87, 245, .16); }

button, .button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  margin-top: 22px;
  padding: 10px 18px;
  border: 1px solid var(--blue);
  border-radius: 7px;
  background: var(--blue);
  color: #fff;
  font: inherit;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
}

form > button { width: 100%; }
.button.secondary { border-color: var(--line); background: #fff; color: var(--ink); }
.actions { display: flex; flex-wrap: wrap; gap: 10px; }
.actions form { margin: 0; }
.actions form button { width: auto; }

.switch { margin: 20px 0 0; color: var(--muted); text-align: center; }
.switch a { color: var(--blue); font-weight: 700; }

.error {
  margin: 0 0 18px;
  padding: 11px 12px;
  border-left: 3px solid #c52727;
  background: #fff1f1;
  color: #8d1d1d;
  line-height: 1.5;
}

.account-row { padding: 14px 0; border-bottom: 1px solid #e7ebf2; }
.account-label { display: block; margin-bottom: 4px; color: var(--muted); font-size: 13px; }
.account-value { overflow-wrap: anywhere; font-weight: 700; }

@media (max-width: 480px) {
  .topbar { min-height: 80px; padding-top: 16px; padding-bottom: 16px; }
  .brand { font-size: clamp(15.6px, 5.46vw, 21.84px); }
  .auth-main { padding: 20px 14px; }
  .auth-panel { padding: 22px 18px; }
  h1 { font-size: 24px; }
}

@media (max-width: 360px) {
  .brand { font-size: 14.04px; }
}
