/* ================================================================
   BAŞVURU PORTALI — Akbank tasarım dili
   (akbank.com'dan ölçülen değerler: Campton/Poppins, #DC0005,
   pill butonlar r:100px w:500, kenarlık #DAD9E0 2px, metin #212529)
   ================================================================ */
* { margin: 0; padding: 0; box-sizing: border-box; }

/* Kaydırma çubuklarını tüm sayfalarda gizle (kaydırma tekerlek/klavye ile yine çalışır) */
html { scrollbar-width: none; -ms-overflow-style: none; }
* { scrollbar-width: none; }
::-webkit-scrollbar { width: 0 !important; height: 0 !important; display: none; }

:root {
  --red: #DC0005;
  --red-dark: #B50004;
  --red-pale: #FDECEC;
  --ink: #212529;
  --gray-700: #3c4046;
  --gray-500: #6c7076;
  --gray-300: #DAD9E0;
  --gray-200: #EAEAEF;
  --gray-100: #F6F6F8;
  --white: #FFFFFF;
  --green: #00A651;
  --r-input: 12px;
  --r-card: 20px;
  --r-pill: 100px;
  --radius: 12px; /* admin.css uyumluluğu */
  --shadow: 0 2px 6px rgba(33, 37, 41, 0.04), 0 10px 30px rgba(33, 37, 41, 0.06);
  --font: "Campton", "Poppins", "Segoe UI", system-ui, -apple-system, sans-serif;
  --heading-weight: 500;
}

/* ============ TEMA 2 — Lacivert (Halkbank tarzı) ============ */
:root[data-theme="blue"] {
  --red: #005697;
  --red-dark: #004175;
  --red-pale: #E8F1F8;
  --ink: #2A3742;
  --gray-700: #32414F;
  --gray-500: #6c7684;
  --gray-300: #cdd5dd;
  --gray-200: #e5e9ee;
  --gray-100: #F4F6F8;
  --r-input: 6px;
  --r-card: 10px;
  --r-pill: 6px;
  --radius: 6px;
  --font: "Source Sans 3", "Segoe UI", system-ui, -apple-system, sans-serif;
  --heading-weight: 700;
}

/* ============ TEMA 3 — Turkuaz (Garanti BBVA tarzı) ============ */
:root[data-theme="teal"] {
  --red: #02A5A5;
  --red-dark: #018787;
  --red-pale: #E4F5F5;
  --ink: #0A2242;
  --gray-700: #21384f;
  --gray-500: #6a7482;
  --gray-300: #d2d7dd;
  --gray-200: #e6e9ed;
  --gray-100: #F4F4F4;
  --r-input: 6px;
  --r-card: 8px;
  --r-pill: 4px;
  --radius: 6px;
  --font: "Mulish", "Segoe UI", system-ui, -apple-system, sans-serif;
  --heading-weight: 600;
}

html { scroll-behavior: smooth; }

/* Tema değişirken geçişleri anlık kapatır (renk animasyonunun takılmasını önler) */
.no-transition, .no-transition * { transition: none !important; }

body {
  font-family: var(--font);
  background: var(--white);
  color: var(--ink);
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}

/* ============ Üst ince şerit ============ */
.util-strip {
  background: var(--gray-100);
  border-bottom: 1px solid var(--gray-200);
  font-size: 0.8rem;
}
.util-inner {
  max-width: 1140px; margin: 0 auto; padding: 0 24px;
  display: flex; justify-content: space-between; align-items: stretch;
}
.util-tabs { display: flex; }
.util-tab {
  padding: 10px 22px;
  color: var(--gray-500);
  font-weight: 500;
}
.util-tab.active {
  background: var(--white);
  color: var(--red);
  border-bottom: 2px solid var(--red);
}
.util-links { display: flex; align-items: center; gap: 22px; color: var(--gray-500); }
.util-lang { font-weight: 600; color: var(--ink); }

/* ============ Ana başlık ============ */
.topbar { background: var(--white); }
.topbar-inner {
  max-width: 1140px; margin: 0 auto;
  padding: 22px 24px;
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
}
.brand-link { display: flex; align-items: center; text-decoration: none; }
.brand {
  font-size: 1.9rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--red);
  text-decoration: none;
  line-height: 1;
}
.brand-logo {
  display: block;
  height: 48px;
  max-height: 48px;
  width: auto;
  max-width: 260px;
  object-fit: contain;
}
.topbar-actions { display: flex; gap: 12px; }
.btn-header { padding: 11px 28px; font-size: 0.9rem; }

/* Logo kutusu (admin sidebar & login) — temaya göre renklenir */
.brand-mark {
  display: inline-flex; align-items: center; justify-content: center;
  width: 38px; height: 38px; flex-shrink: 0;
  background: var(--red); color: #fff;
  font-weight: 700; font-size: 1.15rem;
  border-radius: var(--r-input);
}

/* ============ Yerleşim ============ */
.container {
  max-width: 720px;
  width: 100%;
  margin: 0 auto;
  padding: 36px 16px 70px;
  flex: 1;
}

.card {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--r-card);
  box-shadow: var(--shadow);
  padding: 44px 48px;
}

.site-footer {
  border-top: 1px solid var(--gray-200);
  background: var(--gray-100);
  padding: 22px 24px;
  text-align: center;
}
.site-footer p {
  font-size: 0.76rem;
  color: var(--gray-500);
  line-height: 1.8;
  max-width: 760px;
  margin: 0 auto;
}
.site-footer a { color: var(--red); text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }

/* ============ Gizlilik / KVKK sayfası ============ */
.card.legal { padding: 44px 48px; }
.legal-title { font-size: 1.5rem; font-weight: 600; color: var(--ink); margin-bottom: 4px; }
.legal-updated { font-size: 0.8rem; color: var(--gray-500); margin-bottom: 22px; }
.legal-lead { font-size: 0.95rem; color: var(--gray-700); line-height: 1.7; margin-bottom: 10px; }
.card.legal h2 {
  font-size: 1.02rem; font-weight: 600; color: var(--red);
  margin: 26px 0 10px;
}
.card.legal p { font-size: 0.9rem; color: var(--gray-700); line-height: 1.75; margin-bottom: 8px; }
.card.legal a { color: var(--red); }
.legal-note {
  background: var(--gray-100);
  border-left: 3px solid var(--red);
  border-radius: 8px;
  padding: 14px 16px;
  font-size: 0.85rem; color: var(--gray-700); line-height: 1.7;
  margin-top: 22px;
}
@media (max-width: 620px) { .card.legal { padding: 26px 20px; } }

/* ============ Yükleniyor ============ */
.loading { text-align: center; padding: 40px 0; color: var(--gray-500); }
.spinner {
  width: 36px; height: 36px;
  border: 3px solid var(--gray-200);
  border-top-color: var(--red);
  border-radius: 50%;
  margin: 0 auto 14px;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ============ Form başlığı (Akbank hero tarzı: kırmızı, w500) ============ */
.form-header { margin-bottom: 30px; }
.form-header h1 {
  font-size: 1.8rem;
  font-weight: var(--heading-weight);
  color: var(--red);
  line-height: 1.25;
}
.form-header p { color: var(--gray-500); margin-top: 10px; font-size: 0.92rem; line-height: 1.7; font-weight: 400; }

/* ============ İlerleme ============ */
.progress-wrap { margin-bottom: 34px; }
.progress-steps { display: flex; justify-content: space-between; position: relative; }
.progress-steps::before {
  content: ""; position: absolute; top: 17px; left: 24px; right: 24px;
  height: 2px; background: var(--gray-200); z-index: 0;
}
.progress-line {
  position: absolute; top: 17px; left: 24px; height: 2px;
  background: var(--red);
  z-index: 1; transition: width 0.4s ease;
}
.p-step { position: relative; z-index: 2; display: flex; flex-direction: column; align-items: center; gap: 8px; flex: 1; }
.p-dot {
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--white); border: 2px solid var(--gray-300);
  display: flex; align-items: center; justify-content: center;
  font-size: 0.85rem; font-weight: 600; color: var(--gray-500);
  transition: all 0.3s ease;
}
.p-step.active .p-dot {
  border-color: var(--red); background: var(--red); color: var(--white);
  box-shadow: 0 4px 14px color-mix(in srgb, var(--red) 25%, transparent);
}
.p-step.done .p-dot { border-color: var(--red); background: var(--white); color: var(--red); }
.p-label {
  font-size: 0.72rem; color: var(--gray-500); text-align: center;
  max-width: 96px; font-weight: 500;
}
.p-step.active .p-label { color: var(--ink); font-weight: 600; }

/* ============ Adımlar ============ */
.step-panel { animation: stepIn 0.3s ease; }
@keyframes stepIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.step-title {
  font-size: 1.2rem; font-weight: 600; margin-bottom: 5px;
  color: var(--ink);
}
.step-desc { color: var(--gray-500); font-size: 0.88rem; margin-bottom: 26px; }

/* ============ Alanlar ============ */
.field { margin-bottom: 20px; }
.field label.f-label {
  display: block; font-size: 0.85rem; font-weight: 500;
  margin-bottom: 8px; color: var(--gray-700);
}
.field .req { color: var(--red); margin-left: 2px; }

input[type="text"], input[type="email"], input[type="number"], input[type="tel"],
input[type="date"], input[type="password"], textarea, select {
  width: 100%;
  background: var(--white);
  border: 2px solid var(--gray-300);
  border-radius: var(--r-input);
  color: var(--ink);
  padding: 12px 16px;
  font-size: 0.93rem;
  font-family: inherit;
  font-weight: 400;
  transition: border-color 0.15s, box-shadow 0.15s;
  outline: none;
}
input:focus, textarea:focus, select:focus {
  border-color: var(--red);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--red) 9%, transparent);
}
textarea { min-height: 110px; resize: vertical; }
input.invalid, textarea.invalid, select.invalid {
  border-color: var(--red);
  background: var(--red-pale);
}
::placeholder { color: var(--gray-500); opacity: 0.7; }

/* radio & checkbox satırları */
.opt-group { display: flex; flex-direction: column; gap: 10px; }
.opt-group.opt-row { flex-direction: row; flex-wrap: wrap; }
.opt-group.opt-row .opt { flex: 1; min-width: 120px; justify-content: center; }
.opt {
  display: flex; align-items: center; gap: 12px;
  background: var(--white);
  border: 2px solid var(--gray-300);
  border-radius: var(--r-input);
  padding: 12px 16px;
  cursor: pointer;
  transition: all 0.15s ease;
  font-size: 0.9rem;
  font-weight: 400;
}
.opt:hover { border-color: var(--gray-500); }
.opt input { accent-color: var(--red); width: 17px; height: 17px; cursor: pointer; }
.opt.selected { border-color: var(--red); background: var(--red-pale); font-weight: 500; }

.field-error { color: var(--red); font-size: 0.78rem; margin-top: 6px; display: none; font-weight: 500; }
.field-error.show { display: block; }

/* ============ Özet ============ */
.review-group { margin-bottom: 22px; }
.review-group h3 {
  font-size: 0.95rem; color: var(--red); font-weight: 600;
  padding-bottom: 8px; margin-bottom: 6px;
  border-bottom: 1px solid var(--gray-200);
}
.review-row {
  display: flex; justify-content: space-between; gap: 16px;
  padding: 10px 2px;
  border-bottom: 1px solid var(--gray-100);
  font-size: 0.88rem;
}
.review-row .r-label { color: var(--gray-500); flex-shrink: 0; }
.review-row .r-value { text-align: right; word-break: break-word; font-weight: 500; }

/* ============ Butonlar (Akbank pill: r100, w500, büyük harf yok) ============ */
.btn-row {
  display: flex; justify-content: space-between; gap: 12px;
  margin-top: 32px; padding-top: 24px;
  border-top: 1px solid var(--gray-200);
}
.btn {
  border: none; border-radius: var(--r-pill);
  padding: 14px 36px; font-size: 0.95rem; font-weight: 500;
  cursor: pointer; font-family: inherit;
  text-decoration: none; display: inline-block;
  transition: all 0.15s ease;
}
.btn-primary {
  background: var(--red); color: var(--white);
}
.btn-primary:hover { background: var(--red-dark); }
.btn-primary:disabled { opacity: 0.55; cursor: wait; }
.btn-outline, .btn-ghost {
  background: var(--white); color: var(--red);
  border: 2px solid var(--red);
  padding: 12px 34px;
}
.btn-outline:hover, .btn-ghost:hover { background: var(--red-pale); }
.btn-back { padding: 11px 26px; font-size: 0.85rem; }

/* ============ Başarı ============ */
.success-panel { text-align: center; padding: 36px 0; }
.success-check {
  width: 84px; height: 84px; margin: 0 auto 24px;
  border-radius: 50%;
  border: 3px solid var(--green);
  display: flex; align-items: center; justify-content: center;
}
.success-check svg { width: 42px; height: 42px; stroke: var(--green); }
.success-check .check-path {
  stroke-dasharray: 60; stroke-dashoffset: 60;
  animation: draw 0.5s 0.2s ease forwards;
}
@keyframes draw { to { stroke-dashoffset: 0; } }
.success-panel h2 { font-size: 1.4rem; font-weight: 600; margin-bottom: 10px; color: var(--ink); }
.success-panel p { color: var(--gray-500); max-width: 440px; margin: 0 auto; line-height: 1.7; font-size: 0.9rem; }

/* ============ Genel hata kutusu ============ */
.alert {
  background: var(--red-pale);
  border: 1px solid color-mix(in srgb, var(--red) 30%, transparent);
  color: var(--red);
  border-radius: var(--r-input);
  padding: 13px 18px; font-size: 0.86rem; font-weight: 500;
  margin-top: 16px; display: none;
}
.alert.show { display: block; }

/* ============ Mobil ============ */
@media (max-width: 620px) {
  .card { padding: 28px 20px; border-radius: 16px; }
  .p-label { display: none; }
  .container { padding: 18px 12px 40px; }
  .btn { padding: 12px 24px; font-size: 0.88rem; }
  .btn-header:not(.btn-back) { display: none; }
  .btn-back { padding: 9px 18px; font-size: 0.78rem; }
  .topbar-inner { padding: 16px 20px; }
  .brand { font-size: 1.5rem; }
  .brand-logo { height: 52px; max-height: 52px; max-width: 260px; }
  .util-links span:not(.util-lang) { display: none; }
  /* iOS Safari, odaklanan input'un font-size'ı 16px altındaysa sayfayı otomatik yakınlaştırır */
  input, select, textarea { font-size: 16px; }
}

@media (max-width: 480px) {
  .card { padding: 22px 16px; }
  .container { padding: 14px 10px 32px; }
  .form-header h1 { font-size: 1.45rem; }
  .util-inner { padding: 0 14px; }
  .topbar-inner { padding: 14px 14px; }
  .p-dot { width: 30px; height: 30px; font-size: 0.78rem; }
  .progress-steps::before { left: 15px; right: 15px; }
  .progress-line { left: 15px; }
  .opt-group.opt-row { flex-direction: column; }
  .opt-group.opt-row .opt { min-width: 0; justify-content: flex-start; }
  .review-row { flex-direction: column; align-items: flex-start; gap: 3px; }
  .review-row .r-value { text-align: left; }
  .btn { padding: 12px 18px; font-size: 0.85rem; }
  .btn-row { gap: 8px; }
}
