:root {
  --zemin: #f4f6f9;
  --kart: #ffffff;
  --metin: #1f2933;
  --soluk: #616e7c;
  --cizgi: #d3d9e0;
  --vurgu: #1565c0;
  --vurgu-koyu: #0d47a1;
  --tehlike: #c62828;
  --basari: #2e7d32;
  --uyari: #b26a00;
  --golge: 0 1px 3px rgba(15, 30, 50, .08), 0 4px 12px rgba(15, 30, 50, .05);
  --yaricap: 8px;
}

* { box-sizing: border-box; }
html { font-size: 16px; }
body {
  margin: 0;
  font-family: "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
  color: var(--metin);
  background: var(--zemin);
  line-height: 1.45;
}
a { color: var(--vurgu); }
h1 { font-size: 1.5rem; margin: 0 0 1rem; }
small { font-size: .82em; }

/* ---------- üst menü ---------- */
.ust {
  display: flex; align-items: center; gap: 1.5rem; flex-wrap: wrap;
  padding: .6rem 1.25rem; background: var(--vurgu-koyu); color: #fff;
}
.ust a { color: #fff; text-decoration: none; }
.logo { font-weight: 700; font-size: 1.15rem; letter-spacing: .02em; }
.logo span { font-weight: 400; opacity: .85; }
.menu { display: flex; gap: 1rem; flex-wrap: wrap; }
.menu a { padding: .25rem .1rem; border-bottom: 2px solid transparent; }
.menu a:hover { border-bottom-color: rgba(255, 255, 255, .7); }
.kullanici { margin-left: auto; display: flex; align-items: center; gap: .9rem; font-size: .92rem; }
.kullanici form { margin: 0; }
.kullanici-ad small { opacity: .75; }
.baglanti {
  background: none; border: 0; padding: 0; color: #fff; font: inherit; cursor: pointer; text-decoration: underline;
}

main.sayfa { max-width: 1280px; margin: 0 auto; padding: 1.25rem 1.25rem 6rem; }

/* ---------- mesajlar ---------- */
.mesaj {
  padding: .75rem 1rem; border-radius: var(--yaricap); margin-bottom: 1rem;
  border: 1px solid; background: #fff;
}
.mesaj ul { margin: .35rem 0 .35rem 1.2rem; padding: 0; }
.mesaj-basari { border-color: #a5d6a7; background: #edf7ee; color: #1b5e20; }
.mesaj-hata { border-color: #ef9a9a; background: #fdecea; color: #8e1c1c; }
.mesaj-uyari { border-color: #ffcc80; background: #fff4e5; color: #6d4100; }
.mesaj-bilgi { border-color: #90caf9; background: #e8f1fb; color: #0d3c78; }

/* ---------- form elemanları ---------- */
input, select, textarea {
  font: inherit; color: inherit; background: #fff;
  border: 1px solid var(--cizgi); border-radius: 6px; padding: .45rem .6rem; width: 100%;
}
input:focus, select:focus, textarea:focus {
  outline: 2px solid rgba(21, 101, 192, .35); outline-offset: 0; border-color: var(--vurgu);
}
textarea { resize: vertical; min-height: 4.5rem; }
input[type="checkbox"] { width: auto; }
.kisa { width: 5.5rem; }
.orta-gen { width: 7rem; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .35rem;
  padding: .5rem 1rem; border-radius: 6px; border: 1px solid var(--cizgi);
  background: #fff; color: var(--metin); font: inherit; text-decoration: none; cursor: pointer; white-space: nowrap;
}
.btn:hover { background: #eef2f6; }
.btn.birincil { background: var(--vurgu); border-color: var(--vurgu); color: #fff; font-weight: 600; }
.btn.birincil:hover { background: var(--vurgu-koyu); }
.btn.tehlike { color: var(--tehlike); border-color: #ef9a9a; }
.btn.tehlike:hover { background: #fdecea; }
.btn.genis { width: 100%; }
.ipucu { color: var(--soluk); font-size: .88rem; }

/* ---------- giriş ---------- */
main.giris-sayfasi { min-height: 100vh; display: grid; place-items: center; padding: 1rem; }
.giris-kutusu {
  width: min(380px, 100%); background: var(--kart); padding: 2rem; border-radius: 12px; box-shadow: var(--golge);
  display: grid; gap: .5rem;
}
.giris-kutusu h1 { text-align: center; color: var(--vurgu-koyu); margin-bottom: 1rem; }
.giris-kutusu h1 span { font-weight: 400; font-size: 1.1rem; color: var(--soluk); }
.giris-kutusu button { margin-top: 1rem; }

/* ---------- arama ve listeler ---------- */
.arama-kutusu { background: var(--kart); border-radius: var(--yaricap); box-shadow: var(--golge); padding: 1rem; margin-bottom: 1rem; }
#arama-formu { display: grid; grid-template-columns: 2fr 1.2fr auto; gap: 1rem; align-items: end; }
#arama-formu label { display: grid; gap: .3rem; font-weight: 600; font-size: .92rem; }
.arama-dugmeler { display: flex; gap: .5rem; flex-wrap: wrap; }

.tablo-kap { overflow-x: auto; background: var(--kart); border-radius: var(--yaricap); box-shadow: var(--golge); }
table { border-collapse: collapse; width: 100%; }
.liste th, .liste td { padding: .6rem .8rem; text-align: left; border-bottom: 1px solid #edf0f3; }
.liste thead th { background: #f0f3f7; font-size: .85rem; text-transform: uppercase; letter-spacing: .03em; color: #3e4c59; }
.liste tbody tr:nth-child(even) { background: #fafbfc; }
.liste tr.tiklanir { cursor: pointer; }
.liste tr.tiklanir:hover { background: #e8f1fb; }
.liste a { font-weight: 600; text-decoration: none; }
.orta { text-align: center !important; }
.tel { white-space: nowrap; font-variant-numeric: tabular-nums; }
.kisalt { max-width: 22rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bos { text-align: center !important; color: var(--soluk); padding: 2rem !important; }
.sayac { color: var(--soluk); font-size: .9rem; }
tr.pasif { color: var(--soluk); }
tr.uyari-satir { background: #fff4e5 !important; }

.baslik-satiri { display: flex; justify-content: space-between; align-items: center; gap: 1rem; margin-bottom: 1rem; }
.baslik-satiri h1 { margin: 0; }

.dar-form {
  max-width: 460px; display: grid; gap: .45rem; background: var(--kart); padding: 1.5rem;
  border-radius: var(--yaricap); box-shadow: var(--golge);
}
.dar-form .ipucu { margin: 0 0 .4rem; }
.dar-form .dugmeler { display: flex; justify-content: flex-end; gap: .5rem; margin-top: .8rem; }
.onay { display: inline-flex; align-items: center; gap: .45rem; cursor: pointer; }

/* ---------- kart ---------- */
.kart-baslik { text-align: center; margin-bottom: 1rem; }
.kart-baslik h1 { margin: 0; letter-spacing: .03em; }
.kart-baslik .meta { margin: .3rem 0 0; color: var(--soluk); font-size: .88rem; }

.sekmeler { display: flex; gap: .25rem; border-bottom: 2px solid var(--cizgi); }
.sekme {
  border: 1px solid var(--cizgi); border-bottom: 0; background: #e9edf2; border-radius: 8px 8px 0 0;
  padding: .6rem 1.2rem; font: inherit; cursor: pointer; color: var(--soluk); margin-bottom: -2px;
}
.sekme.aktif { background: var(--kart); color: var(--metin); font-weight: 600; border-bottom: 2px solid var(--kart); }
.sekme-icerik {
  background: var(--kart); padding: 1.25rem; border-radius: 0 0 var(--yaricap) var(--yaricap); box-shadow: var(--golge);
}
html.js .sekme-icerik:not(.aktif) { display: none; }

.izgara {
  display: grid; grid-template-columns: max-content 1fr max-content minmax(12rem, 20rem);
  gap: .6rem 1rem; align-items: center;
}
.izgara > label { font-weight: 700; font-size: .92rem; }
.izgara .tam { grid-column: 2 / -1; }
.yan-yana { display: flex; align-items: center; gap: .6rem; white-space: nowrap; }

.tedaviler {
  margin: 1.2rem 0 .4rem; border: 1px solid var(--cizgi); border-radius: var(--yaricap); padding: .6rem 1rem 1rem;
  display: grid; grid-template-columns: repeat(auto-fill, minmax(14rem, 1fr)); gap: .5rem 1rem;
}
.tedaviler legend { padding: 0 .4rem; color: var(--soluk); }
.blok-etiket { display: block; font-weight: 700; font-size: .92rem; margin: 1rem 0 .35rem; }

.seans-ust { display: flex; justify-content: space-between; align-items: center; margin-bottom: .8rem; gap: 1rem; }
.seans-ust label { font-weight: 700; display: flex; align-items: center; gap: .5rem; }
.seans-tablosu th, .seans-tablosu td { padding: .3rem; }
.seans-tablosu thead th { font-size: .85rem; color: #3e4c59; text-align: center; }
.seans-tablosu .seans-no { white-space: nowrap; text-align: left; padding-right: .6rem; font-size: .92rem; }
.seans-tablosu input[type="date"] { width: 10.5rem; }
.seans-tablosu select { width: 4.5rem; }
.seans-tablosu .notlar { min-width: 16rem; }
.seans-tablosu td:last-child { width: 100%; }
.sekme-icerik .tablo-kap { box-shadow: none; }

.alt-cubuk {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 10;
  display: flex; align-items: center; gap: .6rem; padding: .7rem 1.25rem;
  background: rgba(255, 255, 255, .96); border-top: 1px solid var(--cizgi); box-shadow: 0 -2px 10px rgba(15, 30, 50, .06);
}
.alt-cubuk .bosluk { flex: 1; }

.hata-kutusu { text-align: center; padding: 3rem 1rem; }
.hata-kod { font-size: 3.5rem; font-weight: 700; color: var(--cizgi); margin: 0; }

/* ---------- dar ekranlar (tablet / telefon) ---------- */
@media (max-width: 860px) {
  #arama-formu { grid-template-columns: 1fr; }
  .izgara { grid-template-columns: 1fr; gap: .25rem; }
  .izgara > label { margin-top: .5rem; }
  .izgara .tam { grid-column: auto; }
  .kullanici { margin-left: 0; }
  .sekme { padding: .5rem .7rem; font-size: .92rem; }
}
