/* ================================================================
   FlipIQ Auth Pages — Dark-Mode Design System
   Shared stylesheet for login.php & signup.php
   Matches landing page (index.css) design tokens
   ================================================================ */

/* ========= SECTION 0: CSS VARIABLES ========= */

:root {
  /* Background layers (from index.css) */
  --land-bg-base: #030712;
  --land-bg-card: #0F0F1A;
  --land-bg-surface: #1A1A2E;
  --land-bg-elevated: #252540;

  /* Brand purple scale */
  --land-purple-50: #FAF5FF;
  --land-purple-100: #F3E8FF;
  --land-purple-200: #E9D5FF;
  --land-purple-300: #D8B4FE;
  --land-purple-400: #C084FC;
  --land-purple-500: #A855F7;
  --land-purple-600: #9333EA;
  --land-purple-700: #7E22CE;
  --land-purple-800: #6B21A8;
  --land-purple-900: #581C87;

  /* Accent */
  --land-blue-500: #3B82F6;
  --land-indigo-500: #6366F1;
  --land-green-500: #22C55E;
  --land-amber-500: #F59E0B;
  --land-red-500: #EF4444;

  /* Text */
  --land-text-primary: #F9FAFB;
  --land-text-secondary: #9CA3AF;
  --land-text-muted: #6B7280;

  /* Glass */
  --land-glass-bg: rgba(255, 255, 255, 0.04);
  --land-glass-border: rgba(255, 255, 255, 0.08);
  --land-glass-hover: rgba(255, 255, 255, 0.07);

  /* Radius */
  --land-radius-sm: 8px;
  --land-radius-md: 12px;
  --land-radius-lg: 16px;
  --land-radius-xl: 24px;
  --land-radius-2xl: 32px;
  --land-radius-full: 9999px;

  /* Shadows */
  --land-shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
  --land-shadow-md: 0 4px 12px rgba(0, 0, 0, 0.4);
  --land-shadow-lg: 0 12px 32px rgba(0, 0, 0, 0.5);
  --land-shadow-glow: 0 0 60px rgba(168, 85, 247, 0.15);
  --land-shadow-btn: 0 4px 14px rgba(126, 34, 206, 0.4);
}

/* ========= SECTION 1: BASE RESET ========= */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body.auth-dark {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--land-bg-base);
  color: var(--land-text-primary);
  line-height: 1.5;
  min-height: 100vh;
  overflow-x: hidden;
}

/* ========= SECTION 2: SPLIT-SCREEN LAYOUT ========= */

.auth-page {
  display: grid;
  grid-template-columns: 45% 55%;
  min-height: 100vh;
}

body.auth-dark.navbar-offset .auth-page {
  min-height: calc(100vh - 80px);
}

.auth-form-side {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: clamp(1.5rem, 4vw, 3rem);
  padding-top: clamp(3rem, 5vh, 5rem);
  background: var(--land-bg-base);
  overflow-y: auto;
  position: relative;
  z-index: 1;
}

/* ========= SECTION 3: GLASSMORPHISM FORM CARD ========= */

.auth-card {
  width: 100%;
  max-width: 420px;
  animation: authSlideInLeft 0.7s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.auth-logo {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  margin-bottom: 2rem;
}

.auth-logo img {
  height: 40px;
  width: auto;
}

.auth-logo__text {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--land-text-primary);
}

.auth-card__title {
  font-size: clamp(1.5rem, 3vw, 1.75rem);
  font-weight: 700;
  color: var(--land-text-primary);
  margin-bottom: 0.5rem;
  letter-spacing: -0.01em;
  line-height: 1.2;
}

.auth-card__subtitle {
  font-size: 0.9375rem;
  color: var(--land-text-secondary);
  margin-bottom: 1.75rem;
  line-height: 1.5;
}

/* ========= SECTION 4: FORM FIELDS ========= */

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.auth-field {
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
}

.auth-field__label {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--land-text-secondary);
}

.auth-field__label-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.auth-field__forgot {
  font-size: 0.8125rem;
  color: var(--land-purple-400);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s;
}

.auth-field__forgot:hover {
  color: var(--land-purple-300);
  text-decoration: underline;
}

.auth-field__input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.auth-field__input {
  width: 100%;
  padding: 0.75rem 1rem;
  padding-right: 2.75rem;
  background: var(--land-bg-surface);
  border: 1.5px solid var(--land-glass-border);
  border-radius: var(--land-radius-sm);
  color: var(--land-text-primary);
  font-size: 0.9375rem;
  font-family: inherit;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.auth-field__input::placeholder {
  color: var(--land-text-muted);
}

.auth-field__input:hover {
  border-color: rgba(255, 255, 255, 0.15);
}

.auth-field__input:focus {
  border-color: var(--land-purple-500);
  box-shadow: 0 0 0 3px rgba(168, 85, 247, 0.2), 0 0 16px rgba(168, 85, 247, 0.1);
}

.auth-field__input.input-error,
select.auth-field__input.input-error {
  border-color: #ef4444 !important;
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.15);
}

/* Select styling */
select.auth-field__input {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%239CA3AF' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  padding-right: 2.5rem;
  cursor: pointer;
}

select.auth-field__input option {
  background: var(--land-bg-surface);
  color: var(--land-text-primary);
}

/* Form hint */
.auth-field__hint {
  font-size: 0.8125rem;
  color: var(--land-text-muted);
  margin-top: 0.25rem;
}

/* Field error */
.auth-field__error {
  display: block;
  font-size: 0.8125rem;
  color: var(--land-red-500);
  margin-top: 0.25rem;
  min-height: 0;
}

/* ========= SECTION 5: PASSWORD TOGGLE ========= */

.auth-toggle-pw {
  position: absolute;
  right: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0.25rem;
  color: var(--land-text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  transition: color 0.2s;
  line-height: 0;
}

.auth-toggle-pw:hover {
  color: var(--land-text-secondary);
}

.auth-toggle-pw:focus-visible {
  outline: 2px solid var(--land-purple-500);
  outline-offset: 2px;
}

.auth-toggle-pw svg {
  width: 18px;
  height: 18px;
  pointer-events: none;
}

/* ========= SECTION 6: PASSWORD STRENGTH ========= */

.auth-pw-strength {
  margin-top: 0.5rem;
}

.auth-pw-strength__bars {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 4px;
}

.auth-pw-strength__bar {
  height: 4px;
  border-radius: 2px;
  background: var(--land-bg-elevated);
  transition: background-color 0.3s;
}

/* Strength levels */
.auth-pw-strength[data-level="1"] .auth-pw-strength__bar:nth-child(1) { background: var(--land-red-500); }

.auth-pw-strength[data-level="2"] .auth-pw-strength__bar:nth-child(1),
.auth-pw-strength[data-level="2"] .auth-pw-strength__bar:nth-child(2) { background: var(--land-amber-500); }

.auth-pw-strength[data-level="3"] .auth-pw-strength__bar:nth-child(1),
.auth-pw-strength[data-level="3"] .auth-pw-strength__bar:nth-child(2),
.auth-pw-strength[data-level="3"] .auth-pw-strength__bar:nth-child(3) { background: var(--land-blue-500); }

.auth-pw-strength[data-level="4"] .auth-pw-strength__bar { background: var(--land-green-500); }

.auth-pw-strength__label {
  font-size: 0.75rem;
  margin-top: 0.375rem;
  display: block;
  transition: color 0.3s;
  color: var(--land-text-muted);
}

.auth-pw-strength[data-level="1"] .auth-pw-strength__label { color: var(--land-red-500); }
.auth-pw-strength[data-level="2"] .auth-pw-strength__label { color: var(--land-amber-500); }
.auth-pw-strength[data-level="3"] .auth-pw-strength__label { color: var(--land-blue-500); }
.auth-pw-strength[data-level="4"] .auth-pw-strength__label { color: var(--land-green-500); }

/* ========= SECTION 7: SUBMIT BUTTON ========= */

.auth-submit {
  width: 100%;
  padding: 0.875rem 1.5rem;
  background: linear-gradient(135deg, var(--land-purple-600) 0%, var(--land-purple-700) 100%);
  color: #fff;
  border: none;
  border-radius: var(--land-radius-sm);
  font-size: 1rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
  box-shadow: var(--land-shadow-btn);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  position: relative;
  overflow: hidden;
  margin-top: 0.25rem;
}

.auth-submit:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(126, 34, 206, 0.5);
}

/* Shimmer sweep on hover */
.auth-submit::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(255, 255, 255, 0.15) 50%,
    transparent 100%
  );
  transform: skewX(-20deg);
  transition: none;
  pointer-events: none;
}

.auth-submit:hover::after {
  animation: shimmer-sweep 0.8s ease-out forwards;
}

@keyframes shimmer-sweep {
  0%   { left: -100%; }
  100% { left: 100%; }
}

.auth-submit:active {
  transform: scale(0.98);
}

.auth-submit:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.auth-submit__spinner {
  display: none;
  width: 20px;
  height: 20px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: authSpin 0.6s linear infinite;
}

.auth-submit--loading .auth-submit__text { display: none; }
.auth-submit--loading .auth-submit__spinner { display: block; }

/* ========= SECTION 8: OR SEPARATOR ========= */

.auth-or {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin: 1.5rem 0;
  color: var(--land-text-muted);
  font-size: 0.875rem;
}

.auth-or hr {
  flex: 1;
  border: none;
  height: 1px;
  background: var(--land-glass-border);
}

/* ========= SECTION 9: OAUTH BUTTONS ========= */

.auth-oauth-btn {
  width: 100%;
  padding: 0.75rem 1rem;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--land-radius-sm);
  color: var(--land-text-primary);
  font-size: 0.9375rem;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.625rem;
  transition: background 0.2s, border-color 0.2s;
}

.auth-oauth-btn:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.2);
}

.auth-oauth-btn:active {
  transform: scale(0.98);
}

.auth-oauth-btn svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

/* ========= SECTION 10: FOOTER LINK ========= */

.auth-footer-link {
  text-align: center;
  margin-top: 1.5rem;
  font-size: 0.875rem;
  color: var(--land-text-muted);
}

.auth-footer-link a {
  color: var(--land-purple-400);
  font-weight: 500;
  text-decoration: none;
  transition: color 0.2s;
}

.auth-footer-link a:hover {
  color: var(--land-purple-300);
  text-decoration: underline;
}

/* ========= SECTION 11: ERROR/MESSAGE ========= */

.auth-message {
  padding: 0.75rem 1rem;
  border-radius: var(--land-radius-sm);
  font-size: 0.875rem;
  font-weight: 500;
  text-align: center;
  animation: authSlideDown 0.3s ease;
}

.auth-message.error {
  color: #FCA5A5;
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.25);
}

.auth-message.success {
  color: #86EFAC;
  background: rgba(34, 197, 94, 0.1);
  border: 1px solid rgba(34, 197, 94, 0.25);
}

/* ========= SECTION 12: TERMS TEXT ========= */

.auth-terms {
  font-size: 0.75rem;
  color: var(--land-text-muted);
  text-align: center;
  line-height: 1.6;
  margin-top: 1.25rem;
}

.auth-terms a {
  color: var(--land-purple-400);
  text-decoration: none;
  font-weight: 500;
}

.auth-terms a:hover {
  text-decoration: underline;
}

/* ========= SECTION 13: MOCKUP SIDE ========= */

.auth-mockup-side {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 2rem;
  position: relative;
  overflow: hidden;
  background: var(--land-bg-card);
  padding: 2rem;
  padding-top: clamp(3rem, 5vh, 5rem);
}

/* Background effects */
.auth-mockup__bg-blob {
  position: absolute;
  top: 30%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 420px;
  height: 420px;
  background: radial-gradient(circle, rgba(147, 51, 234, 0.2) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}

.auth-mockup__bg-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px);
  background-size: 40px 40px;
  pointer-events: none;
  z-index: 0;
}

/* Headline */
.auth-mockup__headline {
  text-align: center;
  position: relative;
  z-index: 1;
}

.auth-mockup__gradient-text {
  font-size: clamp(1.5rem, 2.5vw, 2rem);
  font-weight: 800;
  background: linear-gradient(135deg, #A855F7 0%, #6366F1 50%, #3B82F6 100%);
  background-size: 200% 100%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: authGradientShift 4s ease-in-out infinite;
  letter-spacing: -0.02em;
  display: block;
  margin-bottom: 0.375rem;
}

.auth-mockup__headline p {
  font-size: 0.9375rem;
  color: var(--land-text-secondary);
}

/* ========= SECTION 14: PHONE MOCKUP ========= */

.auth-phone-wrapper {
  position: relative;
  z-index: 1;
  animation: authPhoneFloat 6s ease-in-out infinite;
}

.auth-phone-glow {
  position: absolute;
  inset: -30px;
  background: radial-gradient(ellipse at 50% 60%, rgba(147, 51, 234, 0.3) 0%, transparent 70%);
  z-index: -1;
  pointer-events: none;
}

.auth-phone {
  width: 260px;
  height: 520px;
  background: #12121E;
  border-radius: 40px;
  border: 2px solid rgba(255, 255, 255, 0.1);
  overflow: hidden;
  position: relative;
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.05),
    0 25px 50px rgba(0, 0, 0, 0.5),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

/* Notch */
.auth-phone::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100px;
  height: 26px;
  background: #12121E;
  border-radius: 0 0 16px 16px;
  z-index: 10;
}

/* Phone screen states */
.auth-phone__screen {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  padding: 3rem 1.5rem 2rem;
  opacity: 0;
  transform: scale(0.95);
  transition: opacity 0.6s ease, transform 0.6s ease;
  pointer-events: none;
  background: linear-gradient(180deg, var(--land-bg-surface) 0%, var(--land-bg-card) 100%);
}

.auth-phone__screen.active {
  opacity: 1;
  transform: scale(1);
  pointer-events: auto;
}

/* Screen icons */
.auth-phone__screen-icon {
  width: 56px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(168, 85, 247, 0.15);
  color: var(--land-purple-400);
  margin-bottom: 0.5rem;
}

.auth-phone__screen-icon svg {
  width: 28px;
  height: 28px;
}

.auth-phone__screen-icon--spin svg {
  animation: authSpin 1.5s linear infinite;
}

/* Screen text */
.auth-phone__screen-text {
  font-size: 1rem;
  font-weight: 600;
  color: var(--land-text-primary);
  text-align: center;
}

.auth-phone__screen-subtext {
  font-size: 0.8125rem;
  color: var(--land-text-secondary);
  text-align: center;
  max-width: 200px;
}

/* Mini result card inside phone */
.auth-phone__mini-card {
  background: var(--land-glass-bg);
  border: 1px solid var(--land-glass-border);
  border-radius: var(--land-radius-md);
  padding: 1rem;
  width: 100%;
  max-width: 200px;
  margin-top: 0.5rem;
}

.auth-phone__mini-card-title {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--land-text-primary);
  margin-bottom: 0.25rem;
}

.auth-phone__mini-card-desc {
  font-size: 0.6875rem;
  color: var(--land-text-secondary);
  line-height: 1.4;
  margin-bottom: 0.5rem;
}

.auth-phone__mini-card-price {
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--land-green-500);
}

/* Scan line in camera state */
.auth-phone__scanline {
  position: absolute;
  left: 1rem;
  right: 1rem;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--land-purple-500), transparent);
  box-shadow: 0 0 8px rgba(168, 85, 247, 0.6);
  animation: authScanLine 2.5s ease-in-out infinite;
  z-index: 2;
}

/* Progress bar in analyzing state */
.auth-phone__progress {
  width: 160px;
  height: 6px;
  background: var(--land-bg-elevated);
  border-radius: 3px;
  overflow: hidden;
  margin-top: 0.5rem;
}

.auth-phone__progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--land-purple-500), var(--land-blue-500));
  border-radius: 3px;
  width: 0%;
  transition: width 0.1s linear;
}

/* Success checkmark bounce */
.auth-phone__screen-icon--bounce svg {
  animation: authBounce 0.6s ease both;
}

/* ========= SECTION 15: TRUST BADGES ========= */

.auth-trust {
  display: flex;
  align-items: center;
  gap: 1rem;
  background: var(--land-glass-bg);
  border: 1px solid var(--land-glass-border);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-radius: var(--land-radius-full);
  padding: 0.625rem 1.5rem;
  position: relative;
  z-index: 1;
}

.auth-trust__badge {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.125rem;
}

.auth-trust__badge span:first-child {
  font-weight: 700;
  color: var(--land-text-primary);
  font-size: 0.8125rem;
  white-space: nowrap;
}

.auth-trust__badge span:last-child {
  font-size: 0.6875rem;
  color: var(--land-text-muted);
}

.auth-trust__divider {
  width: 1px;
  height: 28px;
  background: rgba(255, 255, 255, 0.1);
}

/* ========= SECTION 16: BENEFITS (SIGNUP RIGHT SIDE) ========= */

.auth-benefits {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 320px;
}

.auth-benefits__item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  background: var(--land-glass-bg);
  border: 1px solid var(--land-glass-border);
  border-radius: var(--land-radius-md);
  transition: background 0.2s;
}

.auth-benefits__item:hover {
  background: var(--land-glass-hover);
}

.auth-benefits__icon {
  font-size: 1.25rem;
  flex-shrink: 0;
  width: 2rem;
  text-align: center;
}

.auth-benefits__text {
  font-size: 0.875rem;
  color: var(--land-text-secondary);
}

.auth-benefits__text strong {
  color: var(--land-text-primary);
  display: block;
  font-weight: 600;
  margin-bottom: 0.125rem;
}

/* ========= SECTION 16b: SIGNUP EXTRA FIELDS FADE-IN ========= */

.signup-extra-fields {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  opacity: 0;
  max-height: 0;
  overflow: hidden;
  transition: opacity 0.5s ease, max-height 0.5s ease;
  pointer-events: none;
}

.signup-extra-fields.visible {
  opacity: 1;
  max-height: 800px;
  pointer-events: auto;
}

/* ========= SECTION 16c: NAVBAR OVERRIDE FOR AUTH PAGES ========= */

body.auth-dark .navbar {
  background: var(--land-bg-card);
  border-bottom: 1px solid var(--land-glass-border);
  box-shadow: none;
}

body.auth-dark .navbar-logo img.logo-light {
  display: none !important;
}

body.auth-dark .navbar-logo img.logo-dark {
  display: block !important;
}

body.auth-dark .btn-login,
body.auth-dark .btn-signup {
  color: var(--land-text-primary);
}

body.auth-dark .btn-login:hover,
body.auth-dark .btn-signup:hover {
  background: rgba(255, 255, 255, 0.08);
}

body.auth-dark .nav-lang-btn {
  color: var(--land-text-secondary);
}

body.auth-dark .nav-lang-dropdown {
  background: var(--land-bg-surface);
  border-color: var(--land-glass-border);
}

body.auth-dark .nav-lang-option {
  color: var(--land-text-primary);
}

body.auth-dark .nav-lang-option:hover {
  background: var(--land-glass-hover);
}

body.auth-dark .bottom-nav {
  background: var(--land-bg-card);
  border: 1px solid var(--land-glass-border);
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.3);
}

body.auth-dark .bottom-nav__item {
  color: var(--land-text-secondary);
}

body.auth-dark .bottom-nav__fab {
  background: linear-gradient(135deg, var(--land-purple-600), var(--land-purple-700));
}

body.auth-dark.navbar-offset .auth-page {
  min-height: calc(100vh - 80px);
}

/* ========= SECTION 17: ANIMATIONS ========= */

@keyframes authSlideInLeft {
  from { opacity: 0; transform: translateX(-24px); }
  to { opacity: 1; transform: translateX(0); }
}

@keyframes authSlideInRight {
  from { opacity: 0; transform: translateX(40px); }
  to { opacity: 1; transform: translateX(0); }
}

@keyframes authPhoneFloat {
  0%, 100% { transform: translateY(0); }
  33% { transform: translateY(-8px); }
  66% { transform: translateY(-4px); }
}

@keyframes authGradientShift {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

@keyframes authSpin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

@keyframes authScanLine {
  0% { top: 25%; opacity: 0; }
  10% { opacity: 1; }
  90% { opacity: 1; }
  100% { top: 75%; opacity: 0; }
}

@keyframes authSlideDown {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes authBounce {
  0% { transform: scale(0); }
  50% { transform: scale(1.2); }
  100% { transform: scale(1); }
}

/* Mockup side slide-in */
.auth-mockup-side {
  animation: authSlideInRight 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.15s both;
}

/* ========= SECTION 18: RESPONSIVE ========= */

/* Tablet and below: stack layout */
@media (max-width: 1024px) {
  .auth-page {
    grid-template-columns: 1fr;
    min-height: auto;
  }

  .auth-mockup-side {
    order: -1;
    min-height: 320px;
    padding: 2rem 1.5rem;
  }

  .auth-form-side {
    padding: 2rem 1.5rem;
  }

  .auth-phone {
    width: 200px;
    height: 400px;
    border-radius: 32px;
  }

  .auth-phone::before {
    width: 80px;
    height: 22px;
    border-radius: 0 0 12px 12px;
  }

  .auth-phone__screen {
    padding: 2.5rem 1rem 1.5rem;
  }

  .auth-phone__screen-icon {
    width: 44px;
    height: 44px;
  }

  .auth-phone__screen-icon svg {
    width: 22px;
    height: 22px;
  }

  .auth-mockup__gradient-text {
    font-size: 1.5rem;
  }
}

/* Mobile */
@media (max-width: 768px) {
  body.auth-dark.navbar-offset .auth-page {
    min-height: 100vh;
  }

  .auth-mockup-side {
    min-height: 280px;
    gap: 1.25rem;
    padding: 1.5rem 5%;
  }

  .auth-form-side {
    padding: 1.5rem 5%;
    padding-bottom: calc(2rem + 96px + env(safe-area-inset-bottom));
  }

  .auth-card {
    max-width: 100%;
  }

  .auth-phone {
    width: 160px;
    height: 320px;
    border-radius: 26px;
  }

  .auth-phone::before {
    width: 64px;
    height: 18px;
    border-radius: 0 0 10px 10px;
  }

  .auth-phone__screen {
    padding: 2rem 0.75rem 1rem;
    gap: 0.5rem;
  }

  .auth-phone__screen-icon {
    width: 36px;
    height: 36px;
  }

  .auth-phone__screen-icon svg {
    width: 18px;
    height: 18px;
  }

  .auth-phone__screen-text {
    font-size: 0.8125rem;
  }

  .auth-phone__screen-subtext {
    font-size: 0.6875rem;
  }

  .auth-phone__mini-card {
    padding: 0.625rem;
    max-width: 140px;
  }

  .auth-phone__mini-card-title { font-size: 0.625rem; }
  .auth-phone__mini-card-desc { font-size: 0.5625rem; }
  .auth-phone__mini-card-price { font-size: 0.6875rem; }

  .auth-trust {
    padding: 0.5rem 1rem;
    gap: 0.75rem;
  }

  .auth-trust__badge span:first-child { font-size: 0.75rem; }
  .auth-trust__badge span:last-child { font-size: 0.625rem; }

  .auth-benefits {
    gap: 0.5rem;
  }

  .auth-benefits__item {
    padding: 0.5rem 0.75rem;
  }

  .auth-benefits__text { font-size: 0.8125rem; }

  /* Ensure 16px font on iOS to prevent zoom */
  .auth-field__input,
  select.auth-field__input {
    font-size: 16px;
  }

  /* Touch targets */
  .auth-submit,
  .auth-oauth-btn {
    min-height: 48px;
  }

  .auth-toggle-pw {
    min-width: 44px;
    min-height: 44px;
  }

  /* Center footer link */
  .auth-footer-link {
    text-align: center;
  }
}

/* Small mobile */
@media (max-width: 480px) {
  .auth-form-side {
    padding: 1.25rem 5%;
    padding-bottom: calc(1.25rem + 96px + env(safe-area-inset-bottom));
  }

  .auth-card__title {
    font-size: 1.375rem;
  }

  .auth-card__subtitle {
    font-size: 0.875rem;
  }

  .auth-mockup-side {
    min-height: 240px;
  }

  .auth-phone {
    width: 140px;
    height: 280px;
    border-radius: 22px;
  }

  .auth-phone::before {
    width: 52px;
    height: 14px;
    border-radius: 0 0 8px 8px;
  }

  .auth-phone__screen {
    padding: 1.5rem 0.5rem 0.75rem;
    gap: 0.375rem;
  }

  .auth-phone__screen-icon {
    width: 30px;
    height: 30px;
  }

  .auth-phone__screen-icon svg {
    width: 16px;
    height: 16px;
  }

  .auth-phone__screen-text { font-size: 0.6875rem; }
  .auth-phone__screen-subtext { display: none; }
  .auth-phone__mini-card { display: none; }
  .auth-trust { display: none; }
  .auth-benefits { display: none; }
}

/* ========= SECTION 19: ACCESSIBILITY ========= */

*:focus-visible {
  outline: 2px solid var(--land-purple-500);
  outline-offset: 2px;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .auth-card,
  .auth-mockup-side,
  .auth-phone-wrapper {
    animation: none !important;
    opacity: 1 !important;
    transform: none !important;
  }
}

/* High contrast */
@media (prefers-contrast: high) {
  .auth-field__input,
  .auth-oauth-btn,
  .auth-submit {
    border-width: 2px;
  }
}

/* ========= SECTION 20: PRINT ========= */

@media print {
  .auth-mockup-side,
  .auth-trust,
  .auth-benefits { display: none; }

  .auth-page { grid-template-columns: 1fr; }
}
