/* ============================================
   Login & Register Page Styles
   ============================================ */

.auth-page {
  min-height: 100vh;
  min-height: 100dvh;
  min-height: -webkit-fill-available;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  padding: 20px;
  padding-top: calc(20px + env(safe-area-inset-top, 0px));
  padding-bottom: calc(20px + env(safe-area-inset-bottom, 0px));
  padding-left: calc(20px + env(safe-area-inset-left, 0px));
  padding-right: calc(20px + env(safe-area-inset-right, 0px));
  background: linear-gradient(135deg, #f8f9fa 0%, #e9f5ef 100%);
}

[data-theme="dark"] .auth-page {
  background: linear-gradient(135deg, #0f172a 0%, #1a2d3f 100%);
}

.auth-page::before {
  content: "";
  position: absolute;
  top: -200px;
  right: -200px;
  width: 600px;
  height: 600px;
  background: radial-gradient(
    circle,
    rgba(95, 141, 126, 0.15),
    transparent 70%
  );
  border-radius: 50%;
  animation: float 8s ease-in-out infinite;
}

.auth-page::after {
  content: "";
  position: absolute;
  bottom: -150px;
  left: -150px;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(244, 162, 97, 0.1), transparent 70%);
  border-radius: 50%;
  animation: float 10s ease-in-out infinite reverse;
}

@keyframes float {
  0%,
  100% {
    transform: translate(0, 0);
  }
  50% {
    transform: translate(20px, -20px);
  }
}

.auth-container {
  width: 100%;
  max-width: 1100px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  background: var(--surface);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-xl);
  overflow: hidden;
  position: relative;
  z-index: 1;
  min-height: 580px;
}

.auth-hero {
  background: linear-gradient(
    135deg,
    var(--primary) 0%,
    #7aa898 50%,
    var(--primary-dark) 100%
  );
  padding: 56px 48px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  overflow: hidden;
  color: white;
}

.auth-hero::before {
  content: "";
  position: absolute;
  top: -100px;
  right: -100px;
  width: 300px;
  height: 300px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 50%;
}

.auth-hero::after {
  content: "";
  position: absolute;
  bottom: -80px;
  left: -80px;
  width: 250px;
  height: 250px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 50%;
}

.hero-logo {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 40px;
  position: relative;
  z-index: 1;
}

.hero-logo-icon {
  width: 52px;
  height: 52px;
  background: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(10px);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 800;
  font-size: 22px;
  border: 1px solid rgba(255, 255, 255, 0.3);
}

.hero-logo-text {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.5px;
}

.hero-logo-sub {
  font-size: 12px;
  opacity: 0.8;
  margin-top: 2px;
}

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

.hero-title {
  font-size: 32px;
  font-weight: 700;
  line-height: 1.25;
  margin-bottom: 16px;
  letter-spacing: -1px;
}

.hero-desc {
  font-size: 15px;
  line-height: 1.7;
  opacity: 0.9;
  margin-bottom: 32px;
}

.hero-features {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.hero-feature {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 13px;
  opacity: 0.95;
}

.hero-feature-icon {
  width: 32px;
  height: 32px;
  background: rgba(255, 255, 255, 0.18);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.hero-footer {
  position: relative;
  z-index: 1;
  font-size: 12px;
  opacity: 0.75;
}

.auth-form-wrap {
  padding: 56px 48px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.auth-header {
  margin-bottom: 36px;
}

.auth-header h2 {
  font-size: 26px;
  font-weight: 700;
  margin-bottom: 8px;
  letter-spacing: -0.5px;
}

.auth-header p {
  color: var(--text-muted);
  font-size: 14px;
}

.auth-tabs {
  display: flex;
  gap: 24px;
  margin-bottom: 32px;
  border-bottom: 2px solid var(--border);
}

.auth-tab {
  padding: 12px 0;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-muted);
  position: relative;
  cursor: pointer;
  transition: color var(--transition-fast);
}

.auth-tab:hover {
  color: var(--text-secondary);
}

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

.auth-tab.active::after {
  content: "";
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--primary);
  border-radius: 2px 2px 0 0;
}

.auth-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
  flex-wrap: wrap;
  gap: 12px;
}

.auth-submit {
  margin-bottom: 20px;
}

.auth-btn {
  width: 100%;
  height: 48px;
  font-size: 15px;
  border-radius: var(--radius-md);
}

.auth-divider {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 24px 0;
}

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

.auth-divider span {
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 500;
}

.social-btns {
  display: flex;
  gap: 12px;
  margin-bottom: 24px;
}

.social-btn {
  flex: 1;
  height: 44px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-weight: 600;
  font-size: 13px;
  color: var(--text-secondary);
  transition: all var(--transition-fast);
  background: var(--surface);
}

.social-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: rgba(95, 141, 126, 0.04);
}

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

.auth-footer {
  text-align: center;
  font-size: 13px;
  color: var(--text-muted);
}

.auth-footer a {
  font-weight: 600;
  color: var(--primary);
}

.auth-footer a:hover {
  text-decoration: underline;
}

.password-strength {
  margin-top: 8px;
}

.password-strength-bar {
  height: 4px;
  background: var(--surface-alt);
  border-radius: 2px;
  overflow: hidden;
  margin-bottom: 6px;
}

.password-strength-fill {
  height: 100%;
  border-radius: 2px;
  transition: all var(--transition);
  width: 0;
}

.password-strength-text {
  font-size: 11px;
  font-weight: 500;
  color: var(--text-muted);
}

.strength-weak .password-strength-fill {
  width: 25%;
  background: var(--danger);
}

.strength-fair .password-strength-fill {
  width: 50%;
  background: var(--warning);
}

.strength-good .password-strength-fill {
  width: 75%;
  background: var(--primary);
}

.strength-strong .password-strength-fill {
  width: 100%;
  background: var(--success);
}

.strength-weak .password-strength-text {
  color: var(--danger);
}
.strength-fair .password-strength-text {
  color: #d4a017;
}
.strength-good .password-strength-text {
  color: var(--primary);
}
.strength-strong .password-strength-text {
  color: var(--success);
}

.forgot-password-link {
  display: block;
  text-align: center;
  margin-top: 20px;
  color: var(--text-muted);
  font-size: 13px;
}

.forgot-password-link:hover {
  color: var(--primary);
  text-decoration: underline;
}

/* ============================================
   Responsive
   ============================================ */
@media (max-width: 900px) {
  .auth-container {
    grid-template-columns: 1fr;
    max-width: 480px;
    min-height: auto;
  }

  .auth-hero {
    display: none;
  }

  .auth-form-wrap {
    padding: 40px 28px;
  }

  .auth-tabs {
    gap: 20px;
  }

  .auth-tab {
    font-size: 15px;
  }
}

@media (max-width: 480px) {
  .auth-page {
    padding: 0;
    padding-top: env(safe-area-inset-top, 0px);
    padding-bottom: env(safe-area-inset-bottom, 0px);
    padding-left: env(safe-area-inset-left, 0px);
    padding-right: env(safe-area-inset-right, 0px);
  }

  .auth-container {
    border-radius: 0;
    min-height: 100vh;
    min-height: 100dvh;
    min-height: -webkit-fill-available;
    box-shadow: none;
  }

  .auth-form-wrap {
    padding: 28px 20px;
    padding-bottom: calc(28px + env(safe-area-inset-bottom, 0px));
    padding-top: calc(20px + env(safe-area-inset-top, 0px));
    justify-content: flex-start;
  }

  .auth-header {
    margin-bottom: 28px;
  }

  .auth-header h2 {
    font-size: 22px;
    letter-spacing: -0.3px;
  }

  .auth-header p {
    font-size: 13px;
    line-height: 1.5;
  }

  .auth-tabs {
    margin-bottom: 24px;
    gap: 0;
    justify-content: space-between;
  }

  .auth-tab {
    font-size: 14px;
    padding: 10px 0;
    flex: 1;
    text-align: center;
  }

  .form-group {
    margin-bottom: 16px;
  }

  .form-label {
    margin-bottom: 6px;
  }

  .form-control {
    height: 50px;
    min-height: 50px;
  }

  .auth-actions {
    margin-bottom: 20px;
  }

  .social-btns {
    flex-direction: column;
    gap: 10px;
  }

  .social-btn {
    height: 50px;
    min-height: 50px;
  }

  .auth-btn {
    height: 50px;
    min-height: 50px;
    font-size: 15px;
    border-radius: var(--radius-md);
  }

  .form-check-input {
    width: 20px;
    height: 20px;
  }

  .form-check {
    gap: 10px;
  }

  .form-check-label {
    font-size: 13px;
  }

  .password-strength {
    margin-top: 10px;
  }

  .password-strength-bar {
    height: 5px;
  }

  .password-strength-text {
    font-size: 12px;
  }
}
