/* SpotMySnap — SaaS auth UI */

.auth-page {
  min-height: 100dvh;
  min-height: 100vh;
  display: flex;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--cream);
  -webkit-font-smoothing: antialiased;
}

.auth-split {
  display: flex;
  width: 100%;
  min-height: 100dvh;
}

/* Brand panel (desktop) */
.auth-brand {
  display: none;
  flex: 1;
  position: relative;
  padding: 3rem;
  color: #fff;
  overflow: hidden;
  isolation: isolate;
}

/* Event photo mosaic — sits beneath the teal filter overlay */
.auth-brand-photos {
  position: absolute;
  inset: 0;
  z-index: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: repeat(3, 1fr);
  gap: 3px;
  transform: scale(1.04);
}

.auth-brand-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.auth-brand-photo--1 {
  grid-column: 1;
  grid-row: 1 / span 2;
}

.auth-brand-photo--2 {
  grid-column: 2 / span 2;
  grid-row: 1;
}

.auth-brand-photo--3 {
  grid-column: 2;
  grid-row: 2;
}

.auth-brand-photo--4 {
  grid-column: 3;
  grid-row: 2;
}

.auth-brand-photo--5 {
  grid-column: 1 / span 2;
  grid-row: 3;
}

.auth-brand-photo--6 {
  grid-column: 3;
  grid-row: 3;
}

/* Teal gradient filter over photos */
.auth-brand-overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    linear-gradient(160deg, rgba(29, 107, 107, 0.82) 0%, rgba(22, 77, 77, 0.76) 42%, rgba(15, 53, 53, 0.88) 100%),
    linear-gradient(0deg, rgba(15, 53, 53, 0.4) 0%, transparent 50%);
  pointer-events: none;
}

.auth-brand-inner {
  position: relative;
  z-index: 3;
  max-width: 28rem;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
}

.auth-brand-logo {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.25rem;
  color: #fff;
  text-decoration: none;
  margin-bottom: 3rem;
}

.auth-brand .auth-testimonial {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: relative;
  margin: 0.5rem 0 0;
  padding: 1.75rem 1.6rem 1.5rem;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-left: 4px solid var(--coral);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow:
    0 16px 48px rgba(0, 0, 0, 0.22),
    inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

.auth-brand .auth-testimonial__eyebrow {
  margin: 0 0 0.85rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.92);
}

.auth-brand .auth-testimonial__quote {
  font-family: var(--font-display);
  font-size: clamp(1.45rem, 2.8vw, 1.95rem);
  font-weight: 600;
  line-height: 1.4;
  letter-spacing: -0.02em;
  color: #fff;
  margin: 0 0 1.15rem;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.15);
}

.auth-brand .auth-testimonial footer {
  font-size: 1rem;
  font-weight: 500;
  font-style: normal;
  color: rgba(255, 255, 255, 0.88);
}

.auth-brand .auth-testimonial cite {
  font-style: normal;
  font-weight: 700;
  color: #fff;
}

.auth-brand-logo-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.15);
}

.auth-brand h2 {
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 3vw, 2.25rem);
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.02em;
  margin-bottom: 1rem;
}

.auth-brand p:not(.auth-testimonial__eyebrow):not(.auth-testimonial__quote) {
  font-size: 1rem;
  line-height: 1.65;
  color: rgba(255, 255, 255, 0.82);
  margin-bottom: 1.25rem;
}

.auth-brand-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  margin-top: 0;
  padding-top: 1.5rem;
}

.auth-brand-list li {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.9);
}

.auth-brand-list svg {
  flex-shrink: 0;
  opacity: 0.9;
}

.auth-brand-glow {
  position: absolute;
  z-index: 2;
  width: 320px;
  height: 320px;
  border-radius: 50%;
  background: rgba(224, 99, 74, 0.25);
  filter: blur(80px);
  top: 20%;
  right: -10%;
  pointer-events: none;
}

.auth-brand-glow-2 {
  position: absolute;
  z-index: 2;
  width: 240px;
  height: 240px;
  border-radius: 50%;
  background: rgba(42, 138, 138, 0.4);
  filter: blur(60px);
  bottom: 10%;
  left: -5%;
  pointer-events: none;
}

/* Form panel */
.auth-panel {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem 1.25rem;
  background: var(--cream);
}

.auth-panel-top {
  width: 100%;
  max-width: 400px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
}

.auth-panel-logo {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.1rem;
  color: var(--ink);
  text-decoration: none;
}

.auth-panel-logo-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border-radius: 8px;
  background: linear-gradient(145deg, var(--teal), var(--teal-light));
  color: #fff;
}

.auth-back {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--ink-muted);
  text-decoration: none;
  transition: color var(--transition);
}

.auth-back:hover { color: var(--teal-text); }

.auth-card {
  width: 100%;
  max-width: 400px;
  padding: 2rem 1.75rem;
  background: var(--paper);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
}

.auth-card-header {
  text-align: center;
  margin-bottom: 1.75rem;
}

.auth-card-header h1 {
  font-family: var(--font-display);
  font-size: 1.65rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin-bottom: 0.4rem;
}

.auth-card-header p {
  font-size: 0.9rem;
  color: var(--ink-muted);
}

.auth-card-header a {
  color: var(--teal-text);
  font-weight: 600;
  text-decoration: none;
}

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

/* Social */
.auth-social {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  margin-bottom: 1.5rem;
}

.auth-social-hint {
  margin: 0;
  font-size: 0.78rem;
  line-height: 1.45;
  color: var(--muted, #475569);
  text-align: center;
}

.auth-social-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  width: 100%;
  padding: 0.75rem 1rem;
  font-size: 0.9rem;
  font-weight: 600;
  font-family: inherit;
  color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--border);
  border-radius: 10px;
  cursor: pointer;
  text-decoration: none;
  transition: background var(--transition), border-color var(--transition);
}

.auth-social-btn:hover:not(:disabled):not(.is-disabled) {
  background: rgba(20, 24, 32, 0.03);
  border-color: rgba(20, 24, 32, 0.15);
}

.auth-social-btn:disabled,
.auth-social-btn.is-disabled {
  opacity: 0.55;
  cursor: not-allowed;
  pointer-events: none;
}

.auth-divider {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--ink-subtle);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

/* Form fields */
.auth-form {
  display: flex;
  flex-direction: column;
  gap: 1.15rem;
}

.auth-field label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 0.4rem;
}

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

.auth-input-wrap input {
  width: 100%;
  padding: 0.75rem 1rem;
  padding-right: 2.75rem;
  font-size: 0.95rem;
  font-family: inherit;
  color: var(--ink);
  background: var(--cream);
  border: 1px solid var(--border);
  border-radius: 10px;
  transition: border-color var(--transition), box-shadow var(--transition);
}

.auth-input-wrap input::placeholder {
  color: var(--ink-subtle);
}

.auth-input-wrap input:hover {
  border-color: rgba(20, 24, 32, 0.15);
}

.auth-input-wrap input:focus {
  outline: none;
  border-color: var(--teal-text);
  box-shadow: 0 0 0 3px rgba(29, 107, 107, 0.15);
  background: var(--paper);
}

.auth-input-wrap input:invalid:not(:placeholder-shown):not(:focus) {
  border-color: rgba(224, 99, 74, 0.5);
}

.auth-input-wrap.no-toggle input {
  padding-right: 1rem;
}

.auth-toggle-pw {
  position: absolute;
  right: 0.65rem;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.25rem;
  background: none;
  border: none;
  color: var(--ink-subtle);
  cursor: pointer;
  border-radius: 6px;
  transition: color var(--transition);
}

.auth-toggle-pw:hover { color: var(--teal-text); }

.auth-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.auth-checkbox {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  font-size: 0.8rem;
  color: var(--ink-muted);
  line-height: 1.45;
  cursor: pointer;
}

.auth-checkbox input {
  width: 1rem;
  height: 1rem;
  margin-top: 0.15rem;
  accent-color: var(--teal-text);
  flex-shrink: 0;
  cursor: pointer;
}

.auth-checkbox a {
  color: var(--teal-text);
  font-weight: 600;
  text-decoration: none;
}

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

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

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

.auth-submit {
  width: 100%;
  padding: 0.9rem 1.25rem;
  font-size: 0.95rem;
  font-weight: 700;
  font-family: inherit;
  color: #fff;
  background: linear-gradient(135deg, var(--coral), var(--coral-dark));
  border: none;
  border-radius: 12px;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(224, 99, 74, 0.3);
  transition: transform var(--transition), box-shadow var(--transition), opacity var(--transition);
  margin-top: 0.25rem;
}

.auth-submit:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 10px 28px rgba(224, 99, 74, 0.35);
}

.auth-submit:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.auth-submit.is-loading {
  pointer-events: none;
  position: relative;
  color: transparent;
}

.auth-submit.is-loading::after {
  content: '';
  position: absolute;
  width: 1.25rem;
  height: 1.25rem;
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-top-color: #fff;
  border-radius: 50%;
  animation: auth-spin 0.7s linear infinite;
  left: 50%;
  top: 50%;
  margin: -0.625rem 0 0 -0.625rem;
}

@keyframes auth-spin {
  to { transform: rotate(360deg); }
}

@media (prefers-reduced-motion: reduce) {
  .auth-submit.is-loading::after { animation: none; border-color: #fff; }
}

.auth-message {
  font-size: 0.85rem;
  font-weight: 600;
  text-align: center;
  padding: 0.65rem 0.85rem;
  border-radius: 10px;
  display: none;
}

.auth-message.is-visible { display: block; }

.auth-message.error {
  background: rgba(224, 99, 74, 0.1);
  color: var(--coral-dark);
  border: 1px solid rgba(224, 99, 74, 0.25);
}

.auth-message.success {
  background: rgba(29, 107, 107, 0.1);
  color: var(--teal-text);
  border: 1px solid rgba(29, 107, 107, 0.25);
}

.auth-footer-note {
  margin-top: 1.5rem;
  text-align: center;
  font-size: 0.8rem;
  color: var(--ink-subtle);
  line-height: 1.5;
}

.auth-panel-copy,
.auth-page-footer {
  margin-top: 2rem;
  font-size: 0.75rem;
  color: var(--ink-subtle);
  text-align: center;
}

.auth-page-footer a:not(.footer-social-link) {
  color: var(--teal-text);
  font-weight: 600;
  text-decoration: none;
}

.auth-page-footer a:not(.footer-social-link):hover {
  text-decoration: underline;
}

.auth-page-footer .footer-social-link {
  color: var(--ink-subtle);
  font-weight: 400;
}

.auth-page-footer .footer-social-link:hover {
  color: var(--teal-text);
  text-decoration: none;
}

/* Desktop split — brand fixed, form panel scrolls independently */
@media (min-width: 900px) {
  .auth-page {
    height: 100dvh;
    max-height: 100dvh;
    overflow: hidden;
  }

  .auth-split {
    height: 100%;
    min-height: 0;
  }

  .auth-brand {
    display: flex;
    flex: 1;
    height: 100dvh;
    max-height: 100dvh;
    overflow: hidden;
  }

  .auth-panel {
    flex: 0 0 50%;
    max-width: 50%;
    height: 100dvh;
    max-height: 100dvh;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    scrollbar-gutter: stable;
    /* Center short forms; scroll when signup (etc.) is taller than the viewport */
    justify-content: flex-start;
    justify-content: safe center;
  }

  .auth-panel-logo {
    display: none;
  }
}

@media (max-width: 899px) {
  .auth-back { display: none; }
}
