:root { --bg:#f6f7fb; --card:#fff; --accent:#2b6ef6; }

#auth-root {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 80vh;
  padding: 32px 15px;
  background: var(--bg);
  font-family: Inter, system-ui, Arial;
}

.auth-card {
  display: flex;
  gap: 24px;
  background: var(--card);
  border-radius: 12px;
  box-shadow: 0 6px 30px rgba(0,0,0,.08);
  overflow: hidden;
  max-width: 980px;
  width: 100%;
}

.auth-left { padding: 32px; flex: 1; }

.auth-right {
  background: linear-gradient(135deg,#f0f4ff,#fff);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  width: 320px;
}

/* .auth-right img { max-width: 80%; } */

/* --- PATTERN 1: LOGIN --- */
.pattern-login {
    background-color: #e5e5f7;
    opacity: 0.8;
    background-image:  linear-gradient(30deg, #444cf7 12%, transparent 12.5%, transparent 87%, #444cf7 87.5%, #444cf7), linear-gradient(150deg, #444cf7 12%, transparent 12.5%, transparent 87%, #444cf7 87.5%, #444cf7), linear-gradient(30deg, #444cf7 12%, transparent 12.5%, transparent 87%, #444cf7 87.5%, #444cf7), linear-gradient(150deg, #444cf7 12%, transparent 12.5%, transparent 87%, #444cf7 87.5%, #444cf7), linear-gradient(60deg, #444cf777 25%, transparent 25.5%, transparent 75%, #444cf777 75%, #444cf777), linear-gradient(60deg, #444cf777 25%, transparent 25.5%, transparent 75%, #444cf777 75%, #444cf777);
    background-size: 20px 35px;
    background-position: 0 0, 0 0, 10px 18px, 10px 18px, 0 0, 10px 18px;
}

/* --- PATTERN 2: SIGNUP --- */
.pattern-signup {
    background-color: #e5e5f7;
    opacity: 0.8;
    background-image:  linear-gradient(135deg, #444cf7 25%, transparent 25%), linear-gradient(225deg, #444cf7 25%, transparent 25%), linear-gradient(45deg, #444cf7 25%, transparent 25%), linear-gradient(315deg, #444cf7 25%, #e5e5f7 25%);
    background-position:  10px 0, 10px 0, 0 0, 0 0;
    background-size: 20px 20px;
    background-repeat: repeat;
}

/* --- PATTERN 3: FORGOT PASSWORD --- */
.pattern-forgot {
    background-color: #e5e5f7;
    opacity: 0.8;
    background: linear-gradient(135deg, #444cf755 25%, transparent 25%) -10px 0/ 20px 20px, linear-gradient(225deg, #444cf7 25%, transparent 25%) -10px 0/ 20px 20px, linear-gradient(315deg, #444cf755 25%, transparent 25%) 0px 0/ 20px 20px, linear-gradient(45deg, #444cf7 25%, #e5e5f7 25%) 0px 0/ 20px 20px;
}

/* Auth page title */
#auth-title {
  font-size: 28px;
  font-weight: 600;
  margin-bottom: 28px;
  color: #1a1a1a;
  text-align: center;
  letter-spacing: -0.5px;
  position: relative;
}

/* Optional underline accent */
#auth-title::after {
  content: "";
  display: block;
  width: 40px;
  height: 3px;
  margin: 8px auto 0;
  background: var(--accent);
  border-radius: 2px;
}

.auth-form {
  max-width: 380px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* Inputs */
.form-group { position: relative; width: 100%; }
.form-group input, .form-group select {
  width: 100%;
  padding: 14px 44px 14px 14px;
  font-size: 15px;
  border: 1px solid #ddd;
  border-radius: 8px;
  outline: none;
  background: #fff;
  transition: border-color .2s, box-shadow .2s;
}
.form-group input:focus, .form-group select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(43,110,246,.15);
}

/* Password toggle */
.pw-wrap { position: relative; }
.toggle-btn {
  position: absolute;
  top: 50%;
  right: 12px;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--accent);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  padding: 0;
}
.toggle-btn:hover { text-decoration: underline; }

/* Buttons */
.btn {
  display: inline-block;
  padding: 12px;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  border: none;
}
.btn.primary { background: var(--accent); color: #fff; }
.btn.primary:hover { background: #1f55c4; }
.btn.secondary { background: #eee; color: #333; }
.btn.secondary:hover { background: #ddd; }

/* Links */
.auth-links, .switch-line {
  text-align: center;
  font-size: 14px;
  color: #555;
}
.auth-links a, .switch-line a {
  color: var(--accent);
  text-decoration: none;
}
.auth-links a:hover, .switch-line a:hover {
  text-decoration: underline;
}

/* Captcha alignment */
#captcha { margin-top: 12px; }
#captcha label { display: block; margin-bottom: 6px; font-size: 14px; }

/* OTP */
#otp-timer { margin: 6px 0; color: #d00; text-align: center; }

/* Checkbox */
.form-check { display: flex; align-items: center; gap: 8px; font-size: 14px; }


.switch-line {
  margin-top: 16px;
  font-size: 14px;
  text-align: center;
  color: #555;
}

.switch-line a {
  color: var(--accent);
  font-weight: 500;
  text-decoration: none;
}

.switch-line a:hover {
  text-decoration: underline;
}

/* --- LOGGED IN PROFILE VIEW STYLES --- */
.auth-profile-view {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    text-align: center;
    gap: 15px;
    padding: 20px;
}

.auth-profile-img {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--accent);
    box-shadow: 0 4px 15px rgba(43, 110, 246, 0.2);
}

.auth-profile-name {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0;
}

.auth-profile-email {
    color: #666;
    font-size: 0.95rem;
    margin-bottom: 20px;
}

.auth-profile-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: 100%;
    max-width: 250px;
}

.btn.full-width {
    width: 100%;
    text-align: center;
    text-decoration: none;
    display: block;
}

/* --- RESPONSIVE DESIGN --- */
@media (max-width: 850px) {
  .auth-card {
    flex-direction: column;
    max-width: 500px;
  }

  /* Hide the pattern side on smaller screens to prioritize the form */
  .auth-right {
    display: none;
  }

  .auth-left {
    padding: 32px 24px;
  }
}

@media (max-width: 480px) {
  #auth-root {
    padding: 20px 10px;
    align-items: flex-start; /* Allows scrolling if height exceeds viewport */
    padding-top: 40px;
  }
  
  .auth-left {
    padding: 24px 16px;
  }

  #auth-title {
    font-size: 24px;
    margin-bottom: 20px;
  }
  
  .form-group input, .form-group select {
    font-size: 16px; /* Prevents zoom on iOS */
    padding: 12px;
  }
}