:root {
  --navy: #0B3C5D; --navy-2: #134e78; --orange: #F28C28; --bg: #f3f5f8; --card: #fff;
  --text: #1c2733; --muted: #6b7785; --line: #e1e6ec; --green: #1f9d55; --red: #d64545; --yellow: #d99a06;
  --radius: 12px;
}
* { box-sizing: border-box; }
body { margin: 0; font: 14px/1.45 "Segoe UI", system-ui, sans-serif; background: var(--bg); color: var(--text); }
a { color: var(--navy-2); }
header { position: sticky; top: 0; z-index: 10; display: flex; align-items: center; gap: 24px; padding: 10px 24px;
  background: var(--navy); color: #fff; box-shadow: 0 2px 8px rgba(0,0,0,.15); }
.brand { display: flex; gap: 10px; align-items: center; }
.brand small { display: block; opacity: .7; font-size: 11px; }
.logo-mark { width: 36px; height: 36px; border-radius: 9px; background: var(--orange); display: grid; place-items: center; font-weight: 800; font-size: 20px; }
nav { display: flex; gap: 4px; flex: 1; flex-wrap: wrap; }
nav button { background: transparent; color: #cfe0ee; border: 0; padding: 9px 14px; border-radius: 8px; font-size: 14px; cursor: pointer; }
nav button:hover { background: rgba(255,255,255,.08); color: #fff; }
nav button.active { background: #fff; color: var(--navy); font-weight: 600; }
.count { background: var(--orange); color: #fff; border-radius: 10px; padding: 0 7px; font-size: 11px; margin-left: 4px; }
.count:empty { display: none; }
main { max-width: 1200px; margin: 0 auto; padding: 20px 24px 80px; }
.hidden { display: none !important; }
.panel { background: var(--card); border-radius: var(--radius); padding: 16px 18px; margin-bottom: 16px; box-shadow: 0 1px 3px rgba(0,0,0,.06); }
.panel h2 { margin: 0 0 10px; font-size: 16px; }
.panel h2 small { font-weight: 400; color: var(--muted); }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.muted { color: var(--muted); }
.row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.row > * { flex: 1 1 140px; }
.row > button { flex: 0 0 auto; }
input, select, textarea { font: inherit; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; background: #fff; min-width: 0; }
textarea { width: 100%; min-height: 64px; resize: vertical; }
button { font: inherit; border: 1px solid var(--line); background: #fff; border-radius: 8px; padding: 7px 12px; cursor: pointer; }
button:hover { background: #f1f4f8; }
button.primary { background: var(--navy); color: #fff; border-color: var(--navy); }
button.primary:hover { background: var(--navy-2); }
button.danger { color: var(--red); }
button.link { border: 0; background: none; color: var(--navy-2); padding: 2px 4px; text-decoration: underline; }
.item { display: flex; gap: 12px; align-items: center; justify-content: space-between; padding: 9px 0; border-bottom: 1px solid var(--line); }
.item:last-child { border-bottom: 0; }
.item .main { flex: 1; min-width: 0; }
.item .main b { cursor: pointer; }
.item .main small { display: block; color: var(--muted); }
.item .acts { display: flex; gap: 6px; flex-shrink: 0; }
.badge { display: inline-block; border-radius: 10px; padding: 1px 9px; font-size: 12px; font-weight: 600; color: #fff; background: var(--muted); }
.badge.gecikmis { background: var(--red); } .badge.yaklasan { background: var(--yellow); } .badge.ok { background: var(--green); }
.badge.potansiyel { background: var(--navy-2); } .badge.zorunlu { background: var(--orange); }
.empty { color: var(--muted); padding: 8px 0; }
.timeline .note { border-left: 3px solid var(--navy-2); background: #f7f9fb; border-radius: 6px; padding: 7px 10px; margin-bottom: 6px; }
.timeline .note.arama { border-color: var(--orange); } .timeline .note.ziyaret { border-color: var(--green); }
.timeline .note small { color: var(--muted); display: block; }
.toolbar { display: flex; gap: 8px; margin-bottom: 14px; flex-wrap: wrap; }
.toolbar input { flex: 1 1 220px; }
.kv { display: grid; grid-template-columns: 110px 1fr; gap: 4px 12px; }
.kv dt { color: var(--muted); } .kv dd { margin: 0; }
#toast { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); background: var(--navy); color: #fff;
  padding: 10px 18px; border-radius: 10px; box-shadow: 0 6px 20px rgba(0,0,0,.25); z-index: 50; }
#toast.err { background: var(--red); }
@media (max-width: 800px) {
  header { padding: 8px 12px; gap: 10px; } main { padding: 12px; } .grid2 { grid-template-columns: 1fr; }
  .brand small { display: none; } .item { flex-wrap: wrap; } .kv { grid-template-columns: 90px 1fr; }
}
.msg { background: #f7f9fb; border-left: 3px solid var(--orange); border-radius: 6px; padding: 8px 10px; margin-bottom: 8px; color: var(--muted); }
.btnlink { display: inline-block; border: 1px solid var(--line); border-radius: 8px; padding: 7px 12px; text-decoration: none; color: #128c3f; background: #fff; }
.btnlink:hover { background: #f1f4f8; }
.kalem-row { display: grid; grid-template-columns: 1fr 120px 150px 32px; gap: 6px; margin-bottom: 6px; }
.kalem-row button { padding: 4px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.form-grid label, .lbl { display: block; font-size: 12px; color: var(--muted); margin: 8px 0 3px; }
.form-grid textarea, .form-grid input { width: 100%; }
.badge.durum-Taslak, .badge.durum-Revize { background: var(--muted); } .badge.durum-Gönderildi { background: var(--yellow); }
.badge.durum-Görüşülüyor { background: var(--navy-2); } .badge.durum-Kazanıldı { background: var(--green); } .badge.durum-Kaybedildi { background: var(--red); }
.stats { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.stat { background: var(--card); border-radius: var(--radius); padding: 12px 16px; box-shadow: 0 1px 3px rgba(0,0,0,.06); min-width: 170px; }
.stat b { display: block; font-size: 20px; color: var(--navy); } .stat small { color: var(--muted); }
@media (max-width: 800px) { .kalem-row { grid-template-columns: 1fr 80px 100px 28px; } .form-grid { grid-template-columns: 1fr; } }
.progress { height: 8px; background: var(--line); border-radius: 4px; overflow: hidden; margin-top: 5px; max-width: 320px; }
.progress > i { display: block; height: 100%; background: var(--green); }
.asama { display: grid; grid-template-columns: 28px 1fr auto; gap: 4px 8px; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--line); }
.asama .acts { display: flex; gap: 4px; flex-wrap: wrap; justify-content: flex-end; }
.asama .tarihler { grid-column: 2 / 4; display: flex; gap: 6px; align-items: center; flex-wrap: wrap; font-size: 12px; }
.asama:last-child { border-bottom: 0; }
.asama .no { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: var(--line); font-weight: 700; font-size: 12px; }
.asama.devam .no { background: var(--yellow); color: #fff; } .asama.tamam .no { background: var(--green); color: #fff; }
.asama.tamam .ad { text-decoration: line-through; color: var(--muted); }
.asama .gec { color: var(--red); font-size: 12px; font-weight: 600; }
.asama input[type=date] { padding: 4px 6px; font-size: 12px; }
.fotolar { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.foto { position: relative; background: #f7f9fb; border-radius: 8px; overflow: hidden; }
.foto img { width: 100%; height: 120px; object-fit: cover; display: block; cursor: zoom-in; }
.foto small { display: block; padding: 4px 6px; color: var(--muted); font-size: 11px; }
.foto .badge { position: absolute; top: 6px; left: 6px; }
.foto .badge.oncesi { background: var(--red); } .foto .badge.sonrasi { background: var(--green); }
.foto button { position: absolute; top: 4px; right: 4px; padding: 0 6px; font-size: 12px; }
.odeme { display: flex; gap: 10px; align-items: center; justify-content: space-between; padding: 8px 0; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.odeme:last-child { border-bottom: 0; }
.cihaz-row { display: grid; grid-template-columns: 1fr 1fr 1fr 32px; gap: 6px; margin-bottom: 6px; }
#lightbox { position: fixed; inset: 0; background: rgba(0,0,0,.85); display: grid; place-items: center; z-index: 60; cursor: zoom-out; }
#lightbox img { max-width: 94vw; max-height: 90vh; border-radius: 6px; }
@media (max-width: 800px) { .asama { grid-template-columns: 26px 1fr; } .asama .acts { grid-column: 2; justify-content: flex-start; } .asama .tarihler { grid-column: 2; } .cihaz-row { grid-template-columns: 1fr 1fr 28px; } }
#modal { position: fixed; inset: 0; background: rgba(10,25,40,.55); z-index: 55; display: grid; place-items: start center; overflow: auto; padding: 30px 12px; }
#modal .panel { width: min(760px, 100%); margin: 0; }
#modal textarea { min-height: 260px; font-family: inherit; }
#modal input { width: 100%; }
.ek { display: inline-block; background: #f1f4f8; border-radius: 8px; padding: 5px 10px; margin-top: 8px; font-size: 13px; }
.uyari { color: var(--red); font-size: 13px; margin-top: 4px; }
.sablon { border-top: 1px solid var(--line); padding-top: 12px; margin-top: 12px; }
.sablon textarea { min-height: 150px; }
.sablon input { width: 100%; }
/* grafikler: doğrulanmış varsayılan palet (seri 1 mavi, seri 2 turuncu) */
:root { --s1: #2a78d6; --s2: #eb6834; --grid: #e8ebef; --good: #1f9d55; --warn: #d99a06; --crit: #d64545; }
.kpis { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 12px; margin-bottom: 16px; }
.kpi { background: var(--card); border-radius: var(--radius); padding: 12px 14px; box-shadow: 0 1px 3px rgba(0,0,0,.06); }
.kpi small { color: var(--muted); display: block; } .kpi b { font-size: 20px; color: var(--text); display: block; margin-top: 2px; }
.hedefler { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; }
.hedef { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; }
.hedef .ust { display: flex; justify-content: space-between; gap: 8px; align-items: flex-start; }
.hedef .ust small { color: var(--muted); display: block; }
.hedef .rakam { font-size: 18px; font-weight: 700; margin-top: 6px; }
.hedef .rakam span { font-size: 13px; color: var(--muted); font-weight: 400; }
.hedef .cubuk { position: relative; height: 10px; background: var(--grid); border-radius: 5px; margin: 8px 0 4px; }
.hedef .cubuk i { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 5px; background: var(--s1); max-width: 100%; }
.hedef .cubuk b { position: absolute; top: -3px; bottom: -3px; width: 2px; background: var(--text); opacity: .55; }
.hedef .tempo { font-size: 12px; color: var(--muted); margin-top: 6px; }
.durum-et { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 600; white-space: nowrap; color: var(--text); }
.durum-et::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--muted); }
.durum-et.gerceklesti::before { background: var(--good); } .durum-et.yolunda::before { background: var(--good); }
.durum-et.geride::before { background: var(--warn); } .durum-et.tutmadi::before { background: var(--crit); }
.legend { display: flex; gap: 16px; font-size: 12px; color: var(--muted); margin-bottom: 8px; }
.legend span::before { content: ""; display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 6px; vertical-align: -1px; background: var(--s1); }
.legend .s2::before { background: var(--s2); }
.cols { position: relative; height: 220px; display: grid; grid-template-columns: 56px 1fr; }
.cols .yax { position: relative; font-size: 11px; color: var(--muted); }
.cols .yax span { position: absolute; right: 8px; transform: translateY(50%); }
.cols .plot { position: relative; border-bottom: 1px solid #c9ced6; display: grid; grid-template-columns: repeat(12, 1fr); align-items: end; }
.cols .gl { position: absolute; left: 0; right: 0; height: 1px; background: var(--grid); }
.cols .ay { position: relative; height: 100%; display: flex; align-items: flex-end; justify-content: center; gap: 2px; cursor: default; }
.cols .ay:hover { background: rgba(42,120,214,.06); }
.cols .ay i { width: min(14px, 38%); border-radius: 4px 4px 0 0; background: var(--s1); }
.cols .ay i.s2 { background: var(--s2); }
.xax { display: grid; grid-template-columns: 56px repeat(12, 1fr); font-size: 11px; color: var(--muted); text-align: center; margin-top: 4px; }
.hbar { display: grid; grid-template-columns: 150px 1fr; gap: 8px; align-items: center; margin: 6px 0; font-size: 13px; }
.hbar .iz { position: relative; height: 16px; }
.hbar .iz i { position: absolute; left: 0; top: 2px; height: 12px; background: var(--s1); border-radius: 0 4px 4px 0; min-width: 2px; }
.hbar .iz span { position: absolute; top: 0; font-size: 12px; color: var(--text); white-space: nowrap; }
.hbar .ad { color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#tip { position: fixed; z-index: 70; background: #1c2733; color: #fff; padding: 6px 9px; border-radius: 6px; font-size: 12px; pointer-events: none; white-space: pre; box-shadow: 0 4px 12px rgba(0,0,0,.25); }
details.tablo { margin-top: 10px; font-size: 13px; } details.tablo table { border-collapse: collapse; width: 100%; margin-top: 6px; }
details.tablo td, details.tablo th { border-bottom: 1px solid var(--line); padding: 4px 6px; text-align: right; } details.tablo td:first-child, details.tablo th:first-child { text-align: left; }
@media (max-width: 800px) { .hbar { grid-template-columns: 100px 1fr; } .cols { grid-template-columns: 40px 1fr; } .xax { grid-template-columns: 40px repeat(12, 1fr); font-size: 9px; } }
.adres { font-family: Consolas, monospace; background: #f1f4f8; border-radius: 6px; padding: 3px 8px; user-select: all; }
.adimlar li { margin-bottom: 4px; }
/* telefon: üst menü tek satırda yana kayar, başlık sadeleşir */
@media (max-width: 800px) {
  header { flex-wrap: nowrap; gap: 8px; padding: 8px 10px; }
  header .brand div { display: none; }
  nav { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
  nav::-webkit-scrollbar { display: none; }
  nav button { flex: 0 0 auto; padding: 8px 10px; }
  .panel { padding: 12px; }
  .item .acts { flex-wrap: wrap; }
  .toolbar > * { flex: 1 1 auto; }
}
.logo-img { height: 40px; width: auto; display: block; }
button.yz { border-color: #c9b8f0; color: #5b3fb5; background: #f7f4ff; }
button.yz:hover { background: #efe9ff; }
button.yz:disabled { opacity: .6; cursor: progress; }
.yz-ozet { white-space: pre-wrap; background: #f7f4ff; border-left: 3px solid #8a6ee0; border-radius: 6px; padding: 10px 12px; margin-top: 8px; }
.yz-not { font-size: 12px; color: #5b3fb5; margin-top: 4px; }
.badge.acil { background: var(--red); } .badge.normal { background: var(--muted); }
.cozum-form { background: #f7f9fb; border-radius: 8px; padding: 8px; margin-top: 6px; width: 100%; }
.panel.ariza { border-left: 4px solid var(--red); }
main.genis { max-width: none; padding: 0; }
#ig-cerceve { width: 100%; height: calc(100vh - 60px); border: 0; display: block; background: var(--bg); }
/* takvim */
.tk-bas { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; flex-wrap: wrap; }
.tk-bas h2 { margin: 0 8px; min-width: 150px; text-align: center; }
.tk-izgara { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.tk-gunadi { font-size: 12px; color: var(--muted); text-align: center; padding: 4px 0; font-weight: 600; }
.tk-gun { min-height: 96px; background: var(--card); border: 1px solid var(--line); border-radius: 8px; padding: 4px 5px; cursor: pointer; overflow: hidden; }
.tk-gun:hover { border-color: var(--navy-2); }
.tk-gun.diger { opacity: .45; } .tk-gun.bugun { border: 2px solid var(--orange); } .tk-gun.secili { background: #eef4fb; border-color: var(--navy-2); }
.tk-gun .no { font-size: 12px; font-weight: 700; }
.tk-gun .og { font-size: 11px; line-height: 1.3; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding-left: 5px; border-left: 3px solid var(--muted); margin-top: 2px; }
.tk-gun .daha { font-size: 11px; color: var(--muted); }
.tk-etkinlik { border-color: #2a78d6 !important; } .tk-takip { border-color: #eb6834 !important; } .tk-bakim { border-color: #1baf7a !important; }
.tk-is { border-color: #8a6ee0 !important; } .tk-teklif { border-color: #eda100 !important; } .tk-servis { border-color: #d64545 !important; }
.tk-ozel_gun { border-color: #9aa3ad !important; } .tk-google { border-color: #0f9d9a !important; }
.tk-lejant { display: flex; gap: 12px; flex-wrap: wrap; font-size: 12px; color: var(--muted); margin: 8px 0; }
.tk-lejant span { border-left: 3px solid; padding-left: 6px; }
.tk-satir { display: flex; gap: 10px; align-items: flex-start; padding: 8px 0 8px 10px; border-left: 4px solid; border-bottom: 1px solid var(--line); margin-bottom: 4px; flex-wrap: wrap; }
.tk-satir .saat { min-width: 52px; font-weight: 700; font-size: 13px; }
.tk-satir .main { flex: 1; min-width: 180px; }
.tk-satir small { display: block; color: var(--muted); }
@media (max-width: 800px) {
  .tk-gun { min-height: 52px; padding: 3px; } .tk-gun .og { display: none; }
  .tk-gun .nokta { display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--navy-2); margin: 1px; }
  .tk-gunadi { font-size: 10px; }
}
@media (min-width: 801px) { .tk-gun .nokta { display: none; } }
/* Yayın Merkezi: kanal renkleri ve düzenleyici */
.ykc { display: inline-block; min-width: 22px; text-align: center; border-radius: 6px; padding: 0 5px; font-size: 11px; font-weight: 700; color: #fff; background: var(--muted); }
.ykc.kapali { opacity: .35; }
.ykc.yk-instagram, .og.yk-instagram { background: #c13584; } .ykc.yk-facebook { background: #1877f2; } .ykc.yk-linkedin { background: #0a66c2; }
.ykc.yk-linkedin_sirket { background: #004182; } .ykc.yk-google_isletme { background: #188038; } .ykc.yk-youtube { background: #e00; }
.og.yk-instagram, .tk-satir.yk-instagram, .tk-lejant .yk-instagram { border-color: #c13584 !important; background: none; }
.og.yk-facebook, .tk-satir.yk-facebook, .tk-lejant .yk-facebook { border-color: #1877f2 !important; }
.og.yk-linkedin, .tk-satir.yk-linkedin, .tk-lejant .yk-linkedin { border-color: #0a66c2 !important; }
.og.yk-linkedin_sirket, .tk-satir.yk-linkedin_sirket, .tk-lejant .yk-linkedin_sirket { border-color: #004182 !important; }
.og.yk-google_isletme, .tk-satir.yk-google_isletme, .tk-lejant .yk-google_isletme { border-color: #188038 !important; }
.og.yk-youtube, .tk-satir.yk-youtube, .tk-lejant .yk-youtube { border-color: #e00 !important; }
.ksecler { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 6px; }
.ksec { display: flex; align-items: center; gap: 6px; border: 1px solid var(--line); border-radius: 8px; padding: 6px 8px; cursor: pointer; flex-wrap: wrap; }
.ksec.kapali { background: #fafbfc; } .ksec small { color: var(--muted); width: 100%; padding-left: 22px; font-size: 11px; }
.ksec input { width: auto !important; }
details.hedef-k { border: 1px solid var(--line); border-radius: 8px; padding: 6px 10px; margin-bottom: 6px; }
details.hedef-k summary { cursor: pointer; display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
details.hedef-k textarea { min-height: 110px !important; margin-top: 6px; }
.item.fikir { align-items: flex-start; } .item.fikir .main small { margin-top: 3px; }
.item.fikir.begenmedim { opacity: .5; } .item.fikir.taslak { border-left: 3px solid var(--green); padding-left: 8px; }
.ykc.yk-whatsapp { background: #25d366; }
.mesaj-duzen { display: grid; grid-template-columns: minmax(260px, 2fr) 3fr; gap: 16px; align-items: start; }
.mesaj-liste { max-height: 75vh; overflow: auto; }
.mk { cursor: pointer; border-radius: 8px; padding-left: 6px; } .mk:hover { background: #f1f4f8; } .mk.secili { background: #eef4fb; }
.mk.yeni b { color: var(--navy); } .mk.arsiv { opacity: .6; }
.mesaj-detay { position: sticky; top: 76px; }
.sohbet { max-height: 46vh; overflow: auto; display: flex; flex-direction: column; gap: 6px; padding: 8px; background: #f7f9fb; border-radius: 8px; margin: 8px 0; }
.balon { max-width: 80%; padding: 7px 10px; border-radius: 10px; white-space: pre-wrap; }
.balon small { display: block; font-size: 10px; color: var(--muted); margin-top: 2px; }
.balon.gelen { background: #fff; border: 1px solid var(--line); align-self: flex-start; }
.balon.giden { background: #dcf3e4; align-self: flex-end; }
@media (max-width: 800px) { .mesaj-duzen { grid-template-columns: 1fr; } .mesaj-detay { position: static; } }
.kpi-satir { display: flex; justify-content: space-between; gap: 8px; font-size: 12px; color: var(--muted); border-top: 1px solid var(--line); padding-top: 3px; margin-top: 3px; }
.kpi-satir span:last-child { color: var(--text); font-weight: 600; }
