/* public/assets/css/auth.css */
/* Scoped to auth pages only */

.auth-page .auth-container {
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: 24px;
}

.auth-page .card {
  width: 100%;
  max-width: 420px;
}

.auth-page .header h1 {
  font-size: 32px;
  margin: 0 0 6px;
  color: var(--soft-grey);
}

.auth-page .header p {
  font-size: 14px;
  margin: 0;
  color: var(--tabAndIcons);
}

.auth-page .form {
  margin-top: 32px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.auth-page .field label {
  font-size: 12px;
  color: var(--blue);
  margin-bottom: 6px;
  display: inline-block;
}

.auth-page .password-wrapper {
  width: 100%;
  position: relative;
}

.auth-page .field input {
  width: 100%;
  padding: 12px;
  border-radius: 12px;

  border: 2px solid var(--borderIdle);

  background: color-mix(in srgb, var(--bg) 70%, transparent);
  color: inherit;

  /* iOS: prevents zoom */
  font-size: 16px;

  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.auth-page .field input:focus {
  border-color: var(--tabAndIcons);
  box-shadow: 0 0 0 2px var(--tabAndIconsGlow);
}

.auth-page .field input::placeholder {
  color: var(--placeholder);
}

/* ===== Eye toggle ===== */
.auth-page .eye {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);

  background: none;
  border: none;
  padding: 4px;

  color: var(--tabAndIcons);
  opacity: 0.85;
  cursor: pointer;
}

.auth-page .eye:hover { opacity: 1; }
.auth-page .eye:active { transform: translateY(-50%) scale(0.92); }
.auth-page .eye svg { display: block; }

/* ===== Primary Button ===== */
.auth-page .primary-button {
  width: 100%;
  padding: 14px 0;
  border-radius: 14px;
  border: none;

  font-weight: 600;
  font-size: 15px;

  background: var(--soft-grey);
  color: white;

  cursor: pointer;

  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;

  transition:
    transform 0.15s cubic-bezier(.34, 1.56, .64, 1),
    background 0.2s ease,
    opacity 0.2s ease;
}

.auth-page .primary-button:not(.disabled):not(.loading):active {
  transform: scale(0.96);
}

.auth-page .primary-button.disabled,
.auth-page .primary-button.loading {
  background: rgba(111, 127, 120, 0.5);
  cursor: default;
  opacity: 0.85;
}

.auth-page .primary-button.loading { cursor: progress; }

/* Spinner */
@keyframes amhSpin {
  to { transform: rotate(360deg); }
}

.auth-page .spinner {
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255, 255, 255, 0.4);
  border-top-color: white;
  border-radius: 50%;
  animation: amhSpin 0.8s linear infinite;
}

/* Toggles / misc */
.auth-page .toggle {
  margin-top: 24px;
  font-size: 13px;
}

.auth-page .toggle button {
  background: none;
  border: none;
  color: var(--blue);
  cursor: pointer;
  margin-left: 6px;
}

.auth-page .error {
  color: var(--red);
  font-size: 12px;
}

.auth-page .hidden {
  display: none;
}

.auth-page .auth-message {
  margin-top: 24px;
}

.auth-page #updateForm {
  margin-top: 16px;
}