/* ==========================================================================
   AUTHENTICATION LAYOUT CORE
   ========================================================================== */
:root {
  --primary: #0057ff;        /* Royal Blue */
  --primary-dark: #0037a6;   /* Deep Blue */
  --primary-light: #eaf2ff;  /* Soft Blue Accents */
  --bg-light: #f8faff;       /* Pure white-blue backdrop */
  --white: #ffffff;
  --text-dark: #0f172a;      /* High contrast slate */
  --text-muted: #64748b;     /* Slate 500 metadata description text */
  --border-light: rgba(0, 87, 255, 0.08);
  --glass-bg: rgba(255, 255, 255, 0.85);
  --glass-border: rgba(255, 255, 255, 0.4);
  --shadow-premium: 0 25px 50px -12px rgba(0, 87, 255, 0.12);
  --radius-md: 12px;
  --radius-lg: 16px;
  --transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body, html {
  font-family: 'Inter', sans-serif;
  background-color: var(--bg-light);
  color: var(--text-dark);
  height: 100%;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* Auth container split grid */
.auth-container {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  min-height: 100vh;
  width: 100vw;
}

/* Left Visual Side Styling */
.auth-visual-side {
  position: relative;
  background-image: url('https://images.unsplash.com/photo-1600585154340-be6161a56a0c?auto=format&fit=crop&w=1400&q=80');
  background-size: cover;
  background-position: center;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 60px;
  color: var(--white);
  overflow: hidden;
}

.visual-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, rgba(0, 55, 166, 0.92), rgba(10, 15, 29, 0.95));
  z-index: 1;
}

.visual-content {
  position: relative;
  z-index: 5;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.auth-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: 'Outfit', sans-serif;
  font-size: 24px;
  font-weight: 800;
  color: var(--white);
  text-decoration: none;
}

.logo-icon {
  width: 128px;
  height: 128px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  font-size: 20px;
  overflow: hidden;
  flex-shrink: 0;
  padding: 3px;
  box-sizing: border-box;
}

.logo-icon img {
  border-radius: 30px;
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.logo-accent {
  color: var(--primary);
}

.visual-text h2 {
  font-family: 'Outfit', sans-serif;
  font-size: 42px;
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 20px;
  letter-spacing: -0.5px;
}

.visual-text p {
  font-size: 16px;
  color: rgba(255, 255, 255, 0.85);
  line-height: 1.6;
  max-width: 480px;
}

.visual-testimonial {
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  padding: 24px;
  border-radius: var(--radius-lg);
  max-width: 500px;
}

.visual-testimonial .stars {
  color: #fbbf24;
  margin-bottom: 12px;
  font-size: 14px;
}

.visual-testimonial p {
  font-size: 14px;
  font-style: italic;
  line-height: 1.6;
  margin-bottom: 12px;
}

.visual-testimonial span {
  font-size: 12px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.8);
}

/* Right Form Side Column */
.auth-form-side {
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: var(--white);
  padding: 60px 40px;
}

.form-wrapper {
  width: 100%;
  max-width: 420px;
}

.mobile-logo {
  display: none;
  margin-bottom: 32px;
}

.form-header {
  margin-bottom: 32px;
  text-align: center;
}

.form-header h1 {
  text-align: center;
  font-family: 'Outfit', sans-serif;
  font-size: 32px;
  font-weight: 800;
  letter-spacing: -0.5px;
  margin-bottom: 8px;
  color: var(--text-dark);
}

.form-header p {
  text-align: center;
  color: var(--text-muted);
  font-size: 15px;
  line-height: 1.5;
}

/* Google OAuth Button */
.btn-google-auth {
  width: 100%;
  background-color: var(--white);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-dark);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  box-shadow: 0 4px 12px rgba(0, 87, 255, 0.02);
  transition: var(--transition);
}

.btn-google-auth img {
  width: 20px;
  height: 20px;
}

.btn-google-auth:hover {
  background-color: var(--bg-light);
  border-color: rgba(0, 87, 255, 0.2);
  transform: translateY(-1px);
}

.form-divider {
  text-align: center;
  margin: 24px 0;
  position: relative;
}

.form-divider::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 0;
  width: 100%;
  height: 1px;
  background-color: var(--border-light);
  z-index: 1;
}

.form-divider span {
  background-color: var(--white);
  padding: 0 16px;
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  position: relative;
  z-index: 5;
}

/* Form Input Architectures */
.input-group {
  margin-bottom: 20px;
  display: flex;
  flex-direction: column;
}

.label-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.input-group label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-dark);
  margin-bottom: 8px;
}

.forgot-link {
  font-size: 12px;
  font-weight: 600;
  color: var(--primary);
  text-decoration: none;
}

.forgot-link:hover {
  color: var(--primary-dark);
}

.input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.input-icon {
  position: absolute;
  left: 14px;
  font-size: 18px;
  color: var(--text-muted);
  pointer-events: none;
  transition: var(--transition);
}

.input-wrapper input, .input-wrapper select {
  width: 100%;
  padding: 14px 14px 14px 44px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-light);
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-dark);
  outline: none;
  background-color: var(--bg-light);
  transition: var(--transition);
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
}

.input-wrapper input::placeholder {
  color: #94a3b8;
}

.input-wrapper input:focus, .input-wrapper select:focus {
  border-color: var(--primary);
  background-color: var(--white);
  box-shadow: 0 0 0 4px rgba(0, 87, 255, 0.08);
}

.input-wrapper input:focus ~ .input-icon {
  color: var(--primary);
}

/* Visibility Control Eye Actions */
.btn-toggle-password {
  position: absolute;
  right: 14px;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-muted);
  font-size: 18px;
  display: flex;
  align-items: center;
}

.btn-toggle-password:hover {
  color: var(--text-dark);
}

.eye-open, .eye-closed {
  transition: var(--transition);
}

.btn-toggle-password.show-pass .eye-open { display: none; }
.btn-toggle-password.show-pass .eye-closed { display: block; }
.btn-toggle-password:not(.show-pass) .eye-closed { display: none; }

/* Real-Time Inline Validation Indicator Modifiers */
.feedback-icon {
  position: absolute;
  right: 14px;
  font-size: 18px;
  pointer-events: none;
  display: none;
}

.feedback-icon.valid { color: #10b981; }
.feedback-icon.invalid { color: #ef4444; }

/* Input success border state modifiers */
.input-wrapper.state-valid input {
  border-color: #10b981 !important;
  background-color: var(--white);
}
.input-wrapper.state-valid .feedback-icon.valid {
  display: block;
}

/* Input error state modifiers */
.input-wrapper.state-invalid input, .input-wrapper.state-invalid select {
  border-color: #ef4444 !important;
  background-color: rgba(239, 68, 68, 0.02);
}
.input-wrapper.state-invalid .feedback-icon.invalid {
  display: block;
}

.validation-message {
  font-size: 12px;
  font-weight: 500;
  color: #ef4444;
  margin-top: 6px;
  display: none;
}

.validation-message.show {
  display: block;
}

/* Password Strength Bar Visuals */
.password-strength-container {
  display: flex;
  gap: 4px;
  margin-top: 8px;
}

.strength-bar {
  flex-grow: 1;
  height: 4px;
  border-radius: 20px;
  background-color: var(--border-light);
  transition: var(--transition);
}

.strength-bar.weak { background-color: #ef4444; }
.strength-bar.medium { background-color: #f59e0b; }
.strength-bar.strong { background-color: #10b981; }

/* Option Checkbox Customizations */
.form-options {
  margin-bottom: 24px;
}

.checkbox-container {
  display: flex;
  align-items: flex-start;
  position: relative;
  cursor: pointer;
  padding-left: 28px;
  font-size: 13px;
  color: var(--text-muted);
  user-select: none;
}

.checkbox-container input {
  position: absolute;
  opacity: 0;
  cursor: pointer;
  height: 0;
  width: 0;
}

.checkmark {
  position: absolute;
  top: 1px;
  left: 0;
  height: 18px;
  width: 18px;
  background-color: var(--bg-light);
  border: 1px solid var(--border-light);
  border-radius: 4px;
  transition: var(--transition);
}

.checkbox-container:hover input ~ .checkmark {
  border-color: rgba(0, 87, 255, 0.2);
}

.checkbox-container input:checked ~ .checkmark {
  background-color: var(--primary);
  border-color: var(--primary);
}

.checkmark::after {
  content: "";
  position: absolute;
  display: none;
  left: 6px;
  top: 2px;
  width: 4px;
  height: 8px;
  border: solid var(--white);
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.checkbox-container input:checked ~ .checkmark::after {
  display: block;
}

.checkbox-container a {
  color: var(--primary);
  text-decoration: none;
  font-weight: 600;
}

.checkbox-container a:hover {
  text-decoration: underline;
}

/* Dynamic State Buttons */
.btn-auth-submit {
  width: 100%;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: var(--white);
  border: none;
  border-radius: var(--radius-md);
  padding: 14px;
  font-family: 'Inter', sans-serif;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  box-shadow: 0 8px 20px rgba(0, 87, 255, 0.2);
  transition: var(--transition);
}

.btn-auth-submit:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 24px rgba(0, 87, 255, 0.35);
}

.btn-auth-submit:active {
  transform: translateY(0);
}

.spinner {
  font-size: 18px;
  animation: spin 1s infinite linear;
}

@keyframes spin {
  100% { transform: rotate(360deg); }
}

.hidden {
  display: none !important;
}

.auth-switch {
  text-align: center;
  margin-top: 24px;
  font-size: 14px;
  color: var(--text-muted);
}

.auth-switch a {
  color: var(--primary);
  text-decoration: none;
  font-weight: 600;
}

.auth-switch a:hover {
  color: var(--primary-dark);
  text-decoration: underline;
}

/* ==========================================================================
   INTERACTIVE FEEDBACK POPUP/MODALS
   ========================================================================== */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: rgba(10, 15, 29, 0.3);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: var(--transition);
}

.modal-overlay.show {
  opacity: 1;
  pointer-events: auto;
}

.modal-card {
  background-color: var(--white);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 40px 32px;
  width: 100%;
  max-width: 360px;
  text-align: center;
  box-shadow: var(--shadow-premium);
  transform: scale(0.9) translateY(20px);
  transition: var(--transition);
}

.modal-overlay.show .modal-card {
  transform: scale(1) translateY(0);
}

.modal-icon-wrapper {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  margin: 0 auto 24px auto;
}

.modal-icon-wrapper.success {
  background-color: rgba(16, 185, 129, 0.08);
  color: #10b981;
}

.modal-icon-wrapper.error {
  background-color: rgba(239, 68, 68, 0.08);
  color: #ef4444;
}

.modal-icon-wrapper.warning {
  background-color: rgba(245, 158, 11, 0.12);
  color: #f59e0b;
}

.modal-card h2 {
  font-family: 'Outfit', sans-serif;
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 12px;
}

.modal-card p {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 24px;
}

.btn-modal-close {
  width: 100%;
  padding: 12px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-light);
  background-color: var(--bg-light);
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-dark);
  cursor: pointer;
  transition: var(--transition);
}

.btn-modal-close:hover {
  background-color: var(--border-light);
}

/* ==========================================================================
   MEDIA QUERIES AND RESPONSIVENESS
   ========================================================================== */
@media (max-width: 1024px) {
  .auth-container {
    grid-template-columns: 1fr;
  }
  
  .auth-visual-side {
    display: none;
  }
  
  .auth-form-side {
    background-color: var(--bg-light);
  }
  
  .form-wrapper {
    background-color: var(--white);
    padding: 40px;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-light);
    box-shadow: 0 4px 20px rgba(0, 87, 255, 0.02);
  }
  
  .mobile-logo {
    display: inline-flex;
    width: 100%;
    justify-content: center;
    margin-bottom: 28px;
  }

  .mobile-logo .logo-icon {
    width: 90px;
    height: 90px;
    padding: 5px;
    border-radius: 16px;
  }
}

@media (max-width: 480px) {
  .auth-form-side {
    padding: 20px 16px;
  }
  
  .form-wrapper {
    padding: 24px 16px;
  }
}