.auth-required > .shell,
.auth-required > .modal-overlay {
  display: none;
}

.auth-shell {
  min-height: calc(100vh - 56px);
  display: grid;
  place-items: center;
}

.auth-panel {
  width: min(560px, 100%);
  background: rgba(18, 23, 34, 0.88);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 24px;
}

.auth-panel h1 {
  margin-bottom: 14px;
}

.auth-panel h2 {
  margin: 0 0 8px;
  font-size: 22px;
  letter-spacing: 0;
}

.auth-stage {
  color: var(--accent);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 10px;
}

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

.auth-form[hidden] {
  display: none;
}

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

.auth-form span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.auth-form input {
  width: 100%;
}

.auth-copy {
  margin: 0 0 14px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.auth-qr {
  width: 156px;
  height: 156px;
  display: grid;
  place-items: center;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: #ffffff;
  padding: 8px;
}

.auth-qr svg {
  width: 100%;
  height: 100%;
  display: block;
}

.auth-secret {
  border: 1px solid rgba(210, 222, 240, 0.1);
  border-radius: var(--radius);
  background: rgba(15, 20, 32, 0.72);
  padding: 9px 10px;
  color: var(--text);
  font-size: 12px;
  font-weight: 800;
  overflow-wrap: anywhere;
}

.auth-primary {
  width: 100%;
  min-height: 46px;
}

.auth-message {
  display: none;
  margin-bottom: 14px;
  padding: 12px 14px;
  border-radius: var(--radius);
  font-size: 14px;
  line-height: 1.4;
}

.auth-message:not(:empty) {
  display: block;
  border: 1px solid rgba(251, 113, 133, 0.38);
  background: rgba(251, 113, 133, 0.12);
  color: #fecdd3;
}

.auth-message.success {
  border-color: rgba(52, 211, 153, 0.36);
  background: rgba(52, 211, 153, 0.12);
  color: #bbf7d0;
}

.auth-signout {
  align-self: flex-end;
}

@media (max-width: 720px) {
  .auth-shell {
    min-height: calc(100vh - 24px);
  }

  .auth-panel {
    padding: 18px;
  }

  .auth-signout {
    width: auto;
  }
}
