/* Varsayılan (Tema 1): siyah üst bant, sarı (#fac716, logo dosyasından ölçüldü) vurgu, siyah eylem rengi. */
:root {
  --zemin: #f5f5f3;
  --kart: #ffffff;
  --yazi: #111111;
  --soluk: #5b6577;
  --cizgi: #e2e7ef;
  --cerceve: #7a859a;  /* giriş kutusu kenarı: zemin ve beyaz üzerinde 3:1 üstü (WCAG 1.4.11) */
  --siyah: #000000;    /* adı tarihsel: üst bant, seçili seçenek, tost */
  --sari: #fac716;
  --yesil: #111111;    /* adı tarihsel: eylem rengi */
  --kirmizi: #b42318;
  --sicak: #9a3412;
  --ilik: #854d0e;
  --soguk: #1f2937;
  --golge: 0 1px 2px rgba(19, 35, 63, .06);
  /* Temalar bunları değiştirir (Ayarlar → Tema). */
  --bant-yazi: #fff;          /* üst bant ve koyu zeminli öğelerdeki yazı */
  --marka: var(--sari);       /* üst banttaki "emlakCRM" yazısı */
  --arti-yazi: var(--siyah);  /* sağ üstteki "+" düğmesinin işareti */
  --eylem-yazi: #fff;         /* dolu eylem düğmesindeki yazı */
  --buyuk-zemin: var(--sari); --buyuk-yazi: #000000;
  --secili: var(--siyah); --secili-yazi: #fff;
  --acik-kirmizi: #fde8e6; --acik-sari: #fff6c2; --acik-gri: #eef1f5; --acik-mavi: #e3eafb;
  --acik-turuncu: #fdebe4; --acik-ilik: #fdf3d7; --acik-uyari: #fde2e1;
}
/* Anahtarlar (tema3, tema4) değişmedi ki kayıtlı seçimler bozulmasın; ekranda Tema 2 ve Tema 3. */
/* Tema 2: kraliyet laciverti (#1e3a8a) bant ve eylem rengi, kırmızı ana düğme. */
:root[data-tema="tema3"] {
  --zemin: #ffffff; --yazi: #13233f; --siyah: #1e3a8a; --sari: #ff1200; --yesil: #1e3a8a; --marka: #ffffff; --arti-yazi: #ffffff;
  --buyuk-zemin: #ff1200; --buyuk-yazi: #ffffff; --soguk: #1e3a8a;
}
/* Tema 3: koyu gri bant (#252526, kaynak sitenin tema rengi), altın vurgu (ton doğrulanamadı). */
:root[data-tema="tema4"] {
  --zemin: #f6f4ef; --yazi: #252526; --siyah: #252526; --sari: #beaf87; --yesil: #252526;
  --buyuk-zemin: #beaf87; --buyuk-yazi: #252526; --soguk: #252526; --acik-sari: #f1ebdc;
}
/* Tema 4: siyah bant, kırmızı (#b40101) vurgu ve eylem rengi, gri tonlar; marka yazısı beyaz. */
:root[data-tema="tema6"] {
  --zemin: #f4f4f4; --yazi: #1a1a1a; --soluk: #5c5c5c; --cizgi: #e2e2e2; --cerceve: #858585;
  --siyah: #000000; --sari: #b40101; --yesil: #b40101; --marka: #ffffff; --arti-yazi: #ffffff;
  --buyuk-zemin: #b40101; --buyuk-yazi: #ffffff; --soguk: #1a1a1a; --kirmizi: #8a1c1c;
  --acik-sari: #f8e9e9; --golge: 0 1px 2px rgba(0, 0, 0, .07);
}
/* Koyu tema: gece ve düşük ışıkta göz yormasın. */
:root[data-tema="koyu"] {
  color-scheme: dark;
  --zemin: #0f1217; --kart: #1a1e25; --yazi: #e7eaf0; --soluk: #9aa4b5; --cizgi: #2b313b; --cerceve: #6b7586;
  --siyah: #05070a; --sari: #ffd100; --yesil: var(--sari); --eylem-yazi: #0f1217; --buyuk-yazi: #0f1217;
  --secili: var(--sari); --secili-yazi: #0f1217;  /* düğmeler ve seçili seçenekler tek sarı */
  --kirmizi: #ff8a80; --sicak: #fdba74; --ilik: #fcd34d; --soguk: #a5c0ff;
  --acik-kirmizi: #3b1f1f; --acik-sari: #39331a; --acik-gri: #262b33; --acik-mavi: #1e2a45;
  --acik-turuncu: #3a261b; --acik-ilik: #352e17; --acik-uyari: #3b1f1f;
  --golge: 0 1px 2px rgba(0, 0, 0, .4);
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--zemin); color: var(--yazi);
  font: 16px/1.45 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  padding-bottom: calc(16px + env(safe-area-inset-bottom));
}
body.menu-acik { overflow: hidden; }
a { color: inherit; }
.ust {
  position: sticky; top: 0; z-index: 2; display: flex; align-items: center; justify-content: space-between;
  background: var(--siyah); color: var(--bant-yazi); padding: calc(10px + env(safe-area-inset-top)) 16px 10px;
}
.marka { color: var(--marka); font-weight: 700; font-size: 18px; text-decoration: none; margin-right: auto; }
.menu-dugme {
  width: 44px; height: 44px; margin: 0 8px 0 -10px; padding: 0; border: 0; background: none; cursor: pointer;
  display: grid; place-items: center;
}
.menu-dugme span, .menu-dugme span::before, .menu-dugme span::after {
  display: block; width: 22px; height: 2px; background: var(--bant-yazi); border-radius: 1px; position: relative;
}
.menu-dugme span::before, .menu-dugme span::after { content: ""; position: absolute; left: 0; }
.menu-dugme span::before { top: -7px; }
.menu-dugme span::after { top: 7px; }
.geri-satir { position: relative; z-index: 1; max-width: 640px; height: 0; margin: 0 auto; }
.geri-satir[hidden] { display: none; }
/* Sayfa başlığıyla aynı hizada, sağda; başlık düğmenin altına girmez. */
body:has(.geri-satir:not([hidden])) main > h1:first-child { padding-right: 70px; }
.geri-dugme {
  position: absolute; top: 13px; right: 16px; width: 56px; height: 44px; padding: 0; display: grid; place-items: center;
  border: 1px solid var(--cizgi); border-radius: 8px; background: var(--kart); color: var(--yazi); cursor: pointer;
}
.ust-yeni {
  width: 44px; height: 44px; border-radius: 50%; background: var(--sari); color: var(--arti-yazi);
  display: grid; place-items: center; font-size: 26px; font-weight: 700; text-decoration: none;
}
main { max-width: 640px; margin: 0 auto; padding: 16px; }
.perde { position: fixed; inset: 0; z-index: 3; background: rgba(0, 0, 0, .45); opacity: 0; transition: opacity .2s; }
body.menu-acik .perde { opacity: 1; }
.yan-menu {
  position: fixed; top: 0; bottom: 0; left: 0; z-index: 4; width: min(80vw, 300px); overflow-y: auto;
  background: var(--kart); box-shadow: 2px 0 12px rgba(0, 0, 0, .2);
  padding-bottom: env(safe-area-inset-bottom); padding-left: env(safe-area-inset-left);
  transform: translateX(-100%); transition: transform .22s ease-out; visibility: hidden;
}
body.menu-acik .yan-menu { transform: none; visibility: visible; }
.yan-menu-bas {
  background: var(--siyah); color: var(--marka); font-weight: 700; font-size: 18px;
  padding: calc(18px + env(safe-area-inset-top)) 20px 18px; margin-bottom: 6px;
}
.yan-menu a {
  display: block; padding: 13px 20px; font-size: 16px; text-decoration: none; color: var(--yazi);
  border-left: 4px solid transparent;
}
.yan-menu a.secili { font-weight: 700; border-left-color: var(--sari); background: var(--zemin); }
.yan-menu hr { border: 0; border-top: 1px solid var(--cizgi); margin: 6px 20px; }
.gun-serit { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; margin: 4px 0 8px; }
.serit-gun { display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 44px; padding: 6px 0;
  border: 1px solid var(--cerceve); border-radius: 10px; background: var(--kart); color: var(--soluk); font: inherit; font-size: 12px; cursor: pointer; }
.serit-gun b { font-size: 18px; color: var(--yazi); }
.serit-gun[aria-pressed=true] { border: 2px solid var(--yesil); }
.serit-gun.yogun b { color: var(--kirmizi); }
.geciken-satir { display: block; width: 100%; min-height: 44px; margin: 4px 0 12px; padding: 10px 12px; text-align: left; font: inherit; font-weight: 600;
  color: var(--kirmizi); background: var(--acik-kirmizi); border: 0; border-left: 4px solid var(--kirmizi); cursor: pointer; }
.sonraki-tarih { margin: 10px 0 4px; }
.yan-menu-grup { padding: 8px 24px 4px; font-size: 12px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--soluk); }
@media (prefers-reduced-motion: reduce) { .yan-menu, .perde { transition: none; } }

h1 { font-size: 20px; margin: 4px 0 12px; }
h2 { font-size: 15px; margin: 22px 0 8px; color: var(--soluk); text-transform: uppercase; letter-spacing: .04em; }
.bos { color: var(--soluk); margin: 4px 0 12px; }
.kart {
  display: block; background: var(--kart); border: 1px solid var(--cizgi); border-radius: 12px;
  padding: 12px 14px; margin-bottom: 8px; text-decoration: none; box-shadow: var(--golge);
}
button.kart { width: 100%; text-align: left; font: inherit; color: inherit; cursor: pointer; }
button.kart[aria-pressed=true] { border-color: var(--yesil); box-shadow: 0 0 0 2px var(--yesil); }
.kart.gecikti { border-left: 4px solid var(--kirmizi); }
.satir { display: flex; justify-content: space-between; gap: 8px; align-items: baseline; }
.ad { font-weight: 600; }
.kucuk { font-size: 13px; color: var(--soluk); }
.not { margin-top: 4px; white-space: pre-wrap; overflow-wrap: anywhere; }
/* Dolu, açık zeminli etiket; yazı aynı renk ailesinin koyu tonu. */
.etiket { font-size: 12px; font-weight: 600; padding: 2px 9px; border-radius: 99px; border: 0; background: var(--acik-gri); white-space: nowrap; }
.etiket.sicak { color: var(--sicak); background: var(--acik-turuncu); } .etiket.ilik { color: var(--ilik); background: var(--acik-ilik); }
.etiket.soguk { color: var(--soguk); background: var(--acik-mavi); }
.etiket.kirmizi { color: var(--kirmizi); background: var(--acik-kirmizi); } .etiket.gri { color: var(--soluk); background: var(--acik-gri); }
.buyuk-dugme {
  display: block; width: 100%; text-align: center; padding: 16px; border-radius: 12px; border: 0;
  background: var(--buyuk-zemin); color: var(--buyuk-yazi); font: inherit; font-size: 18px; font-weight: 700; text-decoration: none;
}
.dugme {
  display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 0 16px;
  border-radius: 10px; border: 1px solid var(--yesil); background: transparent; color: var(--yesil);
  font: inherit; font-weight: 600; text-decoration: none; cursor: pointer;
}
.dugme.dolu { background: var(--yesil); color: var(--eylem-yazi); }
.dugmeler { display: flex; gap: 8px; flex-wrap: wrap; margin: 8px 0 12px; }
.dugmeler .dugme { flex: 1; }
.rehber-dugme { margin-top: 8px; }
/* Dar ekranda üç düğme tek satıra sığsın, yazılar ikiye bölünmesin. */
.dugmeler.sikisik .dugme { padding: 0 8px; white-space: nowrap; }
button:disabled { opacity: .5; }

label { display: block; font-weight: 600; margin: 14px 0 6px; }
input[type=text], input[type=password], input[type=tel], input[type=email], input[type=search], input[type=date], input[type=time], input[type=month], textarea, select {
  width: 100%; font: inherit; font-size: 16px; padding: 12px; border: 1px solid var(--cerceve);
  border-radius: 10px; background: var(--kart); color: var(--yazi);
}
textarea { min-height: 84px; resize: vertical; }
/* Açılır menüler diğer kutularla aynı görünsün: Mac Safari aksi hâlde ince, köşeli yerel menü çizer. Ok işareti arka planda. */
select {
  -webkit-appearance: none; appearance: none; min-height: 48px; padding-right: 40px; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='9' viewBox='0 0 14 9'%3E%3Cpath d='M1 1.5l6 6 6-6' fill='none' stroke='%23868680' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 14px center;
}
select:disabled { opacity: .6; cursor: default; }
.secenekler { display: flex; gap: 6px; flex-wrap: wrap; }
.secenek {
  min-height: 44px; padding: 0 14px; border-radius: 99px; border: 1px solid var(--cizgi); background: var(--kart);
  font: inherit; font-size: 15px; color: var(--yazi); cursor: pointer;
}
.tema-ornek { display: inline-block; width: 18px; height: 18px; margin-right: 8px; border-radius: 50%; border: 1px solid var(--cizgi); vertical-align: -4px; }
.secenek[aria-pressed=true] { background: var(--secili); color: var(--secili-yazi); border-color: var(--secili); }
.portfoy-liste { max-height: 260px; overflow-y: auto; border: 1px solid var(--cerceve); border-radius: 10px; background: var(--kart); margin-top: 6px; }
.portfoy-liste button {
  display: block; width: 100%; text-align: left; padding: 12px; border: 0; border-bottom: 1px solid var(--cizgi);
  background: none; font: inherit; color: var(--yazi); cursor: pointer;
}
.portfoy-liste button[aria-selected=true] { background: var(--acik-sari); font-weight: 600; }
.portfoy-liste .grup { padding: 6px 12px; font-size: 12px; color: var(--soluk); background: var(--zemin); }
.bilgi { background: var(--acik-sari); border-radius: 10px; padding: 10px 12px; margin-top: 8px; font-size: 14px; }
.hata { background: var(--acik-kirmizi); color: var(--kirmizi); border-radius: 10px; padding: 10px 12px; margin: 12px 0; }
.sayi { font-weight: 700; font-size: 18px; min-width: 2ch; text-align: right; }
.alt-baglanti { display: flex; align-items: center; justify-content: center; min-height: 44px; text-align: center; margin: 24px 0 8px; color: var(--yesil); }
button.alt-baglanti { border: 0; background: none; width: 100%; font: inherit; cursor: pointer; }
/* Küçük metin bağlantısı: görünüm aynı, dokunma alanı dikeyde ~44 pt. */
.genis-dokun { display: inline-block; padding: 12px 0; margin: -12px 0; }
.iki-sutun { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.saat { font-weight: 700; font-variant-numeric: tabular-nums; }
.saat.buyuk { font-size: 17px; }
/* Soluk kart: saydamlık yerine gri yazı ve kesik kenar; içindeki etiketler kontrastını korur. */
.kart.soluk { color: var(--soluk); border-style: dashed; }
.dugme.tehlike { border-color: var(--kirmizi); color: var(--kirmizi); }
.soru { background: var(--acik-sari); border-radius: 10px; padding: 10px 12px; margin: 8px 0 12px; }
.soru p { margin: 0 0 8px; font-weight: 600; }
.soru-dugmeler { display: flex; gap: 8px; }
.soru-dugmeler .dugme { flex: 1; }
.iki-sutun input { min-width: 0; }
.onay-hata { color: var(--kirmizi); }
.onay-govde { display: block; width: 100%; height: 60vh; border: 1px solid var(--cizgi); border-radius: 10px; background: #fff; margin: 8px 0; }
.duz-metin { white-space: pre-wrap; overflow-wrap: anywhere; }
.ozel { background: var(--kart); border: 1px solid var(--cizgi); border-radius: 10px; padding: 10px 14px; margin: 12px 0; }
.ozel summary { font-weight: 600; cursor: pointer; min-height: 24px; }
.kaynaklar { padding-left: 20px; overflow-wrap: anywhere; }
.onay-oran { font-size: 18px; font-weight: 700; margin: 16px 0 4px; }
.etiket.uygun { color: var(--soguk); background: var(--acik-mavi); } .etiket.yakin { color: var(--ilik); background: var(--acik-ilik); }
.etiket.belirsiz { color: var(--sicak); background: var(--acik-turuncu); }
.eslesme { border-top: 1px solid var(--cizgi); margin-top: 10px; padding-top: 10px; }
.eslesme .satir { flex-wrap: wrap; }
.eslesme .satir > a { overflow-wrap: anywhere; min-width: 0; }
.eslesme .dugmeler { margin: 8px 0 0; }
.eslesme .dugme { min-width: 0; padding: 0 8px; font-size: 14px; }
.dugme[aria-pressed=true] { background: var(--yesil); color: var(--eylem-yazi); }
.etiketler { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; }
.talep-gecmis { margin-top: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; }
/* Yeni talepten sonra kişi kartında talebe kaydırılır; üst çubuk başlığını örtmesin. */
.kart.talep { scroll-margin-top: calc(76px + env(safe-area-inset-top)); }
.talep .bos { margin: 10px 0 0; }
.talep .dugmeler .dugme { padding: 0 6px; font-size: 14px; white-space: nowrap; }
input[inputmode=numeric] { font-variant-numeric: tabular-nums; }
.kart-ic { display: block; text-decoration: none; }
.hizli { display: flex; gap: 8px; margin-top: 10px; }
.hizli .dugme { flex: 1; }
a.secenek { display: inline-flex; align-items: center; text-decoration: none; }
.portfoy-fiyat { font-size: 18px; font-weight: 700; margin-top: 6px; font-variant-numeric: tabular-nums; }
.satir > .dugme { flex-shrink: 0; }
.sablon textarea { margin-top: 8px; font-size: 15px; }
.degiskenler { margin: 6px 0 8px; }
.degiskenler .secenek { font-size: 13px; padding: 4px 8px; min-height: 32px; }
.onizleme { background: var(--zemin); border-radius: 8px; padding: 8px 10px; font-size: 14px; margin-top: 2px; }
[hidden] { display: none !important; }
.ay-secici { display: flex; gap: 8px; align-items: center; margin: 4px 0 8px; }
.ay-secici input { flex: 1; text-align: center; }
.ay-secici .dugme { flex: 0 0 48px; padding: 0; font-size: 22px; }
.dugme.pasif { opacity: .35; }
.aylik .ad { margin-bottom: 4px; }
.aylik-satir { display: flex; justify-content: space-between; gap: 12px; padding: 5px 0; border-top: 1px solid var(--cizgi); }
.aylik-satir:first-of-type { border-top: 0; }
.aylik-sayi { font-weight: 700; font-variant-numeric: tabular-nums; }
.aylik-liste { margin: 4px 0 0; padding-left: 20px; overflow-wrap: anywhere; }
.serit { background: var(--acik-sari); color: var(--yazi); font-size: 14px; padding: 8px 16px; text-align: center; }
#surum-serit .dugme { min-height: 36px; margin-left: 8px; padding: 0 12px; }
.serit.uyari { background: var(--acik-uyari); }
.serit a { text-decoration: none; font-weight: 600; }

/* Arama kutusu: solda büyüteç. */
input[type=search] {
  padding-left: 42px;
  background: var(--kart) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%235b6577' stroke-width='2.2' stroke-linecap='round'%3E%3Ccircle cx='10.5' cy='10.5' r='6.5'/%3E%3Cpath d='M15.5 15.5 21 21'/%3E%3C/svg%3E") no-repeat 14px center;
}

/* Ana sayfa (A): selamlama, özet kutuları, alt başlıklar. */
h1.selam { margin-bottom: 2px; }
.selam-tarih { margin-bottom: 14px; }
.ozet-izgara { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 14px; }
.ozet-kutu {
  display: flex; flex-direction: column; gap: 2px; padding: 12px 14px; border: 1px solid var(--cizgi); border-radius: 12px;
  background: var(--kart); color: var(--yazi); text-decoration: none; box-shadow: var(--golge);
}
.ozet-kutu .ozet-sayi { color: var(--yesil); }
.ozet-sayi { font-size: 28px; font-weight: 700; line-height: 1.1; }
.ozet-ad { font-size: 14px; color: var(--soluk); }
.ozet-kutu.sifir .ozet-sayi { color: var(--soluk); }
/* Kayıt sonrası kısa onay (tost). */
.tost {
  position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom)); transform: translateX(-50%); z-index: 5;
  background: var(--secili); color: var(--secili-yazi); padding: 12px 20px; border-radius: 99px; font-weight: 600; font-size: 15px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, .25); white-space: nowrap;
}
h3.alt-baslik { font-size: 14px; color: var(--soluk); font-weight: 600; margin: 14px 0 6px; }
/* Ekranda görünmez, ekran okuyucu okur (ör. Geri dönüşler'de seçilen günün duyurusu). */
.gizli-okuyucu { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* emlakCRM: hazırlayan ibaresi, kurulum sayfası, yedek hatırlatması */
.hazirlayan { text-align: center; font-size: 13px; color: var(--soluk, #777); margin: 28px 0 12px; }
.kurulum { text-align: left; }
.kurulum-simge { display: block; margin: 8px auto 4px; border-radius: 16px; }
.kurulum h1 { text-align: center; }
.kurulum-baslik { margin-top: 18px; }
.kurulum-adim h2 { margin: 0 0 6px; }
.kurulum-adim ol { margin: 0; padding-left: 22px; line-height: 1.6; }
.kurulum-adim .simge { vertical-align: middle; margin-left: 4px; }
body.kurulum-modu .menu-dugme, body.kurulum-modu .ust-yeni, body.kurulum-modu .geri-satir { visibility: hidden; }
.yedek-uyari { margin: 10px 0; }
.yedek-not { margin: 6px 0 10px; }
