/* Auth pages (login, register, consent) — builds on home.css tokens */

.auth-body {
  min-height: 100vh;
  margin: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 1.5rem 1rem 2rem;
  box-sizing: border-box;
  font-size: 16px;
  background:
    radial-gradient(ellipse 55% 45% at 18% 0%, rgba(255, 174, 21, 0.1), transparent 60%),
    radial-gradient(ellipse 50% 45% at 88% 100%, rgba(46, 136, 175, 0.16), transparent 62%),
    #1c283c;
  color: #e8eef6;
  font-family: "Montserrat", sans-serif;
}

.auth-card {
  width: 100%;
  max-width: 420px;
  padding: 2rem 1.75rem 1.75rem;
  border-radius: 16px;
  background: #2c3c56;
  border: 1px solid rgba(186, 204, 224, 0.22);
  box-shadow: 0 18px 48px rgba(6, 12, 24, 0.45);
  box-sizing: border-box;
}

.auth-card-wide {
  max-width: 520px;
}

.auth-title {
  margin: 0 0 0.35rem;
  font-size: 1.7rem;
  font-weight: 600;
  color: #f4f7fb;
  text-align: center;
  line-height: 1.25;
}

.auth-subtitle {
  margin: 0 0 1.25rem;
  font-size: 0.95rem;
  color: #c5d0de;
  text-align: center;
  line-height: 1.5;
}

.auth-subtitle strong {
  color: #ffc04a;
  font-weight: 600;
}

.auth-app-badge {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  margin: 0 0 1.25rem;
  padding: 0.85rem 1rem;
  border-radius: 12px;
  background: rgba(10, 16, 28, 0.28);
  border: 1px solid rgba(186, 204, 224, 0.18);
}

.auth-app-initial {
  flex-shrink: 0;
  width: 2.5rem;
  height: 2.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background: linear-gradient(135deg, #ffae15, #df7601);
  color: #1a1204;
  font-weight: 700;
  font-size: 1.1rem;
  text-transform: uppercase;
}

.auth-app-badge-text {
  min-width: 0;
}

.auth-app-badge-text strong {
  display: block;
  color: #f4f7fb;
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 0.15rem;
}

.auth-app-badge-text span {
  font-size: 0.85rem;
  color: #c5d0de;
  line-height: 1.4;
}

.auth-form {
  display: grid;
  gap: 1rem;
}

.auth-field {
  display: grid;
  gap: 0.35rem;
}

.auth-field label {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #b7c4d6;
}

.auth-field input[type="text"],
.auth-field input[type="email"],
.auth-field input[type="password"] {
  width: 100%;
  box-sizing: border-box;
  padding: 0.8rem 0.95rem;
  font-family: inherit;
  font-size: 1rem;
  color: #f4f7fb;
  background: #1a2638;
  border: 1px solid rgba(186, 204, 224, 0.28);
  border-radius: 9px;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.auth-field input::placeholder {
  color: #7f8ea3;
}

.auth-field input:hover {
  border-color: rgba(255, 174, 21, 0.55);
}

.auth-field input:focus {
  border-color: #7ec8e3;
  box-shadow: 0 0 0 3px rgba(126, 200, 227, 0.22);
}

.auth-field input.auth-input-error {
  border-color: rgba(192, 57, 43, 0.7);
}

.auth-field input.auth-input-error:focus {
  box-shadow: 0 0 0 3px rgba(192, 57, 43, 0.22);
}

.auth-password-row {
  display: flex;
  gap: 0.5rem;
  align-items: stretch;
}

.auth-password-row input {
  flex: 1;
  min-width: 0;
}

.auth-toggle-password {
  flex-shrink: 0;
  padding: 0 0.85rem;
  font-family: inherit;
  font-size: 0.8rem;
  font-weight: 600;
  color: #f4f7fb;
  background: #24344c;
  border: 1px solid rgba(186, 204, 224, 0.28);
  border-radius: 9px;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.auth-toggle-password:hover {
  background: #31445e;
  border-color: rgba(255, 174, 21, 0.5);
}

.auth-hint {
  margin: 0;
  font-size: 0.8rem;
  color: #b7c4d6;
  line-height: 1.4;
}

.auth-hint-error {
  color: #f0a59c;
}

.auth-hint-ok {
  color: #8fd9a8;
}

.auth-actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-top: 0.25rem;
}

.auth-actions-stack {
  flex-direction: column;
}

.auth-actions-equal > .auth-button {
  flex: 1;
}

.auth-button {
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  padding: 0.8rem 1.25rem;
  border-radius: 9px;
  border: 1px solid rgba(186, 204, 224, 0.28);
  background: #24344c;
  color: #f4f7fb;
  cursor: pointer;
  text-align: center;
  text-decoration: none;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease, transform 0.15s ease, box-shadow 0.2s ease;
}

.auth-button:hover {
  background: #31445e;
  border-color: rgba(255, 174, 21, 0.45);
  color: #fff;
}

.auth-button-primary {
  border: none;
  color: #1a1204;
  background: linear-gradient(135deg, #ffc04a, #df7601);
  box-shadow: 0 8px 22px -10px rgba(223, 118, 1, 0.85);
}

.auth-button-primary:hover {
  color: #1a1204;
  background: linear-gradient(135deg, #ffd078, #ff8a1a);
  border: none;
  transform: translateY(-1px);
  box-shadow: 0 12px 28px -10px rgba(223, 118, 1, 0.95);
}

.auth-button-wide {
  width: 100%;
}

.auth-button-secondary {
  background: transparent;
  border-color: rgba(186, 204, 224, 0.35);
  color: #e8eef6;
}

.auth-button-secondary:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(186, 204, 224, 0.55);
  color: #fff;
  transform: none;
  box-shadow: none;
}

.auth-button-danger {
  background: rgba(192, 57, 43, 0.2);
  border-color: rgba(192, 57, 43, 0.55);
  color: #f0a59c;
}

.auth-button-danger:hover {
  background: rgba(252, 89, 68, 0.85);
  border-color: rgb(252, 89, 68);
  color: #fff;
}

.auth-footer {
  margin-top: 1.35rem;
  text-align: center;
  font-size: 0.92rem;
  color: #c5d0de;
  line-height: 1.5;
}

.auth-footer a {
  color: #ffb020;
  text-decoration: none;
  font-weight: 600;
}

.auth-footer a:hover {
  color: #ffd078;
}

.auth-note {
  margin: 1.25rem 0 0;
  padding-top: 1rem;
  border-top: 1px solid rgba(186, 204, 224, 0.18);
  font-size: 0.82rem;
  color: #c5d0de;
  text-align: center;
  line-height: 1.5;
}

.auth-note a {
  color: #ffb020;
  text-decoration: none;
  font-weight: 600;
}

.auth-note a:hover {
  color: #ffd078;
}

.auth-consent-lead {
  margin: 0 0 1rem;
  font-size: 0.95rem;
  color: #e8eef6;
  line-height: 1.5;
}

.auth-scope-list {
  list-style: none;
  margin: 0 0 1.25rem;
  padding: 0;
  display: grid;
  gap: 0.75rem;
}

.auth-scope-item {
  padding: 0.85rem 1rem;
  border-radius: 10px;
  background: #1a2638;
  border: 1px solid rgba(186, 204, 224, 0.18);
}

.auth-scope-label {
  display: flex;
  gap: 0.65rem;
  align-items: flex-start;
  color: #e8eef6;
  cursor: pointer;
}

.auth-scope-label.is-required {
  cursor: default;
  opacity: 0.9;
}

.auth-scope-label input {
  margin-top: 0.2rem;
  flex-shrink: 0;
}

.auth-scope-desc {
  display: block;
  margin-top: 0.2rem;
  font-size: 0.85rem;
  color: #c5d0de;
  line-height: 1.4;
}

.auth-scope-required-tag {
  display: inline-block;
  margin-top: 0.35rem;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #ffc04a;
}

@media (max-width: 420px) {
  .auth-card {
    padding: 1.5rem 1.15rem 1.35rem;
  }

  .auth-actions {
    flex-direction: column;
  }

  .auth-actions .auth-button {
    width: 100%;
  }
}
