/* SmartPrep Üyelik Paneli — bağımsız stil (V2'de ana site CSS'iyle birleştirilebilir). */
:root {
  --ink: #1d1a17;
  --muted: #6b6157;
  --line: #e6e0d8;
  --bg: #f7f4ef;
  --card: #ffffff;
  /* DÜZELTİLDİ: önceki #b8492f (kiremit) SmartPrep markası değildi → bordo #A10E17. */
  --brand: #A10E17;
  --brand-dark: #7d0a11;
  --ok: #2f7d4f;
  --warn: #b07d1a;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(29,26,23,.05), 0 8px 24px rgba(29,26,23,.06);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.55;
}
.wrap { width: min(840px, 92vw); margin-inline: auto; }
h1, h2 { font-family: "Fraunces", Georgia, serif; line-height: 1.15; margin: 0 0 .35em; }
h1 { font-size: clamp(1.5rem, 1.1rem + 1.6vw, 2.1rem); }
h2 { font-size: 1.2rem; }
a { color: var(--brand-dark); }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
.kicker {
  display: inline-block; font-size: .72rem; letter-spacing: .12em; text-transform: uppercase;
  color: var(--brand); font-weight: 600; margin-bottom: .4rem;
}
.tm { font-size: .6em; vertical-align: super; }

/* Header / footer */
.panel-header { background: var(--card); border-bottom: 1px solid var(--line); }
.header-row { display: flex; align-items: center; justify-content: space-between; padding: 14px 0; }
.brand { font-weight: 700; text-decoration: none; color: var(--ink); font-size: 1.05rem; }
.brand em { color: var(--muted); font-style: normal; font-weight: 500; }
.panel-main { padding: 32px 0 48px; }
.panel-footer { border-top: 1px solid var(--line); color: var(--muted); font-size: .82rem; padding: 20px 0; }
.logout-form { margin: 0; }

/* Buttons */
.btn {
  display: inline-block; border: 1px solid transparent; border-radius: 10px;
  font: inherit; font-weight: 600; cursor: pointer; text-decoration: none;
  padding: 10px 18px; transition: background .15s, border-color .15s, transform .05s;
}
.btn:active { transform: translateY(1px); }
.btn-brand { background: var(--brand); color: #fff; }
.btn-brand:hover { background: var(--brand-dark); }
.btn-ghost { background: transparent; border-color: var(--line); color: var(--ink); }
.btn-ghost:hover { border-color: var(--muted); }
.btn-sm { padding: 6px 12px; font-size: .85rem; }
.btn-lg { padding: 13px 26px; font-size: 1.05rem; }
.btn-block { width: 100%; }

/* Welcome */
.welcome { margin-bottom: 24px; }

/* Action card (Evo Bulut yönlendirme) */
.action-card {
  background: linear-gradient(135deg, #fff 0%, #fbf6f2 100%);
  border: 1px solid var(--line); border-left: 4px solid var(--brand);
  border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 24px 26px; margin-bottom: 28px;
}
.action-card h2 { margin-bottom: .25em; }
.action-card p { color: var(--muted); margin: 0 0 18px; }

/* Sections */
.panel-section {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 22px 24px; margin-bottom: 18px;
}
.doc-list { list-style: none; margin: 0; padding: 0; }
.doc-list li {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 12px 0; border-bottom: 1px solid var(--line);
}
.doc-list li:last-child { border-bottom: 0; }
.doc-meta { display: flex; flex-direction: column; gap: 2px; }
.badge {
  display: inline-block; font-size: .7rem; font-weight: 600; padding: 2px 8px; border-radius: 999px;
  background: #efe9e1; color: var(--muted); vertical-align: middle;
}
.badge-approved { background: #e3f1e8; color: var(--ok); }
.badge-pending { background: #f6eed8; color: var(--warn); }
.badge-rejected { background: #f6dede; color: #a3342a; }
.profile { display: grid; grid-template-columns: auto 1fr; gap: 6px 18px; margin: 0; }
.profile dt { color: var(--muted); }
.profile dd { margin: 0; font-weight: 500; }
.disabled-link { color: var(--muted); cursor: not-allowed; text-decoration: line-through; }

/* Auth (login) card */
.auth-card {
  max-width: 420px; margin: 32px auto; background: var(--card);
  border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 30px 28px;
}
.auth-form { display: flex; flex-direction: column; gap: 14px; margin: 18px 0; }
.auth-form label { display: flex; flex-direction: column; gap: 6px; font-weight: 600; font-size: .9rem; }
.auth-form input {
  font: inherit; padding: 11px 13px; border: 1px solid var(--line); border-radius: 10px; background: #fff;
}
.auth-form input:focus { outline: 2px solid var(--brand); outline-offset: 1px; border-color: var(--brand); }
.alert { border-radius: 10px; padding: 12px 14px; font-size: .9rem; margin: 12px 0; }
.alert-error { background: #f6dede; color: #a3342a; border: 1px solid #ecc4c0; }

@media (max-width: 560px) {
  .doc-list li { flex-direction: column; align-items: flex-start; }
}

/* Admin */
.filter-bar { margin: 0 0 18px; }
.filter-bar select {
  font: inherit; padding: 8px 12px; border: 1px solid var(--line); border-radius: 8px; background: #fff;
}
.admin-table { width: 100%; border-collapse: collapse; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.admin-table th, .admin-table td { text-align: left; padding: 11px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
.admin-table th { font-size: .78rem; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); background: #faf7f2; }
.admin-table tr:last-child td { border-bottom: 0; }
.admin-form { display: flex; flex-direction: column; gap: 12px; align-items: flex-start; }
.admin-form label { display: flex; flex-direction: column; gap: 6px; font-weight: 600; font-size: .9rem; width: 100%; max-width: 460px; }
.admin-form select, .admin-form textarea {
  font: inherit; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; background: #fff; width: 100%;
}
.admin-form textarea { resize: vertical; }
code { background: #efe9e1; padding: 2px 8px; border-radius: 6px; font-size: .95em; }

/* ============================================================
   Onboarding wizard + çerçeve onay + form alanları
   (panel/onboarding/* ve panel/cerceve_onay.html'in kullandığı
   sınıflar — önceden tanımsızdı, sayfalar stilsiz kalıyordu).
   Mobil-öncelikli: dokunma ≥44px, input font 16px (iOS zoom yok).
   ============================================================ */

/* Genel form gövdesi — input/select/textarea ortak görünüm */
.stack-form,
.consent-form { display: flex; flex-direction: column; gap: 16px; margin: 18px 0 4px; }
.stack-form > label,
.consent-form > label.field-label { display: flex; flex-direction: column; gap: 6px; font-weight: 600; font-size: .92rem; }
.stack-form input,
.stack-form select,
.stack-form textarea,
.field input,
.field select,
.field textarea {
  font: inherit;
  font-size: 16px;                 /* iOS zoom tetiklemesin */
  width: 100%;
  min-height: 44px;                /* dokunma hedefi */
  padding: 11px 13px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  color: var(--ink);
}
.stack-form textarea,
.field textarea { min-height: 80px; resize: vertical; line-height: 1.5; }
.stack-form input:focus,
.stack-form select:focus,
.stack-form textarea:focus,
.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: 2px solid var(--brand); outline-offset: 1px; border-color: var(--brand);
}

/* Yan yana iki alan (İl / İlçe) → mobilde alt alta */
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-row > label { display: flex; flex-direction: column; gap: 6px; font-weight: 600; font-size: .92rem; }
@media (max-width: 520px) { .form-row { grid-template-columns: 1fr; } }

/* Tekil alan kabı (cerceve_onay OTP) */
.field { display: flex; flex-direction: column; gap: 6px; }
.field > label { font-weight: 600; font-size: .92rem; }
.field .hint { font-size: .8rem; color: var(--muted); line-height: 1.45; }

/* Hata / uyarı bildirimi */
.form-error {
  background: #f6dede; color: #a3342a; border: 1px solid #ecc4c0;
  border-radius: 10px; padding: 11px 14px; font-size: .9rem; margin: 4px 0 14px; line-height: 1.45;
}

/* Onboarding kartı — auth-card'tan biraz daha geniş, dik akış */
.onboarding-card { max-width: 560px; }

/* Onay (consent) satırları — büyük dokunma alanı, label tüm satırı kapsar */
.consent-row {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 12px 14px; margin: 0;
  background: #faf7f2; border: 1px solid var(--line); border-radius: 10px;
  font-size: .92rem; line-height: 1.5; font-weight: 400; cursor: pointer;
  transition: border-color .15s, background .15s;
}
.consent-row:hover { border-color: var(--muted); }
.consent-row:focus-within { border-color: var(--brand); background: #fff; }
.consent-row input[type="checkbox"] {
  flex: none; width: 24px; height: 24px;    /* ≥24px görünür kutu, label ile tap alanı büyür */
  margin-top: 1px; accent-color: var(--brand); cursor: pointer;
}
.consent-row.optional { background: #fff; border-style: dashed; }
.consent-form hr { border: none; border-top: 1px solid var(--line); margin: 6px 0; }

/* Rol seçimi — iki büyük buton, mobilde tam genişlik dik akış */
.role-choice { display: flex; flex-direction: column; gap: 14px; margin: 20px 0 4px; }
.role-btn {
  display: flex; flex-direction: column; align-items: flex-start; gap: 4px;
  text-align: left; width: 100%; min-height: 64px; padding: 16px 18px; line-height: 1.35;
}
.role-btn small { font-weight: 400; opacity: .85; font-size: .85rem; }
.btn-secondary { background: #fff; border-color: var(--line); color: var(--ink); }
.btn-secondary:hover { border-color: var(--brand); color: var(--brand-dark); }

/* btn-primary — forms.css'teki ana site adıyla simetri (panelde brand rengi) */
.btn-primary { background: var(--brand); color: #fff; }
.btn-primary:hover { background: var(--brand-dark); }

/* Dashboard durum işareti (emoji yerine temiz daire içinde sembol) */
.status-mark {
  display: inline-flex; align-items: center; justify-content: center;
  width: 22px; height: 22px; border-radius: 50%; margin-right: 8px;
  font-size: .8rem; font-weight: 700; vertical-align: -4px; flex: none;
}
.status-mark.ok   { background: #e3f1e8; color: var(--ok); }
.status-mark.warn { background: #f6eed8; color: var(--warn); }
.action-card h2 .status-mark { vertical-align: middle; }

/* ============================================================
   Mobil hardening — tüm panel yüzeyi (≥44px hedef, akış)
   ============================================================ */

/* Dokunma hedefleri: her buton min 44px yükseklik */
.btn { min-height: 44px; display: inline-flex; align-items: center; justify-content: center; }
.btn-sm { min-height: 38px; }            /* ikincil çıkış/indir; yine de rahat */
.btn-block { width: 100%; }

/* Auth/login alanları büyük input + 16px (zoom yok) */
.auth-form input { min-height: 44px; font-size: 16px; }

@media (max-width: 560px) {
  .wrap { width: 92vw; }
  .panel-main { padding: 22px 0 36px; }
  .header-row { padding: 12px 0; gap: 10px; }
  .action-card { padding: 20px 18px; }
  .panel-section { padding: 18px 16px; }
  .auth-card { margin: 20px auto; padding: 24px 20px; }
  /* Sözleşme/belge satırı zaten kart'a dönüyor; indir butonu tam genişlik */
  .doc-list li .btn { width: 100%; margin-top: 6px; }
  /* Profil grid'i tek sütuna düşsün (dt üstte, dd altta) */
  .profile { grid-template-columns: 1fr; gap: 2px 0; }
  .profile dt { margin-top: 8px; font-size: .82rem; }
}

/* Çok dar ekran (320px) güvenliği — yatay taşma engeli */
@media (max-width: 360px) {
  .wrap { width: 94vw; }
  h1 { font-size: 1.4rem; }
  .role-btn { padding: 14px 14px; }
}
