/* ╔══════════════════════════════════════════════════════════════════════════════╗
   ║  GELDİGİDİYO — Merkezi Auth Stilleri                                       ║
   ║  Dosya : auth/css/auth.css                                                  ║
   ║  Tasarım kaynağı: musteri_panel login.css + register.css                    ║
   ╚══════════════════════════════════════════════════════════════════════════════╝ */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&family=Inter:wght@400;500;600;700&display=swap');

/* ── 1. Değişkenler ── */
:root {
  --white: #fff;
  --muted: #64748b;
  --purple: #7c3aed;
  --purple-700: #6d28d9;
  --purple-900: #2e1065;
  --purple-btn: #3b0764;
  --purple-light: #f5f3ff;
  --red: #ef4444;
  --success: #10b981;
  --field: #f8fafc;
  --field-b: #e2e8f0;
  --text-main: #334155;
  --radius: 24px;
  --shadow: 0 25px 50px -12px rgba(124, 58, 237, 0.25);
}

/* ── 2. Reset & Body ── */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}
html {
  font-size: 16px;
  line-height: 1.5;
}
.hidden {
  display: none !important;
}

body {
  margin: 0;
  background: var(--white);
  color: var(--text-main);
  font-family:
    'Plus Jakarta Sans',
    'Inter',
    -apple-system,
    BlinkMacSystemFont,
    sans-serif;
  font-size: 14px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  padding: 20px;
  overflow-x: hidden;
  overflow-y: auto;
  background:
    radial-gradient(circle at 20% 80%, rgba(124, 58, 237, 0.03) 0%, transparent 50%),
    radial-gradient(circle at 80% 20%, rgba(124, 58, 237, 0.03) 0%, transparent 50%),
    linear-gradient(135deg, #f8fafc 0%, var(--white) 100%);
}
@media (max-height: 600px) {
  html,
  body {
    overflow: auto;
  }
  body {
    padding: 16px;
    align-items: flex-start;
  }
}

/* ── 3. Split Card Layout (login + register) ── */
.card {
  width: min(1060px, 100%);
  min-height: 480px;
  max-height: none;
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  display: grid;
  grid-template-columns: 1fr 1fr;
  overflow: hidden;
}
.card.wide {
  max-width: 1400px;
  min-height: 600px;
  height: 90vh;
  max-height: 900px;
  grid-template-columns: 800px 1fr;
}

/* Sol panel */
.left {
  padding: 48px 44px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.card.wide .left {
  padding: 48px 48px;
  overflow-y: auto;
  align-items: flex-start;
  scrollbar-width: thin;
  scrollbar-color: #d1d5db transparent;
}
.card.wide .left::-webkit-scrollbar {
  width: 6px;
}
.card.wide .left::-webkit-scrollbar-thumb {
  background: #d1d5db;
  border-radius: 3px;
}

.form-inner {
  width: 100%;
  max-width: 420px;
  text-align: center;
}
.card.wide .form-inner {
  max-width: 100%;
}

.logo-left {
  height: 100px;
  width: auto;
  margin: 0 auto 12px;
  display: block;
}

.title {
  margin: 0 0 2px;
  color: var(--text-main);
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-weight: 800;
  font-size: 28px;
  letter-spacing: -0.02em;
}
.subtitle {
  color: var(--muted);
  margin: 0 0 14px;
  font-weight: 500;
}

/* Sağ panel (mor) */
.right {
  position: relative;
  background: var(--white);
  padding: 54px 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: #fff;
}
.right::before {
  content: '';
  position: absolute;
  inset: 4px;
  background: linear-gradient(135deg, var(--purple-900), var(--purple-btn));
  border-radius: 20px;
  border: 4px solid var(--red);
  z-index: 0;
}
.inner {
  position: relative;
  z-index: 1;
  max-width: 420px;
}
.welcome {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-weight: 800;
  font-size: 26px;
  margin: 8px 0 4px;
  letter-spacing: -0.02em;
}
.desc {
  color: #e7e8ff;
  font-weight: 500;
  margin-bottom: 24px;
  font-size: 14px;
}

/* ── 4. Simple Card (forgot / reset / verify) ── */
body[data-auth-page='verify-email'],
body[data-auth-page='forgot-password'],
body[data-auth-page='reset-password'] {
  flex-direction: column;
  gap: 0;
}
.auth-card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  width: 100%;
  max-width: 440px;
  overflow: hidden;
}
.auth-card .auth-body {
  padding: 28px 24px;
}

/* ── 5–6. Tab Bar & Tab Panels (kaldırıldı — tek form yapısına geçildi) ── */

/* ── 7. Form Elemanları ── */
.auth-form,
#unifiedLoginForm {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.form-group label {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-main);
}

.control,
.form-group input,
.form-group select {
  width: 100%;
  padding: 14px 16px;
  border-radius: 10px;
  margin: 0;
  border: 1px solid var(--field-b);
  background: var(--field);
  font-size: 14px;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-weight: 500;
  color: var(--text-main);
  transition:
    box-shadow 0.15s,
    border-color 0.15s;
  outline: none;
}
.control::placeholder,
.form-group input::placeholder {
  color: var(--muted);
  font-weight: 400;
}
.control:focus,
.form-group input:focus,
.form-group select:focus {
  border-color: var(--purple);
  background: #fff;
  box-shadow: 0 0 0 3px var(--purple-light);
}

.control.select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='M1 4l5 5 5-5' stroke='%236b7280' stroke-width='1.5' fill='none'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 36px;
}
.control:disabled,
.form-group select:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
.control.error {
  border-color: var(--red);
}

/* Satır (2'li grid) */
.row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin: 8px 0;
  align-items: start;
}
.row.email-phone {
  grid-template-columns: 1.7fr 1fr;
  gap: 24px;
}

/* Password wrapper */
.input-wrap,
.pw-wrap {
  position: relative;
}
.input-wrap .control,
.pw-wrap input {
  padding-right: 44px;
}
.eye,
.pw-toggle {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: transparent;
  border: 0;
  cursor: pointer;
  padding: 4px;
  color: #374151;
}
.eye svg {
  width: 22px;
  height: 22px;
  display: block;
}

/* ── 8. Butonlar ── */
.btn-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 46px;
  padding: 12px 22px;
  border-radius: 10px;
  font-weight: 700;
  font-family: 'Plus Jakarta Sans', sans-serif;
  letter-spacing: -0.01em;
  border: 2px solid var(--purple-btn);
  color: #fff;
  background: var(--purple-btn);
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
  font-size: 15px;
}
.btn-cta:hover {
  background: #2e1065;
  border-color: #2e1065;
  box-shadow: 0 10px 22px rgba(46, 16, 101, 0.45);
}
.btn-cta:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}
.btn-cta.loading {
  pointer-events: none;
  opacity: 0.7;
}
.btn-cta.success {
  background: var(--success);
  border-color: var(--success);
}

.btn-outline-white {
  background: transparent;
  border: 2px solid #fff;
  color: #fff;
}
.btn-outline-white:hover {
  background: #fff;
  color: var(--purple);
}

.btn-primary {
  width: 100%;
  padding: 13px;
  background: linear-gradient(135deg, var(--purple), var(--purple-700));
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition:
    opacity 0.2s,
    transform 0.1s;
  font-family: 'Plus Jakarta Sans', sans-serif;
}
.btn-primary:hover {
  opacity: 0.9;
}
.btn-primary:active {
  transform: scale(0.98);
}
.btn-primary:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn-outline {
  background: transparent;
  border: 1.5px solid var(--purple);
  color: var(--purple);
  padding: 10px;
  border-radius: 8px;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  width: 100%;
}
.btn-outline:hover {
  background: var(--purple-light);
}

/* ── 9. Bağlantılar ── */
.auth-links {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.82rem;
  margin-top: 4px;
}
.auth-links a {
  color: var(--purple);
  font-weight: 600;
  text-decoration: underline;
}
.alt {
  margin-top: 14px;
  font-size: 14px;
}
.alt a {
  color: var(--purple);
  text-decoration: underline;
  font-weight: 700;
}

.remember {
  font-size: 13px;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
}
.remember input {
  width: 16px;
  height: 16px;
  accent-color: var(--purple);
  cursor: pointer;
}
.remember-row {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.83rem;
  color: var(--muted);
}
.remember-row input[type='checkbox'] {
  accent-color: var(--purple);
}

.auth-footer-link {
  text-align: center;
  font-size: 0.85rem;
  margin-top: 8px;
  color: var(--muted);
}
.auth-footer-link a {
  color: var(--purple);
  font-weight: 600;
  text-decoration: none;
}
.auth-footer-link a:hover {
  text-decoration: underline;
}

.login-link {
  margin-top: 16px;
  text-align: center;
  color: var(--muted);
  font-size: 14px;
}
.login-link a {
  color: var(--purple);
  font-weight: 700;
  text-decoration: underline;
}

/* ── 10. Alert ── */
.auth-alert {
  padding: 12px 16px;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 500;
  display: none;
  align-items: center;
  gap: 8px;
}
.auth-alert.show {
  display: flex;
}
.auth-alert.error {
  background: #fef2f2;
  color: #991b1b;
  border: 1px solid #fca5a5;
}
.auth-alert.success {
  background: #f0fdf4;
  color: #166534;
  border: 1px solid #86efac;
}
.auth-alert.warning {
  background: #fffbeb;
  color: #92400e;
  border: 1px solid #fde68a;
}
.auth-alert.info {
  background: #eff6ff;
  color: #1e40af;
  border: 1px solid #93c5fd;
}

.error-message {
  background: #fef2f2;
  color: #991b1b;
  border: 1px solid #fca5a5;
  padding: 12px 16px;
  border-radius: 10px;
  font-size: 13px;
  margin-bottom: 12px;
  text-align: left;
}
.error-message.warning {
  background: #fffbeb;
  color: #92400e;
  border-color: #fde68a;
}
.error-message.success {
  background: #f0fdf4;
  color: #166534;
  border-color: #86efac;
}

/* ── 11. KVKK Onayları ── */
.consents {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 8px;
}
.consent {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 13px;
  color: var(--muted);
  cursor: pointer;
  line-height: 1.5;
}
.consent input[type='checkbox'] {
  margin-top: 3px;
  accent-color: var(--purple);
  flex-shrink: 0;
  width: 16px;
  height: 16px;
}
.consent a {
  color: var(--purple);
  font-weight: 600;
  text-decoration: none;
}
.consent a:hover {
  text-decoration: underline;
}

/* ── 12. Şifre Güvenlik Göstergesi ── */
.password-strength-wrapper {
  margin: 8px 0 4px;
  background: var(--field);
  border-radius: 12px;
  padding: 14px 16px;
  border: 1px solid var(--field-b);
}
.password-strength-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}
.password-strength-title {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-main);
  margin: 0;
}
.password-strength-score {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  padding: 2px 8px;
  border-radius: 6px;
}
.password-strength-score.weak {
  background: #fee2e2;
  color: #dc2626;
}
.password-strength-score.fair,
.password-strength-score.medium {
  background: #fef3c7;
  color: #d97706;
}
.password-strength-score.good,
.password-strength-score.strong {
  background: #d1fae5;
  color: #059669;
}
.password-strength-score.very-strong {
  background: #d1fae5;
  color: #047857;
}

.password-strength-meter {
  height: 6px;
  border-radius: 3px;
  background: #e5e7eb;
  overflow: hidden;
  margin-bottom: 10px;
}
.password-strength-fill {
  height: 100%;
  border-radius: 3px;
  width: 0;
  transition:
    width 0.4s,
    background 0.3s;
}
.password-strength-fill.weak {
  width: 25%;
  background: #ef4444;
}
.password-strength-fill.fair {
  width: 50%;
  background: #f59e0b;
}
.password-strength-fill.good {
  width: 75%;
  background: #10b981;
}
.password-strength-fill.strong {
  width: 100%;
  background: #047857;
}

.password-requirements {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px 16px;
}
.password-requirement {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: #9ca3af;
  transition: color 0.2s;
}
.password-requirement.met {
  color: var(--success);
}
.password-requirement-icon::before {
  content: '○';
  font-size: 10px;
}
.password-requirement.met .password-requirement-icon::before {
  content: '●';
  color: var(--success);
}
.password-requirement-text {
  font-weight: 500;
}

/* Simple bar variant (forgot/reset pages) */
.pw-strength {
  height: 4px;
  border-radius: 2px;
  background: var(--field-b);
  overflow: hidden;
  margin-top: 2px;
}
.pw-strength-fill {
  height: 100%;
  border-radius: 2px;
  width: 0;
  transition:
    width 0.3s,
    background 0.3s;
}
.pw-hint {
  font-size: 0.75rem;
  color: var(--muted);
  margin-top: 2px;
}

/* ── 13. Result View ── */
.result-view {
  text-align: center;
  padding: 20px 0;
}
.result-view .result-icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
  font-size: 28px;
}
.result-view .result-icon.success {
  background: #dcfce7;
  color: var(--success);
}
.result-view .result-icon.error {
  background: #fee2e2;
  color: #dc2626;
}
.result-view h3 {
  font-size: 1.15rem;
  margin-bottom: 8px;
}
.result-view p {
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.5;
}

/* ── 14. Spinner ── */
.spinner {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 2.5px solid rgba(255, 255, 255, 0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  vertical-align: middle;
  margin-right: 6px;
}
/* Spinner dışında kart içi kullanım: mor tonlar */
.auth-card .spinner,
.auth-body .spinner {
  width: 36px;
  height: 36px;
  border: 3px solid #ede9fe;
  border-top-color: var(--purple);
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* ── 15. Copyright ── */
.auth-copyright {
  text-align: center;
  font-size: 0.75rem;
  color: var(--muted);
  margin-top: 20px;
  opacity: 0.7;
}

/* ── 16. Forgot/Reset simple card header ── */
.auth-header {
  text-align: center;
  margin-bottom: 24px;
}
.auth-header .logo {
  font-size: 2rem;
  font-weight: 800;
  background: linear-gradient(135deg, var(--purple), var(--purple-700));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.auth-header .tagline {
  font-size: 0.85rem;
  color: var(--muted);
  margin-top: 4px;
}

.section-desc,
.auth-subtitle {
  font-size: 0.85rem;
  color: var(--muted);
  margin-bottom: 16px;
  line-height: 1.5;
}

/* ── 17. Animasyonlar ── */
body.fade-in {
  animation: fadeIn 0.75s ease forwards;
}
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
body.fade-out {
  animation: fadeOut 0.55s ease forwards;
}
@keyframes fadeOut {
  from {
    opacity: 1;
  }
  to {
    opacity: 0;
    transform: translateY(10px);
  }
}

/* ── 18. Forgot Modal — Premium Glassmorphism ── */
.forgot-modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.forgot-overlay {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at top, rgba(124, 58, 237, 0.24), transparent 42%),
    rgba(15, 23, 42, 0.66);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}
.forgot-content {
  position: relative;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border: 1px solid rgba(255, 255, 255, 0.55);
  border-radius: 28px;
  max-width: 460px;
  width: 100%;
  overflow: hidden;
  box-shadow: 0 32px 100px rgba(15, 23, 42, 0.28);
  animation: forgotIn 0.25s ease;
  font-family: Inter, system-ui, sans-serif;
}
@keyframes forgotIn {
  from {
    opacity: 0;
    transform: translateY(16px) scale(0.985);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}
.forgot-header {
  padding: 28px 28px 20px;
  background: linear-gradient(
    135deg,
    rgba(55, 18, 115, 0.98) 0%,
    rgba(91, 33, 182, 0.96) 55%,
    rgba(214, 40, 40, 0.94) 100%
  );
  color: #fff;
  text-align: center;
  position: relative;
}
.forgot-header-icon {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.18);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 12px;
  font-size: 22px;
  color: #fff;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}
.forgot-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  cursor: pointer;
  transition: all 0.2s ease;
  line-height: 1;
}
.forgot-close:hover {
  background: rgba(255, 255, 255, 0.35);
}
.forgot-content h2 {
  margin: 0 0 6px;
  font-size: clamp(1.2rem, 2vw, 1.5rem);
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.02em;
}
.forgot-desc {
  color: rgba(255, 255, 255, 0.88);
  font-size: 0.93rem;
  margin: 0;
  line-height: 1.6;
}
.forgot-body {
  padding: 24px 28px 28px;
}
.forgot-body .control {
  width: 100%;
  padding: 14px 16px;
  border: 1.5px solid rgba(216, 180, 254, 0.5);
  border-radius: 14px;
  font-size: 0.95rem;
  font-family: Inter, system-ui, sans-serif;
  color: #111827;
  background: #fff;
  box-shadow: inset 0 1px 2px rgba(124, 58, 237, 0.04);
  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease;
  outline: none;
  box-sizing: border-box;
}
.forgot-body .control:focus {
  border-color: #7c3aed;
  box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.12);
}
.forgot-body .control::placeholder {
  color: #94a3b8;
}
.forgot-body .btn-cta {
  width: 100%;
  border: 0;
  border-radius: 14px;
  padding: 14px 20px;
  font-weight: 800;
  font-size: 0.95rem;
  cursor: pointer;
  background: linear-gradient(135deg, #d62828, #7c3aed);
  color: #fff;
  box-shadow: 0 12px 24px rgba(124, 58, 237, 0.22);
  transition:
    transform 0.18s ease,
    box-shadow 0.18s ease;
  font-family: Inter, system-ui, sans-serif;
}
.forgot-body .btn-cta:hover {
  transform: translateY(-1px);
  box-shadow: 0 16px 32px rgba(124, 58, 237, 0.3);
}
.forgot-body .btn-cta:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}
.forgot-msg {
  padding: 12px 16px;
  border-radius: 12px;
  font-size: 0.85rem;
  margin-bottom: 12px;
  line-height: 1.5;
}
.forgot-msg.success {
  background: #ecfdf5;
  color: #065f46;
  border: 1px solid #a7f3d0;
}
.forgot-msg.error {
  background: #fef2f2;
  color: #991b1b;
  border: 1px solid #fecaca;
}

/* Screen-reader only — görsel olarak gizli ama erişilebilir label */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ── 19. Responsive ── */
@media (max-width: 980px) {
  .card {
    grid-template-columns: 1fr;
  }
  .card.wide {
    grid-template-columns: 1fr;
    height: auto;
    max-height: none;
  }
  .right {
    display: none;
  }
  .card.wide .left {
    padding: 36px 28px;
  }
}
@media (max-width: 600px) {
  body {
    padding: 12px;
  }
  .left {
    padding: 32px 24px;
  }
  .logo-left {
    height: 80px;
  }
  .title {
    font-size: 26px;
  }
  .row {
    grid-template-columns: 1fr;
    gap: 0;
  }
  .row.email-phone {
    grid-template-columns: 1fr;
  }
  .password-requirements {
    grid-template-columns: 1fr;
  }

  /* ── Verify / Forgot / Reset card responsive ── */
  .auth-header .logo {
    font-size: 1.6rem;
  }
  .auth-header .tagline {
    font-size: 0.78rem;
  }
  .auth-card {
    max-width: 100%;
    border-radius: 16px;
  }
  .auth-card .auth-body {
    padding: 20px 16px;
  }
  .auth-copyright {
    font-size: 0.68rem;
  }
}
