/* Kullanici portali: sag ust cubuk, kisi listesi, sohbet, yonetim ekranlari.
Renk degiskenleri style.css'ten gelir. */

.portal { position: fixed; inset: 0; pointer-events: none; z-index: 60; }
.portal > * { pointer-events: auto; }

/* --- Sag ust cubuk --- */

.portal-bar {
  position: fixed;
  top: 10px;
  right: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.pbtn {
  height: 30px;
  padding: 0 12px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-2);
  color: var(--fg);
  font: inherit;
  font-size: 12.5px;
  cursor: pointer;
  white-space: nowrap;
}
.pbtn:hover { border-color: #3a4553; background: #232b36; }
.pbtn.primary { background: var(--accent); border-color: var(--accent-2); color: #fff; font-weight: 600; }
.pbtn.primary:hover { background: var(--accent-2); }
.pbtn.ghost { background: transparent; }
.pbtn.wide { width: 100%; justify-content: center; height: 38px; margin-top: 16px; }
.pbtn:disabled { opacity: .5; cursor: default; }

.user-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 8px 5px 5px;
  background: var(--panel-cam);
  border: 1px solid var(--line);
  border-radius: 999px;
  backdrop-filter: blur(6px);
}

.avatar {
  position: relative;
  width: 28px; height: 28px;
  flex: none;
  display: grid; place-items: center;
  border-radius: 50%;
  overflow: hidden;              /* fotograf daireden TASMASIN */
  background: linear-gradient(135deg, var(--accent), #9f1239);
  color: #fff;
  font-size: 11px; font-weight: 700;
}

.user-chip .who { display: flex; flex-direction: column; line-height: 1.15; }
.me-name { font-size: 12.5px; font-weight: 600; max-width: 150px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.role-badge {
  font-size: 10px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .4px;
}
.role-badge.role-admin { color: #d29922; }
.role-badge.role-agent { color: var(--accent); }
.role-badge.role-customer { color: #3fb950; }

.avail-select {
  height: 26px;
  padding: 0 6px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--panel);
  color: var(--fg);
  font: inherit;
  font-size: 12px;
}

.portal .badge {
  min-width: 17px; height: 17px;
  padding: 0 5px;
  display: inline-grid; place-items: center;
  border-radius: 9px;
  background: var(--danger);
  color: #fff;
  font-size: 10.5px; font-weight: 700;
}

/* --- Kisiler paneli --- */

.dock {
  position: fixed;
  top: 52px;
  right: 12px;
  width: 300px;
  max-height: calc(100vh - 76px);
  display: flex;
  flex-direction: column;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: 0 18px 50px rgba(0, 0, 0, .5);
  overflow: hidden;
}

.dock-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  font-size: 13px;
}

.dock-x {
  width: 24px; height: 24px;
  border: 0; border-radius: 6px;
  background: transparent; color: var(--muted);
  cursor: pointer; font-size: 13px;
}
.dock-x:hover { background: var(--panel-2); color: var(--fg); }

.dock-tools { padding: 8px 12px; border-bottom: 1px solid var(--line); }
.dock-tools input[type=search] {
  width: 100%; height: 28px;
  padding: 0 9px;
  border: 1px solid var(--line); border-radius: 7px;
  background: var(--bg); color: var(--fg);
  font: inherit; font-size: 12.5px;
}
.dock-check { display: flex; align-items: center; gap: 6px; margin-top: 7px; color: var(--muted); font-size: 11.5px; }

.dock-body { overflow-y: auto; padding: 4px 0 8px; }
.dock-sec h4 {
  margin: 10px 12px 4px;
  display: flex; align-items: baseline; justify-content: space-between;
  font-size: 11px; font-weight: 600;
  text-transform: uppercase; letter-spacing: .6px;
  color: var(--muted);
}
.dock-count { font-weight: 400; text-transform: none; letter-spacing: 0; font-size: 10.5px; }
.dock-empty { padding: 8px 14px; color: var(--muted); font-size: 12px; }

.people-list { display: flex; flex-direction: column; }

.person {
  display: flex; align-items: center; gap: 10px;
  width: 100%;
  padding: 7px 12px;
  border: 0; border-left: 2px solid transparent;
  background: transparent; color: var(--fg);
  font: inherit; text-align: left; cursor: pointer;
}
.person:hover { background: var(--panel-2); }
.person.is-open { border-left-color: var(--accent); background: var(--panel-2); }

.p-avatar {
  position: relative;
  width: 30px; height: 30px;
  flex: none;
  display: grid; place-items: center;
  border-radius: 50%;
  background: #26303c;
  color: var(--fg);
  font-size: 11px; font-weight: 700;
}

/* Fotograf/logo daireyi doldurur; bas harfler yalnizca fotograf yokken. */
.p-avatar img,
.avatar img {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  border-radius: 50%;
  object-fit: cover;
  display: block;
}
.p-avatar img[hidden],
.avatar img[hidden] { display: none; }

.p-avatar .p-dot { z-index: 1; }
.chat-avatar { width: 28px; height: 28px; flex: none; margin-right: 8px; }

.profil-foto-satir { display: flex; align-items: center; gap: 14px; margin-bottom: 12px; }
.profil-foto { width: 72px; height: 72px; font-size: 22px; }
.profil-foto-yan { min-width: 0; }

.p-dot {
  width: 9px; height: 9px;
  display: inline-block;
  border-radius: 50%;
  background: var(--muted);
}
.p-avatar .p-dot {
  position: absolute; right: -1px; bottom: -1px;
  border: 2px solid var(--panel);
  width: 11px; height: 11px;
}
.av-online  { background: var(--ok); }
.av-busy    { background: var(--danger); }
.av-away    { background: #d29922; }
.av-offline { background: #4a5563; }

.p-main { display: flex; flex-direction: column; min-width: 0; flex: 1; line-height: 1.25; }
.p-name { font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.p-sub { color: var(--muted); font-size: 11px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* --- Sohbet penceresi --- */

.chat-dock {
  position: fixed;
  right: 324px;
  bottom: 16px;
  width: 330px;
  height: 440px;
  display: flex;
  flex-direction: column;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: 0 18px 50px rgba(0, 0, 0, .5);
  overflow: hidden;
}

.chat-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 9px 12px;
  border-bottom: 1px solid var(--line);
}
.chat-peer { display: flex; flex-direction: column; line-height: 1.25; min-width: 0; }
.chat-peer strong { font-size: 13px; }
.chat-peer-sub { display: flex; align-items: center; gap: 6px; color: var(--muted); font-size: 11px; }

.portal-chat-log {
  flex: 1;
  overflow-y: auto;
  padding: 12px;
  display: flex; flex-direction: column; gap: 8px;
}

.pmsg { max-width: 85%; }
.pmsg.me { align-self: flex-end; }
.pmsg.peer { align-self: flex-start; }

.pmsg-body {
  padding: 7px 10px;
  border-radius: 12px;
  background: var(--panel-2);
  font-size: 13px;
  white-space: pre-wrap;
  word-break: break-word;
}
.pmsg.me .pmsg-body { background: var(--accent); color: #fff; border-bottom-right-radius: 4px; }
.pmsg.peer .pmsg-body { border-bottom-left-radius: 4px; }
.pmsg-time { margin-top: 2px; color: var(--muted); font-size: 10.5px; }
.pmsg.me .pmsg-time { text-align: right; }

.chat-typing { padding: 0 12px 4px; color: var(--muted); font-size: 11px; font-style: italic; }

.portal-chat-form { display: flex; gap: 8px; padding: 10px; border-top: 1px solid var(--line); }
.portal-chat-form input {
  flex: 1; height: 32px;
  padding: 0 10px;
  border: 1px solid var(--line); border-radius: 8px;
  background: var(--bg); color: var(--fg);
  font: inherit; font-size: 13px;
}

/* --- Modallar --- */

.modal {
  position: fixed; inset: 0;
  display: grid; place-items: center;
  background: rgba(4, 7, 12, .68);
  backdrop-filter: blur(2px);
  z-index: 70;
  padding: 20px;
  overflow-y: auto;
}

.modal-card {
  position: relative;
  width: min(400px, 100%);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 24px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, .55);
}
.modal-card.kod-kart { width: min(460px, 100%); }

.kod-kutu {
  display: flex; align-items: center; gap: 10px;
  margin: 14px 0 12px;
}
.kod-kutu code {
  flex: 1;
  font-family: "Consolas", "SF Mono", monospace;
  font-size: 26px; font-weight: 700; letter-spacing: 4px;
  text-align: center;
  padding: 14px 10px;
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--fg);
  user-select: all;
}
.kod-uyari { color: var(--uyari-yazi, #d29922); }
.modal-card h3 { margin: 0 0 16px; font-size: 16px; }

.modal-x {
  position: absolute; top: 12px; right: 12px;
  width: 26px; height: 26px;
  border: 0; border-radius: 7px;
  background: transparent; color: var(--muted);
  cursor: pointer;
}
.modal-x:hover { background: var(--panel-2); color: var(--fg); }

.modal label {
  display: block;
  margin: 12px 0 5px;
  color: var(--muted);
  font-size: 12px;
}
.modal input[type=text], .modal input[type=password], .modal input[type=email],
.modal input:not([type]), .modal select {
  width: 100%;
  height: 34px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--bg);
  color: var(--fg);
  font: inherit;
  font-size: 13px;
}
.modal input:focus, .modal select:focus { outline: 0; border-color: var(--accent); }

.tabs { display: flex; gap: 6px; padding: 4px; background: var(--bg); border: 1px solid var(--line); border-radius: 10px; }
.tab {
  flex: 1; height: 30px;
  border: 0; border-radius: 7px;
  background: transparent; color: var(--muted);
  font: inherit; font-size: 12.5px; cursor: pointer;
}
.tab.is-on { background: var(--panel-2); color: var(--fg); font-weight: 600; }

/* --- Kullanici yonetimi --- */
.u-name { font-weight: 600; }
.mini {
  height: 24px; padding: 0 9px;
  border: 1px solid var(--line); border-radius: 6px;
  background: var(--panel-2); color: var(--fg);
  font: inherit; font-size: 11.5px; cursor: pointer;
}
.mini:hover { border-color: #3a4553; }
.mini.danger { color: #ff7b72; border-color: #4a2b2b; }

.user-form { border: 1px solid var(--line); border-radius: 10px; padding: 14px 16px 18px; }
.user-form h4 { margin: 0 0 6px; font-size: 13px; }
.form-row { display: flex; gap: 8px; margin-top: 16px; }

/* --- Yetki ekrani --- */
.perms-info { color: var(--muted); font-size: 12px; }

.perms-body {
  max-height: 56vh;
  overflow-y: auto;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 14px;
}

.perm-group { border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px 12px; }
.perm-group h4 {
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 11px; font-weight: 600;
  text-transform: uppercase; letter-spacing: .6px;
}

.perm-row {
  display: flex; align-items: flex-start; gap: 9px;
  margin: 0 -6px;
  padding: 6px;
  border-radius: 7px;
  cursor: pointer;
}
.perm-row:hover { background: var(--panel-2); }
.perm-row input[type=checkbox] { margin-top: 2px; width: auto; height: auto; }

.perm-main { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.perm-label { font-size: 12.5px; }
.perm-desc { color: var(--muted); font-size: 11px; }
.star { color: #d29922; font-style: normal; font-size: 10px; }

.perm-kind {
  flex: none;
  padding: 1px 6px;
  border-radius: 5px;
  background: var(--panel-2);
  color: var(--muted);
  font-size: 10px;
}
.perm-kind.act { color: var(--accent); }

/* --- Bildirim --- */

.portal-toast {
  position: fixed;
  left: 50%; bottom: 24px;
  transform: translate(-50%, 20px);
  padding: 10px 16px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel);
  box-shadow: 0 14px 40px rgba(0, 0, 0, .5);
  font-size: 13px;
  opacity: 0;
  pointer-events: none;
  transition: opacity .18s, transform .18s;
  z-index: 90;
}
.portal-toast.on { opacity: 1; transform: translate(-50%, 0); }

#session-view:not([hidden]) ~ .portal .portal-bar { top: 52px; right: 10px; }

/* Oturum acikken (ayri sekme) sag sutun panelleri uzak ekrani ezmesin. */
body:has(#session-view:not([hidden])) .dock,
body:has(#session-view:not([hidden])) .chat-dock { display: none !important; }

@media (max-width: 720px) {
  .dock { width: calc(100vw - 24px); }
  .chat-dock { right: 12px; bottom: 12px; width: calc(100vw - 24px); height: 60vh; }
  .me-name { max-width: 90px; }
}

/* Modal icindeki blok "label" kurali isaret kutulu satirlari bozmasin. */
.modal .perm-row { display: flex; align-items: flex-start; gap: 9px; margin: 0 -6px; }
.modal .dock-check { display: flex; align-items: center; gap: 8px; margin: 14px 0 0; }
.modal .perm-row input[type=checkbox],
.modal .dock-check input[type=checkbox] { width: auto; height: auto; flex: none; }

#connect-form.perm-blocked #connect-btn { opacity: .45; cursor: not-allowed; }
#connect-form.perm-blocked input { opacity: .6; }

.login-hint { margin: 12px 0 0; color: var(--muted); font-size: 11.5px; line-height: 1.4; }

/* --- Tek oturum seridi: ayni hesapla baska cihazdan giris denenince --- */
.oturum-serit {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 12px 18px;
  background: #4a3a12;
  border-bottom: 1px solid #8a6a1e;
  box-shadow: 0 8px 24px rgba(0,0,0,.45);
  color: #f2eadb;
  font-size: 13px;
}
.oturum-serit.kapandi { background: #4a1a1a; border-bottom-color: #8a2e2e; }
.oturum-serit .os-metin { display: flex; flex-direction: column; gap: 2px; flex: 1; min-width: 0; }
.oturum-serit .os-metin span { font-size: 11.5px; opacity: .85; }
.oturum-serit .os-uyari { color: #ffd479; }
.oturum-serit .os-dugmeler { display: flex; gap: 8px; flex-shrink: 0; }
.oturum-serit button {
  padding: 8px 16px;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,.25);
  background: rgba(255,255,255,.08);
  color: #f2eadb;
  cursor: pointer;
  font-size: 12.5px;
}
.oturum-serit button:hover { background: rgba(255,255,255,.16); }
.oturum-serit .os-kabul { background: #2f6f3a; border-color: #3f9150; }
.oturum-serit .os-kabul:hover { background: #38853f; }

/* --- Surekli acik sag panel --- */
@media (min-width: 980px) {
  #connect-view.panelli { justify-content: flex-start; padding-left: 5vw; padding-right: calc(var(--sag-sutun) + 20px); }

  #connect-view.panelli ~ #portal .portal-bar,
  body:has(#connect-view.panelli) .portal-bar {
    top: 0; right: 0;
    width: var(--sag-sutun);
    padding: 12px 14px;
    background: var(--panel);
    border-left: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    border-radius: 0;
    box-shadow: none;
  }

  body:has(#connect-view.panelli) .dock {
    top: auto; right: 0; bottom: 0;
    width: var(--sag-sutun);
    height: calc(100vh - 120px);
    max-height: none;
    border-radius: 0;
    border-right: 0;
    border-bottom: 0;
    box-shadow: none;
  }
}

.dock-sec h4 { text-transform: uppercase; letter-spacing: .08em; }
.dock-count { font-variant-numeric: tabular-nums; }

/* Sohbet basligindaki "Baglanti Iste" ve durum seridi. */
.chat-baglan {
  margin-left: auto;
  margin-right: 8px;
  padding: 6px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-2, rgba(255,255,255,.06));
  color: var(--fg);
  font-size: 11.5px;
  cursor: pointer;
  white-space: nowrap;
}
.chat-baglan:hover:not(:disabled) { background: rgba(255,255,255,.14); }
.chat-baglan:disabled { opacity: .5; cursor: default; }

.davet-durum {
  padding: 8px 12px;
  font-size: 11.5px;
  border-bottom: 1px solid var(--line);
}
.davet-durum.bekle { background: #3a3212; color: #ffd479; }
.davet-durum.ok    { background: #16331c; color: #7ee08f; }
.davet-durum.hata  { background: #3a1a1a; color: #ff9c9c; }

/* --- Yerlesim: sag sutun tek yigin (bar ustte, liste altta), sohbet sutunun solunda --- */
:root { --sag-sutun: 360px; }

@media (min-width: 980px) {
  body:has(#connect-view.panelli) .portal-bar {
    top: 0; right: 0; left: auto;
    width: var(--sag-sutun);
    padding: 12px 14px;
    background: var(--panel);
    border: 0;
    border-left: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    border-radius: 0;
    box-shadow: none;
    z-index: 30;
  }

  body:has(#connect-view.panelli) .dock {
    top: 132px;
    right: 0; bottom: 0;
    width: var(--sag-sutun);
    height: auto;
    max-height: none;
    border-radius: 0;
    border-right: 0;
    border-bottom: 0;
    box-shadow: none;
    z-index: 20;
  }

  .chat-dock { right: calc(var(--sag-sutun) + 16px); }
}

.chat-dock {
  bottom: 0;
  border-radius: 12px 12px 0 0;
  transition: height .16s ease;
  z-index: 40;
}
.chat-dock .chat-head { cursor: pointer; user-select: none; }

.chat-dock.kucuk { height: 42px; }
.chat-dock.kucuk > *:not(.chat-head) { display: none; }
/* Personel penceresi: yalnizca baglanti/davet seridi (KARAR 80). */
.chat-dock.yalniz-baglanti:not(.kucuk) { height: auto; }
.chat-dock.yalniz-baglanti .portal-chat-log,
.chat-dock.yalniz-baglanti .chat-typing,
.chat-dock.yalniz-baglanti .portal-chat-form { display: none !important; }

.chat-dock.yeni .chat-head { background: #3a3212; }

/* Dar ekranda yigin alt alta */
@media (max-width: 979px) {
  .chat-dock { right: 12px; left: 12px; width: auto; }
}

/* --- Kullanici basligi: dikey yigin (masaustu PeoplePanel ile ayni) --- */
.user-chip {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 10px;
  padding: 10px;
  border-radius: 10px;
  background: var(--panel-cam);
  border: 1px solid var(--line);
}

.uc-ust { display: flex; align-items: center; gap: 8px; }
.uc-ust .who { display: flex; flex-direction: column; gap: 2px; flex: 1; min-width: 0; }
.uc-ust .me-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.uc-ust .pbtn { flex-shrink: 0; }

.uc-durum { display: flex; align-items: center; gap: 8px; font-size: 11.5px; color: var(--muted); }
.uc-durum select { flex: 1; min-width: 0; }

.uc-dugmeler { display: flex; flex-wrap: wrap; gap: 6px; }
.uc-dugmeler .pbtn { flex: 1 1 auto; justify-content: center; }
.ikon-dugme { flex: 0 0 auto !important; width: 34px; padding: 0; }

.ayirac { margin: 20px 0 16px; border: 0; border-top: 1px solid var(--line); }
.ok-note { margin: 8px 0 0; font-size: 12px; color: #7ee08f; }
#profile-modal label small { display: block; font-weight: 400; color: var(--muted); font-size: 10.5px; }
#profile-modal h4 { margin: 0 0 10px; font-size: 13px; }

.panes.tek { grid-template-columns: 1fr; }

/* --- Yerlesim: kart kalan alanda ortalanir; liste basligin olculen
yuksekligi (--bar-yuksekligi, JS) altindan baslar --- */
:root { --bar-yuksekligi: 150px; }

@media (min-width: 980px) {
  #connect-view.panelli {
    justify-content: center;
    padding-left: 0;
    padding-right: var(--sag-sutun);
  }

  body:has(#connect-view.panelli) .dock {
    top: var(--bar-yuksekligi);
    height: calc(100vh - var(--bar-yuksekligi));
  }

  .chat-dock {
    right: calc(var(--sag-sutun) + 12px);
    bottom: 0;
    width: 320px;
  }
}

/* --- Sohbet penceresi --- */
.chat-dock .chat-head {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 8px 0 12px;
  min-height: 42px;
}
.chat-dock .chat-peer { flex: 1; min-width: 0; }
.chat-dock .chat-peer strong {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.chat-dock.kucuk .chat-peer-sub { display: none; }

.chat-dock .dock-x {
  flex-shrink: 0;
  width: 26px;
  height: 26px;
  line-height: 1;
  border-radius: 6px;
  background: rgba(255, 255, 255, .07);
  border: 1px solid var(--line);
  color: var(--fg);
  font-size: 14px;
}
.chat-dock .dock-x:hover { background: rgba(255, 255, 255, .16); }

/* Davet seridi secenekleri; kurulum yoksa yalnizca ekran paylasilabilir. */
.davet-durum .dd-metin { display: flex; flex-direction: column; gap: 3px; }
.davet-durum .dd-metin span { opacity: .9; }
.davet-durum .dd-dugmeler { display: flex; gap: 8px; margin-top: 8px; }
.davet-durum .dd-dugmeler button {
  padding: 7px 14px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, .25);
  background: rgba(255, 255, 255, .08);
  color: inherit;
  font-size: 12px;
  cursor: pointer;
}
.davet-durum .dd-dugmeler button:hover:not(:disabled) { background: rgba(255, 255, 255, .18); }
.davet-durum .dd-dugmeler button:disabled { opacity: .55; cursor: default; }
.davet-durum .dd-kabul { background: #2f6f3a; border-color: #3f9150; }
.davet-durum .dd-kabul:hover:not(:disabled) { background: #38853f; }

/* Surum etiketi */
.surum {
  position: fixed;
  right: 8px;
  bottom: 6px;
  z-index: 5;
  font-size: 10.5px;
  color: var(--muted);
  opacity: .55;
  font-variant-numeric: tabular-nums;
  pointer-events: none;
  user-select: none;
}
@media (min-width: 980px) {
  body:has(#connect-view.panelli) .surum { right: calc(var(--sag-sutun) + 10px); }
}

.onay-satir {
  display: flex;
  align-items: center;
  gap: 7px;
  margin: 12px 0 18px;
  font-size: 12px;
  color: var(--muted);
  cursor: pointer;
  line-height: 1;
}

/* style.css'teki genel "form input" kurali onay kutularini da yakaliyordu; onlar haric. */
.onay-satir input[type=checkbox],
form input[type=checkbox],
form input[type=radio] {
  width: 15px;
  height: 15px;
  flex: 0 0 15px;
  margin: 0;
  padding: 0;
  accent-color: var(--accent, #f0364b);
  cursor: pointer;
}

/* --- Sohbet seridi: konusmalar yan yana, sagdan sola --- */

.chat-bar {
  position: fixed;
  bottom: 0;
  right: 12px;
  left: 12px;
  display: flex;
  flex-direction: row-reverse;   /* ilk cocuk = en sagdaki */
  align-items: flex-end;
  justify-content: flex-start;
  gap: 10px;
  z-index: 40;
  pointer-events: none;
}
.chat-bar > * { pointer-events: auto; }

/* Pencereler seridin icinde akar: eski sabit konum iptal (iki sinif tek sinifi yener). */
.chat-bar .chat-dock {
  position: relative;
  top: auto; right: auto; bottom: auto; left: auto;
  flex: 0 0 auto;
  width: 300px;
  height: 420px;
  max-height: calc(100vh - 96px);
  margin: 0;
}
.chat-bar .chat-dock.kucuk { height: 42px; }

.chat-bar .chat-dock.odak { border-color: var(--accent); }

.chat-rozet {
  flex: 0 0 auto;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 9px;
  background: #d9483b;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  line-height: 18px;
  text-align: center;
}

@media (min-width: 980px) {
  body:has(#connect-view.panelli) .chat-bar { right: calc(var(--sag-sutun) + 16px); }
}

@media (max-width: 720px) {
  .chat-bar { right: 8px; left: 8px; gap: 6px; }
  .chat-bar .chat-dock { width: calc(100vw - 16px); height: 60vh; }
}

/* --- Oturum sekmesi: portal cubugu, kisiler ve sohbet gizlenir --- */
body.oturum-sekmesi .portal-bar,
body.oturum-sekmesi #user-chip,
body.oturum-sekmesi .dock,
body.oturum-sekmesi .chat-bar,
body.oturum-sekmesi .surum { display: none !important; }

/* --- Parola alani: goz simgesi (.parola-sar, JS ile sarilir) --- */
.parola-sar {
  position: relative;
  display: block;
}
/* Sarmalayici alanin dis bosluklarini devralir */
.parola-sar > input { padding-right: 40px !important; }

.parola-goz {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  right: 1px;
  height: 28px;
  width: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 0;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  padding: 0;
}
.parola-goz:hover { color: var(--fg); }

/* Simge CSS ile ciziliyor: emoji kaymasi olmasin */
.parola-goz::before {
  content: '';
  width: 18px; height: 18px;
  background: currentColor;
  -webkit-mask: var(--goz) center / contain no-repeat;
          mask: var(--goz) center / contain no-repeat;
}
.parola-goz {
  --goz: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M1 12s4-8 11-8 11 8 11 8-4 8-11 8-11-8-11-8z'/%3E%3Ccircle cx='12' cy='12' r='3'/%3E%3C/svg%3E");
}
.parola-goz.acik {
  --goz: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M17.94 17.94A10.07 10.07 0 0 1 12 20c-7 0-11-8-11-8a18.45 18.45 0 0 1 5.06-5.94M9.9 4.24A9.12 9.12 0 0 1 12 4c7 0 11 8 11 8a18.5 18.5 0 0 1-2.16 3.19m-6.72-1.07a3 3 0 1 1-4.24-4.24'/%3E%3Cline x1='1' y1='1' x2='23' y2='23'/%3E%3C/svg%3E");
  color: var(--accent);
}

/* --- Baglantiyi kes: secim penceresi --- */
.kes-kat {
  position: fixed; inset: 0;
  display: flex; align-items: center; justify-content: center;
  background: rgba(0, 0, 0, .55);
  z-index: 120;
  padding: 16px;
}
.kes-kart {
  width: min(460px, 100%);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 20px;
  box-shadow: 0 24px 70px rgba(0, 0, 0, .55);
}
.kes-kart h3 { margin: 0 0 4px; font-size: 16px; }
.kes-kart > p { margin: 0 0 14px; color: var(--muted); font-size: 13px; }

.kes-secenekler { display: flex; flex-direction: column; gap: 8px; }
.kes-btn {
  display: flex; flex-direction: column; gap: 3px;
  width: 100%;
  padding: 12px 14px;
  text-align: left;
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--fg);
  cursor: pointer;
}
.kes-btn:hover, .kes-btn:focus-visible { border-color: var(--accent); outline: none; }
.kes-btn strong { font-size: 13.5px; }
.kes-btn span { color: var(--muted); font-size: 12px; line-height: 1.45; }

.kes-vazgec {
  width: 100%;
  margin-top: 12px;
  padding: 9px;
  background: transparent;
  border: 0;
  color: var(--muted);
  font-size: 12.5px;
  cursor: pointer;
}
.kes-vazgec:hover { color: var(--fg); }

/* --- Dil secici --- */
.dil-sar { display: inline-flex; }

.dil-sec {
  height: 30px;
  padding: 0 26px 0 9px;
  background: var(--panel-2) var(--ok-simge) no-repeat right 8px center / 9px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--fg);
  font-size: 12.5px;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  --ok-simge: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%238b949e' stroke-width='1.6' stroke-linecap='round'/%3E%3C/svg%3E");
}
.dil-sec:hover { border-color: var(--accent); }
.dil-sec option { background: var(--panel); color: var(--fg); }

/* Sagdan sola yazilan diller (Arapca) */
html[dir="rtl"] .portal-bar { direction: rtl; }
html[dir="rtl"] .chat-bar { flex-direction: row; }
html[dir="rtl"] .pmsg.me { align-self: flex-start; }
html[dir="rtl"] .pmsg.peer { align-self: flex-end; }

/* --- Sol ust arac seridi: dil secici + kurulum indirme --- */
.arac-bar {
  position: fixed;
  top: 10px;
  left: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  z-index: 60;
}

/* Oturum sekmesinde serit uzak ekranin arac cubugunu ezmesin. */
body:has(#session-view:not([hidden])) .arac-bar { display: none !important; }
body.oturum-sekmesi .arac-bar { display: none !important; }

html[dir="rtl"] .arac-bar { left: auto; right: 12px; }
html[dir="rtl"] .portal-bar { left: 12px; right: auto; }

@media (max-width: 720px) {
  .arac-bar { top: auto; bottom: 10px; left: 10px; }
}

.ayar-bolme > .geri-baglanti {
  margin-bottom: 10px;
  padding: 4px 10px;
  font-size: 12px;
}

a.pbtn { text-decoration: none; }
a.pbtn.yok { opacity: .45; cursor: not-allowed; }

.pmsg-sistem {
  align-self: center;
  max-width: 92%;
  margin: 2px 0;
  padding: 4px 10px;
  border-radius: 10px;
  background: var(--panel-2);
  color: var(--muted);
  font-size: 11.5px;
  text-align: center;
}
.pmsg-sistem.cikti { color: #d29922; }
.pmsg-sistem.geldi { color: var(--ok); }

/* --- Tema: acik (yalnizca degiskenler; degiskene bagli olmayanlar asagida) --- */
:root[data-tema="acik"] {
  --bg: #f4f6f9;
  --panel: #ffffff;
  --panel-2: #eef1f6;
  --line: #d3dae4;
  --fg: #1b2330;
  --muted: #5b6779;
  --accent: #d91f36;
  --accent-2: #b8162b;
  --danger: #c62f2a;
  --ok: #1a7f37;
}

:root[data-tema="acik"] .pbtn:hover { border-color: #b9c4d2; background: #e6ebf2; }
:root[data-tema="acik"] .mini:hover { border-color: #b9c4d2; }
:root[data-tema="acik"] .mini.danger { color: #c62f2a; border-color: #eccbc9; }
:root[data-tema="acik"] .av-offline { background: #a3aebd; }
:root[data-tema="acik"] .role-badge.role-admin { color: #9a6700; }

:root[data-tema="acik"] .chat-dock .dock-x {
  background: #eef1f6;
  border-color: var(--line);
  color: var(--fg);
}
:root[data-tema="acik"] .chat-dock .dock-x:hover { background: #dfe5ee; }
:root[data-tema="acik"] .chat-baglan:hover:not(:disabled) { background: #e6ebf2; }
:root[data-tema="acik"] .chat-dock.yeni .chat-head { background: #fff4d6; }

:root[data-tema="acik"] .davet-durum.bekle { background: #fff4d6; color: #7a5c00; }
:root[data-tema="acik"] .davet-durum.ok    { background: #dff5e4; color: #14622b; }
:root[data-tema="acik"] .davet-durum.hata  { background: #fde7e6; color: #a2201c; }

:root[data-tema="acik"] .oturum-serit {
  background: #fff4d6; border-bottom-color: #e0c477; color: #4a3a12;
}
:root[data-tema="acik"] .oturum-serit.kapandi { background: #fde7e6; border-bottom-color: #e5b1ae; }
:root[data-tema="acik"] .oturum-serit .os-uyari { color: #8a6a1e; }
:root[data-tema="acik"] .oturum-serit button {
  border-color: rgba(0,0,0,.18); background: rgba(0,0,0,.05); color: #4a3a12;
}
:root[data-tema="acik"] .oturum-serit button:hover { background: rgba(0,0,0,.1); }

:root[data-tema="acik"] .kes-kat { background: rgba(20, 28, 40, .38); }
:root[data-tema="acik"] .chat-dock,
:root[data-tema="acik"] .dock,
:root[data-tema="acik"] .modal-card { box-shadow: 0 14px 40px rgba(20, 28, 40, .16); }

:root[data-tema="acik"] textarea,
:root[data-tema="acik"] .pmsg.peer { background: var(--panel-2); }

/* Tema secici */
.tema-sec {
  height: 30px;
  padding: 0 26px 0 9px;
  background: var(--panel-2) var(--ok-simge) no-repeat right 8px center / 9px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--fg);
  font-size: 12.5px;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  --ok-simge: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%238b949e' stroke-width='1.6' stroke-linecap='round'/%3E%3C/svg%3E");
}
.tema-sec:hover { border-color: var(--accent); }
.tema-sec option { background: var(--panel); color: var(--fg); }

.tema-sar { display: inline-flex; }

/* --- Misafir oturum uyarisi (yetkili girisi yokken) --- */
.misafir-uyari {
  margin: 10px 0 0;
  padding: 9px 11px;
  border: 1px solid #6b5a1e;
  border-radius: 8px;
  background: #2a2410;
  color: #e8d9a8;
  font-size: 11.5px;
  line-height: 1.5;
}
.misafir-uyari strong { display: block; margin-bottom: 2px; color: #ffd479; }
:root[data-tema="acik"] .misafir-uyari {
  border-color: #e0c477; background: #fff7e0; color: #5c4a12;
}
:root[data-tema="acik"] .misafir-uyari strong { color: #7a5c00; }

.oturum-sure {
  padding: 4px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.oturum-sure.acil {
  border-color: #8a2e2e;
  background: #3a1414;
  color: #ff9a94;
  font-weight: 600;
}
:root[data-tema="acik"] .oturum-sure.acil {
  border-color: #e5b1ae; background: #fde7e6; color: #a2201c;
}

/* --- Acik tema: degiskene baglanmamis yuzeyler --- */

:root { --panel-cam: rgba(22, 27, 35, .92); }
:root[data-tema="acik"] { --panel-cam: rgba(255, 255, 255, .94); }
.user-chip { background: var(--panel-cam); }

:root[data-tema="acik"] .p-avatar { background: #dde4ee; color: #26303c; }

:root[data-tema="acik"] .tb-btn:hover { background: #dfe5ee; }
:root[data-tema="acik"] .tb-btn.danger:hover { background: #b02a25; }

/* Uzak ekranin arkasi acik temada da bilerek koyu. */

:root[data-tema="acik"] .oturum-serit .os-kabul,
:root[data-tema="acik"] .davet-durum .dd-kabul { background: #1a7f37; border-color: #1a7f37; color: #fff; }

:root[data-tema="acik"] .ok-note { color: #14622b; }

:root[data-tema="acik"] .modal { background: rgba(20, 28, 40, .38); }

/* --- Cok yetkili oturum: katilimci listesi + soru seridi --- */
.katilimcilar {
  padding: 4px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
  max-width: 320px;
  overflow: hidden;
  text-overflow: ellipsis;
}

#session-view > .oturum-serit {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  padding: 9px 14px;
  border-bottom: 1px solid var(--line);
  background: var(--panel-2);
  color: var(--fg);
  font-size: 12.5px;
}
#session-view > .oturum-serit .os-metin { flex: 1; min-width: 200px; }
#session-view > .oturum-serit.sor { background: #3a3212; border-bottom-color: #6b5a1e; }
:root[data-tema="acik"] #session-view > .oturum-serit.sor {
  background: #fff4d6; border-bottom-color: #e0c477; color: #5c4a12;
}
#session-view > .oturum-serit button {
  padding: 5px 12px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--panel);
  color: var(--fg);
  font-size: 12px;
  cursor: pointer;
}
#session-view > .oturum-serit .os-kabul {
  background: var(--accent); border-color: var(--accent); color: #fff; font-weight: 600;
}
#session-view > .oturum-serit button:hover { filter: brightness(1.12); }

/* --- Kisiler listesinde kendi satirin --- */
.person.benim {
  cursor: default;
  background: var(--panel-2);
  border-left-color: var(--accent);
}
.person.benim:hover { background: var(--panel-2); }

.person.benim .p-main { display: flex; align-items: center; flex-wrap: wrap; gap: 0 6px; }
.p-siz {
  margin-left: 0;
  padding: 1px 6px;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font-size: 9.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .4px;
  vertical-align: middle;
}

/* --- Uygunluk secicisi: secenek noktasi renklendirilemedigi icin renk secicinin kendisinde --- */
.avail-select.durum-online  { color: var(--ok);      border-color: var(--ok); }
.avail-select.durum-busy    { color: var(--danger);  border-color: var(--danger); }
.avail-select.durum-away    { color: #d29922;        border-color: #d29922; }
.avail-select.durum-offline { color: var(--muted);   border-color: var(--line); }

.avail-select.dikkat {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}

/* Notlar 📓 ve Ayarlar ⚙: belirgin, 40px */
.uc-ust .ikon-dugme {
  flex: 0 0 auto;
  width: 40px;
  height: 40px;
  padding: 0;
  justify-content: center;
  font-size: 21px;
  line-height: 1;
}

/* Yetkilinin acik baglanti sayisi (sessions.list) */
.p-oturum {
  margin-left: 6px;
  padding: 1px 7px;
  border-radius: 999px;
  background: var(--ok);
  color: #fff;
  font-size: 9.5px;
  font-weight: 700;
  vertical-align: middle;
  white-space: nowrap;
}
:root[data-tema="acik"] .p-oturum { background: var(--ok); color: #fff; }

/* --- Son kullanilan ID listesi --- */
.son-id-satir { display: flex; align-items: center; gap: 4px; padding-right: 6px; }
.son-id-satir .son-id-sec { flex: 1; text-align: left; }
.son-id-sil {
  flex: 0 0 auto;
  width: 20px; height: 20px;
  padding: 0;
  border: 0; border-radius: 5px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 11px;
  line-height: 1;
}
.son-id-sil:hover { background: var(--danger); color: #fff; }

.son-id-hepsi {
  width: 100%;
  margin-top: 4px;
  padding: 6px 8px;
  border: 0;
  border-top: 1px solid var(--line);
  border-radius: 0 0 8px 8px;
  background: transparent;
  color: var(--muted);
  font-size: 11.5px;
  cursor: pointer;
}
.son-id-hepsi:hover { color: var(--danger); }

/* --- Kisiler paneli: acilir/kapanir gruplar --- */
.dock-baslik {
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  user-select: none;
  border-radius: 6px;
  padding: 2px 4px;
  margin: 0 -4px;
}
.dock-baslik:hover { background: var(--panel-2); }
.dock-baslik:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.dock-ok { font-size: 9px; color: var(--muted); width: 10px; }
.dock-sec.kapali .people-list { display: none; }

/* Personel basligindaki yetki kisayolu; tiklama basliga gecmesin (JS'te durdurulur). */
.dock-yetki {
  margin-left: auto;
  width: 22px; height: 22px;
  display: inline-grid; place-items: center;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  font-size: 11px;
  line-height: 1;
  cursor: pointer;
}
.dock-yetki:hover { background: var(--panel-2); color: var(--fg); border-color: var(--accent); }

.surum-panel {
  padding: 7px 12px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 11px;
  text-align: center;
  font-variant-numeric: tabular-nums;
}

/* --- Sag ust cubuk: her genislikte top:0/right:0; liste cubugun olculen yuksekligi altindan.
Medya sorgusuz ve dosya sonunda: yukaridaki 980px kurallarini yener. --- */

/* Sutun: genis ekranda 320, dar 300, telefonda tam ekran. */
@media (max-width: 979px) { :root { --sag-sutun: 320px; } }
@media (max-width: 699px) { :root { --sag-sutun: 100vw; } }

body:has(#connect-view.panelli) .portal-bar {
  top: 0;
  right: 0;
  left: auto;
  width: var(--sag-sutun);
  padding: 12px 14px;
  background: var(--panel);
  border: 0;
  border-left: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  box-shadow: none;
  z-index: 30;
}

body:has(#connect-view.panelli) .dock {
  top: var(--bar-yuksekligi);   /* JS ile olculur */
  right: 0;
  bottom: 0;
  left: auto;
  width: var(--sag-sutun);
  height: auto;
  max-height: none;
  border-radius: 0;
  border-right: 0;
  border-bottom: 0;
  box-shadow: none;
  z-index: 20;
}

#connect-view.panelli {
  justify-content: center;
  padding-left: 0;
  padding-right: var(--sag-sutun);
}

@media (min-width: 700px) {
  body:has(#connect-view.panelli) .chat-bar { right: calc(var(--sag-sutun) + 16px); }
  body:has(#connect-view.panelli) .surum { right: calc(var(--sag-sutun) + 10px); }
}

/* Telefon genisligi: sutun tam ekran, kart altina gecer */
@media (max-width: 699px) {
  body:has(#connect-view.panelli) .portal-bar { left: 0; border-left: 0; }

  body:has(#connect-view.panelli) .dock {
    left: 0;
    bottom: auto;
    max-height: 50vh;
    border-left: 0;
  }

  #connect-view.panelli {
    align-items: flex-start;
    overflow-y: auto;
    padding-right: 0;
    padding-top: calc(var(--bar-yuksekligi) + 12px);
  }
}

.perms-info.hata { color: #ff9c9c; }

/* --- Kisi sag tik menusu (surekli erisim parolasi); yetki yoksa acilmaz --- */
.kisi-menu {
  position: fixed;
  z-index: 9999;
  min-width: 248px;
  padding: 5px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel);
  box-shadow: 0 14px 40px rgba(0, 0, 0, .5);
}
.kisi-menu button {
  display: block;
  width: 100%;
  padding: 9px 11px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--fg);
  font: inherit;
  font-size: 12.5px;
  text-align: left;
  cursor: pointer;
}
.kisi-menu button:hover { background: var(--panel-2); }
.kisi-menu button:disabled { opacity: .45; cursor: default; }
.kisi-menu .km-baslik {
  padding: 7px 11px 5px;
  color: var(--muted);
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: .06em;
}

.sure-satir { display: flex; gap: 8px; align-items: center; }
.sure-satir input { flex: 0 0 90px; margin-bottom: 0 !important; }
.sure-satir select { flex: 1; margin-bottom: 0 !important; }

.surekli-durum {
  margin: 0 0 14px;
  padding: 10px 12px;
  border-radius: 9px;
  border: 1px solid var(--line);
  font-size: 12px;
  line-height: 1.5;
}
.surekli-durum.acik  { background: #16331c; border-color: #2c6b3a; color: #a7e6b4; }
.surekli-durum.doldu { background: #3a3212; border-color: #6b5a1e; color: #ffd479; }
.surekli-durum.yok   { color: var(--muted); }

.zorunlu { color: #f85149; font-weight: 700; }
.user-form input.eksik,
.modal input.eksik { border-color: #f85149; }

/* --- Onay kutusu satiri (ayarlar, SQL) --- */

.sohbet-bildirim {
  display: flex !important;
  align-items: center;
  gap: 8px;
  margin: 0 0 12px !important;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--panel-2);
  font-size: 12px;
  color: var(--muted);
  cursor: pointer;
}
.sohbet-bildirim input { width: 15px !important; height: 15px !important; flex: 0 0 15px; margin: 0 !important; }

.sohbet-liste { overflow-y: auto; flex: 1; min-height: 120px; }

.sohbet-satir {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 10px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--fg);
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.sohbet-satir:hover { background: var(--panel-2); }
/* Ad ve alt satir blok: inline span'ler yan yana akip birbirine yapisiyordu. */
.sohbet-satir .s-orta {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.sohbet-satir .s-ad {
  display: block;
  font-size: 13px;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.sohbet-satir .s-son {
  display: block;
  font-size: 11.5px;
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.sohbet-satir .s-sag { flex: 0 0 auto; text-align: right; }
.sohbet-satir .s-saat { display: block; font-size: 10.5px; color: var(--muted); font-variant-numeric: tabular-nums; }
.sohbet-satir mark { background: #4a3a12; color: #ffd479; border-radius: 3px; padding: 0 2px; }

.sohbet-grup {
  padding: 10px 10px 4px;
  color: var(--muted);
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: .06em;
}

.mesaj-bildirim {
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 9997;
  max-width: min(340px, calc(100vw - 32px));
  padding: 11px 14px;
  border: 1px solid var(--line);
  border-left: 3px solid var(--accent);
  border-radius: 10px;
  background: var(--panel);
  color: var(--fg);
  box-shadow: 0 10px 30px rgba(0, 0, 0, .45);
  cursor: pointer;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity .18s ease, transform .18s ease;
}
.mesaj-bildirim.gorunur { opacity: 1; transform: translateY(0); }
.mesaj-bildirim .mb-ad { font-size: 12.5px; font-weight: 600; }
.mesaj-bildirim .mb-metin { font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

#btn-sohbetler .badge { margin-left: 6px; }

/* --- Sohbetler: iki bolmeli katman (solda liste + arama, sagda konusma) --- */
.sohbetler-view {
  position: fixed;
  inset: 0;
  z-index: 9000;
  display: grid;
  grid-template-columns: minmax(280px, 360px) 1fr;
  background: var(--bg);
}

.sv-kapat {
  position: absolute;
  top: 12px;
  right: 14px;
  width: 34px;
  height: 34px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--panel-2);
  color: var(--fg);
  font-size: 15px;
  line-height: 1;
  cursor: pointer;
}
.sv-kapat:hover { border-color: var(--accent); }

/* --- Sol --- */
.sv-sol {
  display: flex;
  flex-direction: column;
  min-width: 0;
  border-right: 1px solid var(--line);
  background: var(--panel);
}
/* Baslik margin-right:auto ile bosluğu alir; iki dugme sagda yan yana. */
.sv-baslik {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 14px 14px 8px;
}
.sv-baslik h3 { margin: 0 auto 0 0; font-size: 17px; }
.sv-ikon {
  width: 32px; height: 32px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-2);
  color: var(--fg);
  font-size: 15px; line-height: 1;
  cursor: pointer;
}
.sv-ikon:hover { border-color: var(--accent); }

.sv-ara { padding: 0 14px 8px; }
.sv-ara input {
  width: 100%;
  height: 34px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--bg);
  color: var(--fg);
  font: inherit;
  font-size: 12.5px;
}
.sv-sol .sohbet-liste { padding: 0 8px 12px; }
.sv-sol .login-hint { padding: 0 16px; }

.sohbet-satir.acik { background: var(--panel-2); box-shadow: inset 2px 0 0 var(--accent); }

/* --- Sag --- */
.sv-sag { display: flex; flex-direction: column; min-width: 0; background: var(--bg); }

.sv-sag-baslik {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 60px 12px 16px;
  border-bottom: 1px solid var(--line);
  background: var(--panel);
}
.sv-kim { display: flex; flex-direction: column; min-width: 0; }
.sv-ad { font-size: 14px; font-weight: 600; }
.sv-alt { font-size: 11.5px; color: var(--muted); }

.sv-kayit {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.sv-bos {
  flex: 1;
  display: grid;
  place-items: center;
  text-align: center;
  color: var(--muted);
  padding: 24px;
}
.sv-bos-baslik { font-size: 20px; color: var(--fg); margin-bottom: 8px; }
.sv-bos p { margin: 6px 0; font-size: 13px; }
.sv-bos-alt { opacity: .7; font-size: 12px !important; }

.sv-form {
  display: flex;
  gap: 8px;
  padding: 12px 16px;
  border-top: 1px solid var(--line);
  background: var(--panel);
}
.sv-form input {
  flex: 1;
  height: 38px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 19px;
  background: var(--bg);
  color: var(--fg);
  font: inherit;
  margin: 0 !important;
}
.sv-form .pbtn { height: 38px; border-radius: 19px; }

.sv-gun {
  align-self: center;
  margin: 8px 0;
  padding: 3px 10px;
  border-radius: 10px;
  background: var(--panel-2);
  color: var(--muted);
  font-size: 11px;
}

/* Dar ekran: once liste, konusma acilinca liste gizlenir */
@media (max-width: 760px) {
  .sohbetler-view { grid-template-columns: 1fr; }
  .sohbetler-view.konusma-acik .sv-sol { display: none; }
  .sohbetler-view:not(.konusma-acik) .sv-sag { display: none; }
}

.ti-baslik2 { margin: 0 0 8px; font-size: 13px; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }

.ti-bos { color: var(--muted); font-size: 12.5px; }

/* --- SQL konsolu: tablo kendi icinde yatay kayar --- */
.sql-baglan { display: flex; flex-direction: column; gap: 10px; }
.sql-satir { display: flex; gap: 10px; flex-wrap: wrap; }
.sql-satir label { flex: 1 1 180px; min-width: 0; font-size: 12.5px; }

.sql-db-sec {
  padding: 4px 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-2);
  color: var(--fg);
  font-size: 12px;
  max-width: 220px;
}

/* Agac kademeleri: SSMS'teki acac genisligi kadar (14px) iceri. */
.sql-kademe0 { margin-left: 0; }
.sql-kademe1 { margin-left: 14px; }
.sql-kademe2 { margin-left: 28px; }
.sql-kademe3 { margin-left: 42px; }
.sql-kademe4 { margin-left: 56px; }
.sql-kademe5 { margin-left: 70px; }
.sql-kademe6 { margin-left: 84px; }
/* Acac: SSMS'teki gibi kutulu + / − */
.sql-nesne-ok.sql-ok-kutu {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0;
}
.sql-ok-kutu span {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 11px;
  height: 11px;
  border: 1px solid color-mix(in srgb, var(--muted) 65%, transparent);
  border-radius: 2px;
  color: var(--fg);
  font-family: Consolas, "Courier New", monospace;
  font-size: 10px;
  line-height: 1;
}
.sql-ok-kutu:hover span { border-color: var(--accent); color: var(--accent); }

/* --- Agac simgeleri: yazi tipinden bagimsiz, kutularla ciziliyor --- */
.sql-simge {
  flex: none;
  width: 11px;
  height: 11px;
  border: 1px solid currentColor;
  border-radius: 2px;
  opacity: .5;
}
.sql-simge.klasor {
  border-top-width: 4px;
  border-radius: 0 3px 3px 3px;
  background: color-mix(in srgb, currentColor 30%, transparent);
  color: #d8b24a;
  opacity: .95;
}
:root[data-tema="acik"] .sql-simge.klasor { color: #c99700; }

.sql-simge.veritabani {
  border-radius: 50% / 24%;
  border-top-width: 3px;
  color: #9aa7b8;
  opacity: .9;
}
:root[data-tema="acik"] .sql-simge.veritabani { color: #6d7c8f; }

.sql-simge.sunucu {
  border-bottom-width: 4px;
  border-radius: 2px;
  color: #7fb069;
  opacity: .95;
}
:root[data-tema="acik"] .sql-simge.sunucu { color: #3e7c2f; }

.sql-simge.tablo   { border-top-width: 4px; }
.sql-simge.yordam {
  border-radius: 2px;
  border-right-width: 4px;
  color: #7fb7c4;
}
:root[data-tema="acik"] .sql-simge.yordam { color: #2f6f7e; }

.sql-simge.indeks {
  border-radius: 2px;
  border-left-width: 4px;
  color: #9b8ec4;
}
:root[data-tema="acik"] .sql-simge.indeks { color: #6b5aa6; }
.sql-simge.gorunum { border-style: dashed; opacity: .42; }

.sql-nesne-ad.sql-klasor .sql-nesne-metin { font-weight: 600; }
.sql-nesne-sema { color: var(--muted); }
/* Acik sekmenin sunucusu ve veritabani vurgulu. */
.sql-nesne.secili > .sql-nesne-ad {
  background: color-mix(in srgb, var(--accent) 16%, transparent);
}

.sql-bolum-durgun { cursor: default; }

.sql-sekme-davet { max-width: 520px; }
.sql-davet-baslik { margin: 0 0 6px; font-weight: 600; }
.sql-sekme-davet .pbtn { margin-top: 12px; }

/* --- Sonuc tablosunda elle duzeltme: duzenlenebilir hucre belli olmali --- */
.sql-duzelt-ipucu {
  margin: 0 0 6px;
  color: var(--muted);
  font-size: 12px;
}
.sql-tablo td.duzeltilebilir { cursor: cell; }
.sql-tablo td.duzeltilebilir:hover {
  background: color-mix(in srgb, var(--accent) 12%, transparent);
}
.sql-tablo td.degisti {
  background: color-mix(in srgb, var(--ok) 22%, transparent);
}
.sql-hucre-giris {
  width: 100%;
  min-width: 60px;
  box-sizing: border-box;
  padding: 2px 4px;
  border: 1px solid var(--accent);
  border-radius: 4px;
  background: var(--bg);
  color: var(--fg);
  font: inherit;
}
.sql-ipucu {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 11.5px;
}
.sql-ipucu code {
  background: var(--panel-2);
  border-radius: 4px;
  padding: 0 4px;
}
.sql-satir input {
  width: 100%;
  margin-top: 5px;
  padding: 8px 11px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--bg);
  color: var(--fg);
  font: inherit;
  font-size: 13px;
}
.sql-secenekler { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.sql-secenekler .pbtn { margin-left: auto; }

.sql-basi {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 9px 12px;
  margin-bottom: 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel-2);
}
.sql-bilgi { font-size: 12.5px; font-variant-numeric: tabular-nums; }

.sql-birakma { outline: 2px dashed var(--accent); outline-offset: -6px; }

/* --- Sorgu sekmeleri: tasarsa yatay kayar, sarma yok --- */
.sql-sekme-serit {
  display: flex;
  align-items: stretch;
  gap: 6px;
  flex: none;
  margin-bottom: -1px;   /* secili sekme editorun kenarina yapissin */
}
.sql-sorgu-serit {
  display: flex;
  gap: 2px;
  flex: 1;
  min-width: 0;
  overflow-x: auto;
  scrollbar-width: thin;
}
.sql-sorgu-sekme {
  display: flex;
  align-items: center;
  flex: none;
  max-width: 280px;
  border: 1px solid var(--line);
  border-bottom-color: transparent;
  border-radius: 8px 8px 0 0;
  background: var(--panel-2);
}
.sql-sorgu-sekme.secili {
  background: var(--bg);
  border-bottom-color: var(--bg);
}
.sql-sorgu-ad {
  display: flex;
  align-items: baseline;
  gap: 6px;
  min-width: 0;
  padding: 6px 4px 6px 10px;
  border: 0;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 12.5px;
  cursor: pointer;
}
.sql-sorgu-sekme.secili .sql-sorgu-ad { color: var(--fg); }
.sql-sorgu-baslik { flex: none; white-space: nowrap; }
.sql-sorgu-db {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--muted);
  font-size: 11px;
}
.sql-sorgu-x {
  flex: none;
  padding: 0 8px 0 4px;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 11px;
  line-height: 1;
  cursor: pointer;
}
.sql-sorgu-x:hover { color: var(--danger); }
.sql-sorgu-ekle {
  flex: none;
  align-self: center;
  width: 28px;
  height: 26px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-2);
  color: var(--muted);
  font-size: 13px;
  cursor: pointer;
}
.sql-sorgu-ekle:hover { color: var(--fg); border-color: var(--accent); }

.sql-sekme-sonuc { display: flex; flex-direction: column; gap: 18px; }
.sql-sekme-sonuc[hidden] { display: none; }

/* --- Bagli degilken --- */
.sql-bos {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  flex: 1;
  min-height: 260px;
  padding: 40px 20px;
  text-align: center;
}
.sql-bos[hidden] { display: none; }
body.sql-sekmesi .sql-bos { position: absolute; inset: 0; }
.sql-bos-baslik { margin: 0; font-size: 15px; font-weight: 600; }
.sql-bos .login-hint { margin: 0; }

/* Baglanti penceresi ayarlar penceresinin (9500) ustunde. */
#sql-baglan-modal { z-index: 9800; }

/* Object Explorer basligi ve arac cubugu. */
.sql-oe-arac {
  display: flex;
  align-items: center;
  gap: 4px;
  flex: none;
  padding: 5px 8px;
  border-bottom: 1px solid var(--line);
  background: var(--panel-2);
}
.sql-oe-dugme {
  display: flex;
  align-items: center;
  gap: 6px;
  height: 24px;
  padding: 0 8px;
  border: 1px solid transparent;
  border-radius: 6px;
  background: transparent;
  color: var(--fg);
  font: inherit;
  font-size: 12px;
  cursor: pointer;
}
.sql-oe-dugme.sim { padding: 0; width: 26px; justify-content: center; font-size: 13px; color: var(--muted); }
.sql-oe-dugme:hover:not(:disabled) { border-color: var(--line); background: var(--panel); }
.sql-oe-dugme:disabled { opacity: .4; cursor: default; }
#sql-oe-kes:hover:not(:disabled) { color: var(--danger); }

.sql-bolum-basi.sql-oe-basi {
  letter-spacing: .02em;
  border-bottom: 1px solid var(--line);
}
.sql-baglan-kart { width: min(560px, 94vw); }
.sql-degisim {
  margin: 0 0 4px;
  padding: 8px 10px;
  border: 1px solid color-mix(in srgb, #d29922 45%, transparent);
  border-radius: 8px;
  background: color-mix(in srgb, #d29922 12%, transparent);
  line-height: 1.45;
}
.sql-degisim[hidden] { display: none; }

/* --- Sorgu kutusu: .sql-satir-no (oluk), .sql-boya (renkli goruntu), #sql-metin (saydam textarea) ---
.sql-boya ile #sql-metin'in her olcusu ayni olmali (yazi tipi, punto, satir yuksekligi,
ic bosluk, sekme genisligi); yoksa renkler yanlis yere duser. */
.sql-editor {
  display: flex;
  flex: none;               /* dikey flex'te ezilmesin */
  /* Uzun satir sayfayi itmesin: kaydirma editorun icinde. */
  min-width: 0;
  max-width: 100%;
  border: 1px solid var(--line);
  border-radius: 0 8px 10px 10px;
  background: var(--bg);
  overflow: hidden;
}
.sql-editor:focus-within { border-color: color-mix(in srgb, var(--accent) 55%, var(--line)); }

/* Satir numarasi olugu (SSMS gibi); altin serit olugu metinden ayirir. */
.sql-satir-no {
  flex: none;
  min-width: 3ch;
  /* min-height:auto ile oluk icerik kadar uzayip kutuyu buyutuyordu; 0 ile kaydirma iceride kalir. */
  min-height: 0;
  overflow: hidden;
  padding: 12px 10px 12px 12px;
  border-right: 3px solid #d7b43c;
  background: var(--bg);
  color: #6a9bb5;
  text-align: right;
  user-select: none;
  font-variant-numeric: tabular-nums;
}
:root[data-tema="acik"] .sql-satir-no { color: #2b91af; }

.sql-yazi { position: relative; flex: 1; min-width: 0; min-height: 0; }

/* Olculeri paylasan iki katman */
.sql-satir-no,
.sql-boya,
#sql-metin {
  margin: 0;
  font-family: Consolas, "Courier New", monospace;
  font-size: 13px;
  line-height: 1.5;
  /* Karakter izgarasi: kesirli karakter genisligi satir boyunca birikip imleci kaydiriyordu.
  Harf araligi karakteri tam piksele oturtur; deger calisma aninda olculur (portal.js sqlIzgarayaOturt). */
  letter-spacing: var(--sql-harf-aralik, 0px);
  /* wrap="off": uzun satirlar yatay kayar. */
  white-space: pre;
  overflow-wrap: normal;
  tab-size: 4;
}
.sql-boya,
#sql-metin {
  padding: 12px 14px;
  border: 0;
}

.sql-boya {
  position: absolute;
  inset: 0;
  overflow: hidden;         /* kaydirmayi JS yapiyor */
  pointer-events: none;
  color: var(--fg);
}

#sql-metin {
  position: relative;
  display: block;
  width: 100%;
  min-height: 120px;
  resize: vertical;
  overflow: auto;
  background: transparent;
  /* Yazi saydam: gorunen .sql-boya; imlec ve secim textarea'dan. */
  color: transparent;
  caret-color: var(--fg);
}
#sql-metin::placeholder { color: var(--muted); }
#sql-metin::selection { background: color-mix(in srgb, var(--accent) 40%, transparent); }

/* Belirgin, tutulabilir kaydirma cubugu (wrap="off"). */
#sql-metin { scrollbar-width: auto; scrollbar-color: var(--muted) var(--panel-2); }
#sql-metin::-webkit-scrollbar { width: 13px; height: 13px; }
#sql-metin::-webkit-scrollbar-track { background: var(--panel-2); }
#sql-metin::-webkit-scrollbar-thumb {
  background: color-mix(in srgb, var(--muted) 60%, transparent);
  border: 3px solid var(--panel-2);
  border-radius: 8px;
}
#sql-metin::-webkit-scrollbar-thumb:hover { background: var(--muted); }
#sql-metin::-webkit-scrollbar-corner { background: var(--panel-2); }

/* --- Sozdizimi renkleri: taban koyu (VS Code), acik tema SSMS renkleri ---
Yatiklik kapali: harf genisligini degistirip textarea ile hizayi bozar. */
.sql-boya i { font-style: normal; }

.sql-boya .sa { color: #569cd6; }   /* anahtar kelime  */
.sql-boya .sm { color: #ce9178; }   /* metin ('...')   */
.sql-boya .sy { color: #6a9955; }   /* yorum           */
.sql-boya .si { color: #c586c0; }   /* sistem islevi   */

:root[data-tema="acik"] .sql-boya .sa { color: #0000ff; }
:root[data-tema="acik"] .sql-boya .sm { color: #a31515; }
:root[data-tema="acik"] .sql-boya .sy { color: #008000; }
:root[data-tema="acik"] .sql-boya .si { color: #af00db; }

/* --- Tablo adi tamamlama listesi ---
position: fixed (konum JS'ten; konsol ayarlar penceresinde de calisir).
z-index 9850: .modal (9500) ustunde, #kod-modal (9900) ve #onay-modal (10000) altinda. */
.sql-tamamla {
  position: fixed;
  z-index: 9850;
  max-height: 244px;
  overflow-y: auto;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel);
  box-shadow: 0 10px 30px rgb(0 0 0 / 28%);
}
/* [hidden] tek sinifli kurali yenemiyor; acikca yaziliyor. */
.sql-tamamla[hidden] { display: none; }

.sql-tamamla-satir {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  min-width: 0;
  padding: 5px 8px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--fg);
  font-family: Consolas, "Courier New", monospace;
  font-size: 12.5px;
  text-align: left;
  cursor: pointer;
}
.sql-tamamla-satir:hover { background: var(--panel-2); }
.sql-tamamla-satir.secili { background: color-mix(in srgb, var(--accent) 16%, transparent); }
.sql-tamamla-ad { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sql-tamamla-ad b { font-weight: 700; }
.sql-tamamla-sema { color: var(--muted); }
.sql-tamamla-tur { margin-left: auto; padding-left: 8px; color: var(--muted); font-size: 10.5px; }

.sql-arac { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin: 10px 0; }
.sql-tus {
  padding: 1px 5px;
  border: 1px solid color-mix(in srgb, #fff 45%, transparent);
  border-radius: 4px;
  font-size: 10.5px;
  opacity: .85;
}
.sql-arac .login-hint { margin: 0; }
.sql-limit { display: flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--muted); }
.sql-limit select {
  height: 30px;
  padding: 0 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--bg);
  color: var(--fg);
  font: inherit;
  font-size: 12.5px;
}
.sql-durum { margin-left: auto; color: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; }

.sql-sonuc { display: flex; flex-direction: column; gap: 18px; }
.sql-kume .ti-bos, .sql-kume .ti-baslik2 { margin: 0 0 6px; }
.sql-kirpik { margin: 0 0 6px; color: #ffbb7a; font-size: 12px; }
:root[data-tema="acik"] .sql-kirpik { color: #a85b12; }

.sql-tablo-sar { overflow: auto; max-height: 46vh; border: 1px solid var(--line); border-radius: 10px; }
.sql-tablo { border-collapse: collapse; font-size: 12.5px; white-space: nowrap; }
.sql-tablo th, .sql-tablo td {
  padding: 6px 10px;
  border-bottom: 1px solid var(--line);
  border-right: 1px solid var(--line);
  text-align: left;
  max-width: 380px;
  overflow: hidden;
  text-overflow: ellipsis;
}
.sql-tablo thead th {
  position: sticky;
  top: 0;
  background: var(--panel);
  color: var(--muted);
  font-weight: 600;
  font-size: 11.5px;
  z-index: 1;
}
/* --- Sonuc tablosu: sutun genisligi (table-layout: fixed) ve satir secimi --- */
.sql-tablo th { position: relative; }
.sql-bas-ad { display: block; overflow: hidden; text-overflow: ellipsis; }
.sql-tut {
  position: absolute;
  top: 0; right: -3px; bottom: 0;
  width: 7px;
  cursor: col-resize;
  user-select: none;
}
.sql-tut:hover { background: var(--accent); opacity: .55; }
body.sql-sutun-suruklu { cursor: col-resize; user-select: none; }

/* Elle genisletilince 380px ust siniri kalkar. */
.sql-tablo[data-olculu="1"] th,
.sql-tablo[data-olculu="1"] td { max-width: none; }

.sql-tablo tbody tr.secili td { background: rgba(217, 31, 54, .22); }
.sql-tablo tbody tr.secili:hover td { background: rgba(217, 31, 54, .28); }
/* Tiklanan hucre: Ctrl+C yalnizca bunu kopyalar */
.sql-tablo tbody td.aktif-hucre { outline: 2px solid var(--accent); outline-offset: -2px; }

.sql-kopya-serit {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 2px 0 6px;
  flex-wrap: wrap;
}
.sql-kopya-serit .login-hint { margin-right: auto; }

.sql-tablo td.bos { color: var(--muted); font-style: italic; }
.sql-tablo tbody tr:hover { background: var(--panel-2); }

/* --- SQL sekmesi: portal gizlenir, ekrani konsol kaplar --- */
body.sql-sekmesi #connect-view,
body.sql-sekmesi .portal-bar,
body.sql-sekmesi .dock,
body.sql-sekmesi .chat-bar,
body.sql-sekmesi .arac-bar,
body.sql-sekmesi .surum { display: none !important; }

/* Tam ekranda .modal'in dikey kaydirma cubugu yer kaplamasin (konsol kendi icinde kayar). */
body.sql-sekmesi #profile-modal { padding: 0; background: var(--bg); overflow: hidden; }
body.sql-sekmesi { overflow: hidden; }
body.sql-sekmesi .ayar-menu,
body.sql-sekmesi #profile-close { display: none !important; }

/* Portal icinde SQL: ayni sekmede (body.sql-sekmesi); body.sql-sayfada donus dugmeleri gorunur. */
.sql-sayfa-kapat { display: none; }
body.sql-sayfada .sql-sayfa-kapat { display: inline-flex; align-items: center; justify-content: center; }
.sql-mesaj { width: auto; padding: 0 8px; gap: 4px; color: #fff; background: var(--accent); border-color: var(--accent); }
.sql-mesaj[hidden] { display: none; }
.sql-portala-don { flex: none; align-self: center; height: 28px; padding: 0 12px; font-size: 12.5px; white-space: nowrap; }

/* Yerel SQL araci: sayfa zaten konsol, "Yeni sekmede aç" gizli. */
body.yerel-arac #sql-sekmede-ac { display: none !important; }

/* --- Ayarlar > Araçlar --- */
.arac-liste { display: flex; flex-direction: column; gap: 10px; margin-top: 14px; }
.arac {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel-2);
}
.arac-bilgi { display: flex; flex-direction: column; gap: 2px; flex: 1; min-width: 0; }
.arac-ad { font-size: 13px; }
.arac-ayrinti { color: var(--muted); font-size: 11.5px; font-variant-numeric: tabular-nums; }
.arac .pbtn { flex: none; }

/* Ayarlar izgarasini birak: gizli menu sutunu da yer kapliyordu. */
body.sql-sekmesi .modal-card.ayar-pencere,
body.sql-sekmesi .modal-card.ayar-pencere.genis {
  position: relative;
  display: block;
  /* 100vw degil: kaydirma cubugunu da sayar. */
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  padding: 0;
  gap: 0;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}
body.sql-sekmesi #ayar-sql { position: absolute; inset: 0; }

/* --- Baglanti formu (ortada acilan pencere): yalnizca alan yerlesimi --- */
#sql-baglan-form .sql-satir { flex-direction: row; flex-wrap: wrap; gap: 10px; }
#sql-baglan-form .sql-satir label { flex: 1 1 0; min-width: 0; font-size: 11.5px; }
#sql-baglan-form .sql-satir input { margin-top: 4px; padding: 7px 10px; }
#sql-baglan-form .sql-secenekler { flex-direction: column; align-items: stretch; gap: 8px; }
#sql-baglan-form .sql-secenekler .pbtn { margin-left: auto; min-width: 120px; }
#sql-baglan-form .login-hint { margin: 10px 0 0; font-size: 11px; line-height: 1.45; }
#sql-baglan-form .dock-check { font-size: 11.5px; }

/* --- Baglandiktan sonra: sol panel + calisma alani, tam ekran --- */
body.sql-sekmesi #sql-calisma {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
}
body.sql-sekmesi .sql-nesneler {
  height: 100%;
  border: 0;
  border-right: 1px solid var(--line);
  border-radius: 0;
}
body.sql-sekmesi .sql-ana {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
  padding: 14px 18px 18px;
  overflow-y: auto;
}
body.sql-sekmesi #sql-metin { min-height: 240px; }
/* sticky en yakin kayan kutuya tutunur: tablo kendisi kaysin diye yukseklik sinirli. */
body.sql-sekmesi .sql-tablo-sar { max-height: 62vh; }
/* Hazir sorgu listesi yedi satir: agaci ezmesin. */
body.sql-sekmesi .sql-hazir-liste { max-height: 210px; }

/* --- SQL konsolu: telefon / tablet ---
Dar ekranda nesne agaci cekmecede (☰), dokunma hedefleri buyur, form alanlari alt alta.
Sag tik basili tutmayla (portal.js uzunBasma). */
.sql-nesne-ac {
  display: none;               /* genis ekranda yok */
  flex: none;
  width: 34px;
  height: 34px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-2);
  color: var(--fg);
  font-size: 15px;
  cursor: pointer;
}

@media (max-width: 820px) {
  body.sql-sekmesi #sql-calisma {
    grid-template-columns: minmax(0, 1fr);
  }
  .sql-nesne-ac { display: block; }

  body.sql-sekmesi .sql-nesneler {
    position: absolute;
    inset: 0 auto 0 0;
    width: min(86vw, 330px);
    z-index: 30;
    transform: translateX(-102%);
    transition: transform .18s ease;
    box-shadow: 0 0 0 100vmax rgba(0, 0, 0, 0);
  }
  body.sql-sekmesi #sql-calisma.cekmece-acik .sql-nesneler {
    transform: none;
    box-shadow: 18px 0 40px rgba(0, 0, 0, .45);
  }

  body.sql-sekmesi .sql-ana { padding: 10px 12px 14px; }
  body.sql-sekmesi #sql-metin { min-height: 120px; }
  body.sql-sekmesi .sql-tablo-sar { max-height: 46vh; }
  body.sql-sekmesi .sql-hazir-liste { max-height: 160px; }

  .sql-oe-dugme { height: 32px; font-size: 12.5px; }
  .sql-oe-dugme.sim { width: 32px; }
  .sql-nesne-ad { min-height: 34px; }
  .sql-arac .pbtn, .sql-arac button { min-height: 34px; }

  /* Secici ID ile: #sql-baglan-form .sql-satir kurali tek sinifliyi hep ezer. */
  #sql-baglan-form .sql-satir { flex-direction: column; gap: 8px; }
  #sql-baglan-form .sql-satir label { flex: 1 1 auto; font-size: 12.5px; }
  #sql-baglan-form .sql-secenekler { flex-wrap: wrap; gap: 8px; }
  #sql-baglan-form .sql-secenekler .pbtn { margin-left: 0; width: 100%; }
  /* iOS 16px alti alanda yakinlastirir; ID sart (padding ID ile veriliyor). */
  #sql-baglan-form .sql-satir input,
  #sql-baglan-form input[type=text],
  #sql-baglan-form input[type=password],
  #sql-metin, #sql-nesne-ara, .sql-hazir-ara { font-size: 16px; }
}

/* Ayarlar penceresi icinde: sol panel yok, tek sutun */
#sql-calisma { min-height: 0; }

/* --- SQL sol panel (tablolar + hazir sorgular); yalnizca yeni sekmede --- */
.sql-nesneler {
  display: flex;
  flex-direction: column;
  min-height: 0;
  background: var(--panel);
  overflow: hidden;
}
.sql-nesneler input[type=search] {
  margin: 12px 12px 8px;
  height: 32px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--bg);
  color: var(--fg);
  font: inherit;
  font-size: 12.5px;
}
.sql-nesne-liste { flex: 1; overflow-y: auto; padding: 0 8px 8px; min-height: 60px; }
.sql-nesne-liste .ti-bos { padding: 6px 8px 0; line-height: 1.45; }

/* --- SQL arama kipi (Tablo adı / Veri) ---
[hidden] acikca yaziliyor: bu dosyada tek sinifli kurallar [hidden]'i eziyor. */
.sql-ara-kip { display: flex; gap: 4px; margin: 12px 12px 0; }
.sql-ara-kip-dugme {
  flex: 1;
  padding: 5px 8px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 11.5px;
  cursor: pointer;
}
.sql-ara-kip-dugme:hover { color: var(--fg); }
.sql-ara-kip-dugme.secili {
  border-color: var(--accent);
  background: var(--panel-2);
  color: var(--fg);
}

.sql-veri-arac {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px 10px;
  margin: 0 12px 6px;
}
.sql-veri-arac[hidden] { display: none; }
.sql-veri-secenek {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--muted);
  font-size: 11.5px;
  cursor: pointer;
}
.sql-veri-secenek input { margin: 0; }
.sql-veri-dugme { margin-left: auto; }

.sql-veri-durum {
  margin: 0 12px 6px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.45;
  font-variant-numeric: tabular-nums;
}
.sql-veri-durum[hidden] { display: none; }

/* --- Veri arama sonuclari --- */
.sql-veri-sonuc[hidden], #sql-db-liste[hidden] { display: none; }
.sql-veri-tablo {
  display: flex;
  align-items: center;
  gap: 6px;
  width: 100%;
  padding: 7px 6px 4px;
  border: 0;
  background: transparent;
  color: var(--fg);
  font: inherit;
  font-size: 12.5px;
  text-align: left;
  cursor: pointer;
}
.sql-veri-tablo:hover { background: var(--panel-2); }
.sql-veri-tablo-ad { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sql-veri-kolonlar { display: flex; flex-direction: column; margin: 0 0 6px 10px; }
.sql-veri-kolon {
  display: flex;
  flex-direction: column;
  gap: 1px;
  padding: 5px 8px;
  border: 0;
  border-left: 2px solid var(--line);
  border-radius: 0 7px 7px 0;
  background: transparent;
  color: var(--fg);
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.sql-veri-kolon:hover { background: var(--panel-2); border-left-color: var(--accent); }
.sql-veri-kolon-ust { display: flex; align-items: baseline; gap: 6px; }
.sql-veri-kolon-ad { font-size: 12px; }
.sql-veri-kolon-tur {
  color: var(--muted);
  font-size: 10.5px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.sql-veri-adet {
  margin-left: auto;
  flex: none;
  color: var(--muted);
  font-size: 10.5px;
  font-variant-numeric: tabular-nums;
}
.sql-veri-ornek {
  color: var(--muted);
  font-family: Consolas, "Courier New", monospace;
  font-size: 10.5px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
/* Taranamayan tablolar: aranan deger orada olabilir, belirgin gosterilir. */
.sql-veri-durum.uyari { color: #e0b050; }
:root[data-tema="acik"] .sql-veri-durum.uyari { color: #9a6c00; }
.sql-veri-atlanan-basi {
  margin: 10px 6px 4px;
  color: #e0b050;
  font-size: 11px;
  line-height: 1.45;
}
:root[data-tema="acik"] .sql-veri-atlanan-basi { color: #9a6c00; }
.sql-veri-atlanan {
  display: flex;
  flex-direction: column;
  gap: 1px;
  width: 100%;
  padding: 4px 8px;
  border: 0;
  border-left: 2px solid color-mix(in srgb, #e0b050 60%, transparent);
  border-radius: 0 7px 7px 0;
  margin-left: 10px;
  background: transparent;
  color: var(--fg);
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.sql-veri-atlanan:hover { background: var(--panel-2); }
.sql-veri-atlanan-ad { font-size: 11.5px; }
.sql-veri-atlanan-sebep {
  color: var(--muted);
  font-size: 10.5px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.sql-veri-devam { margin: 8px 6px; }

.sql-nesne { display: flex; align-items: stretch; gap: 2px; }
.sql-nesne-ok {
  width: 20px;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 10px;
  cursor: pointer;
}
.sql-nesne-ok:hover { color: var(--fg); }
.sql-nesne-ok:disabled { cursor: default; opacity: 0; }
.sql-nesne-ad {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  padding: 5px 8px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--fg);
  font: inherit;
  font-size: 12.5px;
  text-align: left;
  cursor: pointer;
}
.sql-nesne-ad:hover { background: var(--panel-2); }
.sql-nesne-metin { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sql-nesne-tur { margin-left: auto; color: var(--muted); font-size: 10.5px; font-variant-numeric: tabular-nums; }

.sql-sutunlar { margin: 0 0 6px 22px; display: flex; flex-direction: column; }
/* Kisa yazim kademe kuralini eziyor; her kademe acikca. */
.sql-sutunlar.sql-kademe4 { margin-left: 62px; }
.sql-sutunlar.sql-kademe5 { margin-left: 76px; }
.sql-sutunlar.sql-kademe6 { margin-left: 90px; }
.sql-sutun {
  display: flex;
  gap: 8px;
  padding: 3px 8px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 11.5px;
  text-align: left;
  cursor: pointer;
}
.sql-sutun:hover { background: var(--panel-2); color: var(--fg); }
.sql-sutun-ad { color: var(--fg); }
.sql-sutun-tur { margin-left: auto; opacity: .75; }

.sql-hazir-basi {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 12px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 11.5px;
  text-transform: uppercase;
  letter-spacing: .05em;
}
.sql-hazir-basi .sv-ikon { width: 24px; height: 24px; font-size: 13px; margin-left: auto; }
.sql-hazir-sayi { color: var(--muted); font-size: 10.5px; letter-spacing: 0; text-transform: none; }

.sql-nesneler .sql-hazir-ara {
  flex: none;
  margin: 0 8px 6px;
  height: 26px;
  padding: 0 8px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--bg);
  color: var(--fg);
  font: inherit;
  font-size: 11.5px;
}

/* Bes satirdan sonra kendi icinde kayar (5 × 30px). flex: none sart: yoksa dikey flex'te kart kisilir. */
.sql-hazir-liste {
  flex: none;
  max-height: 150px;
  overflow-y: auto;
  padding: 0 8px 10px;
}
.sql-hazir-liste .ti-bos { padding: 4px 8px; line-height: 1.45; }
.sql-hazir { display: flex; align-items: center; gap: 2px; }
.sql-hazir-ad {
  flex: 1;
  min-width: 0;
  padding: 6px 8px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--fg);
  font: inherit;
  font-size: 12.5px;
  text-align: left;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  cursor: pointer;
}
.sql-hazir-ad:hover { background: var(--panel-2); }
.sql-hazir-sil {
  width: 22px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  font-size: 11px;
  cursor: pointer;
}
.sql-hazir-sil:hover { color: #ff9c9c; background: var(--panel-2); }

.sql-bolum-basi {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 11px 12px;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 11.5px;
  text-transform: uppercase;
  letter-spacing: .05em;
  text-align: left;
  cursor: pointer;
}
.sql-bolum-basi:hover { background: var(--panel-2); color: var(--fg); }
.sql-bolum-sayi { margin-left: auto; font-variant-numeric: tabular-nums; text-transform: none; }
.sql-bolum-govde { display: flex; flex-direction: column; min-height: 0; flex: 1; }

.modal-card.sql-hazir-card { width: min(620px, 100%); }
.sql-hazir-card label { display: block; margin-top: 14px; font-size: 12.5px; }
.sql-hazir-card label small { display: block; color: var(--muted); font-size: 11px; margin-top: 2px; }
.sql-hazir-card input[type=text],
.sql-hazir-card textarea {
  width: 100%;
  margin-top: 6px;
  padding: 9px 12px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--bg);
  color: var(--fg);
  font: inherit;
  font-size: 13px;
}
.sql-hazir-card textarea {
  font-family: Consolas, "Courier New", monospace;
  line-height: 1.5;
  resize: vertical;
  white-space: pre;
  overflow-wrap: normal;
  overflow-x: auto;
  tab-size: 4;
}

/* --- Personel yetkileri penceresi (.perm-* bicimi) --- */
.modal-card.musteri-yetki-card { width: min(620px, 100%); }
.musteri-yetki-card .perms-body { max-height: 52vh; overflow-y: auto; margin-top: 12px; }
.musteri-yetki-card .perms-info { margin: 12px 0 0; }

/* --- Sohbet sekmesi: ekrani Sohbetler kaplar, diger ogeler gizli --- */
body.sohbet-sekmesi #connect-view,
body.sohbet-sekmesi .portal-bar,
body.sohbet-sekmesi .dock,
body.sohbet-sekmesi .chat-bar,
body.sohbet-sekmesi .arac-bar,
body.sohbet-sekmesi .surum { display: none !important; }

body.sohbet-sekmesi .sohbetler-view { position: fixed; inset: 0; }

/* Ayri sekmede X gerekmez. */
body.sohbet-sekmesi .sv-kapat { display: none; }

body.sohbet-sekmesi .sv-sag-baslik { padding-right: 16px; }

/* --- Ayarlar --- */
.ayar-sekme {
  flex: 1;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 12.5px;
  cursor: pointer;
}
.ayar-sekme:hover { color: var(--fg); }
.ayar-sekme.secili { background: var(--panel-2); color: var(--fg); border-color: var(--accent); }

.ayar-bolum h4 { margin: 0 0 6px; font-size: 13px; }
.ayar-bolum .form-row { margin-top: 8px; }
.ayar-bolum .surekli-durum { margin: 8px 0 0; }

/* Uygulama ayarlari akordeon (KARAR 87): baslik satiri, yalnizca acik bolumun icerigi */
.ayar-akordeon > hr.ayirac { display: none; }
.ayar-akordeon > .ayar-bolum {
  border: 1px solid var(--line); border-radius: 10px; background: var(--panel); margin: 0 0 8px; padding: 0; overflow: hidden;
}
.ayar-akordeon > .ayar-bolum > h4 { margin: 0 !important; padding: 0; border: 0; line-height: 1.2; }
.ayar-akordeon > .ayar-bolum:not(.acik) > :not(h4) { display: none !important; }
.ayar-akordeon > .ayar-bolum.acik { padding-bottom: 14px; border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); }
.ayar-akordeon > .ayar-bolum.acik > :not(h4) { margin-left: 14px; margin-right: 14px; }
.akordeon-baslik {
  width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 13px 14px; border: 0; background: transparent; color: inherit;
  font: inherit; font-size: 12px; font-weight: 700; letter-spacing: inherit; text-transform: inherit; text-align: left; cursor: pointer;
}
.akordeon-baslik:hover { background: var(--panel-2); }
.akordeon-baslik:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.akordeon-ok { width: 8px; height: 8px; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: rotate(45deg); transition: transform .15s; flex: none; }
.ayar-bolum.acik .akordeon-ok { transform: rotate(-135deg); }
.ayar-bolum.acik > h4 .akordeon-baslik { border-bottom: 1px solid var(--line); margin-bottom: 10px; }

/* Musteri ekrani arka plani onizlemesi (KARAR 87) */
.zemin-onizleme {
  position: relative; aspect-ratio: 16 / 9; max-width: 420px; border-radius: 8px; border: 1px solid var(--line);
  display: flex; align-items: center; justify-content: center; padding: 12px; text-align: center;
  background: #0b1220 url('musteri-zemin.svg') center / cover no-repeat;
}
.zemin-onizleme.ozel-zemin { background-color: #000; background-size: cover; background-position: center; background-repeat: no-repeat; }
.zemin-onizleme-yazi { color: #fff; font-weight: 800; font-size: 17px; line-height: 1.2; text-shadow: 0 2px 10px rgba(0, 0, 0, .6); }
#zemin-not.hata { color: var(--danger, #e5484d); }

/* --- Ayarlar penceresi: solda menu, sagda secilen bolum --- */
.modal-card.ayar-pencere {
  /* PENCERE BOYU SABIT.
     Once bolume gore degisiyordu: Profil'de 760px / kisa, Kullanicilar'da
     1120px / uzun. Menuden her tiklamada pencere buyuyup kuculuyor, sol
     menu yatayda kayiyordu. Artik genislik de yukseklik de bolumden
     BAGIMSIZ; degisen tek sey sag bolmenin icerigi, o da kendi icinde
     kayiyor. Kucuk ekranda sigmazsa min() ekrana indiriyor. */
  width: min(1120px, 100%);
  height: min(760px, calc(100vh - 64px));
  display: grid;
  grid-template-columns: 190px minmax(0, 1fr);
  grid-template-rows: minmax(0, 1fr);
  gap: 22px;
  padding: 22px;
}
/* .genis artik boyut DEGISTIRMEZ; secici geriye donuk uyumluluk icin
   duruyor (JS hâlâ ekleyip kaldiriyor) ve genis tablolarin kendi
   kurallarina tutunma noktasi. */
.modal-card.ayar-pencere.genis { width: min(1120px, 100%); }

.ayar-menu {
  display: flex;
  flex-direction: column;
  gap: 4px;
  border-right: 1px solid var(--line);
  padding-right: 16px;
  min-width: 0;
  /* Pencere sabit yukseklikte: menu uzarsa pencereyi degil KENDINI kaydirir. */
  min-height: 0;
  overflow-y: auto;
}
.ayar-menu h3 { margin: 0 0 10px; font-size: 16px; }
.ayar-menu .ayar-sekme {
  flex: 0 0 auto;
  text-align: left;
  border-color: transparent;
  border-radius: 8px;
}
.ayar-menu .ayar-sekme:hover { background: var(--panel-2); }
.ayar-menu .ayar-sekme.secili {
  background: var(--panel-2);
  border-color: var(--accent);
}

.ayar-icerik {
  min-width: 0;
  min-height: 0;
  overflow-y: auto;
  /* Sag ustteki X'in altina girmesin */
  padding-right: 4px;
}
.ayar-icerik > .ayar-bolme > h3 { margin: 0 0 14px; font-size: 15px; }

/* Genis bolumler (kullanici tablosu, yetki agaci) dar ekranda yana kaysin */
.genis-bolme .perms-body { min-width: 0; }

/* Dar ekran: menu ustte yatay serit olur */
@media (max-width: 780px) {
  .modal-card.ayar-pencere,
  .modal-card.ayar-pencere.genis {
    grid-template-columns: minmax(0, 1fr);
    /* Menu ustte yatay serit; toplam yukseklik sabit (bolum degisince pencere ziplamaz). */
    grid-template-rows: auto minmax(0, 1fr);
    gap: 14px;
  }
  .ayar-menu {
    flex-direction: row;
    flex-wrap: wrap;
    border-right: 0;
    border-bottom: 1px solid var(--line);
    padding: 0 0 12px;
    overflow: visible;
  }
  .ayar-menu h3 { width: 100%; margin: 0 0 4px; }
}

/* Elle degistirilmis yetki satiri rozeti ("★" rolden geldigini soyler). */
.rozet {
  font-style: normal;
  font-size: 10.5px;
  padding: 1px 6px;
  margin-left: 6px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--accent) 22%, transparent);
  color: var(--accent);
  border: 1px solid color-mix(in srgb, var(--accent) 45%, transparent);
  white-space: nowrap;
}

/* Gecmis ID satirlari: style.css'teki ".son-id-liste button" kurali ✕ dugmesini de genisletiyordu; ozgulluk daha yuksek. */
.son-id-liste { overflow-x: hidden; }

.son-id-liste .son-id-satir > .son-id-sec {
  flex: 1 1 auto;
  width: auto;
  min-width: 0;
  padding: 8px 10px;
  font-size: 14px;
  letter-spacing: .04em;
}
.son-id-liste .son-id-satir > .son-id-sil {
  flex: 0 0 22px;
  width: 22px;
  height: 22px;
  padding: 0;
  font-size: 12px;
}
.son-id-liste .son-id-hepsi { width: 100%; }

/* ID satiri: "▾" dugmesi kutuyla ayni boyda (stretch alt boslugu da kapsiyordu). */
.kod-satir { margin-bottom: 18px; }
.kod-satir > input { margin-bottom: 0; }
.kod-satir > .ikon {
  width: 42px;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  line-height: 1;
}

.son-id-parola {
  margin-left: 8px;
  font-size: 10px;
  letter-spacing: 2px;
  color: var(--muted);
  vertical-align: middle;
}

/* --- Ortalanmis onay penceresi --- */
.modal-card.onay-kart { width: min(420px, 100%); text-align: left; }
.onay-metin { margin: 0 0 6px; font-size: 13.5px; line-height: 1.5; }
#onay-metin, #onay-not { white-space: pre-line; overflow-wrap: anywhere; }
.onay-dugmeler {
  display: flex;
  gap: 8px;
  margin-top: 18px;
}
.onay-dugmeler .pbtn { flex: 1; justify-content: center; }

/* --- Mesaj balonu: saat + goruldu --- */
.pmsg-time { display: flex; align-items: center; gap: 4px; }
.pmsg.me .pmsg-time { justify-content: flex-end; }
.pmsg-tik { font-size: 11px; letter-spacing: -2px; color: var(--muted); }
.pmsg-tik.goruldu { color: var(--accent); }
.pmsg.silindi .pmsg-body { font-style: italic; color: var(--muted); }

/* Onay penceresi her seyin ustunde (Sohbetler 9000, sag tik menuleri 9999). */
#onay-modal { z-index: 10000; }

/* Butun pencereler Sohbetler ekraninin (9000) ustunde. */
.modal { z-index: 9500; }

/* Esit z-index'te DOM sirasi kazanir: ayarlar penceresinden (9500) once gelen pencereler arkada kaliyordu.
Bunlar 9500 ile onay kutusu (10000) arasinda. */
#sql-hazir-modal { z-index: 9800; }

#sql-betik-modal { z-index: 9800; }

#kod-modal { z-index: 9900; }

#metin-modal { z-index: 9900; }
.modal-card.metin-kart { width: min(420px, 100%); }
.modal-card.metin-kart input { width: 100%; margin: 6px 0 4px; }

/* --- "Yeni sohbet" penceresi --- */
#yeni-sohbet-modal .modal-card {
  width: min(520px, 100%);
  display: flex;
  flex-direction: column;
}
#yeni-sohbet-modal h3 { text-align: center; margin-bottom: 14px; }

#yeni-sohbet-ara {
  display: block;
  width: 100%;
  max-width: 420px;
  margin: 0 auto 14px;
  padding: 11px 14px;
  text-align: center;
  font-size: 14px;
}
#yeni-sohbet-liste { max-height: min(60vh, 420px); overflow-y: auto; }

/* --- Log kayitlari: arac seridi, siralanabilir basliklar, suzgec satiri, sayfalama.
Tablo yatay kayar (.lg-sar); satirlar tek satirda kalir. --- */

.lg-arac {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 10px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line);
}

.lg-bosluk { flex: 1 1 auto; }
.lg-ayrac { width: 1px; height: 18px; margin: 0 4px; background: var(--line); }

.lg-sayfa {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin: 0;
  color: var(--muted);
}
.lg-sim { font-size: 13px; line-height: 1; }
.lg-sayfa select {
  width: auto;
  min-width: 0;
  height: 26px;
  padding: 0 4px;
  background: transparent;
  border: 0;
  color: var(--fg);
  font: inherit;
  font-size: 12px;
  cursor: pointer;
}

.lg-arac .lg-etiket { margin: 0; color: var(--muted); font-size: 11.5px; }

.lg-arac .lg-mini-sec {
  width: auto;
  min-width: 0;
  height: 26px;
  padding: 0 6px;
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 7px;
  color: var(--fg);
  font: inherit;
  font-size: 12px;
}

.lg-dugme {
  width: 26px;
  height: 26px;
  padding: 0;
  display: inline-grid;
  place-items: center;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 7px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1;
  cursor: pointer;
  transition: color .12s, background .12s, border-color .12s;
}
.lg-dugme:hover { color: var(--fg); background: var(--panel-2); border-color: var(--line); }
.lg-dugme.is-on { color: var(--accent); border-color: var(--accent); }

/* Sutun goster/gizle menusu */
.lg-sutun-sar { position: relative; display: inline-flex; }
.lg-menu {
  position: absolute;
  top: 30px;
  left: 0;
  z-index: 5;
  min-width: 170px;
  padding: 6px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 9px;
  box-shadow: 0 10px 28px rgba(0, 0, 0, .45);
}
.lg-menu label {
  display: flex;
  align-items: center;
  gap: 7px;
  margin: 0;
  padding: 5px 7px;
  border-radius: 6px;
  color: var(--fg);
  font-size: 12.5px;
  cursor: pointer;
}
.lg-menu label:hover { background: var(--panel-2); }
.lg-menu input { width: auto; margin: 0; }

/* --- Tablo --- */

.lg-sar {
  overflow: auto;
  max-height: 52vh;
  border: 1px solid var(--line);
  border-radius: 10px;
}

.lg-tbl {
  width: 100%;
  border-collapse: separate;      /* sticky baslikta kenarlik kaybolmasin */
  border-spacing: 0;
  font-size: 12.5px;
}

.lg-tbl th,
.lg-tbl td {
  padding: 7px 10px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  white-space: nowrap;
}

/* Baslik ve suzgec satiri birlikte yapisir. */
.lg-tbl thead th { position: sticky; top: 0; z-index: 3; }
.lg-tbl thead .lg-suzgec td { position: sticky; top: 30px; z-index: 2; }

.lg-baslik th {
  height: 30px;
  background: var(--panel-2);
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  user-select: none;
}
.lg-baslik th:hover { color: var(--fg); }
.lg-baslik th.lg-s-son { cursor: default; }

.lg-ok {
  float: right;
  margin-left: 8px;
  opacity: .28;
  font-style: normal;
  font-size: 9px;
}
.lg-ok::before { content: '▲▼'; letter-spacing: -2px; }
th.sirali .lg-ok { opacity: 1; color: var(--accent); }
th.sirali.ters .lg-ok::before { content: '▼'; }
th.sirali:not(.ters) .lg-ok::before { content: '▲'; }

.lg-suzgec td { background: var(--panel); padding: 5px 6px; }
.lg-tbl .lg-suzgec input,
.lg-tbl .lg-suzgec select {
  width: 100%;
  min-width: 0;
  height: 26px;
  padding: 0 7px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--fg);
  font: inherit;
  font-size: 12px;
}
.lg-tbl .lg-suzgec input:focus,
.lg-tbl .lg-suzgec select:focus { outline: none; border-color: var(--accent); }
.lg-tbl .lg-suzgec input:disabled { color: var(--muted); cursor: default; }

.lg-tarih { display: flex; gap: 4px; }
.lg-tarih input { flex: 1 1 0; }

.lg-sifirla {
  width: 100%;
  height: 26px;
  padding: 0 10px;
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--muted);
  font: inherit;
  font-size: 11.5px;
  white-space: nowrap;
  cursor: pointer;
}
.lg-sifirla:hover { color: var(--fg); border-color: var(--accent); }

.lg-tbl tbody tr:hover td { background: var(--panel-2); }
.lg-tbl tbody tr:last-child td { border-bottom: 0; }

.lg-tbl .lg-zaman { font-variant-numeric: tabular-nums; }
.lg-tbl .lg-ip { color: var(--muted); }
.lg-tbl .lg-bos,
.lg-tbl .lg-hata { padding: 22px 10px; color: var(--muted); text-align: center; }
.lg-tbl .lg-hata { color: #ff9c9c; }

/* Mesaj sutunu tek satir, ucu "…"; tamami title'da. */
.lg-tbl .lg-mesaj { max-width: 520px; overflow: hidden; text-overflow: ellipsis; }

.lg-tbl .gizli { display: none; }

/* Mesaj sutunu kalan yeri alir; sigmazsa tablo yana kayar. */
.lg-s-at    { width: 165px; }
.lg-s-kisi  { width: 165px; }
.lg-s-tur   { width: 150px; }
.lg-s-ip    { width: 130px; }
.lg-s-cihaz { width: 130px; }
.lg-s-son   { width: 122px; }

/* "Filtreleri Sıfırla" sutunu saga yapisik. */
.lg-tbl .lg-s-son {
  position: sticky;
  right: 0;
  background: var(--panel);
  border-left: 1px solid var(--line);
}
.lg-tbl .lg-baslik .lg-s-son { background: var(--panel-2); z-index: 4; }
.lg-tbl .lg-suzgec .lg-s-son { z-index: 3; }
.lg-tbl tbody tr:hover .lg-s-son { background: var(--panel-2); }

/* --- Alt serit: ozet + sayfalar --- */

.lg-alt {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 10px;
}

.lg-ozet { color: var(--muted); font-size: 12px; }

.lg-sayfalar { display: flex; gap: 4px; flex-wrap: wrap; }

.lg-sayfa-dugme {
  min-width: 30px;
  height: 28px;
  padding: 0 9px;
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 7px;
  color: var(--fg);
  font: inherit;
  font-size: 12px;
  cursor: pointer;
}
.lg-sayfa-dugme:hover:not(:disabled) { border-color: var(--accent); }
.lg-sayfa-dugme.secili {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
  font-weight: 600;
  cursor: default;
}
.lg-sayfa-dugme:disabled { opacity: .45; cursor: default; }
.lg-sayfa-uc { padding: 0 4px; color: var(--muted); font-size: 12px; align-self: center; }

/* --- Sohbet: dosya eki (balonun icinde) --- */
.pmsg-ek {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 6px;
  padding: 8px 10px;
  background: rgba(255, 255, 255, .06);
  border: 1px solid var(--line);
  border-radius: 9px;
}

.pmsg.me .pmsg-ek { background: rgba(0, 0, 0, .16); }

.pmsg-ek-simge { flex: none; font-size: 16px; line-height: 1; }

.pmsg-ek-bilgi {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.pmsg-ek-bilgi b {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 12.5px;
  font-weight: 600;
}

.pmsg-ek-bilgi i { color: var(--muted); font-size: 10.5px; font-style: normal; }

.pmsg-ek-dugmeler { flex: none; display: flex; gap: 4px; }

.pmsg-ek-dugme {
  padding: 4px 8px;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 7px;
  color: var(--muted);
  font: inherit;
  font-size: 11px;
  cursor: pointer;
  transition: color .12s, border-color .12s;
}

.pmsg-ek-dugme:hover { color: var(--fg); border-color: var(--accent); }

.chat-dock.ek-uzerinde,
.sv-kayit.ek-uzerinde {
  outline: 2px dashed var(--accent);
  outline-offset: -4px;
}

/* --- Sohbet: sistem satiri --- */
.pmsg-sistem {
  align-self: center;
  max-width: 92%;
  margin: 6px auto;
  padding: 4px 10px;
  display: flex;
  align-items: baseline;
  gap: 6px;
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-size: 11.5px;
  text-align: center;
}

.pmsg-sistem i { font-style: normal; opacity: .7; font-size: 10px; }

.portal-chat-form,
.sv-form { align-items: center; }

/* --- Bekleyen ek (gonderilmeden once; Esc kaldirir) ---
Form flex satir; cip tam genislik icin sarma acik. */
.portal-chat-form,
.sv-form { flex-wrap: wrap; }

.ek-taslak {
  order: -1;
  flex: 0 0 100%;
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
  padding: 6px 8px;
  background: var(--panel-2);
  border: 1px dashed var(--accent);
  border-radius: 9px;
  font-size: 12px;
}

.ek-taslak-ad {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 600;
}

.ek-taslak i { flex: none; color: var(--muted); font-style: normal; font-size: 11px; }

.ek-taslak-ipucu {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-align: right;
  color: var(--muted);
  font-size: 10.5px;
}

.ek-taslak-x {
  flex: none;
  width: 22px;
  height: 22px;
  padding: 0;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1;
  cursor: pointer;
}

.ek-taslak-x:hover { color: var(--fg); border-color: var(--danger); }

/* --- Grup sohbetleri (yonetici dugmeleri portal.js grupDetayCiz) --- */

.grup-secilen {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 8px 0 4px;
  min-height: 0;
}
.grup-secilen:empty { display: none; }
.grup-secilen .grup-etiket {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 6px 3px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--panel-2);
  font-size: 12px;
}
.grup-secilen .grup-etiket button {
  width: 18px; height: 18px;
  display: grid; place-items: center;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 12px;
  cursor: pointer;
}
.grup-secilen .grup-etiket button:hover { background: var(--panel); color: var(--danger); }

.grup-secim-liste { max-height: 260px; overflow-y: auto; }
.grup-secim-liste .sohbet-satir.secili { background: var(--panel-2); }
.grup-secim-liste .sohbet-satir.secili .s-ad::after,
.grup-aday.secili .ga-ad::after { content: ' ✓'; color: var(--ok); }
/* Grup kisi secimi: tam ad ustte, durum + firma altta (blok duzen; satir kirpma kurali yok). */
.grup-aday .ga-orta { flex: 1 1 auto; min-width: 0; display: block; }
.grup-aday .ga-ad {
  display: block; font-size: 13px; font-weight: 600; color: var(--fg); line-height: 1.35;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.grup-aday .ga-alt {
  display: block; font-size: 11.5px; color: var(--muted); line-height: 1.3;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
/* Kisi arama kutusu grup adi alani kadar genis. */
#grup-kur-ara, #grup-ekle-ara {
  display: block; box-sizing: border-box; width: 100%; height: 34px; margin: 0 0 8px; padding: 0 10px;
  border: 1px solid var(--line); border-radius: 8px; background: var(--bg); color: var(--fg); font: inherit;
}
#grup-kur-ara:focus, #grup-ekle-ara:focus { outline: 0; border-color: var(--accent); }

.modal-alt {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 16px;
}

/* --- Grup detayi: baslik --- */
.grup-basi { display: flex; align-items: center; gap: 14px; margin-bottom: 6px; }
.grup-basi-orta { min-width: 0; flex: 1; }
.grup-basi-orta h3 { margin: 0 0 2px; overflow: hidden; text-overflow: ellipsis; }
.grup-basi-orta .login-hint { margin: 0; }

.grup-logo {
  position: relative;
  width: 64px; height: 64px;
  flex: none;
  display: grid; place-items: center;
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: #26303c;
  color: var(--fg);
  font: inherit;
  font-size: 20px; font-weight: 700;
  cursor: default;
}
.grup-logo img { width: 100%; height: 100%; object-fit: cover; }
.grup-logo-kalem {
  position: absolute;
  right: 0; bottom: 0;
  width: 22px; height: 22px;
  display: grid; place-items: center;
  border: 2px solid var(--panel);
  border-radius: 50%;
  background: var(--accent);
  font-size: 11px;
}
.grup-logo.duzenlenebilir { cursor: pointer; }
.grup-logo.duzenlenebilir:hover { border-color: var(--accent); }

.grup-ad-satir { display: flex; gap: 8px; margin: 10px 0 4px; }
.grup-ad-satir input { flex: 1; margin: 0; }

.grup-uye-basi {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin: 14px 0 6px;
  font-size: 12.5px;
  color: var(--muted);
}
.grup-uye-liste { max-height: 300px; overflow-y: auto; }
.grup-yonetici-rozet {
  margin-left: 6px;
  padding: 1px 6px;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
}

/* --- Sohbet listesi / baslikta grup --- */
.p-avatar.grup-avatar { overflow: hidden; }
.p-avatar.grup-avatar img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }
.sv-sag-baslik.grup-baslik { cursor: pointer; }
.sv-sag-baslik.grup-baslik:hover .sv-ad { text-decoration: underline; }

/* Grup mesajinda gonderenin adi. */
.pmsg-kim {
  margin-bottom: 2px;
  color: var(--accent);
  font-size: 11px;
  font-weight: 600;
}

/* --- Mesaj tepkileri --- */

.tepki-serit {
  display: flex;
  flex-wrap: wrap;
  gap: 2px;
  padding: 4px 5px 6px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 4px;
}
.tepki-serit button {
  width: 32px; height: 32px;
  display: grid; place-items: center;
  padding: 0;
  border: 0;
  border-radius: 7px;
  background: transparent;
  font-size: 17px;
  line-height: 1;
  cursor: pointer;
}
.tepki-serit button:hover { background: var(--panel-2); transform: scale(1.15); }
.tepki-serit button.tepki-diger { width: auto; padding: 0 8px; font-size: 12px; }

.pmsg-tepkiler {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 3px;
}
.pmsg.me .pmsg-tepkiler { justify-content: flex-end; }
.pmsg-tepki {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 1px 7px 2px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--panel);
  color: var(--fg);
  font: inherit;
  font-size: 12px;
  line-height: 1.5;
  cursor: pointer;
}
.pmsg-tepki:hover { border-color: var(--accent); }
.pmsg-tepki.benim { border-color: var(--accent); background: rgba(240, 54, 75, .18); }
.pmsg-tepki i { font-style: normal; color: var(--muted); font-size: 11px; }
.pmsg-tepki.benim i { color: var(--accent); }

.davet-durum .dd-kayit {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 8px;
  font-size: 12px;
  color: var(--fg);
  cursor: pointer;
}
.davet-durum .dd-kayit input { margin: 0; cursor: pointer; }

/* --- Toplantilar: takvim ekrani (.sv-* iskeleti) --- */
.toplanti-view {
  position: fixed;
  inset: 0;
  z-index: 9000;
  display: grid;
  grid-template-columns: 1fr minmax(300px, 380px);
  background: var(--bg);
}

.tk-sol {
  display: flex;
  flex-direction: column;
  min-width: 0;
  border-right: 1px solid var(--line);
  background: var(--panel);
}
.tk-sag { display: flex; flex-direction: column; min-width: 0; background: var(--bg); overflow-y: auto; }

.tk-serit {
  display: flex; align-items: center; gap: 8px;
  padding: 0 14px 12px;
}
.tk-serit .tk-ara { flex: 1; }
.tk-ay { min-width: 150px; text-align: center; font-size: 14px; }

.tk-gun-adlari {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 6px;
  padding: 0 14px 6px;
  color: var(--muted);
  font-size: 11.5px;
  text-transform: uppercase;
  letter-spacing: .04em;
}
.tk-gun-adlari span { text-align: center; }

.tk-izgara {
  flex: 1;
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  grid-auto-rows: minmax(84px, 1fr);
  gap: 6px;
  padding: 0 14px 14px;
  overflow-y: auto;
}

.tk-gun {
  display: flex; flex-direction: column; gap: 4px;
  padding: 6px;
  min-width: 0;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 9px;
  cursor: pointer;
  text-align: left;
  color: inherit;
  font: inherit;
}
.tk-gun:hover { border-color: var(--accent); }
.tk-gun.disari { opacity: .38; }
.tk-gun.bugun { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent) inset; }
.tk-gun.secili { background: var(--panel-2); }
.tk-gun-no { font-size: 12px; color: var(--muted); }
.tk-gun.bugun .tk-gun-no { color: var(--accent); font-weight: 600; }

.tk-oge {
  display: block;
  width: 100%;
  padding: 3px 6px;
  border: 0;
  border-radius: 6px;
  background: var(--panel-2);
  color: var(--fg);
  font: inherit;
  font-size: 11.5px;
  text-align: left;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  cursor: pointer;
}
.tk-oge:hover { background: #232b36; }
.tk-oge.suruyor { background: rgba(63, 185, 80, .16); color: var(--ok); }
.tk-oge.bitti { opacity: .55; text-decoration: line-through; }
.tk-oge-saat { color: var(--muted); margin-right: 4px; }
.tk-oge.suruyor .tk-oge-saat { color: inherit; }

.tk-detay { padding: 18px; display: flex; flex-direction: column; gap: 12px; }
.tk-detay h3 { margin: 0; font-size: 16px; }
.tk-detay .tk-satir { display: flex; gap: 8px; font-size: 13px; }
.tk-detay .tk-satir b { color: var(--muted); font-weight: 500; min-width: 92px; }
.tk-detay .tk-dugmeler { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; }
.tk-detay .tk-aciklama { white-space: pre-wrap; word-break: break-word; font-size: 13px; }

.tk-link {
  display: flex; gap: 6px; align-items: center;
  background: var(--panel); border: 1px solid var(--line);
  border-radius: 8px; padding: 8px 10px;
}
.tk-link input {
  flex: 1; min-width: 0;
  background: transparent; border: 0; color: var(--muted);
  font: inherit; font-size: 12px;
}

.tk-rozet {
  display: inline-block;
  padding: 1px 8px; border-radius: 999px;
  border: 1px solid var(--line); color: var(--muted);
  font-size: 11px;
}
.tk-rozet.suruyor { color: var(--ok); border-color: var(--ok); }
.tk-rozet.bitti { opacity: .7; }

.ikili { display: flex; gap: 10px; }
.ikili > div { flex: 1; min-width: 0; }
.ikili input { width: 100%; }

.toplanti-davetli {
  max-height: 148px; overflow-y: auto;
  border: 1px solid var(--line); border-radius: 9px;
  padding: 6px; margin-bottom: 10px;
}
.toplanti-davetli label {
  display: flex; align-items: center; gap: 8px;
  padding: 5px 6px; border-radius: 7px;
  margin: 0; text-transform: none; letter-spacing: 0; font-size: 13px; color: var(--fg);
}
.toplanti-davetli label:hover { background: var(--panel-2); }
.toplanti-davetli .bos { color: var(--muted); font-size: 12.5px; padding: 6px; }

@media (max-width: 980px) {
  .toplanti-view { grid-template-columns: 1fr; }
  .toplanti-view .tk-sag { display: none; }
  .toplanti-view.detay-acik .tk-sol { display: none; }
  .toplanti-view.detay-acik .tk-sag { display: flex; }
}

/* --- Toplantilar: gorsel duzen --- */

.tk-sol { background: linear-gradient(180deg, var(--panel) 0%, var(--bg) 240px); }

.tk-sol .sv-baslik h3 { letter-spacing: .2px; }

.tk-serit {
  padding: 2px 16px 14px;
  gap: 6px;
}
.tk-serit .pbtn { height: 32px; }
.tk-ay {
  font-size: 15.5px;
  font-weight: 600;
  letter-spacing: .2px;
}

.tk-gun-adlari { padding: 0 16px 8px; font-size: 11px; opacity: .8; }

.tk-izgara { padding: 0 16px 16px; gap: 8px; }

.tk-gun {
  padding: 8px;
  gap: 5px;
  background: var(--panel);
  border-color: transparent;
  box-shadow: inset 0 0 0 1px var(--line);
  transition: transform .12s ease, box-shadow .12s ease, background .12s ease;
}
.tk-gun:hover {
  background: var(--panel-2);
  box-shadow: inset 0 0 0 1px var(--line), 0 6px 18px rgba(0, 0, 0, .18);
  transform: translateY(-1px);
}
.tk-gun.disari { opacity: .32; background: transparent; }

/* Hafta sonu yalnizca gun numarasi soluk (zemin degil). */
.tk-izgara .tk-gun:nth-child(7n) .tk-gun-no,
.tk-izgara .tk-gun:nth-child(7n-1) .tk-gun-no { opacity: .6; }
.tk-gun-adlari span:nth-child(6),
.tk-gun-adlari span:nth-child(7) { opacity: .6; }

.tk-gun.bugun {
  box-shadow: inset 0 0 0 1.5px var(--accent);
  background: rgba(240, 54, 75, .10);
}
.tk-gun.secili { box-shadow: inset 0 0 0 1.5px #46536a; background: var(--panel-2); }

.tk-gun-no {
  align-self: flex-start;
  min-width: 22px;
  padding: 1px 0;
  text-align: center;
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
}
.tk-gun.bugun .tk-gun-no {
  color: #fff;
  background: var(--accent);
  border-radius: 999px;
}

.tk-oge {
  position: relative;
  padding: 4px 8px 4px 14px;
  border-radius: 7px;
  background: rgba(240, 54, 75, .13);
  color: var(--fg);
  font-size: 11.5px;
  line-height: 1.5;
  transition: background .12s ease;
}
.tk-oge::before {
  content: '';
  position: absolute;
  left: 5px; top: 50%;
  width: 4px; height: 4px;
  margin-top: -2px;
  border-radius: 50%;
  background: var(--accent);
}
.tk-oge:hover { background: rgba(240, 54, 75, .24); }
.tk-oge.suruyor { background: rgba(63, 185, 80, .16); color: var(--ok); }
.tk-oge.suruyor::before { background: var(--ok); box-shadow: 0 0 0 3px rgba(63, 185, 80, .18); }
.tk-oge.bitti { background: var(--panel-2); color: var(--muted); text-decoration: none; opacity: .75; }
.tk-oge.bitti::before { background: var(--muted); }
.tk-oge-saat { color: inherit; opacity: .75; margin-right: 5px; font-variant-numeric: tabular-nums; }
.tk-oge.tk-daha {
  background: transparent;
  color: var(--muted);
  padding-left: 8px;
  font-size: 11px;
}
.tk-oge.tk-daha::before { display: none; }

.tk-detay { padding: 20px; gap: 14px; }
.tk-detay h3 { font-size: 17px; line-height: 1.35; }
.tk-detay .tk-satir { align-items: baseline; }
.tk-detay .tk-satir b { font-size: 12px; letter-spacing: .02em; }
.tk-detay .tk-aciklama {
  padding: 10px 12px;
  border-radius: 9px;
  background: var(--panel);
  border: 1px solid var(--line);
  color: var(--fg);
}
.tk-detay .tk-dugmeler { margin-top: 6px; gap: 8px; }
.tk-detay .tk-dugmeler .pbtn.primary { height: 36px; padding: 0 18px; }

.tk-rozet {
  align-self: flex-start;
  padding: 2px 10px;
  font-size: 11px;
  letter-spacing: .02em;
  background: var(--panel);
}
.tk-rozet.suruyor { background: rgba(63, 185, 80, .12); }

.tk-link { border-radius: 9px; background: var(--bg); }
.tk-link input { color: var(--fg); font-size: 12px; }

.toplanti-davetli { border-radius: 10px; }

/* Gun hucresi zemini temaya bagli. */
:root { --tk-gun-zemin: rgba(22, 27, 35, .55); }
:root[data-tema="acik"] { --tk-gun-zemin: #ffffff; }
.tk-gun { background: var(--tk-gun-zemin); }
.tk-gun:hover { background: var(--panel); }
.tk-gun.bugun { background: rgba(240, 54, 75, .09); }
.tk-gun.secili { background: var(--panel-2); }
.tk-gun.secili.bugun { background: rgba(240, 54, 75, .16); }

.tk-serit .pbtn { border-radius: 8px; }
.tk-serit .pbtn.primary { font-weight: 600; }

.tk-kapsam {
  height: 32px;
  padding: 0 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-2);
  color: var(--fg);
  font: inherit;
  font-size: 12.5px;
}
.tk-oge.baskasinin { background: rgba(139, 151, 168, .16); }
.tk-oge.baskasinin::before { background: var(--muted); }
.tk-oge.baskasinin:hover { background: rgba(139, 151, 168, .26); }

.toplanti-ayarlar {
  margin: 4px 0 12px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--bg);
}
/* Katilim yolu listesi (Google girisi tanimliysa). */
.toplanti-katilim { display: flex; flex-direction: column; gap: 2px; }
.toplanti-katilim .dock-check { align-items: flex-start; }
.toplanti-katilim .ta-not {
  display: block;
  margin-top: 1px;
  font-size: 11px;
  font-style: normal;
  color: var(--muted);
}
.toplanti-ayarlar .ta-baslik {
  font-size: 11.5px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .05em;
  margin-bottom: 8px;
}
.toplanti-ayarlar .dock-check { margin-bottom: 4px; }
.toplanti-ayarlar .login-hint { margin: 8px 0 0; }

/* --- Sifremi unuttum (giris ekrani) --- */
.bag-dugme {
  display: block;
  width: 100%;
  margin-top: 10px;
  padding: 4px;
  background: none;
  border: 0;
  color: var(--muted, #8b98a9);
  font: inherit;
  font-size: 12.5px;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}
.bag-dugme:hover { color: var(--fg, #e6edf3); }

.unuttum-alan {
  margin-top: 10px;
  padding: 12px;
  border: 1px solid var(--line, #2a3240);
  border-radius: 10px;
  background: var(--panel-2, #1c222c);
}
.unuttum-alan .form-row { display: flex; gap: 8px; }

/* --- Toplanti penceresi: iki sutun --- */

.toplanti-modal-kart {
  width: min(920px, 96vw);
  max-width: 920px;
}

.tm-govde {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
  align-items: start;
}
.tm-sutun { min-width: 0; }

.tm-notlar {
  width: 100%;
  min-height: 150px;
  resize: vertical;
  line-height: 1.5;
  font: inherit;
}
.tm-sayac {
  margin: 4px 0 0;
  text-align: right;
  font-size: 11.5px;
  color: var(--muted, #8b98a9);
  font-variant-numeric: tabular-nums;
}

.tm-ara { width: 100%; margin-bottom: 6px; }

.tm-eposta-satir { display: flex; gap: 8px; }
.tm-eposta-satir input { flex: 1; min-width: 0; }

.tm-etiketler {
  display: flex; flex-wrap: wrap; gap: 6px;
  margin: 8px 0 0;
}
.tm-etiket {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 3px 6px 3px 10px;
  border: 1px solid var(--line, #2a3240);
  border-radius: 999px;
  background: var(--panel-2, #1c222c);
  font-size: 12px;
}
.tm-etiket button {
  width: 18px; height: 18px;
  display: grid; place-items: center;
  border: 0; border-radius: 50%;
  background: transparent; color: var(--muted, #8b98a9);
  font-size: 14px; line-height: 1; cursor: pointer;
}
.tm-etiket button:hover { background: rgba(255, 255, 255, .08); color: inherit; }

.toplanti-davetli { max-height: 190px; overflow: auto; }

@media (max-width: 820px) {
  .tm-govde { grid-template-columns: 1fr; gap: 14px; }
  .toplanti-modal-kart { width: 96vw; }
}

/* --- Katilim kaydi --- */
.tk-kayit-kart { width: min(720px, 96vw); }
.tk-kayit-govde { max-height: 60vh; overflow: auto; margin-top: 10px; }

.tk-kayit-ozet {
  display: flex; flex-direction: column; gap: 4px;
  padding: 10px 12px; margin-bottom: 14px;
  border: 1px solid var(--line, #2a3240);
  border-radius: 10px;
  background: var(--panel-2, #1c222c);
}
.tk-kayit-kisi { display: flex; justify-content: space-between; gap: 12px; font-size: 13px; }
.tk-kayit-kisi span { color: var(--muted, #8b98a9); font-variant-numeric: tabular-nums; }

.tk-kayit-liste { display: flex; flex-direction: column; gap: 3px; font-size: 12.5px; }
.tk-kayit-satir { display: flex; gap: 10px; padding: 3px 0; border-bottom: 1px solid var(--line, #2a3240); }
.tk-kayit-satir .zaman {
  flex: none; width: 110px;
  color: var(--muted, #8b98a9);
  font-variant-numeric: tabular-nums;
}
.tk-kayit-satir.sohbet { color: var(--fg, #e6edf3); }
.tk-kayit-satir.katildi span:last-child { color: var(--ok, #3fb950); }
.tk-kayit-satir.ayrildi span:last-child { color: var(--muted, #8b98a9); }

/* --- Ayarlar: solda tam boy bolme, sag sutun acikta --- */

#profile-modal {
  place-items: stretch;
  padding: 0;
  background: var(--bg);
  backdrop-filter: none;
  overflow: hidden;
}

/* Sag sutun aciksa yerini korur; kapaliysa ayarlar tam genislik. */
body:has(#people-dock:not([hidden])) #profile-modal { right: var(--sag-sutun); }

/* SQL sekmesinde konsol tam ekran. !important sart: ustteki secici :has() icindeki kimlik yuzunden daha ozgul. */
body.sql-sekmesi #profile-modal { right: 0 !important; left: 0 !important; }

#profile-modal .modal-card.ayar-pencere,
#profile-modal .modal-card.ayar-pencere.genis {
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  border: 0;
  border-right: 1px solid var(--line);
  border-radius: 0;
  box-shadow: none;
  gap: 0;
  padding: 20px 22px;
  grid-template-columns: 200px minmax(0, 1fr);
}
#profile-modal .ayar-menu { padding-right: 18px; }
#profile-modal .ayar-icerik { padding-left: 22px; }

/* Acik sohbet pencereleri ayarlarin ustunde kalir. */
.chat-dock, .chat-bar { z-index: 9600; }

/* Dar ekranda ayarlar tam ekran. */
@media (max-width: 699px) {
  body:has(#people-dock:not([hidden])) #profile-modal { right: 0; }
}

/* --- Ikonlar ve amaca gore renk (renk tek basina anlam tasimaz, yazi da durur) --- */

/* Gezinme dugmesi ikonu kucuk: sag sutun 360px. */
.btn-ikon {
  font-size: 11.5px;
  line-height: 1;
  opacity: .85;
  filter: saturate(1.15);
}
.pbtn:hover .btn-ikon { opacity: 1; }

.uc-dugmeler .pbtn { gap: 5px; padding: 0 9px; }

/* Ikiye iki izgara; dugme sayisi yetkiye gore azalinca hucre de azalir. */
.uc-dugmeler { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.uc-dugmeler .pbtn { flex: none; width: 100%; }

.ayar-ikon {
  display: inline-block;
  width: 18px;
  font-size: 12.5px;
  line-height: 1;
  margin-right: 8px;
  text-align: center;
  opacity: .8;
}
.ayar-sekme.secili .ayar-ikon { opacity: 1; }

/* --- Satir dugmeleri: amaca gore ton --- */
.mini {
  transition: background .12s ease, border-color .12s ease, color .12s ease;
}
.mini.duzenle { color: var(--accent); border-color: color-mix(in srgb, var(--accent) 35%, var(--line)); }
.mini.duzenle:hover { background: color-mix(in srgb, var(--accent) 14%, transparent); border-color: var(--accent); }

.mini.yetki { color: #a371f7; border-color: color-mix(in srgb, #a371f7 35%, var(--line)); }
.mini.yetki:hover { background: color-mix(in srgb, #a371f7 14%, transparent); border-color: #a371f7; }

.mini.kod { color: #d29922; border-color: color-mix(in srgb, #d29922 35%, var(--line)); }
.mini.kod:hover { background: color-mix(in srgb, #d29922 14%, transparent); border-color: #d29922; }

.mini.danger:hover { background: color-mix(in srgb, var(--danger) 14%, transparent); border-color: var(--danger); }

/* --- Dugme derinligi ve odak halkasi --- */
.pbtn {
  transition: background .12s ease, border-color .12s ease, transform .06s ease;
}
.pbtn:active { transform: translateY(1px); }
.pbtn.primary {
  box-shadow: 0 1px 2px rgba(0, 0, 0, .25), inset 0 1px 0 rgba(255, 255, 255, .12);
}

/* Klavye odak halkasi (:focus-visible: fareyle tiklayana cikmaz). */
.pbtn:focus-visible,
.mini:focus-visible,
.ayar-sekme:focus-visible,
.tema-sec:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.ayar-sekme { position: relative; transition: background .12s ease, color .12s ease; }
.ayar-sekme.secili::before {
  content: "";
  position: absolute; left: 0; top: 50%;
  width: 3px; height: 18px;
  margin-top: -9px;
  border-radius: 0 3px 3px 0;
  background: var(--accent);
}

.tema-sec { transition: border-color .12s ease; }
.tema-sec:hover { border-color: var(--accent); }

/* --- Takvim: hafta gorunumu + sol ray ---
Bloklar konumlu: ust = baslangic dakikasi, yukseklik = sure. */

.toplanti-view { display: grid; grid-template-columns: 220px 1fr var(--sag-sutun, 360px); }

/* --- Sol ray --- */
.tk-ray {
  border-right: 1px solid var(--line);
  padding: 14px 12px;
  overflow-y: auto;
}
.tk-olustur {
  display: inline-flex; align-items: center; gap: 8px;
  height: 44px; padding: 0 20px 0 16px;
  border: 1px solid var(--line); border-radius: 22px;
  background: var(--panel-2); color: var(--fg);
  font: inherit; font-size: 13.5px; font-weight: 600;
  cursor: pointer;
  box-shadow: 0 1px 3px rgba(0,0,0,.18);
  transition: box-shadow .12s ease, border-color .12s ease;
}
.tk-olustur:hover { box-shadow: 0 2px 8px rgba(0,0,0,.26); border-color: var(--accent); }
.tk-olustur-arti { font-size: 17px; line-height: 1; color: var(--accent); }

.tk-mini { margin-top: 18px; }
.tk-mini-serit { display: flex; align-items: center; gap: 2px; margin-bottom: 8px; }
.tk-mini-serit strong { flex: 1; font-size: 12.5px; }
.tk-mini-gunadi, .tk-mini-izgara {
  display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px;
}
.tk-mini-gunadi span {
  text-align: center; font-size: 10px; color: var(--muted); padding: 2px 0;
}
.tk-mini-gun {
  aspect-ratio: 1; display: grid; place-items: center;
  border: 0; border-radius: 50%;
  background: transparent; color: var(--fg);
  font: inherit; font-size: 11px; cursor: pointer;
}
.tk-mini-gun:hover { background: var(--panel-2); }
.tk-mini-gun.solgun { color: var(--muted); opacity: .55; }
.tk-mini-gun.bugun { background: var(--accent); color: #fff; font-weight: 700; }
.tk-mini-gun.haftada { background: color-mix(in srgb, var(--accent) 18%, transparent); }
.tk-mini-gun.doluGun::after {
  content: ""; position: absolute; margin-top: 13px;
  width: 3px; height: 3px; border-radius: 50%; background: var(--accent);
}

/* --- Hafta izgarasi --- */
.tk-gorunum { display: inline-flex; gap: 4px; margin-left: auto; }
.tk-gorunum .pbtn.secili { border-color: var(--accent); background: var(--panel-2); }

/* Kaydirma zinciri: her halkada min-height:0 gerekir, yoksa sayfa kayar. */
.toplanti-view > .tk-sol { min-height: 0; overflow: hidden; }
.tk-hafta { display: flex; flex-direction: column; min-height: 0; flex: 1; }
.tk-hafta[hidden] { display: none; }

.tk-hafta-baslik { display: flex; border-bottom: 1px solid var(--line); }
.tk-saat-bosluk {
  width: 58px; flex: 0 0 58px;
  font-size: 9.5px; color: var(--muted);
  display: flex; align-items: flex-end; justify-content: center; padding-bottom: 4px;
}
.tk-hafta-gunler { display: grid; grid-template-columns: repeat(7, 1fr); flex: 1; }
.tk-hgun { text-align: center; padding: 6px 0 8px; border-left: 1px solid var(--line); }
.tk-hgun-ad { font-size: 10px; letter-spacing: .04em; color: var(--muted); text-transform: uppercase; }
.tk-hgun.bugun .tk-hgun-ad { color: var(--accent); }
.tk-hgun-no {
  display: inline-grid; place-items: center;
  width: 34px; height: 34px; margin-top: 3px;
  border-radius: 50%; font-size: 17px;
}
.tk-hgun.bugun .tk-hgun-no { background: var(--accent); color: #fff; font-weight: 600; }

.tk-hafta-govde { display: flex; flex: 1; overflow-y: auto; position: relative; }
.tk-saatler { width: 58px; flex: 0 0 58px; }
.tk-saat {
  height: 48px; position: relative;
  font-size: 10px; color: var(--muted); text-align: right; padding-right: 6px;
}
.tk-saat span { position: relative; top: -6px; }

.tk-hafta-izgara {
  display: grid; grid-template-columns: repeat(7, 1fr);
  flex: 1; position: relative;
}
.tk-hsutun { border-left: 1px solid var(--line); position: relative; }
.tk-hdilim { height: 48px; border-bottom: 1px solid color-mix(in srgb, var(--line) 60%, transparent); }
.tk-hdilim.uzeri { background: color-mix(in srgb, var(--accent) 10%, transparent); }

/* --- Toplanti blogu --- */
.tk-blok {
  position: absolute; left: 3px; right: 6px;
  border-radius: 6px; padding: 3px 6px;
  background: var(--tk-renk, var(--accent));
  color: #fff; font-size: 11px; line-height: 1.25;
  cursor: grab; overflow: hidden;
  border: 1px solid rgba(0,0,0,.14);
}
.tk-blok:active { cursor: grabbing; }
.tk-blok.suruklenen { opacity: .45; }
.tk-blok-ad { font-weight: 600; }
.tk-blok-saat { opacity: .9; font-size: 10px; }
.tk-blok.bitti, .tk-blok.iptal { opacity: .55; text-decoration: line-through; }

/* --- Sag tik menusu: renk paleti --- */
.tk-tmenu { min-width: 250px; padding: 6px; }
.tk-tmenu button { display: flex; align-items: center; gap: 10px; }
.tk-tm-ik { width: 18px; text-align: center; }
.tk-tm-ayirac { height: 1px; background: var(--line); margin: 6px 4px; }
.tk-tm-kalem { padding: 2px 8px 4px; color: var(--muted); }
.tk-palet {
  display: grid; grid-template-columns: repeat(9, 1fr);
  gap: 6px; padding: 2px 8px 8px;
}
.tk-renk-nokta {
  width: 18px; height: 18px; border-radius: 50%;
  border: 0; cursor: pointer; padding: 0;
  position: relative;
}
.tk-renk-nokta:hover { outline: 2px solid var(--fg); outline-offset: 1px; }
.tk-renk-nokta.secili::after {
  content: "✓"; position: absolute; inset: 0;
  display: grid; place-items: center; color: #fff; font-size: 11px; font-weight: 700;
}
.tk-tm-varsayilan {
  width: 100%; justify-content: center !important;
  border-radius: 8px; background: var(--panel-2) !important;
}

@media (max-width: 1100px) {
  .toplanti-view { grid-template-columns: 1fr; }
  .tk-ray { display: none; }
}

/* --- Kullanicilar ekrani: tablolar Log Kayitlari ile ayni bicim (.lg-*) --- */

.kl-ust {
  display: flex;
  align-items: flex-end;
  gap: 12px;
  margin-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.kl-sekmeler { display: flex; gap: 2px; flex: 1 1 auto; min-width: 0; flex-wrap: wrap; }

.kl-sekme {
  padding: 9px 16px;
  background: transparent;
  border: 1px solid transparent;
  border-bottom: 0;
  border-radius: 8px 8px 0 0;
  color: var(--muted);
  font: inherit;
  font-size: 13px;
  white-space: nowrap;
  cursor: pointer;
  margin-bottom: -1px;
  transition: color .12s, background .12s;
}
.kl-sekme:hover { color: var(--fg); }
.kl-sekme.secili {
  background: var(--panel);
  border-color: var(--line);
  color: var(--fg);
  font-weight: 600;
  box-shadow: inset 0 2px 0 var(--accent);
}

.kl-ust .pbtn { flex: none; margin-bottom: 8px; }

.kl-panel { min-width: 0; }

.kl-ara {
  width: 200px;
  height: 26px;
  padding: 0 9px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 7px;
  color: var(--fg);
  font: inherit;
  font-size: 12px;
}
.kl-ara:focus { outline: none; border-color: var(--accent); }

/* --- Satir sonundaki islem dugmeleri: ikon (title / aria-label) --- */
.kl-islemler { display: inline-flex; gap: 3px; }

.kl-islem {
  width: 26px;
  height: 26px;
  padding: 0;
  display: inline-grid;
  place-items: center;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 6px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1;
  cursor: pointer;
  transition: color .12s, background .12s, border-color .12s;
}
.kl-islem:hover:not(:disabled) { color: var(--fg); background: var(--panel-2); border-color: var(--line); }
.kl-islem.danger:hover:not(:disabled) { color: #ff7b72; border-color: #4a2b2b; }
.kl-islem.ok { color: var(--ok); }
.kl-islem:disabled { opacity: .3; cursor: default; }

/* --- Kullanici formu (alt panel): iki sutunlu izgara --- */
.kl-form-izgara {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 0 18px;
}
.kl-form-izgara > div { min-width: 0; }
.kl-form-anahtar { display: flex; align-items: flex-end; padding-bottom: 4px; }

#kl-form .user-form { border: 0; padding: 0; }
#kl-form .user-form h4 { margin: 0 0 14px; font-size: 14px; }

/* --- Sutun genislikleri --- */
.ku-s-ad     { width: 165px; }
.ku-s-kadi   { width: 120px; }
.ku-s-rol    { width: 118px; }
.ku-s-durum  { width: 112px; }
.ku-s-firma  { width: 130px; }
.ku-s-tel    { width: 115px; }
.ku-s-hesap  { width: 78px; }
.ku-s-islem  { width: 120px; }
.gr-s-ad     { width: auto; }
.gr-s-kisi   { width: 130px; }

/* "İşlemler" sutunu saga yapisik: tablo kayinca dugmeler kaybolmasin. */
.lg-tbl .ku-s-islem {
  position: sticky;
  right: 0;
  background: var(--panel);
  border-left: 1px solid var(--line);
}
.lg-tbl .lg-baslik .ku-s-islem { background: var(--panel-2); z-index: 4; }
.lg-tbl .lg-suzgec .ku-s-islem { z-index: 3; }
.lg-tbl tbody tr:hover .ku-s-islem { background: var(--panel-2); }

.gr-ad { font-weight: 600; }

/* --- Yetki ekrani (grup ve kisi): modullere gore katlanir --- */

.yt-ust {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
}

.yt-baslik {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--fg);
  font-size: 14px;
  font-weight: 600;
}
.yt-baslik i { font-style: normal; font-size: 13px; opacity: .8; }

.yt-sayac {
  margin-left: auto;
  padding: 3px 10px;
  background: var(--ok);
  border-radius: 6px;
  color: #06240f;
  font-size: 11.5px;
  font-weight: 700;
  white-space: nowrap;
}

.yt-arac {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

.yt-kip {
  padding: 5px 12px;
  background: var(--accent);
  border-radius: 7px;
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}

.yt-dugme {
  height: 28px;
  padding: 0 10px;
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 7px;
  color: var(--muted);
  font: inherit;
  font-size: 12px;
  white-space: nowrap;
  cursor: pointer;
}
.yt-dugme:hover { color: var(--fg); border-color: var(--accent); }

.yt-ara {
  flex: 1 1 200px;
  min-width: 140px;
  height: 28px;
  padding: 0 10px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 7px;
  color: var(--fg);
  font: inherit;
  font-size: 12px;
}
.yt-ara:focus { outline: none; border-color: var(--accent); }

#yt-not { margin: 0 0 10px; }
#yt-not.hata { color: #ff9c9c; }

.yt-govde {
  max-height: min(62vh, 560px);
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding-right: 2px;
}

.yt-grup {
  /* flex: none zorunlu: flex-shrink:1 ile kartlar kisilip satirlar birbirinin altina giriyordu. */
  flex: none;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--panel);
  overflow: hidden;
}
.yt-grup.acik { border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); }

.yt-grup-bas {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  cursor: pointer;
  user-select: none;
}
.yt-grup-bas:hover { background: var(--panel-2); }

.yt-grup-kutu { width: auto; margin: 0; flex: none; cursor: pointer; }

.yt-grup-ad { flex: none; color: var(--fg); font-size: 13px; }
.yt-grup-ad b { color: var(--muted); font-weight: 500; font-size: 11.5px; }

.yt-grup-ozet {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-align: right;
  color: var(--muted);
  font-size: 11px;
}

.yt-ok { flex: none; color: var(--muted); font-size: 14px; transition: transform .14s; }
.yt-grup.acik .yt-ok { transform: rotate(90deg); color: var(--accent); }

.yt-grup-govde { border-top: 1px solid var(--line); }

.yt-grup .yt-satir {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  padding: 7px 12px 7px 34px;
  border-bottom: 1px solid var(--line);
  cursor: pointer;
}
.yt-grup .yt-satir:last-child { border-bottom: 0; }
.yt-grup .yt-satir:hover { background: var(--panel-2); }
.yt-grup .yt-satir input { width: auto; margin: 0; flex: none; }

.yt-satir-ad { flex: none; color: var(--fg); font-size: 12.5px; }
.yt-satir-ad i { font-style: normal; }

.yt-satir-aciklama {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-align: right;
  color: var(--muted);
  font-size: 11px;
}

.yt-bos { padding: 22px 10px; color: var(--muted); text-align: center; }

@media (max-width: 780px) {
  .yt-grup-ozet, .yt-satir-aciklama { display: none; }
  .kl-ust { flex-wrap: wrap; }
}

/* --- Hesap menusu (sag ust): Profil / Parola Değiştir / Çıkış --- */

.hesap-dugme {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 2px 4px;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 9px;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.hesap-dugme:hover { background: var(--panel-2); border-color: var(--line); }

.hesap-menu {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  z-index: 30;
  min-width: 248px;
  padding: 16px 14px 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: 0 14px 34px rgba(0, 0, 0, .45);
}

.hesap-foto {
  width: 76px;
  height: 76px;
  font-size: 26px;
}

.hesap-ad {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--fg);
  font-size: 13px;
  font-weight: 600;
  text-align: center;
}

.hesap-dugmeler { display: flex; gap: 6px; flex-wrap: wrap; justify-content: center; }
.hesap-dugmeler .pbtn { height: 28px; font-size: 12px; }

.pbtn.tehlike { background: var(--danger); border-color: var(--danger); color: #fff; font-weight: 600; }
.pbtn.tehlike:hover { background: #c0332e; border-color: #c0332e; }

.uc-ust { position: relative; }

/* --- Profil ve parola pencereleri --- */

.modal-card.profil-kart { width: min(520px, 100%); }
.modal-card.parola-kart { width: min(420px, 100%); }

.profil-kart h3,
.parola-kart h3 { margin: 0 0 14px; font-size: 15px; }

.profil-kart .onay-dugmeler { margin-top: 18px; }


/* --- Notlar (not defteri) ---
Kurallarin onunde .notlar-kart var: genel `.modal input` / `.modal select` kurallarini
(tam genislik + 34px) tek sinifli kural yenemiyor. */

/* Buyuk: ekranin ~%90'i, yer varsa en az 1100x700 */
.modal-card.notlar-kart {
  width: min(100%, max(1100px, 90vw));
  height: min(calc(100vh - 40px), max(700px, 90vh));
  display: flex;
  flex-direction: column;
  padding: 18px;
}
.notlar-kart h3 { margin: 0 0 12px; font-size: 15px; }

/* --- Ust serit: arama · kapsam · yeni --- */
.notlar-arac {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: none;                 /* dikey flex'te kismasin */
  margin-bottom: 10px;
}
.notlar-kart .notlar-arac input[type=search] {
  flex: 1;
  min-width: 0;
  height: 34px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--bg);
  color: var(--fg);
  font: inherit;
  font-size: 13px;
}
.notlar-kart .notlar-arac input[type=search]:focus {
  outline: 0;
  border-color: var(--accent);
}
/* Genel `.modal select` tam genislik dayatiyor; burada dar kalmali. */
.notlar-kart .notlar-arac select { width: auto; flex: none; }

/* --- Govde: iki sutun --- */
.notlar-govde {
  flex: 1;
  min-height: 0;              /* olmazsa liste tasar, kart buyur */
  display: grid;
  grid-template-columns: 290px 1fr;
  gap: 12px;
}

.notlar-sol {
  display: flex;
  flex-direction: column;
  min-height: 0;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--bg);
  overflow: hidden;
}
.notlar-sayi {
  flex: none;
  margin: 0;
  padding: 7px 10px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: 11px;
}
.notlar-liste { flex: 1; min-height: 0; overflow-y: auto; }

.not-satir {
  display: block;
  width: 100%;
  text-align: left;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: transparent;
  color: var(--fg);
  padding: 9px 10px;
  cursor: pointer;
  font: inherit;
}
.not-satir:hover { background: var(--panel-2); }
.not-satir.secili { background: var(--panel-2); box-shadow: inset 3px 0 0 var(--accent); }

.not-satir-ust {
  display: flex;
  align-items: center;
  gap: 6px;
}
.not-satir-baslik {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 13px;
  font-weight: 600;
}
/* Kilit rozeti: acik (baskalari da okur) dikkat ceker. */
.not-satir-kilit { flex: none; font-size: 12px; opacity: .55; }
.not-satir-kilit.acik { opacity: 1; }

.not-satir-ozet {
  margin: 2px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.not-satir-alt {
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
}
.notlar-bos-liste { padding: 16px 12px; color: var(--muted); font-size: 12px; text-align: center; }

/* --- Sag: secili sayfa --- */
.notlar-sag {
  display: flex;
  flex-direction: column;
  min-height: 0;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--bg);
  padding: 12px;
}
.notlar-bos {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  text-align: center;
}
.notlar-bos-baslik { margin: 0; font-size: 34px; opacity: .45; }
.notlar-bos .login-hint { margin: 0; }

.notlar-duzen { flex: 1; display: flex; flex-direction: column; min-height: 0; }

.not-ust { display: flex; align-items: center; gap: 8px; flex: none; }
.notlar-kart .not-ust .not-baslik {
  flex: 1;
  width: auto;                /* genel `.modal input` kuralini keser */
  height: 36px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  color: var(--fg);
  font: inherit;
  font-size: 14px;
  font-weight: 600;
}
.notlar-kart .not-ust .not-baslik:focus { outline: 0; border-color: var(--accent); }

.not-kilit {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 36px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  color: var(--muted);
  font: inherit;
  font-size: 12px;
  cursor: pointer;
}
.not-kilit:hover { border-color: var(--accent); color: var(--fg); }
.not-kilit.acik {
  border-color: var(--ok);
  color: var(--ok);
  background: color-mix(in srgb, var(--ok) 12%, transparent);
}
.not-kilit-simge { font-size: 13px; }

.notlar-kart .not-metin {
  flex: 1;
  min-height: 0;
  width: 100%;
  margin-top: 10px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  color: var(--fg);
  font: inherit;
  font-size: 13px;
  line-height: 1.5;
  resize: none;
}
.notlar-kart .not-metin:focus { outline: 0; border-color: var(--accent); }
/* Baskasinin notu salt okunur (src/notlar.js). */
.notlar-kart .not-metin[readonly],
.notlar-kart .not-ust .not-baslik[readonly] { background: var(--bg); color: var(--muted); }

.not-alt {
  flex: none;
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
}
.notlar-bilgi { flex: 1; min-width: 0; color: var(--muted); font-size: 11px; }
.not-alt-dugmeler { flex: none; display: flex; gap: 8px; }

@media (max-width: 860px) {
  .notlar-govde { grid-template-columns: 1fr; grid-template-rows: 180px 1fr; }
}

/* --- Notlar: son degisiklik, carpisma uyarisi, surum gecmisi --- */

.not-alt-sol {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}
.not-alt-sol .notlar-bilgi { flex: 0 1 auto; }

.not-gecmis-dugme {
  flex: none;
  border: 0;
  background: transparent;
  color: var(--accent);
  font: inherit;
  font-size: 11px;
  padding: 2px 4px;
  border-radius: 6px;
  cursor: pointer;
  white-space: nowrap;
}
.not-gecmis-dugme:hover { background: var(--panel-2); }

.not-carpisma {
  flex: none;
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
  padding: 7px 10px;
  border: 1px solid var(--accent);
  border-radius: 8px;
  background: color-mix(in srgb, var(--accent) 12%, transparent);
  color: var(--fg);
  font-size: 12px;
}
.not-carpisma span { flex: 1; min-width: 0; }
.notlar-kart .not-carpisma .pbtn { flex: none; height: 26px; padding: 0 10px; font-size: 12px; }

.not-surumler {
  flex: none;
  max-height: 210px;
  display: flex;
  flex-direction: column;
  margin-top: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  overflow: hidden;
}
.not-surum-baslik {
  flex: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 6px 10px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: 11px;
}
.notlar-kart .not-surum-baslik .pbtn { height: 24px; padding: 0 9px; font-size: 11px; }
.not-surum-liste { flex: 1; min-height: 0; overflow-y: auto; }

.not-surum {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 7px 10px;
  border-bottom: 1px solid var(--line);
}
.not-surum:last-child { border-bottom: 0; }
.not-surum-bilgi { flex: 1; min-width: 0; }
.not-surum-ust { font-size: 12px; color: var(--fg); }
.not-surum-kim { color: var(--muted); }
.not-surum-ozet {
  margin: 2px 0 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.notlar-kart .not-surum .pbtn { flex: none; height: 26px; padding: 0 10px; font-size: 11px; }
.not-surum-bos { padding: 14px 10px; color: var(--muted); font-size: 12px; text-align: center; }

/* --- SQL sag tik: ikinci kademe menu ve ayraclar --- */

.kisi-menu button.km-alt {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.kisi-menu button.km-alt::after {
  content: '▸';
  color: var(--muted);
  font-size: 11px;
}
.kisi-menu button.km-alt.acik { background: var(--panel-2); }

.kisi-menu .km-ayirac {
  height: 1px;
  margin: 4px 7px;
  background: var(--line);
}

.sql-altmenu { z-index: 10000; min-width: 230px; }

.kisi-menu .km-not {
  padding: 2px 11px 7px;
  color: var(--muted);
  font-size: 10.5px;
  line-height: 1.35;
}

/* --- SQL: komut dosyasi olustur (SSMS "Generate Scripts") ---
Kurallarin onunde .sql-betik-kart: `.modal input/select/label` kurallari tek sinifliyi ezer. */

.modal-card.sql-betik-kart {
  width: min(880px, 100%);
  height: min(620px, 88vh);
  display: flex;
  flex-direction: column;
  padding: 18px;
}
.sql-betik-kart h3 { margin: 0 0 4px; font-size: 15px; }

.sql-betik-govde {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 12px;
}

.sql-betik-sol,
.sql-betik-sag {
  display: flex;
  flex-direction: column;
  min-height: 0;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--bg);
}
.sql-betik-sag { padding: 12px; gap: 14px; overflow-y: auto; }

.sql-betik-arac {
  flex: none;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px;
  border-bottom: 1px solid var(--line);
}
.sql-betik-kart .sql-betik-arac input[type=search] {
  flex: 1;
  min-width: 0;
  height: 30px;
  padding: 0 9px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--panel);
  color: var(--fg);
  font: inherit;
  font-size: 12.5px;
}
.sql-betik-kart .sql-betik-arac .pbtn { flex: none; height: 30px; padding: 0 9px; font-size: 11.5px; }

/* Kaydirma cubugu yeri hep ayrili: baslik satiri kaymasin. */
.sql-betik-liste {
  flex: 1;
  min-height: 0;
  overflow-y: scroll;
  scrollbar-gutter: stable;
}

/* Baslik ve satirlar ayni izgara. Satirlar <label>: `.modal label { display: block }` (0,1,1)
izgarayi ezmesin diye onde .sql-betik-kart var. */
.sql-betik-baslik,
.sql-betik-kart .sql-betik-satir-oge {
  display: grid;
  grid-template-columns: 18px 1fr 74px 84px;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  font-size: 12.5px;
}
.sql-betik-baslik {
  flex: none;
  /* Liste kaydirma cubugu kadar sag bosluk (scrollbar-gutter: stable): basliklar hizali. */
  padding-right: calc(10px + 15px);
  border-bottom: 1px solid var(--line);
  background: var(--panel);
  color: var(--muted);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .04em;
}
.sql-betik-bs-ad { grid-column: 2; }
.sql-betik-bs-tur { text-align: right; }
.sql-betik-bs-satir { text-align: right; }

.sql-betik-kart .sql-betik-satir-oge {
  margin: 0;                 /* `.modal label` 12px ust bosluk veriyor */
  border-bottom: 1px solid var(--line);
  cursor: pointer;
}
.sql-betik-satir-oge:last-child { border-bottom: 0; }
.sql-betik-satir-oge:hover { background: var(--panel-2); }
.sql-betik-kart .sql-betik-satir-oge input[type=checkbox] { width: auto; height: auto; margin: 0; }
.sql-betik-ad { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sql-betik-sema { color: var(--muted); }
.sql-betik-tur { text-align: right; color: var(--muted); font-size: 11px; }
.sql-betik-rozet {
  text-align: right;
  color: var(--muted);
  font-size: 11.5px;
  font-variant-numeric: tabular-nums;
}
.sql-betik-kart .sql-betik-bolum select { width: 100%; }

.sql-betik-sayi {
  flex: none;
  margin: 0;
  padding: 6px 10px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 11px;
}
.sql-betik-bos { padding: 16px 10px; color: var(--muted); font-size: 12px; text-align: center; }

.sql-betik-bolum h4 { margin: 0 0 8px; font-size: 12px; color: var(--muted); font-weight: 600; }

.sql-betik-kart .sql-betik-secim {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin: 0 0 7px;
  padding: 7px 9px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  cursor: pointer;
  font-size: 12.5px;
}
.sql-betik-kart .sql-betik-secim input { flex: none; width: auto; height: auto; margin: 2px 0 0; }
.sql-betik-secim span { display: flex; flex-direction: column; gap: 1px; }
.sql-betik-secim small { color: var(--muted); font-size: 11px; }
.sql-betik-kart .sql-betik-secim:hover { border-color: var(--accent); }

.sql-betik-kart .sql-betik-kutu { margin: 0 0 6px !important; }

.sql-betik-satir { display: flex; align-items: center; gap: 8px; margin-top: 8px; }
.sql-betik-kart .sql-betik-satir label { margin: 0; flex: 1; font-size: 12px; }
.sql-betik-kart .sql-betik-satir input[type=number] {
  flex: none;
  width: 90px;
  height: 30px;
  padding: 0 8px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--panel);
  color: var(--fg);
  font: inherit;
  font-size: 12.5px;
}

.sql-betik-durum { margin: auto 0 0 !important; min-height: 32px; }

@media (max-width: 820px) {
  .sql-betik-govde { grid-template-columns: 1fr; grid-template-rows: 1fr auto; }
}

/* --- Toplantilar: liste gorunumu (Kullanicilar ile ayni kalip: .lg-arac / .lg-tbl / .lg-alt) --- */
.tk-liste-panel {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
  padding: 0 16px 14px;
}

/* Tablo panelin kalan yuksekligini doldurur (.lg-sar'in 52vh siniri burada gecersiz). */
.tk-liste-panel .lg-sar {
  flex: 1;
  min-height: 0;
  max-height: none;
}

.tk-liste-panel .lg-arac { margin-bottom: 8px; }

.tl-s-baslik  { min-width: 220px; }
.tl-s-zaman   { width: 168px; }
.tl-s-sure    { width: 86px; }
.tl-s-sahip   { width: 160px; }
.tl-s-davetli { width: 78px; text-align: center; }
.tl-s-durum   { width: 118px; }
.tl-s-islem   { width: 166px; }

.lg-tbl .tl-s-davetli { text-align: center; }

.tl-ad {
  display: block;
  max-width: 340px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 600;
}
/* Adin altinda aciklamanin ilk parcasi; katilim kodu (sir) burada yok. */
.tl-alt {
  display: block;
  max-width: 340px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--muted);
  font-size: 11px;
}

.tl-zaman { font-variant-numeric: tabular-nums; }
.tl-zaman small { display: block; color: var(--muted); font-size: 11px; }

.tl-durum {
  display: inline-block;
  padding: 2px 9px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: .3px;
  line-height: 16px;
  white-space: nowrap;
}
.tl-durum.planli  { color: var(--accent); background: color-mix(in srgb, var(--accent) 13%, transparent); border-color: color-mix(in srgb, var(--accent) 32%, transparent); }
.tl-durum.suruyor { color: var(--ok);     background: color-mix(in srgb, var(--ok) 15%, transparent);     border-color: color-mix(in srgb, var(--ok) 34%, transparent); }
.tl-durum.bitti   { color: var(--muted);  background: color-mix(in srgb, var(--fg) 8%, transparent);      border-color: var(--line); }
.tl-durum.iptal   { color: var(--danger); background: color-mix(in srgb, var(--danger) 12%, transparent); border-color: color-mix(in srgb, var(--danger) 30%, transparent); }

.lg-tbl tr.tl-bugun .tl-zaman { color: var(--accent); font-weight: 600; }

/* Liste acikken takvim gezinme ogeleri gizli. */
.toplanti-liste .tk-gun-adlari,
.toplanti-liste #tk-bugun,
.toplanti-liste #tk-onceki,
.toplanti-liste #tk-sonraki,
.toplanti-liste #tk-ay,
.toplanti-liste #tk-kapsam { display: none !important; }

@media (max-width: 1100px) {
  .tl-s-sahip, .tl-s-davetli { display: none; }
}

/* --- Liste satirindaki SVG islem dugmeleri (currentColor; uzerine gelince anlam rengi) --- */
.kl-islem.kl-simge {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  color: var(--muted);
  transition: color .14s ease, background .14s ease,
              border-color .14s ease, transform .08s ease;
}

.kl-simge svg {
  width: 17px;
  height: 17px;
  display: block;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.kl-simge.is-gerceklestir svg,
.kl-simge.is-bitir svg { fill: currentColor; stroke: none; }

.kl-islem.kl-simge:hover:not(:disabled) {
  background: color-mix(in srgb, currentColor 14%, transparent);
  border-color: color-mix(in srgb, currentColor 30%, transparent);
  transform: translateY(-1px);
}
.kl-islem.kl-simge:active:not(:disabled) { transform: translateY(0); }

.kl-simge.is-gerceklestir:hover:not(:disabled) { color: var(--ok); }
.kl-simge.is-katil:hover:not(:disabled)        { color: var(--ok); }
.kl-simge.is-bitir:hover:not(:disabled)        { color: var(--fg); }
.kl-simge.is-iptal:hover:not(:disabled)        { color: var(--uyari, #d29922); }
.kl-simge.is-duzenle:hover:not(:disabled)      { color: var(--accent); }
.kl-simge.is-sil:hover:not(:disabled)          { color: var(--danger); }

.lg-tbl tr:has(.tl-durum.suruyor) .kl-simge.is-katil { color: var(--ok); }

.kl-islem.kl-simge:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* --- Liste tablosu (yalnizca #tl-tbl): sutun ayiraclari, renkli basliklar --- */

#tl-tbl thead th + th,
#tl-tbl tbody td + td {
  border-left: 1px solid color-mix(in srgb, var(--line) 55%, transparent);
}

#tl-tbl .lg-baslik th { color: color-mix(in srgb, var(--accent) 52%, var(--muted)); }
#tl-tbl .lg-baslik th[data-alan]:hover { color: var(--accent); }
#tl-tbl .lg-baslik th.sirali {
  color: var(--accent);
  box-shadow: inset 0 -2px 0 var(--accent);
}

#tl-tbl .lg-suzgec td { background: color-mix(in srgb, var(--fg) 4%, var(--panel)); }

/* Siralanan sutun tonu; hover bunun ustunde kalmali. */
#tl-tbl tbody td.tl-sirali-sutun { background: color-mix(in srgb, var(--accent) 6%, transparent); }
#tl-tbl tbody tr:hover td.tl-sirali-sutun { background: color-mix(in srgb, var(--accent) 13%, transparent); }

#tl-tbl tbody td { font-variant-numeric: tabular-nums; }

#tl-tbl .tl-s-sure    { color: var(--muted); }
#tl-tbl .tl-s-davetli { color: var(--muted); font-weight: 600; }
#tl-tbl .tl-s-sahip   { color: color-mix(in srgb, var(--fg) 82%, var(--muted)); }

#tl-tbl .tl-s-islem { border-left: 1px solid var(--line); }

/* --- Liste: tarih araligi secici (fixed: tablonun kaydirma kutusu kirpmasin) --- */
.tl-tarih-kutu {
  width: 100%;
  height: 26px;
  padding: 0 8px;
  display: flex;
  align-items: center;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--fg);
  font: inherit;
  font-size: 12px;
  text-align: left;
  cursor: pointer;
  transition: border-color .14s ease, box-shadow .14s ease;
}
.tl-tarih-kutu:hover { border-color: color-mix(in srgb, var(--accent) 55%, var(--line)); }
.tl-tarih-kutu[aria-expanded="true"] {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 16%, transparent);
}
.tl-tarih-bos  { color: var(--muted); }
.tl-tarih-dolu { color: var(--fg); font-variant-numeric: tabular-nums; }

.tl-tarih-secici {
  position: fixed;
  z-index: 9999;
  padding: 12px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: 0 18px 50px rgba(0, 0, 0, .45);
}
:root[data-tema="acik"] .tl-tarih-secici { box-shadow: 0 18px 50px rgba(25, 39, 61, .18); }

.tl-ts-govde { display: flex; gap: 14px; }

.tl-ts-hazir { display: flex; flex-direction: column; gap: 4px; width: 132px; flex: none; }
.tl-ts-hazir-dugme {
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--bg);
  color: var(--accent);
  font: inherit;
  font-size: 12.5px;
  text-align: left;
  cursor: pointer;
  transition: background .12s ease, color .12s ease, border-color .12s ease;
}
.tl-ts-hazir-dugme:hover { background: color-mix(in srgb, var(--accent) 12%, transparent); }
.tl-ts-hazir-dugme.secili {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
  font-weight: 600;
}

.tl-ts-sag { display: flex; flex-direction: column; gap: 10px; min-width: 0; }

.tl-ts-kutular { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.tl-ts-kutu {
  display: flex;
  align-items: center;
  gap: 7px;
  height: 32px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--bg);
  color: var(--fg);
  font-size: 12.5px;
  font-variant-numeric: tabular-nums;
}
.tl-ts-ikon {
  width: 15px; height: 15px; flex: none;
  fill: none; stroke: var(--muted);
  stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round;
}

.tl-ts-aylar { position: relative; display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.tl-ts-ok {
  position: absolute;
  top: -2px;
  width: 26px; height: 26px;
  display: grid; place-items: center;
  border: 1px solid transparent;
  border-radius: 7px;
  background: transparent;
  color: var(--muted);
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
}
.tl-ts-ok { left: 0; }
.tl-ts-ok-sag { left: auto; right: 0; }
.tl-ts-ok:hover { background: var(--panel-2); color: var(--fg); border-color: var(--line); }

.tl-ts-ay { min-width: 224px; }
.tl-ts-ay-baslik {
  height: 26px;
  display: grid; place-items: center;
  color: var(--fg);
  font-size: 13.5px;
  font-weight: 600;
}
.tl-ts-gunadi,
.tl-ts-izgara { display: grid; grid-template-columns: repeat(7, 1fr); }
.tl-ts-gunadi { margin: 4px 0 2px; color: var(--muted); font-size: 11px; }
.tl-ts-gunadi span { text-align: center; }

.tl-ts-gun {
  height: 28px;
  border: 0;
  background: transparent;
  color: var(--fg);
  font: inherit;
  font-size: 12.5px;
  font-variant-numeric: tabular-nums;
  cursor: pointer;
  transition: background .1s ease, color .1s ease;
}
.tl-ts-gun:hover { background: color-mix(in srgb, var(--accent) 16%, transparent); border-radius: 6px; }
.tl-ts-gun.disari { color: color-mix(in srgb, var(--muted) 60%, transparent); }
.tl-ts-gun.bugun { font-weight: 700; }

.tl-ts-gun.arada { background: color-mix(in srgb, var(--accent) 13%, transparent); }
.tl-ts-gun.ucta {
  background: var(--accent);
  color: #fff;
  font-weight: 700;
}
.tl-ts-gun.ucta.bas { border-radius: 6px 0 0 6px; }
.tl-ts-gun.ucta.bit { border-radius: 0 6px 6px 0; }
.tl-ts-gun.ucta.bas.bit { border-radius: 6px; }

.tl-ts-alt {
  display: flex;
  gap: 8px;
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
}
.tl-ts-alt .pbtn { height: 32px; }

@media (max-width: 900px) {
  .tl-ts-aylar { grid-template-columns: 1fr; }
  .tl-ts-ay:last-child { display: none; }
}

.lg-tbl tr.acik td { background: color-mix(in srgb, var(--accent) 10%, transparent); }

/* --- Ayarlar menusu: cerceveli dugmeler; acilista hep bir bolum secili (portal.js ayarSekmesi) --- */
#ayar-sekme-uygulama         { --ayar-renk: #2a78d6; }
#ayar-sekme-kullanicilar     { --ayar-renk: #7c3aed; }
#ayar-sekme-ekibim           { --ayar-renk: #7c3aed; }
#ayar-sekme-loglar           { --ayar-renk: #64748b; }
#ayar-sekme-kimlik           { --ayar-renk: #4a3aa7; }
#ayar-sekme-sql              { --ayar-renk: #475569; }
#ayar-sekme-araclar          { --ayar-renk: #a16207; }
#ayar-sekme-lisans           { --ayar-renk: #E11D34; }

.modal-card.ayar-pencere { grid-template-columns: 236px minmax(0, 1fr); }

#profile-modal .ayar-menu { gap: 6px; }
#profile-modal .ayar-menu .ayar-sekme {
  --ayar-renk-v: var(--ayar-renk, var(--accent));
  display: flex; align-items: center; gap: 10px;
  padding: 7px 10px 7px 8px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel-2);
  color: var(--fg);
  font-weight: 550;
  font-size: 12.8px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, .06);
  transition: background .14s ease, border-color .14s ease, transform .1s ease;
}
#profile-modal .ayar-menu .ayar-sekme[hidden] { display: none; }
#profile-modal .ayar-menu .ayar-sekme:hover {
  border-color: var(--ayar-renk-v);
  background: color-mix(in srgb, var(--ayar-renk-v) 8%, var(--panel-2));
  transform: translateX(2px);
}
#profile-modal .ayar-menu .ayar-sekme.secili {
  border-color: var(--ayar-renk-v);
  background: color-mix(in srgb, var(--ayar-renk-v) 15%, var(--panel-2));
  color: var(--fg);
  font-weight: 700;
}
#profile-modal .ayar-sekme.secili::before { background: var(--ayar-renk-v); box-shadow: none; left: -1px; }
#profile-modal .ayar-menu .ayar-ikon {
  flex: 0 0 28px; width: 28px; height: 28px; margin: 0;
  display: grid; place-items: center;
  border-radius: 8px; font-size: 15px; opacity: 1;
  background: color-mix(in srgb, var(--ayar-renk-v) 18%, transparent);
  border: 1px solid color-mix(in srgb, var(--ayar-renk-v) 30%, transparent);
}
#profile-modal .ayar-menu .ayar-sekme.secili .ayar-ikon {
  background: var(--ayar-renk-v);
  border-color: var(--ayar-renk-v);
}

/* --- Ayarlar ✕: sag ustte, portala doner (portal.js ayarlariKapat) --- */
#profile-modal #profile-close.ayar-kapat {
  top: 12px; right: 14px; z-index: 6;
  width: 40px; height: 40px; padding: 0;
  display: grid; place-items: center;
  border: 1px solid var(--line); border-radius: 10px;
  background: var(--panel-2); color: var(--fg);
  font-size: 20px; line-height: 1; cursor: pointer;
}
#profile-modal #profile-close.ayar-kapat:hover { border-color: var(--danger, #e5484d); color: var(--danger, #e5484d); }
/* Icerik ✕'in altina girmesin (SQL konsolunda ✕ yok) */
body:not(.sql-sekmesi) #profile-modal .ayar-icerik { padding-right: 52px; }

/* --- Ayar sekmesi (EXE'nin Ayarlar penceresi): ayarlar sayfanin kendisi (portal.js ayarSekmesiMi) --- */
body.ayar-sekmesi #connect-view,
body.ayar-sekmesi .portal-bar,
body.ayar-sekmesi .dock,
body.ayar-sekmesi .chat-bar,
body.ayar-sekmesi .arac-bar,
body.ayar-sekmesi .surum { display: none !important; }
body.ayar-sekmesi { overflow: hidden; }
body.ayar-sekmesi #profile-modal { padding: 0; background: var(--bg); overflow: hidden; }
body.ayar-sekmesi .modal-card.ayar-pencere,
body.ayar-sekmesi .modal-card.ayar-pencere.genis {
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}
body.ayar-sekmesi #profile-modal { right: 0 !important; left: 0 !important; }
body.ayar-sekmesi #people-dock { display: none !important; }

/* EXE: web ile ayni duzen (solda menu, sagda bolum, ✕ sekmeyi kapatir).
Kart gorunur alanla sinirli: "height:100%" modal izgarasinda icerige gore cozuluyordu. */
body.ayar-sekmesi .modal-card.ayar-pencere,
body.ayar-sekmesi .modal-card.ayar-pencere.genis { height: 100vh !important; max-height: 100vh !important; }

/* --- EXE ekrani (#ekran=...): tam sayfa, portalin geri kalani gizli --- */
body.exe-ekran #connect-view,
body.exe-ekran .portal-bar,
body.exe-ekran .dock,
body.exe-ekran .chat-bar,
body.exe-ekran .arac-bar,
body.exe-ekran .surum,
body.exe-ekran #people-dock { display: none !important; }
body.exe-ekran { overflow: hidden; }
body.exe-ekran .toplanti-view { position: fixed !important; inset: 0 !important; }
body.exe-ekran #notlar-modal { padding: 0 !important; background: var(--bg) !important; right: 0 !important; left: 0 !important; }
body.exe-ekran #notlar-modal .modal-card { width: 100% !important; max-width: none !important; height: 100vh !important; max-height: 100vh !important; border-radius: 0 !important; box-shadow: none !important; border: 0 !important; }

/* --- "← Portala dön": tam ekranlarin ortak donus dugmesi (.sv-kapat ve .modal-x kurallarini ezer) --- */
.portala-don.sv-kapat,
.portala-don.sv-ikon,
.portala-don.modal-x {
  width: auto;
  height: 32px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-2);
  color: var(--fg);
  font: inherit;
  font-size: 13px;
  white-space: nowrap;
  cursor: pointer;
}
.portala-don.sv-kapat:hover,
.portala-don.sv-ikon:hover,
.portala-don.modal-x:hover { border-color: var(--accent); background: var(--panel-2); }
.portala-don.modal-x { top: 12px; right: 14px; z-index: 2; }

/* --- Sohbetler: sag sutun aciksa yerini birakir (ayri sekme ve dar ekranda tam ekran) --- */
body:not(.sohbet-sekmesi):has(#people-dock:not([hidden])) .sohbetler-view { right: var(--sag-sutun); }
@media (max-width: 699px) {
  body:not(.sohbet-sekmesi):has(#people-dock:not([hidden])) .sohbetler-view { right: 0; }
}

/* SQL baglanti penceresi: baglanti yokken "Portala dön", varken ✕ */
#sql-baglan-portal { display: none; }
#sql-baglan-modal.portala-acik #sql-baglan-portal { display: inline-flex; align-items: center; }
#sql-baglan-modal.portala-acik #sql-baglan-kapat { display: none; }

/* --- Komut dosyasi: kolon secimi ve GO ayraci --- */
.sql-betik-ac {
  display: inline-flex; align-items: center; justify-content: center;
  width: 18px; height: 18px; margin-right: 4px; padding: 0;
  border: 1px solid var(--line); border-radius: 4px;
  background: var(--panel-2); color: var(--muted);
  font-size: 10px; line-height: 1; cursor: pointer; vertical-align: middle;
}
.sql-betik-ac:hover { border-color: var(--accent); color: var(--fg); }
.sql-betik-eksik { margin-left: 6px; color: #d29922; font-size: 11px; }
.sql-betik-kolonlar {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 2px 12px;
  padding: 6px 10px 8px 54px;
  border-bottom: 1px solid var(--line);
  background: var(--panel-2);
  font-size: 12px;
}
.sql-betik-kolonlar .sql-betik-kolon-arac { grid-column: 1 / -1; display: flex; gap: 6px; margin-bottom: 4px; }
.sql-betik-kart .sql-betik-kolonlar label {
  display: flex; align-items: center; gap: 6px; margin: 0; min-width: 0;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; cursor: pointer;
}
.sql-betik-kart .sql-betik-kolonlar input[type=checkbox] { width: auto; height: auto; margin: 0; flex: none; }
.sql-betik-kolon-tur { color: var(--muted); font-size: 10.5px; }
.sql-betik-kart .sql-betik-satir input[type=text] {
  flex: none; width: 90px; height: 30px; padding: 0 8px;
  border: 1px solid var(--line); border-radius: 7px;
  background: var(--bg); color: var(--fg);
  font-family: Consolas, "Courier New", monospace;
}
.sql-betik-go-not { margin: 4px 0 0; font-size: 11px; }

/* --- SQL: ust arac cubugu ve sonuc / mesaj sekmeleri --- */
.sql-ust-arac { margin: 0 0 8px; }
.sql-alt-serit { margin: 8px 0 6px; }
.sql-alt-serit .sql-limit { margin-left: auto; }
.sql-alt-serit .sql-durum { margin-left: 0; min-width: 48px; text-align: right; }

.sql-sonuc-sekmeler {
  display: flex;
  gap: 2px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 10px;
}
.sql-sonuc-sekme {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 14px;
  border: 1px solid transparent;
  border-bottom: 0;
  border-radius: 8px 8px 0 0;
  margin-bottom: -1px;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 12.5px;
  cursor: pointer;
}
.sql-sonuc-sekme:hover { color: var(--fg); }
.sql-sonuc-sekme.secili {
  background: var(--panel);
  border-color: var(--line);
  color: var(--fg);
}
.sql-sonuc-sekme .sql-sekme-hata { color: #f85149; font-size: 10px; }
.sql-sonuc-panel { display: flex; flex-direction: column; gap: 18px; }
.sql-sonuc-panel[hidden] { display: none; }
.sql-mesaj-panel {
  margin: 0;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--bg);
  font-family: Consolas, "Courier New", monospace;
  font-size: 12.5px;
  line-height: 1.55;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.sql-mesaj-panel[hidden] { display: none; }
.sql-mesaj-panel .sql-mesaj-hata { color: #f85149; }
.sql-mesaj-panel .sql-mesaj-uyari { color: #d29922; }
.sql-mesaj-panel .sql-mesaj-zaman { color: var(--muted); }

/* --- Sohbet listesinde ad en fazla iki satir; tamami title'da --- */
.sohbet-satir .s-ad {
  white-space: normal;
  overflow-wrap: anywhere;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  line-height: 1.3;
}

/* --- Ayarlar kaydirma (web): izgara satiri ekrana sabit, menu ve icerik kendi icinde kayar --- */
#profile-modal {
  grid-template-rows: minmax(0, 1fr);
  grid-template-columns: minmax(0, 1fr);
}
#profile-modal .modal-card.ayar-pencere,
#profile-modal .modal-card.ayar-pencere.genis {
  min-height: 0;
  max-height: 100%;
}
#profile-modal .ayar-icerik { overscroll-behavior: contain; }

/* --- Yonetici karti sutunu doldurur --- */
body:has(#connect-view.panelli) .portal-bar > .user-chip {
  flex: 1 1 auto;
  min-width: 0;
}

/* --- Sag alttaki sohbet penceresi boyu --- */
@media (min-width: 721px) {
  .chat-bar .chat-dock { width: 280px; height: 350px; }
  .chat-dock .chat-head { gap: 6px; padding: 0 6px 0 10px; }
  .chat-dock .chat-baglan { padding: 0 7px; font-size: 11.5px; height: 26px; white-space: nowrap; }
  .chat-dock .chat-peer strong { font-size: 13px; }
}

/* Toplanti ayrintisi: sunucudaki kayitlar (KARAR 79, portal.js toplantiKayitlariniYaz). */
.tk-kayitlar { margin-top: 12px; display: flex; flex-direction: column; gap: 6px; }
.tk-kayitlar[hidden] { display: none; }
.tk-kayitlar h4 { margin: 0 0 2px; font-size: 13px; }
.tk-kayit-dosya {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px;
  padding: 6px 8px; border: 1px solid var(--line); border-radius: 8px; font-size: 12.5px;
}
.tk-kayit-dosya-bilgi { color: var(--muted); }
.tk-kayit-dosya-bilgi b { color: inherit; font-weight: 600; }
.tk-kayit-dosya-dugmeler { display: inline-flex; gap: 6px; }
.tk-kayit-dosya-dugmeler .pbtn { height: 28px; padding: 0 10px; }

/* --- Destek istegi (KARAR 83, 86; public/destek.js). Musteri: sag sutun kisi paneli siniflariyla. --- */
.destek-ipucu { margin: 0; font-size: 12px; color: var(--muted); }
.destek-genel-satir { display: flex; flex-direction: column; gap: 6px; padding: 4px 12px 10px; }
.destek-genel-satir #destek-genel { width: 100%; height: 36px; }
.destek-genel-durum { margin: 0 12px 8px; font-size: 12.5px; color: var(--ok); }
.destek-genel-durum.hata { color: var(--danger); }
.destek-satir { cursor: default; user-select: none; }
.destek-satir .p-main { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; }
.destek-satir .destek-ad { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.destek-satir .destek-alt { font-size: 11.5px; color: var(--muted); }
.destek-satir.cevrimdisi .p-name { color: var(--muted); }
.destek-satir .destek-iste { flex: none; height: 28px; padding: 0 10px; font-size: 12px; white-space: nowrap; }

/* Ortada firma yazisi (zemin): sade, buyuk, soluk */
.musteri-zemin {
  max-width: min(900px, 86%); margin: 0 auto; text-align: center; pointer-events: none; user-select: none;
  font-size: clamp(26px, 3.6vw, 58px); font-weight: 800; line-height: 1.15; letter-spacing: -.01em;
  color: color-mix(in srgb, var(--fg) 16%, transparent);
}
.musteri-zemin-firma { color: color-mix(in srgb, var(--accent) 34%, transparent); }
/* Arka plan (KARAR 87): firmanin resmi ya da varsayilan zemin; yazi her ikisinde acik renk */
#connect-view.musteri-arkaplan {
  background: #0b1220 url('musteri-zemin.svg') center / cover no-repeat;
}
#connect-view.musteri-arkaplan.ozel-zemin { background-color: #000; background-position: center; background-size: cover; background-repeat: no-repeat; }
#connect-view.musteri-arkaplan .musteri-zemin { color: rgba(255, 255, 255, .78); text-shadow: 0 2px 18px rgba(0, 0, 0, .55); }
#connect-view.musteri-arkaplan .musteri-zemin-firma { color: #fff; }
body.musteri-gorunum #connect-view > .card { display: none; }
body.musteri-gorunum #btn-indir { display: none; }

/* Sag ustte indirme (exe icinde yok) */
.musteri-indir {
  position: fixed; top: 12px; right: calc(var(--sag-sutun, 340px) + 16px); z-index: 25;
  height: 42px; padding: 0 20px; display: inline-flex; align-items: center; gap: 6px;
  font-size: 15px; font-weight: 700; text-decoration: none; box-shadow: 0 8px 22px rgba(0, 0, 0, .18);
}

/* "Uygulamayi indirip acin" istemi */
.destek-uygulama {
  position: fixed; left: calc((100vw - var(--sag-sutun, 340px)) / 2); top: 50%; transform: translate(-50%, -50%);
  z-index: 40; width: min(460px, calc(100vw - var(--sag-sutun, 340px) - 32px)); padding: 22px 24px;
  display: flex; flex-direction: column; gap: 10px; text-align: center;
  background: var(--panel); border: 1px solid var(--accent); border-radius: 14px; box-shadow: 0 18px 50px rgba(0, 0, 0, .28);
}
.destek-uygulama h2 { margin: 0; font-size: 18px; }
.destek-uygulama .modal-x { position: absolute; top: 8px; right: 8px; }
.destek-uygulama-kim { margin: 0; font-size: 13px; color: var(--muted); }
.destek-uygulama-indir { align-self: center; height: 46px; padding: 0 28px; font-size: 16px; font-weight: 700; text-decoration: none; display: inline-flex; align-items: center; }

/* Telefon: sag sutun cekmece degil, sayfada tam genislik bolum */
@media (max-width: 699px) {
  body.musteri-gorunum #connect-view.panelli {
    display: flex; flex-direction: column; align-items: stretch; justify-content: flex-start; gap: 16px;
    height: auto; min-height: 100%; overflow-y: auto; padding: 66px 0 16px !important;
  }
  body.musteri-gorunum #connect-view .musteri-zemin { order: 1; font-size: 24px; max-width: 100%; margin: 6px 12px 0; }
  body.musteri-gorunum #connect-view > .mobil-alt-serit { order: 3; margin-top: auto; }
  body.musteri-gorunum #connect-view #destek-kart.dock {
    order: 2; position: static !important; transform: none !important; visibility: visible !important;
    width: auto !important; margin: 0 12px; max-height: none !important; border: 1px solid var(--line) !important;
    border-radius: 12px !important; box-shadow: none !important; transition: none !important;
  }
  .musteri-indir { right: 62px; top: 10px; height: 44px; padding: 0 14px; }
  .destek-uygulama { left: 50%; width: calc(100vw - 24px); }
}
.destek-istekleri {
  position: fixed; right: 16px; bottom: 16px; z-index: 9000;
  display: flex; flex-direction: column; gap: 10px; width: min(360px, calc(100vw - 32px));
}
.destek-istek {
  padding: 14px 16px; background: var(--panel); border: 1px solid var(--accent); border-radius: 12px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, .22); display: flex; flex-direction: column; gap: 6px;
}
.destek-istek strong { font-size: 14px; }
.destek-istek-firma { font-size: 12px; color: var(--muted); }
.destek-istek-durum { margin: 0; font-size: 12px; color: var(--danger); }
.destek-istek-dugmeler { display: flex; justify-content: flex-end; gap: 8px; margin-top: 4px; }
/* Yetkili: uygulamadan acilan destek talepleri (KARAR 94), kisiler panelinin ustunde */
.destek-talepleri .talep-liste { display: flex; flex-direction: column; gap: 8px; padding: 4px 10px 10px; max-height: 46vh; overflow-y: auto; }
.talep {
  padding: 10px 12px; border: 1px solid var(--accent); border-radius: 10px; background: var(--panel);
  display: flex; flex-direction: column; gap: 4px; min-width: 0;
}
.talep-ust { display: flex; align-items: baseline; gap: 8px; }
.talep-ad { flex: 1; min-width: 0; font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.talep-zaman { flex: none; font-size: 11px; color: var(--muted); }
.talep-alt { font-size: 12px; color: var(--muted); overflow-wrap: anywhere; }
.talep-aciklama {
  margin: 2px 0 0; font-size: 12.5px; white-space: pre-wrap; overflow-wrap: anywhere;
  display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden;
}
.talep-etiketler { display: flex; flex-wrap: wrap; gap: 6px; }
.talep-etiket { font-size: 11px; padding: 1px 8px; border-radius: 999px; background: color-mix(in srgb, var(--accent) 14%, transparent); }
.talep-etiket.oto { background: color-mix(in srgb, var(--ok, #16a34a) 18%, transparent); }
.talep-etiket.kapali { background: color-mix(in srgb, var(--muted) 22%, transparent); }
.talep-durum { margin: 0; font-size: 12px; color: var(--muted); }
.talep-durum.hata { color: var(--danger); }
.talep-dugmeler { display: flex; justify-content: flex-end; gap: 8px; margin-top: 2px; }
.talep-dugmeler .pbtn { height: 28px; padding: 0 12px; font-size: 12px; }
