:root {
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --success: #16a34a;
  --warning: #d97706;
  --danger: #dc2626;
  --bg: #f1f5f9;
  --card: #ffffff;
  --text: #1e293b;
  --muted: #64748b;
  --border: #e2e8f0;
  --radius: 10px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 15px;
  padding-bottom: 70px; /* bottom nav için */
}

a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ── Top bar ─────────────────────────────────── */
.topbar {
  background: var(--primary);
  color: #fff;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 8px rgba(0,0,0,.2);
}
.topbar .title { font-weight: 700; font-size: 16px; }
.topbar .user-info { font-size: 12px; opacity: .85; text-align: right; }

/* ── Bottom nav ──────────────────────────────── */
.bottom-nav {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  background: #fff;
  border-top: 1px solid var(--border);
  display: flex;
  z-index: 100;
  box-shadow: 0 -2px 8px rgba(0,0,0,.08);
}
.bottom-nav a {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 8px 4px;
  font-size: 11px;
  color: var(--muted);
  text-decoration: none;
  gap: 2px;
}
.bottom-nav a.active, .bottom-nav a:hover { color: var(--primary); }
.bottom-nav .icon { font-size: 20px; }

/* ── Container ───────────────────────────────── */
.container { max-width: 700px; margin: 0 auto; padding: 12px 12px; }

/* ── Card ────────────────────────────────────── */
.card {
  background: var(--card);
  border-radius: var(--radius);
  padding: 14px;
  margin-bottom: 12px;
  box-shadow: 0 1px 3px rgba(0,0,0,.07);
  border: 1px solid var(--border);
}

/* ── Flash mesajı ────────────────────────────── */
.flash {
  background: #dcfce7;
  color: #166534;
  border: 1px solid #86efac;
  border-radius: var(--radius);
  padding: 10px 14px;
  margin-bottom: 12px;
  font-size: 14px;
}
.flash.hata { background: #fee2e2; color: #991b1b; border-color: #fca5a5; }

/* ── Durum rozetleri ─────────────────────────── */
.rozet {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
}
.rozet-gri     { background: #f1f5f9; color: #475569; }
.rozet-yesil   { background: #dcfce7; color: #166534; }
.rozet-turuncu { background: #fef3c7; color: #92400e; }
.rozet-mavi    { background: #dbeafe; color: #1e40af; }
.rozet-kirmizi { background: #fee2e2; color: #991b1b; }

/* ── Talebe listesi ──────────────────────────── */
.talebe-kart {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  background: var(--card);
  border-radius: var(--radius);
  margin-bottom: 8px;
  box-shadow: 0 1px 3px rgba(0,0,0,.07);
  border: 1px solid var(--border);
  text-decoration: none;
  color: var(--text);
}
.talebe-kart:hover { border-color: var(--primary); text-decoration: none; }
.talebe-avatar {
  width: 46px; height: 46px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--border);
  flex-shrink: 0;
}
.talebe-avatar-placeholder {
  width: 46px; height: 46px;
  border-radius: 50%;
  background: #dbeafe;
  color: var(--primary);
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; font-weight: 700;
  flex-shrink: 0;
}
.talebe-info { flex: 1; min-width: 0; }
.talebe-adi { font-weight: 600; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.talebe-meta { font-size: 12px; color: var(--muted); margin-top: 2px; }

/* ── Arama/filtre ────────────────────────────── */
.filtre-bar {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}
.filtre-bar input, .filtre-bar select {
  flex: 1;
  min-width: 120px;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 14px;
  background: #fff;
}

/* ── Tabs ────────────────────────────────────── */
.tabs {
  display: flex;
  overflow-x: auto;
  gap: 4px;
  margin-bottom: 14px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.tabs::-webkit-scrollbar { display: none; }
.tab-btn {
  white-space: nowrap;
  padding: 7px 14px;
  border-radius: 20px;
  border: 1px solid var(--border);
  background: #fff;
  font-size: 13px;
  cursor: pointer;
  color: var(--muted);
  text-decoration: none;
}
.tab-btn.aktif {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

/* ── Form ────────────────────────────────────── */
.form-group { margin-bottom: 14px; }
.form-label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 5px; color: var(--muted); }
.form-control {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 15px;
  background: #fff;
  color: var(--text);
  transition: border .15s;
}
.form-control:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px #dbeafe; }
textarea.form-control { resize: vertical; min-height: 80px; }
select.form-control { 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 fill='%2364748b' d='M6 8L1 3h10z'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; padding-right: 32px; }

.form-section-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--primary);
  padding: 10px 0 6px;
  border-bottom: 2px solid var(--primary);
  margin: 20px 0 14px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
@media (max-width: 400px) { .form-row { grid-template-columns: 1fr; } }

/* ── Butonlar ────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 18px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  text-decoration: none;
  transition: opacity .15s;
}
.btn:hover { opacity: .88; text-decoration: none; }
.btn-primary  { background: var(--primary); color: #fff; }
.btn-success  { background: var(--success); color: #fff; }
.btn-danger   { background: var(--danger);  color: #fff; }
.btn-outline  { background: transparent; color: var(--primary); border: 1.5px solid var(--primary); }
.btn-sm       { padding: 6px 12px; font-size: 13px; }
.btn-block    { width: 100%; justify-content: center; }

/* ── Sayfa başlığı ───────────────────────────── */
.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
  gap: 8px;
}
.page-header h1 { font-size: 18px; font-weight: 700; }

/* ── İstatistik kartları ─────────────────────── */
.istatistik-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-bottom: 14px;
}
.istat-kart {
  background: var(--card);
  border-radius: var(--radius);
  padding: 14px;
  text-align: center;
  border: 1px solid var(--border);
}
.istat-sayi { font-size: 28px; font-weight: 700; color: var(--primary); }
.istat-etiket { font-size: 12px; color: var(--muted); margin-top: 2px; }

/* ── Ziyaret kaydı listesi ───────────────────── */
.ziyaret-item {
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}
.ziyaret-item:last-child { border-bottom: none; }
.ziyaret-baslik { font-weight: 600; font-size: 14px; }
.ziyaret-meta { font-size: 12px; color: var(--muted); margin-top: 3px; }

/* ── Detay satırı ────────────────────────────── */
.detay-satir {
  display: flex;
  gap: 8px;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
  font-size: 14px;
}
.detay-satir:last-child { border-bottom: none; }
.detay-etiket { color: var(--muted); flex-shrink: 0; width: 140px; font-size: 13px; }
.detay-deger  { flex: 1; word-break: break-word; }

/* ── Talebe detay profil ─────────────────────── */
.profil-header {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  margin-bottom: 14px;
}
.profil-foto {
  width: 70px; height: 70px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  border: 3px solid var(--border);
}
.profil-foto-placeholder {
  width: 70px; height: 70px;
  border-radius: 50%;
  background: #dbeafe;
  color: var(--primary);
  display: flex; align-items: center; justify-content: center;
  font-size: 28px; font-weight: 700;
  flex-shrink: 0;
  border: 3px solid var(--border);
}
.profil-adi { font-size: 20px; font-weight: 700; }
.profil-alt { font-size: 13px; color: var(--muted); margin-top: 4px; }

/* ── Puan barı ───────────────────────────────── */
.puan-bar { display: flex; align-items: center; gap: 6px; }
.puan-bar .bar { flex: 1; height: 6px; background: var(--border); border-radius: 3px; }
.puan-bar .dolu { height: 100%; background: var(--primary); border-radius: 3px; }

/* ── Login ───────────────────────────────────── */
.login-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--primary);
  padding: 20px;
}
.login-card {
  background: #fff;
  border-radius: 16px;
  padding: 32px 28px;
  width: 100%;
  max-width: 360px;
  box-shadow: 0 8px 32px rgba(0,0,0,.18);
}
.login-logo { text-align: center; margin-bottom: 24px; }
.login-logo h1 { font-size: 22px; color: var(--primary); font-weight: 800; }
.login-logo p  { font-size: 13px; color: var(--muted); margin-top: 4px; }

/* ── Tablo ───────────────────────────────────── */
.tablo { width: 100%; border-collapse: collapse; font-size: 14px; }
.tablo th { background: var(--bg); padding: 8px 10px; text-align: left; font-size: 12px; color: var(--muted); font-weight: 600; border-bottom: 1px solid var(--border); }
.tablo td { padding: 10px; border-bottom: 1px solid var(--border); vertical-align: top; }
.tablo tr:last-child td { border-bottom: none; }
.tablo-wrap { overflow-x: auto; }

/* ── Ayraç ───────────────────────────────────── */
.ayrac { height: 1px; background: var(--border); margin: 16px 0; }
.mt-8  { margin-top: 8px; }
.mt-12 { margin-top: 12px; }
.text-muted { color: var(--muted); font-size: 13px; }
.text-center { text-align: center; }
