:root {
  --sidebar: #0f1a2a;
  --sidebar-hover: #16233a;
  --sidebar-active: #1d2b44;
  --sidebar-text: #aeb8c7;
  --sidebar-text-strong: #ffffff;
  --sidebar-line: #1f2c40;

  --bg: #f3f5f8;
  --card: #ffffff;
  --line: #e3e7ed;
  --line-soft: #eef1f5;
  --text: #17202c;
  --text-2: #4a5566;
  --muted: #7a8596;
  --input: #ffffff;
  --input-line: #d8dde5;

  --primary: #1f5fd1;
  --primary-hover: #1a52b6;
  --primary-soft: #eaf1fd;
  --green: #17895a;
  --green-soft: #e7f5ee;
  --red: #cf2e45;
  --red-soft: #fcebee;
  --amber: #b86e00;
  --amber-soft: #fdf3e2;
  --gray-soft: #eef1f5;
  --read: #1d8fe1;

  --radius: 10px;
  --radius-sm: 7px;
  --shadow: 0 1px 2px rgba(16, 24, 40, .04);
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

:root[data-theme="dark"] {
  --bg: #0c131e;
  --card: #121c2a;
  --line: #223046;
  --line-soft: #1a2536;
  --text: #e6ebf2;
  --text-2: #b4bfcd;
  --muted: #8591a3;
  --input: #0f1824;
  --input-line: #2a3a52;
  --primary: #3b7bea;
  --primary-hover: #5189ec;
  --primary-soft: #16294a;
  --green: #3cc18a;
  --green-soft: #12301f;
  --red: #f0596f;
  --red-soft: #3a1720;
  --amber: #f0a73a;
  --amber-soft: #36270f;
  --gray-soft: #1a2536;
  --sidebar: #0a111b;
  --sidebar-hover: #111b29;
  --sidebar-active: #172336;
  --sidebar-line: #172234;
  --shadow: none;
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { font-family: var(--font); font-size: 14px; color: var(--text); background: var(--bg); -webkit-font-smoothing: antialiased; }
a { color: var(--primary); text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3 { margin: 0; font-weight: 600; }
code, .mono { font-family: var(--mono); font-size: 12.5px; }

/* ---- Yerleşim ---- */
.layout { display: flex; min-height: 100vh; }
.sidebar {
  width: 236px; flex-shrink: 0; background: var(--sidebar); color: var(--sidebar-text);
  display: flex; flex-direction: column; position: fixed; inset: 0 auto 0 0; z-index: 30;
}
.brand { display: flex; align-items: center; gap: 10px; padding: 18px 18px 16px; color: var(--sidebar-text-strong); }
.brand-mark { width: 30px; height: 30px; display: block; flex-shrink: 0; }
.brand-name { font-weight: 700; font-size: 17px; letter-spacing: -.2px; }
.brand-ver { font-size: 11px; background: var(--sidebar-active); color: var(--sidebar-text); padding: 2px 6px; border-radius: 5px; }
.nav { padding: 6px 10px; flex: 1; overflow-y: auto; }
.nav-label { font-size: 11px; text-transform: uppercase; letter-spacing: .6px; color: #66758b; padding: 14px 10px 6px; }
.nav a {
  display: flex; align-items: center; gap: 11px; padding: 9px 10px; border-radius: 8px; margin-bottom: 2px;
  color: var(--sidebar-text); font-weight: 500;
}
.nav a:hover { background: var(--sidebar-hover); color: var(--sidebar-text-strong); }
.nav a.active { background: var(--sidebar-active); color: var(--sidebar-text-strong); }
.nav a svg { width: 18px; height: 18px; flex-shrink: 0; opacity: .85; }
.nav .count { margin-left: auto; font-size: 11px; background: var(--sidebar-active); padding: 1px 7px; border-radius: 10px; }
.nav a.active .count { background: #2a3a55; }
.avatar { width: 32px; height: 32px; border-radius: 50%; background: var(--sidebar-active); color: #fff; display: grid; place-items: center; font-weight: 600; font-size: 13px; flex-shrink: 0; }

.main { flex: 1; margin-left: 236px; min-width: 0; display: flex; flex-direction: column; }
.topbar { height: 60px; display: flex; align-items: center; gap: 12px; padding: 0 28px; border-bottom: 1px solid var(--line); background: var(--card); position: sticky; top: 0; z-index: 20; }
.topbar h1 { font-size: 16px; }
.topbar .crumb { color: var(--muted); font-size: 13px; }
.topbar .spacer { flex: 1; }
.menu-toggle { display: none; background: none; border: 0; padding: 6px; cursor: pointer; color: var(--text); }
.content { padding: 24px 28px 40px; max-width: 1400px; width: 100%; }

/* ---- Kartlar ---- */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.card + .card, .card + .grid, .grid + .card { margin-top: 18px; }
/* Izgara içindeki kartlar yan yana durur; üst boşluk yalnız alt alta kartlarda */
.grid > .card, .session-grid > .card, .grid > * > .card { margin-top: 0; }
.card-head { display: flex; align-items: center; gap: 10px; padding: 14px 18px; border-bottom: 1px solid var(--line); min-height: 54px; }
.card-head h2 { font-size: 14.5px; }
.card-head .sub { color: var(--muted); font-size: 12.5px; }
.card-head .actions { margin-left: auto; display: flex; gap: 8px; align-items: center; }
.card-body { padding: 18px; }
.grid { display: grid; gap: 18px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-send { grid-template-columns: minmax(0, 1.4fr) minmax(300px, 1fr); align-items: start; }

/* Özet şeridi (ekrandaki "Destek özeti" gibi) */
.stats { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); }
.stat { padding: 16px 18px; border-right: 1px solid var(--line); }
.stat:last-child { border-right: 0; }
.stat-label { display: flex; align-items: center; gap: 7px; font-size: 11.5px; font-weight: 600; letter-spacing: .5px; text-transform: uppercase; color: var(--muted); }
.stat-label::before { content: ''; width: 3px; height: 12px; border-radius: 2px; background: var(--bar, var(--primary)); }
.stat-value { font-size: 26px; font-weight: 700; margin-top: 6px; letter-spacing: -.5px; }
.stat-hint { font-size: 12.5px; color: var(--muted); margin-top: 2px; }
.stats-foot { border-top: 1px solid var(--line); padding: 10px 18px; font-size: 12.5px; color: var(--text-2); display: flex; gap: 22px; flex-wrap: wrap; }
.stats-foot b { color: var(--text); }

/* ---- Tablolar ---- */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th { text-align: left; font-size: 12px; font-weight: 600; color: var(--text-2); padding: 11px 16px; border-bottom: 1px solid var(--line); white-space: nowrap; background: var(--card); }
td { padding: 12px 16px; border-bottom: 1px solid var(--line-soft); vertical-align: middle; }
tr:last-child td { border-bottom: 0; }
tbody tr:hover td { background: var(--line-soft); }
.cell-main { font-weight: 600; }
.cell-sub { color: var(--muted); font-size: 12.5px; margin-top: 2px; }
.cell-text { max-width: 420px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text-2); }
.empty { text-align: center; color: var(--muted); padding: 44px 16px; }
.empty svg { width: 36px; height: 36px; opacity: .45; display: block; margin: 0 auto 10px; }

/* ---- Form ---- */
.field { margin-bottom: 16px; }
.field > label, .label { display: block; font-weight: 500; font-size: 13px; margin-bottom: 6px; color: var(--text); }
.hint { font-size: 12.5px; color: var(--muted); margin-top: 5px; }
.input, select.input, textarea.input {
  width: 100%; background: var(--input); border: 1px solid var(--input-line); border-radius: var(--radius-sm);
  padding: 9px 11px; outline: none; transition: border-color .12s;
}
.input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); }
textarea.input { resize: vertical; min-height: 110px; line-height: 1.5; }
.search { position: relative; }
.search svg { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); width: 16px; height: 16px; color: var(--muted); }
.search .input { padding-left: 34px; }
.filters { display: flex; gap: 10px; padding: 14px 18px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.filters .search { flex: 1; min-width: 220px; }
.filters select.input { width: auto; min-width: 150px; }
.checkbox { display: flex; align-items: center; gap: 8px; cursor: pointer; font-size: 13.5px; }
.checkbox input { width: 16px; height: 16px; accent-color: var(--primary); }
.check-list { border: 1px solid var(--input-line); border-radius: var(--radius-sm); max-height: 180px; overflow: auto; padding: 8px 10px; display: grid; gap: 7px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px; border-radius: var(--radius-sm); border: 1px solid var(--input-line);
  background: var(--card); padding: 8px 14px; font-weight: 500; cursor: pointer; white-space: nowrap; color: var(--text);
}
.btn:hover { background: var(--line-soft); }
.btn svg { width: 16px; height: 16px; }
.btn-primary { background: var(--primary); border-color: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-hover); }
.btn-danger { color: var(--red); }
.btn-danger:hover { background: var(--red-soft); }
.btn-danger-solid { background: var(--red); border-color: var(--red); color: #fff; }
.btn-danger-solid:hover { background: var(--red); filter: brightness(.92); }
.btn-sm { padding: 5px 10px; font-size: 13px; }
/* Yalnız ikon; yazı üstüne gelince açılır */
.btn-expand { gap: 0; padding: 6px 8px; }
.btn-expand .lbl { max-width: 0; overflow: hidden; white-space: nowrap; opacity: 0; transition: max-width .18s ease, opacity .12s ease, margin .18s ease; }
.btn-expand:hover .lbl, .btn-expand:focus-visible .lbl { max-width: 160px; opacity: 1; margin-left: 7px; }
@media (hover: none) { .btn-expand .lbl { max-width: none; opacity: 1; margin-left: 7px; } }
.btn[disabled] { opacity: .55; cursor: not-allowed; }
.btn-link { background: none; border: 0; color: var(--primary); cursor: pointer; padding: 0; font-weight: 500; }

.segmented { display: inline-flex; border: 1px solid var(--input-line); border-radius: var(--radius-sm); padding: 3px; gap: 3px; background: var(--input); }
.segmented button { border: 0; background: none; padding: 6px 13px; border-radius: 5px; cursor: pointer; font-weight: 500; color: var(--text-2); }
.segmented button.on { background: var(--primary-soft); color: var(--primary); }

.dropzone { border: 1.5px dashed var(--input-line); border-radius: var(--radius); padding: 22px; text-align: center; color: var(--muted); cursor: pointer; transition: border-color .12s, background .12s; }
.dropzone:hover, .dropzone.drag { border-color: var(--primary); background: var(--primary-soft); color: var(--primary); }
.dropzone svg { width: 26px; height: 26px; display: block; margin: 0 auto 8px; }
.image-picked { display: flex; gap: 12px; align-items: center; border: 1px solid var(--line); border-radius: var(--radius); padding: 10px; }
.image-picked img { width: 64px; height: 64px; object-fit: cover; border-radius: 6px; }

/* ---- Rozetler ---- */
.badge { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 500; padding: 3px 8px; border-radius: 6px; background: var(--gray-soft); color: var(--text-2); white-space: nowrap; }
.badge svg { width: 14px; height: 14px; }
.badge.green { background: var(--green-soft); color: var(--green); }
.badge.red { background: var(--red-soft); color: var(--red); }
.badge.amber { background: var(--amber-soft); color: var(--amber); }
.badge.blue { background: var(--primary-soft); color: var(--primary); }
.badge.read svg { color: var(--read); }
.dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; background: var(--muted); }
.dot.green { background: var(--green); } .dot.amber { background: var(--amber); } .dot.red { background: var(--red); }
.tag { font-size: 11.5px; padding: 2px 7px; border-radius: 5px; border: 1px solid var(--line); color: var(--text-2); }

/* ---- Oturum kartları ---- */
.session-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 380px), 1fr)); gap: 18px; }
.session-card .card-body { display: grid; gap: 10px; }
.session-row { display: flex; justify-content: space-between; font-size: 13px; }
.session-row span:first-child { color: var(--muted); }
.session-actions { display: flex; gap: 8px; padding: 12px 18px; border-top: 1px solid var(--line); flex-wrap: wrap; align-items: center; }
.wa-icon { width: 36px; height: 36px; border-radius: 9px; background: var(--green-soft); color: var(--green); display: grid; place-items: center; flex-shrink: 0; }
.wa-icon svg { width: 20px; height: 20px; }

/* ---- Önizleme balonu ---- */
.phone-preview { background: #efeae2; border-radius: var(--radius); padding: 18px; min-height: 240px; display: flex; flex-direction: column; justify-content: flex-end; }
:root[data-theme="dark"] .phone-preview { background: #0b141a; }
.bubble { align-self: flex-end; max-width: 85%; background: #d9fdd3; color: #111b21; border-radius: 8px 0 8px 8px; padding: 6px 8px 4px; font-size: 14px; box-shadow: 0 1px .5px rgba(11,20,26,.13); white-space: pre-wrap; word-break: break-word; }
:root[data-theme="dark"] .bubble { background: #005c4b; color: #e9edef; }
.bubble img { display: block; max-width: 100%; border-radius: 6px; margin-bottom: 4px; }
.bubble .meta { text-align: right; font-size: 11px; color: #667781; margin-top: 2px; }
:root[data-theme="dark"] .bubble .meta { color: #8fb5ab; }
.bubble.in { align-self: flex-start; background: #fff; border-radius: 0 8px 8px 8px; }
:root[data-theme="dark"] .bubble.in { background: #202c33; }

/* ---- Sohbetler ---- */
.chat-layout { display: grid; grid-template-columns: 320px minmax(0, 1fr); height: calc(100vh - 60px - 64px); min-height: 480px; overflow: hidden; }
/* Liste ve sohbet kendi içinde kayar; sayfa kaymaz */
.chat-list { border-right: 1px solid var(--line); display: flex; flex-direction: column; min-height: 0; }
#chat-items { flex: 1; overflow-y: auto; min-height: 0; }
.chat-item { display: flex; gap: 10px; padding: 12px 14px; border-bottom: 1px solid var(--line-soft); cursor: pointer; }
.chat-item:hover { background: var(--line-soft); }
.chat-item.active { background: var(--primary-soft); }
.chat-item .avatar { background: var(--gray-soft); color: var(--text-2); width: 40px; height: 40px; }
.avatar-click { cursor: zoom-in; }
.chat-item .ci-main { min-width: 0; flex: 1; }
.chat-item .ci-top { display: flex; justify-content: space-between; gap: 6px; }
.chat-item .ci-name { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chat-item .ci-time { font-size: 11.5px; color: var(--muted); flex-shrink: 0; }
.chat-item .ci-last { font-size: 13px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 2px; }
.chat-pane { display: flex; flex-direction: column; min-width: 0; min-height: 0; overflow: hidden; }
.chat-pane-head { padding: 12px 18px; border-bottom: 1px solid var(--line); display: flex; gap: 10px; align-items: center; }
.chat-messages { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 18px; display: flex; flex-direction: column; gap: 6px; background: #efeae2; }
:root[data-theme="dark"] .chat-messages { background: #0b141a; }
.load-older { display: flex; justify-content: center; margin-bottom: 6px; }
.load-older .btn { background: var(--card); }
.chat-messages .bubble { max-width: 70%; }
/* Sohbette görseller küçük önizleme; tıklayınca büyür */
.chat-messages .bubble.has-media { max-width: min(300px, 80%); }
.chat-messages .bubble img { width: 100%; max-width: 280px; max-height: 280px; object-fit: cover; cursor: zoom-in; }
#chat-session { max-width: 340px; }
/* Okunmamış */
.chat-item .ci-time.unread { color: #1faa53; font-weight: 600; }
.unread-badge { background: #1faa53; color: #fff; font-size: 11.5px; font-weight: 600; min-width: 20px; height: 20px; border-radius: 10px; display: inline-grid; place-items: center; padding: 0 6px; flex-shrink: 0; }
.chat-item .ci-bottom { display: flex; align-items: center; gap: 8px; margin-top: 2px; }
.chat-item .ci-bottom .ci-last { flex: 1; margin-top: 0; }
.chat-item.unread .ci-name, .chat-item.unread .ci-last { color: var(--text); font-weight: 600; }
.nav .count.unread { background: #1faa53; color: #fff; }
/* Görsel büyütme */
.lightbox { position: fixed; inset: 0; z-index: 400; background: rgba(8, 12, 18, .88); display: flex; align-items: center; justify-content: center; cursor: zoom-out; }
/* Ekranın ortasında, her iki yönde de sınırlı; indir düğmesine yer kalır */
.lightbox img { display: block; width: auto; height: auto; max-width: min(90vw, 1200px); max-height: calc(100vh - 140px); object-fit: contain; border-radius: 6px; box-shadow: 0 10px 40px rgba(0,0,0,.4); cursor: default; }
.lightbox .lb-close { position: absolute; top: 16px; right: 16px; background: rgba(255,255,255,.12); border: 0; color: #fff; width: 38px; height: 38px; border-radius: 50%; cursor: pointer; display: grid; place-items: center; }
.lightbox .lb-close:hover { background: rgba(255,255,255,.22); }
.lightbox .lb-actions { position: absolute; bottom: 18px; left: 50%; transform: translateX(-50%); display: flex; gap: 8px; }
.lightbox .lb-actions a { color: #fff; background: rgba(255,255,255,.12); padding: 7px 14px; border-radius: 8px; font-size: 13px; display: inline-flex; gap: 6px; align-items: center; }
.chat-messages .bubble .by { font-size: 11px; color: #667781; margin-bottom: 2px; }
.chat-compose { border-top: 1px solid var(--line); padding: 10px 12px; display: flex; gap: 8px; align-items: flex-end; }
.chat-compose textarea { min-height: 40px; max-height: 140px; }
.day-sep { align-self: center; font-size: 12px; background: rgba(255,255,255,.9); color: #54656f; padding: 4px 10px; border-radius: 6px; margin: 6px 0; }
:root[data-theme="dark"] .day-sep { background: #182229; color: #8696a0; }

/* ---- Modal & toast ---- */
.modal-back { position: fixed; inset: 0; background: rgba(10, 17, 27, .45); display: grid; place-items: center; z-index: 100; padding: 16px; }
.modal { background: var(--card); border-radius: 12px; border: 1px solid var(--line); width: 100%; max-width: 480px; max-height: calc(100vh - 32px); overflow: auto; }
.modal.wide { max-width: 640px; }
.modal-head { display: flex; align-items: center; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.modal-head h3 { font-size: 15px; }
.modal-head button { margin-left: auto; background: none; border: 0; cursor: pointer; color: var(--muted); padding: 4px; }
.modal-body { padding: 20px; }
.modal-foot { display: flex; justify-content: flex-end; gap: 8px; padding: 14px 20px; border-top: 1px solid var(--line); }
.qr-box { display: grid; place-items: center; min-height: 300px; }
.qr-box img { width: 280px; height: 280px; border: 1px solid var(--line); border-radius: 8px; background: #fff; padding: 8px; }
.qr-steps { margin: 16px 0 0; padding-left: 20px; color: var(--text-2); line-height: 1.8; font-size: 13.5px; }

.toasts { position: fixed; right: 20px; bottom: 20px; display: grid; gap: 8px; z-index: 200; }
.toast { background: #17202c; color: #fff; padding: 11px 16px; border-radius: 8px; font-size: 13.5px; max-width: 380px; box-shadow: 0 6px 20px rgba(0,0,0,.18); }
.toast.error { background: var(--red); }
.toast.ok { background: var(--green); }

.keybox { display: flex; gap: 8px; align-items: center; background: var(--line-soft); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 10px 12px; word-break: break-all; }
.keybox code { flex: 1; }
.notice { border: 1px solid var(--line); border-left: 3px solid var(--amber); background: var(--amber-soft); padding: 10px 14px; border-radius: var(--radius-sm); font-size: 13px; color: var(--text); }
.notice.info { border-left-color: var(--primary); background: var(--primary-soft); }
.notice.error { border-left-color: var(--red); background: var(--red-soft); }

pre.code { background: #0f1a2a; color: #d6deea; padding: 14px 16px; border-radius: 8px; overflow-x: auto; font-family: var(--mono); font-size: 12.5px; line-height: 1.6; margin: 8px 0 0; }
.doc h3 { font-size: 14px; margin: 22px 0 6px; }
.doc h3:first-child { margin-top: 0; }
.doc p { margin: 6px 0; color: var(--text-2); line-height: 1.6; }
.doc table { border: 1px solid var(--line); border-radius: 8px; margin-top: 8px; }
.doc td, .doc th { padding: 8px 12px; font-size: 13px; }
.method { font-family: var(--mono); font-size: 11.5px; font-weight: 700; padding: 2px 6px; border-radius: 4px; background: var(--green-soft); color: var(--green); margin-right: 6px; }
.method.get { background: var(--primary-soft); color: var(--primary); }

.pager { display: flex; align-items: center; gap: 10px; padding: 12px 18px; border-top: 1px solid var(--line); color: var(--muted); font-size: 13px; }
.pager .spacer { flex: 1; }
.thumb { width: 38px; height: 38px; border-radius: 6px; object-fit: cover; border: 1px solid var(--line); vertical-align: middle; cursor: zoom-in; }
.muted { color: var(--muted); }
.row { display: flex; gap: 10px; align-items: center; }
.row-wrap { flex-wrap: wrap; }
.mt { margin-top: 16px; }
.hidden { display: none !important; }

/* ---- Giriş ---- */
.login-page { min-height: 100vh; display: grid; place-items: center; padding: 24px; background: var(--bg); }
.login-card { width: 100%; max-width: 400px; }
.login-card .brand { color: var(--text); padding: 0 0 22px; justify-content: center; }
.login-card .brand-ver { background: var(--gray-soft); color: var(--text-2); }
.login-card .card-body { padding: 26px; }
.login-card h1 { font-size: 18px; margin-bottom: 4px; }
.divider { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 12px; margin: 18px 0; }
.divider::before, .divider::after { content: ''; flex: 1; height: 1px; background: var(--line); }
.btn-block { width: 100%; padding: 10px 14px; }

@media (max-width: 1100px) {
  .stats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .stat:nth-child(3) { border-right: 0; }
  .stat:nth-child(n+4) { border-top: 1px solid var(--line); }
  .grid-send, .grid-2 { grid-template-columns: 1fr; }
}
@media (max-width: 860px) {
  .sidebar { transform: translateX(-100%); transition: transform .18s; }
  .sidebar.open { transform: none; }
  .main { margin-left: 0; }
  .menu-toggle { display: block; }
  .topbar, .content { padding-left: 16px; padding-right: 16px; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stat { border-right: 0 !important; border-top: 1px solid var(--line); }
  .stat:nth-child(-n+2) { border-top: 0; }
  .chat-layout { grid-template-columns: minmax(0, 1fr); height: calc(100vh - 60px - 40px); }
  .chat-layout.has-chat .chat-list { display: none; }
  .chat-layout:not(.has-chat) .chat-pane { display: none; }

}

/* ---- Alıcı etiketleri + kişi önerileri ---- */
.recipients-wrap { position: relative; }
.recipients { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; min-height: 42px; padding: 5px 7px; cursor: text; }
.recipients:focus-within { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); }
.recipients input { border: 0; outline: 0; background: transparent; flex: 1; min-width: 180px; padding: 4px; }
.chip { display: inline-flex; align-items: center; gap: 4px; background: var(--primary-soft); color: var(--primary); border-radius: 6px; padding: 3px 4px 3px 9px; font-size: 13px; font-weight: 500; max-width: 100%; }
.chip.plain { background: var(--gray-soft); color: var(--text); }
.chip button { background: none; border: 0; padding: 2px; cursor: pointer; color: inherit; opacity: .6; display: grid; place-items: center; border-radius: 4px; }
.chip button:hover { opacity: 1; background: rgba(0,0,0,.06); }
.suggest { position: absolute; left: 0; right: 0; top: calc(100% + 4px); background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-sm); box-shadow: 0 8px 24px rgba(16,24,40,.1); z-index: 40; max-height: 300px; overflow-y: auto; padding: 4px; }
.suggest-item { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 6px; cursor: pointer; }
.suggest-item svg { color: var(--muted); flex-shrink: 0; }
.suggest-item.on, .suggest-item:hover { background: var(--primary-soft); }
.suggest-empty { padding: 10px; color: var(--muted); font-size: 13px; }

/* ---- Sidebar alt bağlantılar ---- */
.sidebar-links { border-top: 1px solid var(--sidebar-line); padding: 10px; }
.sidebar-links a { display: flex; align-items: center; gap: 11px; padding: 8px 10px; border-radius: 8px; color: var(--sidebar-text); font-weight: 500; font-size: 13.5px; }
.sidebar-links a:hover { background: var(--sidebar-hover); color: #fff; }
.sidebar-links a.active { background: var(--sidebar-active); color: #fff; }
.sidebar-links svg { width: 17px; height: 17px; flex-shrink: 0; opacity: .85; }
.sidebar-links svg.ext { width: 14px; height: 14px; margin-left: auto; opacity: .55; }

/* ---- Kullanıcı menüsü ---- */
.user-menu { position: relative; }
.user-btn { display: flex; align-items: center; gap: 10px; background: none; border: 1px solid transparent; border-radius: 9px; padding: 4px 8px 4px 4px; cursor: pointer; }
.user-btn:hover, .user-btn[aria-expanded="true"] { background: var(--line-soft); border-color: var(--line); }
.user-btn .avatar { width: 32px; height: 32px; background: var(--primary-soft); color: var(--primary); }
.user-meta { display: flex; flex-direction: column; align-items: flex-start; line-height: 1.25; text-align: left; }
.user-name { font-weight: 600; font-size: 13.5px; white-space: nowrap; }
.user-role { font-size: 11.5px; color: var(--muted); white-space: nowrap; }
.user-btn .chev { width: 16px; height: 16px; color: var(--muted); }
.dropdown { position: absolute; right: 0; top: calc(100% + 6px); width: 240px; background: var(--card); border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 10px 30px rgba(16,24,40,.12); padding: 6px; z-index: 50; }
.dropdown-head { padding: 8px 10px 10px; border-bottom: 1px solid var(--line); margin-bottom: 6px; }
.dropdown-head .cell-sub { overflow: hidden; text-overflow: ellipsis; }
.dd-item { display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px 10px; border-radius: 6px; border: 0; background: none; color: var(--text); font-size: 13.5px; font-weight: 500; cursor: pointer; text-align: left; }
.dd-item:hover { background: var(--line-soft); }
.dd-item svg { width: 16px; height: 16px; color: var(--muted); flex-shrink: 0; }
.dd-item.danger, .dd-item.danger svg { color: var(--red); }
.dd-sep { height: 1px; background: var(--line); margin: 6px 0; }
.switch { margin-left: auto; width: 30px; height: 17px; border-radius: 10px; background: var(--input-line); position: relative; transition: background .15s; flex-shrink: 0; }
.switch::after { content: ''; position: absolute; top: 2px; left: 2px; width: 13px; height: 13px; border-radius: 50%; background: #fff; transition: transform .15s; }
:root[data-theme="dark"] .switch { background: var(--primary); }
:root[data-theme="dark"] .switch::after { transform: translateX(13px); }
@media (max-width: 860px) { .user-meta { display: none; } .user-btn .chev { display: none; } }


/* Avatar görseli baş harflerin üstüne biner; yüklenemezse kaldırılır */
.avatar { position: relative; overflow: hidden; }
.avatar img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }
.dropdown-head { display: flex; align-items: center; gap: 10px; }
.dropdown-head .avatar { width: 38px; height: 38px; background: var(--primary-soft); color: var(--primary); }
.dropdown-head > div { min-width: 0; }
.avatar.avatar-soft { background: var(--gray-soft); color: var(--text-2); }

/* ---- API dokümanı (panel içi) ---- */
.api-docs { --code-bg: #111a28; --code-line: #1e2a3d; display: grid; grid-template-columns: 210px minmax(0, 1fr); gap: 24px; align-items: start; }
:root[data-theme="dark"] .api-docs { --code-bg: #0a111b; --code-line: #1a2638; }
.docs-toc { position: sticky; top: 84px; max-height: calc(100vh - 108px); overflow-y: auto; padding-bottom: 12px; }
.toc-group { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .6px; color: var(--muted); padding: 14px 8px 6px; }
.toc-group:first-child { padding-top: 0; }
.docs-toc a { display: flex; align-items: center; gap: 8px; padding: 6px 8px; border-radius: 6px; color: var(--text-2); font-size: 13px; }
.docs-toc a:hover { background: var(--card); color: var(--text); }
.docs-toc a.on { background: var(--primary-soft); color: var(--primary); font-weight: 500; }
.docs-body { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; container-type: inline-size; }

.m { font-family: var(--mono); font-size: 10px; font-weight: 700; padding: 2px 5px; border-radius: 4px; min-width: 38px; text-align: center; flex-shrink: 0; }
.m.get { background: var(--primary-soft); color: var(--primary); }
.m.post { background: var(--green-soft); color: var(--green); }
.m.patch { background: var(--amber-soft); color: var(--amber); }
.m.delete { background: var(--red-soft); color: var(--red); }

/* Dar alanda kod örnekleri açıklamanın altına; genişte yan yana (Redoc) */
.api-docs .op { display: grid; grid-template-columns: minmax(0, 1fr); border-bottom: 1px solid var(--line); scroll-margin-top: 76px; }
.api-docs .op:last-child { border-bottom: 0; }
.api-docs .op-doc { padding: 28px 30px 18px; min-width: 0; }
.api-docs .op-code { background: var(--code-bg); padding: 22px 30px 8px; color: #d6deea; min-width: 0; }
.api-docs .op-code:empty { display: none; }
@container (min-width: 960px) {
  .api-docs .op { grid-template-columns: minmax(0, 55fr) minmax(0, 45fr); }
  .api-docs .op-doc { padding: 34px 34px 26px; }
  .api-docs .op-code { padding: 34px 26px 18px; border-bottom: 1px solid var(--code-line); }
  .api-docs .op-code:empty { display: block; }
}
.api-docs .op-doc h2 { font-size: 19px; letter-spacing: -.3px; margin-bottom: 10px; }
.api-docs .op-doc h3 { font-size: 12px; text-transform: uppercase; letter-spacing: .6px; color: var(--muted); margin: 22px 0 6px; }
.api-docs .op-doc p { line-height: 1.7; color: var(--text-2); margin: 8px 0; }
.api-docs .op-doc code { background: var(--line-soft); padding: 1px 5px; border-radius: 4px; font-size: 12.5px; color: var(--text); }
.api-docs #giris .op-doc > p:first-child { font-size: 15px; color: var(--text); }
.endpoint { display: inline-flex; align-items: center; gap: 10px; background: var(--line-soft); border: 1px solid var(--line); border-radius: 8px; padding: 6px 12px 6px 8px; margin-bottom: 12px; max-width: 100%; }
.endpoint code { background: none !important; padding: 0 !important; font-size: 13.5px !important; font-weight: 500; overflow-wrap: anywhere; }

table.params { width: 100%; border-collapse: collapse; margin: 8px 0; font-size: 13.5px; }
table.params td, table.params th { padding: 9px 12px 9px 0; border-bottom: 1px solid var(--line-soft); vertical-align: top; text-align: left; background: none; }
table.params th { font-size: 12px; color: var(--muted); }
table.params tr:hover td { background: none; }
table.params td:first-child { width: 34%; }
table.params td:last-child { color: var(--text-2); line-height: 1.6; }
.type { display: block; font-family: var(--mono); font-size: 11.5px; color: var(--muted); margin-top: 3px; }
.req, .opt { display: inline-block; font-size: 10.5px; font-weight: 600; text-transform: uppercase; letter-spacing: .4px; margin-top: 3px; }
.req { color: var(--red); } .opt { color: var(--muted); }

.api-docs .op-code pre { background: rgba(255,255,255,.04); border: 1px solid var(--code-line); border-radius: 8px; padding: 13px 15px; margin: 0 0 16px; overflow-x: auto; font-family: var(--mono); font-size: 12.5px; line-height: 1.6; color: #d6deea; position: relative; }
.api-docs .op-code pre code { background: none; padding: 0; color: inherit; font-size: inherit; }
.code-title { font-size: 11.5px; font-weight: 600; text-transform: uppercase; letter-spacing: .6px; color: #8391a7; margin: 0 0 8px; }
.copy-btn { position: absolute; top: 8px; right: 8px; background: #1f2c40; border: 1px solid #2b3a52; color: #aeb8c7; font-size: 11.5px; border-radius: 5px; padding: 3px 8px; cursor: pointer; opacity: 0; transition: opacity .12s; }
.api-docs .op-code pre:hover .copy-btn { opacity: 1; }
.tabs { display: inline-flex; gap: 2px; background: rgba(255,255,255,.05); border-radius: 7px; padding: 3px; margin-bottom: 14px; }
.tabs button { background: none; border: 0; color: #8391a7; padding: 5px 12px; border-radius: 5px; cursor: pointer; font-size: 12.5px; font-weight: 500; }
.tabs button.on { background: #22314a; color: #fff; }
.api-docs .tok-k { color: #8fb8ff; } .api-docs .tok-s { color: #a5d6a7; } .api-docs .tok-n { color: #f5c07a; }

@media (max-width: 1100px) {
  .api-docs { grid-template-columns: minmax(0, 1fr); }
  .docs-toc { display: none; }
}
@media (max-width: 860px) {
  #docs-filter { width: 140px !important; }
  .api-docs .op-doc { padding: 22px 16px 12px; }
  .api-docs .op-code { padding: 16px 16px 4px; }
}

/* ---- Toplu gönderim ---- */
.segmented button { display: inline-flex; align-items: center; gap: 6px; }
.segmented button svg { width: 15px; height: 15px; }
.src-panel { margin-bottom: 4px; }
.progress { height: 6px; background: var(--gray-soft); border-radius: 4px; overflow: hidden; }
.progress span { display: block; height: 100%; background: var(--primary); border-radius: 4px; transition: width .4s; }
.check-list .checkbox { gap: 10px; }

/* ---- Açılır menü ---- */
.ctx-menu { position: fixed; z-index: 300; min-width: 210px; max-width: 280px; max-height: 70vh; overflow-y: auto; background: var(--card); border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 10px 30px rgba(16,24,40,.14); padding: 6px; }
.ctx-header { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .5px; color: var(--muted); padding: 6px 10px 4px; }
.ctx-note { font-size: 12.5px; color: var(--muted); padding: 4px 10px 6px; }
.ctx-check { width: 16px; height: 16px; border: 1.5px solid var(--input-line); border-radius: 4px; display: grid; place-items: center; flex-shrink: 0; }
.ctx-check.on { background: var(--primary); border-color: var(--primary); color: #fff; }
.ctx-check.on svg { color: #fff; width: 12px; height: 12px; }

/* ---- Etiketler ---- */
.label-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--c); flex-shrink: 0; display: inline-block; }
.label-chip { display: inline-flex; align-items: center; gap: 5px; font-size: 11.5px; font-weight: 500; padding: 1px 7px; border-radius: 5px; color: var(--c); background: color-mix(in srgb, var(--c) 13%, transparent); white-space: nowrap; }
:root[data-theme="dark"] .label-chip { background: color-mix(in srgb, var(--c) 24%, transparent); color: color-mix(in srgb, var(--c) 60%, white); }
.label-bar { display: flex; gap: 6px; padding: 8px 12px; border-bottom: 1px solid var(--line); overflow-x: auto; scrollbar-width: none; }
.label-bar::-webkit-scrollbar { display: none; }
.label-filter { border: 1px solid var(--line); background: var(--card); border-radius: 14px; padding: 3px 10px; font-size: 12.5px; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; color: var(--text-2); }
.label-filter.on { border-color: var(--c, var(--primary)); color: var(--c, var(--primary)); background: color-mix(in srgb, var(--c, var(--primary)) 10%, transparent); font-weight: 500; }
.chat-tabs { display: flex; border-bottom: 1px solid var(--line); }
.chat-tabs button { flex: 1; background: none; border: 0; padding: 9px; font-weight: 500; color: var(--muted); cursor: pointer; border-bottom: 2px solid transparent; font-size: 13px; }
.chat-tabs button.on { color: var(--primary); border-bottom-color: var(--primary); }
.chat-item .ci-labels { display: flex; gap: 4px; margin-top: 4px; flex-wrap: wrap; }
.swatches { display: flex; gap: 8px; flex-wrap: wrap; }
.swatch { width: 26px; height: 26px; border-radius: 50%; background: var(--c); border: 2px solid transparent; cursor: pointer; box-shadow: inset 0 0 0 2px var(--card); }
.swatch.on { border-color: var(--c); }

/* ---- Sohbet yazma alanı ---- */
.chat-compose { align-items: flex-end; }
.chat-compose .btn { height: 42px; width: 42px; padding: 0; flex-shrink: 0; }
/* textarea satır içi kalırsa altında boşluk bırakır ve düğmeler aşağıda görünür: blok yap */
.chat-compose textarea.input { display: block; min-height: 42px; height: 42px; padding: 10px 12px; resize: none; margin: 0; }
.chat-compose .btn svg { display: block; }
.attach-preview { display: flex; align-items: center; gap: 10px; border: 1px solid var(--line); border-radius: 8px; padding: 6px 8px; margin-bottom: 6px; background: var(--card); }
.attach-preview img { width: 48px; height: 48px; object-fit: cover; border-radius: 6px; }
.file-icon { width: 40px; height: 40px; border-radius: 8px; background: var(--primary-soft); color: var(--primary); display: grid; place-items: center; flex-shrink: 0; font-size: 10px; font-weight: 700; text-transform: uppercase; }

/* ---- Belge balonu ---- */
.doc-bubble { display: flex; align-items: center; gap: 10px; background: rgba(0,0,0,.05); border-radius: 6px; padding: 8px 10px; margin-bottom: 4px; min-width: 220px; color: inherit; text-decoration: none; }
:root[data-theme="dark"] .doc-bubble { background: rgba(255,255,255,.07); }
.doc-bubble .file-icon { background: #fff; }
:root[data-theme="dark"] .doc-bubble .file-icon { background: rgba(255,255,255,.1); color: #e9edef; }
.doc-bubble .dn { font-weight: 500; font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 260px; }
.doc-bubble svg { width: 18px; height: 18px; opacity: .6; margin-left: auto; flex-shrink: 0; }

/* ---- Oturum seçici ---- */
.session-picker { display: flex; align-items: center; gap: 10px; background: var(--card); border: 1px solid var(--input-line); border-radius: 10px; padding: 5px 10px 5px 5px; cursor: pointer; max-width: 360px; color: var(--text); }
.session-picker:hover:not([disabled]) { background: var(--line-soft); }
.session-picker[disabled] { cursor: default; }
.session-picker .avatar, .session-menu .avatar { width: 34px; height: 34px; background: var(--green-soft); color: var(--green); font-size: 12.5px; }
.sp-meta { display: flex; flex-direction: column; align-items: flex-start; min-width: 0; line-height: 1.25; text-align: left; flex: 1; }
.sp-name { font-weight: 600; font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 230px; }
.sp-sub { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 230px; }
.session-picker svg { color: var(--muted); flex-shrink: 0; }
.session-menu .dd-item { gap: 10px; padding: 7px 8px; }
.session-menu .dd-item.on { background: var(--primary-soft); }
@media (max-width: 860px) { .session-picker .sp-meta { display: none; } }

/* ---- Gruplar ---- */
.chat-messages .bubble .by.sender { font-weight: 600; font-size: 12.5px; }
.receipt-sum { background: none; border: 0; padding: 0 6px 0 0; font-size: 11px; color: #667781; cursor: pointer; display: inline-flex; align-items: center; gap: 3px; }
.receipt-sum:hover { color: var(--read); text-decoration: underline; }
:root[data-theme="dark"] .receipt-sum { color: #8fb5ab; }
.chat-item .avatar svg { width: 18px; height: 18px; }

/* ---- Gömülü görünüm (iframe) ---- */
body.embed .sidebar, body.embed .menu-toggle { display: none; }
body.embed .main { margin-left: 0; }
body.embed .topbar { height: 54px; padding: 0 12px; }
body.embed .topbar h1 { font-size: 15px; }
body.embed .content { padding: 10px 12px 12px; max-width: none; }
body.embed .chat-layout { height: calc(100vh - 54px - 22px); }
@media (max-width: 860px) { body.embed .chat-layout { height: calc(100vh - 54px - 22px); } }

/* Grupta gelen mesaj: solda gönderen fotoğrafı */
.msg-row { display: flex; gap: 7px; align-items: flex-start; align-self: flex-start; max-width: 75%; }
.msg-row .bubble { max-width: 100%; }
.chat-messages .msg-row .bubble.has-media { max-width: 300px; }
.msg-row .msg-av, .msg-av-space { width: 30px; height: 30px; flex-shrink: 0; font-size: 11px; margin-top: 1px; }
.msg-row .msg-av { background: var(--card); color: var(--text-2); }
.msg-av-space { background: none; }
.msg-av-space { display: inline-block; }
.msg-row.cont { margin-top: -3px; }

/* ---- Kullanıcı menüsü sidebar'ın altında ---- */
.sidebar-user { border-top: 1px solid var(--sidebar-line); padding: 10px; }
.sidebar-user .user-btn { width: 100%; color: var(--sidebar-text); padding: 6px 8px; border-radius: 8px; }
.sidebar-user .user-btn:hover, .sidebar-user .user-btn[aria-expanded="true"] { background: var(--sidebar-hover); border-color: transparent; }
.sidebar-user .user-btn .avatar { background: var(--sidebar-active); color: #fff; }
.sidebar-user .user-meta { flex: 1; min-width: 0; }
.sidebar-user .user-name { color: #fff; overflow: hidden; text-overflow: ellipsis; max-width: 140px; }
.sidebar-user .user-role { color: #7d8a9e; }
.sidebar-user .user-btn .chev { transform: rotate(180deg); }
.sidebar-user .dropdown { top: auto; bottom: calc(100% - 4px); left: 10px; right: 10px; width: auto; }
@media (max-width: 860px) { .sidebar-user .user-meta, .sidebar-user .user-btn .chev { display: flex; } }

/* Oturum seçicinin yanındaki ayarlar düğmesi */
.btn-icon-lg { width: 42px; height: 42px; padding: 0; border-radius: 10px; }

/* ---- Emoji seçici ---- */
.emoji-pop { position: fixed; z-index: 320; width: 330px; max-width: calc(100vw - 16px); background: var(--card); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 12px 34px rgba(16,24,40,.16); padding: 8px; }
.emoji-search { padding: 7px 10px; font-size: 13px; margin-bottom: 6px; }
.emoji-body { max-height: 280px; overflow-y: auto; }
.emoji-cat { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .5px; color: var(--muted); padding: 8px 4px 4px; }
.emoji-grid { display: grid; grid-template-columns: repeat(8, 1fr); gap: 2px; }
.emoji-grid button { border: 0; background: none; font-size: 22px; line-height: 1; padding: 6px 0; border-radius: 6px; cursor: pointer; }
.emoji-grid button:hover { background: var(--line-soft); }

/* Metin kutusu başlığındaki emoji düğmesi */
.emoji-btn { display: inline-flex; align-items: center; gap: 5px; }
.emoji-btn svg { width: 15px; height: 15px; }

/* ---- Cevap (alıntı) ve iletildi ---- */
.quote { border-left: 3px solid #06cf9c; background: rgba(0,0,0,.05); border-radius: 6px; padding: 5px 8px; margin: 2px 0 5px; cursor: pointer; max-width: 100%; }
:root[data-theme="dark"] .quote { background: rgba(255,255,255,.07); }
.quote .q-name { font-size: 12px; font-weight: 600; color: #06a47c; }
.quote .q-text { font-size: 12.5px; color: #54656f; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
:root[data-theme="dark"] .quote .q-text { color: #aebac1; }
.fwd-label { display: flex; align-items: center; gap: 4px; font-size: 11.5px; font-style: italic; color: #667781; margin-bottom: 2px; }
.reply-bar { display: flex; gap: 8px; align-items: center; margin-bottom: 6px; background: var(--line-soft); border-radius: 8px; padding: 6px; }
.chat-messages .bubble.flash { box-shadow: 0 0 0 3px rgba(31,95,209,.35); transition: box-shadow .3s; }
.fwd-row { padding: 8px 4px; border-bottom: 1px solid var(--line-soft); }

/* ---- Tepkiler ---- */
.ctx-reactions { display: flex; gap: 2px; padding: 4px; border-bottom: 1px solid var(--line); margin-bottom: 4px; }
.ctx-reactions button { border: 0; background: none; font-size: 22px; line-height: 1; padding: 6px; border-radius: 8px; cursor: pointer; }
.ctx-reactions button:hover { background: var(--line-soft); transform: scale(1.15); }
.ctx-reactions button.on { background: var(--primary-soft); }
.ctx-reactions button.more { font-size: 18px; color: var(--muted); width: 36px; }
.chat-messages .bubble.has-react { margin-bottom: 12px; position: relative; }
.reactions { position: absolute; bottom: -14px; right: 8px; display: flex; gap: 3px; }
.bubble.in .reactions { right: auto; left: 8px; }
.react-chip { display: inline-flex; align-items: center; gap: 3px; background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 1px 6px; font-size: 13px; line-height: 18px; cursor: default; box-shadow: 0 1px 2px rgba(0,0,0,.06); }
.react-chip span { font-size: 11px; color: var(--muted); }
.react-chip.mine { border-color: var(--primary); cursor: pointer; }

.pair-code { font-family: var(--mono); font-size: 34px; font-weight: 700; letter-spacing: 4px; padding: 14px 18px; border: 1px dashed var(--input-line); border-radius: 10px; display: inline-block; }

/* ---- Arama kaydı, yazıyor ---- */
.call-note { align-self: center; display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; background: rgba(255,255,255,.92); color: #54656f; padding: 5px 12px; border-radius: 8px; margin: 4px 0; }
:root[data-theme="dark"] .call-note { background: #182229; color: #8696a0; }
.typing { color: #1faa53; font-weight: 500; font-style: italic; }
.toast.call { background: #1f7a4d; }

/* ---- Konum, kişi kartı, düzenlendi ---- */
.loc-card { display: flex; gap: 10px; align-items: flex-start; background: rgba(0,0,0,.05); border-radius: 8px; padding: 10px; margin-bottom: 4px; color: inherit; text-decoration: none; min-width: 230px; }
:root[data-theme="dark"] .loc-card { background: rgba(255,255,255,.07); }
.loc-pin { width: 38px; height: 38px; border-radius: 50%; background: #e53935; color: #fff; display: grid; place-items: center; flex-shrink: 0; }
.loc-open { display: block; font-size: 12px; color: var(--primary); margin-top: 3px; }
.vcard { display: flex; gap: 10px; align-items: center; background: rgba(0,0,0,.05); border-radius: 8px; padding: 8px 10px; margin-bottom: 4px; min-width: 240px; }
:root[data-theme="dark"] .vcard { background: rgba(255,255,255,.07); }
.bubble .meta .edited { font-style: italic; margin-right: 2px; }

/* ---- Ses / video ---- */
.audio-msg { display: flex; align-items: center; gap: 8px; min-width: 260px; margin-bottom: 2px; }
.audio-msg audio { height: 34px; flex: 1; min-width: 200px; }
.audio-msg svg { color: #06a47c; flex-shrink: 0; }
.chat-messages .bubble video { display: block; width: 100%; max-width: 280px; max-height: 320px; border-radius: 6px; margin-bottom: 4px; background: #000; }
.rec-bar { display: flex; align-items: center; gap: 10px; border-top: 1px solid var(--line); padding: 10px 12px; }
.rec-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--red); animation: rec 1s infinite; }
.rec-time { font-family: var(--mono); font-weight: 600; min-width: 42px; }
@keyframes rec { 50% { opacity: .3; } }
