* {
  box-sizing: border-box;
}

:root {
  color-scheme: light;
  --bg: #f7fafc;
  --panel: #ffffff;
  --ink: #113247;
  --muted: #5e7184;
  --line: #d8e5ef;
  --brand: #1166a8;
  --success: #22c55e;
  --danger: #dc2626;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
  font-family: Arial, Helvetica, sans-serif;
  line-height: 1.65;
}

a {
  color: var(--brand);
  font-weight: 700;
}

.shell {
  width: min(640px, 100%);
  margin: 0 auto;
  padding: 36px 22px;
}

.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 28px;
}

.auth-shell {
  display: flex;
  min-height: 100vh;
  align-items: center;
  justify-content: center;
  padding: 34px 22px;
  background: #ffffff;
}

.auth-panel {
  width: min(430px, 100%);
  text-align: center;
}

.auth-logo {
  width: 92px;
  height: auto;
  margin: 0 auto 22px;
  display: block;
}

.brand {
  margin: 0 0 6px;
  color: var(--brand);
  font-size: 0.84rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1 {
  margin: 0 0 10px;
  font-size: 1.65rem;
  font-weight: 800;
  line-height: 1.15;
}

h2 {
  margin: 28px 0 8px;
  color: var(--brand);
  font-size: 1.08rem;
  line-height: 1.3;
}

p,
li {
  color: #334155;
  font-size: 0.96rem;
}

p {
  margin: 0 0 14px;
}

ul {
  margin: 8px 0 0;
  padding-left: 20px;
}

.subtitle,
.meta {
  color: var(--muted);
}

.meta {
  margin-bottom: 28px;
  font-size: 0.88rem;
}

.links {
  display: grid;
  gap: 12px;
  margin-top: 24px;
}

.links a {
  display: block;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px 16px;
  background: #fbfdff;
  text-decoration: none;
}

.status-icon {
  display: grid;
  width: 74px;
  height: 74px;
  margin: 0 auto 22px;
  place-items: center;
  border-radius: 50%;
  background: #edf6ff;
  color: var(--brand);
  font-size: 2rem;
  font-weight: 800;
}

.status-icon.success {
  background: var(--success);
  color: #ffffff;
}

.status-icon.error {
  background: #fff1f2;
  color: var(--danger);
}

.center {
  text-align: center;
}

.form {
  display: grid;
  gap: 16px;
  margin-top: 22px;
  text-align: left;
}

.field {
  display: grid;
  gap: 8px;
}

.field label {
  color: var(--brand);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

.field input {
  width: 100%;
  border: 2px solid var(--line);
  border-radius: 16px;
  padding: 15px 16px;
  color: var(--ink);
  font: inherit;
  font-size: 1rem;
  font-weight: 700;
}

.field input:focus {
  border-color: var(--brand);
  outline: none;
}

.rules {
  display: grid;
  gap: 6px;
  margin: 2px 0 0;
  padding: 0;
  list-style: none;
}

.rules li {
  margin: 0;
  color: var(--muted);
  font-size: 0.84rem;
}

.rules li.met {
  color: #15803d;
  font-weight: 700;
}

.button {
  width: 100%;
  border: 0;
  border-radius: 16px;
  padding: 15px 18px;
  background: var(--brand);
  color: #ffffff;
  cursor: pointer;
  font: inherit;
  font-weight: 800;
}

.button:disabled {
  background: #8cb4d5;
  cursor: not-allowed;
  opacity: 1;
}

.error-text {
  color: var(--danger);
  font-size: 0.86rem;
  font-weight: 700;
}

.hidden {
  display: none !important;
}

.spinner {
  width: 32px;
  height: 32px;
  border: 4px solid #d8e5ef;
  border-top-color: var(--brand);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

.footer {
  margin-top: 28px;
  color: var(--muted);
  font-size: 0.84rem;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@media (max-width: 520px) {
  .shell {
    padding: 26px 16px;
  }

  .auth-shell {
    align-items: flex-start;
    padding: 36px 24px;
  }

  .panel {
    padding: 22px;
  }
}
