/*
  Sinioo — Authentication Pages Styles
  Sign-in & Sign-up pages with split-screen layout
*/

/* Auth page layout */
.auth-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 6rem 1.5rem 3rem;
  background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
}

.auth-wrapper {
  width: 100%;
  max-width: 1100px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
  background: var(--white);
  border-radius: 24px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.1);
  overflow: hidden;
}

/* Hero section (left side) */
.auth-hero {
  padding: 3rem;
  background: linear-gradient(135deg, #0a0a0a 0%, #1a1a2e 100%);
  color: var(--white);
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 500px;
  position: relative;
  overflow: hidden;
}

.auth-hero::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -50%;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle, rgba(47, 249, 36, 0.15) 0%, transparent 70%);
  animation: pulse 8s ease-in-out infinite;
}

.auth-hero::after {
  content: '';
  position: absolute;
  bottom: -30%;
  left: -30%;
  width: 80%;
  height: 80%;
  background: radial-gradient(circle, rgba(139, 92, 246, 0.12) 0%, transparent 70%);
  animation: pulse 10s ease-in-out infinite reverse;
}

@keyframes pulse {
  0%, 100% { transform: scale(1); opacity: 0.6; }
  50% { transform: scale(1.1); opacity: 0.8; }
}

.auth-hero-content {
  position: relative;
  z-index: 1;
}

.auth-hero h2 {
  font-family: 'Instrument Serif', serif;
  font-size: 2.5rem;
  font-weight: 500;
  line-height: 1.2;
  margin-bottom: 1.5rem;
  letter-spacing: -0.02em;
}

.auth-hero p {
  font-size: 1.05rem;
  color: rgba(255, 255, 255, 0.75);
  line-height: 1.7;
  font-weight: 350;
  margin-bottom: 2rem;
}

.auth-features {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.auth-feature {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.95rem;
  color: rgba(255, 255, 255, 0.85);
  font-weight: 400;
}

.auth-feature svg {
  flex-shrink: 0;
  color: #2ff924;
}

/* Form section (right side) */
.auth-form-section {
  padding: 3rem 2.5rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.auth-form-header {
  margin-bottom: 2rem;
}

.auth-form-header h1 {
  font-family: 'Instrument Serif', serif;
  font-size: 2rem;
  font-weight: 500;
  margin-bottom: 0.5rem;
  letter-spacing: -0.02em;
}

.auth-form-header p {
  font-size: 1rem;
  color: var(--sub);
  font-weight: 350;
  line-height: 1.6;
}

/* Back button */
.auth-back-btn {
  position: absolute;
  top: 1.5rem;
  left: 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  border-radius: 10px;
  background: var(--text);
  border: 1px solid var(--text);
  color: var(--white);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  transition: all 0.2s ease;
  z-index: 10;
}

.auth-back-btn:hover {
  background: #333;
  border-color: #333;
}

.auth-back-btn svg {
  width: 18px;
  height: 18px;
}

.auth-hero-no-back .auth-back-btn {
  display: none;
}

/* Form elements - tighter spacing */
.auth-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.form-field {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.m-label {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 0.25rem;
}

.m-input {
  padding: 0.85rem 1rem;
  border: 1px solid var(--border);
  border-radius: 12px;
  font-size: 1rem;
  font-family: 'Inter', sans-serif;
  transition: all 0.2s ease;
  background: var(--white);
}

.m-input:focus {
  outline: none;
  border-color: #2ff924;
  box-shadow: 0 0 0 3px rgba(47, 249, 36, 0.12);
}

.m-input::placeholder {
  color: var(--muted);
  font-weight: 400;
}

/* Submit button */
.submit-btn {
  background: var(--text);
  color: var(--white);
  border: none;
  padding: 1rem 1.5rem;
  border-radius: 12px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  margin-top: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  width: 100%;
}

.submit-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

.submit-btn:active {
  transform: translateY(0);
}

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

 /* Loading state with spinner */
 .submit-btn.loading {
   position: relative;
   color: transparent;
   pointer-events: none;
 }

 .submit-btn.loading::after {
   content: '';
   position: absolute;
   width: 20px;
   height: 20px;
   top: 50%;
   left: 50%;
   margin-left: -10px;
   margin-top: -10px;
   border: 2px solid transparent;
   border-top-color: var(--white);
   border-radius: 50%;
   animation: spin 0.75s linear infinite;
 }

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

 /* Form messages */
.form-msg {
  padding: 0.75rem 1rem;
  border-radius: 10px;
  font-size: 0.9rem;
  font-weight: 500;
  display: none;
}

.form-msg.form-ok {
  display: block;
  background: #dcfce7;
  color: #166534;
}

.form-msg.form-error {
  display: block;
  background: #fee2e2;
  color: #991b1b;
}

/* Footer links */
.auth-footer {
  text-align: center;
  margin-top: 1.5rem;
  font-size: 0.95rem;
  color: var(--muted);
  font-weight: 500;
}

.auth-footer a {
  color: var(--text);
  text-decoration: none;
  font-weight: 700;
  transition: color 0.2s ease;
}

.auth-footer a:hover {
  color: #2ff924;
}

 /* Password hint / form hint */
 .password-hint,
 .form-hint {
   font-size: 0.8rem;
   color: var(--muted);
   margin-top: 0.25rem;
   text-align: center;
 }

 /* Divider */
.auth-divider {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin: 1.5rem 0;
}

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

.auth-divider span {
  font-size: 0.85rem;
  color: var(--muted);
  font-weight: 500;
}

/* Social login buttons */
.social-login {
  display: flex;
  gap: 0.75rem;
}

.social-btn {
  flex: 1;
  padding: 0.75rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--white);
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text);
  text-decoration: none;
}

.social-btn:hover {
  background: var(--light);
  border-color: #c2c2c2;
}

.social-btn svg,
.social-btn img {
  width: 18px;
  height: 18px;
}

/* Responsive: Tablet and below */
@media (max-width: 850px) {
  .auth-wrapper {
    grid-template-columns: 1fr;
    max-width: 560px;
  }

  .auth-hero {
    display: none;
  }

  .auth-form-section {
    padding: 2.5rem 2rem;
    border-radius: 24px 24px 0 0;
  }

  .auth-page {
    padding: 6rem 1rem 0;
  }

  .auth-wrapper {
    border-radius: 24px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.08);
  }
}

/* Code inputs layout */
.code-inputs {
  display: flex;
  gap: 0.5rem;
  justify-content: center;
  margin-top: 0.5rem;
}

.code-input {
  width: 3.2rem;
  height: 3.6rem;
  text-align: center;
  font-size: 1.5rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  padding: 0.5rem;
  border: 2px solid var(--border);
  border-radius: 10px;
  transition: all 0.2s ease;
}

 .code-input:focus {
   border-color: #2ff924;
   box-shadow: 0 0 0 3px rgba(47, 249, 36, 0.12);
   outline: none;
 }

 .code-input.filled {
   border-color: #2ff924;
   background: #f0fdf4;
 }

 .code-input::selection {
   background: transparent;
 }

/* Responsive: Mobile */
@media (max-width: 480px) {
  .auth-page {
    padding: 5rem 0.75rem 1.5rem;
  }

  .auth-form-section {
    padding: 2rem 1.25rem;
  }

  .auth-form-header h1 {
    font-size: 1.75rem;
  }

  .auth-form-header p {
    font-size: 0.95rem;
  }

  .m-input {
    padding: 0.75rem 0.875rem;
    font-size: 0.975rem;
  }

  .submit-btn {
    padding: 0.9rem 1.25rem;
    font-size: 0.95rem;
  }

  .social-btn {
    padding: 0.65rem;
    font-size: 0.85rem;
  }

  /* Responsive: reduce code input size on mobile */
  .code-input {
    width: 2.6rem;
    height: 3rem;
    font-size: 1.25rem;
  }
  
  .code-inputs {
    gap: 0.35rem;
  }
}

