/* ============================================================
   SAFAK SOYAĞACI - Ana Stil Dosyası
   Mobil öncelikli tasarım
   ============================================================ */

/* ---- Renk Değişkenleri ---- */
:root {
  --bg:             #FBF7F0;
  --surface:        #FFFFFF;
  --primary:        #7C3D12;
  --primary-mid:    #9A4B18;
  --primary-light:  #D97706;
  --primary-pale:   #FEF3C7;
  --text:           #1C1917;
  --text-mid:       #57534E;
  --text-muted:     #A8A29E;
  --border:         #E7E5E0;
  --border-dark:    #D6D3D1;
  --success:        #16A34A;
  --success-pale:   #DCFCE7;
  --danger:         #DC2626;
  --danger-pale:    #FEE2E2;
  --info-pale:      #EFF6FF;
  --info:           #2563EB;

  --radius:         12px;
  --radius-sm:      8px;
  --radius-xs:      6px;
  --shadow:         0 1px 3px rgba(0,0,0,0.08), 0 1px 2px rgba(0,0,0,0.05);
  --shadow-md:      0 4px 8px rgba(0,0,0,0.08), 0 2px 4px rgba(0,0,0,0.05);
  --shadow-lg:      0 8px 24px rgba(0,0,0,0.10);
  --nav-height:     64px;
  --header-height:  56px;
}

/* ---- Reset ---- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto,
               'Helvetica Neue', Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.5;
  padding-bottom: calc(var(--nav-height) + 12px);
}

a { color: inherit; text-decoration: none; }
button { font-family: inherit; }
input, select, textarea { font-family: inherit; }
img { max-width: 100%; height: auto; }

/* ============================================================
   HEADER
   ============================================================ */
.header {
  background: var(--primary);
  color: #fff;
  height: var(--header-height);
  display: flex;
  align-items: center;
  padding: 0 16px;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow-md);
}

.header-inner {
  width: 100%;
  max-width: 768px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.header-title {
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  display: flex;
  align-items: center;
  gap: 8px;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Geri butonu */
.back-btn {
  background: rgba(255,255,255,0.15);
  border: none;
  border-radius: var(--radius-xs);
  color: white;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 1.2rem;
  transition: background 0.15s;
}
.back-btn:hover { background: rgba(255,255,255,0.25); }

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 9px 18px;
  border-radius: var(--radius-sm);
  border: none;
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 600;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.btn-primary {
  background: var(--primary-light);
  color: white;
}
.btn-primary:hover  { background: #B45309; }
.btn-primary:active { transform: scale(0.97); }

.btn-outline {
  background: transparent;
  color: white;
  border: 1.5px solid rgba(255,255,255,0.5);
}
.btn-outline:hover { background: rgba(255,255,255,0.1); }

.btn-ghost {
  background: var(--bg);
  color: var(--primary);
  border: 1.5px solid var(--border-dark);
}
.btn-ghost:hover { background: var(--primary-pale); }

.btn-danger {
  background: var(--danger);
  color: white;
}
.btn-danger:hover { background: #B91C1C; }

.btn-success {
  background: var(--success);
  color: white;
}
.btn-success:hover { background: #15803D; }

.btn-full {
  width: 100%;
  padding: 13px;
  font-size: 1rem;
}

.btn-sm {
  padding: 6px 12px;
  font-size: 0.8rem;
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* ============================================================
   MAIN CONTENT WRAPPER
   ============================================================ */
.main-wrap {
  max-width: 768px;
  margin: 0 auto;
  padding: 16px;
}

/* ============================================================
   BOTTOM NAVIGATION
   ============================================================ */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: var(--nav-height);
  background: var(--surface);
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-around;
  align-items: center;
  padding-bottom: env(safe-area-inset-bottom, 0);
  z-index: 100;
  box-shadow: 0 -2px 8px rgba(0,0,0,0.06);
}

.nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 6px 20px;
  color: var(--text-muted);
  font-size: 0.72rem;
  font-weight: 500;
  border-radius: var(--radius-sm);
  transition: color 0.15s;
  cursor: pointer;
}

.nav-item.active { color: var(--primary); }
.nav-item.active .nav-icon { transform: scale(1.1); }

.nav-icon {
  font-size: 1.35rem;
  transition: transform 0.15s;
}

/* ============================================================
   SEARCH
   ============================================================ */
.search-wrap {
  position: relative;
  margin-bottom: 16px;
}

.search-icon {
  position: absolute;
  left: 13px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  pointer-events: none;
  font-size: 1rem;
}

.search-input {
  width: 100%;
  padding: 11px 16px 11px 40px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  font-size: 0.95rem;
  color: var(--text);
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.search-input:focus {
  border-color: var(--primary-light);
  box-shadow: 0 0 0 3px rgba(217,119,6,0.12);
}
.search-input::placeholder { color: var(--text-muted); }

/* ============================================================
   BREADCRUMB
   ============================================================ */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 6px 0 12px;
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.breadcrumb::-webkit-scrollbar { display: none; }
.breadcrumb:empty { display: none; }

.bc-btn {
  background: none;
  border: none;
  color: var(--primary-light);
  font-size: 0.82rem;
  font-weight: 500;
  cursor: pointer;
  padding: 3px 7px;
  border-radius: var(--radius-xs);
  white-space: nowrap;
  transition: background 0.15s;
}
.bc-btn:hover { background: var(--primary-pale); }

.bc-sep { color: var(--text-muted); font-size: 0.75rem; }

.bc-current {
  color: var(--text-mid);
  font-size: 0.82rem;
  font-weight: 600;
  padding: 3px 7px;
  white-space: nowrap;
}

/* ============================================================
   KİŞİ KARTI (Person Card)
   ============================================================ */
.person-card {
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  margin-bottom: 8px;
  border-left: 3px solid var(--primary);
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s;
  overflow: hidden;
}
.person-card:hover  { transform: translateY(-1px); box-shadow: var(--shadow-md); }
.person-card:active { transform: scale(0.99); }

.person-card.root     { border-left: 4px solid var(--primary-light); }
.person-card.deceased { border-left-color: var(--text-muted); }
.person-card.female   { border-left-color: #EC4899; }

.card-body {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
}

.card-avatar {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: var(--primary-pale);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  flex-shrink: 0;
  overflow: hidden;
  border: 2px solid var(--border);
}
.card-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.card-info { flex: 1; min-width: 0; }

.card-name {
  font-size: 0.97rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 3px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}

.card-meta-item {
  font-size: 0.75rem;
  color: var(--text-mid);
  display: flex;
  align-items: center;
  gap: 3px;
}

.card-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
  flex-shrink: 0;
}

.card-arrow {
  color: var(--text-muted);
  font-size: 1rem;
}

/* Çocuk sayısı badge */
.children-badge {
  font-size: 0.7rem;
  font-weight: 700;
  background: var(--primary-pale);
  color: var(--primary);
  padding: 2px 7px;
  border-radius: 100px;
}

/* Nesil rozeti */
.gen-badge {
  font-size: 0.68rem;
  font-weight: 700;
  background: var(--primary);
  color: white;
  padding: 2px 8px;
  border-radius: 100px;
  margin-bottom: 10px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

/* Hayatta/Vefat rozeti */
.badge {
  font-size: 0.68rem;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 100px;
}
.badge-living   { background: var(--success-pale); color: var(--success); }
.badge-deceased { background: var(--border); color: var(--text-mid); }
.badge-root     { background: var(--primary-pale); color: var(--primary); }

/* ============================================================
   AĞAç YAPISI (Tree Layout)
   ============================================================ */
.tree-section { margin-bottom: 6px; }

.generation-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 16px 0 8px;
}

.children-wrap {
  padding-left: 20px;
  border-left: 2px dashed var(--border);
  margin-left: 22px;
  margin-top: 6px;
}

/* ============================================================
   BÖLÜM BAŞLIĞI
   ============================================================ */
.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 20px 0 10px;
}

.section-title {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
}

/* ============================================================
   FORM ELEMANLARI
   ============================================================ */
.form-card {
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 18px;
  margin-bottom: 14px;
}

.form-card-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 8px;
}

.form-group { margin-bottom: 14px; }
.form-group:last-child { margin-bottom: 0; }

.form-label {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-mid);
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.form-label .required {
  color: var(--danger);
  margin-left: 2px;
}

.form-input,
.form-select,
.form-textarea {
  width: 100%;
  padding: 11px 14px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  font-size: 0.95rem;
  color: var(--text);
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
  -webkit-appearance: none;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  border-color: var(--primary-light);
  box-shadow: 0 0 0 3px rgba(217,119,6,0.12);
}

.form-input::placeholder { color: var(--text-muted); }

.form-textarea {
  resize: vertical;
  min-height: 80px;
  line-height: 1.5;
}

.form-select {
  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 fill='%2378716C' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 36px;
}

.form-hint {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 4px;
}

.form-error {
  font-size: 0.78rem;
  color: var(--danger);
  margin-top: 4px;
  display: flex;
  align-items: center;
  gap: 4px;
}

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

/* Radio buttons */
.radio-group {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.radio-option {
  flex: 1;
  min-width: 80px;
}

.radio-option input { display: none; }

.radio-label {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-mid);
  transition: all 0.15s;
  text-align: center;
}

.radio-option input:checked + .radio-label {
  border-color: var(--primary);
  background: var(--primary-pale);
  color: var(--primary);
}

/* ============================================================
   ADIM GÖSTERGESİ (Step Indicator)
   ============================================================ */
.steps {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  margin-bottom: 24px;
  padding: 0 8px;
}

.step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  position: relative;
}

.step-circle {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-muted);
  transition: all 0.2s;
  z-index: 1;
}

.step-circle.active  { background: var(--primary); color: white; }
.step-circle.done    { background: var(--success); color: white; }

.step-label {
  font-size: 0.68rem;
  color: var(--text-muted);
  font-weight: 500;
  white-space: nowrap;
}

.step.active .step-label { color: var(--primary); font-weight: 700; }
.step.done .step-label   { color: var(--success); }

.step-line {
  height: 2px;
  flex: 1;
  background: var(--border);
  margin-bottom: 18px;
  min-width: 20px;
  max-width: 50px;
  transition: background 0.2s;
}
.step-line.done { background: var(--success); }

/* ============================================================
   KİŞİ DETAY SAYFASI
   ============================================================ */
.person-hero {
  background: linear-gradient(145deg, var(--primary) 0%, var(--primary-mid) 60%, var(--primary-light) 100%);
  color: white;
  padding: 28px 20px 52px;
  text-align: center;
}

.hero-avatar {
  width: 82px;
  height: 82px;
  border-radius: 50%;
  border: 3px solid rgba(255,255,255,0.4);
  background: rgba(255,255,255,0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.6rem;
  margin: 0 auto 14px;
  overflow: hidden;
}

.hero-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-name {
  font-size: 1.45rem;
  font-weight: 700;
  margin-bottom: 4px;
  letter-spacing: -0.02em;
}

.hero-sub {
  font-size: 0.88rem;
  opacity: 0.82;
}

/* Kart hero'nun üstüne "float" ediyor */
.detail-card {
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  margin: -32px 16px 16px;
  overflow: hidden;
}

.detail-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--bg);
}
.detail-row:last-child { border-bottom: none; }

.detail-icon {
  font-size: 1.05rem;
  width: 22px;
  text-align: center;
  flex-shrink: 0;
  margin-top: 1px;
}

.detail-content { flex: 1; }

.detail-label {
  font-size: 0.72rem;
  color: var(--text-muted);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 2px;
}

.detail-value {
  font-size: 0.92rem;
  color: var(--text);
  font-weight: 500;
}

/* ============================================================
   KİŞİ LİSTESİ (Seçim için)
   ============================================================ */
.person-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.person-list-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  border: 1.5px solid transparent;
  transition: all 0.15s;
  background: var(--bg);
}

.person-list-item:hover  { background: var(--primary-pale); }

.person-list-item.selected {
  background: var(--primary-pale);
  border-color: var(--primary-light);
}

.list-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  flex-shrink: 0;
}

.list-info { flex: 1; min-width: 0; }

.list-name {
  font-size: 0.88rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.list-meta {
  font-size: 0.74rem;
  color: var(--text-mid);
}

.list-check {
  color: var(--success);
  font-size: 1.1rem;
  flex-shrink: 0;
  opacity: 0;
  transition: opacity 0.15s;
}

.person-list-item.selected .list-check { opacity: 1; }

/* ============================================================
   ALERT / UYARI KUTUSU
   ============================================================ */
.alert {
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  font-weight: 500;
  margin-bottom: 16px;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  line-height: 1.5;
}

.alert-icon { flex-shrink: 0; font-size: 1rem; margin-top: 1px; }

.alert-success { background: var(--success-pale); color: #15803D; border: 1px solid #A7F3D0; }
.alert-error   { background: var(--danger-pale);  color: #B91C1C; border: 1px solid #FCA5A5; }
.alert-info    { background: var(--info-pale);    color: #1D4ED8; border: 1px solid #BFDBFE; }
.alert-warning { background: var(--primary-pale); color: var(--primary); border: 1px solid #FDE68A; }

/* ============================================================
   TOAST BİLDİRİMİ
   ============================================================ */
.toast {
  position: fixed;
  top: calc(var(--header-height) + 12px);
  left: 50%;
  transform: translateX(-50%);
  background: var(--text);
  color: white;
  padding: 10px 20px;
  border-radius: var(--radius);
  font-size: 0.875rem;
  font-weight: 500;
  z-index: 500;
  box-shadow: var(--shadow-lg);
  white-space: nowrap;
  animation: toastIn 0.25s ease;
  pointer-events: none;
}

.toast.success { background: var(--success); }
.toast.error   { background: var(--danger); }

@keyframes toastIn {
  from { opacity: 0; transform: translateX(-50%) translateY(-8px); }
  to   { opacity: 1; transform: translateX(-50%) translateY(0); }
}

/* ============================================================
   MODAL (Alt sayfadan açılan)
   ============================================================ */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.45);
  z-index: 200;
  display: flex;
  align-items: flex-end;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
}
.modal-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

.modal {
  background: var(--surface);
  border-radius: var(--radius) var(--radius) 0 0;
  width: 100%;
  max-height: 85vh;
  overflow-y: auto;
  padding: 8px 16px 20px;
  transform: translateY(100%);
  transition: transform 0.3s cubic-bezier(0.4,0,0.2,1);
  -webkit-overflow-scrolling: touch;
}
.modal-overlay.open .modal { transform: translateY(0); }

.modal-handle {
  width: 36px;
  height: 4px;
  background: var(--border-dark);
  border-radius: 2px;
  margin: 10px auto 18px;
}

.modal-title {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 14px;
  color: var(--text);
}

/* ============================================================
   İSTATİSTİK KARTLARI
   ============================================================ */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-bottom: 16px;
}

.stat-card {
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 16px;
  text-align: center;
}

.stat-value {
  font-size: 2rem;
  font-weight: 800;
  color: var(--primary);
  line-height: 1;
  margin-bottom: 4px;
}

.stat-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* ============================================================
   BOŞ DURUM (Empty State)
   ============================================================ */
.empty-state {
  text-align: center;
  padding: 48px 20px;
  color: var(--text-muted);
}

.empty-state-icon { font-size: 3rem; margin-bottom: 14px; }

.empty-state-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-mid);
  margin-bottom: 8px;
}

.empty-state-desc {
  font-size: 0.88rem;
  line-height: 1.6;
  margin-bottom: 20px;
}

/* ============================================================
   YÜKLENİYOR (Loading)
   ============================================================ */
.loading-wrap {
  text-align: center;
  padding: 48px 20px;
  color: var(--text-muted);
}

.spinner {
  width: 34px;
  height: 34px;
  border: 3px solid var(--border);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  margin: 0 auto 14px;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* ============================================================
   FOT0ĞRAF YÜKLEME
   ============================================================ */
.photo-upload {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 20px;
  border: 2px dashed var(--border-dark);
  border-radius: var(--radius);
  cursor: pointer;
  transition: all 0.15s;
  background: var(--bg);
  text-align: center;
}
.photo-upload:hover { border-color: var(--primary-light); background: var(--primary-pale); }
.photo-upload input { display: none; }
.photo-upload-icon  { font-size: 2rem; }
.photo-upload-text  { font-size: 0.85rem; color: var(--text-mid); }
.photo-preview-wrap { position: relative; display: inline-block; }
.photo-preview {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--border);
}
.photo-remove {
  position: absolute;
  top: -4px;
  right: -4px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--danger);
  color: white;
  border: none;
  cursor: pointer;
  font-size: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ============================================================
   ÇOKLU EŞ SATIRI
   ============================================================ */
.spouse-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}
.spouse-row .form-input {
  flex: 1;
  margin-bottom: 0;
}
.btn-spouse-remove {
  flex: 0 0 auto;
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  background: var(--danger-light, #fee2e2);
  color: var(--danger);
  border: none;
  cursor: pointer;
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s;
}
.btn-spouse-remove:hover { background: var(--danger); color: white; }

/* ============================================================
   ADMIN LİSTELERİ
   ============================================================ */
.admin-list-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  background: var(--surface);
  border-radius: var(--radius-sm);
  margin-bottom: 6px;
  box-shadow: var(--shadow);
}

.admin-list-actions { display: flex; gap: 6px; margin-left: auto; }

/* ============================================================
   ANİMASYONLAR
   ============================================================ */
.fade-in  { animation: fadeIn 0.25s ease; }
.slide-up { animation: slideUp 0.25s ease; }

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes slideUp {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (min-width: 640px) {
  .stats-grid { grid-template-columns: repeat(4, 1fr); }
  .form-row   { grid-template-columns: 1fr 1fr; }
  .main-wrap  { padding: 20px; }
  .hero-avatar { width: 96px; height: 96px; font-size: 3rem; }
}

@media (max-width: 360px) {
  .btn    { padding: 8px 14px; font-size: 0.85rem; }
  .nav-item { padding: 6px 12px; }
}

/* ============================================================
   GİRİŞ EKRANI (Kod girişi)
   ============================================================ */
.code-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: linear-gradient(160deg, var(--primary) 0%, var(--primary-light) 100%);
}

.code-card {
  background: white;
  border-radius: 20px;
  padding: 32px 24px;
  width: 100%;
  max-width: 380px;
  box-shadow: var(--shadow-lg);
  text-align: center;
}

.code-logo { font-size: 3.5rem; margin-bottom: 12px; }

.code-title {
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 6px;
}

.code-subtitle {
  font-size: 0.88rem;
  color: var(--text-muted);
  margin-bottom: 28px;
  line-height: 1.5;
}

.code-input {
  letter-spacing: 0.2em;
  font-size: 1.2rem;
  font-weight: 700;
  text-align: center;
  text-transform: uppercase;
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px;
  width: 100%;
  outline: none;
  transition: border-color 0.15s;
  color: var(--primary);
}
.code-input:focus { border-color: var(--primary-light); }
