:root {
  color-scheme: light;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #eef1f2;
  color: #202326;
}

* {
  box-sizing: border-box;
}

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
}

.auth-shell {
  display: grid;
  min-height: 100vh;
  padding: 24px;
  place-items: center;
}

.auth-panel {
  width: min(100%, 420px);
  padding: 28px;
  border: 1px solid #c9ced1;
  border-top: 4px solid #087f8c;
  background: #fff;
  box-shadow: 0 18px 50px rgba(32, 35, 38, 0.1);
}

.auth-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 32px;
}

.auth-brand span {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  background: #202326;
  color: #fff;
  font-size: 11px;
  font-weight: 900;
}

.auth-brand strong {
  font-size: 13px;
}

.auth-kicker {
  margin: 0 0 6px;
  color: #087f8c;
  font-size: 11px;
  font-weight: 800;
}

h1 {
  margin: 0;
  font-size: 24px;
  letter-spacing: 0;
}

.auth-copy,
.auth-error {
  margin: 12px 0 22px;
  color: #687078;
  font-size: 13px;
  line-height: 1.6;
}

.auth-error {
  padding: 10px 12px;
  border-left: 3px solid #c2413b;
  background: #fff1f0;
  color: #a62f2a;
}

.telegram-login {
  min-height: 44px;
}

.auth-form {
  display: grid;
  gap: 16px;
}

.auth-form label {
  display: grid;
  gap: 7px;
  color: #687078;
  font-size: 11px;
  font-weight: 800;
}

.auth-form input {
  width: 100%;
  height: 44px;
  padding: 0 12px;
  border: 1px solid #aeb5ba;
  border-radius: 5px;
  outline: none;
  color: #202326;
  font: 700 18px ui-monospace, SFMono-Regular, Menlo, monospace;
  letter-spacing: 0;
}

.auth-form input:focus {
  border-color: #087f8c;
  box-shadow: 0 0 0 3px rgba(8, 127, 140, 0.12);
}

.auth-button {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  padding: 0 16px;
  border: 0;
  border-radius: 5px;
  background: #087f8c;
  color: #fff;
  cursor: pointer;
  font-size: 12px;
  font-weight: 800;
  text-decoration: none;
}

.totp-qr {
  display: block;
  width: 220px;
  max-width: 100%;
  margin: 0 auto 16px;
  image-rendering: pixelated;
}

.totp-secret {
  margin: 0 0 20px;
  color: #687078;
  font-size: 11px;
}

.totp-secret code {
  display: block;
  margin-top: 8px;
  overflow-wrap: anywhere;
  color: #202326;
}

.recovery-codes {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 20px;
}

.recovery-codes code {
  padding: 8px;
  border: 1px solid #d8dcde;
  background: #f6f7f7;
  text-align: center;
}

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

  .auth-panel {
    padding: 22px 18px;
  }

  .recovery-codes {
    grid-template-columns: 1fr;
  }
}
