/* ==========================================================================
   TERAPİYLE - AUTHENTICATION PAGES (LOGIN & REGISTER)
   Single-card, ultra-clean, modern and premium design system
   ========================================================================== */

/* Page Background & Overall Layout */
.auth-page-body {
  min-height: 100vh;
  background-color: #f3f7fc;
  background-image: linear-gradient(
    180deg,
    #f8fafd 0%,
    #edf4fb 45%,
    #f0f6fd 100%
  );
  color: var(--text-main);
  font-family: var(--font-family);
  display: flex;
  flex-direction: column;
  position: relative;
  overflow-x: hidden;
}

/* Subtle Wavy Canvas Background */
.auth-waves-canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
  overflow: hidden;
}

/* Ambient glow blobs */
.auth-wave-glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  pointer-events: none;
}

.auth-wave-glow.glow-1 {
  top: -10%;
  left: -5%;
  width: 520px;
  height: 520px;
  background: radial-gradient(
    circle,
    rgba(14, 130, 253, 0.12) 0%,
    rgba(14, 130, 253, 0) 70%
  );
  animation: floatGlow 14s ease-in-out infinite alternate;
}

.auth-wave-glow.glow-2 {
  bottom: -10%;
  right: -5%;
  width: 580px;
  height: 580px;
  background: radial-gradient(
    circle,
    rgba(56, 189, 248, 0.14) 0%,
    rgba(56, 189, 248, 0) 70%
  );
  animation: floatGlow 18s ease-in-out infinite alternate-reverse;
}

.auth-wave-glow.glow-3 {
  top: 35%;
  right: 15%;
  width: 420px;
  height: 420px;
  background: radial-gradient(
    circle,
    rgba(96, 165, 250, 0.09) 0%,
    rgba(96, 165, 250, 0) 70%
  );
  animation: floatGlow 20s ease-in-out infinite alternate;
}

@keyframes floatGlow {
  0% {
    transform: translate(0, 0) scale(1);
  }
  50% {
    transform: translate(30px, 20px) scale(1.06);
  }
  100% {
    transform: translate(-20px, -25px) scale(0.95);
  }
}

/* Waves */
.auth-wave {
  position: absolute;
  left: 0;
  width: 100%;
  pointer-events: none;
}

.auth-wave-top {
  top: 0;
  height: 320px;
  opacity: 0.95;
  animation: waveSwayTop 16s ease-in-out infinite alternate;
}

.auth-wave-mid {
  bottom: 0;
  height: 420px;
  opacity: 0.85;
  animation: waveSwayMid 20s ease-in-out infinite alternate;
}

.auth-wave-bottom {
  bottom: 0;
  height: 280px;
  opacity: 0.95;
  animation: waveSwayBottom 12s ease-in-out infinite alternate;
}

@keyframes waveSwayTop {
  0% {
    transform: translateY(0) scaleY(1);
  }
  100% {
    transform: translateY(-16px) scaleY(1.08);
  }
}

@keyframes waveSwayMid {
  0% {
    transform: translateX(0) scaleY(1);
  }
  100% {
    transform: translateX(-24px) scaleY(1.06);
  }
}

@keyframes waveSwayBottom {
  0% {
    transform: translateX(0) scaleY(1);
  }
  100% {
    transform: translateX(20px) scaleY(1.05);
  }
}

/* Auth Top Navigation Bar */
.auth-navbar {
  width: 100%;
  max-width: 1320px;
  margin: 0 auto;
  padding: 20px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
  z-index: 10;
}

.auth-nav-logo img {
  height: 38px;
  width: auto;
  display: block;
}

.auth-back-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-secondary);
  text-decoration: none;
  padding: 8px 16px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(8px);
  border: 1px solid var(--border-subtle);
  transition: all var(--transition-fast);
}

.auth-back-link:hover {
  color: var(--primary);
  background: #ffffff;
  border-color: var(--primary-light);
  transform: translateX(-2px);
  box-shadow: 0 4px 12px rgba(14, 130, 253, 0.08);
}

.auth-back-link svg {
  transition: transform var(--transition-fast);
}

.auth-back-link:hover svg {
  transform: translateX(-3px);
}

/* Auth Main Container */
.auth-main {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px 24px 48px;
  position: relative;
  z-index: 5;
}

/* Single Card Structure */
.auth-container {
  width: 100%;
  max-width: 480px;
  margin: 0 auto;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-radius: 26px;
  border: 1px solid rgba(214, 231, 248, 0.95);
  box-shadow:
    0 24px 60px -12px rgba(14, 130, 253, 0.1),
    0 8px 24px -4px rgba(16, 42, 67, 0.06),
    0 0 1px 1px rgba(14, 130, 253, 0.04);
  padding: 40px 38px;
  position: relative;
  display: flex;
  flex-direction: column;
}

/* Wider single card specifically for registration to hold 2-col inputs cleanly */
.auth-register-page .auth-container,
.auth-container.auth-register-container {
  max-width: 620px;
  padding: 38px 36px;
}

/* Showcase panel hidden - user requested removal */
.auth-showcase-panel {
  display: none !important;
}

.auth-form-panel {
  padding: 0;
  display: flex;
  flex-direction: column;
  background: transparent;
  width: 100%;
}

/* Header inside Form Card */
.auth-card-header {
  margin-bottom: 22px;
  text-align: left;
}

/* Role Switcher Pill Tabs */
.role-switcher {
  display: inline-flex;
  background: #f1f5f9;
  border-radius: 20px;
  padding: 4px;
  margin-bottom: 22px;
  border: 1px solid var(--border-subtle);
  width: 100%;
}

.role-tab-btn {
  flex: 1;
  padding: 9px 16px;
  border-radius: 20px;
  font-size: 13.5px;
  font-weight: 700;
  color: var(--text-secondary);
  border: none;
  background: transparent;
  cursor: pointer;
  transition: all var(--transition-fast);
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.role-tab-btn.active {
  background: #ffffff;
  color: var(--primary);
  box-shadow: 0 2px 8px rgba(16, 42, 67, 0.08);
}

.role-tab-btn:hover:not(.active) {
  color: var(--text-heading);
}

.auth-card-title {
  font-size: 24px;
  font-weight: 800;
  color: var(--text-heading);
  letter-spacing: -0.02em;
  margin-bottom: 6px;
}

.auth-card-subtitle {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.5;
  margin: 0;
}

/* Form Styles */
.auth-form-fields,
.auth-form {
  display: flex;
  flex-direction: column;
  width: 100%;
  gap: 1rem;
}

.mb-3 {
  margin-bottom: 16px;
}

.mb-2 {
  margin-bottom: 8px;
}

.auth-form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.auth-input-group {
  display: flex;
  flex-direction: column;
  position: relative;
  gap: 0.5rem;
}

.auth-input-label-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.auth-input-label,
label:not(.custom_check):not(.auth-checkbox-group) {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-heading);
  display: inline-block;
}

.auth-forgot-link {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--primary);
  text-decoration: none;
  transition: color var(--transition-fast);
}

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

.auth-input-wrapper,
.pass-group {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
}

.auth-input-icon {
  position: absolute;
  left: 16px;
  color: var(--text-muted);
  pointer-events: none;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color var(--transition-fast);
  z-index: 2;
}

.auth-input,
.form-control {
  width: 100%;
  height: 48px;
  padding: 0 16px 0 46px;
  border-radius: 20px;
  border: 1.5px solid var(--border-light);
  background: #ffffff;
  font-size: 14px;
  font-family: var(--font-family);
  color: var(--text-main);
  transition: all var(--transition-fast);
  outline: none;
  box-sizing: border-box;
}

.auth-input::placeholder,
.form-control::placeholder {
  color: #94a3b8;
  font-weight: 400;
}

.auth-input:focus,
.form-control:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(14, 130, 253, 0.12);
}

.auth-input:focus ~ .auth-input-icon,
.form-control:focus ~ .auth-input-icon {
  color: var(--primary);
}

/* Password Toggle Eye Button */
.password-toggle-btn,
.toggle-password-sub {
  position: absolute;
  right: 14px;
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: color var(--transition-fast);
  z-index: 2;
}

.password-toggle-btn:hover,
.toggle-password-sub:hover {
  color: var(--text-heading);
}

/* Invalid Feedback */
.invalid-feedback {
  display: none;
  font-size: 12px;
  color: #ef4444;
  margin-top: 5px;
  padding-left: 14px;
  font-weight: 500;
}

/* Form Check Box / Legal Consent Box */
.form-check-box,
.auth-legal-agreements {
  background: #f8fafd;
  border: 1px solid rgba(220, 234, 247, 0.95);
  border-radius: 16px;
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin: 6px 0 18px;
}

.form-group-flex {
  display: flex;
  align-items: flex-start;
}

.custom_check {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 12.5px;
  color: var(--text-secondary);
  line-height: 1.45;
  cursor: pointer;
  position: relative;
  user-select: none;
  width: 100%;
}

.custom_check input[type="checkbox"] {
  width: 17px;
  height: 17px;
  accent-color: var(--primary);
  margin-top: 2px;
  cursor: pointer;
  flex-shrink: 0;
}

.custom-check-text {
  flex: 1;
}

.custom_check .privacy {
  color: var(--primary);
  font-weight: 600;
  text-decoration: underline;
  transition: color var(--transition-fast);
}

.custom_check .privacy:hover {
  color: var(--primary-hover);
}

.required-star {
  color: #ef4444;
  font-weight: 700;
  margin-left: 2px;
}

/* Simple Checkbox Styles (Login) */
.auth-checkbox-group {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.45;
  cursor: pointer;
  user-select: none;
  margin-bottom: 12px;
}

.auth-checkbox-group input {
  width: 17px;
  height: 17px;
  accent-color: var(--primary);
  margin-top: 2px;
  cursor: pointer;
  flex-shrink: 0;
}

.auth-checkbox-group a {
  color: var(--primary);
  font-weight: 600;
  text-decoration: underline;
}

/* Submit Button */
.btn-auth-submit,
.widget-btn .next_btn,
.btn-primary.next_btn {
  width: 100%;
  height: 50px;
  border-radius: 20px;
  background: linear-gradient(135deg, var(--primary) 0%, #0b6ed6 100%);
  color: #ffffff;
  border: none;
  font-size: 15px;
  font-weight: 700;
  font-family: var(--font-family);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  cursor: pointer;
  transition: all var(--transition-fast);
  box-shadow: 0 6px 20px -3px rgba(14, 130, 253, 0.4);
  margin-top: 4px;
}

.btn-auth-submit:hover,
.widget-btn .next_btn:hover,
.btn-primary.next_btn:hover {
  background: linear-gradient(135deg, #1a8bfe 0%, #0e82fd 100%);
  transform: translateY(-2px);
  box-shadow: 0 10px 24px -2px rgba(14, 130, 253, 0.48);
}

.btn-auth-submit:active,
.widget-btn .next_btn:active,
.btn-primary.next_btn:active {
  transform: translateY(0);
}

.btn-auth-submit .submit-arrow,
.widget-btn .next_btn .submit-arrow {
  transition: transform var(--transition-fast);
}

.btn-auth-submit:hover .submit-arrow,
.widget-btn .next_btn:hover .submit-arrow {
  transform: translateX(4px);
}

/* Switch Page Footer */
.auth-switch-box,
.account-signup {
  margin-top: 22px;
  text-align: center;
  font-size: 13.5px;
  color: var(--text-secondary);
}

.auth-switch-box a,
.account-signup a {
  color: var(--primary);
  font-weight: 700;
  text-decoration: none;
  transition: color var(--transition-fast);
}

.auth-switch-box a:hover,
.account-signup a:hover {
  color: var(--primary-hover);
  text-decoration: underline;
}

/* Trust Badge Footer */
.auth-trust-note {
  margin-top: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 12px;
  color: var(--text-muted);
}

.auth-trust-note svg {
  color: var(--success);
}

/* Specialist Callout Box (shown when Uzman tab active) */
.specialist-callout {
  display: none;
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  border-radius: 16px;
  padding: 16px;
  margin-bottom: 20px;
  font-size: 13px;
  color: #166534;
  line-height: 1.5;
}

.specialist-callout.active {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.specialist-callout-icon {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: #dcfce7;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #15803d;
  margin-top: 1px;
}

/* Interactive Notification Toast */
.auth-toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  padding: 14px 20px;
  background: #0f172a;
  color: #ffffff;
  border-radius: 20px;
  font-size: 14px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 10px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
  z-index: 1000;
  transform: translateY(100px);
  opacity: 0;
  transition: all var(--transition-smooth);
}

.auth-toast.show {
  transform: translateY(0);
  opacity: 1;
}

.auth-toast.success {
  background: #065f46;
  border: 1px solid #059669;
}

.auth-toast.error {
  background: #7f1d1d;
  border: 1px solid #dc2626;
}

/* Responsive Rules */
@media (max-width: 640px) {
  .auth-navbar {
    padding: 16px;
  }
  .auth-main {
    padding: 12px 16px 36px;
  }
  .auth-container,
  .auth-register-page .auth-container,
  .auth-container.auth-register-container {
    max-width: 100%;
    padding: 28px 18px;
    border-radius: 20px;
  }
  .auth-form-row {
    grid-template-columns: 1fr;
    gap: 0;
  }
  .auth-card-title {
    font-size: 21px;
  }
}
