/* =============================================
   AUTH SCREEN — Login & Sign Up
   Matches app screenshot design exactly
   ============================================= */

.auth-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  min-height: 100vh;
  background-color: #ffffff;
  padding: 24px 12px;
  position: relative;
  overflow-y: auto;
}

.auth-left,
.auth-right {
  width: 100%;
}

/* =============================================
   TOP LOGO HEADER
   ============================================= */
.auth-logo-area {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-bottom: 20px;
  width: 100%;
}

.auth-logo {
  width: 300px;
  height: auto;
  object-fit: contain;
  margin-bottom: 6px;
}

.auth-brand-name {
  display: none;
}

.auth-brand-tagline {
  display: none;
}

/* =============================================
   WELCOME TEXT
   ============================================= */
.auth-welcome {
  text-align: center;
  padding: 0 0 15px;
  width: 100%;
}

.auth-welcome-title {
  font-size: 26px;
  font-weight: 800;
  color: var(--dark-charcoal);
  margin-bottom: 4px;
}

.auth-welcome-subtitle {
  font-size: 15px;
  color: var(--text-muted);
  font-weight: 400;
}

/* =============================================
   TABS — Login | Sign Up
   ============================================= */
.auth-tabs {
  display: flex;
  width: 100%;
  max-width: 400px;
  margin: 0 auto 20px;
  border-bottom: 2px solid #e2e8f0;
  position: relative;
}

.auth-tab {
  flex: 1;
  text-align: center;
  padding: 10px 0;
  font-size: 17px;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  position: relative;
  background: none;
  border: none;
  outline: none;
  transition: color 0.25s ease;
  font-family: var(--font-family);
}

.auth-tab.active {
  color: var(--primary-green);
}

.auth-tab.active::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  right: 0;
  height: 2.5px;
  background: var(--primary-green);
  border-radius: 2px 2px 0 0;
}

/* =============================================
   FORM PANEL (slides in/out)
   ============================================= */
.auth-forms {
  width: 100%;
  max-width: 400px;
  margin: 0 auto;
  position: relative;
}

.auth-form {
  display: none;
  flex-direction: column;
  gap: 14px;
  animation: formFadeIn 0.3s ease;
}

.auth-form.active {
  display: flex;
}

@keyframes formFadeIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* =============================================
   INPUT GROUPS
   ============================================= */
.input-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.input-label {
  font-size: 14px;
  font-weight: 600;
  color: var(--dark-charcoal);
  letter-spacing: 0.3px;
}

/* Phone input with flag prefix */
.phone-input-wrapper {
  display: flex;
  align-items: center;
  border: 1.5px solid #e2e8f0;
  border-radius: 12px;
  overflow: hidden;
  background: #f8fafc;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.phone-input-wrapper:focus-within {
  border-color: var(--primary-green);
  box-shadow: 0 0 0 3px rgba(11, 128, 67, 0.10);
  background: #ffffff;
}

.phone-prefix {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 0 10px 0 14px;
  font-size: 15px;
  font-weight: 600;
  color: var(--dark-charcoal);
  border-right: 1.5px solid #e2e8f0;
  cursor: pointer;
  white-space: nowrap;
  user-select: none;
  height: 54px;
  background: transparent;
}

.phone-flag {
  font-size: 18px;
  line-height: 1;
}

.phone-code {
  font-size: 15px;
  font-weight: 600;
}

.prefix-caret {
  font-size: 8px;
  color: var(--text-muted);
}

.phone-input-wrapper input {
  flex: 1;
  border: none;
  outline: none;
  padding: 0 14px;
  height: 54px;
  font-size: 16px;
  font-family: var(--font-family);
  color: var(--dark-charcoal);
  background: transparent;
}

/* Standard input field */
.auth-input {
  width: 100%;
  height: 54px;
  padding: 0 14px;
  border: 1.5px solid #e2e8f0;
  border-radius: 12px;
  font-size: 16px;
  font-family: var(--font-family);
  color: var(--dark-charcoal);
  background: #f8fafc;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
  box-sizing: border-box;
}

.auth-input:focus {
  border-color: var(--primary-green);
  box-shadow: 0 0 0 3px rgba(11, 128, 67, 0.10);
  background: #ffffff;
}

.auth-input::placeholder {
  color: #a0aec0;
}

/* Password with show/hide toggle */
.password-wrapper {
  position: relative;
}

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

.password-toggle {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  cursor: pointer;
  color: var(--text-muted);
  font-size: 18px;
  background: none;
  border: none;
  outline: none;
  display: flex;
  align-items: center;
  padding: 0;
}

/* =============================================
   FORGOT PASSWORD
   ============================================= */
.forgot-password {
  text-align: right;
  font-size: 13px;
  font-weight: 600;
  color: var(--primary-green);
  cursor: pointer;
  margin-top: -4px;
}

/* =============================================
   PRIMARY BUTTON
   ============================================= */
.auth-btn {
  width: 100%;
  height: 54px;
  background: linear-gradient(135deg, #0b8043 0%, #096836 100%);
  color: #ffffff;
  font-size: 17px;
  font-weight: 700;
  font-family: var(--font-family);
  border: none;
  border-radius: 14px;
  cursor: pointer;
  margin-top: 6px;
  box-shadow: 0 4px 16px rgba(11, 128, 67, 0.28);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  letter-spacing: 0.3px;
}

.auth-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(11, 128, 67, 0.34);
}

.auth-btn:active {
  transform: translateY(0);
  box-shadow: 0 2px 8px rgba(11, 128, 67, 0.22);
}

/* =============================================
   DIVIDER
   ============================================= */
.auth-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 20px 0 16px;
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 500;
}

.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: #e2e8f0;
}

/* =============================================
   SOCIAL LOGIN BUTTONS
   ============================================= */
.social-buttons {
  display: flex;
  justify-content: center;
  gap: 14px;
  margin-bottom: 24px;
}

.social-btn {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  border: 1.5px solid #e2e8f0;
  background: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 22px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

.social-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.1);
  border-color: #cbd5e0;
}

/* Google colors */
.social-btn.google {
  color: #ea4335;
}

/* Apple colors */
.social-btn.apple {
  color: #1d1d1f;
}

/* Facebook colors */
.social-btn.facebook {
  color: #1877f2;
}

/* =============================================
   TRUST BADGE
   ============================================= */
.auth-trust {
  text-align: center;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-muted);
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.auth-trust-icon {
  color: var(--accent-orange);
  font-size: 14px;
}

/* =============================================
   DESKTOP RESPONSIVE (TWO COLUMN LAYOUT)
   ============================================= */

/* Mobile: hide desktop welcome, show mobile welcome normally */
.auth-welcome-desktop {
  display: none;
}

@media (min-width: 768px) {
  .auth-container {
    flex-direction: row;
    align-items: stretch;
    justify-content: center;
    padding: 0;
    max-width: 100%;
    margin: 0;
    min-height: 100vh;
    height: auto;
    background-color: #ffffff;
  }

  /* Hide mobile-side welcome on desktop (it stays in auth-left) */
  .auth-left .auth-welcome {
    display: none;
  }

  /* Show desktop welcome above tabs */
  .auth-welcome-desktop {
    display: block;
    text-align: left;
    padding: 0 0 28px;
    margin: 0 auto 0;
    width: 100%;
    max-width: 450px;
  }

  .auth-welcome-desktop .auth-welcome-title {
    font-size: 32px;
    font-weight: 800;
    color: var(--dark-charcoal);
    margin-bottom: 6px;
  }

  .auth-welcome-desktop .auth-welcome-subtitle {
    font-size: 15px;
    color: var(--text-muted);
    font-weight: 400;
  }

  .auth-left {
    flex: 1;
    background: #ffffff;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 30px;
    min-height: 100vh;
    height: auto;
  }

  .auth-logo-area {
    align-items: center;
    padding: 0;
  }

  .auth-logo {
    width: 420px;
    max-width: 100%;
  }

  .auth-right {
    flex: 1;
    padding: 60px 50px 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    background: #ffffff;
    min-height: 100vh;
    height: auto;
  }

  .auth-tabs {
    max-width: 450px;
    margin: 0 auto 25px 0;
    width: 100%;
  }

  .auth-forms {
    max-width: 450px;
    width: 100%;
    margin: 0;
  }

  .auth-trust {
    padding: 30px 0 0;
    justify-content: flex-start;
  }
}
