/* Auth layout — ported from Blazor AuthLayout + Login.razor (app.css auth-* block) */

/*
 * html uses scrollbar-gutter: stable sitewide; body holds the peach gradient.
 * On auth routes the reserved gutter shows default white unless html is painted too.
 * Signup overflows more often, so the white strip is most visible there.
 */
html.mmz-auth-page {
  background: linear-gradient(135deg, #fef7e6 0%, #fce9d8 50%, #e8f3f9 100%);
  background-attachment: fixed;
  scrollbar-gutter: auto;
  scrollbar-color: rgba(43, 184, 200, 0.45) #fce9d8;
}

html.mmz-auth-page::-webkit-scrollbar {
  width: 10px;
}

html.mmz-auth-page::-webkit-scrollbar-track {
  background: #fce9d8;
}

html.mmz-auth-page::-webkit-scrollbar-thumb {
  background: rgba(43, 184, 200, 0.45);
  border-radius: 5px;
  border: 2px solid #fce9d8;
}

html.mmz-auth-page::-webkit-scrollbar-thumb:hover {
  background: rgba(43, 184, 200, 0.65);
}

@media (max-width: 768px) {
  html.mmz-auth-page {
    background-attachment: scroll;
  }
}

.auth-bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  background: linear-gradient(135deg, #fef7e6 0%, #fce9d8 50%, #e8f3f9 100%);
  background-attachment: fixed;
  overflow: hidden;
}

.auth-bg-shape {
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  opacity: 0.6;
  pointer-events: none;
}

.auth-bg-shape--top {
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(43, 184, 200, 0.25) 0%, transparent 70%);
  top: -200px;
  right: -200px;
}

.auth-bg-shape--bottom {
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(255, 138, 107, 0.2) 0%, transparent 70%);
  bottom: -150px;
  left: -150px;
}

.auth-layout-main {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.auth-section {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 16px;
  position: relative;
  animation: authFadeIn 0.5s ease-out both;
}

@keyframes authFadeIn {
  from {
    opacity: 0;
    transform: translateY(28px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.auth-card {
  width: 100%;
  max-width: 460px;
  border-radius: 32px;
  padding: 44px 40px 40px;
  background: #ffffff;
  border: 1.5px solid var(--glass-border);
  box-shadow:
    0 24px 64px rgba(15, 42, 68, 0.14),
    0 2px 8px rgba(43, 184, 200, 0.06);
  display: flex;
  flex-direction: column;
  gap: 0;
  position: relative;
  z-index: 1;
}

.auth-logo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 18px;
  text-decoration: none;
  transition: opacity 0.15s;
}

.auth-logo:hover {
  opacity: 0.8;
}

.auth-logo .logo-img {
  height: 40px;
}

.auth-title {
  font-family: "Plus Jakarta Sans", sans-serif;
  font-size: 26px;
  font-weight: 700;
  color: var(--navy);
  text-align: center;
  margin-bottom: 6px;
}

.auth-subtitle {
  font-size: 14px;
  color: #6b7a8d;
  text-align: center;
  margin-bottom: 28px;
}

.auth-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 16px;
}

.auth-field label {
  font-size: 13px;
  font-weight: 600;
  color: var(--navy);
}

.auth-field > input,
.auth-field .auth-input-wrap input {
  width: 100%;
  padding: 12px 16px;
  border: 2px solid rgba(43, 184, 200, 0.25);
  border-radius: 14px;
  font-size: 15px;
  font-family: "Inter", sans-serif;
  background: #ffffff;
  color: var(--navy);
  transition:
    border-color 0.2s,
    box-shadow 0.2s;
  outline: none;
}

.auth-field > input:focus,
.auth-field .auth-input-wrap input:focus {
  border-color: var(--teal);
  box-shadow: 0 0 0 4px rgba(43, 184, 200, 0.15);
}

.auth-field > input::placeholder,
.auth-field .auth-input-wrap input::placeholder {
  color: #b0bac4;
}

.auth-input-wrap {
  position: relative;
}

.auth-input-wrap input {
  padding-right: 44px;
}

.auth-eye {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--teal);
  line-height: 0;
  transition: color 0.2s;
}

.auth-eye:hover {
  color: var(--teal-dark);
}

.auth-eye:focus-visible {
  outline: 2px solid var(--teal);
  outline-offset: 2px;
  border-radius: 4px;
}

.auth-eye-icon {
  width: 20px;
  height: 20px;
  display: block;
}

.auth-validation {
  font-size: 12px;
  color: #e05050;
  margin-top: 2px;
}

.auth-row {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  margin-bottom: 20px;
}

.auth-row--2col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  justify-content: stretch;
  margin-bottom: 0;
}

.auth-link {
  font-size: 13px;
  font-weight: 600;
  color: var(--teal);
  text-decoration: none;
}

.auth-link:hover {
  text-decoration: underline;
}

.auth-submit {
  width: 100%;
  margin-top: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 15px;
  font-size: 16px;
}

.auth-form-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 8px;
}

.auth-form-actions .auth-submit {
  margin-top: 0;
}

.auth-skip-btn {
  width: 100%;
  padding: 12px 16px;
  border: none;
  border-radius: 12px;
  background: transparent;
  color: #7a8899;
  font-size: 14px;
  font-weight: 600;
  font-family: "Inter", sans-serif;
  cursor: pointer;
  transition: color 0.15s, background 0.15s;
  min-height: 44px;
}

.auth-skip-btn:hover:not(:disabled) {
  color: var(--navy);
  background: rgba(15, 42, 68, 0.05);
}

.auth-skip-btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

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

.auth-spinner {
  width: 18px;
  height: 18px;
  border: 3px solid rgba(255, 255, 255, 0.4);
  border-top-color: #fff;
  border-radius: 50%;
  animation: authSpin 0.7s linear infinite;
  display: inline-block;
}

@keyframes authSpin {
  to {
    transform: rotate(360deg);
  }
}

.auth-alert {
  border-radius: 12px;
  padding: 12px 16px;
  font-size: 14px;
  margin-bottom: 16px;
  font-weight: 500;
}

.auth-alert--error {
  background: rgba(224, 80, 80, 0.1);
  color: #c0392b;
  border: 1px solid rgba(224, 80, 80, 0.3);
}

.auth-switch {
  text-align: center;
  font-size: 14px;
  color: #6b7a8d;
  margin-top: 20px;
}

.auth-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 20px 0 16px;
  color: #8a97a8;
  font-size: 13px;
  font-weight: 600;
  text-transform: lowercase;
}

.auth-divider::before,
.auth-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: rgba(107, 122, 141, 0.25);
}

.auth-google-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 13px 16px;
  border-radius: 12px;
  border: 1px solid rgba(107, 122, 141, 0.35);
  background: #fff;
  color: #1f2a37;
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  transition:
    background 0.2s,
    border-color 0.2s,
    box-shadow 0.2s;
}

.auth-google-btn:hover {
  background: #f8fafc;
  border-color: rgba(43, 184, 200, 0.45);
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.08);
}

.auth-google-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.auth-remember {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-mid);
  cursor: pointer;
  user-select: none;
}

.auth-remember input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: var(--teal);
  cursor: pointer;
}

.auth-privacy-notice {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-mid);
  line-height: 1.45;
  margin: 0 0 12px;
  text-align: center;
}

.auth-privacy-notice .auth-link {
  font-weight: 600;
}

.auth-card--signup .auth-field {
  margin-bottom: 10px;
  gap: 4px;
}

.auth-card--signup .auth-field > input,
.auth-card--signup .auth-field .auth-input-wrap input {
  padding: 11px 14px;
  font-size: 14px;
}

.auth-card--signup .auth-submit {
  margin-top: 4px;
}

@media (max-width: 768px) {
  .auth-section {
    padding: 60px 14px 32px;
  }

  .auth-card {
    padding: 32px 20px 28px;
    border-radius: 24px;
  }

  .auth-row--2col {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .auth-card {
    padding: 28px 16px 24px;
    border-radius: 20px;
  }

  .auth-title {
    font-size: 22px;
  }
}
