/* ── Auth Pages (Login / Register) ────────────────────────────────────────── */

.auth-page {
  align-items: center;
  background: #1e1f22;
  color: #dbdee1;
  display: flex;
  justify-content: center;
  padding: 2rem;
}

.auth-brand {
  align-items: center;
  color: #ffffff;
  display: inline-flex;
  font-size: 1rem;
  font-weight: 800;
  gap: 0.55rem;
  position: fixed;
  left: 1.25rem;
  text-decoration: none;
  top: 0.65rem;
}

.auth-brand-mark {
  align-items: center;
  display: inline-flex;
  justify-content: center;
}

.auth-brand-icon {
  height: 1.3rem;
  width: 1.3rem;
}

.shield-outline {
  fill: none;
  stroke: rgba(255, 255, 255, 0.76);
  stroke-linejoin: round;
  stroke-width: 2;
}

.shield-fill {
  fill: rgba(255, 255, 255, 0.9);
}

.auth-shell {
  width: min(100%, 30rem);
}

.auth-panel {
  background: #313338;
  border-radius: 8px;
  box-shadow:
    0 0 34px rgba(180, 180, 180, 0.18),
    0 4px 15px rgba(0, 0, 0, 0.25);
  padding: 2.5rem;
}

.auth-panel h1 {
  color: #ffffff;
  font-size: 1.5rem;
  font-weight: 600;
  margin: 0 0 0.5rem;
  text-align: center;
}

.auth-subtitle {
  color: #b5bac1;
  font-size: 1rem;
  margin: 0 0 1.5rem;
  text-align: center;
}

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

.auth-form label {
  color: #b5bac1;
  display: block;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 0.5rem;
}

/* No [type="text"] selectors here: the production HTML minifier strips
   type="text" from inputs (it's the browser default), so they'd never match. */
.auth-form input:not([type="hidden"]) {
  -webkit-appearance: none;
  appearance: none;
  background: #1e1f22 !important;
  border: 1px solid transparent;
  border-radius: 4px;
  box-shadow: inset 0 0 0 9999px #1e1f22;
  caret-color: #dbdee1;
  color: #dbdee1 !important;
  color-scheme: dark;
  min-height: 2.75rem;
  outline: none;
  padding: 0.75rem 1rem;
  width: 100%;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.auth-form input:-webkit-autofill,
.auth-form input:-webkit-autofill:hover,
.auth-form input:-webkit-autofill:focus {
  border-color: transparent;
  -webkit-box-shadow: inset 0 0 0 9999px #1e1f22;
  -webkit-text-fill-color: #dbdee1;
  caret-color: #dbdee1;
}

.captcha-group {
  min-height: 78px;
}

.auth-form input:focus {
  border-color: #5865f2;
  box-shadow:
    inset 0 0 0 9999px #1e1f22,
    0 0 0 2px rgba(88, 101, 242, 0.25);
}

/* Password Input Wrapper & Toggle Button */
.password-input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
}

.password-input-wrapper input {
  padding-right: 2.75rem !important;
}

.password-toggle {
  position: absolute;
  right: 0.75rem;
  background: transparent;
  border: none;
  color: #949ba4;
  cursor: pointer;
  padding: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.15s ease, transform 0.1s ease;
  user-select: none;
  -webkit-user-select: none;
  outline: none;
}

.password-toggle:hover {
  color: #dbdee1;
}

.password-toggle:active {
  transform: scale(0.92);
}

.password-toggle svg {
  width: 1.25rem;
  height: 1.25rem;
  pointer-events: none;
}

.password-toggle .eye-off-icon {
  display: none;
}

.password-toggle.visible .eye-icon {
  display: none;
}

.password-toggle.visible .eye-off-icon {
  display: block;
}

.auth-submit {
  background: #5865f2;
  border: none;
  border-radius: 4px;
  color: #ffffff;
  cursor: pointer;
  font-weight: 600;
  justify-self: stretch;
  min-height: 2.75rem;
  padding: 0.75rem 1.5rem;
  font-size: 1rem;
  transition: background-color 0.15s ease;
}

.auth-submit:hover {
  background: #4752c4;
}

.auth-submit:disabled {
  cursor: wait;
  opacity: 0.65;
}

.auth-switch {
  color: #949ba4;
  font-size: 0.875rem;
  margin: 1.25rem 0 0;
  text-align: left;
}

.auth-switch a {
  color: #00a8fc;
  font-weight: 500;
  text-decoration: none;
}

.auth-switch a:hover {
  text-decoration: underline;
}

.form-message {
  animation: none;
  color: #fa777c;
  font-size: 0.875rem;
  margin: 0;
  min-height: 1.4rem;
  text-align: left;
  transition: opacity 0.15s ease;
}

.form-message:not(:empty) {
  animation: msg-fadein 0.2s ease both;
}

@keyframes msg-fadein {
  from { opacity: 0; transform: translateY(-4px); }
  to   { opacity: 1; transform: translateY(0); }
}

.form-message.success {
  color: #23a55a;
}

@media (max-width: 640px) {
  .auth-page {
    padding: 1rem;
  }

  .auth-brand {
    left: 1rem;
    top: 0.75rem;
  }

  .auth-panel {
    padding: 1.5rem;
  }
}
