:root {
  color-scheme: light;
  --page: #f9f9f7;
  --surface: #fcfcfb;
  --surface-2: #f3f2ee;
  --ink: #0b0b0b;
  --ink-2: #52514e;
  --muted: #898781;
  --grid: #e1e0d9;
  --axis: #c3c2b7;
  --border: rgba(11, 11, 11, 0.10);
  --accent: #15803D;
  --accent-ink: #ffffff;
  --s1: #2a78d6; /* gelen */
  --s2: #eb6834; /* giden */
  --good: #0ca30c;
  --warning: #fab219;
  --serious: #ec835a;
  --critical: #d03b3b;
  --good-text: #006300;
  --crit-text: #b22a2a;
  --radius: 10px;
  --shadow: 0 1px 2px rgba(0,0,0,.04), 0 4px 16px rgba(0,0,0,.04);
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root:where(:not([data-theme="light"])) {
    color-scheme: dark;
    --page: #0d0d0d; --surface: #1a1a19; --surface-2: #232321;
    --ink: #ffffff; --ink-2: #c3c2b7; --muted: #898781;
    --grid: #2c2c2a; --axis: #383835; --border: rgba(255,255,255,.10);
    --accent: #25b364; --accent-ink: #06150c;
    --s1: #3987e5; --s2: #d95926;
    --good-text: #0ca30c; --crit-text: #f07b7b;
    --shadow: none;
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --page: #0d0d0d; --surface: #1a1a19; --surface-2: #232321;
  --ink: #ffffff; --ink-2: #c3c2b7; --muted: #898781;
  --grid: #2c2c2a; --axis: #383835; --border: rgba(255,255,255,.10);
  --accent: #25b364; --accent-ink: #06150c;
  --s1: #3987e5; --s2: #d95926;
  --good-text: #0ca30c; --crit-text: #f07b7b;
  --shadow: none;
}

* { box-sizing: border-box; }
body { margin: 0; background: var(--page); color: var(--ink); font-size: 14px; line-height: 1.45; }
h1 { font-size: 20px; margin: 0 0 2px; font-weight: 650; }
h2 { font-size: 15px; margin: 0 0 12px; font-weight: 600; }
p { margin: 0; }
.muted { color: var(--ink-2); }
.small { font-size: 12.5px; }
code { font-size: 12px; background: var(--surface-2); padding: 1px 5px; border-radius: 4px; word-break: break-all; }
[hidden] { display: none !important; }

.topbar { position: sticky; top: 0; z-index: 5; display: flex; align-items: center; gap: 20px; padding: 0 24px; height: 56px;
  background: var(--surface); border-bottom: 1px solid var(--border); }
.brand { display: flex; align-items: center; gap: 8px; text-decoration: none; }
.brand .word { font-family: 'Orbitron', system-ui, sans-serif; font-weight: 800; font-size: 15px; letter-spacing: .02em; color: var(--ink); }
.brand .word b { color: var(--accent); font-weight: 800; }
.tabs { display: flex; gap: 4px; height: 100%; }
.tabs button { background: none; border: 0; border-bottom: 2px solid transparent; padding: 0 12px; color: var(--ink-2); font: inherit; font-weight: 550; cursor: pointer; height: 100%; }
.tabs button[aria-selected="true"] { color: var(--ink); border-bottom-color: var(--accent); }
.spacer { flex: 1; }

main { max-width: 1200px; margin: 0 auto; padding: 24px; }
.toolbar { display: flex; align-items: flex-end; gap: 12px; margin-bottom: 18px; flex-wrap: wrap; }
.panel { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); }
.panel.narrow { max-width: 360px; margin: 60px auto; }
.panel.info { margin-bottom: 16px; }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow); margin: 0 0 16px; min-width: 0; }

button, select, input { font: inherit; color: inherit; }
button { cursor: pointer; border-radius: 8px; padding: 7px 14px; border: 1px solid var(--border); background: var(--surface); }
button:hover { background: var(--surface-2); }
button.primary { background: var(--accent); color: var(--accent-ink); border-color: transparent; font-weight: 600; }
button.primary:hover { filter: brightness(1.06); }
button.ghost { background: transparent; }
button.danger { color: var(--crit-text); }
button:disabled { opacity: .55; cursor: default; }
select, input { border: 1px solid var(--border); background: var(--surface); border-radius: 8px; padding: 7px 10px; min-width: 0; }
input:focus-visible, select:focus-visible, button:focus-visible { outline: 2px solid var(--s1); outline-offset: 1px; }
label { display: flex; flex-direction: column; gap: 4px; font-weight: 550; font-size: 13px; }
.stack { display: flex; flex-direction: column; gap: 12px; }
.row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.row.end { justify-content: flex-end; }
.error { color: var(--crit-text); font-size: 13px; }
.empty { text-align: center; padding: 48px 16px; color: var(--ink-2); border: 1px dashed var(--axis); border-radius: var(--radius); }

/* Bağlantı kartları */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 14px; }
.conn { display: flex; flex-direction: column; gap: 12px; }
.conn-head { display: flex; align-items: flex-start; gap: 10px; }
.conn-head .title { flex: 1; min-width: 0; }
.conn-head .title b { display: block; font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.conn-head .title span { color: var(--ink-2); font-size: 13px; }
.badge { font-size: 11px; font-weight: 650; letter-spacing: .02em; padding: 2px 7px; border-radius: 999px; border: 1px solid var(--border); color: var(--ink-2); white-space: nowrap; }
.badge.qr { color: var(--accent); border-color: currentColor; }
.status { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 550; }
.status svg { flex: none; }
.kv { display: grid; grid-template-columns: 96px 1fr; gap: 6px 10px; font-size: 13px; align-items: center; }
.kv dt { color: var(--ink-2); }
.kv dd { margin: 0; min-width: 0; }
.kv select { width: 100%; }
.conn .actions { display: flex; gap: 6px; flex-wrap: wrap; border-top: 1px solid var(--border); padding-top: 12px; }
.conn .note { font-size: 12.5px; color: var(--ink-2); background: var(--surface-2); padding: 6px 10px; border-radius: 6px; }

/* Dialog */
dialog { border: 1px solid var(--border); border-radius: 14px; padding: 22px; width: min(480px, calc(100vw - 32px)); background: var(--surface); color: var(--ink); }
dialog::backdrop { background: rgba(0,0,0,.35); }
fieldset.choice { border: 0; padding: 0; margin: 0; display: grid; gap: 8px; }
fieldset.choice legend { font-weight: 550; font-size: 13px; margin-bottom: 6px; }
.option { flex-direction: row; align-items: flex-start; gap: 10px; border: 1px solid var(--border); border-radius: 10px; padding: 10px 12px; cursor: pointer; font-weight: 400; }
.option:has(input:checked) { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.option span { display: flex; flex-direction: column; gap: 2px; }
.option small { color: var(--ink-2); font-size: 12.5px; }
.qr-wrap { display: flex; gap: 18px; align-items: center; flex-wrap: wrap; }
.qr-box { width: 220px; height: 220px; display: grid; place-items: center; background: #fff; border-radius: 10px; border: 1px solid var(--border); color: #0b0b0b; text-align: center; padding: 8px; }
.qr-box img { width: 100%; height: 100%; image-rendering: pixelated; }
.qr-box .code { font: 600 26px ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .12em; }
.steps { margin: 0; padding-left: 18px; color: var(--ink-2); display: grid; gap: 6px; flex: 1; min-width: 180px; }
.status-line { min-height: 20px; font-weight: 550; }
details summary { cursor: pointer; color: var(--ink-2); font-size: 13px; }
details[open] summary { margin-bottom: 8px; }
.spinner { width: 28px; height: 28px; border: 3px solid #ddd; border-top-color: #128c4a; border-radius: 50%; animation: spin .9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Ayarlar penceresi */
dialog.settings { width: min(520px, calc(100vw - 32px)); padding: 0; }
.settings form { display: flex; flex-direction: column; gap: 14px; padding: 22px; }
.settings-head { display: flex; align-items: center; gap: 10px; }
.settings-head h2 { margin: 0; flex: 1; font-size: 20px; }
.icon-btn { border: 0; background: none; font-size: 18px; color: var(--ink-2); padding: 4px 8px; }
.settings .field select { width: 100%; padding: 10px 12px; font-size: 15px; }
.set-group { background: var(--surface-2); border-radius: 12px; overflow: hidden; }
.set-group h3 { margin: 0; padding: 10px 14px 0; font-size: 11.5px; font-weight: 650; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }
.set-row { display: flex; align-items: center; gap: 12px; padding: 12px 14px; font-weight: 450; font-size: 14px; cursor: pointer; flex-direction: row; }
.set-row + .set-row { border-top: 1px solid var(--border); }
.set-row span { flex: 1; }
.set-row small { display: block; color: var(--muted); font-size: 12px; margin-top: 2px; }
.set-row.disabled { opacity: .5; cursor: default; }
.set-row input { appearance: none; -webkit-appearance: none; width: 26px; height: 26px; border-radius: 7px; background: var(--border); border: 0; margin: 0; flex: none; cursor: inherit; display: grid; place-items: center; }
.set-row input:checked { background: #3aa76d; }
.set-row input:checked::after { content: ""; width: 11px; height: 6px; border: 2px solid #fff; border-top: 0; border-right: 0; transform: rotate(-45deg) translate(1px, -1px); }
.set-row input:focus-visible { outline: 2px solid var(--s1); outline-offset: 2px; }
.set-help { margin: 6px 4px 0; font-size: 12.5px; color: var(--ink-2); }
.settings-foot { border-top: 1px solid var(--border); padding-top: 14px; }

/* Rapor */
.filters { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 16px; }
.seg { display: inline-flex; border: 1px solid var(--border); border-radius: 8px; overflow: hidden; background: var(--surface); }
.seg button { white-space: nowrap; border: 0; border-radius: 0; padding: 7px 12px; background: transparent; color: var(--ink-2); }
.seg button + button { border-left: 1px solid var(--border); }
.seg button[aria-pressed="true"] { background: var(--surface-2); color: var(--ink); font-weight: 600; }
#reportBody { transition: opacity .15s; }
#reportBody.loading { opacity: .5; }
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; margin-bottom: 16px; }
.tile { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 16px; box-shadow: var(--shadow); }
.tile .label { color: var(--ink-2); font-size: 12.5px; font-weight: 550; }
.tile .value { font-size: 26px; font-weight: 650; margin-top: 4px; }
.tile .sub { color: var(--muted); font-size: 12px; margin-top: 2px; }
.grid2 { display: grid; grid-template-columns: 1.5fr 1fr; gap: 16px; }
@media (max-width: 900px) { .grid2 { grid-template-columns: 1fr; } }
.chart-card figcaption { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.legend { display: flex; gap: 14px; font-size: 12.5px; color: var(--ink-2); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.key.line { width: 14px; height: 2px; border-radius: 2px; display: inline-block; }
.key.s1 { background: var(--s1); } .key.s2 { background: var(--s2); }
.chart { width: 100%; height: 240px; position: relative; }
.chart svg { display: block; width: 100%; height: 100%; overflow: visible; }
.chart .gridline { stroke: var(--grid); stroke-width: 1; }
.chart .baseline { stroke: var(--axis); stroke-width: 1; }
.chart .tick { fill: var(--muted); font-size: 11px; font-variant-numeric: tabular-nums; }
.chart .dlabel { font-size: 11.5px; font-weight: 600; fill: var(--ink-2); }
.chart .bar { fill: var(--s1); }
.chart .bar.hover { fill-opacity: .75; }
.chart .crosshair { stroke: var(--axis); stroke-width: 1; }
.table-view { margin-top: 10px; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th, td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--border); white-space: nowrap; }
th { color: var(--ink-2); font-weight: 550; font-size: 12px; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
tbody tr:hover { background: var(--surface-2); }

.tooltip { position: fixed; z-index: 50; pointer-events: none; background: var(--surface); border: 1px solid var(--border); border-radius: 8px; padding: 8px 10px; font-size: 12.5px; box-shadow: 0 6px 24px rgba(0,0,0,.14); min-width: 120px; }
.tooltip .t { color: var(--ink-2); margin-bottom: 4px; }
.tooltip .r { display: flex; align-items: center; gap: 8px; }
.tooltip .r b { font-variant-numeric: tabular-nums; }
.toast { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); background: var(--ink); color: var(--page); padding: 10px 16px; border-radius: 8px; z-index: 60; font-size: 13px; }

@media (max-width: 640px) {
  .topbar { padding: 0 16px; gap: 10px; }
  .brand span { display: none; }
  main { padding: 16px; }
  .cards { grid-template-columns: 1fr; }
  .tiles { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .tile .value { font-size: 22px; }
  .seg { max-width: 100%; overflow-x: auto; }
  .seg button { padding: 7px 10px; }
}
#settingsGroups { display: flex; flex-direction: column; gap: 12px; }

/* Lisans */
.banner { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 12px 16px; border-radius: var(--radius); margin-bottom: 16px; border: 1px solid var(--border); background: var(--surface); }
.banner .grow { flex: 1; min-width: 200px; }
.banner.warn { border-color: var(--warning); box-shadow: inset 4px 0 0 var(--warning); }
.banner.bad { border-color: var(--critical); box-shadow: inset 4px 0 0 var(--critical); }
.banner.ok { box-shadow: inset 4px 0 0 var(--good); }
.lic { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; }
.total { font-size: 15px; font-weight: 600; padding: 10px 12px; background: var(--surface-2); border-radius: 8px; }
.conn-pick { flex-direction: row; align-items: center; gap: 8px; font-weight: 450; }
dialog.stats { width: min(760px, calc(100vw - 32px)); }
dialog.stats .tiles { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.cust { margin-bottom: 16px; }
.cust-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.cust-head h2 { margin: 0; flex: 1; }
.btn-sm { padding: 4px 10px; font-size: 12.5px; }
.nowrap { white-space: nowrap; }

/* Kurulum ve yönetim */
.setup { margin-bottom: 16px; box-shadow: inset 4px 0 0 var(--s1); }
.setup ol { margin: 8px 0 12px; padding-left: 20px; display: grid; gap: 8px; }
.copy { display: inline-flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.copy code { font-size: 12.5px; }
.copy button { padding: 2px 8px; font-size: 12px; }
.narrow-form { max-width: 640px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 640px) { .grid-2 { grid-template-columns: 1fr; } }
textarea { font: inherit; color: inherit; border: 1px solid var(--border); background: var(--surface); border-radius: 8px; padding: 8px 10px; resize: vertical; }
#custSearch { min-width: 200px; }
.state { font-size: 11.5px; font-weight: 650; padding: 2px 8px; border-radius: 999px; border: 1px solid currentColor; white-space: nowrap; }
.state.trial { color: #a06a00; } .state.active, .state.owner { color: var(--good-text); }
.state.expiring { color: #b35a00; } .state.expired, .state.suspended { color: var(--crit-text); }
.cust-meta { display: flex; gap: 16px; flex-wrap: wrap; font-size: 12.5px; color: var(--ink-2); margin-bottom: 10px; }
.cust-notes { display: grid; grid-template-columns: 1fr 1fr auto; gap: 8px; align-items: end; margin-top: 10px; }
@media (max-width: 760px) { .cust-notes { grid-template-columns: 1fr; } }
.pre { white-space: pre-wrap; background: var(--surface-2); padding: 10px 12px; border-radius: 8px; font-size: 13.5px; }

/* Destek */
.thread { display: grid; gap: 10px; max-height: 420px; overflow: auto; margin: 12px 0; }
.bubble { padding: 10px 12px; border-radius: 10px; background: var(--surface-2); font-size: 13.5px; white-space: pre-wrap; }
.bubble.admin { background: rgba(21,128,61,.08); border: 1px solid rgba(21,128,61,.25); }
.bubble .meta { font-size: 11.5px; color: var(--muted); margin-bottom: 4px; }
tr.sel { background: var(--surface-2); }
tr.click { cursor: pointer; }
.support-grid { grid-template-columns: 1fr 1.2fr; }
.meter { height: 6px; border-radius: 6px; background: var(--grid); overflow: hidden; margin-top: 8px; }
.meter i { display: block; height: 100%; background: var(--good); }
.meter i.warn { background: var(--warning); } .meter i.bad { background: var(--critical); }

/* ===== Bağlantı kartları (renkli) ===== */
:root { --on-bg: #ECFDF3; --on-line: #86D9A6; --on-ink: #0F6B34; --pay-ok: #16A34A; --pay-bad: #DC2626; }
.cards { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
.conn2 { position: relative; display: flex; flex-direction: column; gap: 14px; padding: 18px; border-radius: 16px; background: #fff; border: 1.5px solid #E3E8E5; box-shadow: 0 1px 2px rgba(15,26,19,.04), 0 6px 18px rgba(15,26,19,.05); transition: transform .12s, box-shadow .12s; }
.conn2:hover { transform: translateY(-1px); box-shadow: 0 2px 4px rgba(15,26,19,.05), 0 10px 26px rgba(15,26,19,.08); }
.conn2.is-on { background: var(--on-bg); border-color: var(--on-line); }
.conn2.is-wait { background: #FFFBEB; border-color: #FCD34D; }
.c-top { display: flex; align-items: center; gap: 12px; }
.c-avatar { width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; background: #F1F4F2; color: #8A968F; flex: none; }
.is-on .c-avatar { background: #16A34A; color: #fff; }
.is-wait .c-avatar { background: #F59E0B; color: #fff; }
.c-title { flex: 1; min-width: 0; }
.c-title b { display: block; font-size: 16px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.c-title span { font-size: 13px; color: var(--ink-2); }
.c-status { font-size: 12px; font-weight: 700; padding: 4px 10px; border-radius: 999px; white-space: nowrap; display: inline-flex; align-items: center; gap: 6px; }
.c-status::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.c-status.on { background: #16A34A; color: #fff; }
.c-status.on::before { background: #fff; }
.c-status.wait { background: #FEF3C7; color: #92400E; }
.c-status.off { background: #F1F4F2; color: #5B6660; }
.c-rows { display: grid; gap: 8px; }
.c-row { display: grid; grid-template-columns: 92px 1fr; gap: 10px; align-items: center; font-size: 13.5px; }
.c-row > span { color: var(--ink-2); }
.c-row select { width: 100%; background: #fff; }
.ok-text { color: #15803D; } .bad-text { color: #B91C1C; }
.c-note { font-size: 12.5px; color: #92400E; background: #FEF3C7; padding: 6px 10px; border-radius: 8px; margin: 0; }
.c-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: auto; }
.c-btn { border: 0; border-radius: 10px; padding: 9px 14px; font-weight: 700; font-size: 13.5px; cursor: pointer; }
.c-btn:disabled { opacity: .5; cursor: default; }
.c-btn.qr { background: #15803D; color: #fff; }
.c-btn.qr:hover { background: #116B33; }
.c-btn.paid { background: var(--pay-ok); color: #fff; }
.c-btn.unpaid, .pay-red { background: var(--pay-bad) !important; color: #fff !important; }
.c-btn.unpaid:hover { background: #B91C1C !important; }
.c-btn.ghost { background: rgba(255,255,255,.7); color: var(--ink); box-shadow: inset 0 0 0 1px #D6DED9; }
.c-btn.ghost:hover { background: #fff; }
.c-btn.big { padding: 12px 16px; font-size: 15px; }
.c-menu { position: relative; }
.c-menu summary { list-style: none; cursor: pointer; width: 32px; height: 32px; border-radius: 8px; display: grid; place-items: center; font-size: 18px; color: var(--ink-2); }
.c-menu summary:hover { background: rgba(0,0,0,.05); }
.c-menu-list { position: absolute; right: 0; top: 36px; z-index: 5; background: #fff; border: 1px solid #E3E8E5; border-radius: 12px; box-shadow: 0 10px 30px rgba(0,0,0,.12); padding: 6px; display: grid; min-width: 160px; }
.c-menu-list button { border: 0; background: none; text-align: left; padding: 9px 12px; border-radius: 8px; font-size: 13.5px; }
.c-menu-list button:hover { background: #F1F4F2; }
.c-menu-list button.danger { color: #B91C1C; }

/* bağlantılar: durum grupları, kart / liste görünümü */
.c-status.err { background: #FEE2E2; color: #991B1B; }
.conn2.is-err { border-color: #FCA5A5; }
.is-err .c-avatar:not(.p-instagram):not(.p-messenger):not(.p-telegram) { background: #DC2626; color: #fff; }
.cv-bar, .cgroup, .cv-none { grid-column: 1 / -1; }
.cv-bar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.cv-chips { display: flex; gap: 6px; flex-wrap: wrap; }
.cv-chip { display: inline-flex; align-items: center; gap: 5px; padding: 5px 10px; border-radius: 999px; background: var(--surface); border: 1px solid var(--border); color: var(--ink-2); font-size: 12.5px; text-decoration: none; }
.cv-chip b { color: var(--ink); }
.cv-chip span { display: inline-flex; }
.cv-chip:hover { border-color: var(--accent); }
.cv-search { width: 220px; max-width: 100%; }
.cv-toggle { display: inline-flex; border: 1px solid var(--border); border-radius: 10px; overflow: hidden; background: var(--surface); }
.cv-toggle button { border: 0; background: none; padding: 7px 12px; font: inherit; font-size: 13px; font-weight: 600; color: var(--ink-2); cursor: pointer; }
.cv-toggle button + button { border-left: 1px solid var(--border); }
.cv-toggle button.on { background: var(--accent); color: #fff; }
.cgroup > summary { list-style: none; display: flex; align-items: center; gap: 8px; cursor: pointer; padding: 6px 2px; font-size: 14px; user-select: none; scroll-margin-top: 70px; }
.cgroup > summary::-webkit-details-marker { display: none; }
.cgroup > summary > span { display: inline-flex; }
.cg-caret { color: var(--muted); transition: transform .12s; }
.is-err .c-note { background: #FEE2E2; color: #991B1B; }
.cgroup[open] .cg-caret { transform: rotate(90deg); }
.cg-count { font-size: 12px; font-weight: 700; padding: 1px 8px; border-radius: 999px; background: var(--surface-2); color: var(--ink-2); }
.cgroup > .cards { margin-top: 8px; }
.cnl-list { margin-top: 8px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); display: grid; grid-template-columns: minmax(170px, 1.5fr) minmax(120px, .9fr) minmax(130px, 1fr) 84px minmax(110px, 1fr) minmax(250px, 340px); column-gap: 12px; }
.cnl-head, .cnl-row { grid-column: 1 / -1; display: grid; grid-template-columns: subgrid; align-items: center; padding: 10px 14px; }
.cnl-head { font-size: 12px; color: var(--muted); font-weight: 600; border-bottom: 1px solid var(--border); padding-top: 8px; padding-bottom: 8px; }
.cnl-row + .cnl-row { border-top: 1px solid var(--border); }
.cnl-row:last-child { border-radius: 0 0 12px 12px; }
.cnl-row.is-err { box-shadow: inset 3px 0 0 #DC2626; }
.cnl-row.is-wait { box-shadow: inset 3px 0 0 #F59E0B; }
.cnl-row.is-on { box-shadow: inset 3px 0 0 #16A34A; }
.cnl-name { display: flex; align-items: center; gap: 10px; min-width: 0; }
.cnl-name .c-avatar { width: 34px; height: 34px; border-radius: 10px; }
.cnl-name .c-title b { font-size: 14px; }
.cnl-name .c-title span { display: block; font-size: 12.5px; }
.cnl-dom { color: var(--muted) !important; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cnl-st { display: grid; justify-items: start; gap: 3px; min-width: 0; }
.cnl-note { font-size: 11.5px; color: var(--crit-text); max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cnl-line select { width: 100%; background: var(--surface); }
.cnl-line, .cnl-seen, .cnl-lic { font-size: 13px; min-width: 0; }
.cnl-seen { color: var(--ink-2); }
.cnl-act { display: flex; align-items: center; gap: 6px; justify-content: flex-end; }
.cnl-act .c-actions { margin: 0; gap: 6px; justify-content: flex-end; }
.cnl-act .c-btn { padding: 6px 10px; font-size: 12.5px; border-radius: 8px; }
.cnl-act .c-btn.ghost { background: var(--surface); }
.cv-list > .conn2.add.closed .add-open { min-height: 0; padding: 14px; grid-auto-flow: column; align-items: center; gap: 12px; }
.cv-list > .conn2.add.closed .add-open .plus { width: 36px; height: 36px; line-height: 36px; font-size: 24px; }
@media (max-width: 980px) {
  .cnl-head { display: none; }
  .cnl-list { display: block; }
  .cnl-row { column-gap: 12px; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "name st" "line line" "lic lic" "seen seen" "act act"; row-gap: 6px; }
  .cnl-name { grid-area: name; } .cnl-st { grid-area: st; justify-items: end; } .cnl-line { grid-area: line; } .cnl-seen { grid-area: seen; } .cnl-lic { grid-area: lic; } .cnl-act { grid-area: act; justify-content: flex-start; align-items: flex-start; }
  .cnl-act .c-actions { justify-content: flex-start; flex: 1; }
  .cnl-line::before, .cnl-seen::before, .cnl-lic::before { content: attr(data-l) " · "; color: var(--muted); font-size: 12px; }
  .cnl-line { display: flex; align-items: center; gap: 6px; } .cnl-line select { flex: 1; min-width: 0; }
}
@media (max-width: 560px) { .cv-search { width: 100%; order: 3; } .cv-bar .spacer { display: none; } }
/* koyu tema: bağlantı kartları ve liste */
:root[data-theme="dark"] .conn2 { background: var(--surface); border-color: #2c2c2a;}
:root[data-theme="dark"] .conn2.is-on { background: #10251a; border-color: #1f5c38;}
:root[data-theme="dark"] .conn2.is-wait { background: #2a2210; border-color: #6b5214;}
:root[data-theme="dark"] .conn2.is-err { background: #2a1414; border-color: #7f2a2a;}
:root[data-theme="dark"] .conn2.add.closed { background: #141a16; border-color: #2d4a38;}
:root[data-theme="dark"] .add-open:hover { background: #17241c;}
:root[data-theme="dark"] .is-off .c-avatar:not(.p-instagram):not(.p-messenger):not(.p-telegram) { background: #2a2a28; color: #a3a39b;}
:root[data-theme="dark"] .c-status.off { background: #2a2a28; color: #c3c2b7;}
:root[data-theme="dark"] .c-status.wait { background: #3a2e0c; color: #fcd34d;}
:root[data-theme="dark"] .c-status.err { background: #3b1414; color: #fca5a5;}
:root[data-theme="dark"] .c-btn.ghost, :root[data-theme="dark"] .cnl-act .c-btn.ghost { background: #232321; color: var(--ink); box-shadow: inset 0 0 0 1px #3a3a37;}
:root[data-theme="dark"] .c-btn.ghost:hover { background: #2c2c2a;}
:root[data-theme="dark"] .c-row select { background: var(--surface-2);}
:root[data-theme="dark"] .conn2 .ok-text, :root[data-theme="dark"] .cnl-row .ok-text { color: #4ade80;}
:root[data-theme="dark"] .conn2 .bad-text, :root[data-theme="dark"] .cnl-row .bad-text { color: #f87171;}
:root[data-theme="dark"] .c-note { background: #3a2e0c; color: #fcd34d;}
:root[data-theme="dark"] .is-err .c-note { background: #3b1414; color: #fca5a5;}
:root[data-theme="dark"] .c-menu summary:hover { background: rgba(255,255,255,.08);}
:root[data-theme="dark"] .c-menu-list { background: #1f1f1e; border-color: #33332f;}
:root[data-theme="dark"] .c-menu-list button { color: var(--ink);}
:root[data-theme="dark"] .c-menu-list button:hover { background: #2a2a28;}
:root[data-theme="dark"] .c-menu-list button.danger { color: #f87171;}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .conn2 { background: var(--surface); border-color: #2c2c2a;}
  :root:not([data-theme="light"]) .conn2.is-on { background: #10251a; border-color: #1f5c38;}
  :root:not([data-theme="light"]) .conn2.is-wait { background: #2a2210; border-color: #6b5214;}
  :root:not([data-theme="light"]) .conn2.is-err { background: #2a1414; border-color: #7f2a2a;}
  :root:not([data-theme="light"]) .conn2.add.closed { background: #141a16; border-color: #2d4a38;}
  :root:not([data-theme="light"]) .add-open:hover { background: #17241c;}
  :root:not([data-theme="light"]) .is-off .c-avatar:not(.p-instagram):not(.p-messenger):not(.p-telegram) { background: #2a2a28; color: #a3a39b;}
  :root:not([data-theme="light"]) .c-status.off { background: #2a2a28; color: #c3c2b7;}
  :root:not([data-theme="light"]) .c-status.wait { background: #3a2e0c; color: #fcd34d;}
  :root:not([data-theme="light"]) .c-status.err { background: #3b1414; color: #fca5a5;}
  :root:not([data-theme="light"]) .c-btn.ghost, :root:not([data-theme="light"]) .cnl-act .c-btn.ghost { background: #232321; color: var(--ink); box-shadow: inset 0 0 0 1px #3a3a37;}
  :root:not([data-theme="light"]) .c-btn.ghost:hover { background: #2c2c2a;}
  :root:not([data-theme="light"]) .c-row select { background: var(--surface-2);}
  :root:not([data-theme="light"]) .conn2 .ok-text, :root:not([data-theme="light"]) .cnl-row .ok-text { color: #4ade80;}
  :root:not([data-theme="light"]) .conn2 .bad-text, :root:not([data-theme="light"]) .cnl-row .bad-text { color: #f87171;}
  :root:not([data-theme="light"]) .c-note { background: #3a2e0c; color: #fcd34d;}
  :root:not([data-theme="light"]) .is-err .c-note { background: #3b1414; color: #fca5a5;}
  :root:not([data-theme="light"]) .c-menu summary:hover { background: rgba(255,255,255,.08);}
  :root:not([data-theme="light"]) .c-menu-list { background: #1f1f1e; border-color: #33332f;}
  :root:not([data-theme="light"]) .c-menu-list button { color: var(--ink);}
  :root:not([data-theme="light"]) .c-menu-list button:hover { background: #2a2a28;}
  :root:not([data-theme="light"]) .c-menu-list button.danger { color: #f87171;}
}

/* yeni bağlantı kartı */
.conn2.add.closed { border: 2px dashed #B9D9C4; background: #FAFDFB; box-shadow: none; padding: 0; }
.add-open { width: 100%; height: 100%; min-height: 240px; border: 0; background: none; display: grid; place-content: center; justify-items: center; gap: 8px; cursor: pointer; color: var(--ink); border-radius: 16px; }
.add-open:hover { background: #F0FAF4; }
.add-open .plus { width: 56px; height: 56px; border-radius: 50%; background: #15803D; color: #fff; font-size: 32px; line-height: 56px; font-weight: 400; }
.add-open b { font-size: 16px; }
.conn2.add.form, .conn2.add.qr { border-color: #86D9A6; box-shadow: 0 0 0 3px rgba(22,163,74,.12); }
.add-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.add-head b { font-size: 16px; }
.add-form input, .add-form select { width: 100%; }
.add-type { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.add-type label { flex-direction: row; align-items: flex-start; gap: 8px; border: 1.5px solid #E3E8E5; border-radius: 10px; padding: 10px; cursor: pointer; font-weight: 400; }
.add-type label:has(input:checked) { border-color: #16A34A; background: #F0FAF4; }
.add-type span { display: grid; } .add-type small { color: var(--ink-2); font-size: 12px; }
.add-qr-wrap { display: grid; grid-template-columns: 180px 1fr; gap: 14px; align-items: center; }
.add-qr { width: 180px; height: 180px; border-radius: 12px; background: #fff; border: 1px solid #E3E8E5; display: grid; place-items: center; }
.add-qr img { width: 100%; height: 100%; image-rendering: pixelated; }
.add-steps { margin: 0; padding-left: 18px; display: grid; gap: 6px; font-size: 13.5px; color: var(--ink-2); }
.add-status { font-weight: 600; font-size: 13.5px; margin: 0; }
.add-done { width: 72px; height: 72px; border-radius: 50%; background: #16A34A; color: #fff; display: grid; place-items: center; font-size: 36px; }
@media (max-width: 420px) { .add-qr-wrap { grid-template-columns: 1fr; justify-items: center; } }

/* genel renk dokunuşları */
body { background: #F6F8F7; }
.topbar { background: #fff; }
.toolbar h1 { font-size: 22px; }
.banner { background: #fff; border-radius: 14px; }

.linkish { background: none; border: 0; color: #15803D; font-weight: 600; font-size: 13.5px; text-decoration: underline; cursor: pointer; padding: 4px; justify-self: center; }

/* ---- WhatsApp Business API ---- */
.kind-pick { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.kind { display: flex; gap: 10px; align-items: flex-start; border: 1px solid var(--border); border-radius: 10px; padding: 10px 12px; cursor: pointer; font-weight: 400; }
.kind:has(input:checked) { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); background: color-mix(in srgb, var(--accent) 6%, transparent); }
.kind input { margin-top: 3px; accent-color: var(--accent); }
.kind span { display: flex; flex-direction: column; gap: 2px; }
.kind small { color: var(--ink-2); font-size: 12px; }
@media (max-width: 520px) { .kind-pick { grid-template-columns: 1fr; } }
.q-green { color: var(--good-text); } .q-yellow { color: #a16207; } .q-red { color: var(--crit-text); }
#infoDialog.wide { width: min(720px, calc(100vw - 32px)); }
.tpl-list { display: grid; gap: 10px; max-height: 42vh; overflow: auto; }
.tpl { border: 1px solid var(--border); border-radius: 10px; padding: 10px 12px; display: grid; gap: 6px; }
.tpl-head { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.tpl-head button { margin-left: auto; }
.tpl-badge { font-size: 11px; font-weight: 650; padding: 2px 8px; border-radius: 999px; }
.tpl-badge.ok { background: #dcfce7; color: #166534; } .tpl-badge.wait { background: #fef9c3; color: #854d0e; } .tpl-badge.bad { background: #fee2e2; color: #991b1b; }
.tpl-body { white-space: pre-wrap; font-size: 13.5px; color: var(--ink-2); }
.tpl-body.preview { background: #e7fbe9; color: #0b0b0b; border-radius: 10px; padding: 10px 12px; min-height: 40px; }
.tpl-form h3, .tpl-list + hr { margin: 0; }
.tpl-form .row { align-items: flex-end; }
.tpl-form .grow { flex: 1; min-width: 180px; }
.chat-picks { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.chip { font-size: 12px; padding: 4px 10px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface); cursor: pointer; }
.chip.open { border-color: var(--accent); color: var(--accent); }
.check-row { display: flex; flex-direction: row; gap: 10px; align-items: flex-start; font-weight: 400; cursor: pointer; }
.check-row input[type=checkbox] { width: 18px; height: 18px; margin: 2px 0 0; flex: none; accent-color: var(--accent); }
.check-row span { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.check-row small { color: var(--ink-2); font-size: 12px; }
.manual-api summary { cursor: pointer; font-size: 13px; color: var(--ink-2); }
.manual-api[open] summary { margin-bottom: 8px; }
.row .grow, h2.grow { flex: 1; margin: 0; }
#apiTemplates, #settingsLicense, #settingsConns { margin-top: 16px; }
.ticket-row { display: flex; gap: 8px; align-items: center; font-size: 13px; border-top: 1px solid var(--border); padding-top: 8px; }
.ticket-row .grow { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* ---- Chatbot ---- */
.bot-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 16px; align-items: start; }
.bot-side { position: sticky; top: 72px; display: grid; gap: 8px; }
@media (max-width: 900px) { .bot-layout { grid-template-columns: 1fr; } .bot-side { position: static; } }
.bot-form .card { margin: 0; }
.bot-rows { gap: 8px; }
.bot-row { border: 1px solid var(--border); border-radius: 10px; padding: 8px 10px; display: grid; gap: 6px; }
.bot-row .row { flex-wrap: nowrap; }
.bot-row input[name=title], .bot-row input[name=words], .bot-row input[name=question] { flex: 1; min-width: 0; }
.bot-num { font-weight: 700; color: var(--ink-2); min-width: 18px; }
.check-row.big b { font-size: 15px; }
.bot-days { gap: 6px; margin-top: 4px; }
.chip-check { display: inline-flex; flex-direction: row; align-items: center; gap: 4px; border: 1px solid var(--border); border-radius: 999px; padding: 3px 10px; font-size: 13px; font-weight: 500; cursor: pointer; }
.chip-check:has(input:checked) { border-color: var(--accent); color: var(--accent); }
.chip-check input { accent-color: var(--accent); margin: 0; }
.bot-preview { background: #efeae2; border-radius: 14px; padding: 10px; display: grid; gap: 6px; min-height: 260px; align-content: start; }
.bp-head { font-size: 12px; font-weight: 600; color: #54656f; padding: 2px 4px 6px; }
.bp-msg { max-width: 85%; padding: 7px 10px; border-radius: 10px; font-size: 13px; white-space: pre-wrap; color: #111b21; box-shadow: 0 1px 0 rgba(0,0,0,.08); }
.bp-msg.in { background: #fff; justify-self: start; }
.bp-msg.out { background: #d9fdd3; justify-self: end; }
.bp-btn { margin-top: 6px; background: #fff; border-radius: 8px; text-align: center; color: #027eb5; font-weight: 600; padding: 6px; }
.bot-actions { position: sticky; bottom: 0; background: var(--page); padding: 10px 0; }
/* ---- Chatbot akış haritası ---- */
.bot-general { margin-bottom: 16px; }
.bot-grid { display: grid; grid-template-columns: minmax(220px, 2fr) repeat(3, minmax(120px, 1fr)); gap: 12px; align-items: end; }
@media (max-width: 760px) { .bot-grid { grid-template-columns: 1fr 1fr; } }
.bot-kw summary { cursor: pointer; font-weight: 600; font-size: 14px; }
.bot-layout2 { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 16px; align-items: start; }
@media (max-width: 1000px) { .bot-layout2 { grid-template-columns: 1fr; } }
.bot-node-ed { position: sticky; top: 72px; margin: 0; max-height: calc(100vh - 90px); overflow: auto; }
.bot-map-card { margin: 0; min-width: 0; }
.bot-map { overflow: auto; padding: 8px 4px 16px; }
.bt, .bt ul { list-style: none; margin: 0; padding: 0; display: flex; justify-content: center; }
.bt ul { padding-top: 22px; position: relative; }
.bt li { position: relative; padding: 22px 6px 0; display: flex; flex-direction: column; align-items: center; }
.bt > li { padding-top: 0; }
/* bağlantı çizgileri */
.bt ul::before { content: ''; position: absolute; top: 0; left: 50%; height: 22px; border-left: 2px solid var(--axis); }
.bt li::before, .bt li::after { content: ''; position: absolute; top: 0; height: 22px; border-top: 2px solid var(--axis); width: 50%; }
.bt li::before { right: 50%; } .bt li::after { left: 50%; border-left: 2px solid var(--axis); }
.bt li:only-child::before, .bt li:only-child::after { display: none; }
.bt li:only-child { padding-top: 0; }
.bt li:first-child::before, .bt li:last-child::after { border: 0 none; }
.bt li:last-child::before { border-right: 2px solid var(--axis); border-radius: 0 6px 0 0; }
.bt li:first-child::after { border-radius: 6px 0 0 0; }
.bt > li::before, .bt > li::after { display: none; }
.bt-edge { font-size: 11px; font-weight: 600; color: var(--ink-2); background: var(--surface-2); border-radius: 999px; padding: 2px 8px; margin-bottom: 6px; white-space: nowrap; max-width: 170px; overflow: hidden; text-overflow: ellipsis; position: relative; z-index: 1; }
.bt-node { display: grid; gap: 3px; text-align: left; min-width: 150px; max-width: 200px; padding: 8px 10px; border-radius: 10px; border: 1.5px solid var(--border); background: var(--surface); cursor: pointer; font: inherit; position: relative; z-index: 1; box-shadow: var(--shadow); }
.bt-node.on { border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 18%, transparent); }
.bt-node.start { border-style: solid; border-width: 2px; }
.bt-type { font-size: 11px; font-weight: 700; color: var(--ink-2); }
.bt-text { font-size: 12.5px; line-height: 1.3; }
.bt-node.t-menu { background: #eff6ff; } .bt-node.t-ai { background: #f5f3ff; } .bt-node.t-handover { background: #ecfdf5; }
.bt-node.t-question { background: #fffbeb; } .bt-node.t-wait, .bt-node.t-hours { background: #f8fafc; }
.bt-add, .bt-link { font: inherit; font-size: 12px; border: 1px dashed var(--axis); background: transparent; border-radius: 8px; padding: 4px 10px; cursor: pointer; color: var(--ink-2); position: relative; z-index: 1; }
.bt-link { border-style: solid; background: var(--surface-2); max-width: 200px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bt-link.on { border-color: var(--accent); }
.bt-orphans { margin-top: 14px; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; border-top: 1px solid var(--border); padding-top: 10px; }
#botSave.pulse { box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 30%, transparent); }
.btn-sm.danger { color: var(--crit-text); }

/* ---- Panel görünümü: sol menü ---- */
.tabs .ti { display: none; }
#panelBtn { white-space: nowrap; }
.side-user { display: grid; gap: 2px; font-size: 13px; padding: 10px 12px; border-top: 1px solid var(--border); }
body.panel-mode { display: grid; grid-template-columns: 236px minmax(0, 1fr); min-height: 100vh; }
.panel-mode .topbar { position: sticky; top: 0; height: 100vh; flex-direction: column; align-items: stretch; gap: 14px; padding: 18px 12px; border-bottom: 0; border-right: 1px solid var(--border); }
.panel-mode .topbar .brand { padding: 0 8px 6px; }
.panel-mode .tabs { flex-direction: column; height: auto; gap: 2px; }
.panel-mode .tabs button { height: auto; text-align: left; padding: 10px 12px; border-bottom: 0; border-radius: 8px; display: flex; gap: 10px; align-items: center; }
.panel-mode .tabs button:hover { background: var(--surface-2); color: var(--ink); }
.panel-mode .tabs button[aria-selected="true"] { background: color-mix(in srgb, var(--accent) 12%, transparent); color: var(--accent); font-weight: 650; }
.panel-mode .tabs .ti { display: inline; width: 20px; text-align: center; }
.panel-mode .topbar .spacer { flex: 1; }
.panel-mode #logoutBtn { justify-content: flex-start; }
.panel-mode main { min-width: 0; width: 100%; box-sizing: border-box; }
@media (max-width: 820px) {
  /* Tek sütunda üst çubuk kendi yüksekliğinde kalsın; boş alan içeriğe gitsin (yoksa giriş ekranında çubuk uzuyordu) */
  body.panel-mode { grid-template-columns: 1fr; }
  body.panel-mode:not(.ib-full):not(.live-mode):not(.mon-full):not(.crmtab-mode) { grid-template-rows: auto 1fr; }
  .panel-mode .topbar { position: sticky; height: auto; flex-direction: row; flex-wrap: wrap; padding: 10px 12px; border-right: 0; border-bottom: 1px solid var(--border); z-index: 5; }
  .panel-mode .tabs { flex-direction: row; overflow-x: auto; width: 100%; order: 3; }
  .panel-mode .tabs button { white-space: nowrap; }
  .panel-mode .side-user { display: none; }
}

/* ---- Şablon düzenleyici ve WhatsApp önizlemesi ---- */
.tpl-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 12px; }
.tpl-card { border: 1px solid var(--border); border-radius: 12px; padding: 10px; display: grid; gap: 8px; align-content: start; background: var(--surface); }
.tpl-card .tpl-head { display: flex; gap: 6px; align-items: center; }
.tpl-card .tpl-head b { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tpl-mini .wa-chat { padding: 8px; min-height: 0; max-height: 260px; overflow: hidden; }
.tpl-editor { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 18px; align-items: start; }
@media (max-width: 900px) { .tpl-editor { grid-template-columns: 1fr; } }
.tpl-side { position: sticky; top: 72px; }
.tpl-preview { display: grid; gap: 6px; }
.tpl-examples .row code { min-width: 70px; }
.tpl-examples .row input { flex: 1; }
.file-pick { display: flex; flex-direction: row; align-items: center; gap: 10px; border: 1.5px dashed var(--axis); border-radius: 10px; padding: 10px 12px; cursor: pointer; font-weight: 500; }
.file-pick input { max-width: 210px; }
.wa-chat { background: #efeae2; border-radius: 14px; padding: 14px; min-height: 180px; display: grid; gap: 4px; align-content: start; }
.wa-bubble { background: #fff; border-radius: 10px; border-top-left-radius: 2px; padding: 6px 8px 4px; max-width: 290px; box-shadow: 0 1px 0 rgba(0,0,0,.08); color: #111b21; font-size: 13.5px; }
.wa-head { font-weight: 700; margin-bottom: 4px; }
.wa-media { display: block; width: 100%; max-height: 170px; object-fit: cover; border-radius: 7px; margin-bottom: 6px; background: #d9d4cc; }
.wa-media.ph { height: 120px; display: grid; place-items: center; color: #6b6259; font-weight: 600; }
.wa-doc { display: flex; gap: 8px; align-items: center; background: #f5f6f6; border-radius: 7px; padding: 10px; margin-bottom: 6px; font-size: 13px; }
.wa-text { white-space: pre-wrap; word-break: break-word; line-height: 1.4; }
.wa-text code { background: #f0f0f0; padding: 0 3px; border-radius: 3px; }
.wa-foot { color: #667781; font-size: 12px; margin-top: 4px; }
.wa-time { text-align: right; color: #667781; font-size: 10.5px; margin-top: 2px; }
.wa-btns { display: grid; gap: 3px; max-width: 290px; }
.wa-btn { background: #fff; border-radius: 8px; text-align: center; color: #027eb5; font-weight: 600; font-size: 13.5px; padding: 8px; box-shadow: 0 1px 0 rgba(0,0,0,.08); }
.tg-pass { width: 100%; padding: 8px; text-align: left; }
.tg-pass input { width: 100%; }

/* ---- Sohbetler (WhatsApp Web) ---- */
.tab-badge { background: #16a34a; color: #fff; border-radius: 999px; font-size: 11px; font-weight: 700; padding: 1px 7px; margin-left: 6px; }
body.inbox-on main { max-width: none; padding: 12px; }
.inbox { display: grid; grid-template-columns: 340px minmax(0, 1fr); height: calc(100vh - 80px); min-height: 520px; border: 1px solid var(--border); border-radius: 12px; overflow: hidden; background: var(--surface); }
body:not(.panel-mode) .inbox { height: 720px; }
.panel-mode .inbox { height: calc(100vh - 24px); }
.ib-side { display: flex; flex-direction: column; border-right: 1px solid var(--border); min-height: 0; }
.ib-tools { padding: 10px; display: grid; gap: 8px; border-bottom: 1px solid var(--border); }
.ib-tools input[type=search] { flex: 1; min-width: 0; }
.ib-tools select { width: 100%; }
.ib-filter { width: 100%; }
.ib-filter button { flex: 1; font-size: 12px; padding: 6px 4px; }
.ib-list { overflow-y: auto; flex: 1; }
.ib-none { padding: 16px; }
.ib-item { width: 100%; display: flex; gap: 10px; align-items: center; padding: 10px 12px; border: 0; border-bottom: 1px solid var(--border); background: none; text-align: left; cursor: pointer; font: inherit; color: inherit; }
.ib-item:hover { background: var(--surface-2); }
.ib-item.on { background: color-mix(in srgb, var(--accent) 10%, transparent); }
.ib-av { flex: none; width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: 14px; color: #fff; background: #25d366; }
.ib-av.p-cloud { background: #128c7e; } .ib-av.p-telegram { background: #229ed9; } .ib-av.p-demo { background: #9ca3af; }
.ib-meta { flex: 1; min-width: 0; display: grid; gap: 2px; }
.ib-row1, .ib-row2 { display: flex; gap: 6px; align-items: center; }
.ib-row1 b { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.ib-item.unread .ib-row1 b { font-weight: 800; }
.ib-time { font-size: 11px; color: var(--muted); }
.ib-item.unread .ib-time { color: #16a34a; font-weight: 700; }
.ib-last { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; color: var(--ink-2); }
.ib-badge { background: #25d366; color: #fff; border-radius: 999px; font-size: 11px; font-weight: 700; min-width: 20px; padding: 1px 6px; text-align: center; }
.ib-row3 { font-size: 11px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ib-thread { display: flex; flex-direction: column; min-width: 0; min-height: 0; background: #efeae2; }
.ib-empty { margin: auto; color: var(--ink-2); padding: 20px; text-align: center; }
.ib-head { display: flex; align-items: center; gap: 10px; padding: 8px 12px; background: var(--surface); border-bottom: 1px solid var(--border); flex-wrap: wrap; }
.ib-title { flex: 1; min-width: 140px; display: grid; }
.ib-title b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ib-assign { max-width: 180px; font-size: 13px; }
.ib-back { display: none; }
.ib-msgs { flex: 1; overflow-y: auto; padding: 14px 6%; display: flex; flex-direction: column; gap: 3px; }
.ib-more { align-self: center; margin-bottom: 8px; background: var(--surface); }
.ib-day { align-self: center; margin: 8px 0; }
.ib-day span { background: #fff; color: #54656f; font-size: 12px; padding: 4px 10px; border-radius: 8px; box-shadow: 0 1px 0 rgba(0,0,0,.06); }
.ib-msg { display: flex; flex-direction: column; max-width: 75%; }
.ib-msg.in { align-self: flex-start; } .ib-msg.out { align-self: flex-end; align-items: flex-end; }
.ib-bub { padding: 6px 8px 4px; border-radius: 8px; box-shadow: 0 1px 0 rgba(0,0,0,.08); color: #111b21; font-size: 14px; min-width: 70px; }
.ib-msg.in .ib-bub { background: #fff; border-top-left-radius: 2px; }
.ib-msg.out .ib-bub { background: #d9fdd3; border-top-right-radius: 2px; }
.ib-msg.bot .ib-bub { background: #e7f0fe; }
.ib-img { display: block; max-width: 280px; max-height: 300px; border-radius: 6px; margin-bottom: 4px; }
.ib-doc { display: block; background: rgba(0,0,0,.05); border-radius: 6px; padding: 8px 10px; margin-bottom: 4px; color: inherit; text-decoration: none; }
.ib-expired { color: var(--muted, #667781); font-size: 12.5px; line-height: 1.4; }
.ib-bub audio { max-width: 260px; }
.ib-foot { display: flex; gap: 6px; justify-content: flex-end; align-items: center; font-size: 11px; color: #667781; margin-top: 2px; }
.ib-src { font-style: italic; }
.ib-tick.s-read { color: #53bdeb; } .ib-tick.s-failed { color: #d03b3b; }
.ib-err { font-size: 11.5px; color: var(--crit-text); margin-top: 2px; }
.ib-compose { background: var(--surface-2); padding: 8px 10px; display: grid; gap: 6px; }
.ib-note { font-size: 12.5px; background: #fff7d6; border-radius: 8px; padding: 6px 10px; }
.ib-chip { font-size: 12.5px; background: var(--surface); border-radius: 8px; padding: 4px 10px; justify-self: start; }
.ib-bar { display: flex; gap: 6px; align-items: flex-end; }
.ib-bar textarea { flex: 1; resize: none; border-radius: 20px; padding: 9px 14px; max-height: 140px; min-height: 40px; font: inherit; border: 1px solid var(--border); background: var(--surface); }
.ib-att, .ib-tpl { font-size: 18px; padding: 6px 8px; }
.ib-send { border-radius: 50%; width: 42px; height: 42px; padding: 0; font-size: 18px; }
@media (max-width: 760px) {
  .inbox { grid-template-columns: 1fr; }
  .inbox .ib-thread { display: none; }
  .inbox.thread-open .ib-side { display: none; }
  .inbox.thread-open .ib-thread { display: flex; }
  .ib-back { display: inline-block; }
  .ib-msg { max-width: 88%; }
}
/* CRM kartı sekmesi: yalnız sohbet ekranı */
body.crmtab-mode .topbar { display: none; }
body.crmtab-mode main { padding: 0; max-width: none; }
body.crmtab-mode .inbox { height: 640px; border-radius: 0; border: 0; grid-template-columns: 260px minmax(0, 1fr); }
body.crmtab-mode .ib-filter { display: none; }

/* ---- Sohbetler v2 (Whatcrm benzeri düzen) ---- */
.ibx { display: grid; gap: 12px; background: #f1f2f4; border-radius: 18px; padding: 12px; }
.ib-top { display: flex; align-items: center; gap: 16px; background: #fff; border-radius: 16px; padding: 10px 16px; box-shadow: 0 1px 2px rgba(0,0,0,.04); position: relative; z-index: 6; }
.ib-ham { width: 42px; height: 42px; border-radius: 12px; border: 1px solid var(--border); background: #fff; font-size: 18px; cursor: pointer; }
.ib-user { display: grid; line-height: 1.2; min-width: 0; }
.ib-user b { font-size: 15px; }
.ib-connpick { position: relative; }
.ib-connbtn { display: flex; align-items: center; gap: 8px; border: 0; background: transparent; font: inherit; font-size: 15px; font-weight: 600; cursor: pointer; padding: 8px 10px; border-radius: 10px; color: var(--ink); }
.ib-connbtn:hover { background: var(--surface-2); }
.ib-gridic { color: #2a9fd8; font-size: 18px; }
.ib-caret { color: #2a9fd8; }
.ib-pop { position: absolute; top: calc(100% + 6px); left: 0; min-width: 300px; max-height: 60vh; overflow: auto; background: #fff; border-radius: 14px; box-shadow: 0 12px 40px rgba(0,0,0,.14); padding: 8px; display: grid; gap: 2px; }
.ib-popgrp { font-size: 11px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); padding: 10px 10px 4px; }
.ib-popitem { display: flex; gap: 12px; align-items: center; border: 0; background: none; text-align: left; padding: 8px 10px; border-radius: 10px; cursor: pointer; font: inherit; color: inherit; }
.ib-popitem:hover, .ib-popitem.on { background: var(--surface-2); }
.ib-popt { display: grid; line-height: 1.25; }
.ib-popic { width: 32px; height: 32px; display: grid; place-items: center; flex: none; color: #25d366; font-size: 18px; }
.ib-popic svg { width: 28px; height: 28px; }
.ib-popic.p-cloud { color: #0866ff; } .ib-popic.p-telegram { color: #229ed9; } .ib-popic.all { color: #2a9fd8; }
.ib-logo { display: flex; align-items: center; gap: 8px; }
.ib-logo .word { font-family: 'Orbitron', system-ui, sans-serif; font-weight: 800; font-size: 17px; letter-spacing: .03em; }
.ib-logo .word b { color: var(--accent); }
.ibx .inbox { gap: 12px; background: transparent; border: 0; border-radius: 0; overflow: visible; height: calc(100vh - 96px); position: relative; }
body:not(.panel-mode):not(.crmtab-mode) .ibx .inbox { height: 700px; }
.ibx .ib-side, .ibx .ib-thread { background: #fff; border-radius: 16px; border: 0; overflow: hidden; box-shadow: 0 1px 2px rgba(0,0,0,.04); }
.ibx .ib-thread { background: #fff; }
.ibx .ib-msgs { background: #fafafa; }
.ibx .ib-tools { border-bottom: 0; padding: 16px 16px 8px; gap: 12px; }
.ib-titlerow h2 { margin: 0; flex: 1; font-size: 22px; font-weight: 700; }
.ib-titlebtns { display: inline-flex; gap: 6px; margin-left: auto; }
.ib-plusbtn { background: #16a34a !important; border-color: #16a34a !important; color: #fff !important; font-size: 22px; font-weight: 600; line-height: 1; }
.ib-plusbtn:hover { background: #15803d !important; }
.ib-pin { color: #f59e0b; font-size: 12px; margin-right: 4px; }
.cp-list { display: flex; flex-direction: column; gap: 4px; max-height: 50vh; overflow: auto; margin-top: 8px; }
.cp-item { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border: 1px solid var(--border); border-radius: 10px; background: transparent; cursor: pointer; text-align: left; font: inherit; color: inherit; }
.cp-item:hover { border-color: #16a34a; background: rgba(22,163,74,.06); }
.cp-av { width: 34px; height: 34px; border-radius: 50%; background: #dcfce7; color: #166534; display: grid; place-items: center; font-weight: 700; flex: none; }
.cp-item small { display: block; color: var(--ink-3, #64748b); }
.ib-newbtn { width: 36px; height: 36px; border-radius: 10px; border: 1px solid var(--border); background: #fff; cursor: pointer; font-size: 16px; }
.ib-search { display: flex; align-items: center; gap: 8px; background: #f3f4f6; border-radius: 12px; padding: 0 12px; font-weight: 400; }
.ib-search input { border: 0; background: transparent; flex: 1; padding: 10px 0; font-size: 15px; outline: none; box-shadow: none; }
.ib-chips { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 2px; }
.ib-chips button { border: 1px solid var(--border); background: #fff; border-radius: 10px; padding: 6px 12px; font: inherit; font-size: 13.5px; color: var(--ink-2); white-space: nowrap; cursor: pointer; }
.ib-chips button[aria-pressed="true"] { border-color: var(--ink); color: var(--ink); font-weight: 600; }
.ibx .ib-item { border-bottom: 0; border-radius: 14px; margin: 2px 8px; width: calc(100% - 16px); padding: 10px; }
.ibx .ib-item.on { background: #eef0f3; }
.ib-av { position: relative; width: 50px; height: 50px; overflow: visible; box-shadow: 0 0 0 2px #25d366; }
.ib-av.p-cloud { box-shadow: 0 0 0 2px #0866ff; background: #0866ff; } .ib-av.p-telegram { box-shadow: 0 0 0 2px #229ed9; }
.ib-av img { position: absolute; inset: 0; width: 100%; height: 100%; border-radius: 50%; object-fit: cover; }
.ib-av .ib-ini { position: relative; }
.ib-ch { position: absolute; right: -4px; bottom: -4px; width: 20px; height: 20px; border-radius: 50%; background: #25d366; color: #fff; display: grid; place-items: center; box-shadow: 0 0 0 2px #fff; }
.ib-ch svg { width: 13px; height: 13px; }
.ib-ch.p-cloud { background: #fff; color: #0866ff; } .ib-ch.p-cloud svg { width: 16px; height: 16px; }
.ib-ch.p-telegram { background: #229ed9; } .ib-ch.p-demo { background: #9ca3af; }
.ib-av.big { width: 44px; height: 44px; }
.ibx .ib-head { padding: 14px 18px; gap: 12px; border-bottom: 1px solid #eef0f3; }
.ibx .ib-title b { font-size: 17px; }
.ib-kebab { position: relative; }
.ib-kebab summary { list-style: none; cursor: pointer; font-size: 22px; padding: 2px 10px; border-radius: 8px; color: var(--ink-2); }
.ib-kebab summary::-webkit-details-marker { display: none; }
.ib-kmenu { position: absolute; right: 0; top: calc(100% + 4px); background: #fff; border-radius: 12px; box-shadow: 0 12px 40px rgba(0,0,0,.14); padding: 6px; min-width: 240px; display: grid; z-index: 8; }
.ib-kmenu > button { border: 0; background: none; text-align: left; padding: 9px 12px; border-radius: 8px; font: inherit; cursor: pointer; }
.ib-kmenu > button:hover { background: var(--surface-2); }
.ib-kmenu .muted { padding: 9px 12px; }
.ibx .ib-msg.in .ib-bub { background: #fff; box-shadow: 0 1px .5px rgba(11, 20, 26, .13); border-radius: 8px; border-top-left-radius: 0; }
.ibx .ib-msg.out .ib-bub { background: #d9fdd3; box-shadow: 0 1px .5px rgba(11, 20, 26, .13); border-radius: 8px; border-top-right-radius: 0; }
.ibx .ib-msg.bot .ib-bub { background: #ede9fe; }
.ibx .ib-bub { padding: 6px 9px 5px; font-size: 14.5px; }
.ibx .ib-img { border-radius: 12px; max-width: 320px; }
.ibx .ib-day span { background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.06); }
.ibx .ib-compose { background: #fff; border-top: 1px solid #eef0f3; padding: 10px 14px; }
.ibx .ib-bar textarea { background: #f3f4f6; border: 0; }
.inbox.list-hidden, .ibx .inbox.list-hidden, body.ib-mini .ibx .inbox.list-hidden { grid-template-columns: minmax(0, 1fr) !important; }
.inbox.list-hidden .ib-side { display: none; }
body.crmtab-mode .ibx { border-radius: 0; padding: 8px; }
body.crmtab-mode .ib-top { display: none; }
body.crmtab-mode .ibx .inbox { height: 620px; }
@media (max-width: 760px) {
  .ib-top { flex-wrap: wrap; gap: 8px; }
  .ib-logo { display: none; }
  .ibx { padding: 6px; border-radius: 0; }
}
.ib-search { flex-direction: row !important; margin: 0; }
.ib-search span { font-size: 14px; opacity: .6; }
body.inbox-on main { margin: 0 !important; width: auto; justify-self: stretch; }
/* Sohbet listesi: uzun ad ve mesajlar "..." ile kesilsin */
.ib-item { overflow: hidden; }
.ib-meta { grid-template-columns: minmax(0, 1fr); overflow: hidden; }
.ib-row1, .ib-row2, .ib-row3 { min-width: 0; max-width: 100%; }
.ib-time, .ib-badge { flex-shrink: 0; }
.ib-row1 b, .ib-last, .ib-row3 { display: block; }

/* ---- Menü: açılır gruplar (WhatsApp → QR / API / Şablonlar) ---- */
.tab-group { position: relative; display: flex; height: 100%; }
.tab-group[hidden] { display: none; }
.tabs .tab-gtoggle { display: flex; align-items: center; gap: 6px; }
.tab-caret { font-size: 11px; color: var(--muted); transition: transform .15s; }
.tab-group.open .tab-caret { transform: rotate(180deg); }
.tab-group.has-sel > .tab-gtoggle { color: var(--ink); border-bottom-color: var(--accent); }
.tab-sub { display: none; position: absolute; top: calc(100% - 4px); left: 0; z-index: 40; min-width: 190px; flex-direction: column; gap: 2px; padding: 6px; background: #fff; border: 1px solid var(--border); border-radius: 12px; box-shadow: 0 12px 32px rgba(0,0,0,.12); }
.tab-group.open .tab-sub { display: flex; }
.tabs .tab-sub button { height: auto; padding: 9px 12px; border-bottom: 0; border-radius: 8px; text-align: left; display: flex; gap: 10px; align-items: center; white-space: nowrap; }
.tabs .tab-sub button:hover { background: var(--surface-2); color: var(--ink); }
.tabs .tab-sub button[aria-selected="true"] { background: color-mix(in srgb, var(--accent) 12%, transparent); color: var(--accent); }
.tabs .tab-sub .ti { display: inline; width: 20px; text-align: center; }
.tabs .wa-ic { display: inline-flex !important; width: auto; }
.panel-mode .tabs .wa-ic { width: 20px; justify-content: center; }
.panel-mode .tab-group { flex-direction: column; height: auto; }
.panel-mode .tab-group.has-sel > .tab-gtoggle { background: none; color: var(--ink); font-weight: 650; }
.panel-mode .tab-gtoggle .tab-caret { margin-left: auto; }
.panel-mode .tab-sub { position: static; min-width: 0; padding: 2px 0 4px 16px; border: 0; box-shadow: none; background: transparent; border-radius: 0; margin-left: 10px; border-left: 2px solid var(--border); }
@media (max-width: 760px) {
  .panel-mode .tab-group { flex-direction: row; }
  .panel-mode .tab-sub { flex-direction: row; border-left: 0; margin: 0; padding: 0; }
}

/* ---- İzinler ---- */
#permsSave.pulse { box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 25%, transparent); }
.pm-tablewrap { overflow-x: auto; margin: 0 -4px; }
.pm-table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 13px; }
.pm-table th { font-size: 11px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .03em; padding: 8px 6px; text-align: center; white-space: nowrap; border-bottom: 1px solid var(--border); }
.pm-table td { padding: 8px 6px; border-bottom: 1px solid var(--border); text-align: center; vertical-align: middle; }
.pm-table .pm-rolecol { text-align: left; min-width: 170px; }
.pm-table td.pm-rolecol { display: flex; align-items: center; gap: 8px; border-bottom: 0; }
.pm-table tr:last-child td { border-bottom: 0; }
.pm-table tbody tr:hover td { background: var(--surface-2); }
.pm-table input[type=checkbox] { width: 18px; height: 18px; accent-color: #16a34a; cursor: pointer; }
.pm-table input[type=checkbox]:disabled { cursor: not-allowed; opacity: .7; }
.pm-table select { font-size: 13px; padding: 5px 8px; }
.pm-name { padding: 5px 8px; font-weight: 600; width: 140px; }
.pm-chip { font-size: 14px; line-height: 1; color: #8b5cf6; }
.pm-chip.r-admin { color: #dc2626; } .pm-chip.r-supervisor { color: #f59e0b; } .pm-chip.r-agent { color: #16a34a; } .pm-chip.r-none { color: #9ca3af; }
.pm-def { gap: 18px; align-items: center; }
.pm-def label { display: flex; align-items: center; gap: 8px; }
.pm-deflbl { display: flex; align-items: center; gap: 8px; }
.pm-conns { position: relative; }
.pm-conns > summary { list-style: none; cursor: pointer; padding: 6px 30px 6px 12px; border: 1px solid var(--border); border-radius: 8px; background: #fff; font-size: 13px; white-space: nowrap; max-width: 240px; overflow: hidden; text-overflow: ellipsis; position: relative; }
.pm-conns > summary::-webkit-details-marker { display: none; }
.pm-conns > summary::after { content: '▾'; position: absolute; right: 10px; color: var(--muted); }
.pm-conns.disabled > summary { opacity: .6; cursor: not-allowed; }
.pm-pop { position: absolute; right: 0; top: calc(100% + 4px); z-index: 30; min-width: 280px; max-height: 320px; overflow: auto; background: #fff; border: 1px solid var(--border); border-radius: 12px; box-shadow: 0 12px 32px rgba(0,0,0,.12); padding: 6px; display: grid; gap: 2px; }
.pm-def .pm-pop { left: 0; right: auto; }
.pm-opt { display: flex; align-items: center; gap: 8px; padding: 7px 8px; border-radius: 8px; cursor: pointer; font-size: 13px; }
.pm-opt:hover { background: var(--surface-2); }
.pm-opt.all { border-bottom: 1px solid var(--border); border-radius: 8px 8px 0 0; margin-bottom: 2px; }
.pm-opt input { accent-color: #16a34a; }
.pm-dot { width: 18px; height: 18px; display: inline-grid; place-items: center; color: #25d366; }
.pm-dot svg { width: 16px; height: 16px; } .pm-dot.p-cloud { color: #0866ff; } .pm-dot.p-telegram { color: #229ed9; }
.pm-search { max-width: 360px; }
.pm-users { display: grid; gap: 4px; }
.pm-user { display: grid; grid-template-columns: 38px minmax(0, 1fr) auto 190px 220px; gap: 12px; align-items: center; padding: 8px 10px; border-radius: 12px; }
.pm-user:hover { background: var(--surface-2); }
.pm-user.adm { background: color-mix(in srgb, #16a34a 6%, transparent); }
.pm-user select { width: 100%; }
.pm-user .pm-conns > summary { max-width: none; }
.pm-uname { display: grid; min-width: 0; }
.pm-uname b, .pm-uname span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pm-av { width: 38px; height: 38px; border-radius: 50%; background: #e0e7ff; color: #4338ca; display: grid; place-items: center; font-weight: 700; font-size: 13px; overflow: hidden; position: relative; }
.pm-av img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
@media (max-width: 860px) {
  .pm-user { grid-template-columns: 38px minmax(0, 1fr) auto; }
  .pm-user select, .pm-user .pm-conns { grid-column: 2 / -1; }
}
.pm-table th { white-space: normal; line-height: 1.25; font-size: 10px; padding: 8px 4px; min-width: 56px; max-width: 86px; vertical-align: bottom; }
.pm-table th.pm-rolecol { max-width: none; }
.pm-table td { padding: 7px 4px; }
.pm-table .pm-rolecol { min-width: 160px; }
.pm-name { width: 130px; }
.pm-def label, .pm-deflbl { display: flex !important; flex-direction: row !important; align-items: center; gap: 8px; margin: 0; }
.pm-def select { width: auto; min-width: 160px; }
.pm-pop { align-content: start; }
.topbar { z-index: 60; }

/* İş ortağı paylaşımıyla API bağlantısı */
.share-api { border: 1px solid color-mix(in srgb, #16a34a 35%, var(--border)); background: color-mix(in srgb, #16a34a 5%, #fff); border-radius: 12px; padding: 10px 12px; }
.share-api > summary { cursor: pointer; display: flex; align-items: center; gap: 8px; list-style: none; }
.share-api > summary::-webkit-details-marker { display: none; }
.share-api[open] > summary { margin-bottom: 8px; }
.share-api .add-steps { margin: 0; padding-left: 18px; display: grid; gap: 4px; font-size: 13px; }
.share-id { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; background: #fff; border: 1px dashed var(--border); border-radius: 10px; padding: 8px 10px; }
.share-id code { font-size: 15px; font-weight: 700; letter-spacing: .03em; }

/* Instagram ve Facebook Messenger */
.ib-av.p-instagram::after, .ib-av.p-messenger::after { color: #fff; }
.p-instagram { --ch: #E1306C; } .p-messenger { --ch: #0866FF; }
.ib-popic.p-instagram, .pm-dot.p-instagram { color: #E1306C; } .ib-popic.p-messenger, .pm-dot.p-messenger { color: #0866FF; }
.c-avatar.p-instagram { background: linear-gradient(135deg, #feda75, #d62976 55%, #4f5bd5); color: #fff; }
.c-avatar.p-messenger { background: #0866FF; color: #fff; }
.c-avatar.p-telegram { background: #229ED9; color: #fff; }
.c-avatar svg { display: block; }
.dm-pick { gap: 6px; }
.dm-row { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border: 1px solid var(--border); border-radius: 12px; background: #fff; }
.dm-pic { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; display: grid; place-items: center; flex: none; }
.dm-pic svg { width: 20px; height: 20px; }
.dm-name { flex: 1; min-width: 0; display: grid; }
.dm-name b, .dm-name span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dm-row .c-btn { flex: none; }
.ib-av.p-instagram { background: #d62976; box-shadow: 0 0 0 2px #E1306C; } .ib-av.p-messenger { background: #0866FF; box-shadow: 0 0 0 2px #0866FF; }
.ib-ch.p-instagram { background: linear-gradient(135deg, #feda75, #d62976 55%, #4f5bd5); } .ib-ch.p-messenger { background: #0866FF; }

/* Üst menü (Bitrix içi): renkli zemin, sığmazsa iki satır */
body:not(.panel-mode) .topbar { height: auto; min-height: 56px; flex-wrap: wrap; row-gap: 0; padding: 0 20px;
  background: linear-gradient(180deg, #ecfdf3 0%, #e6f6ee 100%); border-bottom: 1px solid #cdeedd; }
body:not(.panel-mode) .tabs { flex-wrap: wrap; height: auto; flex: 1 1 auto; min-width: 0; row-gap: 0; }
body:not(.panel-mode) .tabs > button, body:not(.panel-mode) .tabs .tab-gtoggle { height: 48px; white-space: nowrap; }
body:not(.panel-mode) .tab-group { height: 48px; }
body:not(.panel-mode) .tabs button:hover { color: var(--ink); background: rgba(255,255,255,.55); }
body:not(.panel-mode) .tabs button[aria-selected="true"] { background: rgba(255,255,255,.75); }
body:not(.panel-mode) .topbar > .spacer { flex: 0 0 0; }
body:not(.panel-mode) #panelBtn { white-space: nowrap; margin-left: auto; background: #fff; }
.tabs .meta-ic { display: inline-flex !important; width: auto; }
.panel-mode .tabs .meta-ic { width: 20px; justify-content: center; }
/* Yakında */
.tabs .tab-soon { cursor: default; color: var(--muted); display: inline-flex; align-items: center; gap: 6px; opacity: .85; }
.tabs .tab-soon:hover { background: none !important; color: var(--muted) !important; }
.soon-badge { font-size: 10px; font-weight: 700; letter-spacing: .02em; color: #9a3412; background: #ffedd5; border: 1px solid #fed7aa; border-radius: 999px; padding: 1px 7px; line-height: 1.5; }
.panel-mode .tabs .tab-soon { display: flex; }
.panel-mode .tabs .tab-soon .soon-badge { margin-left: auto; }
body:not(.panel-mode) .topbar { flex-wrap: nowrap; align-items: center; }
body:not(.panel-mode) .tabs { flex: 1 1 0; }
body:not(.panel-mode) .topbar .brand, body:not(.panel-mode) #panelBtn, body:not(.panel-mode) #logoutBtn { flex: none; }

/* Tek satır üst menü + "Daha fazla" */
body:not(.panel-mode) .topbar { flex-wrap: nowrap; }
body:not(.panel-mode) .tabs { flex-wrap: nowrap; flex: 1 1 0; min-width: 0; }
body:not(.panel-mode) .tabs > * { flex: none; }
.tab-sub-right { left: auto; right: 0; }
.tab-more .tab-sub .tab-group { display: none; }
/* "Yakında": etiket sekme adının altında */
.tabs .tab-soon .soon-lbl { display: inline-flex; flex-direction: column; align-items: center; line-height: 1.15; gap: 2px; }
.tabs .tab-soon .soon-badge { font-size: 9px; padding: 0 6px; }
.panel-mode .tabs .tab-soon .soon-lbl, .tabs .tab-sub .tab-soon .soon-lbl { flex-direction: row; gap: 8px; align-items: center; }
.panel-mode .tabs .tab-soon .soon-lbl { flex: 1; justify-content: space-between; }

/* ---- Sohbetler v3: etiket, durum, mükerrer, not, hazır cevap, tam ekran ---- */
.ib-tag { --tc: #16a34a; display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 600; line-height: 1; padding: 4px 9px; border-radius: 999px;
  color: color-mix(in srgb, var(--tc) 85%, #000); background: color-mix(in srgb, var(--tc) 14%, #fff); border: 1px solid color-mix(in srgb, var(--tc) 35%, #fff); white-space: nowrap; }
.ib-tag::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: var(--tc); }
.ib-tag.sm { font-size: 10.5px; padding: 2px 7px; }
.ib-row4 { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; margin-top: 3px; min-width: 0; overflow: hidden; max-height: 22px; }
.ib-wait { font-size: 10.5px; font-weight: 700; color: #b45309; background: #fef3c7; border-radius: 999px; padding: 2px 7px; }
.ib-wait.late { color: #b91c1c; background: #fee2e2; }
.ib-dup { font-size: 10.5px; font-weight: 800; color: #b91c1c; background: #fee2e2; border-radius: 999px; padding: 2px 7px; }
.ib-st.pending { font-size: 10.5px; font-weight: 700; color: #92400e; background: #fde68a; border-radius: 999px; padding: 2px 7px; }
.ib-filters2 { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.ib-filters2 select { font-size: 12.5px; padding: 5px 8px; border-radius: 999px; border: 1px solid var(--border); background: #fff; width: auto; }
.ib-fbtn { font: inherit; font-size: 12.5px; padding: 5px 11px; border-radius: 999px; border: 1px solid var(--border); background: #fff; cursor: pointer; color: var(--ink-2); white-space: nowrap; }
.ib-fbtn.on, .ib-fbtn[aria-pressed="true"] { border-color: #16a34a; color: #166534; background: #ecfdf3; font-weight: 600; }
#ibDupBtn.on { border-color: #dc2626; color: #b91c1c; background: #fef2f2; }
.ib-tagpick { position: relative; }
.ib-tagpop { left: 0; min-width: 220px; z-index: 30; }
.ib-popitem.chk { cursor: pointer; }
.ib-popitem.chk input { accent-color: #16a34a; width: 16px; height: 16px; flex: none; }
.ib-metarow { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 8px 18px; border-bottom: 1px solid #eef0f3; background: #fbfcfd; }
.ib-status { font-size: 12.5px; padding: 4px 8px; border-radius: 999px; border: 1px solid var(--border); width: auto; font-weight: 600; }
.ib-status.st-open { background: #ecfdf3; border-color: #bbf7d0; } .ib-status.st-pending { background: #fef9c3; border-color: #fde68a; } .ib-status.st-resolved { background: #eef2ff; border-color: #c7d2fe; }
.ib-tagwrap { position: relative; display: flex; flex-wrap: wrap; gap: 5px; align-items: center; }
.ib-addtag { font: inherit; font-size: 12px; border: 1px dashed #cbd5e1; background: #fff; border-radius: 999px; padding: 3px 10px; cursor: pointer; color: var(--ink-2); }
.ib-addtag:hover { border-color: #16a34a; color: #166534; }
.ib-tagpop2 { top: calc(100% + 6px); left: 0; min-width: 220px; z-index: 30; }
.ib-dupwarn { margin-left: auto; font: inherit; font-size: 12.5px; font-weight: 700; color: #b91c1c; background: #fef2f2; border: 1px solid #fecaca; border-radius: 999px; padding: 4px 12px; cursor: pointer; }
.ib-note-row { display: flex; justify-content: center; margin: 6px 0; }
.ib-notebub { max-width: min(560px, 85%); background: #fffbeb; border: 1px solid #fde68a; border-radius: 12px; padding: 8px 12px; font-size: 13.5px; box-shadow: 0 1px 2px rgba(0,0,0,.04); }
.ib-notehead { display: flex; align-items: center; gap: 2px; font-size: 12px; margin-bottom: 3px; color: #92400e; }
.ib-notehead button { margin-left: auto; }
.ib-compose { position: relative; }
.ib-compose.note-mode .ib-bar textarea { background: #fffbeb; border-color: #fcd34d; }
.ib-notebtn.on { background: #fef3c7 !important; border-color: #fcd34d !important; }
.ib-qr { position: absolute; left: 12px; right: 12px; bottom: calc(100% - 4px); background: #fff; border: 1px solid var(--border); border-radius: 12px; box-shadow: 0 -8px 28px rgba(0,0,0,.10); padding: 6px; display: grid; gap: 2px; max-height: 260px; overflow: auto; z-index: 20; }
.ib-qritem { display: grid; grid-template-columns: auto 1fr; gap: 10px; align-items: baseline; text-align: left; border: 0; background: none; padding: 8px 10px; border-radius: 8px; cursor: pointer; font: inherit; }
.ib-qritem b { color: #166534; }
.ib-qritem span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ib-qritem:hover, .ib-qritem.on { background: #ecfdf3; }
.ib-fullbtn { width: 38px; height: 38px; border-radius: 10px; border: 1px solid var(--border); background: #fff; font-size: 17px; cursor: pointer; }
.ib-fullbtn:hover { border-color: #16a34a; }
body.ib-full .topbar { display: none !important; }
body.ib-full main { padding: 0 !important; max-width: none !important; margin: 0 !important; }
body.ib-full.panel-mode { grid-template-columns: 1fr !important; }
body.ib-full .ibx { position: fixed; inset: 0; z-index: 80; border-radius: 0; padding: 10px; }
body.ib-full .ibx .inbox { height: calc(100vh - 22px) !important; }
/* Ayarlar: etiket ve hazır cevap düzenleyicileri */
.tag-ed, .qr-ed { display: grid; gap: 8px; }
.tag-row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto; gap: 10px; align-items: center; }
.tag-colors { display: flex; gap: 4px; }
.tag-col { width: 20px; height: 20px; border-radius: 50%; border: 2px solid #fff; box-shadow: 0 0 0 1px var(--border); cursor: pointer; padding: 0; }
.tag-col.on { box-shadow: 0 0 0 2px var(--ink); }
.tag-prev { min-width: 90px; }
.qr-row { display: grid; gap: 6px; padding: 10px; border: 1px solid var(--border); border-radius: 12px; background: #fcfdfc; }
.qr-top { display: grid; grid-template-columns: 180px minmax(0, 1fr) auto; gap: 8px; align-items: center; }
.qr-key { display: flex; align-items: center; gap: 2px; font-weight: 700; color: #166534; margin: 0; }
.qr-key input { font-weight: 600; }
.crm-row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto; gap: 10px; align-items: center; width: 100%; text-align: left; border: 1px solid var(--border); background: #fff; border-radius: 10px; padding: 9px 12px; cursor: pointer; font: inherit; }
.crm-row:hover { border-color: #16a34a; background: #f6fef9; }
.crm-row b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.crm-type { font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 999px; background: #eef2ff; color: #3730a3; }
.crm-type.t-lead { background: #fef3c7; color: #92400e; } .crm-type.t-company { background: #e0f2fe; color: #075985; } .crm-type.t-deal { background: #dcfce7; color: #166534; }
.panel.warn { background: #fef2f2; border: 1px solid #fecaca; color: #7f1d1d; border-radius: 12px; padding: 12px 14px; }
.panel.ok { background: #ecfdf3; border: 1px solid #bbf7d0; color: #14532d; border-radius: 12px; padding: 10px 14px; }
@media (max-width: 760px) { .tag-row { grid-template-columns: 1fr auto; } .tag-colors { grid-column: 1 / -1; } .qr-top { grid-template-columns: 1fr auto; } .qr-top > input { grid-column: 1 / -1; } }
dialog.modal { width: min(560px, calc(100vw - 32px)); }
dialog.modal .modal-head { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
dialog.modal .modal-head h2 { flex: 1; margin: 0; }
dialog.modal .stack { gap: 8px; }

/* WhatsApp gibi: sohbet alanı sabit yükseklikte, mesajlar kendi içinde kayar */
.inbox, .ibx .inbox { grid-template-rows: minmax(0, 1fr); }
.ib-side, .ibx .ib-side { min-height: 0; display: flex; flex-direction: column; }
.ib-side .ib-list { flex: 1; min-height: 0; overflow-y: auto; }
.ib-thread, .ibx .ib-thread { min-height: 0; overflow: hidden; }
.ib-msgs, .ibx .ib-msgs { flex: 1 1 0; min-height: 0; overflow-y: auto; }
.ib-head, .ib-metarow, .ib-compose { flex: none; }
.ib-metarow { position: relative; z-index: 5; }
/* Açılır menülerde işaretleme kutusu solda, tek satır */
label.ib-popitem.chk { display: flex !important; flex-direction: row !important; align-items: center; gap: 10px; font-weight: 500; font-size: 14px; text-align: left; width: 100%; }
label.ib-popitem.chk input[type=checkbox] { width: 16px; height: 16px; margin: 0; flex: none; }
label.ib-popitem.chk .ib-popic { flex: none; }
label.ib-popitem.chk .ib-popt { min-width: 0; }
.ib-tagpop label.ib-popitem.chk, .ib-tagpop2 label.ib-popitem.chk { padding: 7px 10px; }
.ib-since { font-size: 11.5px; color: var(--muted); white-space: nowrap; }
.ib-since { margin-left: auto; } .ib-since + .ib-dupwarn { margin-left: 0; }
body:not(.panel-mode):not(.crmtab-mode) .ibx .inbox { height: var(--ib-h, 700px); }
body.crmtab-mode .ibx .inbox { height: var(--ib-h, 620px); }
body.ib-full:not(.panel-mode) .ibx .inbox { height: calc(100vh - 92px) !important; }
label.crm-opt { display: flex !important; flex-direction: row !important; gap: 12px; align-items: flex-start; padding: 12px 14px; border: 1px solid var(--border); border-radius: 12px; cursor: pointer; }
label.crm-opt:has(input:checked) { border-color: #16a34a; background: #f0fdf4; }
label.crm-opt input { width: 18px; height: 18px; margin: 2px 0 0; accent-color: #16a34a; flex: none; }
label.crm-opt > span { display: grid; gap: 2px; }
.ib-dates { margin-left: auto; display: inline-flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.ib-dates .ib-since { margin-left: 0; }
.ib-dates + .ib-dupwarn { margin-left: 0; }
.ib-since.crm { color: #3730a3; }
.ib-notepop { top: calc(100% + 6px); left: 0; width: min(420px, 80vw); z-index: 30; padding: 10px; gap: 8px; background: #fffbeb; border: 1px solid #fde68a; }
.ib-notepop textarea { width: 100%; resize: vertical; background: #fff; border: 1px solid #fcd34d; border-radius: 10px; padding: 8px 10px; font: inherit; font-size: 13.5px; }
.ib-noteacts { gap: 8px; align-items: center; }
.ib-addnote:hover { border-color: #f59e0b; color: #92400e; }
.ib-av.p-bxline { background: #2fc6f6; box-shadow: 0 0 0 2px #2fc6f6; } .ib-ch.p-bxline { background: #2fc6f6; }
.ib-popic.p-bxline, .pm-dot.p-bxline { color: #0ea5e9; }
/* Etkinlik ve CRM kart düğmeleri */
.ib-addact:hover { border-color: #7c3aed; color: #5b21b6; }
.ib-actpop { top: calc(100% + 6px); left: 0; width: min(440px, 82vw); z-index: 30; padding: 12px; gap: 8px; background: #faf5ff; border: 1px solid #ddd6fe; }
.ib-actpop input, .ib-actpop select, .ib-actpop textarea { width: 100%; font: inherit; font-size: 13.5px; border: 1px solid #ddd6fe; border-radius: 10px; padding: 7px 10px; background: #fff; }
.ib-actrow { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 8px; }
.ib-recpop { top: calc(100% + 6px); left: 0; width: min(420px, 80vw); z-index: 30; padding: 8px; gap: 6px; }
.ib-notebub.act { background: #faf5ff; border-color: #ddd6fe; }
.ib-acthead { display: flex; align-items: center; gap: 4px; font-size: 12.5px; color: #5b21b6; margin-bottom: 2px; }
.ib-acthead button { margin-left: auto; }
dialog.modal.wide { width: min(680px, calc(100vw - 32px)); }
.crm-group { display: grid; gap: 6px; padding: 10px; border: 1px solid var(--border); border-radius: 12px; background: #fcfdfc; }
.crm-ghead { display: flex; align-items: center; gap: 8px; }
.crm-sel { display: grid; grid-template-columns: 22px minmax(0, 1fr); gap: 8px; align-items: center; }
.crm-sel input { width: 17px; height: 17px; accent-color: #16a34a; margin: 0; }
/* Müşteri özeti */
dialog.stats-dlg { width: min(900px, calc(100vw - 32px)); }
.ib-statsbtn:hover { border-color: #0ea5e9; color: #075985; }
.cs-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
.cs-tile { display: grid; gap: 3px; padding: 12px 14px; border-radius: 14px; border: 1px solid var(--border); background: #fff; }
.cs-tile b { font-size: 18px; }
.cs-tile .cs-l { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .03em; color: var(--muted); }
.cs-tile.q { background: #eff6ff; border-color: #bfdbfe; } .cs-tile.o { background: #fefce8; border-color: #fde68a; }
.cs-tile.w { background: #ecfdf3; border-color: #bbf7d0; } .cs-tile.w b { color: #15803d; }
.cs-tile.l { background: #fef2f2; border-color: #fecaca; } .cs-tile.l b { color: #b91c1c; } .cs-tile.i { background: #f5f3ff; border-color: #ddd6fe; }
.cs-facts { display: flex; flex-wrap: wrap; gap: 8px 18px; font-size: 13px; padding: 10px 12px; background: #f8fafc; border-radius: 12px; }
.cs-table { overflow-x: auto; border: 1px solid var(--border); border-radius: 12px; }
.cs-table table { width: 100%; border-collapse: collapse; font-size: 13px; }
.cs-table th { text-align: left; font-size: 11px; text-transform: uppercase; letter-spacing: .03em; color: var(--muted); padding: 8px 10px; background: #f8fafc; border-bottom: 1px solid var(--border); white-space: nowrap; }
.cs-table td { padding: 8px 10px; border-bottom: 1px solid #f1f5f9; vertical-align: middle; }
.cs-table tr:last-child td { border-bottom: 0; }
.cs-table td.num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.cs-link { cursor: pointer; } .cs-link:hover td { background: #f6fef9; }
.cs-st { --sc: #64748b; display: inline-block; font-size: 11.5px; font-weight: 600; padding: 2px 8px; border-radius: 999px; background: color-mix(in srgb, var(--sc) 16%, #fff); color: color-mix(in srgb, var(--sc) 75%, #000); white-space: nowrap; }
.cs-st.s-won { --sc: #16a34a; } .cs-st.s-lost { --sc: #dc2626; }
.ib-addtask:hover { border-color: #0d9488; color: #115e59; }
.ib-taskpop { top: calc(100% + 6px); left: 0; width: min(460px, 84vw); z-index: 30; padding: 12px; gap: 8px; background: #f0fdfa; border: 1px solid #99f6e4; }
.ib-taskpop input, .ib-taskpop select, .ib-taskpop textarea { width: 100%; font: inherit; font-size: 13.5px; border: 1px solid #99f6e4; border-radius: 10px; padding: 7px 10px; background: #fff; }
.ib-notebub.task { background: #f0fdfa; border-color: #99f6e4; }
.ib-notebub.task .ib-acthead { color: #115e59; }
/* Tüm Sohbetler (ChatPilot) (sol menü): yalnız sohbet ekranı */
body.live-mode .topbar { display: none !important; }
body.live-mode main { padding: 6px !important; max-width: none !important; margin: 0 !important; }
body.live-mode .ibx { border-radius: 14px; }
/* Başlık satırı: tek satır, sade */
.ib-metarow { flex-wrap: nowrap; gap: 6px; padding: 6px 14px; min-height: 46px; }
.ib-metarow > * { flex: none; }
.ib-metarow .ib-tagwrap { flex-wrap: nowrap; gap: 4px; }
.ib-metarow .ib-tagwrap:first-of-type { min-width: 0; flex: 0 1 auto; overflow: visible; }
.ib-metarow .ib-tag { max-width: 130px; overflow: hidden; text-overflow: ellipsis; }
.ib-addtag.ib-ico { width: 32px; height: 32px; padding: 0; display: inline-grid; place-items: center; border-style: solid; border-color: #e5e7eb; font-size: 15px; border-radius: 10px; }
.ib-addtag.ib-ico:hover { background: #f8fafc; }
.ib-tagmore { font: inherit; font-size: 12px; font-weight: 700; border: 1px solid #cbd5e1; background: #fff; border-radius: 999px; padding: 3px 8px; cursor: pointer; color: var(--ink-2); }
.ib-metarow .ib-dates { margin-left: auto; font-size: 12px; }
.ib-metarow .ib-dupwarn { padding: 4px 10px; font-size: 12px; }
.ib-metarow .ib-status { padding: 4px 6px; }
.ib-metarow .ib-sep { width: 1px; height: 22px; background: #e5e7eb; margin: 0 2px; }
@media (max-width: 900px) { .ib-metarow { flex-wrap: wrap; } }
/* Emoji ve sesli mesaj */
.ib-emojiwrap, .ib-micwrap { position: relative; display: flex; align-items: center; gap: 6px; }
.ib-emojipop { bottom: calc(100% + 8px); top: auto; left: 0; width: min(340px, 86vw); max-height: 300px; overflow: auto; z-index: 40; padding: 8px; gap: 4px; }
.em-title { font-size: 11px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .03em; padding: 6px 4px 2px; }
.em-grid { display: grid; grid-template-columns: repeat(8, 1fr); gap: 2px; }
.em { border: 0; background: none; font-size: 21px; line-height: 1; padding: 5px 0; border-radius: 8px; cursor: pointer; }
.em:hover { background: #f1f5f9; }
.ib-mic.rec { background: #16a34a !important; color: #fff !important; border-color: #16a34a !important; }
.ib-recbox { display: flex; align-items: center; gap: 8px; padding: 6px 12px; border-radius: 999px; background: #fef2f2; border: 1px solid #fecaca; font-variant-numeric: tabular-nums; font-weight: 600; color: #b91c1c; }
.ib-recbox[hidden] { display: none; }
.ib-recdot { width: 9px; height: 9px; border-radius: 50%; background: #dc2626; animation: recpulse 1s infinite; }
@keyframes recpulse { 50% { opacity: .25; } }
.ib-reccancel { padding: 0 6px !important; min-width: 0 !important; }
#ibText[hidden] { display: none !important; }
.ib-bar .ib-micwrap:has(.ib-recbox:not([hidden])) { flex: 1; justify-content: flex-end; }
.crm-list { display: grid; gap: 6px; max-height: 320px; overflow-y: auto; padding-right: 2px; }
label.crm-all { display: inline-flex !important; flex-direction: row !important; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 600; margin: 0 4px 0 0; }
label.crm-all input { width: 16px; height: 16px; margin: 0; accent-color: #16a34a; }
.crm-ghead { flex-wrap: wrap; }
/* Müşteri bilgileri */
dialog.profile-dlg { width: min(640px, calc(100vw - 32px)); }
.pf-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.pf-grid select, .pf-grid input, .profile-dlg textarea, .profile-dlg input { width: 100%; }
.pf-grid select[hidden], .pf-grid input[hidden] { display: none; }
.pf-loc { gap: 6px; flex-wrap: nowrap; } .pf-loc input { flex: 1; }
.lang-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.lang-chip { font: inherit; font-size: 13px; padding: 5px 12px; border-radius: 999px; border: 1px solid var(--border); background: #fff; cursor: pointer; }
.lang-chip.on { background: #ecfdf3; border-color: #16a34a; color: #166534; font-weight: 600; }
.lang-chip.on::before { content: '✓ '; }
.ib-profilebtn:hover { border-color: #ea580c; }
@media (max-width: 640px) { .pf-grid { grid-template-columns: 1fr; } }
.ib-loc { display: inline-flex; align-items: center; gap: 6px; margin-top: 2px; padding: 1px 9px 1px 4px; border: 1px solid #e2e8f0; border-radius: 999px; background: #f8fafc; font: inherit; font-size: 12px; color: var(--ink-2); cursor: pointer; max-width: 100%; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; width: fit-content; }
.ib-loc:hover { border-color: #16a34a; background: #f0fdf4; }
.ib-loc-empty { border-style: dashed; color: var(--ink-3, #64748b); }
.ib-flag { font-size: 15px; line-height: 1; }
.ib-langs { color: var(--muted); border-left: 1px solid #e2e8f0; padding-left: 6px; }
.ib-title { min-width: 0; }
/* Başlık: ülke/il + etiketler aynı satırda; alt satırda simge + yazı */
.ib-headline { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-top: 3px; min-width: 0; }
.ib-headline .ib-loc { margin-top: 0; }
.ib-headtags { position: relative; display: flex; flex-wrap: nowrap; gap: 4px; align-items: center; }
.ib-headtags .ib-tag { max-width: 140px; overflow: hidden; text-overflow: ellipsis; }
.ib-headtags .ib-addtag { padding: 2px 9px; font-size: 12px; }
.ib-headtags .ib-addtag.ib-ico { width: 26px; height: 26px; border-radius: 999px; }
.ib-headtags .ib-tagpop2 { top: calc(100% + 6px); left: 0; }
.ib-head { overflow: visible; position: relative; z-index: 6; }
.ib-metarow { flex-wrap: wrap; row-gap: 6px; }
.ib-metarow .ib-addtag:not(.ib-ico) { padding: 4px 11px; font-size: 12.5px; }
/* Başlık: ayrı zemin; sağda Sorumlu + Durum */
.ibx .ib-head { background: linear-gradient(180deg, #f0fdf4 0%, #f6fbff 100%); border-bottom: 1px solid #e3efe7; }
.ib-headright { display: grid; gap: 6px; margin-left: auto; min-width: 210px; }
.ib-hr-row { display: grid; grid-template-columns: 62px minmax(0, 1fr); align-items: center; gap: 8px; }
.ib-hr-lbl { font-size: 11px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); text-align: right; }
.ib-hr-val { font-size: 13.5px; }
.ib-headright .ib-assign, .ib-headright .ib-status { width: 100%; }
.ib-headright .ib-status { padding: 5px 8px; }
/* Alt satır: düğme grupları */
.ib-metarow { gap: 10px; flex-wrap: wrap; }
.ib-btngrp { display: inline-flex; align-items: center; gap: 4px; padding: 3px; border: 1px solid #edf0f3; background: #fff; border-radius: 999px; flex: none; }
.ib-btngrp .ib-addtag { border: 0 !important; border-radius: 999px; padding: 4px 10px; }
.ib-btngrp .ib-addtag:hover { background: #f1f5f9; }
.ib-btngrp .ib-tagwrap { display: inline-flex; }
.ib-metarow .ib-dates { margin-left: auto; }
.ib-metarow .ib-dupwarn { margin-left: 6px; }
@media (max-width: 1100px) { .ib-headright { min-width: 170px; } .ib-hr-row { grid-template-columns: 1fr; } .ib-hr-lbl { text-align: left; } }
/* Arama yapılabilen seçim kutusu */
.ss { position: relative; min-width: 0; }
.ss[hidden] { display: none; }
.ss-btn { width: 100%; display: flex; align-items: center; gap: 6px; justify-content: space-between; font: inherit; font-size: 14px; text-align: left; padding: 8px 10px; border: 1px solid var(--border); border-radius: 10px; background: #fff; cursor: pointer; min-height: 38px; }
.ss-btn:disabled { background: #f8fafc; cursor: not-allowed; color: var(--muted); }
.ss-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ss-caret { color: var(--muted); flex: none; }
.ss-pop { position: absolute; z-index: 60; top: calc(100% + 4px); left: 0; right: 0; min-width: 240px; background: #fff; border: 1px solid var(--border); border-radius: 12px; box-shadow: 0 12px 32px rgba(0,0,0,.14); padding: 6px; display: grid; gap: 4px; }
.ss-q { width: 100%; font: inherit; font-size: 14px; padding: 7px 10px; border: 1px solid #cbd5e1; border-radius: 9px; }
.ss-list { max-height: 260px; overflow-y: auto; display: grid; gap: 1px; }
.ss-opt { text-align: left; border: 0; background: none; font: inherit; font-size: 14px; padding: 7px 10px; border-radius: 8px; cursor: pointer; }
.ss-opt:hover, .ss-opt.on { background: #ecfdf3; }
.ss-opt.sel { font-weight: 700; color: #166534; }
.ss-opt.sep { border-top: 1px solid #e5e7eb; margin-top: 4px; padding-top: 9px; }
.ss-empty { padding: 10px; font-size: 13px; color: var(--muted); }
.pf-f { display: grid; gap: 4px; min-width: 0; }
.pf-l { font-weight: 550; font-size: 13px; }
.pf-f input[hidden] { display: none; }

/* ===================== Mobil (Bitrix24 mobil uygulaması ve telefon) ===================== */
@media (max-width: 760px) {
  body.mobile, body.mobile.live-mode { background: #f1f2f4; }
  body.mobile main { padding: 0 !important; }
  body.mobile .ibx { border-radius: 0; padding: 0; gap: 0; background: #f1f2f4; }
  body.mobile .ibx .inbox, body.mobile:not(.panel-mode):not(.crmtab-mode) .ibx .inbox { height: var(--vh, 100dvh) !important; gap: 0; }
  body.mobile.ib-full .ibx .inbox { height: var(--vh, 100dvh) !important; }
  body.mobile .ibx .ib-side, body.mobile .ibx .ib-thread { border-radius: 0; box-shadow: none; }
  /* Üst çubuk: sade */
  body.mobile .ib-top { border-radius: 0; padding: 8px 10px; gap: 8px; min-height: 56px; }
  body.mobile .ib-top .ib-logo, body.mobile .ib-top .ib-user, body.mobile .ib-top .ib-ham { display: none; }
  body.mobile .ib-connbtn { font-size: 14px; padding: 6px 8px; }
  body.mobile .ib-pop:not(.ib-tagpop):not(.ib-tagpop2):not(.ss-pop) { max-width: calc(100vw - 16px); }
  /* Liste */
  body.mobile .ib-tools { padding: 10px 12px 6px; }
  body.mobile .ib-titlerow h2 { font-size: 20px; }
  body.mobile .ib-chips { overflow-x: auto; flex-wrap: nowrap; scrollbar-width: none; }
  body.mobile .ib-chips::-webkit-scrollbar { display: none; }
  body.mobile .ib-chips button { flex: none; }
  body.mobile .ibx .ib-item { margin: 1px 4px; width: calc(100% - 8px); padding: 10px 8px; }
  /* Sohbet başlığı */
  body.mobile .ib-head { flex-wrap: wrap; padding: 8px 10px !important; gap: 8px; }
  body.mobile .ib-back { display: inline-grid !important; place-items: center; width: 38px; height: 38px; font-size: 20px; padding: 0; }
  body.mobile .ib-head .ib-av.big { width: 40px; height: 40px; }
  body.mobile .ib-title { flex: 1; }
  body.mobile .ib-title > b { font-size: 16px; }
  body.mobile .ib-title > .muted { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 62vw; }
  body.mobile .ib-headline { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; max-width: calc(100vw - 120px); }
  body.mobile .ib-headline::-webkit-scrollbar { display: none; }
  body.mobile .ib-headright { order: 10; width: 100%; min-width: 0; grid-template-columns: 1fr 1fr; display: grid; gap: 6px; }
  body.mobile .ib-hr-row { grid-template-columns: 1fr; gap: 2px; }
  body.mobile .ib-hr-lbl { text-align: left; font-size: 10px; }
  /* İşlem düğmeleri: tek satır, yatay kaydırma */
  body.mobile .ib-metarow { flex-wrap: nowrap !important; overflow-x: auto; padding: 6px 8px; gap: 6px; scrollbar-width: none; min-height: 0; }
  body.mobile .ib-metarow::-webkit-scrollbar { display: none; }
  body.mobile .ib-metarow .ib-dates { display: none; }
  body.mobile .ib-btngrp .ib-addtag { padding: 6px 10px; font-size: 13px; white-space: nowrap; }
  /* Açılır pencereler: alttan panel */
  body.mobile .ib-metarow .ib-pop, body.mobile .ib-head .ib-pop, body.mobile .ib-emojipop {
    position: fixed !important; left: 0 !important; right: 0 !important; bottom: 0 !important; top: auto !important; width: 100% !important; max-width: none !important;
    max-height: 70vh; overflow-y: auto; border-radius: 18px 18px 0 0; z-index: 200; box-shadow: 0 -10px 40px rgba(0,0,0,.25); padding: 14px 14px calc(14px + env(safe-area-inset-bottom));
  }
  body.mobile .em-grid { grid-template-columns: repeat(8, 1fr); }
  body.mobile .em { font-size: 26px; padding: 7px 0; }
  /* Mesajlar ve yazma alanı */
  body.mobile .ib-msgs { padding: 10px 8px; }
  body.mobile .ib-msg { max-width: 90%; }
  body.mobile .ib-compose { padding: 6px 6px calc(6px + env(safe-area-inset-bottom)); }
  body.mobile .ib-bar { gap: 4px; }
  body.mobile .ib-bar textarea, body.mobile input, body.mobile select, body.mobile textarea { font-size: 16px !important; }
  body.mobile .ib-bar .ghost, body.mobile .ib-send { min-width: 40px; min-height: 40px; }
  body.mobile .ib-tpl, body.mobile .ib-qrbtn { display: none; }
  /* Diyaloglar: tam ekran */
  body.mobile dialog, body.mobile dialog.modal, body.mobile dialog.modal.wide, body.mobile dialog.stats-dlg, body.mobile dialog.profile-dlg {
    width: 100vw !important; max-width: 100vw !important; height: var(--vh, 100dvh); max-height: var(--vh, 100dvh); margin: 0; border-radius: 0; padding: 14px 14px calc(14px + env(safe-area-inset-bottom)); overflow-y: auto;
  }
  body.mobile .modal-head { position: sticky; top: -14px; background: var(--surface); padding: 6px 0; z-index: 2; }
  body.mobile .cs-tiles { grid-template-columns: 1fr 1fr; }
  body.mobile .cs-table table { font-size: 12px; }
  body.mobile .ss-pop { position: fixed; left: 8px; right: 8px; top: 20vh; }
  body.mobile .ss-list { max-height: 50vh; }
}
@media (max-width: 760px) {
  body.mobile .ib-bar { min-width: 0; }
  body.mobile .ib-bar textarea { min-width: 0; flex: 1 1 auto; }
  body.mobile .ib-bar > * { flex-shrink: 0; }
  body.mobile .ib-bar > textarea { flex-shrink: 1; }
  body.mobile .ib-bar .ghost, body.mobile .ib-send { min-width: 38px; min-height: 38px; padding: 0; width: 38px; }
  body.mobile .ib-emojiwrap .ghost { width: 38px; }
  body.mobile .ib-loc { flex: none; max-width: 70vw; }
  body.mobile .ib-loc .ib-langs { display: none; }
  body.mobile .ib-headline { max-width: calc(100vw - 110px); }
}

/* ---- sağlık ve kapasite ---- */
.health-box { margin-top: 18px; }
.health-box h3 { margin: 0 0 10px; font-size: 16px; }
.hl-alert { padding: 9px 12px; border-radius: 8px; margin-bottom: 6px; font-size: 13px; }
.hl-alert.hl-ok { background: #e8f8ee; color: #17663a; }
.hl-alert.hl-warning { background: #fff4e0; color: #8a5300; }
.hl-alert.hl-critical { background: #fde8e8; color: #a11b1b; font-weight: 600; }
.health-box .tiles { margin-top: 10px; }
.health-box .tile { position: relative; border-left: 4px solid #22a55a; }
.health-box .tile.hl-warning { border-left-color: #f0a020; }
.health-box .tile.hl-critical { border-left-color: #e03131; background: #fff6f6; }
.hl-spark { display: block; width: 100%; height: 28px; margin-top: 6px; color: #5b8def; }
.health-box .small { font-size: 12px; margin-top: 6px; }

/* ---- kredi ---- */
.credit-badge { display: inline-flex; align-items: center; gap: 4px; padding: 5px 11px; border-radius: 999px; border: 1px solid #f2c94c; background: linear-gradient(135deg, #fff8dc, #ffeaa0); color: #6b4e00; font-size: 13px; cursor: pointer; white-space: nowrap; }
.credit-badge b { font-size: 14px; }
.credit-badge.low { border-color: #f1a3a3; background: #fdecec; color: #a11b1b; }
.credit-card .credit-top { display: flex; flex-wrap: wrap; gap: 18px; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.credit-bal .label { font-size: 13px; color: var(--muted, #667); }
.credit-bal .value { font-size: 34px; font-weight: 700; color: #8a6400; line-height: 1.15; }
.credit-bal .value small { font-size: 15px; font-weight: 500; }
.credit-bal .value.low { color: #c0392b; }
.credit-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.code-row { display: flex; gap: 6px; }
.code-row input { width: 150px; text-transform: uppercase; }
button.pay-green { background: #1f9d55; color: #fff; border-color: #1f9d55; }
button.pay-green:hover { background: #188046; }
.price-table td, .price-table th { white-space: nowrap; }
.cr-plus { color: #1f9d55; font-weight: 600; }
.cr-minus { color: #c0392b; }
.credit-pending { padding: 8px 10px; background: #fff7e6; border-radius: 8px; margin-bottom: 8px; font-size: 13px; }
.credit-line { padding: 8px 12px; background: #fff8dc; border-radius: 8px; font-size: 14px; }
.conn-pick .conn-cost { margin-left: auto; font-weight: 600; color: #8a6400; white-space: nowrap; }
#licenseMonths .off { color: #1f9d55; font-weight: 700; }
#licenseMonths button[aria-pressed=true] .off { color: inherit; }
.pack-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
.pack { position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: 14px 12px 10px; border: 2px solid #e4e7ee; border-radius: 12px; background: #fff; text-align: left; cursor: pointer; }
.pack:hover { border-color: #f2c94c; }
.pack.sel { border-color: #e0a800; background: #fffaf0; box-shadow: 0 0 0 3px rgba(242, 201, 76, .25); }
.pack-cr { font-size: 22px; font-weight: 700; color: #8a6400; }
.pack-cr small { font-size: 12px; font-weight: 500; }
.pack-usd { font-size: 16px; font-weight: 600; }
.pack-unit { font-size: 11px; color: #667; }
.pack-unit b { color: #1f9d55; }
.pack-tag { position: absolute; top: -9px; right: 8px; font-size: 10px; padding: 2px 7px; border-radius: 999px; background: #4f6bed; color: #fff; }
.pack-tag.best { background: #1f9d55; }
.switch { position: relative; display: inline-block !important; width: 38px; height: 22px; }
.switch input { opacity: 0; width: 0; height: 0; position: absolute; }
.switch span { position: absolute; inset: 0; border-radius: 22px; background: #cfd4dc; transition: .15s; cursor: pointer; }
.switch span::before { content: ''; position: absolute; width: 16px; height: 16px; left: 3px; top: 3px; border-radius: 50%; background: #fff; transition: .15s; }
.switch input:checked + span { background: #1f9d55; }
.switch input:checked + span::before { transform: translateX(16px); }
.adm-packs { display: grid; gap: 6px; }
.adm-pack { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.adm-pack input { width: 90px; }
#admServices input { width: 70px; }
.code-form { display: flex; flex-wrap: wrap; gap: 8px; align-items: flex-end; }
.code-form label { display: flex; flex-direction: column; font-size: 12px; }
.code-form label input { width: 120px; }
.code-form label.grow input { width: 100%; min-width: 160px; }
.cust-credit { font-size: 13px; padding: 2px 9px; border-radius: 999px; background: #fff3c4; color: #6b4e00; }
.cust-credit.zero { background: #f1f2f5; color: #778; }
body.mobile .credit-badge span:last-child { display: none; }
.disc-badge { display: inline-block; margin: 4px 0; padding: 4px 10px; border-radius: 999px; background: #e6f7ed; color: #17663a; font-size: 13px; font-weight: 600; }
.disc-note { color: #17663a; font-size: 12px; }
.pack-old { margin-left: 6px; font-size: 12px; font-weight: 400; color: #99a; }
.cust-disc { display: inline-flex !important; align-items: center; gap: 4px; font-size: 12px; padding: 2px 4px 2px 9px; border-radius: 999px; background: #f1f2f5; }
.cust-disc.on { background: #e6f7ed; color: #17663a; font-weight: 600; }
.cust-disc select { padding: 2px 4px; font-size: 12px; min-height: 0; }
.seg label { display: inline-flex !important; align-items: center; gap: 6px; padding: 7px 12px; margin: 0; cursor: pointer; white-space: nowrap; }
.seg label + label { border-left: 1px solid var(--border); }

/* ---- yönetim paneli ---- */
.admin-bar { position: sticky; top: 0; z-index: 40; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 10px 16px; margin: 0 0 16px; background: #10241a; color: #e8f5ec; border-radius: 0 0 14px 14px; box-shadow: 0 6px 18px rgba(16,36,26,.18); }
.admin-bar .ab-pick { display: inline-flex !important; align-items: center; gap: 8px; margin: 0; color: #cfe9d8; font-weight: 600; font-size: 13px; }
.admin-bar select { min-width: 280px; background: #fff; color: #10241a; border-radius: 8px; }
.admin-bar .seg { background: #1b3a29; border-color: #2c5a40; }
.admin-bar .seg button { color: #cfe9d8; }
.admin-bar .seg button[aria-pressed="true"] { background: #2fae63; color: #fff; }
.admin-bar .ab-sel .state { margin-right: 4px; }
.admin-bar .ab-sel .linkish { color: #9fe3b8; }
.admin-bar .ab-privacy { font-size: 12px; color: #9fe3b8; background: #1b3a29; padding: 4px 10px; border-radius: 999px; }
.new-tag { display: inline-block; margin-left: 6px; font-size: 10.5px; font-weight: 800; color: #fff; background: #4f6bed; border-radius: 999px; padding: 1px 7px; vertical-align: middle; }
.tile.click { cursor: pointer; }
.tile.click:hover { box-shadow: 0 0 0 2px #2fae63 inset; }
tr.passive td { opacity: .6; }
tr.sel td { background: #eef9f2; }
.state.uninstalled { background: #eceff1; color: #66757a; }
.ev-lvl { font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 999px; background: #eef1f4; color: #55606a; }
.ev-lvl.warn { background: #fff4e0; color: #8a5300; }
.ev-lvl.error { background: #fde8e8; color: #a11b1b; }
tr.ev-error td { background: #fff8f8; }
.tab-badge.warn { background: #e03131; }
.notify-prefs { border: 1px solid var(--border); border-radius: 10px; padding: 10px 14px; display: grid; gap: 6px; }
.notify-prefs legend { font-weight: 700; font-size: 13px; padding: 0 6px; }
.notify-prefs select { margin-left: 6px; }
.ext-pill { display: inline-block; font-size: 10.5px; font-weight: 800; padding: 1px 7px; border-radius: 999px; background: #eceafd; color: #5b47c9; vertical-align: middle; }
.lic.free { color: #17663a; }
.ib-popsearch { margin: 6px 10px; width: calc(100% - 20px); }
.ib-poplist { max-height: 300px; overflow-y: auto; }
.wa-text a { color: #0b6bcb; text-decoration: underline; word-break: break-all; }
.ib-out .wa-text a, .msg.out .wa-text a { color: #0a5aa8; }

/* ---- AI Agent ---- */
.ag-modebar { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-bottom: 16px; }
.ag-seg { display: inline-flex; flex-wrap: wrap; gap: 6px; background: var(--page); border: 1px solid var(--border); border-radius: 12px; padding: 4px; }
.ag-seg button { display: grid; gap: 1px; text-align: left; background: transparent; border: 0; border-radius: 9px; padding: 7px 14px; cursor: pointer; color: var(--ink-2); }
.ag-seg button b { font-size: 14px; color: var(--ink); }
.ag-seg button small { font-size: 12px; }
.ag-seg button.on { background: var(--surface); box-shadow: 0 1px 3px rgba(15, 23, 42, .12); }
.ag-seg button.on b { color: var(--accent); }
.ag-status { display: grid; gap: 8px; margin-bottom: 16px; }
.ag-status .banner { margin: 0; }
.ag-quota { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 24px; }
.ag-quota > div:first-child { display: grid; }
.ag-bar { flex: 1; min-width: 160px; max-width: 420px; height: 8px; border-radius: 999px; background: var(--border); overflow: hidden; }
.ag-bar span { display: block; height: 100%; background: var(--accent); border-radius: inherit; }
.ag-layout { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 16px; align-items: start; }
@media (max-width: 1000px) { .ag-layout { grid-template-columns: 1fr; } }
.ag-col > .card { margin: 0; }
.ag-grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; }
.ag-radios { display: grid; gap: 8px; }
.ag-hours { padding-left: 28px; }
.ag-kb-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.ag-kb-row { display: flex; align-items: center; gap: 10px; border: 1px solid var(--border); border-radius: 10px; padding: 8px 10px; }
.ag-kb-row .grow { display: grid; min-width: 0; }
.ag-kb-row .grow b, .ag-kb-row .grow small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ag-kb-ic { font-size: 18px; }
.ag-kb-ed { border: 1px dashed var(--border); border-radius: 10px; padding: 10px; }
.ag-chat { max-height: 420px; overflow: auto; }
.ag-note { justify-self: center; font-size: 12px; color: #54656f; background: rgba(255, 255, 255, .7); border-radius: 8px; padding: 4px 10px; text-align: center; white-space: pre-line; }
.ag-send { flex-wrap: nowrap; }
.ag-send input { flex: 1; min-width: 0; }
button.loading { opacity: .6; cursor: progress; }
@media (max-width: 560px) {
  .ag-seg { width: 100%; }
  .ag-seg button { flex: 1 1 100%; }
  .ag-kb-row { flex-wrap: wrap; }
}
.ag-prompt summary { cursor: pointer; font-weight: 600; font-size: 14px; display: flex; align-items: center; gap: 8px; }
.ag-prompt[open] { display: grid; gap: 8px; }
.ag-prompt textarea { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12.5px; }
.ag-prompt .btn-sm { justify-self: start; }
.ag-tag { font-size: 11px; font-weight: 600; color: var(--accent); border: 1px solid currentColor; border-radius: 999px; padding: 0 7px; }
.ag-prompt summary { list-style: none; color: var(--accent); }
.ag-prompt summary::-webkit-details-marker { display: none; }
.ag-prompt summary::before { content: '▸'; display: inline-block; transition: transform .15s; }
.ag-prompt[open] summary::before { transform: rotate(90deg); }
.ag-prompt[open] { grid-template-columns: minmax(0, 1fr); } .ag-prompt textarea { width: 100%; box-sizing: border-box; }
.ag-conn-ok { margin: 0; display: grid; gap: 2px; }

/* ---- AI Agent: agent seçici, adımlar, kanallar ---- */
.ag-agents { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.ag-agents > button { display: flex; align-items: center; gap: 10px; text-align: left; border: 1px solid var(--border); background: var(--surface); border-radius: 12px; padding: 8px 14px; cursor: pointer; color: var(--ink); min-width: 160px; }
.ag-agents > button.on { border-color: var(--accent); box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent) 22%, transparent); }
.ag-agents > button small { display: block; color: var(--ink-2); font-size: 12px; }
.ag-agents > .ag-new { border-style: dashed; color: var(--accent); font-weight: 600; justify-content: center; min-width: 0; }
.ag-chip-t { display: grid; }
.ag-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--border); flex: none; }
.ag-dot.on { background: var(--good, #16a34a); }
.ag-head { display: flex; flex-wrap: wrap; align-items: end; gap: 12px; margin-bottom: 12px; }
.ag-head .grow { flex: 1; min-width: 200px; }
.ag-steps { display: flex; gap: 4px; overflow-x: auto; margin-bottom: 16px; border-bottom: 1px solid var(--border); scrollbar-width: none; }
.ag-steps button { display: inline-flex; align-items: center; gap: 8px; background: none; border: 0; border-bottom: 3px solid transparent; padding: 10px 14px; cursor: pointer; color: var(--ink-2); font-weight: 600; white-space: nowrap; }
.ag-steps button.on { color: var(--accent); border-bottom-color: var(--accent); }
.ag-num { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; border: 1.5px solid currentColor; font-size: 12px; }
.ag-steps button.done .ag-num { background: var(--good, #16a34a); border-color: var(--good, #16a34a); color: #fff; }
.ag-panel > .card { margin: 0; }
.ag-nav2 { margin-top: 4px; }
.ag-side { position: sticky; top: 72px; }
@media (max-width: 1000px) { .ag-side { position: static; } }
.ag-chan-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.ag-chan { display: flex; align-items: center; gap: 10px; border: 1px solid var(--border); border-radius: 10px; padding: 8px 12px; }
.ag-chan.on { border-color: var(--good, #16a34a); background: color-mix(in srgb, var(--good, #16a34a) 6%, transparent); }
@media (max-width: 560px) { .ag-agents > button { flex: 1 1 100%; } .ag-chan { flex-wrap: wrap; } }
.ag-chan > label { flex: 1; min-width: 0; }

/* ---- AI Agent: sol menülü düzen ---- */
.ag-shell { display: grid; grid-template-columns: 230px minmax(0, 1fr) 340px; gap: 16px; align-items: start; }
@media (max-width: 1280px) { .ag-shell { grid-template-columns: 220px minmax(0, 1fr); } .ag-shell .ag-side { grid-column: 1 / -1; position: static; } }
@media (max-width: 760px) { .ag-shell { grid-template-columns: 1fr; } }
.ag-menu { position: sticky; top: 72px; display: grid; gap: 2px; background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 8px; }
@media (max-width: 760px) { .ag-menu { position: static; grid-auto-flow: column; grid-auto-columns: max-content; overflow-x: auto; } .ag-soon-t, .ag-soon { display: none; } }
.ag-menu button { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; background: none; border: 0; border-radius: 9px; padding: 9px 10px; cursor: pointer; color: var(--ink); font-size: 14px; }
.ag-menu button:hover { background: var(--page); }
.ag-menu button.on { background: color-mix(in srgb, var(--accent) 12%, transparent); color: var(--accent); font-weight: 600; }
.ag-ic { width: 22px; text-align: center; flex: none; }
.ag-st { font-size: 12px; font-weight: 700; color: var(--warning, #d97706); }
.ag-st.ok { color: var(--good, #16a34a); }
.ag-soon-t { font-size: 11px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--ink-2); padding: 10px 10px 2px; border-top: 1px solid var(--border); margin-top: 6px; }
.ag-soon { display: flex; align-items: center; gap: 10px; padding: 7px 10px; font-size: 13px; color: var(--ink-2); opacity: .7; }
.ag-main > .card, .ag-main > .stack > .card { margin: 0; }
.ag-page h2 { margin-bottom: 0; }
.ag-tips { background: color-mix(in srgb, var(--accent) 6%, var(--surface)); border: 1px solid color-mix(in srgb, var(--accent) 22%, var(--border)); border-radius: 10px; padding: 10px 14px; font-size: 13px; }
.ag-tips ul { margin: 6px 0 0; padding-left: 18px; display: grid; gap: 3px; }
.ag-tpl-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 8px; }
.ag-tpl { display: grid; gap: 4px; text-align: left; border: 1px solid var(--border); background: var(--surface); border-radius: 10px; padding: 10px 12px; cursor: pointer; color: var(--ink); }
.ag-tpl:hover { border-color: var(--accent); }
.ag-tpl small { color: var(--ink-2); font-size: 12px; line-height: 1.35; }
.ag-instr { width: 100%; box-sizing: border-box; }
.ag-snips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.chip-btn { border: 1px solid var(--border); background: var(--surface); border-radius: 999px; padding: 5px 12px; font-size: 13px; cursor: pointer; color: var(--ink); }
.chip-btn:hover { border-color: var(--accent); color: var(--accent); }
.ag-ctx-sample { margin: 6px 0 0; padding: 10px 12px; border-radius: 10px; background: var(--page); border: 1px solid var(--border); font-size: 12.5px; white-space: pre-wrap; }
.ag-side { position: sticky; top: 72px; }
.ag-menu .grow { flex: 1; min-width: 0; }
.section-head { margin: 28px 0 10px; }
.section-head h2 { margin: 0 0 4px; }
#view-replies .qr-key { display: flex; flex-direction: row; align-items: center; gap: 2px; }
/* Sohbet: yapay zekâ yardımı */
.ib-ai-wrap { position: relative; display: inline-flex; }
.ib-ai-pop { top: auto; bottom: calc(100% + 8px); left: 0; min-width: 290px; z-index: 30; }
.ib-ai-pop button { display: grid; gap: 1px; text-align: left; background: none; border: 0; border-radius: 9px; padding: 8px 10px; cursor: pointer; color: #111; }
.ib-ai-pop button:hover { background: #f4f4f2; }
.ib-ai-pop small { color: #666; font-size: 12px; }
.ib-ai-out { margin: 0 8px 6px; padding: 8px 12px; border-radius: 10px; background: color-mix(in srgb, var(--accent) 8%, #fff); border: 1px solid color-mix(in srgb, var(--accent) 25%, transparent); font-size: 13px; }
.ib-ai-out .row { gap: 8px; align-items: center; }
.ib-ai-txt { margin-top: 4px; white-space: pre-wrap; }
/* Ödeme v2 */
.disc-banner { background: color-mix(in srgb, #16a34a 10%, var(--surface)); border: 1px solid color-mix(in srgb, #16a34a 35%, transparent); color: #166534; border-radius: 12px; padding: 10px 14px; font-weight: 600; margin-bottom: 12px; }
.disc-banner small { font-weight: 400; color: var(--ink-2); }
.pay-summary { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 12px; margin-bottom: 12px; }
.pay-box { border: 1px solid var(--border); border-radius: 12px; padding: 14px; display: grid; gap: 6px; align-content: start; }
.pay-box .label { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--ink-2); }
.pay-box .value { font-size: 22px; font-weight: 700; }
.pay-box .value.low { color: var(--critical, #dc2626); }
.pay-box .value small { font-size: 13px; font-weight: 500; color: var(--ink-2); }
.pay-box .row { flex-wrap: wrap; gap: 8px; }
.price s { margin-right: 2px; }
.pack-inline { white-space: nowrap; }
.lic-req { margin-bottom: 12px; }
.price-grid { display: grid; grid-template-columns: minmax(150px, 1.6fr) repeat(4, minmax(64px, 1fr)); gap: 6px 8px; align-items: center; }
.price-grid > b { font-size: 12px; color: var(--ink-2); }
.price-grid > span { font-size: 13px; }
@media (max-width: 560px) { .price-grid { grid-template-columns: repeat(4, 1fr); } .price-grid > span { grid-column: 1 / -1; } .price-grid > span:first-child { display: none; } }
.disc-dlg { width: min(560px, calc(100vw - 32px)); }
.disc-dlg input[type=range] { flex: 1; }
.disc-pct input { width: 72px; }
.econ { width: 100%; }
.econ td { padding: 5px 4px; border-bottom: 1px solid var(--border); font-size: 13px; }
.econ tr.sum td { border-top: 2px solid var(--border); }
.econ .pos { color: #15803d; } .econ .neg { color: #dc2626; }
td.center { text-align: center; }
/* CBN canlı destek düğmesi yalnız Destek sekmesinde */
body:not(.on-contact) .b24-widget-button-wrapper, body:not(.on-contact) .b24-widget-button-popup { display: none !important; }
.live-chat-note { background: color-mix(in srgb, var(--accent) 8%, var(--surface)); border-radius: 10px; padding: 8px 12px; }
/* AI Rapor */
.ar-plan { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; }
.ar-lic { font-size: 14px; } .ar-lic.ok { color: #15803d; } .ar-lic.bad { color: #dc2626; }
.ar-prices { display: flex; gap: 14px; flex-wrap: wrap; }
.ar-prices > div { display: grid; text-align: center; border: 1px solid var(--border); border-radius: 10px; padding: 6px 12px; }
.ar-prices small { color: var(--ink-2); font-size: 11px; }
.ar-freq { gap: 6px; margin-top: 4px; }
.chip-check.off { opacity: .55; }
.ar-users { display: flex; flex-wrap: wrap; gap: 6px; max-height: 160px; overflow: auto; margin-top: 4px; }
#view-aireport .grid2 > .card, #view-aireport .grid2 > .stack > .card { margin: 0; }
.ar-top { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.ar-group h2 { margin: 0; }
.ar-row { border: 1px solid var(--border); border-radius: 12px; padding: 10px 12px; display: grid; gap: 10px; }
.ar-row.off { opacity: .6; }
.ar-row-head { flex-wrap: wrap; gap: 8px; align-items: center; }
.ar-when { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.ar-when select { width: auto; }
.ar-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.ar-chip { display: inline-flex; align-items: center; gap: 4px; background: color-mix(in srgb, var(--accent) 12%, transparent); color: var(--accent); border-radius: 999px; padding: 2px 4px 2px 10px; font-size: 13px; font-weight: 600; }
.ar-chip button { border: 0; background: none; cursor: pointer; color: inherit; font-size: 15px; line-height: 1; padding: 0 4px; }
.ar-picker details { margin-top: 6px; }
.ar-picker summary { cursor: pointer; color: var(--accent); font-size: 13px; font-weight: 600; }
.ar-ulist { max-height: 220px; overflow: auto; display: grid; gap: 2px; margin-top: 6px; }

/* ---- Fiyat panosu: gruplar ve ürün kutuları ---- */
.pboard { display: grid; gap: 14px; margin-top: 8px; }
.pb-top { display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: center; }
.pb-top h2 { margin: 0; flex: 1 1 auto; }
.pb-months { display: inline-flex; background: var(--surface-2); border-radius: 999px; padding: 3px; gap: 2px; flex-wrap: wrap; }
.pb-months button { border: 0; background: none; border-radius: 999px; padding: 6px 14px; font: inherit; font-weight: 600; color: var(--ink-2); cursor: pointer; }
.pb-months button.on { background: var(--surface); color: var(--ink); box-shadow: 0 1px 3px rgba(0,0,0,.12); }
.pb-months small { color: var(--accent); font-weight: 700; }
.pb-curl { display: inline-flex; gap: 6px; align-items: center; font-size: 13px; color: var(--ink-2); }
.pb-cur { width: auto; padding: 4px 8px; }
.pb-group { display: grid; gap: 8px; }
.pb-gh { display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap; }
.pb-gh h3 { margin: 0; font-size: 15px; }
.pb-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(250px, 100%), 1fr)); gap: 12px; }
.pcard { position: relative; border: 1px solid var(--border); border-radius: 14px; padding: 16px; display: flex; flex-direction: column; gap: 8px; background: var(--surface); }
.pcard.tagged { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent) inset; }
.pcard.free { background: var(--surface-2); }
.pc-tag { position: absolute; top: -10px; right: 12px; background: var(--accent); color: var(--accent-ink); font-size: 11px; font-weight: 700; border-radius: 999px; padding: 2px 10px; }
.pc-head { display: flex; gap: 8px; align-items: center; font-size: 15px; }
.pc-ic { font-size: 20px; line-height: 1; }
.pc-price { display: flex; align-items: baseline; gap: 6px; flex-wrap: wrap; }
.pc-usd { font-size: 28px; font-weight: 800; letter-spacing: -.01em; }
.pc-price small { color: var(--ink-2); }
.pc-local { font-size: 13px; color: var(--ink-2); min-height: 18px; }
.pc-feats { list-style: none; padding: 0; margin: 2px 0 0; display: grid; gap: 4px; font-size: 13px; flex: 1; }
.pc-feats li { padding-left: 20px; position: relative; margin: 0; }
.pc-feats li::before { content: '✓'; position: absolute; left: 2px; color: var(--accent); font-weight: 700; }
.pc-foot { display: grid; gap: 8px; border-top: 1px solid var(--border); padding-top: 10px; margin-top: 4px; }
.pc-state { font-size: 12.5px; font-weight: 600; color: var(--ink-2); }
.pc-state.ok { color: var(--accent); }
.pc-state.trial { color: #b45309; }
.pc-state.bad { color: var(--critical, #dc2626); }
.pc-btns { display: flex; gap: 6px; flex-wrap: wrap; }
.pc-btns button { flex: 1 1 auto; }
.pc-packs { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; flex: 1; }
.pc-pack { border: 1px solid var(--border); border-radius: 10px; background: var(--surface); padding: 8px; display: grid; gap: 2px; text-align: left; font: inherit; cursor: pointer; }
.pc-pack:hover:not(:disabled) { border-color: var(--accent); }
.pc-pack span { font-weight: 700; }

/* ---- AI Yönetici Raporu: Raporlar / Ayarlar sekmeleri ve rapor görüntüleyici ---- */
.ar-tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--border); }
.ar-tabs button { border: 0; background: none; padding: 10px 16px; font: inherit; font-weight: 600; color: var(--ink-2); cursor: pointer; border-bottom: 3px solid transparent; margin-bottom: -1px; position: relative; }
.ar-tabs button.on { color: var(--accent); border-bottom-color: var(--accent); }
.ar-dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: #d97706; margin-left: 6px; vertical-align: 2px; }
.ar-viewer { padding: 12px; display: grid; gap: 10px; }
.ar-vhead { flex-wrap: wrap; gap: 8px; align-items: center; }
.ar-vbody { border-radius: 12px; overflow: hidden; background: #f4f6f9; min-height: 300px; }
.ar-frame { display: block; width: 100%; height: 1400px; border: 0; background: #f4f6f9; }
.ar-quick { position: relative; }
.ar-quick > summary { list-style: none; cursor: pointer; display: inline-block; border: 1px solid var(--border); border-radius: 8px; padding: 4px 10px; font-size: 13px; }
.ar-quick > summary::-webkit-details-marker { display: none; }
.ar-quick-menu { position: absolute; right: 0; top: calc(100% + 4px); z-index: 20; background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 6px; display: grid; gap: 4px; min-width: 220px; box-shadow: 0 8px 24px rgba(0,0,0,.12); }
.ar-quick-menu button { text-align: left; }
#arArchive tr.ar-arow { cursor: pointer; }
#arArchive tr.ar-arow:hover { background: var(--surface-2); }
#arArchive tr.ar-arow.sel { background: color-mix(in srgb, var(--accent) 12%, transparent); }
.pc-seg { display: grid; grid-template-columns: repeat(4, 1fr); background: var(--surface-2); border-radius: 10px; padding: 3px; gap: 2px; }
.pc-seg button { border: 0; background: none; border-radius: 8px; padding: 6px 2px; font: inherit; font-size: 12.5px; font-weight: 600; color: var(--ink-2); cursor: pointer; display: grid; line-height: 1.2; }
.pc-seg button small { font-size: 10.5px; color: var(--accent); font-weight: 700; }
.pc-seg button.on { background: var(--surface); color: var(--ink); box-shadow: 0 1px 3px rgba(0,0,0,.12); }
.pc-old { color: var(--ink-2); font-size: 16px; margin-right: 2px; }
.pc-save { background: color-mix(in srgb, var(--accent) 14%, transparent); color: var(--accent); font-size: 11.5px; font-weight: 700; border-radius: 999px; padding: 2px 8px; margin-left: 4px; }

/* ---- Sohbet: mesaja yanıt (alıntı) ve emoji tepki ---- */
.ib-msg { position: relative; }
.ib-acts { position: absolute; top: 2px; display: none; gap: 2px; z-index: 3; }
.ib-msg.in .ib-acts { right: 0; transform: translateX(100%); padding-left: 10px; } .ib-msg.out .ib-acts { left: 0; transform: translateX(-100%); padding-right: 10px; } /* düğme alanı balona değer: fare boşluktan geçerken düğmeler kaybolmasın */
.ib-msg:hover .ib-acts, .ib-msg:focus-within .ib-acts { display: flex; }
@media (hover: none) { .ib-acts { display: flex; opacity: .75; } }
.ib-acts button { border: 0; background: var(--surface, #fff); border-radius: 50%; width: 26px; height: 26px; cursor: pointer; box-shadow: 0 1px 3px rgba(0,0,0,.18); font-size: 13px; line-height: 1; padding: 0; color: var(--ink-2); }
.ib-acts button:hover { background: var(--surface-2); }
.ib-reactpop { position: absolute; top: -40px; z-index: 6; display: flex; gap: 2px; background: var(--surface, #fff); border-radius: 999px; padding: 4px 6px; box-shadow: 0 4px 16px rgba(0,0,0,.18); }
.ib-msg.in .ib-reactpop { left: 0; } .ib-msg.out .ib-reactpop { right: 0; }
.ib-reactpop button { border: 0; background: none; font-size: 20px; cursor: pointer; border-radius: 50%; width: 34px; height: 34px; transition: transform .1s; }
.ib-reactpop button:hover { transform: scale(1.25); }
.ib-reactpop button.on { background: var(--surface-2); }
.ib-reacts { display: flex; gap: 2px; margin-top: -6px; z-index: 2; background: var(--surface, #fff); border-radius: 999px; padding: 1px 6px; box-shadow: 0 1px 3px rgba(0,0,0,.15); font-size: 14px; align-self: flex-start; margin-left: 8px; }
.ib-msg.out .ib-reacts { align-self: flex-end; margin-right: 8px; }
.ib-reacts .mine { cursor: pointer; }
.ib-quote { border-left: 4px solid #06cf9c; background: rgba(0,0,0,.05); border-radius: 6px; padding: 4px 8px; margin-bottom: 4px; cursor: pointer; font-size: 12.5px; display: grid; max-width: 100%; }
.ib-quote.out { border-left-color: #53bdeb; }
.ib-quote b { color: #06a37c; font-size: 12px; } .ib-quote.out b { color: #3b9fd1; }
.ib-quote span { overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; color: #54656f; }
.ib-replybar { display: flex; gap: 8px; align-items: center; border-left: 4px solid #06cf9c; background: var(--surface-2); border-radius: 8px; padding: 6px 10px; margin: 0 8px 6px; font-size: 13px; }
.ib-replytxt { color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }
.ib-replybar .grow { min-width: 0; }
.ib-msg.flash .ib-bub { animation: ibflash 1.2s; }
@keyframes ibflash { 0%, 60% { box-shadow: 0 0 0 3px rgba(6,207,156,.55); } 100% { box-shadow: none; } }

/* Sohbet: bağlı şirket ve görevler */
.ib-company { display: inline-flex; align-items: center; gap: 2px; border: 1px solid #c7d2fe; background: #eef2ff; color: #3730a3; border-radius: 999px; padding: 1px 9px; font: inherit; font-size: 12px; cursor: pointer; margin-right: 6px; max-width: 260px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ib-company:hover { background: #e0e7ff; }
.ib-company-l { color: #4338ca; font-weight: 600; }
.crm-via { font-weight: 500; }
.crm-type.t-task { background: #ecfdf5; color: #047857; }
.crm-type.t-task.s-5 { background: #f1f5f9; color: #64748b; }
.task-row.late .crm-type { background: #fef2f2; color: #b91c1c; }
.task-row.done b { text-decoration: line-through; color: #64748b; }
.ib-cnt { font-weight: 800; }
.ib-company b { font-size: 12px; font-weight: 700; }
.ib-taskspop { min-width: 380px; max-width: min(520px, 92vw); }
.ib-taskspop .crm-row b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.ib-headline .ib-company, .ib-headline .ib-company b { font-size: 12.5px !important; line-height: 1.5; }

/* ---- Koyu mod: sohbet ekranı ve paneller (bilgisayar koyu moddaysa otomatik; elle seçilebilir) ---- */
@media (prefers-color-scheme: dark) {
:root:not([data-theme="light"]) .ibx { background:#0f0f0e; }
:root:not([data-theme="light"]) .ib-top, :root:not([data-theme="light"]) .ibx .ib-side, :root:not([data-theme="light"]) .ibx .ib-thread, :root:not([data-theme="light"]) .ibx .ib-compose, :root:not([data-theme="light"]) .ib-pop, :root:not([data-theme="light"]) .ib-kmenu, :root:not([data-theme="light"]) .ib-qr, :root:not([data-theme="light"]) .pm-pop, :root:not([data-theme="light"]) .ss-pop { background:#1a1a19;color:var(--ink); }
:root:not([data-theme="light"]) .ib-thread { background:#141413; }
:root:not([data-theme="light"]) .ibx .ib-msgs { background:#121211; }
:root:not([data-theme="light"]) .ibx .ib-head { background:linear-gradient(180deg,#132219 0%,#141b22 100%);border-bottom-color:#26302a; }
:root:not([data-theme="light"]) .ib-metarow { background:#171716;border-bottom-color:#262624; }
:root:not([data-theme="light"]) .ibx .ib-compose, :root:not([data-theme="light"]) .ibx .ib-head, :root:not([data-theme="light"]) .ib-metarow { border-color:#262624; }
:root:not([data-theme="light"]) .ibx .ib-item.on { background:#262624; }
:root:not([data-theme="light"]) .ib-item:hover { background:#1f1f1e; }
:root:not([data-theme="light"]) .ib-search, :root:not([data-theme="light"]) .ibx .ib-bar textarea { background:#232321;color:var(--ink); }
:root:not([data-theme="light"]) .ib-ham, :root:not([data-theme="light"]) .ib-newbtn, :root:not([data-theme="light"]) .ib-fullbtn, :root:not([data-theme="light"]) .ib-chips button, :root:not([data-theme="light"]) .ib-filters2 select, :root:not([data-theme="light"]) .ib-fbtn, :root:not([data-theme="light"]) .ib-addtag, :root:not([data-theme="light"]) .ib-tagmore, :root:not([data-theme="light"]) .lang-chip, :root:not([data-theme="light"]) .ib-btngrp { background:#1f1f1e;color:var(--ink-2);border-color:#33332f; }
:root:not([data-theme="light"]) .ib-btngrp .ib-addtag:hover, :root:not([data-theme="light"]) .ib-addtag.ib-ico:hover, :root:not([data-theme="light"]) .ib-ai-pop button:hover { background:#2a2a28; }
:root:not([data-theme="light"]) .ib-fbtn.on, :root:not([data-theme="light"]) .ib-fbtn[aria-pressed="true"], :root:not([data-theme="light"]) .lang-chip.on, :root:not([data-theme="light"]) .ib-qritem:hover, :root:not([data-theme="light"]) .ib-qritem.on { background:#12301f;color:#86efac;border-color:#1f7a45; }
:root:not([data-theme="light"]) .ib-loc { background:#1f1f1e;border-color:#33332f; }
:root:not([data-theme="light"]) .ib-loc:hover { background:#12301f; }
:root:not([data-theme="light"]) .ib-langs { border-left-color:#33332f; }
:root:not([data-theme="light"]) .ib-metarow .ib-sep { background:#33332f; }
:root:not([data-theme="light"]) .ib-bub { color:#e9edef; }
:root:not([data-theme="light"]) .ib-msg.in .ib-bub, :root:not([data-theme="light"]) .ibx .ib-msg.in .ib-bub { background:#202c33; }
:root:not([data-theme="light"]) .ib-msg.out .ib-bub, :root:not([data-theme="light"]) .ibx .ib-msg.out .ib-bub { background:#005c4b; }
:root:not([data-theme="light"]) .ib-msg.bot .ib-bub, :root:not([data-theme="light"]) .ibx .ib-msg.bot .ib-bub { background:#2a2340; }
:root:not([data-theme="light"]) .ib-day span, :root:not([data-theme="light"]) .ibx .ib-day span { background:#232321;color:#aebac1; }
:root:not([data-theme="light"]) .ib-quote { background:rgba(255,255,255,.06); }
:root:not([data-theme="light"]) .ib-quote span, :root:not([data-theme="light"]) .ag-note { color:#aebac1; }
:root:not([data-theme="light"]) .ag-note { background:rgba(0,0,0,.35); }
:root:not([data-theme="light"]) .ib-acts button, :root:not([data-theme="light"]) .ib-reactpop, :root:not([data-theme="light"]) .ib-reacts { background:#262624;color:var(--ink); }
:root:not([data-theme="light"]) .ib-replybar { background:#232321; }
:root:not([data-theme="light"]) .ib-note { background:#3a3214;color:#fde68a; }
:root:not([data-theme="light"]) .ib-notebub, :root:not([data-theme="light"]) .ib-notepop { background:#2b2611;border-color:#6b5a1e;color:#fef3c7; }
:root:not([data-theme="light"]) .ib-notepop textarea, :root:not([data-theme="light"]) .ib-compose.note-mode .ib-bar textarea { background:#1f1c0f;border-color:#6b5a1e;color:var(--ink); }
:root:not([data-theme="light"]) .ib-notebtn.on { background:#3a3214 !important;border-color:#6b5a1e !important; }
:root:not([data-theme="light"]) .ib-notebub.act, :root:not([data-theme="light"]) .ib-actpop { background:#221d33;border-color:#4c3f7a;color:#ede9fe; }
:root:not([data-theme="light"]) .ib-actpop input, :root:not([data-theme="light"]) .ib-actpop select, :root:not([data-theme="light"]) .ib-actpop textarea { background:#191527;border-color:#4c3f7a;color:var(--ink); }
:root:not([data-theme="light"]) .ib-notebub.task, :root:not([data-theme="light"]) .ib-taskpop { background:#0f2925;border-color:#1f6b60;color:#ccfbf1; }
:root:not([data-theme="light"]) .ib-taskpop input, :root:not([data-theme="light"]) .ib-taskpop select, :root:not([data-theme="light"]) .ib-taskpop textarea { background:#0b1f1c;border-color:#1f6b60;color:var(--ink); }
:root:not([data-theme="light"]) .ib-wait { background:#3a2a0a;color:#fcd34d; }
:root:not([data-theme="light"]) .ib-wait.late, :root:not([data-theme="light"]) .ib-dup { background:#3b1414;color:#fca5a5; }
:root:not([data-theme="light"]) .ib-st.pending { background:#3a2f0a;color:#fde68a; }
:root:not([data-theme="light"]) .ib-status.st-open { background:#12301f;border-color:#1f7a45; }
:root:not([data-theme="light"]) .ib-status.st-pending { background:#33300f;border-color:#6b5a1e; }
:root:not([data-theme="light"]) .ib-dupwarn, :root:not([data-theme="light"]) .ib-recbox { background:#2e1212;border-color:#7f1d1d;color:#fca5a5; }
:root:not([data-theme="light"]) .crm-row { background:#1f1f1e;border-color:#33332f;color:var(--ink); }
:root:not([data-theme="light"]) .crm-row:hover, :root:not([data-theme="light"]) .cs-link:hover td { background:#12301f; }
:root:not([data-theme="light"]) .crm-type { background:#23264a;color:#c7d2fe; }
:root:not([data-theme="light"]) .crm-type.t-lead { background:#3a2f0a;color:#fde68a; }
:root:not([data-theme="light"]) .crm-type.t-company { background:#0c2a3d;color:#bae6fd; }
:root:not([data-theme="light"]) .crm-type.t-deal, :root:not([data-theme="light"]) .crm-type.t-task { background:#12301f;color:#86efac; }
:root:not([data-theme="light"]) .crm-type.t-task.s-5 { background:#262624;color:#94a3b8; }
:root:not([data-theme="light"]) .task-row.late .crm-type { background:#3b1414;color:#fca5a5; }
:root:not([data-theme="light"]) .ib-company { background:#1e2148;border-color:#3b3f8f;color:#c7d2fe; }
:root:not([data-theme="light"]) .ib-company:hover { background:#262a5c; }
:root:not([data-theme="light"]) .ib-company-l { color:#a5b4fc; }
:root:not([data-theme="light"]) .crm-group { background:#1a1a19; }
:root:not([data-theme="light"]) .cs-tile, :root:not([data-theme="light"]) .cs-facts, :root:not([data-theme="light"]) .cs-table th { background:#1f1f1e;border-color:#33332f; }
:root:not([data-theme="light"]) .cs-tile.q { background:#0f1d33;border-color:#1e3a8a; }
:root:not([data-theme="light"]) .cs-tile.o { background:#2b2611;border-color:#6b5a1e; }
:root:not([data-theme="light"]) .cs-tile.w { background:#0f2a1a;border-color:#166534; }
:root:not([data-theme="light"]) .cs-tile.l { background:#2e1212;border-color:#7f1d1d; }
:root:not([data-theme="light"]) .cs-tile.i { background:#1e1a33;border-color:#4c3f7a; }
:root:not([data-theme="light"]) .cs-table td { border-bottom-color:#262624; }
:root:not([data-theme="light"]) .wa-bubble { background:#262624;color:#e9edef; }
:root:not([data-theme="light"]) .ib-ai-out { background:#14261b; }
:root:not([data-theme="light"]) .tag-col { border-color:#1a1a19; }
:root:not([data-theme="light"]) .ag-chat, :root:not([data-theme="light"]) .bot-preview { background:#141413; }
:root:not([data-theme="light"]) input, :root:not([data-theme="light"]) select, :root:not([data-theme="light"]) textarea { background-color:#1f1f1e;color:var(--ink);border-color:#33332f; }
:root:not([data-theme="light"]) dialog, :root:not([data-theme="light"]) .modal { background:#1a1a19;color:var(--ink); }
:root:not([data-theme="light"]) .ar-vbody, :root:not([data-theme="light"]) .ar-frame { background:#141413; }
}
:root[data-theme="dark"] .ibx { background:#0f0f0e; }
:root[data-theme="dark"] .ib-top, :root[data-theme="dark"] .ibx .ib-side, :root[data-theme="dark"] .ibx .ib-thread, :root[data-theme="dark"] .ibx .ib-compose, :root[data-theme="dark"] .ib-pop, :root[data-theme="dark"] .ib-kmenu, :root[data-theme="dark"] .ib-qr, :root[data-theme="dark"] .pm-pop, :root[data-theme="dark"] .ss-pop { background:#1a1a19;color:var(--ink); }
:root[data-theme="dark"] .ib-thread { background:#141413; }
:root[data-theme="dark"] .ibx .ib-msgs { background:#121211; }
:root[data-theme="dark"] .ibx .ib-head { background:linear-gradient(180deg,#132219 0%,#141b22 100%);border-bottom-color:#26302a; }
:root[data-theme="dark"] .ib-metarow { background:#171716;border-bottom-color:#262624; }
:root[data-theme="dark"] .ibx .ib-compose, :root[data-theme="dark"] .ibx .ib-head, :root[data-theme="dark"] .ib-metarow { border-color:#262624; }
:root[data-theme="dark"] .ibx .ib-item.on { background:#262624; }
:root[data-theme="dark"] .ib-item:hover { background:#1f1f1e; }
:root[data-theme="dark"] .ib-search, :root[data-theme="dark"] .ibx .ib-bar textarea { background:#232321;color:var(--ink); }
:root[data-theme="dark"] .ib-ham, :root[data-theme="dark"] .ib-newbtn, :root[data-theme="dark"] .ib-fullbtn, :root[data-theme="dark"] .ib-chips button, :root[data-theme="dark"] .ib-filters2 select, :root[data-theme="dark"] .ib-fbtn, :root[data-theme="dark"] .ib-addtag, :root[data-theme="dark"] .ib-tagmore, :root[data-theme="dark"] .lang-chip, :root[data-theme="dark"] .ib-btngrp { background:#1f1f1e;color:var(--ink-2);border-color:#33332f; }
:root[data-theme="dark"] .ib-btngrp .ib-addtag:hover, :root[data-theme="dark"] .ib-addtag.ib-ico:hover, :root[data-theme="dark"] .ib-ai-pop button:hover { background:#2a2a28; }
:root[data-theme="dark"] .ib-fbtn.on, :root[data-theme="dark"] .ib-fbtn[aria-pressed="true"], :root[data-theme="dark"] .lang-chip.on, :root[data-theme="dark"] .ib-qritem:hover, :root[data-theme="dark"] .ib-qritem.on { background:#12301f;color:#86efac;border-color:#1f7a45; }
:root[data-theme="dark"] .ib-loc { background:#1f1f1e;border-color:#33332f; }
:root[data-theme="dark"] .ib-loc:hover { background:#12301f; }
:root[data-theme="dark"] .ib-langs { border-left-color:#33332f; }
:root[data-theme="dark"] .ib-metarow .ib-sep { background:#33332f; }
:root[data-theme="dark"] .ib-bub { color:#e9edef; }
:root[data-theme="dark"] .ib-msg.in .ib-bub, :root[data-theme="dark"] .ibx .ib-msg.in .ib-bub { background:#202c33; }
:root[data-theme="dark"] .ib-msg.out .ib-bub, :root[data-theme="dark"] .ibx .ib-msg.out .ib-bub { background:#005c4b; }
:root[data-theme="dark"] .ib-msg.bot .ib-bub, :root[data-theme="dark"] .ibx .ib-msg.bot .ib-bub { background:#2a2340; }
:root[data-theme="dark"] .ib-day span, :root[data-theme="dark"] .ibx .ib-day span { background:#232321;color:#aebac1; }
:root[data-theme="dark"] .ib-quote { background:rgba(255,255,255,.06); }
:root[data-theme="dark"] .ib-quote span, :root[data-theme="dark"] .ag-note { color:#aebac1; }
:root[data-theme="dark"] .ag-note { background:rgba(0,0,0,.35); }
:root[data-theme="dark"] .ib-acts button, :root[data-theme="dark"] .ib-reactpop, :root[data-theme="dark"] .ib-reacts { background:#262624;color:var(--ink); }
:root[data-theme="dark"] .ib-replybar { background:#232321; }
:root[data-theme="dark"] .ib-note { background:#3a3214;color:#fde68a; }
:root[data-theme="dark"] .ib-notebub, :root[data-theme="dark"] .ib-notepop { background:#2b2611;border-color:#6b5a1e;color:#fef3c7; }
:root[data-theme="dark"] .ib-notepop textarea, :root[data-theme="dark"] .ib-compose.note-mode .ib-bar textarea { background:#1f1c0f;border-color:#6b5a1e;color:var(--ink); }
:root[data-theme="dark"] .ib-notebtn.on { background:#3a3214 !important;border-color:#6b5a1e !important; }
:root[data-theme="dark"] .ib-notebub.act, :root[data-theme="dark"] .ib-actpop { background:#221d33;border-color:#4c3f7a;color:#ede9fe; }
:root[data-theme="dark"] .ib-actpop input, :root[data-theme="dark"] .ib-actpop select, :root[data-theme="dark"] .ib-actpop textarea { background:#191527;border-color:#4c3f7a;color:var(--ink); }
:root[data-theme="dark"] .ib-notebub.task, :root[data-theme="dark"] .ib-taskpop { background:#0f2925;border-color:#1f6b60;color:#ccfbf1; }
:root[data-theme="dark"] .ib-taskpop input, :root[data-theme="dark"] .ib-taskpop select, :root[data-theme="dark"] .ib-taskpop textarea { background:#0b1f1c;border-color:#1f6b60;color:var(--ink); }
:root[data-theme="dark"] .ib-wait { background:#3a2a0a;color:#fcd34d; }
:root[data-theme="dark"] .ib-wait.late, :root[data-theme="dark"] .ib-dup { background:#3b1414;color:#fca5a5; }
:root[data-theme="dark"] .ib-st.pending { background:#3a2f0a;color:#fde68a; }
:root[data-theme="dark"] .ib-status.st-open { background:#12301f;border-color:#1f7a45; }
:root[data-theme="dark"] .ib-status.st-pending { background:#33300f;border-color:#6b5a1e; }
:root[data-theme="dark"] .ib-dupwarn, :root[data-theme="dark"] .ib-recbox { background:#2e1212;border-color:#7f1d1d;color:#fca5a5; }
:root[data-theme="dark"] .crm-row { background:#1f1f1e;border-color:#33332f;color:var(--ink); }
:root[data-theme="dark"] .crm-row:hover, :root[data-theme="dark"] .cs-link:hover td { background:#12301f; }
:root[data-theme="dark"] .crm-type { background:#23264a;color:#c7d2fe; }
:root[data-theme="dark"] .crm-type.t-lead { background:#3a2f0a;color:#fde68a; }
:root[data-theme="dark"] .crm-type.t-company { background:#0c2a3d;color:#bae6fd; }
:root[data-theme="dark"] .crm-type.t-deal, :root[data-theme="dark"] .crm-type.t-task { background:#12301f;color:#86efac; }
:root[data-theme="dark"] .crm-type.t-task.s-5 { background:#262624;color:#94a3b8; }
:root[data-theme="dark"] .task-row.late .crm-type { background:#3b1414;color:#fca5a5; }
:root[data-theme="dark"] .ib-company { background:#1e2148;border-color:#3b3f8f;color:#c7d2fe; }
:root[data-theme="dark"] .ib-company:hover { background:#262a5c; }
:root[data-theme="dark"] .ib-company-l { color:#a5b4fc; }
:root[data-theme="dark"] .crm-group { background:#1a1a19; }
:root[data-theme="dark"] .cs-tile, :root[data-theme="dark"] .cs-facts, :root[data-theme="dark"] .cs-table th { background:#1f1f1e;border-color:#33332f; }
:root[data-theme="dark"] .cs-tile.q { background:#0f1d33;border-color:#1e3a8a; }
:root[data-theme="dark"] .cs-tile.o { background:#2b2611;border-color:#6b5a1e; }
:root[data-theme="dark"] .cs-tile.w { background:#0f2a1a;border-color:#166534; }
:root[data-theme="dark"] .cs-tile.l { background:#2e1212;border-color:#7f1d1d; }
:root[data-theme="dark"] .cs-tile.i { background:#1e1a33;border-color:#4c3f7a; }
:root[data-theme="dark"] .cs-table td { border-bottom-color:#262624; }
:root[data-theme="dark"] .wa-bubble { background:#262624;color:#e9edef; }
:root[data-theme="dark"] .ib-ai-out { background:#14261b; }
:root[data-theme="dark"] .tag-col { border-color:#1a1a19; }
:root[data-theme="dark"] .ag-chat, :root[data-theme="dark"] .bot-preview { background:#141413; }
:root[data-theme="dark"] input, :root[data-theme="dark"] select, :root[data-theme="dark"] textarea { background-color:#1f1f1e;color:var(--ink);border-color:#33332f; }
:root[data-theme="dark"] dialog, :root[data-theme="dark"] .modal { background:#1a1a19;color:var(--ink); }
:root[data-theme="dark"] .ar-vbody, :root[data-theme="dark"] .ar-frame { background:#141413; }

/* Sohbet çevirisi */
.ib-trsel { height: 38px; border-radius: 10px; border: 1px solid var(--border); background: #fff; font: inherit; font-size: 13px; padding: 0 8px; width: auto; max-width: 170px; cursor: pointer; }
.ib-trsel.on { border-color: #16a34a; background: #ecfdf3; color: #166534; font-weight: 600; }
.ib-trtoggle { display: block; margin-top: 3px; border: 0; background: none; padding: 0; font: inherit; font-size: 11px; color: #0e7490; cursor: pointer; }
.ib-trtoggle:hover { text-decoration: underline; }
.ib-trwait { display: block; margin-top: 3px; font-size: 11px; color: var(--muted); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .ib-trsel { background: #1f1f1e; color: var(--ink); border-color: #33332f; } :root:not([data-theme="light"]) .ib-trsel.on { background: #12301f; color: #86efac; } :root:not([data-theme="light"]) .ib-trtoggle { color: #67e8f9; } }
:root[data-theme="dark"] .ib-trsel { background: #1f1f1e; color: var(--ink); border-color: #33332f; } :root[data-theme="dark"] .ib-trsel.on { background: #12301f; color: #86efac; } :root[data-theme="dark"] .ib-trtoggle { color: #67e8f9; }

@media (prefers-color-scheme: dark) {
:root:not([data-theme="light"]) body:not(.panel-mode) .topbar, :root:not([data-theme="light"]) .topbar { background:linear-gradient(180deg,#10261a 0%,#0f1f17 100%);border-bottom-color:#1f3a2b; }
:root:not([data-theme="light"]) body:not(.panel-mode) .tabs button:hover { background:rgba(255,255,255,.07); }
:root:not([data-theme="light"]) body:not(.panel-mode) .tabs button[aria-selected="true"] { background:rgba(255,255,255,.10); }
:root:not([data-theme="light"]) body:not(.panel-mode) #panelBtn { background:#1f1f1e; }
:root:not([data-theme="light"]) .credit-badge { background:linear-gradient(135deg,#3a2f0a,#2b2611);border-color:#6b5a1e;color:#fde68a; }
}
:root[data-theme="dark"] body:not(.panel-mode) .topbar, :root[data-theme="dark"] .topbar { background:linear-gradient(180deg,#10261a 0%,#0f1f17 100%);border-bottom-color:#1f3a2b; }
:root[data-theme="dark"] body:not(.panel-mode) .tabs button:hover { background:rgba(255,255,255,.07); }
:root[data-theme="dark"] body:not(.panel-mode) .tabs button[aria-selected="true"] { background:rgba(255,255,255,.10); }
:root[data-theme="dark"] body:not(.panel-mode) #panelBtn { background:#1f1f1e; }
:root[data-theme="dark"] .credit-badge { background:linear-gradient(135deg,#3a2f0a,#2b2611);border-color:#6b5a1e;color:#fde68a; }

@media (prefers-color-scheme: dark) {
:root:not([data-theme="light"]) body { background:var(--page); }
:root:not([data-theme="light"]) .banner { background:var(--surface); }
:root:not([data-theme="light"]) .pay-box, :root:not([data-theme="light"]) .pcard, :root:not([data-theme="light"]) .pc-pack, :root:not([data-theme="light"]) .pb-months button.on { background:var(--surface); }
}
:root[data-theme="dark"] body { background:var(--page); }
:root[data-theme="dark"] .banner { background:var(--surface); }
:root[data-theme="dark"] .pay-box, :root[data-theme="dark"] .pcard, :root[data-theme="dark"] .pc-pack, :root[data-theme="dark"] .pb-months button.on { background:var(--surface); }

/* Yapıştırma / sürükle-bırak */
.ib-chip { display: inline-flex; align-items: center; gap: 8px; }
.ib-chipimg { width: 44px; height: 44px; object-fit: cover; border-radius: 8px; border: 1px solid var(--border); }
#ibThread.ib-drop { outline: 3px dashed #16a34a; outline-offset: -8px; }
#ibThread.ib-drop::after { content: 'Dosyayı bırakın, sohbete eklensin'; position: absolute; inset: 8px; display: grid; place-items: center; background: rgba(22,163,74,.10); color: #15803d; font-weight: 800; font-size: 18px; border-radius: 14px; pointer-events: none; z-index: 20; }
#ibThread { position: relative; }

/* ---- Daraltılabilir sol menü (yalnız panel / masaüstü uygulaması) ---- */
.nav-collapse { display: none; }
.panel-mode .nav-collapse { display: grid; place-items: center; position: absolute; top: 18px; right: 10px; width: 28px; height: 28px; border-radius: 8px; border: 1px solid var(--border); background: var(--surface); color: var(--ink-2); cursor: pointer; font-size: 15px; font-weight: 800; z-index: 2; }
.panel-mode .nav-collapse:hover { color: var(--accent); border-color: var(--accent); }
.panel-mode .topbar { position: sticky; }
body.side-on.panel-mode.nav-mini { grid-template-columns: 68px minmax(0, 1fr); }
body.side-on.nav-mini .topbar { padding: 18px 8px; overflow: visible; }
body.side-on.nav-mini .topbar .brand { justify-content: center; padding: 0 0 26px; }
body.side-on.nav-mini .topbar .brand .word, body.side-on.nav-mini .tab-caret, body.side-on.nav-mini .tab-soon, body.side-on.nav-mini #sideUser, body.side-on.nav-mini #panelBtn, body.side-on.nav-mini #logoutBtn { display: none !important; }
body.side-on.nav-mini .nav-collapse { top: 52px; right: 50%; transform: translateX(50%); }
body.side-on.nav-mini .tabs button, body.side-on.nav-mini .tabs .tab-gtoggle { font-size: 0 !important; justify-content: center; padding: 10px 0 !important; position: relative; }
body.side-on.nav-mini .tabs .ti { font-size: 18px; margin: 0; }
body.side-on.nav-mini .tab-sub { padding-left: 0 !important; margin-left: 0 !important; border-left: 0 !important; }
body.side-on.nav-mini .tab-badge { position: absolute; top: 2px; right: 6px; font-size: 10px !important; min-width: 16px; padding: 0 4px; }
body.side-on.nav-mini .tabs button[title], body.side-on.nav-mini .tabs button { overflow: visible; }

/* ---- Daraltılmış sohbet listesi: yalnız resimler ---- */
.ib-minibtn { font-size: 15px; font-weight: 800; }
body.ib-mini .inbox, body.ib-mini .ibx .inbox { grid-template-columns: 78px minmax(0, 1fr); }
body.ib-mini .ib-side .ib-titlerow h2, body.ib-mini .ib-side #ibNew, body.ib-mini .ib-side #ibContactNew, body.ib-mini .ib-side .ib-search, body.ib-mini .ib-side .ib-chips, body.ib-mini .ib-side .ib-filters2, body.ib-mini .ib-side .ib-meta { display: none !important; }
body.ib-mini .ib-side .ib-titlerow { justify-content: center; }
body.ib-mini .ib-item { justify-content: center; padding: 8px 0 !important; position: relative; grid-template-columns: 1fr !important; }
body.ib-mini .ib-item[data-unread]::after { content: attr(data-unread); position: absolute; top: 4px; right: 8px; background: #25d366; color: #fff; font-size: 10px; font-weight: 800; border-radius: 999px; min-width: 16px; padding: 0 4px; text-align: center; line-height: 16px; }
body.ib-mini .ib-item.on { box-shadow: inset 3px 0 0 var(--accent); }
@media (max-width: 760px) { body.ib-mini .inbox, body.ib-mini .ibx .inbox { grid-template-columns: 1fr; } .nav-collapse { display: none !important; } }
body.side-on.nav-mini .credit-badge { padding: 5px 6px; justify-content: center; } body.side-on.nav-mini .credit-badge > span:not(.cb-ic) { display: none; } body.side-on.nav-mini .credit-badge b { font-size: 11px; }
.ib-ham[aria-pressed="true"] { border-color: var(--accent); color: var(--accent); }

/* Ayarlar → Masaüstü uygulaması */
.desk-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; margin: 10px 0; }
.desk-dl { display: grid; gap: 4px; justify-items: start; text-align: left; padding: 16px; border: 1px solid var(--border); border-radius: 14px; background: var(--surface); color: var(--ink); text-decoration: none; font: inherit; cursor: pointer; transition: border-color .15s, transform .15s; }
.desk-dl:hover { border-color: var(--accent); transform: translateY(-2px); }
.desk-dl.rec { border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 15%, transparent); }
.desk-os { font-size: 28px; line-height: 1; }
.desk-dl b { font-size: 15px; } .desk-dl small { color: var(--muted); }
.desk-btn { margin-top: 8px; background: var(--accent); color: var(--accent-ink); font-weight: 700; border-radius: 10px; padding: 6px 14px; font-size: 13.5px; }
.desk-help summary { cursor: pointer; font-weight: 600; color: var(--accent); }
.desk-help ol { margin: 8px 0 0; padding-left: 20px; display: grid; gap: 6px; color: var(--ink-2); }

/* Düğme satırı: solda ekleme, sağda CRM kayıtları */
.ib-metarow { justify-content: space-between; }
.ib-metaright { display: flex; align-items: center; gap: 8px; margin-left: auto; flex-wrap: wrap; justify-content: flex-end; }
.crm-type.t-act { background: #f5f3ff; color: #6d28d9; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .crm-type.t-act { background: #221d33; color: #ddd6fe; } }
:root[data-theme="dark"] .crm-type.t-act { background: #221d33; color: #ddd6fe; }

/* CRM kaydı rengi (sohbet listesi ve başlık): yeşil = kayıtlı, açık kırmızı = kayıt yok — iki temada da hafif */
/* Kart rengi = sohbet durumu (CRM'de kayıtlıysa); kayıtlı değilse beyaz — iki temada da hafif */
/* Kart rengi = sohbet durumu: soldaki çizgi + profil resminden sağa doğru beyaza solan hafif renk */
.ib-item.tone-open { background: linear-gradient(90deg, rgba(59, 130, 246, .22) 0, rgba(59, 130, 246, .12) 44px, rgba(59, 130, 246, 0) 76px), var(--surface, #fff) !important; box-shadow: inset 3px 0 0 rgba(37, 99, 235, .7); }
.ib-item.tone-open:hover, .ib-item.tone-open.on { background: linear-gradient(90deg, rgba(59, 130, 246, .32) 0, rgba(59, 130, 246, .16) 48px, rgba(59, 130, 246, 0) 82px), var(--surface-2, #f8fafc) !important; }
.ib-item.tone-pending { background: linear-gradient(90deg, rgba(234, 179, 8, .22) 0, rgba(234, 179, 8, .12) 44px, rgba(234, 179, 8, 0) 76px), var(--surface, #fff) !important; box-shadow: inset 3px 0 0 rgba(202, 138, 4, .8); }
.ib-item.tone-pending:hover, .ib-item.tone-pending.on { background: linear-gradient(90deg, rgba(234, 179, 8, .32) 0, rgba(234, 179, 8, .16) 48px, rgba(234, 179, 8, 0) 82px), var(--surface-2, #f8fafc) !important; }
.ib-item.tone-crisis { background: linear-gradient(90deg, rgba(239, 68, 68, .22) 0, rgba(239, 68, 68, .12) 44px, rgba(239, 68, 68, 0) 76px), var(--surface, #fff) !important; box-shadow: inset 3px 0 0 rgba(220, 38, 38, .85); }
.ib-item.tone-crisis:hover, .ib-item.tone-crisis.on { background: linear-gradient(90deg, rgba(239, 68, 68, .32) 0, rgba(239, 68, 68, .16) 48px, rgba(239, 68, 68, 0) 82px), var(--surface-2, #f8fafc) !important; }
.ib-item.tone-resolved { background: linear-gradient(90deg, rgba(34, 197, 94, .22) 0, rgba(34, 197, 94, .12) 44px, rgba(34, 197, 94, 0) 76px), var(--surface, #fff) !important; box-shadow: inset 3px 0 0 rgba(22, 163, 74, .7); }
.ib-item.tone-resolved:hover, .ib-item.tone-resolved.on { background: linear-gradient(90deg, rgba(34, 197, 94, .32) 0, rgba(34, 197, 94, .16) 48px, rgba(34, 197, 94, 0) 82px), var(--surface-2, #f8fafc) !important; }
.ib-item.tone-none { background: var(--surface, #fff) !important; box-shadow: inset 0 0 0 1px var(--border); }
.ib-item.tone-none:hover, .ib-item.tone-none.on { background: var(--surface-2) !important; }
.ib-item.on { outline: 1px solid rgba(100, 116, 139, .3); }
.ib-head.tone-open { background: linear-gradient(180deg, rgba(59, 130, 246, .12) 0%, rgba(59, 130, 246, .03) 100%) !important; }
.ib-head.tone-pending { background: linear-gradient(180deg, rgba(234, 179, 8, .16) 0%, rgba(234, 179, 8, .04) 100%) !important; }
.ib-head.tone-crisis { background: linear-gradient(180deg, rgba(239, 68, 68, .15) 0%, rgba(239, 68, 68, .04) 100%) !important; }
.ib-head.tone-resolved { background: linear-gradient(180deg, rgba(34, 197, 94, .13) 0%, rgba(34, 197, 94, .04) 100%) !important; }
.ib-head.tone-none { background: var(--surface, #fff) !important; }
/* Kayıtlı olmayan kartta "CRM'e kaydet" */
.ib-row-crm { display: block; margin-top: 3px; }
.ib-crmsave-mini { display: inline-block; font-size: 11.5px; font-weight: 700; color: #15803d; border: 1px dashed #16a34a; border-radius: 99px; padding: 1px 8px; cursor: pointer; }
.ib-crmsave-mini:hover { background: rgba(22, 163, 74, .1); }
.ib-crmsave { color: #be123c !important; font-weight: 600; }
.ib-crmsave:hover { background: rgba(244, 63, 94, .1) !important; }
.ib-coadd { color: #1d4ed8 !important; }
.cp-sug { max-height: 180px; margin-top: 0; }
/* Başlık daraltma düğmesi ve daraltılmış başlık: resim + isim + simgeler */
.ib-headmini { width: 30px; height: 30px; border-radius: 8px; border: 1px solid var(--border); background: transparent; color: var(--ink-2); cursor: pointer; font-size: 15px; line-height: 1; flex: none; }
.ib-headmini:hover { border-color: #16a34a; color: #16a34a; }
.inbox.head-mini .ib-head { padding-top: 6px !important; padding-bottom: 6px !important; }
.inbox.head-mini .ib-head .ib-av.big { width: 34px !important; height: 34px !important; }
.inbox.head-mini .ib-title > .muted.small, .inbox.head-mini #ibHeadLine, .inbox.head-mini .ib-hr-lbl { display: none !important; }
.inbox.head-mini .ib-headright { gap: 2px; }
.inbox.head-mini .ib-metarow { padding-top: 4px !important; padding-bottom: 4px !important; }
.inbox.head-mini .ib-metarow .ib-lbl { display: none; }
.inbox.head-mini .ib-metarow .ib-btngrp button, .inbox.head-mini .ib-metarow .ib-metaright > button { padding-left: 9px; padding-right: 9px; }
/* Daraltılmış başlık: sorumlu ve durum yan yana, yalnız simge (seçim ipucunda) */
.inbox.head-mini .ib-headright { display: flex; align-items: center; gap: 6px; min-width: 0; }
.inbox.head-mini .ib-hr-row { display: block; }
.inbox.head-mini .ib-headright .ib-assign, .inbox.head-mini .ib-headright .ib-status { width: 46px !important; min-width: 46px; padding-left: 8px; padding-right: 2px; overflow: hidden; white-space: nowrap; text-overflow: clip; }
.inbox.head-mini .ib-headright .ib-hr-val { display: inline-block; max-width: 28px; overflow: hidden; white-space: nowrap; vertical-align: middle; }
.pay-contact { border: 1px dashed var(--border); border-radius: 12px; padding: 10px 12px; }
.pay-contact p { margin: 0 0 8px; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
@media (max-width: 560px) { .row2 { grid-template-columns: 1fr; } }
.pc-save.promo { background: #fee2e2 !important; color: #b91c1c !important; }
/* Mobil uygulama: kodla giriş, telefona bağla, çentikli ekranlar */
.pair-form .or { display: flex; align-items: center; gap: 10px; color: var(--ink-3, #64748b); font-size: 13px; }
.pair-form .or::before, .pair-form .or::after { content: ''; flex: 1; border-top: 1px solid var(--border); }
.pair-form input[name="code"] { font: 600 20px/1.2 ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .12em; text-transform: uppercase; text-align: center; }
.pair-box { display: flex; gap: 16px; align-items: flex-start; flex-wrap: wrap; }
.pair-box img { border-radius: 12px; background: #fff; padding: 6px; border: 1px solid var(--border); flex: none; }
.pair-steps { margin: 0; padding-left: 20px; display: grid; gap: 6px; flex: 1; min-width: 220px; font-size: 14px; }
.pair-code-li { list-style: none; margin-left: -20px; }
.pair-code { font: 700 26px/1.2 ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .14em; background: #f0fdf4; color: #166534; border: 1px dashed #16a34a; border-radius: 10px; padding: 6px 12px; display: inline-block; user-select: all; }
:root[data-theme="dark"] .pair-code { background: #12301f; color: #86efac; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .pair-code { background: #12301f; color: #86efac; } }
body.app-window { padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left); }
body.app-window #panelLogin { margin-top: 8vh; }
/* Yönetim · AI harcaması */
.ais-bal-main { display: flex; gap: 16px; align-items: flex-end; justify-content: space-between; flex-wrap: wrap; }
.ais-bal-val { font-size: 34px; font-weight: 800; color: #15803d; letter-spacing: -.02em; }
.ais-bal-val.low { color: #dc2626; }
.ais-bars { display: flex; align-items: flex-end; gap: 4px; height: 160px; padding-top: 8px; overflow-x: auto; }
.ais-bar { flex: 1 0 18px; max-width: 42px; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 4px; }
.ais-bar-fill { width: 100%; background: linear-gradient(180deg, #22c55e, #15803d); border-radius: 5px 5px 2px 2px; min-height: 2px; }
.ais-bar small { font-size: 10px; color: var(--ink-3, #64748b); white-space: nowrap; }
/* Mobil uygulama (Android / iOS kabuğu): alt sekme çubuğu, çentik ve sistem çubukları */
.native-nav { display: none; }
body.native-app { padding: env(safe-area-inset-top) env(safe-area-inset-right) 0 env(safe-area-inset-left); }
body.native-app .native-nav { display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 50; background: var(--surface, #fff); border-top: 1px solid var(--border); padding: 4px 6px calc(4px + env(safe-area-inset-bottom)); }
body.native-app .native-nav button { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 1px; border: 0; background: none; font: 600 11.5px/1.2 inherit; color: var(--ink-3, #64748b); padding: 6px 0; border-radius: 12px; cursor: pointer; }
body.native-app .native-nav button span { font-size: 21px; line-height: 1.1; }
body.native-app .native-nav button[aria-current="true"] { color: #15803d; background: rgba(22, 163, 74, .09); }
body.native-app main { padding-bottom: calc(64px + env(safe-area-inset-bottom)) !important; }
body.native-app .ibx .inbox { height: calc(var(--vh, 100dvh) - 64px - env(safe-area-inset-top) - env(safe-area-inset-bottom)) !important; }
/* Masaüstündeki en küçük yükseklik (520px) telefonda klavye açılınca sohbet alanını klavyenin altına taşırıyordu: yazı kutusu görünmüyordu (28.11.2026) */
body.mobile .ibx .inbox, body.native-app .ibx .inbox { min-height: 0; }
/* Uygulamada sohbet alanı ana ekran çizgisi payını zaten bırakıyor (fitNative); yazı çubuğu payı ikinci kez eklemesin */
body.native-app .ibx .ib-compose { padding-bottom: 6px !important; }
/* Sohbet açıkken sekme çubuğu gizlenir (WhatsApp gibi), yazma alanı ekranın altına iner */
body.native-app:has(.inbox.thread-open):not(.report-mode) .native-nav { display: none; }
body.native-app:has(.inbox.thread-open):not(.report-mode) main { padding-bottom: env(safe-area-inset-bottom) !important; }
body.native-app:has(.inbox.thread-open):not(.report-mode) .ibx .inbox { height: calc(var(--vh, 100dvh) - env(safe-area-inset-top) - env(safe-area-inset-bottom)) !important; }
body.native-app #ibPhone, body.native-app #ibInstall, body.native-app #ibFull { display: none !important; }
/* Telefon uygulaması: listenin altındaki şerit (bağlantı seçimi, ses, çeviri, görünüm, tema) yok; hepsi ⋯ Ayarlar'da */
body.native-app .ib-sidefoot { display: none !important; }
body.native-app .native-nav button[hidden] { display: none; }
body.native-app.report-mode main { padding-left: 12px !important; padding-right: 12px !important; }
/* Tam ekran pencereler saat / durum çubuğunun altına girmesin */
body.native-app dialog[open] { padding-top: calc(env(safe-area-inset-top) + 12px); padding-bottom: calc(env(safe-area-inset-bottom) + 12px); }
.native-prefs select { width: 100%; min-height: 40px; }
.native-prefs > button { text-align: left; }
:root[data-theme="dark"] body.native-app .native-nav { background: #1a1a19; border-color: #2a2a28; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) body.native-app .native-nav { background: #1a1a19; border-color: #2a2a28; } }
/* Uygulama (NATIVE) dokunma davranışı — WhatsApp gibi: mesaj düğmeleri basılı tutunca menüde, dokunma geri bildirimi,
   sohbet sağdan kayarak açılır, kenardan kaydırınca geri (touchUi). Web'deki gri dokunma kutusu, çift dokunmada büyütme yok. */
body.native-app { -webkit-tap-highlight-color: transparent; overscroll-behavior: none; }
body.native-app button, body.native-app a, body.native-app .ib-item, body.native-app .native-nav { touch-action: manipulation; }
body.native-app .ib-acts, body.native-app .ib-msg.tapped .ib-acts { display: none !important; }
body.native-app .ib-msg { max-width: 86%; }
body.native-app .ib-msg, body.native-app .ib-item, body.native-app .native-nav, body.native-app .ib-head, body.native-app .ib-tools { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
body.native-app .ib-item:active { background: var(--surface-2, #f1f2f4); }
body.native-app .native-nav button:active, body.native-app .ib-head button:active, body.native-app .ib-bar button:active { transform: scale(.92); transition: transform .08s; }
body.native-app .inbox.thread-open .ib-thread { animation: cpSlideIn .2s ease-out; }
body.native-app .inbox:not(.thread-open) .ib-side { animation: cpFadeIn .15s ease-out; }
body.native-app .ib-bub { transition: transform .18s; }
body.native-app .bxm-menu .bxm-msheet { animation: cpSheetUp .18s ease-out; }
@keyframes cpSlideIn { from { transform: translateX(40%); opacity: .4; } to { transform: none; opacity: 1; } }
@keyframes cpFadeIn { from { opacity: .5; } to { opacity: 1; } }
@keyframes cpSheetUp { from { transform: translateY(40px); opacity: .5; } to { transform: none; opacity: 1; } }
@media (prefers-reduced-motion: reduce) { body.native-app .inbox.thread-open .ib-thread, body.native-app .inbox:not(.thread-open) .ib-side, body.native-app .bxm-menu .bxm-msheet { animation: none; } }
a.btn.primary { display: inline-flex; align-items: center; gap: 6px; background: var(--accent); color: var(--accent-ink); border-radius: 8px; padding: 9px 14px; font-weight: 600; text-decoration: none; }
a.btn.primary:hover { filter: brightness(1.06); }
/* Canlı Monitör */
.mon-head { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; flex-wrap: wrap; }
.mon-head h1 { margin: 0; }
#monStamp { margin: 2px 0 0; }
.mon-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 10px; margin-bottom: 12px; }
.mon-tile { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 12px 14px; }
.mon-tile-l { font-size: 13px; color: var(--ink-2); font-weight: 600; }
.mon-tile-v { font-size: 32px; font-weight: 800; letter-spacing: -.02em; line-height: 1.15; margin-top: 4px; }
.mon-tile-s { font-size: 12px; color: var(--ink-3, #64748b); margin-top: 2px; }
.mon-tile.on .mon-tile-v { color: #16a34a; }
.mon-tile.warn .mon-tile-v { color: #d97706; }
.mon-tile.won { background: linear-gradient(180deg, rgba(34,197,94,.14), rgba(34,197,94,.04)); border-color: rgba(22,163,74,.35); }
.mon-tile.won .mon-tile-v { color: #15803d; }
.mon-tile.lost { background: linear-gradient(180deg, rgba(244,63,94,.12), rgba(244,63,94,.03)); border-color: rgba(225,29,72,.3); }
.mon-tile.lost .mon-tile-v { color: #be123c; }
.mon-grid { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 12px; }
@media (max-width: 900px) { .mon-grid { grid-template-columns: 1fr; } }
.mon-side { display: grid; gap: 12px; align-content: start; }
.mon-feed { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; max-height: 70vh; overflow: auto; }
.mon-ev { display: flex; gap: 10px; align-items: flex-start; padding: 8px 10px; border-radius: 10px; border: 1px solid var(--border); }
.mon-ev-ic { font-size: 20px; line-height: 1.2; }
.mon-ev-b { flex: 1; min-width: 0; }
.mon-ev-b small { display: block; color: var(--ink-3, #64748b); }
.mon-ev-b a { color: inherit; }
.mon-ev-t { font-size: 12px; color: var(--ink-3, #64748b); white-space: nowrap; }
.mon-ev.won { background: rgba(34,197,94,.12); border-color: rgba(22,163,74,.4); }
.mon-ev.lost { background: rgba(244,63,94,.09); border-color: rgba(225,29,72,.35); }
.mon-ev.lead { border-left: 3px solid #2563eb; }
.mon-ev.deal { border-left: 3px solid #7c3aed; }
.mon-ev.fresh { animation: monFresh 2.4s ease-out 2; }
@keyframes monFresh { 0% { box-shadow: 0 0 0 0 rgba(22,163,74,.55); } 100% { box-shadow: 0 0 0 12px rgba(22,163,74,0); } }
.mon-alert { display: flex; gap: 14px; align-items: center; padding: 16px 20px; border-radius: 16px; margin-bottom: 12px; font-size: 18px; animation: monPop .5s ease-out; }
.mon-alert b { font-size: 22px; }
.mon-alert small { opacity: .8; font-size: 14px; }
.mon-alert-ic { font-size: 44px; }
.mon-alert.won { background: linear-gradient(135deg, #16a34a, #22c55e); color: #fff; }
.mon-alert.lost { background: linear-gradient(135deg, #be123c, #f43f5e); color: #fff; }
.mon-alert.lead, .mon-alert.deal { background: #eff6ff; color: #1e3a8a; border: 1px solid #bfdbfe; }
@keyframes monPop { 0% { transform: scale(.96); opacity: 0; } 60% { transform: scale(1.02); opacity: 1; } 100% { transform: scale(1); } }
.mon-bars { display: grid; gap: 6px; }
.mon-bar { display: grid; grid-template-columns: minmax(0, 1fr) minmax(60px, 1.2fr) auto; gap: 8px; align-items: center; font-size: 13.5px; }
.mon-bar-l { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mon-bar-t { height: 8px; background: var(--surface-2); border-radius: 99px; overflow: hidden; }
.mon-bar-t span { display: block; height: 100%; background: linear-gradient(90deg, #22c55e, #15803d); border-radius: 99px; }
.mon-people { display: flex; flex-wrap: wrap; gap: 6px; }
.mon-person { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 99px; background: var(--surface-2); font-size: 13px; }
.mon-person i { width: 8px; height: 8px; border-radius: 50%; background: #22c55e; box-shadow: 0 0 0 3px rgba(34,197,94,.2); }
/* TV / duvar ekranı */
body.mon-full .topbar, body.mon-full .native-nav { display: none !important; }
body.mon-full, body.panel-mode.mon-full, body.live-mode.panel-mode { display: block !important; } /* menü gizlenince içerik dar menü sütununa düşmesin */
body.mon-full main { max-width: none !important; width: 100% !important; padding: 16px 20px !important; }
body.mon-full .mon-tile-v { font-size: 44px; }
body.mobile .mon-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
body.mobile .mon-tile-v { font-size: 26px; }
/* Sohbet listesi: sağa çek / çift tıkla → hızlı işlemler */
.ib-list { position: relative; overflow-x: hidden; }
.ib-item.dragging, .ib-item.dragging * { user-select: none; cursor: grabbing; }
.ib-item { transition: transform .18s ease; touch-action: pan-y; }
.ib-item.dragging { transition: none; }
.ib-item.swiped { position: relative; z-index: 2; box-shadow: -6px 0 14px rgba(15, 23, 42, .12); }
.ib-swipe { position: absolute; left: 8px; width: 250px; z-index: 1; display: flex; gap: 2px; align-items: stretch; padding: 2px 0; animation: ibSwIn .18s ease-out; }
@keyframes ibSwIn { from { opacity: 0; } to { opacity: 1; } }
.ib-sw-btn { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; border: 0; border-radius: 12px; padding: 4px 2px; color: #fff; font: 600 10.5px/1.15 inherit; cursor: pointer; min-width: 0; }
.ib-sw-btn span { font-size: 19px; line-height: 1; }
.ib-sw-btn small { font-size: 10.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.ib-sw-btn.done { background: #16a34a; }
.ib-sw-btn.open { background: #0ea5e9; }
.ib-sw-btn.wait { background: #d97706; }
.ib-sw-btn.fav { background: #f59e0b; }
.ib-sw-btn.arch { background: #64748b; }
.ib-sw-btn.stats { background: #6366f1; }
.ib-sw-btn:hover { filter: brightness(1.08); }
body.ib-mini .ib-swipe { display: none; }
/* Müşteri kartı (profil resmine tıklayınca) */
.ib-av-click { cursor: zoom-in; }
.ib-av-click:hover { filter: brightness(1.05); box-shadow: 0 0 0 3px rgba(22, 163, 74, .35); }
.cust-card { width: min(860px, calc(100vw - 24px)); max-height: calc(100vh - 32px); }
.cc-top { display: flex; gap: 22px; align-items: center; flex-wrap: wrap; margin-bottom: 14px; }
.cc-photo { position: relative; width: 220px; height: 220px; border-radius: 50%; overflow: hidden; flex: none; background: linear-gradient(135deg, #22c55e, #15803d); display: grid; place-items: center; box-shadow: 0 0 0 4px #25d366, 0 12px 34px rgba(15, 23, 42, .2); }
.cc-photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; cursor: zoom-in; }
.cc-ini { color: #fff; font-size: 72px; font-weight: 800; }
.cc-id { flex: 1; min-width: 240px; display: grid; gap: 8px; }
.cc-id h3 { margin: 0; font-size: 26px; }
.cc-post { color: var(--ink-2); font-weight: 600; }
.cc-chips { display: flex; gap: 6px; flex-wrap: wrap; }
.cc-chip { font-size: 12.5px; padding: 3px 10px; border-radius: 99px; background: var(--surface-2); border: 1px solid var(--border); }
.cc-chip.yes { background: rgba(34, 197, 94, .12); border-color: rgba(22, 163, 74, .35); color: #166534; }
.cc-chip.no { background: rgba(244, 63, 94, .1); border-color: rgba(225, 29, 72, .3); color: #be123c; }
.cc-acts { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 8px; margin-bottom: 14px; }
.cc-act { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 10px 6px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); cursor: pointer; font: inherit; color: inherit; }
.cc-act span { font-size: 22px; line-height: 1; }
.cc-act small { font-size: 12px; font-weight: 600; }
.cc-act:hover { border-color: #16a34a; background: rgba(22, 163, 74, .06); }
.cc-act.done { border-color: rgba(22, 163, 74, .45); }
.cc-body { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
@media (max-width: 760px) { .cc-body { grid-template-columns: 1fr; } }
.cc-sec h4 { margin: 0 0 6px; font-size: 14px; }
.cc-grid { display: grid; border: 1px solid var(--border); border-radius: 12px; overflow: hidden; }
.cc-row { display: grid; grid-template-columns: 130px minmax(0, 1fr); gap: 10px; padding: 8px 12px; border-bottom: 1px solid var(--border); font-size: 14px; align-items: center; }
.cc-row:last-child { border-bottom: 0; }
.cc-row > span { color: var(--ink-3, #64748b); font-size: 13px; }
.cc-row > div { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; overflow-wrap: anywhere; font-weight: 600; }
.cc-copy { padding: 2px 6px !important; }
.cc-link { font-size: 12.5px; font-weight: 600; text-decoration: none; color: #15803d; border: 1px solid var(--border); border-radius: 8px; padding: 2px 8px; }
.cc-foot { grid-column: 1 / -1; flex-wrap: wrap; gap: 8px; margin-top: 4px; }
@media (max-width: 560px) { .cc-photo { width: 140px; height: 140px; } .cc-row { grid-template-columns: 1fr; gap: 2px; } }
/* Sohbet listesi: Arşivlenmiş satırı */
.ib-arch-row { display: flex; align-items: center; gap: 12px; width: calc(100% - 16px); margin: 2px 8px 4px; padding: 10px 12px; border: 0; border-radius: 14px; background: none; cursor: pointer; font: inherit; color: inherit; text-align: left; }
.ib-arch-row:hover { background: var(--surface-2); }
.ib-arch-row b { flex: 1; font-weight: 700; }
.ib-arch-ic { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-2); font-size: 18px; flex: none; }
.ib-arch-n { color: #15803d; font-weight: 700; font-size: 13px; }
.ib-arch-row.back { background: var(--surface-2); }
.ib-arch-row.back b { flex: none; }
/* Listede profil resmi önizlemesi */
.ib-avprev { position: fixed; z-index: 90; width: 250px; background: var(--surface); border: 1px solid var(--border); border-radius: 18px; box-shadow: 0 16px 40px rgba(15, 23, 42, .22); padding: 12px; display: grid; gap: 4px; justify-items: center; text-align: center; pointer-events: none; animation: ibSwIn .15s ease-out; }
.ib-avprev-pic { position: relative; width: 220px; height: 220px; border-radius: 14px; overflow: hidden; background: linear-gradient(135deg, #22c55e, #15803d); display: grid; place-items: center; margin-bottom: 6px; }
.ib-avprev-pic span { color: #fff; font-size: 64px; font-weight: 800; }
.ib-avprev-pic img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.ib-avprev b { font-size: 16px; }
.ib-avprev span:not(.ib-avprev-pic span) { font-size: 13px; color: var(--ink-2); }
.ib-avprev small { color: var(--ink-3, #64748b); font-size: 11.5px; }

/* Sohbetler: üst çubuk listenin altına taşındı — ekranın en üstü doğrudan Sohbetler */
.ib-sidefoot { flex-direction: column; align-items: stretch; gap: 8px; border-radius: 0; box-shadow: none; padding: 10px 12px calc(10px + env(safe-area-inset-bottom)); border-top: 1px solid var(--border); background: inherit; margin-top: auto; }
.ib-foot1 { display: flex; align-items: center; gap: 8px; justify-content: space-between; min-width: 0; }
.ib-foot1 .ib-user { min-width: 0; overflow: hidden; display: grid; }
.ib-foot1 .ib-user b, .ib-foot1 .ib-user span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ib-foot1 .ib-connbtn { font-size: 13.5px; padding: 6px 8px; max-width: 190px; overflow: hidden; }
.ib-foot2 { display: flex; gap: 6px; align-items: center; }
.ib-foot2 .ib-trsel { flex: 1; min-width: 0; }
.ib-foot2 .ib-fullbtn { flex: none; }
.ib-sidefoot #ibConnPop { top: auto; bottom: calc(100% + 6px); }
.ib-titlerow .ib-ham { font-size: 18px; }
.ib-hamshow { display: none; position: absolute; top: 12px; left: 12px; z-index: 7; width: 38px; height: 38px; border-radius: 10px; border: 1px solid var(--border); background: var(--surface); cursor: pointer; font-size: 18px; place-items: center; }
.inbox.list-hidden .ib-hamshow { display: grid; }
.inbox.list-hidden .ib-head { padding-left: 62px !important; }
body.ib-mini .ib-sidefoot { display: none; }
body.mobile .ib-titlerow .ib-ham, body.mobile .ib-hamshow { display: none !important; }
/* Sohbetler: arama + tek Filtre düğmesi (süzgeçler açılır pencerede) */
.ib-searchrow { display: flex; gap: 8px; align-items: center; }
.ib-searchrow .ib-search { flex: 1; min-width: 0; margin: 0; }
.ib-filterwrap { position: relative; flex: none; }
.ib-filterbtn { display: inline-flex; align-items: center; gap: 6px; height: 40px; max-width: 150px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ib-filterbtn #ibFilterLbl { overflow: hidden; text-overflow: ellipsis; }
.ib-filterbtn.on { border-color: var(--accent); color: var(--accent); }
.ib-fcnt { background: var(--accent); color: #fff; border-radius: 99px; font-size: 11px; min-width: 18px; height: 18px; display: inline-grid; place-items: center; padding: 0 5px; }
.ib-filterpop { position: absolute; right: 0; left: auto !important; top: calc(100% + 6px); width: min(320px, calc(100vw - 32px)); z-index: 30; padding: 12px; display: grid; gap: 8px; }
.ib-fp-h { font-size: 12px; font-weight: 700; color: var(--ink-3, #64748b); text-transform: uppercase; letter-spacing: .04em; }
.ib-filterpop .ib-chips { flex-wrap: wrap !important; overflow: visible !important; gap: 6px; }
.ib-filterpop .ib-chips button { flex: none; }
.ib-filterpop .ib-filters2 { display: flex; flex-wrap: wrap; gap: 6px; }
.ib-filterpop .ib-filters2 select { flex: 1 1 100%; }
.ib-filterpop .ib-tagpop, .ib-filterpop #ibAsgPop { position: static; box-shadow: none; border: 1px solid var(--border); min-width: 0; width: 100%; max-height: 220px; margin-top: 6px; }
.ib-filterpop .ib-tagpick { flex: 1 1 100%; }
/* Arşivlenmiş satırı: ince */
.ib-arch-row { padding: 6px 12px !important; margin: 0 8px 2px !important; gap: 10px !important; font-size: 14px; }
.ib-arch-ic { width: 30px !important; height: 30px !important; font-size: 15px !important; }
body.ib-mini .ib-side .ib-filterwrap, body.ib-mini .ib-side .ib-searchrow { display: none !important; }
/* Görsel / PDF: yapay zekâ okuması */
.ib-airead { margin-top: 6px; }
.ib-airead-btn { font: 600 12.5px inherit; padding: 4px 10px; border-radius: 99px; border: 1px solid var(--border); background: var(--surface); cursor: pointer; color: #4338ca; }
.ib-airead-btn:hover { border-color: #6366f1; background: rgba(99, 102, 241, .08); }
.ib-airead-h { display: flex; gap: 10px; align-items: center; font-size: 12.5px; color: #4338ca; }
.ib-airead-t { margin-top: 4px; padding: 8px 10px; border-radius: 10px; background: rgba(99, 102, 241, .07); border: 1px solid rgba(99, 102, 241, .2); white-space: pre-wrap; font-size: 13.5px; max-height: 320px; overflow: auto; }

/* Görev penceresi: yapay zekâ doldurma bilgisi */
.ib-taskhint { font-size: 12.5px; padding: 6px 8px; border-radius: 8px; }
.ib-taskhint.wait { background: rgba(99, 102, 241, .08); color: #4338ca; }
.ib-taskhint.ok { background: rgba(34, 197, 94, .1); color: #166534; }
.ib-taskhint.bad { background: rgba(244, 63, 94, .08); color: #be123c; }
/* Kişi kartı / Anlaşmalar penceresi: tür · ad · sorumlu · tarih */
.ib-recpop { min-width: 460px; max-width: min(640px, calc(100vw - 32px)); }
.crm-row3 { display: grid !important; grid-template-columns: auto minmax(0, 1fr) minmax(90px, 150px) auto; gap: 10px; align-items: center; }
.crm-row-main { display: grid; min-width: 0; }
.crm-row-main b, .crm-row-main small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.crm-row-who { font-size: 12.5px; color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.crm-row-date { font-size: 12.5px; color: var(--ink-3, #64748b); white-space: nowrap; }
.crm-row-head { padding: 2px 12px 4px; font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--ink-3, #64748b); }
@media (max-width: 560px) { .ib-recpop { min-width: 0; } .crm-row3 { grid-template-columns: auto minmax(0, 1fr) auto; } .crm-row-who { display: none; } }
/* Mesajı ilet penceresi */
.fwd-dlg { width: min(520px, calc(100vw - 24px)); }
.fwd-prev { padding: 8px 12px; border-left: 3px solid #16a34a; background: var(--surface-2); border-radius: 8px; font-size: 13.5px; max-height: 90px; overflow: auto; white-space: pre-wrap; }
.fwd-list { display: grid; gap: 2px; max-height: 46vh; overflow: auto; }
.fwd-item { display: flex; align-items: center; gap: 10px; padding: 6px 8px; border: 0; border-radius: 10px; background: none; cursor: pointer; text-align: left; font: inherit; color: inherit; }
.fwd-item:hover { background: var(--surface-2); }
.fwd-item.on { background: rgba(22, 163, 74, .1); }
.fwd-item .ib-av { width: 36px; height: 36px; }
.fwd-meta { flex: 1; min-width: 0; display: grid; }
.fwd-meta b, .fwd-meta small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fwd-meta small { color: var(--ink-3, #64748b); }
.fwd-check { width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--border); display: grid; place-items: center; color: #fff; font-size: 13px; }
.fwd-item.on .fwd-check { background: #16a34a; border-color: #16a34a; }
.fwd-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.fwd-chip { display: inline-flex; align-items: center; gap: 4px; padding: 3px 4px 3px 10px; border-radius: 99px; background: rgba(22, 163, 74, .12); color: #166534; font-size: 13px; }
.fwd-chip button { border: 0; background: none; cursor: pointer; font-size: 15px; color: inherit; }
/* Anlaşma ekle penceresi */
.ib-dealpop { min-width: 420px; max-width: min(560px, calc(100vw - 32px)); }
.ib-dealf { display: grid; gap: 3px; flex: 1; min-width: 0; font-size: 12.5px; color: var(--ink-3, #64748b); font-weight: 600; }
.ib-dealf select, .ib-dealf input { font-weight: 400; color: var(--ink); width: 100%; }
.ib-amount { display: flex; gap: 6px; } .ib-amount input { flex: 1; min-width: 0; } .ib-amount select { width: 80px; flex: none; }
.ib-dealreq { display: grid; gap: 8px; }
.ib-dealreq select[multiple] { min-height: 80px; }
/* Durumlar: Açık mavi, Beklemede sarı, Kriz kırmızı, Çözüldü */
.ib-status.st-open { background: #eff6ff !important; border-color: #bfdbfe !important; }
.ib-status.st-crisis { background: #fef2f2; border-color: #fecaca; color: #b91c1c; }
.ib-st.crisis { font-size: 10.5px; font-weight: 700; color: #fff; background: #dc2626; border-radius: 999px; padding: 2px 7px; }
:root[data-theme="dark"] .ib-status.st-open { background: #0f2240 !important; border-color: #1e40af !important; }
:root[data-theme="dark"] .ib-status.st-crisis { background: #3b0d0d; border-color: #7f1d1d; color: #fca5a5; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .ib-status.st-open { background: #0f2240 !important; border-color: #1e40af !important; } :root:not([data-theme="light"]) .ib-status.st-crisis { background: #3b0d0d; border-color: #7f1d1d; color: #fca5a5; } }
/* Listenin üstündeki durum sayaçları */
.ib-stbar { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; padding: 4px 12px 8px; }
.ib-stbtn { display: grid; justify-items: center; gap: 1px; padding: 6px 2px 5px; border-radius: 12px; border: 1px solid var(--border); background: var(--surface); cursor: pointer; font: inherit; color: inherit; min-width: 0; }
.ib-stbtn .ib-stic { font-size: 16px; line-height: 1; }
.ib-stbtn .ib-stlbl { font-size: 11px; color: var(--ink-3, #64748b); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.ib-stbtn b { font-size: 14px; line-height: 1.1; }
.ib-stbtn.st-open b { color: #2563eb; } .ib-stbtn.st-pending b { color: #ca8a04; } .ib-stbtn.st-crisis b { color: #dc2626; } .ib-stbtn.st-resolved b { color: #15803d; }
.ib-stbtn.on.st-open { border-color: #2563eb; background: rgba(37, 99, 235, .08); }
.ib-stbtn.on.st-pending { border-color: #ca8a04; background: rgba(202, 138, 4, .1); }
.ib-stbtn.on.st-crisis { border-color: #dc2626; background: rgba(220, 38, 38, .08); }
.ib-stbtn.on.st-resolved { border-color: #15803d; background: rgba(21, 128, 61, .08); }
body.ib-mini .ib-stbar { display: none; }
.ib-sw-btn.crisis { background: #dc2626; }
/* Dar sohbet sütunu: başlık satırı ve Filtre düğmesi taşmasın */
.ib-titlerow { flex-wrap: nowrap; gap: 6px; min-width: 0; }
.ib-titlerow h2 { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ib-titlerow .ib-newbtn { width: 36px; height: 36px; flex: none; }
.ib-titlebtns { flex: none; gap: 4px; }
.ib-filterbtn { max-width: 130px; overflow: visible; }
.ib-filterbtn #ibFilterLbl { min-width: 0; flex: 1; white-space: nowrap; }
.ib-filterbtn .ib-fcnt { flex: none; }
.ib-searchrow { min-width: 0; }
/* Arama simgesi + açılır arama kutusu */
.ib-searchrow { justify-content: flex-start; }
.ib-searchbtn { height: 40px; display: inline-flex; align-items: center; gap: 6px; flex: none; }
.ib-searchbtn.on { border-color: var(--accent); color: var(--accent); }
#ibSearchBox { display: flex; align-items: center; gap: 6px; }
#ibSearchBox[hidden] { display: none; }
#ibSearchBox input { flex: 1; min-width: 0; }
.ib-searchx { border: 0; background: none; cursor: pointer; font-size: 14px; color: var(--ink-3, #64748b); padding: 2px 6px; }
.ib-tools, .ib-side { min-width: 0; }
.ib-filterwrap { margin-left: auto; }
/* Filtre: zaman */
.ib-filterpop .ib-timef { flex-wrap: wrap !important; overflow: visible !important; gap: 6px; }
.ib-timecustom { display: flex; gap: 8px; }
.ib-timecustom[hidden] { display: none; }
.ib-timecustom label { display: grid; gap: 2px; font-size: 12px; color: var(--ink-3, #64748b); flex: 1; }
.ib-timecustom input { width: 100%; }
.ib-morerow { display: block; width: calc(100% - 16px); margin: 6px 8px 12px; padding: 10px; border: 1px dashed var(--border); border-radius: 12px; background: none; cursor: pointer; font: inherit; color: var(--ink-3, #64748b); }
.ib-morerow:hover:not(:disabled) { border-color: #16a34a; color: #15803d; }

/* Sohbet zemini (WhatsApp gibi): menü ile mesaj alanı ayrışsın · Ayarlar → 🎨 Sohbet görünümü */
body.chatbg-wa .ib-msgs, body.chatbg-wa .ibx .ib-msgs { background-color: #efeae2 !important; background-image: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20width%3D%22160%22%20height%3D%22160%22%20viewBox%3D%220%200%20160%20160%22%3E%3Cg%20fill%3D%22none%22%20stroke%3D%22rgba%2817%2C27%2C33%2C0.07%29%22%20stroke-width%3D%221.4%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpath%20d%3D%22M18%2022h22a6%206%200%200%201%206%206v10a6%206%200%200%201-6%206H28l-6%205v-5h-4a6%206%200%200%201-6-6V28a6%206%200%200%201%206-6z%22/%3E%3Ccircle%20cx%3D%22118%22%20cy%3D%2230%22%20r%3D%229%22/%3E%3Cpath%20d%3D%22M114%2030l3%203%206-6%22/%3E%3Cpath%20d%3D%22M70%2070l4%209%2010%201-7%207%202%2010-9-5-9%205%202-10-7-7%2010-1z%22/%3E%3Cpath%20d%3D%22M130%2092c0-6%209-6%209%200s-9%2010-9%2010-9-4-9-10%209-6%209%200z%22/%3E%3Crect%20x%3D%2222%22%20y%3D%22104%22%20width%3D%2222%22%20height%3D%2216%22%20rx%3D%223%22/%3E%3Cpath%20d%3D%22M22%20108l11%207%2011-7%22/%3E%3Cpath%20d%3D%22M96%20132a10%2010%200%201%200%2020%200%2010%2010%200%201%200-20%200M106%20126v6l4%203%22/%3E%3Cpath%20d%3D%22M58%20138l8-8%208%208M66%20130v16%22/%3E%3Ccircle%20cx%3D%22148%22%20cy%3D%22148%22%20r%3D%222%22/%3E%3Ccircle%20cx%3D%228%22%20cy%3D%2280%22%20r%3D%222%22/%3E%3Ccircle%20cx%3D%2284%22%20cy%3D%2214%22%20r%3D%222%22/%3E%3C/g%3E%3C/svg%3E"); }
body.chatbg-blue .ib-msgs, body.chatbg-blue .ibx .ib-msgs { background-color: #e8f0fb !important; background-image: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20width%3D%22160%22%20height%3D%22160%22%20viewBox%3D%220%200%20160%20160%22%3E%3Cg%20fill%3D%22none%22%20stroke%3D%22rgba%2817%2C27%2C33%2C0.07%29%22%20stroke-width%3D%221.4%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpath%20d%3D%22M18%2022h22a6%206%200%200%201%206%206v10a6%206%200%200%201-6%206H28l-6%205v-5h-4a6%206%200%200%201-6-6V28a6%206%200%200%201%206-6z%22/%3E%3Ccircle%20cx%3D%22118%22%20cy%3D%2230%22%20r%3D%229%22/%3E%3Cpath%20d%3D%22M114%2030l3%203%206-6%22/%3E%3Cpath%20d%3D%22M70%2070l4%209%2010%201-7%207%202%2010-9-5-9%205%202-10-7-7%2010-1z%22/%3E%3Cpath%20d%3D%22M130%2092c0-6%209-6%209%200s-9%2010-9%2010-9-4-9-10%209-6%209%200z%22/%3E%3Crect%20x%3D%2222%22%20y%3D%22104%22%20width%3D%2222%22%20height%3D%2216%22%20rx%3D%223%22/%3E%3Cpath%20d%3D%22M22%20108l11%207%2011-7%22/%3E%3Cpath%20d%3D%22M96%20132a10%2010%200%201%200%2020%200%2010%2010%200%201%200-20%200M106%20126v6l4%203%22/%3E%3Cpath%20d%3D%22M58%20138l8-8%208%208M66%20130v16%22/%3E%3Ccircle%20cx%3D%22148%22%20cy%3D%22148%22%20r%3D%222%22/%3E%3Ccircle%20cx%3D%228%22%20cy%3D%2280%22%20r%3D%222%22/%3E%3Ccircle%20cx%3D%2284%22%20cy%3D%2214%22%20r%3D%222%22/%3E%3C/g%3E%3C/svg%3E"); }
body.chatbg-green .ib-msgs, body.chatbg-green .ibx .ib-msgs { background-color: #e6f4ea !important; background-image: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20width%3D%22160%22%20height%3D%22160%22%20viewBox%3D%220%200%20160%20160%22%3E%3Cg%20fill%3D%22none%22%20stroke%3D%22rgba%2817%2C27%2C33%2C0.07%29%22%20stroke-width%3D%221.4%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpath%20d%3D%22M18%2022h22a6%206%200%200%201%206%206v10a6%206%200%200%201-6%206H28l-6%205v-5h-4a6%206%200%200%201-6-6V28a6%206%200%200%201%206-6z%22/%3E%3Ccircle%20cx%3D%22118%22%20cy%3D%2230%22%20r%3D%229%22/%3E%3Cpath%20d%3D%22M114%2030l3%203%206-6%22/%3E%3Cpath%20d%3D%22M70%2070l4%209%2010%201-7%207%202%2010-9-5-9%205%202-10-7-7%2010-1z%22/%3E%3Cpath%20d%3D%22M130%2092c0-6%209-6%209%200s-9%2010-9%2010-9-4-9-10%209-6%209%200z%22/%3E%3Crect%20x%3D%2222%22%20y%3D%22104%22%20width%3D%2222%22%20height%3D%2216%22%20rx%3D%223%22/%3E%3Cpath%20d%3D%22M22%20108l11%207%2011-7%22/%3E%3Cpath%20d%3D%22M96%20132a10%2010%200%201%200%2020%200%2010%2010%200%201%200-20%200M106%20126v6l4%203%22/%3E%3Cpath%20d%3D%22M58%20138l8-8%208%208M66%20130v16%22/%3E%3Ccircle%20cx%3D%22148%22%20cy%3D%22148%22%20r%3D%222%22/%3E%3Ccircle%20cx%3D%228%22%20cy%3D%2280%22%20r%3D%222%22/%3E%3Ccircle%20cx%3D%2284%22%20cy%3D%2214%22%20r%3D%222%22/%3E%3C/g%3E%3C/svg%3E"); }
body.chatbg-sand .ib-msgs, body.chatbg-sand .ibx .ib-msgs { background-color: #f4efe6 !important; background-image: none; }
body.chatbg-gray .ib-msgs, body.chatbg-gray .ibx .ib-msgs { background-color: #eef0f3 !important; background-image: none; }
body.chatbg-dark .ib-msgs, body.chatbg-dark .ibx .ib-msgs { background-color: #0b141a !important; background-image: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20width%3D%22160%22%20height%3D%22160%22%20viewBox%3D%220%200%20160%20160%22%3E%3Cg%20fill%3D%22none%22%20stroke%3D%22rgba%28255%2C255%2C255%2C0.06%29%22%20stroke-width%3D%221.4%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpath%20d%3D%22M18%2022h22a6%206%200%200%201%206%206v10a6%206%200%200%201-6%206H28l-6%205v-5h-4a6%206%200%200%201-6-6V28a6%206%200%200%201%206-6z%22/%3E%3Ccircle%20cx%3D%22118%22%20cy%3D%2230%22%20r%3D%229%22/%3E%3Cpath%20d%3D%22M114%2030l3%203%206-6%22/%3E%3Cpath%20d%3D%22M70%2070l4%209%2010%201-7%207%202%2010-9-5-9%205%202-10-7-7%2010-1z%22/%3E%3Cpath%20d%3D%22M130%2092c0-6%209-6%209%200s-9%2010-9%2010-9-4-9-10%209-6%209%200z%22/%3E%3Crect%20x%3D%2222%22%20y%3D%22104%22%20width%3D%2222%22%20height%3D%2216%22%20rx%3D%223%22/%3E%3Cpath%20d%3D%22M22%20108l11%207%2011-7%22/%3E%3Cpath%20d%3D%22M96%20132a10%2010%200%201%200%2020%200%2010%2010%200%201%200-20%200M106%20126v6l4%203%22/%3E%3Cpath%20d%3D%22M58%20138l8-8%208%208M66%20130v16%22/%3E%3Ccircle%20cx%3D%22148%22%20cy%3D%22148%22%20r%3D%222%22/%3E%3Ccircle%20cx%3D%228%22%20cy%3D%2280%22%20r%3D%222%22/%3E%3Ccircle%20cx%3D%2284%22%20cy%3D%2214%22%20r%3D%222%22/%3E%3C/g%3E%3C/svg%3E"); }
body.chatbg-white .ib-msgs, body.chatbg-white .ibx .ib-msgs { background-color: var(--surface, #fff) !important; background-image: none; }
:root[data-theme="dark"] body:is(.chatbg-wa, .chatbg-blue, .chatbg-green, .chatbg-sand, .chatbg-gray) .ib-msgs { background-color: #0b141a !important; background-image: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20width%3D%22160%22%20height%3D%22160%22%20viewBox%3D%220%200%20160%20160%22%3E%3Cg%20fill%3D%22none%22%20stroke%3D%22rgba%28255%2C255%2C255%2C0.06%29%22%20stroke-width%3D%221.4%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpath%20d%3D%22M18%2022h22a6%206%200%200%201%206%206v10a6%206%200%200%201-6%206H28l-6%205v-5h-4a6%206%200%200%201-6-6V28a6%206%200%200%201%206-6z%22/%3E%3Ccircle%20cx%3D%22118%22%20cy%3D%2230%22%20r%3D%229%22/%3E%3Cpath%20d%3D%22M114%2030l3%203%206-6%22/%3E%3Cpath%20d%3D%22M70%2070l4%209%2010%201-7%207%202%2010-9-5-9%205%202-10-7-7%2010-1z%22/%3E%3Cpath%20d%3D%22M130%2092c0-6%209-6%209%200s-9%2010-9%2010-9-4-9-10%209-6%209%200z%22/%3E%3Crect%20x%3D%2222%22%20y%3D%22104%22%20width%3D%2222%22%20height%3D%2216%22%20rx%3D%223%22/%3E%3Cpath%20d%3D%22M22%20108l11%207%2011-7%22/%3E%3Cpath%20d%3D%22M96%20132a10%2010%200%201%200%2020%200%2010%2010%200%201%200-20%200M106%20126v6l4%203%22/%3E%3Cpath%20d%3D%22M58%20138l8-8%208%208M66%20130v16%22/%3E%3Ccircle%20cx%3D%22148%22%20cy%3D%22148%22%20r%3D%222%22/%3E%3Ccircle%20cx%3D%228%22%20cy%3D%2280%22%20r%3D%222%22/%3E%3Ccircle%20cx%3D%2284%22%20cy%3D%2214%22%20r%3D%222%22/%3E%3C/g%3E%3C/svg%3E"); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) body:is(.chatbg-wa, .chatbg-blue, .chatbg-green, .chatbg-sand, .chatbg-gray) .ib-msgs { background-color: #0b141a !important; background-image: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20width%3D%22160%22%20height%3D%22160%22%20viewBox%3D%220%200%20160%20160%22%3E%3Cg%20fill%3D%22none%22%20stroke%3D%22rgba%28255%2C255%2C255%2C0.06%29%22%20stroke-width%3D%221.4%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpath%20d%3D%22M18%2022h22a6%206%200%200%201%206%206v10a6%206%200%200%201-6%206H28l-6%205v-5h-4a6%206%200%200%201-6-6V28a6%206%200%200%201%206-6z%22/%3E%3Ccircle%20cx%3D%22118%22%20cy%3D%2230%22%20r%3D%229%22/%3E%3Cpath%20d%3D%22M114%2030l3%203%206-6%22/%3E%3Cpath%20d%3D%22M70%2070l4%209%2010%201-7%207%202%2010-9-5-9%205%202-10-7-7%2010-1z%22/%3E%3Cpath%20d%3D%22M130%2092c0-6%209-6%209%200s-9%2010-9%2010-9-4-9-10%209-6%209%200z%22/%3E%3Crect%20x%3D%2222%22%20y%3D%22104%22%20width%3D%2222%22%20height%3D%2216%22%20rx%3D%223%22/%3E%3Cpath%20d%3D%22M22%20108l11%207%2011-7%22/%3E%3Cpath%20d%3D%22M96%20132a10%2010%200%201%200%2020%200%2010%2010%200%201%200-20%200M106%20126v6l4%203%22/%3E%3Cpath%20d%3D%22M58%20138l8-8%208%208M66%20130v16%22/%3E%3Ccircle%20cx%3D%22148%22%20cy%3D%22148%22%20r%3D%222%22/%3E%3Ccircle%20cx%3D%228%22%20cy%3D%2280%22%20r%3D%222%22/%3E%3Ccircle%20cx%3D%2284%22%20cy%3D%2214%22%20r%3D%222%22/%3E%3C/g%3E%3C/svg%3E"); } }
body.chatbg-dark .ib-msg.in .ib-bub { background: #202c33; color: #e9edef; }
body.chatbg-dark .ib-msg.out .ib-bub { background: #005c4b; color: #e9edef; }
body.chatbg-dark .ib-day span { background: #182229; color: #8696a0; }
/* Mesaj alanının üstünde ince ayraç */
.ib-msgs { box-shadow: inset 0 8px 10px -10px rgba(15, 23, 42, .25); }
/* Yazı boyutu ve tipi */
body.chatfs-s .ib-bub { font-size: 13px !important; }
body.chatfs-l .ib-bub { font-size: 16px !important; }
body.chatfs-xl .ib-bub { font-size: 18px !important; }
body.chatff-round .ib-bub, body.chatff-round .ib-compose textarea { font-family: ui-rounded, "SF Pro Rounded", "Nunito", system-ui, sans-serif; }
body.chatff-classic .ib-bub, body.chatff-classic .ib-compose textarea { font-family: Georgia, "Times New Roman", serif; }
body.chatff-mono .ib-bub, body.chatff-mono .ib-compose textarea { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
/* Görünüm penceresi */
.look-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 8px; }
.look-opt { display: grid; gap: 4px; justify-items: center; padding: 6px; border: 2px solid var(--border); border-radius: 12px; background: var(--surface); cursor: pointer; font: inherit; font-size: 12.5px; color: inherit; }
.look-opt.on { border-color: #16a34a; }
.look-sw { width: 100%; height: 46px; border-radius: 8px; border: 1px solid var(--border); }
.look-row { display: flex; flex-wrap: wrap; gap: 6px; }
.look-prev { border-radius: 12px; padding: 12px; display: grid; gap: 6px; border: 1px solid var(--border); }

.chatbg-sw-wa, .chatbg-sw-blue, .chatbg-sw-green { background-image: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20width%3D%22160%22%20height%3D%22160%22%20viewBox%3D%220%200%20160%20160%22%3E%3Cg%20fill%3D%22none%22%20stroke%3D%22rgba%2817%2C27%2C33%2C0.07%29%22%20stroke-width%3D%221.4%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpath%20d%3D%22M18%2022h22a6%206%200%200%201%206%206v10a6%206%200%200%201-6%206H28l-6%205v-5h-4a6%206%200%200%201-6-6V28a6%206%200%200%201%206-6z%22/%3E%3Ccircle%20cx%3D%22118%22%20cy%3D%2230%22%20r%3D%229%22/%3E%3Cpath%20d%3D%22M114%2030l3%203%206-6%22/%3E%3Cpath%20d%3D%22M70%2070l4%209%2010%201-7%207%202%2010-9-5-9%205%202-10-7-7%2010-1z%22/%3E%3Cpath%20d%3D%22M130%2092c0-6%209-6%209%200s-9%2010-9%2010-9-4-9-10%209-6%209%200z%22/%3E%3Crect%20x%3D%2222%22%20y%3D%22104%22%20width%3D%2222%22%20height%3D%2216%22%20rx%3D%223%22/%3E%3Cpath%20d%3D%22M22%20108l11%207%2011-7%22/%3E%3Cpath%20d%3D%22M96%20132a10%2010%200%201%200%2020%200%2010%2010%200%201%200-20%200M106%20126v6l4%203%22/%3E%3Cpath%20d%3D%22M58%20138l8-8%208%208M66%20130v16%22/%3E%3Ccircle%20cx%3D%22148%22%20cy%3D%22148%22%20r%3D%222%22/%3E%3Ccircle%20cx%3D%228%22%20cy%3D%2280%22%20r%3D%222%22/%3E%3Ccircle%20cx%3D%2284%22%20cy%3D%2214%22%20r%3D%222%22/%3E%3C/g%3E%3C/svg%3E"); background-size: 80px; }
.chatbg-sw-dark { background-image: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20width%3D%22160%22%20height%3D%22160%22%20viewBox%3D%220%200%20160%20160%22%3E%3Cg%20fill%3D%22none%22%20stroke%3D%22rgba%28255%2C255%2C255%2C0.06%29%22%20stroke-width%3D%221.4%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpath%20d%3D%22M18%2022h22a6%206%200%200%201%206%206v10a6%206%200%200%201-6%206H28l-6%205v-5h-4a6%206%200%200%201-6-6V28a6%206%200%200%201%206-6z%22/%3E%3Ccircle%20cx%3D%22118%22%20cy%3D%2230%22%20r%3D%229%22/%3E%3Cpath%20d%3D%22M114%2030l3%203%206-6%22/%3E%3Cpath%20d%3D%22M70%2070l4%209%2010%201-7%207%202%2010-9-5-9%205%202-10-7-7%2010-1z%22/%3E%3Cpath%20d%3D%22M130%2092c0-6%209-6%209%200s-9%2010-9%2010-9-4-9-10%209-6%209%200z%22/%3E%3Crect%20x%3D%2222%22%20y%3D%22104%22%20width%3D%2222%22%20height%3D%2216%22%20rx%3D%223%22/%3E%3Cpath%20d%3D%22M22%20108l11%207%2011-7%22/%3E%3Cpath%20d%3D%22M96%20132a10%2010%200%201%200%2020%200%2010%2010%200%201%200-20%200M106%20126v6l4%203%22/%3E%3Cpath%20d%3D%22M58%20138l8-8%208%208M66%20130v16%22/%3E%3Ccircle%20cx%3D%22148%22%20cy%3D%22148%22%20r%3D%222%22/%3E%3Ccircle%20cx%3D%228%22%20cy%3D%2280%22%20r%3D%222%22/%3E%3Ccircle%20cx%3D%2284%22%20cy%3D%2214%22%20r%3D%222%22/%3E%3C/g%3E%3C/svg%3E"); background-size: 80px; }
/* Açık sohbetin üstünde durum rengi çizgisi (listedeki kartın sol çizgisiyle aynı renk) */
.ib-head.tone-open { box-shadow: inset 0 3px 0 rgba(37, 99, 235, .75); }
.ib-head.tone-pending { box-shadow: inset 0 3px 0 rgba(202, 138, 4, .85); }
.ib-head.tone-crisis { box-shadow: inset 0 3px 0 rgba(220, 38, 38, .9); }
.ib-head.tone-resolved { box-shadow: inset 0 3px 0 rgba(22, 163, 74, .75); }
.ib-head.tone-none { box-shadow: inset 0 3px 0 var(--border); }
.qrl-url { display: flex; gap: 8px; align-items: center; padding: 8px 10px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface-2); overflow: hidden; }
.qrl-url code { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; }
.adm-conn-acts { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--border); }
.qrl-box { display: flex; flex-direction: column; gap: 8px; padding: 12px; border: 1px dashed var(--border); border-radius: 12px; }
.qrl-url input { flex: 1; min-width: 0; border: 0; background: transparent; font: inherit; font-size: 13px; padding: 0; color: inherit; }
.set-all { display: flex; align-items: flex-start; gap: 8px; margin: 10px 0 0; padding: 10px 12px; border-radius: 10px; background: var(--surface-2); font-weight: 600; font-size: 14px; cursor: pointer; }
.set-all input { margin-top: 2px; }
body.panel-mode:not(.ib-full):not(.native-app) .ibx .inbox { height: var(--ib-ph, calc(100vh - 96px)); }
/* Dar sohbet alanında işlem düğmeleri yalnız simge (yazı ipucunda); satır taşmaz */
.ibx .ib-thread { container-type: inline-size; container-name: ibth; }
@container ibth (max-width: 1180px) { .ib-metarow .ib-lbl { display: none; } }
/* 🌐 Otomatik çeviri */
.ib-autotr { white-space: nowrap; }
.ib-autotr.on { background: #e0f2fe; border-color: #7dd3fc; color: #075985; font-weight: 700; }
.ib-trpop { top: auto; bottom: calc(100% + 8px); left: 0; width: 320px; z-index: 30; display: grid; gap: 6px; padding: 12px; }
.ib-trpop .ib-poptitle { font-weight: 700; }
.ib-trpop p { margin: 0; }
.ib-trpop .ib-popitem { background: none; border: 1px solid var(--border); border-radius: 9px; padding: 7px 10px; cursor: pointer; text-align: left; font: inherit; font-size: 13.5px; color: inherit; }
.ib-trpop .ib-popitem:hover { border-color: #38bdf8; }
.ib-trpop .ib-popitem.on { background: #e0f2fe; border-color: #38bdf8; font-weight: 700; color: #075985; }
.ib-trpop .ib-popitem.danger { color: #b91c1c; }
.ib-trgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 5px; max-height: 220px; overflow-y: auto; }
.ib-trbar { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 6px 12px; margin: 0 0 6px; border-radius: 10px; background: #e0f2fe; color: #075985; font-size: 13px; }
:root[data-theme="dark"] .ib-trbar, :root[data-theme="dark"] .ib-autotr.on { background: #0c3a52; color: #bae6fd; border-color: #0369a1; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .ib-trbar, :root:not([data-theme="light"]) .ib-autotr.on { background: #0c3a52; color: #bae6fd; border-color: #0369a1; } }
/* ✨ AI müşteri özeti */
.ib-aisum { flex: none; margin: 8px 12px 0; padding: 10px 12px; border-radius: 12px; background: linear-gradient(135deg, #f5f3ff, #eef6ff); border: 1px solid #ddd6fe; font-size: 13.5px; color: #1f2937; }
.ib-aisum.compact { padding: 7px 12px; }
.ib-aisum-head { display: flex; align-items: center; gap: 8px; min-width: 0; }
.ib-aisum-head b { color: #5b21b6; white-space: nowrap; }
.ib-aisum-first { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; cursor: pointer; color: #374151; }
.ib-aisum-head .grow { flex: 1; }
.ib-aisum-body { display: grid; gap: 4px; margin-top: 8px; line-height: 1.45; }
.ib-aisum-ask { background: none; border: 0; padding: 0; cursor: pointer; font: inherit; color: #5b21b6; font-weight: 700; text-align: left; }
.ib-aisum-ask span { font-weight: 500; color: #6b7280; }
.ib-aisum-ask:hover span { text-decoration: underline; }
.cust-card .ib-aisum { margin: 10px 0 0; }
.ib-edited { font-style: italic; opacity: .75; }
:root[data-theme="dark"] .ib-aisum { background: linear-gradient(135deg, #241b3d, #14233a); border-color: #4c1d95; color: #e5e7eb; }
:root[data-theme="dark"] .ib-aisum-head b, :root[data-theme="dark"] .ib-aisum-ask { color: #c4b5fd; }
:root[data-theme="dark"] .ib-aisum-first { color: #d1d5db; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .ib-aisum { background: linear-gradient(135deg, #241b3d, #14233a); border-color: #4c1d95; color: #e5e7eb; }
  :root:not([data-theme="light"]) .ib-aisum-head b, :root:not([data-theme="light"]) .ib-aisum-ask { color: #c4b5fd; }
  :root:not([data-theme="light"]) .ib-aisum-first { color: #d1d5db; }
}
.cc-body > .cc-sec:first-child { grid-column: 1 / -1; } /* iletişim tam genişlik: numara ve e-posta bölünmesin */
.cc-row > div b { white-space: nowrap; }
.ib-name { all: unset; cursor: pointer; display: inline-flex; align-items: baseline; gap: 6px; max-width: 100%; }
.ib-name b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ib-name-ed { font-size: 13px; opacity: 0; transition: opacity .15s; }
.ib-name:hover .ib-name-ed, .ib-name:focus-visible .ib-name-ed { opacity: .7; }
.ib-name:focus-visible { outline: 2px solid var(--accent); border-radius: 4px; }
.chk-row { display: flex !important; flex-direction: row !important; align-items: center; gap: 8px; font-weight: 500; }
.chk-row input { width: 16px; height: 16px; margin: 0; }
.cc-rename { font-size: 15px; vertical-align: middle; }
body.mobile .ib-name b { font-size: 16px; }
/* 👥 Grup sohbetleri: renkler aynı kalır; yalnız 👥 rozeti ve "Grup" etiketi */
.ib-grp-badge { position: absolute; left: -5px; top: -5px; width: 20px; height: 20px; border-radius: 50%; background: #fff; display: grid; place-items: center; font-size: 11px; box-shadow: 0 0 0 1px var(--border, #e5e7eb), 0 1px 2px rgba(0,0,0,.12); z-index: 1; }
.ib-grp-chip { display: inline-flex; align-items: center; gap: 4px; padding: 0 7px; margin-right: 4px; border-radius: 999px; background: #f1f5f9; color: #334155; font-size: 11.5px; font-weight: 700; line-height: 18px; }
.ib-grp-chip.big { font-size: 13px; padding: 3px 10px; line-height: 1.3; }
.ib-arch-row.grp .ib-badge { margin-left: auto; }
.ib-arch-row.grp .ib-badge + .ib-arch-n { margin-left: 8px; }
:root[data-theme="dark"] .ib-grp-chip, :root[data-theme="dark"] .ib-grp-badge { background: #1f2937; color: #e5e7eb; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .ib-grp-chip, :root:not([data-theme="light"]) .ib-grp-badge { background: #1f2937; color: #e5e7eb; } }
/* Sol menü pencereden uzunsa kendi içinde kayar (sayfa kaymasın); dolgu yüksekliğe dahil */
@media (min-width: 821px) {
  .panel-mode .topbar { box-sizing: border-box; height: 100vh; max-height: 100vh; overflow-y: auto; overflow-x: hidden; overscroll-behavior: contain; scrollbar-width: thin; }
  .panel-mode .topbar > * { flex-shrink: 0; }
  body.panel-mode { height: 100vh; overflow: hidden; }
  body.panel-mode main { height: 100vh; overflow-y: auto; box-sizing: border-box; }
}
/* ---------- Özel durumlar: renk --stc ile ---------- */
.ib-stbar.many { grid-template-columns: repeat(auto-fill, minmax(64px, 1fr)); }
.ib-stbtn b { color: var(--stc, inherit); }
.ib-stbtn.on { border-color: var(--stc, var(--accent)); background: color-mix(in srgb, var(--stc, #2563eb) 9%, transparent); }
.ib-st { font-size: 10.5px; font-weight: 700; border-radius: 999px; padding: 2px 7px; color: color-mix(in srgb, var(--stc, #64748b) 80%, #000); background: color-mix(in srgb, var(--stc, #64748b) 18%, transparent); }
/* ---------- Yeni sohbet düzeni (önizleme) ---------- */
.ib-sec { border-bottom: 1px solid var(--border); }
.ib-sechead { display: flex; align-items: center; gap: 8px; width: 100%; padding: 8px 12px; border: 0; background: none; cursor: pointer; font: inherit; font-size: 13px; font-weight: 700; color: var(--ink-2, #334155); text-align: left; }
.ib-sechead:hover { background: var(--surface-2); }
.ib-sechead .grow { flex: none; }
.ib-sechint { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 500; }
.ib-secnum { display: inline-grid; place-items: center; width: 18px; height: 18px; border-radius: 50%; background: color-mix(in srgb, var(--accent) 14%, transparent); color: var(--accent); font-size: 11px; font-weight: 800; flex: none; }
.ib-chev { margin-left: auto; transition: transform .15s; color: var(--ink-3, #64748b); }
.ib-sec.closed .ib-chev { transform: rotate(-90deg); }
.ib-sec.closed .ib-secbody { display: none; }
.ib-secbody { display: grid; gap: 8px; padding: 0 0 10px; }
.ib-secbody > .ib-searchrow, .ib-secbody > .ib-search { margin: 0 12px; }
.ib-secbody > .ib-stbar { padding: 0 12px; }
.ib-secbody > .ib-sidefoot { margin: 0; border-top: 1px dashed var(--border); padding: 8px 12px 0; }
.ib-convhead { border-bottom: 1px solid var(--border); }
.ib-convhead b { margin-left: auto; }
.ib-convhead .ib-chev { margin-left: 8px; }
.newui #ibList > .ib-arch-row { display: none; }
body.newui.ib-mini .ib-toolsec, body.newui.ib-mini .ib-convhead .grow, body.newui.ib-mini .ib-convhead b { display: none; }
.ib-toolsec .ib-fcnt { margin-left: 4px; }
/* Etiket çubuğu: durumlar gibi sayılı */
.ib-tagbar { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 12px; }
.ib-tagbtn { display: inline-flex; align-items: center; gap: 5px; max-width: 100%; padding: 3px 9px; border-radius: 999px; border: 1px solid color-mix(in srgb, var(--tc) 35%, transparent); background: color-mix(in srgb, var(--tc) 12%, transparent); color: color-mix(in srgb, var(--tc) 85%, #000); font: inherit; font-size: 12px; font-weight: 600; cursor: pointer; }
.ib-tagbtn b { font-size: 11px; opacity: .85; }
.ib-tagbtn .ib-tagbtn-n { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 120px; }
.ib-tagbtn.on { border-color: var(--tc); box-shadow: 0 0 0 1px var(--tc) inset; background: color-mix(in srgb, var(--tc) 22%, transparent); }
/* Görünüm: Sohbetler · Gruplar · Arşiv · Tümü */
.ib-viewrow { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 4px; padding: 0 12px; }
.ib-vw { display: inline-flex; align-items: center; justify-content: center; gap: 4px; padding: 6px 4px; border-radius: 10px; border: 1px solid var(--border); background: var(--surface); font: inherit; font-size: 12px; font-weight: 600; cursor: pointer; color: inherit; white-space: nowrap; min-width: 0; overflow: hidden; }
.ib-vw.on { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 10%, transparent); color: var(--accent); }
.ib-vw-n { font-size: 11px; color: var(--ink-3, #64748b); }
.ib-vw .ib-badge { font-size: 10px; min-width: 16px; height: 16px; }
/* Sohbet ayarları penceresi */
dialog.chatset { width: min(860px, calc(100vw - 24px)); }
.chatset-tabs { grid-template-columns: repeat(3, max-content); padding: 0; margin: 4px 0 12px; }
.chatset-tabs .ib-vw { padding: 7px 14px; font-size: 13.5px; }
.st-ed { display: grid; gap: 6px; }
.st-row { display: grid; grid-template-columns: auto auto minmax(120px, 1fr) auto auto auto; gap: 8px; align-items: center; padding: 6px 8px; border: 1px solid var(--border); border-radius: 12px; }
.st-move { display: flex; gap: 2px; }
.btn-xs { padding: 2px 7px; font-size: 12px; min-height: 0; }
.st-iconwrap { position: relative; display: inline-block; }
.st-icon { width: 36px; height: 34px; border-radius: 10px; border: 1px solid var(--border); background: var(--surface); font-size: 18px; cursor: pointer; padding: 0; }
.st-iconpop { position: absolute; top: calc(100% + 4px); left: 0; z-index: 40; display: grid; grid-template-columns: repeat(6, 34px); gap: 2px; padding: 6px; }
.st-iconpop button { width: 34px; height: 32px; border: 0; background: none; border-radius: 8px; font-size: 18px; cursor: pointer; padding: 0; }
.st-iconpop button:hover { background: var(--surface-2); }
.st-colors { display: flex; gap: 3px; align-items: center; flex-wrap: wrap; }
.st-colorin { width: 26px; height: 22px; padding: 0; border: 1px solid var(--border); border-radius: 6px; background: none; cursor: pointer; }
.st-closed { font-size: 12.5px; white-space: nowrap; }
.st-lock { width: 30px; text-align: center; }
.tag-namebox { display: flex; gap: 6px; align-items: center; min-width: 0; }
.tag-namebox input { flex: 1; min-width: 0; }
@media (max-width: 760px) { .st-row { grid-template-columns: auto auto minmax(0, 1fr) auto; } .st-row .st-colors, .st-row .st-closed { grid-column: 2 / -1; } }
.ib-tagbar[hidden] { display: none !important; }
/* Sade sohbet kartı: ad, saat, son mesaj, bağlantı adı; durum, bekleme, etiket, şirket ve sorumlu açılan sohbetin başlığında */
body.ib-sade .ib-item .ib-row4, body.ib-sade .ib-item .ib-row-crm, body.ib-sade .ib-item .ib-company-l, body.ib-sade .ib-item .ib-asg-l, body.ib-sade .ib-item .ib-grp-chip { display: none !important; }
.ib-headline .ib-wait { margin-left: 4px; }
/* Bağlantı koptu şeridi: ekran kapanmaz, bağlantı gelince kendiliğinden yenilenir */
.cp-offline { position: fixed; top: 10px; left: 50%; transform: translateX(-50%); z-index: 9999; display: flex; align-items: center; gap: 8px; padding: 9px 16px; border-radius: 999px; background: #fef3c7; color: #92400e; border: 1px solid #fde68a; font-weight: 600; font-size: 13.5px; box-shadow: 0 8px 24px rgba(0,0,0,.12); }
.cp-offline .spinner { width: 14px; height: 14px; }
/* Önizleme düzeni: taşma yok, düzenli */
.ib-toolsec, .ib-secbody, .ib-secbody > * { min-width: 0; max-width: 100%; box-sizing: border-box; }
.ib-secbody > .ib-searchrow { display: flex; gap: 8px; align-items: center; }
.ib-secbody > .ib-searchrow > * { min-width: 0; }
.ib-secbody > .ib-stbar { grid-template-columns: repeat(auto-fit, minmax(56px, 1fr)); }
.ib-secbody .ib-stbtn .ib-stlbl { font-size: 10.5px; }
.ib-viewrow { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.ib-vw { justify-content: flex-start; padding: 6px 8px; }
.ib-vw-n { margin-left: auto; }
.ib-secbody > .ib-sidefoot .ib-foot1 { flex-wrap: wrap; }
.ib-secbody > .ib-sidefoot .ib-foot2 { flex-wrap: wrap; }
.ib-secbody > .ib-sidefoot .ib-foot2 .ib-trsel { flex: 1 1 120px; }
.ib-tagbar { position: relative; display: block; }
.ib-tagdd { display: flex; align-items: center; gap: 6px; width: 100%; padding: 7px 10px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; color: inherit; text-align: left; }
.ib-tagdd.on { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 8%, transparent); }
.ib-tagdd-l { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ib-tagdd-pop { position: absolute; left: 12px; right: 12px; top: calc(100% + 4px); z-index: 30; max-height: 320px; overflow-y: auto; display: grid; gap: 2px; padding: 6px; }
.ib-tagdd-item { justify-content: flex-start; }
.ib-tagdd-item b { margin-left: auto; }
body.newui .ib-titlerow h2 { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* Önizleme · alt araçlar: tek satır bağlantı seçimi, tek satır simgeler (dil, zil, görünüm, tema, tam ekran); 📱 Sohbet ayarlarında */
body.newui .ib-secbody > .ib-sidefoot { gap: 6px; }
body.newui .ib-sidefoot .ib-user { display: none; }
body.newui .ib-sidefoot .ib-foot1 { flex-wrap: nowrap; }
body.newui .ib-sidefoot .ib-connpick, body.newui .ib-sidefoot .ib-connbtn { width: 100%; max-width: none; }
body.newui .ib-sidefoot .ib-connbtn { justify-content: flex-start; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); }
body.newui .ib-sidefoot .ib-connbtn #ibConnLabel { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-align: left; }
body.newui #ibPhone { display: none !important; }
body.newui .ib-secbody > .ib-sidefoot .ib-foot2 { flex-wrap: nowrap; justify-content: space-between; gap: 4px; }
body.newui .ib-sidefoot .ib-foot2 .ib-fullbtn { width: 36px; height: 34px; padding: 0; font-size: 16px; }
body.newui .ib-secbody > .ib-sidefoot .ib-foot2 .ib-trsel { flex: none; width: 36px; height: 34px; padding: 0 0 0 8px; font-size: 16px; overflow: hidden; color: transparent; text-shadow: 0 0 0 var(--ink, #0f172a); background-image: none; appearance: none; -webkit-appearance: none; cursor: pointer; border-radius: 10px; }
body.newui .ib-sidefoot .ib-foot2 .ib-trsel option { color: var(--ink, #0f172a); }
body.newui .ib-sidefoot .ib-foot2 .ib-trsel.on { border-color: #16a34a; background: #f0fdf4; }
/* Önizleme · üst satır: 🔍 Ara (sol) · ⚙ Filtre (orta, geniş) · ⛶ Tam ekran (sağ); hızlı süzgeçler Filtre penceresinde */
body.newui .ib-searchrow { position: relative; padding: 0 12px 8px; }
body.newui .ib-searchrow .ib-searchbtn { flex: none; height: 40px; }
body.newui .ib-searchrow .ib-filterwrap { position: static; flex: 1; min-width: 0; }
body.newui .ib-searchrow .ib-filterbtn { width: 100%; max-width: none; justify-content: center; }
body.newui .ib-searchrow #ibFull { flex: none; width: 40px; height: 40px; padding: 0; }
body.newui .ib-filterpop { left: 12px !important; right: 12px; width: auto; max-height: min(78vh, 640px); overflow-y: auto; }
body.newui .ib-filterpop .ib-stbar, body.newui .ib-filterpop .ib-viewrow, body.newui .ib-filterpop .ib-tagbar { padding: 0; }
body.newui .ib-filterpop .ib-stbar { grid-template-columns: repeat(auto-fit, minmax(60px, 1fr)); }
body.newui .ib-filterpop .ib-tagdd-pop { left: 0; right: 0; }
body.newui .ib-convhead { padding-top: 6px; }
.chatset-gen .ib-sidefoot { display: grid; gap: 10px; border: 0; padding: 0; margin: 0; background: none; }
.chatset-gen .ib-foot1 { flex-wrap: wrap; }
.chatset-gen .ib-foot1 .ib-user { display: none; }
.chatset-gen .ib-connpick { position: relative; flex: 1; }
.chatset-gen .ib-connbtn { width: 100%; max-width: none !important; border: 1px solid var(--border); border-radius: 10px; justify-content: flex-start; }
.chatset-gen .ib-foot2 { flex-wrap: wrap; gap: 8px; }
.chatset-gen .ib-foot2 .ib-trsel { flex: 1 1 200px; }
.chatset-gen #ibPhone { display: none !important; }
body.newui .ib-convhead { cursor: default; } body.newui .ib-convhead:hover { background: none; }
/* Fotoğraf / video önizleme */
.ib-imgbtn { display: block; padding: 0; border: 0; background: none; cursor: zoom-in; position: relative; border-radius: 10px; overflow: hidden; }
.ib-imgbtn .ib-img { display: block; }
.ib-vidbtn { cursor: pointer; }
.ib-play { position: absolute; inset: 0; margin: auto; width: 54px; height: 54px; border-radius: 50%; background: rgba(0,0,0,.55); color: #fff; display: grid; place-items: center; font-size: 22px; padding-left: 4px; pointer-events: none; }
dialog.lightbox { width: 100vw; height: 100vh; max-width: none; max-height: none; margin: 0; padding: 0; border: 0; background: rgba(8, 12, 20, .92); color: #fff; }
dialog.lightbox::backdrop { background: rgba(0,0,0,.6); }
.lb-top { position: absolute; top: 0; left: 0; right: 0; display: flex; align-items: flex-start; gap: 8px; padding: 12px 16px; z-index: 2; background: linear-gradient(180deg, rgba(0,0,0,.55), transparent); }
.lb-top .grow { flex: 1; }
.lb-cap { font-size: 13.5px; color: #e5e7eb; max-width: 70vw; }
.lb-text { margin-top: 4px; color: #f8fafc; white-space: pre-wrap; max-height: 3.2em; overflow: hidden; }
.lb-btn { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; border: 0; background: rgba(255,255,255,.12); color: #fff; font-size: 18px; cursor: pointer; text-decoration: none; }
.lb-btn:hover { background: rgba(255,255,255,.22); }
.lb-stage { position: absolute; inset: 60px 64px 24px; display: grid; place-items: center; }
.lb-stage img, .lb-stage video { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 6px; box-shadow: 0 10px 40px rgba(0,0,0,.4); background: #000; }
.lb-nav { position: absolute; top: 50%; transform: translateY(-50%); width: 46px; height: 64px; border: 0; border-radius: 12px; background: rgba(255,255,255,.1); color: #fff; font-size: 34px; cursor: pointer; z-index: 2; }
.lb-nav:hover { background: rgba(255,255,255,.22); }
.lb-nav.prev { left: 10px; } .lb-nav.next { right: 10px; }
@media (max-width: 640px) { .lb-stage { inset: 56px 8px 16px; } .lb-nav { width: 38px; height: 54px; } }
/* Sohbet ayarları → Genel: bağlantı listesi pencerenin içinde aşağı doğru açılır (yukarı açılınca pencere kesiyordu, QR bağlantıları görünmüyordu) */
.chatset-gen .ib-sidefoot #ibConnPop { position: static; top: auto; bottom: auto; left: auto; right: auto; width: 100%; max-height: 340px; overflow-y: auto; margin-top: 6px; box-shadow: none; border: 1px solid var(--border); }
.chatset-gen .ib-foot1 { display: grid; gap: 6px; }
.ib-connhint { margin: 4px 10px 6px; }
/* 📣 Sohbet kaynağı rozeti */
.ib-srcbtn { display: inline-flex; align-items: center; max-width: 260px; padding: 2px 10px; border-radius: 999px; border: 1px solid #fed7aa; background: #fff7ed; color: #9a3412; font: inherit; font-size: 12.5px; font-weight: 700; cursor: pointer; white-space: nowrap; overflow: hidden; }
.ib-srcbtn-t { font-weight: 500; overflow: hidden; text-overflow: ellipsis; }
.ib-srcbtn.empty { border-style: dashed; background: transparent; color: var(--ink-3, #64748b); font-weight: 600; }
.ib-srcbtn.ad { border-color: #fdba74; }
.src-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 8px; }
:root[data-theme="dark"] .ib-srcbtn:not(.empty) { background: #3b1f0b; color: #fed7aa; border-color: #9a3412; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .ib-srcbtn:not(.empty) { background: #3b1f0b; color: #fed7aa; border-color: #9a3412; } }
/* 🔗 Takip linkleri */
.tl-form { display: grid; gap: 8px; padding: 12px; border: 1px dashed var(--border); border-radius: 12px; }
.tl-list { display: grid; gap: 8px; }
.tl-row { display: grid; grid-template-columns: minmax(0, 1fr) auto auto auto; gap: 12px; align-items: center; padding: 10px 12px; border: 1px solid var(--border); border-radius: 12px; }
.tl-main { min-width: 0; display: grid; gap: 3px; }
.tl-url { display: flex; gap: 6px; align-items: center; min-width: 0; }
.tl-url code { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tl-num { display: grid; justify-items: center; min-width: 48px; }
.tl-num b { font-size: 17px; } .tl-num small { color: var(--ink-3, #64748b); font-size: 11px; }
@media (max-width: 640px) { .tl-row { grid-template-columns: 1fr auto auto; } .tl-row > button { grid-column: 1 / -1; justify-self: end; } }
/* Filtre penceresi: düğmeler pencereye sığar (sağda kesilmez) */
body.newui .ib-filterpop { overflow-x: hidden; }
body.newui .ib-filterpop .ib-chips, body.newui .ib-filterpop .ib-filter, body.newui .ib-filterpop .ib-timef { display: flex; flex-wrap: wrap !important; overflow: visible !important; max-width: 100%; }
body.newui .ib-filterpop .ib-filters2 > * { max-width: 100%; }
body.newui .ib-filterpop .ib-filters2 select { width: 100%; }
/* Durum düzenleyici: ad kutusu geniş, renkler gerekirse alt satıra */
.st-row { grid-template-columns: auto auto minmax(170px, 1fr) minmax(0, auto) auto auto; }
.st-row .st-colors { max-width: 230px; }
/* Görev / anlaşma penceresinde düğme yazısı kesilmez */
.ib-taskpop .ib-noteacts .primary, .ib-taskpop .ib-noteacts .ghost { flex: none; white-space: nowrap; }
.ib-taskpop .ib-noteacts .grow { min-width: 0; }
dialog.modal.chatset { width: min(900px, calc(100vw - 24px)); }
.chatset-tabs { display: flex !important; flex-wrap: wrap; gap: 6px; }
.chatset-tabs .ib-vw { flex: none; }

/* Taslak: sohbet kartında yarım kalan mesaj */
.ib-last .ib-draft { color: #dc2626; font-weight: 600; }

/* AI rapor: özel tarih aralığı */
.ar-custom { display: flex; flex-direction: column; gap: 6px; padding-top: 8px; margin-top: 6px; border-top: 1px solid var(--border); }
.ar-custom label { display: flex; flex-direction: column; gap: 2px; font-size: 12px; color: var(--ink-2); }
.ar-custom input[type=date] { padding: 6px 8px; }

/* AI Agent durumu (sohbet başlığı): yeşil = AI cevaplıyor, gri = temsilcide */
.ib-aichip { border: 1px solid #86efac; background: #f0fdf4; color: #166534; border-radius: 999px; padding: 2px 10px; font: 600 12px/1.6 inherit; cursor: pointer; white-space: nowrap; }
.ib-aichip.off { border-color: var(--border); background: transparent; color: var(--ink-2); }
.ib-aichip:hover { filter: brightness(.97); }
@media (prefers-color-scheme: dark) { .ib-aichip { background: rgba(34,197,94,.12); color: #86efac; border-color: rgba(34,197,94,.4); } }

/* ⏱ İletişim süreleri raporu */
.rep-tabs { display: flex; gap: 6px; margin: 0 0 12px; flex-wrap: wrap; }
.rep-tabs button { border: 1px solid var(--border); background: var(--surface); border-radius: 999px; padding: 6px 14px; font-weight: 600; cursor: pointer; }
.rep-tabs button[aria-selected="true"] { background: var(--brand, #16a34a); color: #fff; border-color: transparent; }
.crep-filters { flex-wrap: wrap; gap: 8px; align-items: center; }
.crep-filters input[type=search] { min-width: 200px; }
.crep-custom { display: inline-flex; gap: 6px; align-items: center; }
.tile.ok .value { color: #15803d; } .tile.warn .value { color: #b45309; } .tile.bad .value { color: #b91c1c; }
.crep-charts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin: 16px 0; }
@media (max-width: 1100px) { .crep-charts { grid-template-columns: 1fr; } }
.hbars { display: grid; gap: 8px; padding: 6px 2px; }
.hbar { display: grid; grid-template-columns: 110px 1fr auto; gap: 8px; align-items: center; font-size: 13px; }
.hbar .hl { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink-2); }
.hbar .ht { height: 12px; background: var(--bg-2, rgba(0,0,0,.05)); border-radius: 6px; overflow: hidden; }
.hbar .ht i { display: block; height: 100%; border-radius: 6px; background: #16a34a; }
.hbar .ht i.b0, .hbar .ht i.b1 { background: #16a34a; } .hbar .ht i.b2, .hbar .ht i.b3 { background: #84cc16; }
.hbar .ht i.b4 { background: #f59e0b; } .hbar .ht i.b5, .hbar .ht i.b6 { background: #ef4444; } .hbar .ht i.bx { background: #7f1d1d; }
.hbar .ht i.ok { background: #16a34a; } .hbar .ht i.warn { background: #f59e0b; } .hbar .ht i.bad { background: #ef4444; }
.vbars { display: flex; gap: 4px; align-items: flex-end; height: 190px; padding-top: 6px; overflow-x: auto; }
.vbar { flex: 1 0 18px; display: flex; flex-direction: column; align-items: center; gap: 3px; height: 100%; font-size: 10px; }
.vbar .vt { flex: 1; width: 100%; display: flex; align-items: flex-end; background: var(--bg-2, rgba(0,0,0,.04)); border-radius: 4px; }
.vbar .vt i { display: block; width: 100%; border-radius: 4px; background: #16a34a; } .vbar .vt i.warn { background: #f59e0b; } .vbar .vt i.bad { background: #ef4444; }
.crep-table td { vertical-align: top; } .crep-table th.sortable { cursor: pointer; user-select: none; white-space: nowrap; } .crep-table th.sortable.on { color: var(--brand, #16a34a); }
.spd { display: inline-block; padding: 1px 8px; border-radius: 999px; font-weight: 600; font-size: 12px; }
.spd.ok { background: #dcfce7; color: #166534; } .spd.warn { background: #fef3c7; color: #92400e; } .spd.bad { background: #fee2e2; color: #991b1b; }
.crep-pager { gap: 8px; margin-top: 10px; align-items: center; }
.hl-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.hl-item { border: 1px solid var(--border); border-left-width: 4px; border-radius: 10px; padding: 10px 12px; }
.hl-item.neg { border-left-color: #ef4444; } .hl-item.neg.sev { background: rgba(239,68,68,.06); } .hl-item.pos { border-left-color: #16a34a; }
.hl-item blockquote { margin: 6px 0; padding: 0; color: var(--ink); white-space: pre-wrap; }
.hl-h.neg { color: #b91c1c; } .hl-h.pos { color: #15803d; }
@media (prefers-color-scheme: dark) { .spd.ok { background: rgba(34,197,94,.15); color: #86efac; } .spd.warn { background: rgba(245,158,11,.15); color: #fcd34d; } .spd.bad { background: rgba(239,68,68,.15); color: #fca5a5; } }
/* 📹 Toplantı */
.ib-addmeet:hover { border-color: #2563eb; color: #1d4ed8; }
.ib-meetpop { width: min(500px, 88vw); background: #eff6ff; border-color: #bfdbfe; max-height: min(78vh, 720px); overflow: auto; }
.ib-meetpop input, .ib-meetpop select, .ib-meetpop textarea { border-color: #bfdbfe; }
.ib-meetpop .chk-row input { width: 16px; }
.ib-meetprov { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.ib-meetprov .ib-meetopt b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; font-size: 13px; }
.ib-meetvisit textarea { resize: vertical; min-height: 64px; } .ib-meetvisit .row { flex-wrap: wrap; align-items: center; }
.ib-meetopt { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; text-align: left; padding: 8px 10px; border: 1px solid #bfdbfe; border-radius: 10px; background: #fff; cursor: pointer; font: inherit; color: inherit; }
.ib-meetopt small { color: var(--muted); font-size: 12px; overflow: hidden; text-overflow: ellipsis; max-width: 100%; white-space: nowrap; }
.ib-meetopt.on { border-color: #2563eb; box-shadow: 0 0 0 2px #2563eb33; }
.ib-meetcta { background: #fff; border: 1px dashed #93c5fd; border-radius: 10px; padding: 8px 10px; display: flex; flex-direction: column; gap: 6px; }
.ib-meetcta p { margin: 0; } .ib-meetcta .row { display: flex; gap: 6px; } .ib-meetcta .row input { flex: 1; }
.ib-meetconn p { margin: 0; }
.ib-meetchips { display: flex; flex-wrap: wrap; gap: 6px; } .ib-meetchips:empty { display: none; }
.ib-meetchips .chip { cursor: default; display: inline-flex; gap: 4px; align-items: center; }
.ib-meetprev { white-space: pre-wrap; font: 13px/1.45 system-ui, sans-serif; background: #fff; border: 1px solid #bfdbfe; border-radius: 10px; padding: 8px 10px; margin: 6px 0 0; }
.ib-notebub.meet { background: #eff6ff; border-color: #bfdbfe; } .ib-notebub.meet .ib-acthead { color: #1e40af; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .ib-meetpop, :root:not([data-theme="light"]) .ib-notebub.meet { background: #0f1b33; border-color: #1e3a8a; color: #dbeafe; } :root:not([data-theme="light"]) .ib-meetopt, :root:not([data-theme="light"]) .ib-meetcta, :root:not([data-theme="light"]) .ib-meetprev { background: #0b1426; border-color: #1e3a8a; } }
:root[data-theme="dark"] .ib-meetpop, :root[data-theme="dark"] .ib-notebub.meet { background: #0f1b33; border-color: #1e3a8a; color: #dbeafe; } :root[data-theme="dark"] .ib-meetopt, :root[data-theme="dark"] .ib-meetcta, :root[data-theme="dark"] .ib-meetprev { background: #0b1426; border-color: #1e3a8a; }
.ib-gbtn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; padding: 8px 14px; border: 1px solid #dadce0; border-radius: 999px; background: #fff; color: #3c4043; font: 600 14px system-ui, sans-serif; cursor: pointer; }
.ib-gbtn:hover { background: #f8f9fa; border-color: #c6c9cc; }
.ib-glogo { width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; font: 700 14px Arial, sans-serif; color: #fff; background: conic-gradient(#ea4335 0 25%, #fbbc05 0 50%, #34a853 0 75%, #4285f4 0); }
.ib-meetcta > .primary { align-self: flex-start; }
.ib-addmeet { display: inline-flex; align-items: center; gap: 5px; font-weight: 600; color: #1d4ed8; border-color: #bfdbfe; background: #eff6ff; }
.ib-meetico { display: inline-grid; place-items: center; line-height: 0; }
.ib-meetpop { max-height: none; overflow: auto; overscroll-behavior: contain; }
.ib-meetfoot { position: sticky; bottom: -12px; margin: 0 -12px -12px; padding: 10px 12px; background: inherit; border-top: 1px solid #bfdbfe; z-index: 1; }
/* 🔒 Kaydedilmeyecek numaralar */
.priv-add { display: flex; gap: 8px; flex-wrap: wrap; } .priv-add input { flex: 1 1 180px; }
.priv-list { display: flex; flex-direction: column; border: 1px solid var(--border); border-radius: 10px; overflow: hidden; }
.priv-row { display: flex; gap: 12px; align-items: center; padding: 8px 12px; border-top: 1px solid var(--border); } .priv-row:first-child { border-top: 0; }
.priv-list > p { margin: 0; padding: 10px 12px; }
.ib-kmenu .danger-text { color: #b91c1c; }
/* 📅 Toplantı penceresi: solda bilgiler, sağda takvim */
.ib-meetpop { width: min(940px, 94vw); font-size: 14px; }
.ib-meettitle { font-size: 16px; }
.ib-meetcols { display: grid; grid-template-columns: minmax(280px, 1fr) minmax(320px, 1.15fr); gap: 14px; align-items: start; }
.ib-meetleft { display: grid; gap: 8px; min-width: 0; }
.ib-meetright { min-width: 0; position: sticky; top: 0; }
.ib-meetlbl2 { display: grid; gap: 3px; font-size: 12px; font-weight: 600; color: #1e3a8a; }
@media (max-width: 760px) { .ib-meetcols { grid-template-columns: 1fr; } .ib-meetright { position: static; } }
.mc { background: #fff; border: 1px solid #bfdbfe; border-radius: 12px; padding: 10px; display: grid; gap: 8px; }
.mc-head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.mc-head b { font-size: 15px; } .mc-info { font-size: 12px; color: var(--muted); }
.mc-days { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.mc-day { display: grid; gap: 1px; justify-items: center; padding: 6px 2px; border: 1px solid #dbeafe; border-radius: 10px; background: #f8fbff; cursor: pointer; font: inherit; color: inherit; }
.mc-day b { font-size: 12.5px; } .mc-day span { font-size: 12px; color: var(--muted); } .mc-day small { font-size: 11px; color: #15803d; font-weight: 600; } .mc-day small.full { color: #b91c1c; }
.mc-day.on { background: #2563eb; border-color: #2563eb; color: #fff; } .mc-day.on span, .mc-day.on small { color: #e0ecff; }
.mc-body { max-height: 400px; overflow: auto; border-radius: 10px; border: 1px solid #e5edf9; }
.mc-allday { display: flex; flex-wrap: wrap; gap: 6px; padding: 6px; background: #fef3c7; font-size: 12px; }
.mc-rows { position: relative; }
.mc-row { display: grid; grid-template-columns: 52px 1fr; height: 30px; border-top: 1px solid #eef2f8; }
.mc-row:nth-child(odd) { border-top-color: #dfe7f3; }
.mc-t { font-size: 12px; color: var(--muted); padding: 2px 6px 0 0; text-align: right; transform: translateY(-9px); }
.mc-cell { border: 0; background: transparent; text-align: left; padding: 0 10px; font: 12.5px system-ui, sans-serif; color: #15803d; cursor: pointer; }
.mc-cell.free:hover { background: #dcfce7; } .mc-cell.past { color: #cbd5e1; cursor: default; background: repeating-linear-gradient(135deg, #f8fafc 0 6px, #f1f5f9 6px 12px); }
.mc-cell.busy { color: transparent; cursor: not-allowed; }
.mc-cell.sel { background: #2563eb !important; color: #fff !important; font-weight: 700; }
.mc-evs { position: absolute; inset: 0 6px 0 58px; pointer-events: none; }
.mc-ev { position: absolute; left: 0; right: 0; background: #fee2e2; border-left: 4px solid #dc2626; border-radius: 6px; padding: 2px 8px; overflow: hidden; font-size: 12px; line-height: 1.25; color: #7f1d1d; opacity: .95; }
.mc-ev.other { background: #fef3c7; border-left-color: #d97706; color: #78350f; left: 40%; }
.mc-ev.g { border-left-color: #1a73e8; background: #e8f0fe; color: #174ea6; }
.mc-ev b { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .mc-ev small { opacity: .8; }
.ib-meetpop { position: fixed !important; top: 48px !important; left: 50% !important; right: auto !important; transform: translateX(-50%); z-index: 95; box-shadow: 0 20px 60px rgba(15, 23, 42, .28), 0 0 0 100vmax rgba(15, 23, 42, .18); }
/* 🆕 Yenilikler */
.news-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: #ef4444; margin-left: 6px; vertical-align: middle; box-shadow: 0 0 0 3px #fee2e2; }
.news { display: grid; gap: 16px; max-width: 880px; }
.news-rel { display: grid; gap: 6px; position: relative; padding-left: 22px; border-left: 4px solid #e2e8f0; }
.news-rel.latest { border-left-color: #16a34a; box-shadow: 0 6px 24px rgba(22, 163, 74, .12); }
.news-head { display: flex; gap: 10px; align-items: center; }
.news-head time { font-size: 13px; font-weight: 700; color: #15803d; text-transform: uppercase; letter-spacing: .04em; }
.news-badge { font-size: 11px; font-weight: 700; color: #fff; background: #16a34a; border-radius: 999px; padding: 2px 8px; }
.news-rel h2 { margin: 0; font-size: 21px; } .news-sum { margin: 0 0 4px; color: var(--muted); font-size: 15px; }
.news-items { list-style: none; margin: 4px 0 0; padding: 0; display: grid; gap: 12px; }
.news-items li { display: grid; grid-template-columns: 34px 1fr; gap: 10px; align-items: start; }
.news-ic { width: 34px; height: 34px; border-radius: 10px; background: #f1f5f9; display: grid; place-items: center; font-size: 18px; }
.news-t { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; } .news-t b { font-size: 15px; }
.news-items p { margin: 2px 0 0; color: var(--ink); opacity: .85; line-height: 1.5; font-size: 14px; }
.news-tag { font-size: 11px; font-weight: 700; border-radius: 999px; padding: 1px 8px; }
.news-tag.n-new { background: #dcfce7; color: #166534; } .news-tag.n-imp { background: #dbeafe; color: #1e40af; } .news-tag.n-fix { background: #fef3c7; color: #92400e; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .news-ic { background: #1f2937; } :root:not([data-theme="light"]) .news-rel { border-left-color: #334155; } }
:root[data-theme="dark"] .news-ic { background: #1f2937; } :root[data-theme="dark"] .news-rel { border-left-color: #334155; }
.mc-weekrow { display: flex; align-items: center; gap: 8px; }
.mc-wk { flex: 1; text-align: center; font-size: 13px; font-weight: 600; color: #1e3a8a; }
.mc-nav { width: 32px; height: 28px; border: 1px solid #bfdbfe; border-radius: 8px; background: #fff; font-size: 18px; line-height: 1; cursor: pointer; color: #1d4ed8; }
.mc-nav:disabled { opacity: .35; cursor: default; }
.mc-warn { color: #b45309; }
.ib-excl { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 600; color: #92400e; background: #fef3c7; border: 1px solid #fde68a; border-radius: 999px; padding: 2px 8px; white-space: nowrap; }
.bxb { margin-top: 12px; border: 1px solid var(--border); border-radius: 12px; padding: 10px 14px; background: var(--surface); }
.bxb summary { cursor: pointer; font-weight: 700; }
.bxb-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; margin-top: 8px; }
.bxb-list { margin: 4px 0 0; padding-left: 20px; font-size: 13px; } .bxb-list li { margin: 2px 0; } .bxb-list code { font-size: 12px; }

/* 👁 Gözlemciler */
.ib-watchers { position: relative; display: flex; flex-wrap: wrap; gap: 4px; align-items: center; min-width: 0; }
.ib-watchchip { display: inline-flex; align-items: center; gap: 2px; font-size: 12px; padding: 2px 6px; cursor: default; max-width: 100%; }
.ib-watchchip .linkish { padding: 0 2px; }
.ib-watchadd { font: inherit; font-size: 12px; border: 1px dashed var(--border); background: transparent; color: var(--muted); border-radius: 999px; padding: 2px 8px; cursor: pointer; }
.ib-watchadd:hover { border-color: #2563eb; color: #1d4ed8; }
.ib-watchpop { position: absolute; right: 0; top: calc(100% + 4px); z-index: 60; width: 260px; display: flex; flex-direction: column; gap: 6px; padding: 10px; }
.ib-watchpop p { margin: 0; }
.ib-watchlist { max-height: 240px; overflow: auto; display: flex; flex-direction: column; }

/* ---- Bitrix24 içi: menü solda, daraltılabilir (çerçeve içeriğe göre büyüdüğü için yapışkan değil, 100vh yok) ---- */
@media (min-width: 900px) {
  /* Menü sayfa yüksekliğini belirlemez (çerçeve içerik kadar büyür): mutlak konumlu, kendi içinde kayar; yükseklik içerikten gelir */
  body.bx-side { display: block; position: relative; min-height: 640px; padding-left: 216px; box-sizing: border-box; }
  body.bx-side.nav-mini { padding-left: 64px; }
  body.bx-side.crmtab-mode, body.bx-side.live-mode, body.bx-side.ib-full, body.bx-side.mon-full { padding-left: 0; }
  body.bx-side main { min-width: 0; max-width: none; box-sizing: border-box; padding: 16px 20px 24px; }
  body.bx-side:not(.panel-mode) .topbar { position: absolute; top: 0; bottom: 0; left: 0; width: 216px; height: auto; min-height: 0; overflow-y: auto; overflow-x: hidden; scrollbar-width: thin; flex-direction: column; flex-wrap: nowrap; align-items: stretch; gap: 12px; padding: 16px 10px; border-bottom: 0; border-right: 1px solid #cdeedd; box-sizing: border-box;
    background: linear-gradient(180deg, #ecfdf3 0%, #e6f6ee 100%); }
  body.bx-side .topbar .brand { padding: 0 8px 4px; }
  body.bx-side:not(.panel-mode) .tabs { flex-direction: column; flex: none; height: auto; gap: 2px; }
  body.bx-side:not(.panel-mode) .tabs > button, body.bx-side:not(.panel-mode) .tabs .tab-gtoggle { height: auto; text-align: left; padding: 9px 12px; border-bottom: 0; border-radius: 8px; display: flex; gap: 10px; align-items: center; white-space: nowrap; }
  body.bx-side:not(.panel-mode) .tabs button[aria-selected="true"] { background: rgba(255,255,255,.85); color: var(--accent); font-weight: 650; }
  body.bx-side .tabs .ti { display: inline; width: 20px; text-align: center; }
  body.bx-side .tabs .wa-ic, body.bx-side .tabs .meta-ic { width: 20px; justify-content: center; }
  body.bx-side:not(.panel-mode) .tab-group { flex-direction: column; height: auto; }
  body.bx-side .tab-group.has-sel > .tab-gtoggle { background: none; color: var(--ink); font-weight: 650; }
  body.bx-side .tab-gtoggle .tab-caret { margin-left: auto; }
  body.bx-side .tab-sub { position: static; min-width: 0; padding: 2px 0 4px 14px; border: 0; box-shadow: none; background: transparent; border-radius: 0; margin-left: 10px; border-left: 2px solid #cdeedd; }
  body.bx-side .tabs .tab-soon { display: flex; }
  body.bx-side .tabs .tab-soon .soon-lbl { flex: 1; flex-direction: row; justify-content: space-between; gap: 8px; }
  body.bx-side .tab-more { display: none !important; }
  body.bx-side:not(.panel-mode) .topbar > .spacer { flex: 0 0 4px; }
  body.bx-side:not(.panel-mode) #panelBtn, body.bx-side #langBtn, body.bx-side #logoutBtn { margin-left: 0; justify-content: center; white-space: nowrap; }
  body.bx-side .credit-badge { align-self: stretch; justify-content: center; }
  body.bx-side .nav-collapse { display: grid; place-items: center; position: absolute; top: 16px; right: 8px; width: 28px; height: 28px; border-radius: 8px; border: 1px solid #cdeedd; background: #fff; color: var(--ink-2); cursor: pointer; font-size: 15px; font-weight: 800; z-index: 2; }
  body.bx-side .nav-collapse:hover { color: var(--accent); border-color: var(--accent); }
  body.bx-side.nav-mini .topbar { padding: 16px 6px; }
  body.bx-side.nav-mini .nav-collapse { top: 50px; right: 50%; transform: translateX(50%); }
  body.bx-side.nav-mini .topbar .brand { justify-content: center; padding: 0 0 36px; }
}
@media (min-width: 900px) and (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) body.bx-side:not(.panel-mode) .topbar { background: linear-gradient(180deg,#10261a 0%,#0f1f17 100%); border-right-color: #1f3a2b; }
  :root:not([data-theme="light"]) body.bx-side .nav-collapse { background: #1f1f1e; border-color: #1f3a2b; }
  :root:not([data-theme="light"]) body.bx-side:not(.panel-mode) .tabs button[aria-selected="true"] { background: rgba(255,255,255,.10); }
}
@media (min-width: 900px) {
  :root[data-theme="dark"] body.bx-side:not(.panel-mode) .topbar { background: linear-gradient(180deg,#10261a 0%,#0f1f17 100%); border-right-color: #1f3a2b; }
  :root[data-theme="dark"] body.bx-side .nav-collapse { background: #1f1f1e; border-color: #1f3a2b; }
  :root[data-theme="dark"] body.bx-side:not(.panel-mode) .tabs button[aria-selected="true"] { background: rgba(255,255,255,.10); }
}

/* ---- Sol menü rengi (yalnız sol menü görünürken: body.side-on) — çalışan Ayarlar'dan seçer, varsayılan koyu yeşil ---- */
body { --nav-bg: linear-gradient(180deg, #0f3d26 0%, #0a2b1b 100%); --nav-edge: #0a2b1b; --nav-ink: rgba(255,255,255,.82); --nav-strong: #fff; --nav-hover: rgba(255,255,255,.08);
  --nav-sel: rgba(74,222,128,.18); --nav-bar: #4ade80; --nav-muted: rgba(255,255,255,.55); --nav-sep: rgba(255,255,255,.14); --nav-btn: rgba(255,255,255,.10); --nav-btn-edge: rgba(255,255,255,.2); --nav-brand: #4ade80; }
body.menu-graphite { --nav-bg: #17191c; --nav-edge: #0e0f11; --nav-sel: rgba(74,222,128,.14); --nav-sep: rgba(255,255,255,.09); }
body.menu-navy { --nav-bg: linear-gradient(180deg, #0f2233 0%, #0b1826 100%); --nav-edge: #0b1826; --nav-sel: rgba(74,222,128,.16); --nav-sep: rgba(255,255,255,.10); }
body.menu-light { --nav-bg: #f7faf8; --nav-edge: #e3e9e5; --nav-ink: #374151; --nav-strong: #111827; --nav-hover: #eef3f0; --nav-sel: #e3f5ea; --nav-bar: #16a34a;
  --nav-muted: #9ca3af; --nav-sep: #e3e9e5; --nav-btn: #fff; --nav-btn-edge: #d9e2dc; --nav-brand: #16a34a; }
body.menu-light.side-on .tabs button[aria-selected="true"] { color: #15803d !important; }
body.side-on .topbar, :root[data-theme] body.side-on .topbar { background: var(--nav-bg) !important; border-right: 1px solid var(--nav-edge) !important; color: var(--nav-strong); }
body.side-on .topbar .brand .word { color: var(--nav-strong); }
body.side-on .topbar .brand .word b { color: var(--nav-brand); }
body.side-on .tabs button { color: var(--nav-ink) !important; }
body.side-on .tabs button:hover { background: var(--nav-hover) !important; color: var(--nav-strong) !important; }
body.side-on .tabs button[aria-selected="true"] { background: var(--nav-sel) !important; color: var(--nav-strong) !important; font-weight: 650; box-shadow: inset 3px 0 0 var(--nav-bar); }
body.side-on .tab-group.has-sel > .tab-gtoggle { color: var(--nav-strong) !important; background: none !important; box-shadow: none; }
body.side-on .tab-caret { color: var(--nav-muted); }
body.side-on .tab-sub { border-left-color: var(--nav-sep) !important; background: transparent !important; }
body.side-on .tabs .tab-soon { color: var(--nav-muted) !important; }
body.side-on .side-user { border-top-color: var(--nav-sep); color: var(--nav-strong); }
body.side-on .side-user .muted { color: var(--nav-muted); }
body.side-on .topbar button.ghost { background: var(--nav-btn) !important; color: var(--nav-strong); border-color: var(--nav-btn-edge); }
body.side-on .topbar button.ghost:hover { background: var(--nav-hover) !important; }
body.side-on .nav-collapse, :root[data-theme] body.side-on .nav-collapse { background: var(--nav-btn) !important; border-color: var(--nav-btn-edge) !important; color: var(--nav-strong) !important; }
body.side-on .nav-collapse:hover { border-color: var(--nav-bar) !important; }
body.side-on.nav-mini .tab-badge { box-shadow: 0 0 0 2px var(--nav-edge); }
/* Grup çizgileri: Sohbetler · Bağlantılar · AI Agent | Canlı Monitör · Rapor · İstatistikler | Ödeme · Ayarlar · İzinler | Yenilikler · Destek */
body.side-on .tabs [data-tab="monitor"], body.side-on .tabs [data-tab="settings"], body.side-on .tabs [data-tab="news"] { margin-top: 11px !important; position: relative; overflow: visible; }
body.side-on .tabs [data-tab="monitor"]::before, body.side-on .tabs [data-tab="settings"]::before, body.side-on .tabs [data-tab="news"]::before { content: ''; position: absolute; left: 10px; right: 10px; top: -7px; height: 1px; background: var(--nav-sep); pointer-events: none; }

/* Ayarlar → Menü rengi */
.menu-themes { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin-top: 10px; }
.menu-theme { display: grid; gap: 8px; padding: 10px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); color: var(--ink); font: inherit; cursor: pointer; text-align: left; }
.menu-theme:hover { border-color: var(--accent); }
.menu-theme[aria-pressed="true"] { border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 18%, transparent); }
.menu-theme .mt-sw { display: grid; gap: 4px; height: 64px; padding: 8px; border-radius: 8px; align-content: start; }
.menu-theme .mt-sw i { display: block; height: 7px; border-radius: 4px; background: rgba(255,255,255,.35); }
.menu-theme .mt-sw i.on { background: #4ade80; width: 70%; }
.menu-theme .mt-sw i:nth-child(3) { width: 80%; } .menu-theme .mt-sw i:nth-child(4) { width: 60%; }
.menu-theme .mt-sw.light i { background: #d1d5db; }
.menu-theme .mt-sw.light i.on { background: #16a34a; }
.menu-theme b { font-size: 13.5px; }
/* Yönetim → Bağlantılar: bağlı ama ödenmemiş */
#acTiles .tile.hl-warning { border-color: #f0a020; background: #fff8eb; }
.unpaid-tag { display: inline-block; margin-top: 4px; font-size: 12px; font-weight: 650; color: #8a5300; background: #fff4e0; border: 1px solid #f6d08a; border-radius: 999px; padding: 1px 8px; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) #acTiles .tile.hl-warning { background: #2a2010; } :root:not([data-theme="light"]) .unpaid-tag { background: #2a2010; color: #f6c46a; border-color: #5a4318; } }
:root[data-theme="dark"] #acTiles .tile.hl-warning { background: #2a2010; } :root[data-theme="dark"] .unpaid-tag { background: #2a2010; color: #f6c46a; border-color: #5a4318; }
.sales-chips { display: flex; gap: 6px; flex-wrap: wrap; }
.sales-chips .chip { font: inherit; font-size: 13px; border: 1px solid var(--border); background: var(--surface); color: var(--ink-2); border-radius: 999px; padding: 4px 11px; cursor: pointer; }
.sales-chips .chip[aria-pressed="true"] { border-color: var(--accent); color: var(--accent); background: color-mix(in srgb, var(--accent) 10%, transparent); font-weight: 650; }
/* Lisansı biten numaranın sohbeti: içerik gizli */
.ib-locked { margin: auto; max-width: 420px; padding: 32px 24px; text-align: center; display: grid; gap: 8px; justify-items: center; }
.ib-locked-ic { font-size: 40px; line-height: 1; }
.ib-locked h3 { margin: 4px 0 0; }
.ib-locked p { margin: 0; }
.ib-locked .primary { margin-top: 8px; }

/* ---- 🧭 Chat Analiz ---- */
.ins-boxes { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; margin: 14px 0; }
@media (max-width: 1000px) { .ins-boxes { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.ins-box { --c: #6b7280; display: grid; gap: 4px; text-align: left; padding: 14px 16px; border-radius: 14px; border: 0; cursor: pointer; font: inherit; color: #fff;
  background: var(--c); box-shadow: 0 2px 10px color-mix(in srgb, var(--c) 30%, transparent); transition: transform .12s, box-shadow .12s; position: relative; }
.ins-box:hover { transform: translateY(-2px); }
.ins-box[aria-pressed="true"] { outline: 3px solid color-mix(in srgb, var(--c) 45%, #fff); outline-offset: 2px; }
.ins-box .ins-ic { font-size: 20px; line-height: 1; }
.ins-box .ins-label { font-weight: 700; font-size: 14px; opacity: .95; }
.ins-box .ins-n { font-size: 30px; line-height: 1.1; }
.ins-box small { opacity: .85; font-size: 12px; }
.ins-box.ins-crisis { --c: #dc2626; } .ins-box.ins-happy { --c: #2563eb; } .ins-box.ins-complaint { --c: #111827; }
.ins-box.ins-sales { --c: #16a34a; } .ins-box.ins-neutral { --c: #f59e0b; color: #1f1300; }
.ins-notice { border-left: 4px solid #f59e0b; display: flex; align-items: center; flex-wrap: wrap; gap: 4px; }
.ins-row { --c: #f59e0b; display: flex; gap: 14px; align-items: center; justify-content: space-between; padding: 12px 14px; border-bottom: 1px solid var(--border); border-left: 4px solid var(--c); border-radius: 4px; }
.ins-row:last-child { border-bottom: 0; }
.ins-row.ins-crisis { --c: #dc2626; } .ins-row.ins-happy { --c: #2563eb; } .ins-row.ins-complaint { --c: #111827; } .ins-row.ins-sales { --c: #16a34a; }
.ins-main { min-width: 0; display: grid; gap: 3px; }
.ins-title { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.ins-title b { font-size: 15.5px; }
.ins-tag { font-size: 11.5px; font-weight: 700; padding: 1px 8px; border-radius: 999px; color: #fff; background: var(--c); }
.ins-row.ins-neutral .ins-tag { color: #1f1300; }
.ins-note { color: var(--ink); font-size: 14px; }
.ins-acts { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; flex: none; }

@media (max-width: 760px) { .ins-row { flex-direction: column; align-items: stretch; } .ins-acts { justify-content: flex-start; } }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .ins-box.ins-complaint, :root:not([data-theme="light"]) .ins-row.ins-complaint { --c: #4b5563; } }
:root[data-theme="dark"] .ins-box.ins-complaint, :root[data-theme="dark"] .ins-row.ins-complaint { --c: #4b5563; }

/* ---- İstatistikler: yoğunluk haritası ve çubuklar ---- */
.heatmap { display: grid; gap: 3px; overflow-x: auto; padding-bottom: 4px; }
.hm-row { display: grid; grid-template-columns: 38px repeat(24, minmax(14px, 1fr)); gap: 3px; align-items: center; }
.hm-d, .hm-h { font-size: 11px; color: var(--muted); }
.hm-h { text-align: left; }
.hm-c { aspect-ratio: 1.6; border-radius: 4px; background: color-mix(in srgb, #16a34a calc(var(--a) * 100%), var(--surface-2, #f1f5f3)); min-height: 14px; }
.hbars { display: grid; gap: 8px; margin-top: 6px; }
.hb { display: grid; grid-template-columns: 110px 1fr auto; gap: 10px; align-items: center; font-size: 13px; }
.hb-t { height: 12px; border-radius: 6px; background: var(--surface-2, #f1f5f3); overflow: hidden; }
.hb-t i { display: block; height: 100%; border-radius: 6px; background: #16a34a; }
.hb b { font-size: 12.5px; white-space: nowrap; }
.vbars { display: flex; align-items: flex-end; gap: 3px; height: 160px; margin-top: 10px; }
.vb { flex: 1; min-width: 0; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 4px; }
.vb i { display: block; width: 100%; background: #2563eb; border-radius: 4px 4px 0 0; }
.vb small { font-size: 10px; color: var(--muted); height: 12px; white-space: nowrap; }
#respHourBars .vb i { background: #f59e0b; }
.ins-acts .ins-link { display: inline-flex; align-items: center; padding: 5px 11px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); color: var(--ink); font-size: 13px; font-weight: 600; text-decoration: none; }
.ins-acts .ins-link:hover { border-color: var(--accent); color: var(--accent); }
#insListTitle { display: flex; align-items: center; flex-wrap: wrap; gap: 4px; }
.ins-tagsel { appearance: none; -webkit-appearance: none; border: 0; cursor: pointer; font: inherit; font-size: 11.5px; font-weight: 700; padding: 2px 22px 2px 9px;
  background: var(--c) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='white'/%3E%3C/svg%3E") no-repeat right 8px center; }
.ins-tagsel:focus-visible { outline: 2px solid var(--c); outline-offset: 2px; }
.ins-tagsel option { color: #111; background: #fff; }
.ins-row.ins-neutral .ins-tagsel { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%231f1300'/%3E%3C/svg%3E"); }
.ins-done { background: #16a34a; color: #fff; border: 0; font-weight: 700; }
.ins-done:hover { background: #15803d; }
/* Chat Analiz: seçili kutu beyaz zemin, yazı ve çerçeve kutunun renginde */
.ins-boxes .ins-box[aria-pressed="true"] { background: #fff !important; color: var(--c) !important; outline: 0; box-shadow: inset 0 0 0 3px var(--c), 0 4px 14px color-mix(in srgb, var(--c) 35%, transparent); }
.ins-boxes .ins-box.ins-neutral[aria-pressed="true"] { --c: #b45309; }
.ins-boxes .ins-box[aria-pressed="true"] small, .ins-boxes .ins-box[aria-pressed="true"] .ins-label { opacity: 1; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .ins-boxes .ins-box[aria-pressed="true"] { background: var(--surface) !important; } :root:not([data-theme="light"]) .ins-boxes .ins-box.ins-complaint[aria-pressed="true"] { --c: #d1d5db; } }
:root[data-theme="dark"] .ins-boxes .ins-box[aria-pressed="true"] { background: var(--surface) !important; }
:root[data-theme="dark"] .ins-boxes .ins-box.ins-complaint[aria-pressed="true"] { --c: #d1d5db; }
/* Chat Analiz kutuları: genel button:hover (açık zemin) kutunun rengini ezmesin */
.ins-boxes .ins-box:not([aria-pressed="true"]):hover { background: var(--c); filter: brightness(1.08); }
.ins-boxes .ins-box[aria-pressed="true"]:hover { background: #fff !important; filter: none; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .ins-boxes .ins-box[aria-pressed="true"]:hover { background: var(--surface) !important; } }
:root[data-theme="dark"] .ins-boxes .ins-box[aria-pressed="true"]:hover { background: var(--surface) !important; }

/* Bitrix24 içi: daraltılmış menü genişliği; menü öğeleri kaymasın */
@media (min-width: 900px) {
  body.bx-side.nav-mini:not(.panel-mode) .topbar { width: 64px; }
  body.bx-side:not(.panel-mode) .topbar > * { flex-shrink: 0; }
}
/* Bitrix24 çerçevesi içerik kadar uzun: pencereler çerçevenin ortasında (görünmeyen yerde) değil, üstte açılır; sayfa oraya kaydırılır */
body.bx-frame dialog[open] { position: fixed; top: 16px; margin: 0 auto; max-height: var(--dlg-max, 80vh); overflow: auto; }

/* ---- 🗂 Yönetim: Müşteri Yönetimi ---- */
.cm-picklist { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 8px; max-height: 70vh; overflow: auto; }
.cm-pick { display: grid; gap: 3px; text-align: left; padding: 10px 12px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); color: var(--ink); font: inherit; cursor: pointer; }
.cm-pick:hover { border-color: var(--accent); background: var(--surface); }
.cm-pick .state { justify-self: start; }
.cm-head { display: grid; gap: 10px; }
.cm-title { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.cm-tiles { margin: 4px 0 0; }
.cm-notes { display: grid; grid-template-columns: minmax(200px, 1fr) minmax(260px, 2fr) auto; gap: 10px; align-items: end; }
.cm-notes textarea, .cm-notes input { width: 100%; box-sizing: border-box; }
@media (max-width: 900px) { .cm-notes { grid-template-columns: 1fr; } }
.cm-tabs { margin: 12px 0; }
.cm-tabs .chip { font-size: 14px; padding: 6px 14px; display: inline-flex; align-items: center; gap: 6px; }
.cm-tabs .tab-badge { margin-left: 2px; }
.cm-line { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; padding: 10px 0; border-top: 1px solid var(--border); }
.cm-grant { display: inline-flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.cm-grant select { padding: 4px 8px; }
.cm-ticket { border: 1px solid var(--border); border-radius: 10px; padding: 10px 12px; display: grid; gap: 6px; }
.cm-last { background: var(--surface-2); border-radius: 8px; padding: 8px 10px; font-size: 13.5px; white-space: pre-wrap; }
/* Sohbetler → Filtre: bağlantı seçimi (çipler) */
.ib-fpconns { display: grid; gap: 2px; max-height: 260px; overflow-y: auto; padding: 2px; border: 1px solid var(--border); border-radius: 12px; }
.ib-fpconns .ib-popgrp { padding: 6px 10px 2px; }
.chatset-gen .ib-connpick { display: none !important; } /* bağlantı seçimi Filtre penceresinde */

/* ===================== Bitrix24 mobil uygulaması (body.bxm) =====================
   Market → ChatPilot ya da sohbetteki Uygulamalar menüsünden açılır. WhatsApp benzeri sade liste,
   daraltılmış sohbet başlığı ve altta sekme çubuğu. Masaüstü ve panel görünümünü etkilemez. */
body.bxm { --bxm-nav: 60px; background: var(--surface, #fff); }
body.bxm .ib-sidefoot { display: none !important; }
body.bxm .ibx .inbox, body.bxm:not(.panel-mode):not(.crmtab-mode) .ibx .inbox { height: calc(var(--vh, 100dvh) - var(--bxm-nav) - env(safe-area-inset-bottom)) !important; }
body.bxm:has(.inbox.thread-open) .ibx .inbox { height: var(--vh, 100dvh) !important; }
body.bxm .ibx, body.bxm .ibx .ib-side { background: var(--surface, #fff); }
/* Üst kısım: başlık + arama */
body.bxm .ib-tools { padding: 12px 14px 6px; }
body.bxm .ib-titlerow h2 { font-size: 24px; font-weight: 750; letter-spacing: -.01em; }
body.bxm .ib-titlerow .ib-minibtn, body.bxm .ib-titlerow .ib-ham, body.bxm .ib-titlebtns { display: none !important; }
body.bxm .ib-searchrow { gap: 8px; }
body.bxm .ib-searchbtn { flex: 1; justify-content: flex-start; border-radius: 12px; background: var(--surface-2, #f1f2f4); border-color: transparent; min-height: 40px; color: var(--ink-3, #64748b); }
/* Durumlar: küçük yatay hap satırı */
body.bxm .ib-stbar { display: flex; gap: 6px; padding: 4px 14px 8px; overflow-x: auto; scrollbar-width: none; }
body.bxm .ib-stbar::-webkit-scrollbar { display: none; }
body.bxm .ib-stbtn { flex: none; display: inline-flex !important; align-items: center; gap: 5px; padding: 6px 12px; border-radius: 999px; min-height: 34px; font-size: 13px; }
body.bxm .ib-stbtn .ib-stlbl { font-size: 13px; color: var(--ink-2, #334155); }
body.bxm .ib-stbtn[aria-pressed="true"] { border-color: var(--stc); background: color-mix(in srgb, var(--stc) 10%, transparent); }
body.bxm .ib-stbtn .ib-stic { font-size: 11px; }
body.bxm .ib-stbtn b { font-size: 13px; }
/* Liste: tek satırlık sade kart, ayırıcı çizgi */
body.bxm .ibx .ib-list { padding: 0; }
body.bxm .ibx .ib-item { margin: 0; width: 100%; border-radius: 0; border: 0; border-bottom: 1px solid var(--border, #eceef1); box-shadow: none; padding: 10px 14px; min-height: 72px; background: transparent; gap: 12px; align-items: center; }
body.bxm .ibx .ib-item:active, body.bxm .ibx .ib-item.active { background: var(--surface-2, #f4f5f7); }
body.bxm .ib-item .ib-av { width: 50px; height: 50px; flex: none; font-size: 16px; }
body.bxm .ib-item .ib-meta { gap: 3px; min-width: 0; }
body.bxm .ib-item .ib-row1 b { font-size: 16px; font-weight: 650; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
body.bxm .ib-item .ib-time { font-size: 12px; }
body.bxm .ib-item .ib-row2 { font-size: 14px; }
body.bxm .ib-item .ib-last { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink-3, #64748b); }
body.bxm .ib-item .ib-row-crm, body.bxm .ib-item .ib-row3 { display: none !important; }
/* Sohbet: daraltılmış başlıkta yalnız geri, kişi ve ⌄ / ⋮ */
body.bxm .ib-head { flex-wrap: nowrap; padding: 8px 8px !important; gap: 8px; border-bottom: 1px solid var(--border, #eceef1); }
body.bxm .inbox.head-mini .ib-headright, body.bxm .inbox.head-mini .ib-metarow, body.bxm .inbox.head-mini .ib-aisum, body.bxm .inbox.head-mini #ibHeadLine { display: none !important; }
body.bxm .inbox:not(.head-mini) .ib-head { flex-wrap: wrap; }
body.bxm .ib-head .ib-title > b { font-size: 16px; }
body.bxm .ib-head .ib-title > .muted { font-size: 12px; }
body.bxm .ib-headmini { width: 38px; height: 38px; border-radius: 50%; font-size: 18px; }
/* Mesajlar: işlem düğmeleri yalnız dokunulan mesajda */
body.bxm .ib-acts { display: none !important; }
body.bxm .ib-msg.tapped .ib-acts { display: flex !important; opacity: 1; position: static; transform: none; padding: 4px 0 0; justify-content: flex-end; flex-wrap: wrap; }
body.bxm .ib-msg.in.tapped .ib-acts { justify-content: flex-start; }
body.bxm .ib-acts button { width: 34px; height: 34px; font-size: 15px; }
body.bxm .ib-msg { max-width: 86%; }
/* Alt sekme çubuğu (sohbet açıkken gizli) */
.bxm-nav, .bxm-scrim { display: none; }
body.bxm .bxm-nav { display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 60; height: calc(var(--bxm-nav) + env(safe-area-inset-bottom)); padding: 4px 6px env(safe-area-inset-bottom); background: var(--surface, #fff); border-top: 1px solid var(--border, #eceef1); }
body.bxm .bxm-nav button { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; border: 0; background: none; font: 600 11px/1.2 inherit; color: var(--ink-3, #64748b); border-radius: 12px; cursor: pointer; }
body.bxm .bxm-nav button span { font-size: 21px; line-height: 1.1; }
body.bxm .bxm-nav button[aria-current="true"] { color: #15803d; }
body.bxm:has(.inbox.thread-open) .bxm-nav { display: none; }
/* "Diğer": bağlantı seçimi, çeviri, ses, görünüm alttan panelde */
body.bxm.bxm-sheet .bxm-scrim { display: block; position: fixed; inset: 0; z-index: 61; background: rgba(0, 0, 0, .35); }
body.bxm.bxm-sheet .ib-sidefoot { display: flex !important; flex-direction: column; align-items: stretch; gap: 10px; position: fixed; left: 0; right: 0; bottom: 0; z-index: 62; padding: 16px 16px calc(16px + env(safe-area-inset-bottom)); border-radius: 18px 18px 0 0; background: var(--surface, #fff); box-shadow: 0 -10px 40px rgba(0, 0, 0, .25); }
body.bxm.bxm-sheet .ib-sidefoot > * { width: 100%; max-width: none; }
body.bxm.bxm-sheet .ib-sidefoot .ib-user { display: block !important; }
body.bxm #ibInstall, body.bxm #ibFull, body.bxm #ibPhone { display: none !important; }
:root[data-theme="dark"] body.bxm .bxm-nav, :root[data-theme="dark"] body.bxm.bxm-sheet .ib-sidefoot { background: #1a1a19; border-color: #2a2a28; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) body.bxm .bxm-nav, :root:not([data-theme="light"]) body.bxm.bxm-sheet .ib-sidefoot { background: #1a1a19; border-color: #2a2a28; } }
body.bxm.bxm-sheet .ib-foot1 { display: flex; flex-direction: column; align-items: stretch; gap: 10px; }
body.bxm.bxm-sheet .ib-foot1 .ib-user { display: flex !important; flex-direction: column; gap: 2px; font-size: 15px; }
body.bxm.bxm-sheet .ib-connpick, body.bxm.bxm-sheet .ib-connpick > button { width: 100%; justify-content: flex-start; min-height: 44px; }
body.bxm.bxm-sheet .ib-foot2 { display: flex; flex-wrap: wrap; gap: 8px; }
body.bxm.bxm-sheet .ib-foot2 .ib-trsel { flex: 1 1 100%; min-height: 44px; }
body.bxm.bxm-sheet .ib-foot2 .ib-fullbtn { min-width: 48px; min-height: 44px; }
body.bxm:has(.inbox.thread-open) .bxm-scrim, body.bxm.bxm-sheet:has(.inbox.thread-open) .ib-sidefoot { display: none !important; }
/* Herkesten silinen mesaj */
.ib-msg.deleted .ib-bub { opacity: .75; }
.ib-deleted { font-style: italic; color: var(--ink-3, #64748b); font-size: 13.5px; }
/* Yazma alanı (WhatsApp düzeni): dosyanın sonundaki "Sohbet: WhatsApp görünümü" bölümünde */
/* Daraltılmış başlıkta işlem satırı görünmez ama içindeki pencereler (görev, anlaşma, etkinlik) mesajdan açılabilir */
body.bxm .inbox.head-mini .ib-metarow { display: flex !important; visibility: hidden; height: 0; min-height: 0; padding: 0 !important; border: 0; overflow: visible !important; }
body.bxm .inbox.head-mini .ib-metarow .ib-pop { visibility: visible; }
/* Mobil formlar: açıklama ayrı satırda, düğmeler büyük ve tam genişlik (parmakla kolay basılsın) */
body.bxm .ib-pop .ib-noteacts { flex-wrap: wrap; }
body.bxm .ib-pop .ib-noteacts .grow { flex: 1 1 100%; }
body.bxm .ib-pop .ib-noteacts > button, body.bxm .ib-pop .row.end > button { flex: 1 1 0; min-height: 46px; font-size: 15px; }
body.bxm .ib-pop input, body.bxm .ib-pop select, body.bxm .ib-pop textarea { min-height: 44px; }
/* Mobil: mesaja basılı tutunca menü, sağa kaydırınca alıntı. Tek dokunuşta düğme çıkmaz. */
body.bxm .ib-msg { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
body.bxm .ib-msg.tapped .ib-acts { display: none !important; }
.bxm-menu { position: fixed; inset: 0; z-index: 300; background: rgba(0, 0, 0, .28); backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px); display: flex; flex-direction: column; justify-content: flex-end; padding: 12px 12px calc(16px + env(safe-area-inset-bottom)); animation: bxmIn .14s ease-out; }
@keyframes bxmIn { from { opacity: 0; } to { opacity: 1; } }
.bxm-msheet { display: grid; gap: 10px; }
.bxm-reacts { display: flex; justify-content: space-between; gap: 2px; padding: 8px 10px; border-radius: 999px; background: var(--surface, #fff); box-shadow: 0 8px 30px rgba(0, 0, 0, .18); }
.bxm-reacts button { border: 0; background: none; font-size: 30px; line-height: 1; padding: 4px; border-radius: 50%; cursor: pointer; }
.bxm-reacts button.on { background: var(--surface-2, #eef0f3); }
.bxm-mlist { display: grid; border-radius: 16px; overflow: hidden; background: var(--surface, #fff); box-shadow: 0 8px 30px rgba(0, 0, 0, .18); }
.bxm-mi { display: flex; align-items: center; gap: 14px; border: 0; border-bottom: 1px solid var(--border, #eceef1); background: none; padding: 14px 18px; font: 500 17px/1.2 inherit; color: var(--ink, #111); text-align: left; cursor: pointer; }
.bxm-mi:last-child { border-bottom: 0; }
.bxm-mi:active { background: var(--surface-2, #f4f5f7); }
.bxm-mi.danger { color: #dc2626; }
.bxm-mic { width: 24px; text-align: center; font-size: 19px; }
:root[data-theme="dark"] .bxm-reacts, :root[data-theme="dark"] .bxm-mlist { background: #262624; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .bxm-reacts, :root:not([data-theme="light"]) .bxm-mlist { background: #262624; } }
/* Mobil: üst şeritteki Görev / Anlaşma / Etkinlik ekle gizli (mesaja basılı tutunca menüden açılır); şerit Toplantı ile başlar.
   Kapları DOM'da kalır: içlerindeki formlar menüden açılıyor. */
body.bxm .ib-metarow .ib-btngrp > .ib-tagwrap:nth-child(-n+3) > .ib-addtag { display: none !important; }
body.bxm .ib-item { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
/* Mobil başlık: ← listeye dön, → sıradaki sohbet */
.ib-next { display: none; }
body.bxm .ib-next { display: inline-grid !important; place-items: center; width: 38px; height: 38px; font-size: 20px; padding: 0; flex: none; }

/* Uygulama (NATIVE): Bitrix24 mobildeki (body.bxm) sade WhatsApp listesi ve büyük form düğmeleri — yukarıdaki kuralların kopyası */
/* Üst kısım: başlık + arama */
body.native-app .ib-tools { padding: 12px 14px 6px; }
body.native-app .ib-titlerow h2 { font-size: 24px; font-weight: 750; letter-spacing: -.01em; }
body.native-app .ib-titlerow .ib-minibtn, body.native-app .ib-titlerow .ib-ham { display: none !important; } /* ✎ ve ＋ kalır: uygulamada alt menüde "Yeni" yok */
body.native-app .ib-searchrow { gap: 8px; }
body.native-app .ib-searchbtn { flex: 1; justify-content: flex-start; border-radius: 12px; background: var(--surface-2, #f1f2f4); border-color: transparent; min-height: 40px; color: var(--ink-3, #64748b); }
/* Durumlar: küçük yatay hap satırı */
body.native-app .ib-stbar { display: flex; gap: 6px; padding: 4px 14px 8px; overflow-x: auto; scrollbar-width: none; }
body.native-app .ib-stbar::-webkit-scrollbar { display: none; }
body.native-app .ib-stbtn { flex: none; display: inline-flex !important; align-items: center; gap: 5px; padding: 6px 12px; border-radius: 999px; min-height: 34px; font-size: 13px; }
body.native-app .ib-stbtn .ib-stlbl { font-size: 13px; color: var(--ink-2, #334155); }
body.native-app .ib-stbtn[aria-pressed="true"] { border-color: var(--stc); background: color-mix(in srgb, var(--stc) 10%, transparent); }
body.native-app .ib-stbtn .ib-stic { font-size: 11px; }
body.native-app .ib-stbtn b { font-size: 13px; }
/* Liste: tek satırlık sade kart, ayırıcı çizgi */
body.native-app .ibx .ib-list { padding: 0; }
body.native-app .ibx .ib-item { margin: 0; width: 100%; border-radius: 0; border: 0; border-bottom: 1px solid var(--border, #eceef1); box-shadow: none; padding: 10px 14px; min-height: 72px; background: transparent; gap: 12px; align-items: center; }
body.native-app .ibx .ib-item:active, body.native-app .ibx .ib-item.active { background: var(--surface-2, #f4f5f7); }
body.native-app .ib-item .ib-av { width: 50px; height: 50px; flex: none; font-size: 16px; }
body.native-app .ib-item .ib-meta { gap: 3px; min-width: 0; }
body.native-app .ib-item .ib-row1 b { font-size: 16px; font-weight: 650; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
body.native-app .ib-item .ib-time { font-size: 12px; }
body.native-app .ib-item .ib-row2 { font-size: 14px; }
body.native-app .ib-item .ib-last { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink-3, #64748b); }
body.native-app .ib-item .ib-row-crm, body.native-app .ib-item .ib-row3 { display: none !important; }
/* Mobil formlar: açıklama ayrı satırda, düğmeler büyük ve tam genişlik (parmakla kolay basılsın) */
body.native-app .ib-pop .ib-noteacts { flex-wrap: wrap; }
body.native-app .ib-pop .ib-noteacts .grow { flex: 1 1 100%; }
body.native-app .ib-pop .ib-noteacts > button, body.native-app .ib-pop .row.end > button { flex: 1 1 0; min-height: 46px; font-size: 15px; }
body.native-app .ib-pop input, body.native-app .ib-pop select, body.native-app .ib-pop textarea { min-height: 44px; }

/* ---------- Sohbetler: bağlantılar ana sayfası (önce bağlantılar, tıklayınca o bağlantının sohbetleri) ---------- */
body.ib-home-on .ib-side #ibList, body.ib-home-on .ib-side .ib-convhead, body.ib-home-on .ib-side .ib-stbar { display: none !important; }
.ib-home { flex: 1; min-height: 0; overflow-y: auto; padding: 0 0 12px; }
.ib-home[hidden], .ib-connbar[hidden] { display: none !important; }
.ib-homehead { cursor: default; border-bottom: 1px solid var(--border); margin-bottom: 6px; }
.ib-homehead:hover { background: none; }
.ib-homehead b { margin-left: auto; }
.ib-hcard { display: flex; align-items: center; gap: 12px; width: calc(100% - 16px); margin: 0 8px 6px; padding: 12px; border: 1px solid var(--border); border-radius: 16px; background: var(--surface); color: inherit; font: inherit; text-align: left; cursor: pointer; transition: background .12s, border-color .12s, transform .12s; }
.ib-hcard:hover { background: var(--surface-2); border-color: color-mix(in srgb, var(--accent) 40%, var(--border)); }
.ib-hcard:active { transform: scale(.99); }
.ib-hcard:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.ib-hcard.allc { background: color-mix(in srgb, var(--accent) 7%, var(--surface)); border-color: color-mix(in srgb, var(--accent) 30%, var(--border)); margin-bottom: 12px; }
.ib-hcard.last { box-shadow: inset 3px 0 0 var(--accent); }
.ib-hic { width: 46px; height: 46px; flex: none; display: grid; place-items: center; border-radius: 50%; background: color-mix(in srgb, currentColor 12%, transparent); color: #25d366; font-size: 22px; font-weight: 800; }
.ib-hic svg { width: 28px; height: 28px; }
.ib-hic.all { color: var(--accent); }
.ib-hic.p-cloud { color: #0866ff; } .ib-hic.p-telegram { color: #229ed9; } .ib-hic.p-instagram { color: #E1306C; } .ib-hic.p-messenger { color: #0866FF; } .ib-hic.p-bxline { color: #0ea5e9; }
.ib-hmeta { flex: 1; min-width: 0; display: grid; gap: 2px; }
.ib-hrow1, .ib-hrow2, .ib-hrow3 { display: flex; align-items: center; gap: 8px; min-width: 0; }
.ib-hrow1 b { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 15px; }
.ib-hcard.unread .ib-hrow1 .ib-time { color: #1fa855; font-weight: 700; }
.ib-hsub { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); font-size: 13px; }
.ib-hrow3 { font-size: 12px; color: var(--muted); flex-wrap: wrap; gap: 4px 8px; }
.ib-hn.un { color: #1fa855; font-weight: 600; }
.ib-hst { display: inline-flex; align-items: center; gap: 5px; padding: 1px 8px 1px 6px; border-radius: 999px; background: var(--surface-2); font-weight: 600; }
.ib-hst i { width: 7px; height: 7px; border-radius: 50%; background: #9ca3af; }
.ib-hst.on i { background: #22c55e; } .ib-hst.wait i { background: #f59e0b; } .ib-hst.off { color: #dc2626; } .ib-hst.off i { background: #ef4444; }
.ib-hgo { flex: none; font-size: 22px; color: var(--muted); line-height: 1; }
.ib-connbar { flex: none; padding-top: 4px; }
.ib-connback .ib-popic { width: 24px; height: 24px; }
.ib-connback .ib-popic svg { width: 20px; height: 20px; }
.ib-connback b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ib-connback .muted { margin-left: auto; white-space: nowrap; }
/* Daraltılmış liste: yalnız simgeler */
body.ib-mini .ib-hmeta, body.ib-mini .ib-hgo, body.ib-mini .ib-homehead, body.ib-mini .ib-connback .muted, body.ib-mini .ib-connback b { display: none !important; }
body.ib-mini .ib-hcard { justify-content: center; padding: 8px 0; width: calc(100% - 12px); margin: 0 6px 6px; position: relative; }
body.ib-mini .ib-hcard.unread::after { content: ''; position: absolute; top: 6px; right: 10px; width: 10px; height: 10px; border-radius: 50%; background: #25d366; }
/* 📥 Yazışmaları indir (Sohbet ayarları) */
.exp-card .exp-dates { gap: 16px; }
.exp-card .exp-dates label { display: flex; flex-direction: row; align-items: center; gap: 6px; }
.exp-card .exp-dates input[type=date], .exp-card .exp-dates input[type=time] { padding: 6px 8px; }
.exp-card .exp-conns { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 2px 12px; max-height: 220px; overflow: auto; }
.exp-card .exp-fmt { align-items: flex-start; padding: 4px 0; }
.exp-card .exp-fmt input { margin-top: 3px; }
.exp-job { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 12px; border: 1px solid var(--border); border-radius: 10px; }
.exp-job-t { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.exp-job.st-failed .exp-job-t .muted { color: var(--crit-text); }
.exp-prog { white-space: nowrap; font-size: 13px; display: inline-flex; align-items: center; gap: 6px; }
.exp-spin { width: 14px; height: 14px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: exp-rot .8s linear infinite; opacity: .6; }
@keyframes exp-rot { to { transform: rotate(360deg); } }
@media (max-width: 600px) { .exp-job { flex-direction: column; align-items: stretch; } }
.exp-card .exp-presets button.on { background: var(--accent); color: var(--accent-ink); border-color: transparent; }

/* Ayarlar → Yapay zekâ bağlantısı */
.ai-conn-card h3 { margin: 8px 0 0; font-size: 15px; }
.ai-key-row { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding: 8px 10px; border: 1px solid var(--border); border-radius: var(--radius); }
.ai-key-row button { margin-left: auto; }
.ai-key-add { flex-wrap: wrap; gap: 8px; }
.ai-key-add select, .ai-key-add input { flex: 1 1 180px; min-width: 0; }
.ai-feats summary { cursor: pointer; font-weight: 600; padding: 6px 0; }
.ai-feat-row { display: grid; grid-template-columns: minmax(160px, 1.2fr) minmax(140px, 1fr) minmax(160px, 1.2fr); gap: 10px; align-items: center; padding: 8px 0; border-top: 1px solid var(--border); }
.ai-feat-row small { display: block; }
.ai-feat-model { display: flex; flex-direction: column; gap: 6px; }
@media (max-width: 700px) { .ai-feat-row { grid-template-columns: 1fr; } }
/* 📅 Randevu (public/randevu.js) */
.ib-addappt { display: inline-flex; align-items: center; gap: 5px; font-weight: 600; color: #b45309; border-color: #fde68a; background: #fffbeb; }
.ib-addappt:hover { border-color: #f59e0b; color: #92400e; }
.ib-notebub.appt { background: #fffbeb; border-color: #fde68a; }
:root[data-theme="dark"] .ib-addappt, :root[data-theme="dark"] .ib-notebub.appt { background: #2a1e05; border-color: #92400e; color: #fde68a; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .ib-addappt, :root:not([data-theme="light"]) .ib-notebub.appt { background: #2a1e05; border-color: #92400e; color: #fde68a; } }
dialog.ap-dlg { width: min(940px, calc(100vw - 24px)); }
dialog.ap-set { width: min(720px, calc(100vw - 24px)); }
.ap-cols { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 18px; }
.ap-left, .ap-right { gap: 10px; min-width: 0; }
.ap-lbl { display: grid; gap: 4px; font-size: 12.5px; font-weight: 600; color: var(--ink-2); min-width: 0; }
.ap-row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.ap-row4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.ap-cust { display: grid; gap: 6px; }
.ap-custsel { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid var(--border); border-radius: 10px; background: color-mix(in srgb, var(--accent) 5%, var(--surface)); }
.ap-av { font-size: 20px; }
.ap-results { display: grid; gap: 4px; max-height: 180px; overflow: auto; }
.ap-res { text-align: left; border: 1px solid var(--border); border-radius: 8px; padding: 6px 10px; background: var(--surface); color: var(--ink); cursor: pointer; }
.ap-res:hover { border-color: var(--accent); }
.ap-dayrow { display: flex; align-items: center; gap: 6px; }
.ap-dayrow input[type=date] { flex: 1; min-width: 0; }
.ap-dur { flex: 0 0 auto; }
.ap-slots { display: grid; grid-template-columns: repeat(auto-fill, minmax(78px, 1fr)); gap: 6px; max-height: 300px; overflow: auto; padding: 2px; }
.ap-slot { display: grid; gap: 1px; padding: 6px 4px; border-radius: 8px; border: 1px solid var(--border); background: var(--surface); color: var(--ink); cursor: pointer; font: inherit; text-align: center; }
.ap-slot b { font-size: 14px; } .ap-slot small { font-size: 11px; color: var(--muted); }
.ap-slot.free { border-color: #86efac; background: #f0fdf4; }
.ap-slot.some { border-color: #fcd34d; background: #fffbeb; }
.ap-slot.full { border-color: #fca5a5; background: #fef2f2; }
.ap-slot.past { opacity: .45; cursor: default; }
.ap-slot.on { outline: 2px solid var(--accent); outline-offset: 1px; font-weight: 700; }
:root[data-theme="dark"] .ap-slot.free { background: #052e16; border-color: #166534; } :root[data-theme="dark"] .ap-slot.some { background: #2a1e05; border-color: #92400e; } :root[data-theme="dark"] .ap-slot.full { background: #2d0a0a; border-color: #991b1b; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .ap-slot.free { background: #052e16; border-color: #166534; } :root:not([data-theme="light"]) .ap-slot.some { background: #2a1e05; border-color: #92400e; } :root:not([data-theme="light"]) .ap-slot.full { background: #2d0a0a; border-color: #991b1b; } }
.ap-other { grid-template-columns: auto 140px; align-items: center; justify-content: start; gap: 8px; }
.ap-legend { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.ap-legend i { width: 12px; height: 12px; border-radius: 3px; display: inline-block; border: 1px solid; margin-left: 6px; }
.ap-legend i.free { background: #f0fdf4; border-color: #86efac; } .ap-legend i.some { background: #fffbeb; border-color: #fcd34d; } .ap-legend i.full { background: #fef2f2; border-color: #fca5a5; }
.ap-warn { color: #b45309; }
.ap-filters { gap: 8px; flex-wrap: wrap; } .ap-filters input[type=search] { flex: 1 1 200px; }
.ap-custom { gap: 6px; align-items: center; }
.ap-setup ul { margin: 6px 0 10px; padding-left: 18px; }
.ap-day h3 { margin: 0 0 8px; font-size: 15px; }
.ap-row { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-top: 1px solid var(--border); }
.ap-row:first-of-type { border-top: 0; }
.ap-row.cancelled { opacity: .55; } .ap-row.cancelled .ap-who b { text-decoration: line-through; }
.ap-time { display: grid; min-width: 54px; } .ap-time b { font-size: 16px; font-variant-numeric: tabular-nums; } .ap-time small { color: var(--muted); font-size: 11.5px; }
.ap-who { flex: 1 1 auto; min-width: 0; } .ap-note { color: var(--ink-2); white-space: pre-wrap; }
.ap-bx { font-size: 11.5px; padding: 2px 8px; border-radius: 999px; border: 1px solid currentColor; white-space: nowrap; }
.ap-bx.ok { color: var(--good-text); } .ap-bx.bad { color: var(--crit-text); }
.ap-st { width: auto; } .ap-acts { display: flex; gap: 4px; }
.ap-sec { border-top: 1px solid var(--border); padding: 12px 0; display: grid; gap: 8px; }
.ap-sec h3 { margin: 0; font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.ap-wd { gap: 6px; flex-wrap: wrap; } .ap-num { width: 76px; }
.ap-staff { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; } .ap-staff select { width: auto; }
@media (max-width: 760px) {
  .ap-cols, .ap-row2 { grid-template-columns: 1fr; } .ap-row4 { grid-template-columns: 1fr 1fr; }
  .ap-row { flex-wrap: wrap; } .ap-who { flex: 1 1 60%; }
}
.ap-book { display: inline-block; margin-left: 8px; font-size: 11.5px; font-weight: 600; padding: 1px 8px; border-radius: 999px; background: color-mix(in srgb, var(--accent) 10%, transparent); color: var(--accent); vertical-align: 1px; }
.ap-books .chip, .ap-booktabs .chip { font-weight: 600; }
.ap-addbook { border-style: dashed !important; }

/* ---- Sohbet: WhatsApp görünümü (giden açık yeşil, gelen beyaz; "＋" menüsü, geniş yazma kutusu) ---- */
:root { --wa-bar: #f0f2f5; --wa-input: #fff; --wa-ic: #54656f; --wa-green: #00a884; --wa-menu: #fff; --wa-hover: #f0f2f5; }
:root[data-theme="dark"] { --wa-bar: #1a1a19; --wa-input: #2a2a28; --wa-ic: #aebac1; --wa-menu: #1f1f1e; --wa-hover: #2a2a28; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --wa-bar: #1a1a19; --wa-input: #2a2a28; --wa-ic: #aebac1; --wa-menu: #1f1f1e; --wa-hover: #2a2a28; } }
.ibx .ib-head.tone-none { background: var(--wa-bar) !important; box-shadow: none; }
.ib-foot { margin-top: 1px; line-height: 1.2; }
.ib-quote.out { border-left-color: #a78bfa; } .ib-quote.out b { color: #7c5cff; }
:root[data-theme="dark"] .ib-day span, :root[data-theme="dark"] .ibx .ib-day span { background: #182229; color: #8696a0; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .ib-day span, :root:not([data-theme="light"]) .ibx .ib-day span { background: #182229; color: #8696a0; } }
:root[data-theme="dark"] .ib-foot { color: #8696a0; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .ib-foot { color: #8696a0; } }
/* Yazma çubuğu */
.ibx .ib-compose { background: var(--wa-bar); border-top: 0; padding: 8px 12px; }
.ib-bar { position: relative; flex-wrap: nowrap; align-items: flex-end; gap: 8px; min-width: 0; }
.ib-pluswrap { position: relative; flex: none; }
.ib-bar .ib-lmore { display: inline-grid; place-items: center; width: 44px !important; min-width: 44px; height: 44px; padding: 0; border: 0; border-radius: 50%; background: transparent; color: var(--wa-ic); font-size: 26px; line-height: 1; transition: transform .15s, background .15s; }
.ib-bar .ib-lmore:hover { background: var(--wa-hover); }
.ib-compose.ltools-open .ib-lmore { transform: rotate(45deg); background: var(--wa-hover); }
.ib-plusmenu { position: absolute; left: 0; bottom: calc(100% + 10px); z-index: 40; min-width: 250px; display: grid; gap: 2px; padding: 8px; border-radius: 16px; background: var(--wa-menu); box-shadow: 0 8px 30px rgba(11, 20, 26, .22); }
.ib-plusmenu[hidden] { display: none; }
.ib-plusitem { display: flex; align-items: center; gap: 12px; border: 0; background: none; padding: 7px 12px 7px 8px; border-radius: 10px; font: inherit; font-size: 14.5px; color: var(--ink); text-align: left; cursor: pointer; }
.ib-plusitem:hover, .ib-plusitem:focus-visible { background: var(--wa-hover); outline: none; }
.ib-plusic { flex: none; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; font-size: 17px; background: var(--wa-hover); }
/* Asıl araç düğmeleri gizli; açılır pencereleri "＋"nın üstünde açılsın diye kap yerinde durur */
.ib-bar .ib-ltools, body.bxm .ib-bar .ib-ltools { display: flex !important; position: relative; width: 0; min-width: 0; align-self: flex-start; gap: 0; margin-left: -8px; }
.ib-ltools > button, .ib-ltools .ib-aibtn, .ib-ltools .ib-autotr { display: none !important; }
.ib-bar > .ib-inputwrap, body.mobile .ib-bar > .ib-inputwrap { flex: 1 1 auto; flex-shrink: 1; min-width: 0; display: flex; align-items: flex-end; background: var(--wa-input); border-radius: 24px; box-shadow: 0 1px .5px rgba(11, 20, 26, .1); }
.ib-inputwrap textarea, .ibx .ib-inputwrap textarea, body.mobile .ib-inputwrap textarea { flex: 1 1 auto; min-width: 0; width: auto; border: 0 !important; background: transparent !important; box-shadow: none !important; outline: none; border-radius: 24px; padding: 11px 6px 11px 18px; min-height: 44px; max-height: 160px; font-size: 15px; color: var(--ink); }
.ib-inputwrap textarea[hidden] { display: none; }
.ib-compose.note-mode .ib-inputwrap { background: #fffbeb; box-shadow: 0 0 0 1px #fcd34d; }
:root[data-theme="dark"] .ib-compose.note-mode .ib-inputwrap { background: #1f1c0f; box-shadow: 0 0 0 1px #6b5a1e; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .ib-compose.note-mode .ib-inputwrap { background: #1f1c0f; box-shadow: 0 0 0 1px #6b5a1e; } }
.ib-inputwrap .ib-emojiwrap { flex: none; }
.ib-inputwrap .ib-emoji, body.mobile .ib-inputwrap .ib-emojiwrap .ghost { width: 42px !important; min-width: 42px; height: 44px; padding: 0; border: 0; background: none !important; font-size: 20px; color: var(--wa-ic); }
.ib-inputwrap .ib-emojipop { left: auto; right: 0; }
/* Gönder / mikrofon: yazı ya da dosya varken gönder, yokken mikrofon */
.ib-bar .ib-send, .ib-bar .ib-mic, body.mobile .ib-bar .ib-send, body.mobile .ib-bar .ib-mic { flex: none; width: 44px !important; min-width: 44px; height: 44px; padding: 0; border: 0; border-radius: 50%; background: var(--wa-green) !important; color: #fff !important; font-size: 18px; box-shadow: 0 1px 2px rgba(11, 20, 26, .2); }
.ib-bar .ib-send:hover, .ib-bar .ib-mic:hover { filter: brightness(1.06); }
.ib-compose:not(.can-send) .ib-send { display: none; }
.ib-compose.can-send .ib-micwrap { display: none; }
.ib-bar:has(.ib-recbox:not([hidden])) .ib-inputwrap { display: none; }
body.mobile .ibx .ib-compose { padding: 6px 6px calc(6px + env(safe-area-inset-bottom)); }
body.mobile .ib-bar { gap: 6px; }
/* Toplantı ve Randevu "＋" menüsünde; işlem satırında yalnız açılır pencereleri kalır */
.ib-metarow .ib-addmeet, .ib-metarow .ib-addappt { display: none !important; }

/* ---- Sohbet başlığı: sade, tek satır (WhatsApp gibi) ----
   Bilgiler, sorumlu, gözlemci ve durum ⋮ menüsünün üstünde (.ib-kinfo); işlem satırı görünmez, düğmeleri "＋" menüsünde */
.ibx .ib-head, body.bxm .ib-head, body.bxm .inbox:not(.head-mini) .ib-head { flex-wrap: nowrap; padding: 8px 14px; gap: 12px; min-height: 60px; }
.ib-head .ib-title { min-width: 0; }
.ib-head .ib-title > .muted { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ib-headicons { display: flex; align-items: center; gap: 4px; margin-left: auto; flex: none; }
.ib-headic, .ib-asgchip { display: grid; place-items: center; width: 38px; height: 38px; border: 0; border-radius: 50%; background: transparent; color: var(--wa-ic); font-size: 18px; cursor: pointer; padding: 0; }
.ib-headic:hover, .ib-asgchip.none:hover { background: var(--wa-hover); }
.ib-asgchip { width: 32px; height: 32px; margin: 0 3px; background: #dfe5e7; color: #3b4a54; font: 700 12px/1 inherit; }
.ib-asgchip.none { background: transparent; font-size: 17px; }
.ib-asgchip:not(.none):hover { filter: brightness(.95); }
:root[data-theme="dark"] .ib-asgchip:not(.none) { background: #2a3942; color: #d1d7db; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .ib-asgchip:not(.none) { background: #2a3942; color: #d1d7db; } }
.ib-headmini { display: none !important; }
.ib-head .ib-kebab summary { width: 38px; height: 38px; display: grid; place-items: center; padding: 0; border-radius: 50%; color: var(--wa-ic); }
.ib-head .ib-kebab summary:hover { background: var(--wa-hover); }
/* ⋮ menüsü: üstte müşteri bilgisi, sorumlu, gözlemci, durum */
.ib-head .ib-kmenu { min-width: 300px; max-width: min(380px, calc(100vw - 24px)); z-index: 45; }
.ib-kinfo { display: grid; gap: 10px; padding: 8px 8px 12px; margin-bottom: 4px; border-bottom: 1px solid var(--border); }
.ib-kinfo .ib-headline { margin: 0; max-width: none !important; flex-wrap: wrap !important; overflow: visible !important; }
.ib-kinfo .ib-headright { display: grid !important; min-width: 0; margin: 0; width: auto; gap: 8px; grid-template-columns: 1fr !important; order: 0; }
.ib-kinfo .ib-hr-row { display: grid; grid-template-columns: 78px 1fr; align-items: center; gap: 8px; }
.ib-kinfo .ib-hr-lbl { text-align: left; font-size: 11px; }
:root[data-theme="dark"] .ib-kinfo { border-color: #2a2a28; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .ib-kinfo { border-color: #2a2a28; } }
/* İşlem satırı görünmez: düğmeleri "＋" menüsünden çağrılır, açılır pencereleri burada açılır */
.ib-metarow, body.mobile .ib-metarow, body.bxm .ib-metarow { display: flex !important; visibility: hidden; height: 0 !important; min-height: 0 !important; padding: 0 !important; margin: 0 !important; border: 0 !important; overflow: visible !important; position: relative; z-index: 20; }
.ib-metarow .ib-pop { visibility: visible; }
/* "Bu kişi kim?" AI özeti: "＋" menüsünden açılır */
#ibThread > .ib-aisum:not(.show) { display: none !important; } /* yalnız sohbet ekranında; müşteri kartında özet kendiliğinden gelir */
/* "＋" menüsü: bölümler (masaüstünde iki sütun) */
.ib-plusmenu { grid-template-columns: auto auto; align-items: start; gap: 4px 8px; min-width: 0; max-height: min(560px, calc(100vh - 140px)); overflow-y: auto; }
.ib-pluscol, .ib-plussec { display: grid; gap: 2px; }
.ib-pluscol { gap: 8px; }
.ib-plush { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); padding: 6px 10px 2px; }
.ib-plusitem { white-space: nowrap; }
@media (max-width: 760px) { .ib-plusmenu { grid-template-columns: 1fr; width: min(320px, calc(100vw - 24px)); } .ib-plusitem { white-space: normal; } }
body.bxm .ib-plusmenu { grid-template-columns: 1fr; width: min(320px, calc(100vw - 24px)); max-height: calc(var(--vh, 100dvh) - 160px); }
.ib-kinfo .ib-pop { left: auto !important; right: 0; }
.ib-thread { overflow-x: clip; }
body.bxm .ib-head .ib-kmenu, body.mobile .ib-head .ib-kmenu { max-height: calc(var(--vh, 100dvh) - 90px); overflow-y: auto; }
/* Telefonda sade başlık tek satır: ad ve alt satır "…" ile kısalır, sağdaki simgeler ada binmez
   (ızgaradaki uzun ad sütunu genişletiyordu; alt satırın 62vw sabit genişliği de taşıyordu) */
body.mobile .ib-head { flex-wrap: nowrap !important; gap: 4px; }
body.mobile .ib-head .ib-title { flex: 1 1 0; min-width: 0; grid-template-columns: minmax(0, 1fr); overflow: hidden; }
body.mobile .ib-head .ib-name { display: flex; min-width: 0; }
body.mobile .ib-head .ib-name b { min-width: 0; }
body.mobile .ib-head .ib-title > .muted { max-width: none; }
body.mobile .ib-back { width: 32px; }
body.mobile .ib-head .ib-kebab summary { width: 34px; }
/* Sağdaki simgeler (sorumlu, kişi kartı, anlaşmalar, toplantı) telefonda tek "＋" menüsünde */
.ib-hplus { display: none; }
body.mobile .ib-headicons { display: none; }
body.mobile .ib-hplus { display: block; margin-left: auto; flex: none; }
body.mobile .ib-hplus summary { font-size: 24px; font-weight: 300; }
.ib-head .ib-hplusmenu { min-width: 220px; }
.ib-hplusmenu button { text-align: left; }
.ib-headsvg { display: grid; place-items: center; line-height: 0; }
/* 🎙 Dikte düğmesi (yazma kutusunun içinde, emojinin yanında) */
.ib-inputwrap .ib-dictate { flex: none; width: 40px; min-width: 40px; height: 44px; padding: 0; border: 0; background: none !important; color: var(--wa-ic); display: grid; place-items: center; }
.ib-inputwrap .ib-dictate:hover { color: var(--wa-green); }
.ib-inputwrap .ib-dictate.rec { color: #e11d48; animation: ibdict 1.1s ease-in-out infinite; }
.ib-inputwrap .ib-dictate.busy { opacity: .5; cursor: progress; }
@keyframes ibdict { 50% { opacity: .45; } }
body.mobile .ib-inputwrap .ib-dictate { width: 38px !important; min-width: 38px; }

/* 👤 Temsilci performansı (public/agents.js) */
#view-agents .grid2 { grid-template-columns: 1fr 1fr; }
@media (max-width: 900px) { #view-agents .grid2 { grid-template-columns: 1fr; } }
#view-agents .grid2 > .card, .tp-dlg .grid2 > .card { margin: 0; }
.tp-custom { display: inline-flex; gap: 6px; align-items: center; }
.tp-custom input { padding: 6px 8px; }
.tp-leads { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; }
.tp-lead { background: var(--surface-2); border-radius: 8px; padding: 12px 14px; min-width: 0; }
.tp-lead h3 { margin: 0 0 8px; font-size: 13px; color: var(--ink-2); font-weight: 600; }
.tp-lead ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.tp-lead li { display: flex; gap: 8px; align-items: center; font-size: 13.5px; }
.tp-lead .tp-ln { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tp-mine { margin: 8px 0 0; color: var(--accent); font-weight: 600; }
.tp-table th.n, .tp-table td.n { text-align: right; }
.tp-table th { padding: 0; }
.tp-sort { all: unset; cursor: pointer; display: block; padding: 8px 10px; font: inherit; color: inherit; }
.tp-table th.n .tp-sort { text-align: right; }
.tp-sort:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.tp-row { cursor: pointer; }
.tp-row:hover td, .tp-row:focus-visible td { background: var(--surface-2); }
.tp-sub { color: var(--muted); font-size: 11.5px; }
.tp-warn { color: var(--crit-text); font-weight: 600; }
.tp-grade { display: inline-flex; align-items: baseline; gap: 3px; padding: 2px 8px; border-radius: 999px; font-weight: 700; font-variant-numeric: tabular-nums; }
.tp-grade small { font-size: 10.5px; opacity: .8; }
.tp-grade.big { font-size: 26px; padding: 4px 14px; }
.tp-grade.big small { font-size: 14px; }
.g-a { background: #dcfce7; color: #166534; } .g-b { background: #e0f2fe; color: #075985; }
.g-c { background: #fef3c7; color: #92400e; } .g-d { background: #fee2e2; color: #991b1b; }
.tp-spark rect { fill: var(--s2); opacity: .75; }
.tp-chart { width: 100%; height: auto; display: block; }
.tp-chart .tp-gl { stroke: var(--grid); stroke-width: 1; }
.tp-chart .tp-ax { fill: var(--muted); font-size: 10px; }
.tp-chart rect.s1 { fill: var(--s1); } .tp-chart rect.s2 { fill: var(--s2); }
.tp-line { fill: none; stroke-width: 2; } .tp-line.s1 { stroke: var(--s1); } .tp-line.s2 { stroke: var(--s2); } .tp-line.sw { stroke: var(--accent); }
.tp-dot.s1 { fill: var(--s1); } .tp-dot.s2 { fill: var(--s2); } .tp-dot.sw { fill: var(--accent); }
#view-agents .legend .key { width: 10px; height: 10px; border-radius: 2px; display: inline-block; margin-right: 4px; }
.tp-heat { font-size: 11px; }
.tp-heat th, .tp-heat td { padding: 0; border: 0; text-align: center; font-weight: 500; }
.tp-heat .tp-hn { text-align: left; padding: 2px 8px 2px 0; max-width: 130px; overflow: hidden; text-overflow: ellipsis; font-size: 12px; }
.tp-heat .tp-hc { width: 16px; min-width: 14px; height: 20px; background: var(--surface-2); border: 1px solid var(--surface); border-radius: 3px; }
.tp-heat .tp-hc[style] { background: color-mix(in srgb, var(--s2) calc(var(--a) * 100%), var(--surface-2)); }
.tp-dlg { width: min(1000px, calc(100vw - 32px)); max-height: calc(100vh - 32px); border: 1px solid var(--border); border-radius: var(--radius); background: var(--page); color: var(--ink); padding: 18px; }
.tp-dlg::backdrop { background: rgba(0,0,0,.4); }
.tp-dhead { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.tp-dhead > div { flex: 1; }
.tp-dhead h2 { margin: 0; }
.tp-dlg .grid2 { grid-template-columns: 1fr 1fr; margin-bottom: 16px; }
@media (max-width: 760px) { .tp-dlg .grid2 { grid-template-columns: 1fr; } }
.tp-dlg h3 { margin: 0 0 8px; font-size: 14px; }
.tp-parts { display: grid; gap: 8px; }
.tp-part { display: grid; grid-template-columns: 150px 1fr 70px; align-items: center; gap: 10px; font-size: 13px; }
.tp-part b { text-align: right; font-variant-numeric: tabular-nums; }
.tp-bar { height: 8px; background: var(--surface-2); border-radius: 99px; overflow: hidden; }
.tp-bar i { display: block; height: 100%; background: var(--accent); border-radius: 99px; }
:root[data-theme="dark"] .g-a { background: #12301f; color: #86efac; } :root[data-theme="dark"] .g-b { background: #0c2a3d; color: #7dd3fc; }
:root[data-theme="dark"] .g-c { background: #3a2a0a; color: #fcd34d; } :root[data-theme="dark"] .g-d { background: #3a1212; color: #fca5a5; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .g-a { background: #12301f; color: #86efac; } :root:not([data-theme="light"]) .g-b { background: #0c2a3d; color: #7dd3fc; }
  :root:not([data-theme="light"]) .g-c { background: #3a2a0a; color: #fcd34d; } :root:not([data-theme="light"]) .g-d { background: #3a1212; color: #fca5a5; }
}
.tp-selbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: -6px 0 14px; font-size: 13px; color: var(--ink-2); }
.tp-selbar.on { background: var(--surface-2); border: 1px solid var(--border); border-radius: 8px; padding: 8px 12px; color: var(--ink); }
.tp-seldlg { width: min(560px, calc(100vw - 32px)); }
.tp-seltools { display: flex; gap: 8px; align-items: center; margin-bottom: 10px; }
.tp-seltools input { flex: 1; min-width: 0; }
.tp-sellist { max-height: min(50vh, 420px); overflow-y: auto; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); }
.tp-selrow { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-bottom: 1px solid var(--border); cursor: pointer; margin: 0; }
.tp-selrow:last-child { border-bottom: 0; }
.tp-selrow > span:nth-of-type(1) { flex: 1; min-width: 0; }
.tp-selfoot { display: flex; align-items: center; gap: 8px; margin-top: 12px; }
.tp-selfoot .grow { flex: 1; }
.tp-sellist label.tp-selrow { display: flex !important; flex-direction: row; align-items: center; text-align: left; font-weight: 500; }
.tp-sellist label.tp-selrow input { width: auto; margin: 0; flex: none; }
.tp-sellist label.tp-selrow .muted { flex: none; }

/* ---- Sohbet listesi: WhatsApp gibi sık satırlar (kart yok, ince ayraç) ---- */
.ibx .ib-list .ib-item, body.mobile .ibx .ib-item, body.bxm .ibx .ib-item { position: relative; margin: 0; width: 100%; border: 0; border-radius: 0; padding: 9px 14px 9px 12px; min-height: 0; gap: 12px; outline: 0; box-shadow: none; }
.ibx .ib-list .ib-item:not([class*="tone-"]), .ibx .ib-list .ib-item.tone-none { background: transparent !important; box-shadow: none !important; }
.ibx .ib-list .ib-item::after { content: ""; position: absolute; left: 74px; right: 0; bottom: 0; height: 1px; background: var(--border); opacity: .8; }
.ibx .ib-list .ib-item:hover:not([class*="tone-"]), .ibx .ib-list .ib-item.tone-none:hover { background: var(--wa-hover) !important; }
.ibx .ib-list .ib-item.on:not([class*="tone-"]), .ibx .ib-list .ib-item.tone-none.on { background: var(--wa-hover) !important; outline: 0; }
.ibx .ib-list .ib-item .ib-av { width: 48px; height: 48px; flex: none; }
.ibx .ib-list .ib-item .ib-meta { gap: 2px; }
body.ib-mini .ibx .ib-list .ib-item::after { display: none; }
/* Durum sayaçları Filtre penceresinde (telefon) */
.ib-filterpop .ib-stbar { padding: 0; }
body.bxm .ib-filterpop .ib-stbar, body.mobile .ib-filterpop .ib-stbar { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; overflow: visible; }
body.bxm .ib-filterpop .ib-stbar > *, body.mobile .ib-filterpop .ib-stbar > * { width: auto; min-width: 0; max-width: none; flex: none; }
/* Tam ekran sohbet (masaüstü uygulaması, telefon): kutu pencereye tam sığsın. İç boşluk (padding) yüksekliğe eklenip
   sayfa ~20 px taşıyor, yukarı / aşağı kayıyordu. Kap pencere yüksekliğinde, sohbet alanı kalan yeri doldurur. */
body.ib-full .ibx { box-sizing: border-box; display: flex; flex-direction: column; bottom: auto; height: var(--vh, 100dvh); overflow: hidden; }
body.ib-full .ibx .inbox.inbox { flex: 1 1 auto; min-height: 0; height: auto !important; }

/* ---- Müşteri kartı: üstte kimlik + CRM düğmeleri, sonra AI özeti ve iletişim; işlemler en altta kutular ---- */
.cust-card .cc-photo { width: 112px; height: 112px; box-shadow: 0 0 0 3px #25d366, 0 6px 18px rgba(15, 23, 42, .16); }
.cust-card .cc-top { gap: 16px; align-items: flex-start; }
.cust-card .cc-id { flex: 1; min-width: 220px; display: grid; gap: 6px; }
.cust-card .cc-id h3 { margin: 0; font-size: 24px; }
.cc-crmbar { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; }
.cc-crmbar button { display: inline-flex; align-items: center; gap: 6px; }
.cust-card .cc-body { grid-template-columns: 1fr; }
.cust-card .cc-body > .cc-sec { grid-column: auto; }
.cc-acts-sec { margin-top: 14px; }
.cc-acts-sec h4 { margin: 0 0 6px; font-size: 14px; }
.cust-card .cc-acts { margin-bottom: 0; }
@media (max-width: 560px) { .cust-card .cc-photo { width: 88px; height: 88px; } }

/* ---------- 🗓 Takvim (public/calendar.js) ---------- */
#view-calendar { --cal-meet: #15803d; --cal-meet-bg: #dcfce7; --cal-appt: #1d4ed8; --cal-appt-bg: #dbeafe; --cal-bx: #7c3aed; --cal-bx-bg: #ede9fe; }
:root[data-theme="dark"] #view-calendar { --cal-meet: #4ade80; --cal-meet-bg: #12301f; --cal-appt: #93c5fd; --cal-appt-bg: #172554; --cal-bx: #c4b5fd; --cal-bx-bg: #2e1065; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) #view-calendar { --cal-meet: #4ade80; --cal-meet-bg: #12301f; --cal-appt: #93c5fd; --cal-appt-bg: #172554; --cal-bx: #c4b5fd; --cal-bx-bg: #2e1065; } }
.cal-bar { display: flex; flex-direction: column; gap: 0; }
.cal-bar .filters { margin-bottom: 10px; }
.cal-nav { display: inline-flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.cal-nav .btn-sm { min-width: 34px; font-size: 14px; }
.cal-title { font-size: 15px; margin-left: 6px; text-transform: capitalize; }
.cal-pick { position: relative; display: inline-flex; flex-direction: row; align-items: center; justify-content: center; width: 34px; height: 30px; border: 1px solid var(--border); border-radius: 8px; cursor: pointer; background: var(--surface); margin: 0; }
.cal-pick input { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; padding: 0; border: 0; }
.cal-src { display: inline-flex; gap: 6px; flex-wrap: wrap; }
.cal-chip { display: inline-flex !important; flex-direction: row !important; align-items: center; gap: 6px; margin: 0; padding: 5px 10px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface); font-size: 13px; cursor: pointer; white-space: nowrap; }
.cal-chip input { margin: 0; width: auto; }
.cal-chip.k-meet { box-shadow: inset 3px 0 0 var(--cal-meet); }
.cal-chip.k-appt { box-shadow: inset 3px 0 0 var(--cal-appt); }
.cal-chip.k-bx { box-shadow: inset 3px 0 0 var(--cal-bx); }
.cal-card { padding: 0; overflow: hidden; }
.cal-card.is-loading { opacity: .6; transition: opacity .2s; }
.cal-foot { margin-top: 6px; }
.cal-dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 6px; flex: none; }
/* etkinlik */
.cal-ev { display: flex; align-items: center; gap: 4px; width: 100%; min-width: 0; text-align: left; padding: 3px 6px; margin: 0 0 2px; border: 0; border-left: 3px solid var(--cal-meet); border-radius: 5px; background: var(--cal-meet-bg); color: var(--ink); font-size: 12px; line-height: 1.25; cursor: pointer; overflow: hidden; }
.cal-ev:hover { filter: brightness(.97); }
.cal-ev.k-appt { background: var(--cal-appt-bg); border-left-color: var(--cal-appt); }
.cal-ev.k-bx { background: var(--cal-bx-bg); border-left-color: var(--cal-bx); }
.cal-ev.is-cancel .cal-ev-n { text-decoration: line-through; opacity: .6; }
.cal-ev.is-private { font-style: italic; }
.cal-ev-ic { flex: none; font-size: 11px; }
.cal-ev-t { flex: none; font-weight: 600; font-variant-numeric: tabular-nums; }
.cal-ev-n { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cal-ev-u { flex: none; max-width: 40%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); font-size: 11px; }
.cal-ev.abs { position: absolute; margin: 0; flex-wrap: wrap; align-content: flex-start; align-items: flex-start; z-index: 1; box-shadow: 0 0 0 1px var(--surface); }
.cal-ev.abs .cal-ev-n { white-space: normal; flex-basis: 100%; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; }
.cal-ev.abs .cal-ev-u { max-width: 100%; flex-basis: 100%; }
.cal-ev.abs.short { flex-wrap: nowrap; align-items: center; }
.cal-ev.abs.short .cal-ev-n { flex-basis: auto; white-space: nowrap; display: block; }
.cal-ev.abs.short .cal-ev-u { display: none; }
/* ay */
.cal-month { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.cal-dow { padding: 8px; font-size: 12px; font-weight: 600; color: var(--muted); border-bottom: 1px solid var(--grid); text-align: center; }
.cal-mcell { min-height: 108px; padding: 4px; border-right: 1px solid var(--grid); border-bottom: 1px solid var(--grid); cursor: pointer; min-width: 0; }
.cal-mcell:nth-child(7n + 7) { border-right: 0; }
.cal-mcell:hover { background: var(--surface-2); }
.cal-mcell.out { background: color-mix(in srgb, var(--surface-2) 60%, transparent); }
.cal-mcell.out .cal-mday { color: var(--muted); }
.cal-mday { display: inline-flex; align-items: center; justify-content: center; min-width: 24px; height: 24px; border-radius: 12px; font-size: 12.5px; font-weight: 600; margin-bottom: 2px; }
.cal-mcell.today .cal-mday { background: var(--accent); color: var(--accent-ink); }
.cal-more { display: block; font-size: 11.5px; color: var(--muted); padding: 0 4px; }
.cal-mdots { display: flex; gap: 3px; justify-content: center; margin-top: 2px; }
.cal-mdots i { width: 6px; height: 6px; border-radius: 50%; background: var(--cal-meet); }
.cal-mdots i.k-appt { background: var(--cal-appt); }
.cal-mdots i.k-bx { background: var(--cal-bx); }
/* saat ızgarası */
.cal-grid-wrap { overflow-x: auto; max-height: calc(100vh - 230px); overflow-y: auto; }
.cal-grid { display: grid; min-width: 100%; }
.cal-corner, .cal-colhead { position: sticky; top: 0; z-index: 3; background: var(--surface); border-bottom: 1px solid var(--grid); }
.cal-colhead { padding: 8px 6px; text-align: center; font-size: 13px; border-left: 1px solid var(--grid); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cal-colhead[role="button"] { cursor: pointer; }
.cal-colhead[role="button"]:hover { background: var(--surface-2); }
.cal-colhead small { color: var(--muted); font-size: 12px; }
.cal-colhead.today b { display: inline-flex; align-items: center; justify-content: center; min-width: 24px; height: 24px; border-radius: 12px; background: var(--accent); color: var(--accent-ink); }
.cal-phead { display: inline-flex; align-items: center; font-weight: 600; }
.cal-adlabel { font-size: 11px; color: var(--muted); padding: 6px 4px; text-align: right; border-bottom: 1px solid var(--grid); }
.cal-adcell { padding: 3px; border-left: 1px solid var(--grid); border-bottom: 1px solid var(--grid); min-width: 0; }
.cal-hours { grid-column: 1; }
.cal-hour { font-size: 11px; color: var(--muted); text-align: right; padding-right: 8px; transform: translateY(-7px); font-variant-numeric: tabular-nums; }
.cal-hour:first-child { transform: none; }
.cal-col { position: relative; border-left: 1px solid var(--grid); min-width: 0; }
.cal-col.today { background: color-mix(in srgb, var(--accent) 4%, transparent); }
.cal-slot { border-bottom: 1px solid var(--grid); box-sizing: border-box; }
.cal-slot:nth-child(odd) { border-bottom-style: solid; }
.cal-now { position: absolute; left: 0; right: 0; height: 0; border-top: 2px solid var(--critical); z-index: 2; pointer-events: none; }
.cal-now::before { content: ''; position: absolute; left: -5px; top: -6px; width: 10px; height: 10px; border-radius: 50%; background: var(--critical); }
/* liste */
.cal-agenda { display: flex; flex-direction: column; }
.cal-agday { border-bottom: 1px solid var(--grid); padding: 8px 12px 10px; }
.cal-agday:last-child { border-bottom: 0; }
.cal-aghead { display: flex; align-items: center; gap: 8px; font-weight: 600; font-size: 13.5px; text-transform: capitalize; margin-bottom: 6px; }
.cal-agday.today .cal-aghead { color: var(--accent); }
.cal-badge { font-size: 11px; padding: 1px 8px; border-radius: 999px; background: var(--accent); color: var(--accent-ink); text-transform: none; }
.cal-agrow { display: flex; gap: 10px; width: 100%; text-align: left; padding: 8px 10px; margin: 0 0 6px; border: 0; border-left: 3px solid var(--cal-meet); border-radius: 8px; background: var(--cal-meet-bg); color: var(--ink); cursor: pointer; min-height: 44px; }
.cal-agrow.k-appt { background: var(--cal-appt-bg); border-left-color: var(--cal-appt); }
.cal-agrow.k-bx { background: var(--cal-bx-bg); border-left-color: var(--cal-bx); }
.cal-agrow.is-cancel b { text-decoration: line-through; opacity: .6; }
.cal-agtime { flex: none; width: 46px; font-size: 12px; font-weight: 600; white-space: pre-line; font-variant-numeric: tabular-nums; }
.cal-agbody { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.cal-agbody b { font-size: 13.5px; overflow-wrap: anywhere; }
.cal-empty { margin: 0; }
/* pencereler */
dialog.cal-dlg { width: min(460px, calc(100vw - 32px)); padding: 0; overflow: hidden; }
dialog.cal-dlg > h3, dialog.cal-dlg > p, dialog.cal-dlg > input { margin: 16px 18px 0; }
dialog.cal-dlg > input { width: calc(100% - 36px); }
.cal-plist { max-height: 50vh; overflow-y: auto; margin: 10px 18px 0; display: flex; flex-direction: column; }
.cal-pitem { display: flex !important; flex-direction: row !important; align-items: center; gap: 8px; padding: 8px 4px; margin: 0; border-bottom: 1px solid var(--grid); cursor: pointer; font-weight: 400; }
.cal-pitem input { width: auto; margin: 0; }
.cal-dlg-foot { padding: 14px 18px; gap: 8px; flex-wrap: wrap; align-items: center; }
.cal-dlg-foot .grow { flex: 1; }
.cal-dhead { padding: 16px 18px 12px; border-left: 5px solid var(--cal-meet); background: var(--cal-meet-bg); }
.cal-dhead.k-appt { border-left-color: var(--cal-appt); background: var(--cal-appt-bg); }
.cal-dhead.k-bx { border-left-color: var(--cal-bx); background: var(--cal-bx-bg); }
.cal-dhead h3 { margin: 4px 0 0; overflow-wrap: anywhere; }
dialog.cal-dlg { --cal-meet: #15803d; --cal-meet-bg: #dcfce7; --cal-appt: #1d4ed8; --cal-appt-bg: #dbeafe; --cal-bx: #7c3aed; --cal-bx-bg: #ede9fe; }
:root[data-theme="dark"] dialog.cal-dlg { --cal-meet-bg: #12301f; --cal-appt-bg: #172554; --cal-bx-bg: #2e1065; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) dialog.cal-dlg { --cal-meet-bg: #12301f; --cal-appt-bg: #172554; --cal-bx-bg: #2e1065; } }
.cal-dbody { padding: 10px 18px 0; display: flex; flex-direction: column; gap: 8px; }
.cal-drow { display: grid; grid-template-columns: 90px 1fr; gap: 10px; font-size: 13.5px; }
.cal-drow > span:last-child { overflow-wrap: anywhere; white-space: pre-line; }
.cal-drow .linkish { padding: 0; justify-self: start; }
@media (max-width: 720px) {
  .cal-title { flex-basis: 100%; margin: 4px 0 0; }
  .cal-who .seg button { padding: 7px 10px; }
  .cal-mcell { min-height: 48px; padding: 3px; text-align: center; }
  .cal-mcell.sel { background: var(--surface-2); box-shadow: inset 0 0 0 2px var(--accent); }
  .cal-month + .cal-agenda { border-top: 1px solid var(--grid); }
}
body.bxm #view-calendar { padding-bottom: calc(var(--bxm-nav) + env(safe-area-inset-bottom) + 12px); }

/* ✏️ Toplantıyı düzenle / iptal et (public/meet-edit.js) */
dialog.me-dlg { width: min(520px, calc(100vw - 32px)); }
.me-body { gap: 10px; max-height: calc(100vh - 220px); overflow-y: auto; padding-bottom: 4px; }
.me-seg { align-self: flex-start; }
.me-when { gap: 10px; flex-wrap: wrap; }
.me-when label { flex: 1 1 180px; margin: 0; }
.me-when input, .me-when select { width: 100%; }
.me-msg { display: flex; flex-direction: column; gap: 8px; }
.me-msg textarea { width: 100%; box-sizing: border-box; }
.me-text { font-family: inherit; font-size: 13px; line-height: 1.45; min-height: 150px; }
label.me-check { display: flex; flex-direction: row !important; align-items: center; gap: 6px; margin: 0; font-weight: 400; }
label.me-check input { width: auto; margin: 0; }
label.me-inline { display: inline-flex; flex-direction: row !important; align-items: center; gap: 6px; margin: 0; font-weight: 400; }
label.me-inline select { width: auto; }
.me-langrow { align-items: center; gap: 8px; }
.me-langrow .grow { flex: 1; }
.me-lbl { margin: 2px 0 -4px; font-size: 12.5px; color: var(--ink-2); font-weight: 500; }
.me-warn { margin: 0; padding: 8px 10px; border-radius: 8px; background: var(--crit-bg, #fee2e2); color: var(--crit-text, #991b1b); }
.me-menu { position: fixed; z-index: 1000; padding: 6px; display: flex; flex-direction: column; gap: 2px; box-shadow: 0 8px 28px rgba(0,0,0,.18); }
.me-menu-h { padding: 4px 8px; }
.me-menu-i { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; text-align: left; border: 0; background: transparent; padding: 8px; border-radius: 6px; width: 100%; }
.me-menu-i:hover, .me-menu-i:focus-visible { background: var(--surface-2); }
.me-menu-i.me-new { border-top: 1px solid var(--grid); border-radius: 0 0 6px 6px; font-weight: 600; }
.ib-notebub.meet.is-canceled { opacity: .75; }
.ib-notebub.meet.is-canceled .ib-acthead span { text-decoration: line-through; }

/* 📝 Takvime elle kayıt (public/cal-entry.js) */
#view-calendar, dialog.cal-dlg { --cal-entry: #b45309; --cal-entry-bg: #fef3c7; }
:root[data-theme="dark"] #view-calendar, :root[data-theme="dark"] dialog.cal-dlg { --cal-entry: #fbbf24; --cal-entry-bg: #3a2a08; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) #view-calendar, :root:not([data-theme="light"]) dialog.cal-dlg { --cal-entry: #fbbf24; --cal-entry-bg: #3a2a08; } }
.cal-chip.k-entry { box-shadow: inset 3px 0 0 var(--cal-entry); }
.cal-ev.k-entry { background: var(--cal-entry-bg); border-left-color: var(--cal-entry); }
.cal-mdots i.k-entry { background: var(--cal-entry); }
.cal-agrow.k-entry { background: var(--cal-entry-bg); border-left-color: var(--cal-entry); }
.cal-dhead.k-entry { border-left-color: var(--cal-entry); background: var(--cal-entry-bg); }
.cal-add { margin-left: auto; }
.ce-kinds { flex-wrap: wrap; align-self: flex-start; }
.ce-dlg .cal-dbody > input, .ce-dlg .cal-dbody > textarea { width: 100%; box-sizing: border-box; }
label.ce-lbl { display: flex; flex-direction: column; gap: 4px; margin: 0; font-size: 12.5px; color: var(--ink-2); }
.ce-cust { display: flex; flex-direction: column; gap: 6px; }
.ce-cust input { width: 100%; box-sizing: border-box; }
.ce-results { display: flex; flex-direction: column; gap: 2px; max-height: 200px; overflow-y: auto; }
.ce-res { display: flex; flex-direction: column; align-items: flex-start; text-align: left; border: 1px solid var(--grid); background: var(--surface); padding: 6px 8px; border-radius: 6px; }
.ce-res:hover, .ce-res:focus-visible { background: var(--surface-2); }
.ce-chosen { align-items: center; gap: 8px; }

/* Takvim: boş saate / güne tıklayınca yeni kayıt */
.cal-col { cursor: pointer; }
.cal-slot { position: relative; }
.cal-slot-h { display: none; position: absolute; left: 4px; top: 2px; font-size: 11px; color: var(--ink-2); pointer-events: none; }
.cal-slot:hover { background: var(--surface-2); }
.cal-slot:hover .cal-slot-h { display: block; }
.cal-adcell { cursor: pointer; min-height: 24px; }
.cal-adcell:hover { background: var(--surface-2); }
.cal-mcell { position: relative; }
.cal-madd { position: absolute; top: 3px; right: 3px; padding: 0 6px; line-height: 20px; border: 0; border-radius: 5px; background: transparent; color: var(--ink-2); opacity: 0; }
.cal-mcell:hover .cal-madd, .cal-madd:focus-visible { opacity: 1; background: var(--surface-2); }
.cal-agadd { margin-left: auto; text-transform: none; font-weight: 500; }
.ce-hint { margin: -2px 0 0; }
/* 📞 Müşteriyi ara (mikrofonun sağında): Bitrix24'ten ya da dış hattan */
.ib-callwrap { position: relative; display: flex; align-items: center; flex: none; }
.ib-bar .ib-call { flex: none; width: 44px !important; min-width: 44px; height: 44px; padding: 0; border-radius: 50%; border: 1px solid #d1d7db; background: #fff !important; font-size: 18px; box-shadow: 0 1px 2px rgba(11, 20, 26, .12); cursor: pointer; }
.ib-bar .ib-call:hover { background: #f0f2f5 !important; }
.ib-callpop { top: auto; bottom: calc(100% + 8px); right: 0; left: auto; min-width: 280px; z-index: 30; padding: 6px; }
.ib-callpop button { display: grid; gap: 1px; width: 100%; text-align: left; background: none; border: 0; border-radius: 9px; padding: 8px 10px; cursor: pointer; color: #111; }
.ib-callpop button:hover { background: #f4f4f2; }
.ib-callpop small { color: var(--muted); font-size: 12px; }
.ib-callno { padding: 6px 10px 4px; font-size: 12px; font-weight: 700; color: var(--muted); font-variant-numeric: tabular-nums; }
/* CRM süzgeci: listenin üstündeki çip ve pencere */
.ib-crmchip { display: flex; align-items: center; gap: 6px; margin: 4px 10px 6px; padding: 4px 4px 4px 10px; border: 1px solid color-mix(in srgb, var(--accent) 45%, transparent); background: color-mix(in srgb, var(--accent) 9%, transparent); border-radius: 10px; font-size: 13px; }
.ib-crmchip[hidden] { display: none; }
.ib-crmchip-l { flex: 1; min-width: 0; display: flex; gap: 6px; align-items: center; background: none; border: 0; padding: 2px 0; font: inherit; color: inherit; cursor: pointer; text-align: left; }
.ib-crmchip-t { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.ib-crmchip-n { flex: none; color: var(--ink-2); font-weight: 600; white-space: nowrap; }
.ib-crmchip-w { flex: none; cursor: help; }
.ib-crmchip-x { flex: none; border: 0; background: none; width: 26px; height: 26px; border-radius: 8px; cursor: pointer; color: var(--ink-2); font-size: 14px; }
.ib-crmchip-x:hover { background: color-mix(in srgb, var(--accent) 18%, transparent); }
.ib-crmstages { max-height: 240px; border: 1px solid var(--border); border-radius: 10px; padding: 4px; }
.ib-crmstrow[hidden], .modal label[hidden] { display: none; }

/* Bağlantı izinleri penceresi (Bağlantılar → 🔐 İzinler) */
.conn-perms .cp-mode { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border: 1px solid var(--border, #e5e7eb); border-radius: 10px; cursor: pointer; }
.conn-perms .cp-mode span { display: grid; gap: 2px; }
.conn-perms .cp-mode small { color: var(--muted, #6b7280); }
.conn-perms .cp-list { display: grid; max-height: 46vh; overflow: auto; border: 1px solid var(--border, #e5e7eb); border-radius: 10px; }
.conn-perms .cp-row { display: grid; grid-template-columns: minmax(0, 1fr) 90px 90px; align-items: center; gap: 8px; padding: 8px 12px; border-bottom: 1px solid var(--border, #f1f5f9); }
.conn-perms .cp-row input { justify-self: center; }
.conn-perms .cp-head { position: sticky; top: 0; background: var(--card, #fff); font-size: 12px; font-weight: 600; color: var(--muted, #6b7280); }
.conn-perms .cp-head span:not(:first-child) { text-align: center; }
.conn-perms .cp-user { display: grid; min-width: 0; }
.conn-perms .cp-user b, .conn-perms .cp-user small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.conn-perms .cp-user small { color: var(--muted, #6b7280); }
.ib-readonly { padding: 12px 16px; border-top: 1px solid var(--border, #e5e7eb); background: var(--soft, #f8fafc); color: var(--muted, #6b7280); font-size: 13px; text-align: center; }

/* Daraltılmış sol menü: simgenin adı (app.js navTips) */
.nav-tip { position: fixed; z-index: 1000; pointer-events: none; padding: 6px 10px; border-radius: 8px; background: #111827; color: #fff; font-size: 13px; font-weight: 600; line-height: 1.2; white-space: nowrap; box-shadow: 0 4px 14px rgb(0 0 0 / .18); }
.nav-tip::before { content: ''; position: absolute; left: -5px; top: 50%; margin-top: -5px; border: 5px solid transparent; border-left: 0; border-right-color: #111827; }
.nav-tip[hidden] { display: none; }

/* ---- Yazma çubuğu (telefon): yazarken ya da dikte ederken kutu genişler; sağda yalnız gönder ---- */
.ib-bar .ib-send svg, .ib-bar .ib-mic svg { display: block; margin: auto; }
.ib-bar .ib-send svg { transform: translateX(1px); }
/* Dikte: beyaz zeminli yuvarlak düğme (sesli mesajın yeşil düğmesinden ayrılsın) */
.ib-inputwrap .ib-dictate { width: 34px !important; min-width: 34px; height: 34px; margin: 5px 2px; border-radius: 50%; background: var(--wa-hover) !important; color: var(--wa-ic); }
.ib-inputwrap .ib-dictate.rec { background: #ffe4e6 !important; color: #e11d48; }
body.mobile .ib-compose.can-send .ib-pluswrap,
body.mobile .ib-compose.can-send .ib-inputwrap .ib-emojiwrap,
body.mobile .ib-compose:has(.ib-dictate.rec) .ib-pluswrap,
body.mobile .ib-compose:has(.ib-dictate.rec) .ib-inputwrap .ib-emojiwrap,
body.mobile .ib-compose:has(.ib-recbox:not([hidden])) .ib-pluswrap,
body.mobile .ib-compose.can-send .ib-callwrap,
body.mobile .ib-compose:has(.ib-dictate.rec) .ib-callwrap,
body.mobile .ib-compose:has(.ib-recbox:not([hidden])) .ib-callwrap { display: none !important; }
body.mobile .ib-compose.can-send .ib-inputwrap textarea, body.mobile .ib-compose:has(.ib-dictate.rec) .ib-inputwrap textarea { min-height: 52px; max-height: 180px; padding-top: 14px; padding-bottom: 14px; }
body.mobile .ib-compose.can-send .ib-inputwrap { border-radius: 22px; }
body.mobile .ib-compose.can-send .ib-inputwrap .ib-dictate:not(.rec):not(.busy) { display: none !important; }
.tp-selmode { margin-bottom: 8px; }
.tp-selhint { margin: 0 0 10px; }

/* ---- 📞 Aramalar (public/calls.js) ---- */
#view-calls { --cl-ok: #16a34a; --cl-miss: #dc2626; --cl-rej: #f59e0b; --cl-ring: #94a3b8; }
.cl-views { margin: 0 0 14px; }
.cl-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.cl-head h2, .cl-head h3 { margin: 0; }
.cl-lf { margin: 10px 0 12px; }
.cl-search { min-width: 220px; flex: 1; max-width: 340px; }
.cl-table td { vertical-align: top; }
.cl-when { white-space: nowrap; font-variant-numeric: tabular-nums; }
.cl-table .linkish, .cl-grid .linkish, #view-calls .tp-table .linkish { padding: 0; font-size: inherit; text-align: left; }
.cl-badge { display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: 12px; font-weight: 600; white-space: nowrap; background: var(--surface-2); }
.cl-badge.cl-ok { color: var(--cl-ok); background: color-mix(in srgb, var(--cl-ok) 12%, transparent); }
.cl-badge.cl-miss { color: var(--cl-miss); background: color-mix(in srgb, var(--cl-miss) 12%, transparent); }
.cl-badge.cl-rej { color: #b45309; background: color-mix(in srgb, var(--cl-rej) 16%, transparent); }
.cl-badge.cl-ring { color: var(--ink-2); }
.cl-chart rect.cl-ok, .cl-stack i.cl-ok, .cl-key.cl-ok { fill: var(--cl-ok); background: var(--cl-ok); }
.cl-chart rect.cl-miss, .cl-stack i.cl-miss, .cl-key.cl-miss { fill: var(--cl-miss); background: var(--cl-miss); }
.cl-chart rect.cl-rej, .cl-stack i.cl-rej, .cl-key.cl-rej { fill: var(--cl-rej); background: var(--cl-rej); }
.cl-chart rect.cl-ring { fill: var(--cl-ring); }
.cl-legend { display: inline-flex; gap: 12px; }
.cl-key { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 4px; }
.cl-barcell { width: 30%; min-width: 120px; }
.cl-stack { display: flex; height: 10px; border-radius: 99px; overflow: hidden; background: var(--surface-2); }
.cl-stack i { display: block; height: 100%; }
.cl-missline { stroke: var(--cl-miss); }
.cl-missdot { fill: var(--cl-miss); }
.cl-heat .tp-hc[style] { background: color-mix(in srgb, var(--cl-ok) calc(var(--a) * 100%), var(--surface-2)); }
.cl-heat th { font-size: 10px; color: var(--muted); }
.cl-grid { grid-template-columns: 1fr 1fr; margin-bottom: 16px; }
@media (max-width: 900px) { .cl-grid { grid-template-columns: 1fr; } }
.cl-empty h2 { margin-top: 0; }
.cl-foot { margin-top: 4px; }
.tp-warnbar { border-color: color-mix(in srgb, var(--warning) 55%, var(--border)); background: color-mix(in srgb, var(--warning) 12%, var(--surface)); }
.tp-warnbar > span { flex: 1; min-width: 240px; }
.tp-owndlg { width: min(640px, calc(100vw - 32px)); }
.tp-ownrow { display: grid; grid-template-columns: 1fr minmax(160px, 240px); gap: 10px; align-items: center; padding: 9px 12px; border-bottom: 1px solid var(--border); }
.tp-ownrow:last-child { border-bottom: 0; }
.tp-ownname { min-width: 0; font-size: 13px; }
.tp-ownrow select { width: 100%; }
.tp-seltools .grow { flex: 1; }
button.tp-link { all: unset; cursor: pointer; color: var(--accent); font-size: 12px; }
button.tp-link:focus-visible { outline: 2px solid var(--accent); }
@media (max-width: 560px) { .tp-ownrow { grid-template-columns: 1fr; } }

/* ===================== Uygulama (NATIVE): WhatsApp (iPhone) düzeni — 28.11.2026 =====================
   Yalnız Android / iOS uygulaması (body.native-app). Web paneli ve Bitrix24 görünümü değişmez. */
body.native-app { --wa-green: #1fa855; --wa-bg: #ffffff; --wa-soft: #f2f2f2; --wa-ink2: #6b7280; }
body.native-app, body.native-app main { background: var(--wa-bg) !important; } /* saat / pil satırının arkası da liste rengi */
body.native-app:has(.inbox.thread-open):not(.report-mode) { background: #f7f7f7 !important; }
body.native-app .ibx, body.native-app .ibx .ib-side, body.native-app .ibx .inbox { background: var(--wa-bg); border: 0 !important; border-radius: 0 !important; }
/* Başlık: büyük "Sohbetler", sağda yuvarlak düğmeler */
body.native-app .ib-tools { padding: 6px 16px 4px !important; }
body.native-app .ib-titlerow { align-items: center; gap: 10px; }
body.native-app .ib-titlerow h2 { font-size: 34px !important; font-weight: 800 !important; letter-spacing: -.02em; margin: 0; }
body.native-app .ib-titlebtns { display: flex !important; gap: 10px; margin-left: auto; }
body.native-app .ib-titlebtns .ib-newbtn { width: 44px; height: 44px; border-radius: 50%; border: 0; background: var(--wa-soft); font-size: 18px; display: grid; place-items: center; box-shadow: none; }
body.native-app .ib-titlebtns .ib-plusbtn { background: var(--wa-green); color: #fff; font-size: 26px; font-weight: 400; }
/* Arama: tam genişlik yuvarlak kutu; filtre düğmesi çiplere taşındı */
body.native-app .ib-searchrow { margin-top: 10px; }
body.native-app .ib-searchrow .ib-filterwrap > .ib-filterbtn { display: none !important; }
body.native-app .ib-searchrow .ib-filterwrap { position: static; }
body.native-app .ib-searchbtn { flex: 1; min-height: 40px !important; border-radius: 20px !important; background: var(--wa-soft) !important; border: 0 !important; font-size: 17px !important; color: var(--wa-ink2) !important; justify-content: flex-start; padding: 0 14px !important; }
body.native-app .ib-search { border-radius: 20px; background: var(--wa-soft); border: 0; }
/* Hızlı filtre çipleri */
.cp-qchips { display: none; }
body.native-app .cp-qchips { display: flex; gap: 8px; padding: 8px 16px 10px; overflow-x: auto; scrollbar-width: none; flex: none; }
body.native-app .cp-qchips::-webkit-scrollbar { display: none; }
body.native-app .cp-qchips button { flex: none; border: 1px solid #d9dbdf; background: var(--wa-bg); color: #374151; border-radius: 18px; padding: 6px 14px; font: 500 15px/1.2 inherit; white-space: nowrap; }
body.native-app .cp-qchips button[aria-pressed="true"] { background: #d9fdd3; border-color: #d9fdd3; color: #0b5c2e; font-weight: 600; }
body.native-app .ib-stbar, body.native-app #ibConnBar { display: none !important; }
/* Liste satırları: yuvarlak resim, kalın ad, sağda saat ve yeşil okunmamış rozeti, resmin sağından başlayan ince çizgi */
body.native-app .ibx .ib-list { padding: 0 0 calc(104px + env(safe-area-inset-bottom)) !important; }
body.native-app .ibx .ib-list .ib-item { padding: 10px 16px !important; gap: 12px !important; border: 0 !important; min-height: 76px; background: transparent !important; position: relative; }
body.native-app .ibx .ib-list .ib-item::after { content: ''; position: absolute; left: 80px; right: 0; bottom: 0; border-bottom: .5px solid #e5e7eb; }
body.native-app .ibx .ib-list .ib-item:active { background: var(--wa-soft) !important; }
body.native-app .ib-item .ib-av { width: 54px !important; height: 54px !important; font-size: 18px !important; }
body.native-app .ib-item .ib-row1 b { font-size: 17px !important; font-weight: 600 !important; }
body.native-app .ib-item .ib-time { font-size: 14px !important; color: var(--wa-ink2); }
body.native-app .ib-item.unread .ib-time { color: var(--wa-green); font-weight: 600; }
body.native-app .ib-item .ib-row2 { font-size: 15px !important; color: var(--wa-ink2); }
body.native-app .ib-arch-row { padding: 12px 16px !important; border: 0 !important; background: transparent !important; font-size: 17px; }
/* Alt menü: yüzen yuvarlak çubuk (iOS gibi), arkası buzlu */
body.native-app .native-nav { left: 14px !important; right: 14px !important; bottom: calc(8px + env(safe-area-inset-bottom)) !important; border: 0 !important; border-radius: 34px; padding: 6px !important; background: rgba(255, 255, 255, .82) !important; -webkit-backdrop-filter: blur(20px) saturate(1.6); backdrop-filter: blur(20px) saturate(1.6); box-shadow: 0 6px 28px rgba(0, 0, 0, .14); }
body.native-app .native-nav button { border-radius: 28px !important; padding: 7px 0 !important; color: #111 !important; font-weight: 600 !important; }
body.native-app .native-nav button[aria-current="true"] { background: rgba(0, 0, 0, .07) !important; color: var(--wa-green) !important; }
body.native-app.report-mode main { padding-bottom: calc(100px + env(safe-area-inset-bottom)) !important; }
/* Sohbet başlığı: yuvarlak geri düğmesi, ad kutusu, yuvarlak menü düğmeleri */
body.native-app .ibx .ib-head { background: #f7f7f7 !important; border-bottom: 0 !important; padding: 6px 10px !important; gap: 8px !important; min-height: 58px; }
body.native-app .ib-head .ib-back { width: 42px; height: 42px; border-radius: 50% !important; background: #fff !important; border: 0 !important; box-shadow: 0 1px 4px rgba(0, 0, 0, .12); font-size: 20px; padding: 0 !important; display: grid; place-items: center; flex: none; }
body.native-app .ib-head .ib-av.big { width: 38px !important; height: 38px !important; flex: none; }
body.native-app .ib-head .ib-title > .ib-name b { font-size: 17px !important; font-weight: 600; }
body.native-app .ib-head .ib-title > .muted { font-size: 12.5px !important; }
body.native-app .ib-head .ib-name-ed { display: none !important; }
body.native-app .ib-head details.ib-kebab > summary { width: 42px; height: 42px; border-radius: 50%; background: #fff; box-shadow: 0 1px 4px rgba(0, 0, 0, .12); display: grid; place-items: center; font-size: 19px; }
/* Yazı çubuğu: ＋ | yazı kutusu (içinde emoji) | arama | yeşil mikrofon / gönder */
body.native-app .ibx .ib-compose { background: #f7f7f7 !important; border-top: 0 !important; padding-top: 6px !important; }
body.native-app .ib-bar { gap: 6px !important; align-items: flex-end !important; }
body.native-app .ib-bar .ib-lmore { width: 40px !important; height: 40px !important; font-size: 26px !important; border: 0 !important; background: transparent !important; color: #111; }
body.native-app .ib-inputwrap { border-radius: 22px !important; background: #fff !important; border: 1px solid #e5e7eb !important; min-height: 40px; align-items: flex-end; }
body.native-app .ib-inputwrap textarea { font-size: 17px !important; padding: 9px 4px 9px 14px !important; line-height: 1.3 !important; }
body.native-app .ib-bar .ib-callwrap { order: 5; }
body.native-app .ib-bar .ib-micwrap { order: 6; }
body.native-app .ib-bar .ib-call { width: 40px !important; height: 40px !important; border: 0 !important; background: transparent !important; box-shadow: none !important; font-size: 20px; }
body.native-app .ib-bar .ib-mic, body.native-app .ib-bar .ib-send { width: 40px !important; height: 40px !important; border-radius: 50% !important; background: var(--wa-green) !important; color: #fff !important; border: 0 !important; }
:root[data-theme="dark"] body.native-app { --wa-bg: #0b0b0b; --wa-soft: #1f1f1f; --wa-ink2: #9ca3af; }
:root[data-theme="dark"] body.native-app .native-nav { background: rgba(30, 30, 30, .82) !important; }
:root[data-theme="dark"] body.native-app .native-nav button { color: #eee !important; }
:root[data-theme="dark"] body.native-app .ibx .ib-head, :root[data-theme="dark"] body.native-app .ibx .ib-compose { background: rgba(20, 20, 20, .94) !important; }
:root[data-theme="dark"] body.native-app .ib-head .ib-back, :root[data-theme="dark"] body.native-app .ib-head details.ib-kebab > summary, :root[data-theme="dark"] body.native-app .ib-inputwrap { background: #262626 !important; border-color: #333 !important; }
:root[data-theme="dark"] body.native-app .cp-qchips button { background: transparent; border-color: #333; color: #ddd; }
:root[data-theme="dark"] body.native-app .cp-qchips button[aria-pressed="true"] { background: #103529; border-color: #103529; color: #d9fdd3; }
/* 🎵 Bildirim sesi seçimi (uygulama Ayarlar) */
.cp-sounds { gap: 4px !important; }
.cp-sound { display: flex; align-items: center; gap: 8px; border-radius: 12px; }
.cp-sound.on { background: rgba(31, 168, 85, .1); }
.cp-sound-pick { flex: 1; display: flex; align-items: center; gap: 10px; border: 0; background: none; padding: 12px 10px; font: 500 16px/1.2 inherit; color: inherit; text-align: left; cursor: pointer; }
.cp-sound-pick > span { color: #1fa855; font-size: 18px; width: 20px; }
body.native-app .cp-qchips .cp-qchip-conn { background: #1fa855; border-color: #1fa855; color: #fff; font-weight: 600; }
/* Chat Analiz telefonda: 5 kutu tek satırda, küçük (simge, sayı, kısa ad; açıklama gizli) — 29.11.2026 */
body.mobile .ins-boxes, body.native-app .ins-boxes { grid-template-columns: repeat(5, minmax(0, 1fr)) !important; gap: 6px; margin: 10px 0; }
body.mobile .ins-box, body.native-app .ins-box { padding: 8px 4px; border-radius: 12px; gap: 2px; text-align: center; justify-items: center; }
body.mobile .ins-box .ins-ic, body.native-app .ins-box .ins-ic { font-size: 16px; }
body.mobile .ins-box .ins-n, body.native-app .ins-box .ins-n { font-size: 20px; order: 2; }
body.mobile .ins-box .ins-label, body.native-app .ins-box .ins-label { font-size: 10.5px; font-weight: 600; order: 3; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
body.mobile .ins-box small, body.native-app .ins-box small { display: none; }
body.mobile .ins-box:hover, body.native-app .ins-box:hover { transform: none; }
/* Grup mesajında yazanın adı: renkli, dokununca kişi kartı (kişiye özel mesaj) — 29.11.2026 */
.ib-gsender { display: block; border: 0; background: none; padding: 0 0 2px; margin: 0; font: 600 13.5px/1.25 inherit; color: var(--gc, #1f7aec); cursor: pointer; text-align: left; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ib-gsender:hover { text-decoration: underline; }

/* 📱 Takvim telefonda (ChatPilot uygulaması: body.native-app, mobil tarayıcı: body.mobile) — public/calendar.js renderPhone.
   Masaüstü görünümü bu kurallardan etkilenmez. */
:is(body.native-app, body.mobile) #view-calendar > .toolbar { display: none; }
:is(body.native-app, body.mobile) #view-calendar { --calp-nav: 0px; padding-bottom: calc(var(--calp-nav) + 84px + env(safe-area-inset-bottom)); }
body.native-app #view-calendar { --calp-nav: 110px; }
body.mobile.bxm #view-calendar { --calp-nav: var(--bxm-nav, 64px); }
:is(body.native-app, body.mobile) #calBox { gap: 8px; }
.calp-bar { position: sticky; top: 0; z-index: 6; background: var(--bg, var(--surface)); padding: 4px 0 8px; display: flex; flex-direction: column; gap: 8px; }
.calp-row { display: flex; align-items: center; gap: 6px; min-width: 0; }
.calp-nav { flex: none; width: 36px; height: 36px; border: 0; border-radius: 18px; background: transparent; font-size: 24px; line-height: 1; color: var(--ink-2); padding: 0; }
.calp-nav:active { background: var(--surface-2); }
.calp-title { flex: 1; min-width: 0; border: 0; background: transparent; padding: 4px 2px; font-size: 19px; font-weight: 700; color: var(--ink); text-align: left; text-transform: capitalize; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.calp-caret { font-size: 12px; color: var(--muted); margin-left: 6px; vertical-align: 2px; }
.calp-dateinp { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.calp-today { flex: none; border: 1px solid var(--border); background: var(--surface); border-radius: 16px; padding: 5px 12px; font-size: 13px; font-weight: 600; }
.calp-views { flex: 1; display: flex; }
.calp-views button { flex: 1; padding: 8px 0; font-size: 14px; }
.calp-filter { flex: none; position: relative; border: 1px solid var(--border); background: var(--surface); border-radius: 8px; padding: 8px 12px; font-size: 14px; color: var(--ink-2); }
.calp-filter.on { border-color: var(--accent); color: var(--ink); }
.calp-badge { display: inline-flex; align-items: center; justify-content: center; min-width: 18px; height: 18px; margin-left: 6px; padding: 0 5px; border-radius: 9px; background: var(--accent); color: var(--accent-ink, #fff); font-size: 11px; font-weight: 700; }
.calp-note { margin: 0; }
.calp-body { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; overflow: hidden; }
.calp-body.is-loading { opacity: .6; transition: opacity .2s; }
.calp-loading, .calp-empty { padding: 16px; margin: 0; }
.calp-body .cal-grid-wrap { max-height: calc(var(--vh, 100vh) - 76px - var(--calp-nav, 0px) - env(safe-area-inset-bottom)); -webkit-overflow-scrolling: touch; }
.calp-day .cal-corner, .calp-day .cal-colhead { display: none; }
.calp-body .cal-slot { min-height: 0; }
.calp-body .cal-slot:hover { background: transparent; }
.calp-body .cal-slot:active { background: var(--surface-2); }
.calp-body .cal-slot-h { display: none !important; }
.calp-body .cal-hour { font-size: 10.5px; padding-right: 6px; }
.calp-body .cal-ev { font-size: 12.5px; }
.calp-early { display: block; width: 100%; border: 0; border-bottom: 1px solid var(--grid); background: var(--surface-2); padding: 8px; font-size: 13px; color: var(--ink-2); }
/* Hafta: yatay kaydırma, saat sütunu ve köşe solda sabit */
.calp-week .cal-hours, .calp-week .cal-corner, .calp-week .cal-adlabel { position: sticky; left: 0; z-index: 4; background: var(--surface); }
.calp-week .cal-corner { z-index: 5; }
.calp-week .cal-grid { width: max-content; min-width: 100%; }
.calp-week { scroll-snap-type: x proximity; }
.calp-week .cal-col, .calp-week .cal-colhead { scroll-snap-align: start; }
/* Ay: ızgara + ayın kayıtları */
.calp-month { border-bottom: 1px solid var(--grid); }
.calp-month .cal-dow { font-size: 11px; padding: 6px 0; text-align: center; }
.calp-mcell { display: flex; flex-direction: column; align-items: center; justify-content: flex-start; gap: 2px; min-height: 46px !important; padding: 4px 0 !important; border-top: 0; border-left: 0; background: transparent; font: inherit; color: inherit; }
.calp-mcell .cal-mday { font-size: 14px; font-weight: 600; width: 28px; height: 28px; line-height: 28px; text-align: center; border-radius: 14px; }
.calp-mcell.today .cal-mday { background: var(--accent); color: var(--accent-ink, #fff); }
.calp-mcell.sel { box-shadow: inset 0 0 0 2px var(--accent); background: var(--surface-2); }
.calp-mcell .cal-mdots small { font-size: 9.5px; color: var(--muted); line-height: 6px; }
.calp-mlist .cal-agday { scroll-margin-top: 110px; }
.calp-mlist .cal-agday.sel { background: var(--surface-2); }
.calp-mlist .cal-agadd { padding: 2px 8px; }
/* Yuvarlak ＋ (alt menünün üstünde) */
.calp-fab { position: fixed; right: 18px; bottom: calc(var(--calp-nav, 0px) + 18px + env(safe-area-inset-bottom)); z-index: 40; width: 56px; height: 56px; border-radius: 28px; border: 0; background: var(--accent); color: var(--accent-ink, #fff); font-size: 30px; line-height: 1; box-shadow: 0 6px 18px rgba(0,0,0,.22); padding: 0; }
.calp-fab:active { transform: scale(.95); }
body:not(.native-app):not(.mobile) .calp-fab { display: none; }
/* Süzgeç penceresi */
dialog.calp-fdlg { padding: 16px 18px 0; }
dialog.calp-fdlg h3 { margin: 0 0 12px; }
.calp-fsec { display: flex; flex-direction: column; gap: 8px; margin-bottom: 16px; }
.calp-fwho { display: flex; }
.calp-fwho button { flex: 1; padding: 9px 4px; }
label.calp-fchip { display: flex !important; flex-direction: row !important; align-items: center; gap: 8px; padding: 10px 12px; margin: 0; font-weight: 500; }
label.calp-fchip input { width: auto; margin: 0; }
dialog.calp-fdlg .cal-dlg-foot { padding: 4px 0 16px; }
/* Telefonda süzgeç: alttan açılan kısa pencere */
body.mobile dialog.calp-fdlg[open] { width: 100vw; max-width: 100vw; height: auto; max-height: 80vh; margin: auto 0 0; border-radius: 16px 16px 0 0; padding: 16px 18px calc(env(safe-area-inset-bottom) + 8px); inset: auto 0 0 0; }
/* Uygulama: ⋮ menüsü alttan açılan, kaydırılabilen pencere; maddeler açılır gruplarda (cp-kgrp) — 29.11.2026 */
body.native-app .ib-head details.ib-kebab:not(.ib-hplus) > .ib-kmenu { position: fixed !important; left: 8px !important; right: 8px !important; top: auto !important; bottom: calc(8px + env(safe-area-inset-bottom)) !important; width: auto !important; max-width: none !important; max-height: calc(var(--vh, 100dvh) - env(safe-area-inset-top) - 80px) !important; overflow-y: auto !important; overscroll-behavior: contain; border-radius: 18px !important; z-index: 400; box-shadow: 0 -8px 40px rgba(0, 0, 0, .25) !important; padding: 10px !important; }
body.native-app .ib-head details.ib-kebab[open]:not(.ib-hplus)::before { content: ''; position: fixed; inset: 0; background: rgba(0, 0, 0, .3); z-index: 399; }
.cp-kgrp { border-top: 1px solid var(--border, #eceef1); }
.cp-kgrp > summary { list-style: none; display: flex; align-items: center; gap: 8px; padding: 13px 10px; font: 600 16px/1.2 inherit; cursor: pointer; }
.cp-kgrp > summary::-webkit-details-marker { display: none; }
.cp-kgrp > summary small { margin-left: auto; color: var(--ink-3, #6b7280); font-weight: 500; }
.cp-kgrp > summary::after { content: '›'; font-size: 20px; color: var(--ink-3, #9ca3af); transition: transform .15s; }
.cp-kgrp[open] > summary::after { transform: rotate(90deg); }
.cp-kgrp > button { width: 100%; padding-left: 22px !important; }
/* 📱 Takvim telefonda — ek: gün şeridi, yoğunluk haritası, 2/3 gün/hafta, yatay ekran */
.calp-strip { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.calp-sday { display: flex; flex-direction: column; align-items: center; gap: 2px; border: 0; background: transparent; padding: 4px 0 6px; border-radius: 10px; color: var(--ink); font: inherit; }
.calp-sday small { font-size: 11px; color: var(--muted); font-weight: 600; }
.calp-sday b { font-size: 16px; width: 34px; height: 34px; line-height: 34px; border-radius: 10px; text-align: center; }
.calp-sday.today b { color: var(--accent); }
.calp-sday.sel b { background: var(--ink); color: var(--surface); }
.calp-sday.sel.today b { background: var(--accent); color: var(--accent-ink, #fff); }
.calp-span { display: flex; }
.calp-span button { flex: 1; padding: 6px 0; font-size: 13px; }
.calp-week.calp-span7 .cal-colhead { padding: 6px 2px; font-size: 11.5px; }
.calp-week.calp-span7 .cal-colhead small { font-size: 10.5px; }
.calp-week.calp-span7 .cal-ev { font-size: 10.5px; padding: 2px 3px; }
.calp-week.calp-span7 .cal-ev-ic { display: none; }
.calp-week .cal-grid { width: auto !important; }
/* Ay: yoğunluk haritası */
.calp-month { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; padding: 8px; border-bottom: 1px solid var(--grid); }
.calp-month .cal-dow { font-size: 11px; padding: 2px 0 4px; text-align: center; color: var(--muted); }
.calp-month .calp-mcell { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; aspect-ratio: 1 / 1; min-height: 0 !important; padding: 0 !important; border: 0; border-radius: 9px; background: var(--heat0); font: inherit; color: var(--ink); }
.calp-mcell .cal-mday { font-size: 14px; font-weight: 600; width: auto; height: auto; line-height: 1.1; background: none !important; }
.calp-mcell.out { opacity: .35; }
.calp-mcell.today { box-shadow: inset 0 0 0 2px var(--accent); }
.calp-mcell.today .cal-mday { color: var(--accent); }
.calp-mcell.sel { box-shadow: inset 0 0 0 2px var(--ink); }
.calp-mcount { font-size: 9.5px; line-height: 1; color: var(--ink-2); margin-top: 2px; }
.calp-mcell.heat-3 .calp-mcount, .calp-mcell.heat-4 .calp-mcount, .calp-mcell.heat-4 .cal-mday { color: #fff; }
#view-calendar { --heat0: var(--surface-2, #f4f4f5); --heat1: #d9f99d; --heat2: #fde047; --heat3: #fb923c; --heat4: #dc2626; }
:root[data-theme="dark"] #view-calendar { --heat1: #3f6212; --heat2: #a16207; --heat3: #c2410c; --heat4: #b91c1c; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) #view-calendar { --heat1: #3f6212; --heat2: #a16207; --heat3: #c2410c; --heat4: #b91c1c; } }
.calp-mcell.heat-1, .calp-legend i.heat-1 { background: var(--heat1); }
.calp-mcell.heat-2, .calp-legend i.heat-2 { background: var(--heat2); }
.calp-mcell.heat-3, .calp-legend i.heat-3 { background: var(--heat3); }
.calp-mcell.heat-4, .calp-legend i.heat-4 { background: var(--heat4); }
.calp-legend { display: flex; align-items: center; gap: 4px; padding: 8px 12px; font-size: 11.5px; border-bottom: 1px solid var(--grid); flex-wrap: wrap; }
.calp-legend i { width: 16px; height: 12px; border-radius: 3px; display: inline-block; }
.calp-legend-n { margin-left: 4px; }
/* Yatay ekran (Hafta): alt menü gizli, üst çubuk tek satır */
body.native-app.calp-land .native-nav { display: none !important; }
body.calp-land #view-calendar { --calp-nav: 0px; padding-bottom: 8px; }
body.calp-land .calp-bar { flex-direction: row; flex-wrap: wrap; align-items: center; gap: 6px 10px; padding: 2px 0 4px; }
body.calp-land .calp-bar .calp-row { flex: 1 1 auto; }
body.calp-land .calp-title { font-size: 16px; }
body.calp-land .calp-flabel { display: none; }
body.calp-land .calp-span { flex: 0 0 220px; }
body.calp-land .calp-body .cal-grid-wrap { max-height: calc(var(--vh, 100vh) - 64px - env(safe-area-inset-bottom)); }
body.calp-land .calp-fab { width: 46px; height: 46px; font-size: 24px; }
/* Uygulama: Gruplar / Sessize alınanlar / Arşiv satırları listede gösterilmez (üstteki çiplerde) — 29.11.2026 */
body.native-app .ibx .ib-list > .ib-arch-row, body.native-app .ibx .ib-list > .ib-grp-row { display: none !important; }
body.native-app .cp-qchips .cp-qn { margin-left: 6px; font-size: 12px; font-weight: 600; opacity: .7; }
/* ⋮ menü grupları: başlık ⋮ düğmesinin yuvarlak stilini almasın; gruptaki düğmeler menünün düz düğmesi gibi (29.11.2026 düzeltme) */
.ib-head .ib-kebab .ib-kmenu .cp-kgrp > summary, body.mobile .ib-head .ib-kebab .ib-kmenu .cp-kgrp > summary, body.native-app .ib-head details.ib-kebab .ib-kmenu .cp-kgrp > summary {
  width: auto !important; height: auto !important; display: flex !important; place-items: initial; align-items: center; gap: 10px; padding: 14px 10px !important; border-radius: 10px !important;
  background: none !important; box-shadow: none !important; font-size: 17px !important; font-weight: 600 !important; line-height: 1.2 !important; color: var(--ink, #111) !important; white-space: nowrap; }
.ib-head .ib-kebab .ib-kmenu .cp-kgrp > button { display: block; width: 100%; border: 0; background: none; text-align: left; padding: 11px 12px 11px 26px; border-radius: 8px; font-size: 16px; line-height: 1.25; font-family: inherit; color: inherit; cursor: pointer; box-shadow: none; }
.ib-head .ib-kebab .ib-kmenu .cp-kgrp > button:active { background: var(--surface-2, #f1f2f4); }
.ib-head .ib-kebab .ib-kmenu .cp-kgrp > span { display: block; padding: 8px 12px 8px 26px; }
.calp-mhead { padding: 10px 12px 0; text-transform: none; }
.ce-kinds { display: grid !important; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.ce-kinds button { padding: 7px 4px; white-space: nowrap; }
/* Ay dışı günler: renk (yoğunluk) net, yalnız gün numarası soluk */
.calp-month .calp-mcell.out { opacity: 1; }
.calp-month .calp-mcell.out .cal-mday { opacity: .45; }
.calp-month .calp-mcell.out.heat-0 { background: transparent; }
/* ⚠ Bitrix24 takvim izni: küçük, kapatılabilir uyarı (calendar.js bxNotice) */
.cal-mini-warn { display: flex; align-items: center; gap: 8px; padding: 5px 6px 5px 10px; border-radius: 8px; background: var(--warn-bg, #fef3c7); color: var(--warn-text, #92400e); font-size: 12.5px; }
.cal-mini-warn > span { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cal-mini-warn .linkish { padding: 0; color: inherit; text-decoration: underline; }
.cal-mini-x { border: 0; background: transparent; color: inherit; font-size: 14px; line-height: 1; padding: 4px 6px; border-radius: 6px; cursor: pointer; }
.cal-mini-x:hover { background: rgba(0,0,0,.06); }
.cal-chip-warn { border: 0; background: transparent; color: #b45309; padding: 0 2px; margin-left: 2px; font-size: 12px; cursor: pointer; line-height: 1; }
.calp-fwarn { margin-left: auto; font-size: 12px; text-decoration: underline; }
/* Müşteri kartı: iç notlar */
.cc-notes .cc-notelist { display: grid; gap: 8px; margin-bottom: 8px; }
.cc-note { background: #fffbea; border: 1px solid #f5e6a8; border-radius: 10px; padding: 9px 11px; }
.cc-note-t { white-space: pre-wrap; word-break: break-word; font-size: 14.5px; margin-bottom: 3px; }
:root[data-theme="dark"] .cc-note { background: #2a2614; border-color: #4a4320; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .cc-note { background: #2a2614; border-color: #4a4320; } }
/* Uygulama: arama açılınca "Ara" düğmesinin yerine arama kutusu geçer (iki kutu üst üste görünmesin); klavye açıkken alt menü gizli — 29.11.2026 */
body.native-app .ib-tools:has(#ibSearchBox:not([hidden])) .ib-searchrow { display: none !important; }
body.native-app #ibSearchBox:not([hidden]) { margin-top: 10px; min-height: 40px; border-radius: 20px; background: var(--wa-soft, #f2f2f2); border: 0; padding: 0 12px; }
body.native-app.kb-open .native-nav { display: none !important; }
/* 📌 Sohbet başlığı altındaki şerit: yaklaşan plan + iç notlar */
.ib-pinbar { display: flex; gap: 6px; padding: 6px 10px; overflow-x: auto; scrollbar-width: none; background: var(--surface, #fff); border-bottom: 1px solid var(--border, #eceef1); flex: none; }
.ib-pinbar[hidden] { display: none; }
.ib-pinbar::-webkit-scrollbar { display: none; }
.ib-pin-item { flex: none; display: inline-flex; align-items: center; gap: 6px; max-width: 78%; border: 1px solid #d9f0e0; background: #effaf2; color: #14532d; border-radius: 16px; padding: 5px 11px; font-size: 13px; cursor: pointer; white-space: nowrap; }
.ib-pin-item b { font-weight: 600; overflow: hidden; text-overflow: ellipsis; }
.ib-pin-item small { color: #15803d; }
.ib-pin-notes { background: #fffbea; border-color: #f5e6a8; color: #713f12; }
:root[data-theme="dark"] .ib-pin-item { background: #10291a; border-color: #1d4a2e; color: #d1fae5; }
:root[data-theme="dark"] .ib-pin-notes { background: #2a2614; border-color: #4a4320; color: #fde68a; }
/* Uygulama: her pencerede sağ üstte ✕ (sağa kaydırınca da kapanır) */
.cp-dlgx { display: none; }
body.native-app dialog[open] > .cp-dlgx { display: grid; place-items: center; position: sticky; top: 0; float: right; z-index: 5; width: 36px; height: 36px; margin: -4px -4px 4px 8px; border-radius: 50%; border: 0; background: rgba(0, 0, 0, .07); color: #111; font-size: 17px; line-height: 1; cursor: pointer; }
:root[data-theme="dark"] body.native-app dialog[open] > .cp-dlgx { background: rgba(255, 255, 255, .12); color: #eee; }
/* Uygulama: listede sola kaydırınca Okundu / Okunmadı düğmesi */
body.native-app .ibx .ib-list { position: relative; }
.cp-readbtn { position: absolute; right: 0; width: 96px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; border: 0; background: #2563eb; color: #fff; font-size: 20px; z-index: 0; cursor: pointer; }
.cp-readbtn.un { background: #1fa855; }
.cp-readbtn small { font-size: 12px; font-weight: 600; }
body.native-app .ibx .ib-list .ib-item { z-index: 1; background: var(--wa-bg, #fff) !important; }
/* Uygulama: sohbete basılı tutunca önizleme */
.cp-peek { position: fixed; inset: 0; z-index: 500; background: rgba(0, 0, 0, .35); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); display: flex; align-items: center; justify-content: center; padding: 20px 14px; animation: bxmIn .14s ease-out; }
.cp-peek-card { width: 100%; max-width: 440px; max-height: 75vh; display: flex; flex-direction: column; gap: 8px; background: var(--surface, #fff); border-radius: 18px; padding: 12px; box-shadow: 0 12px 40px rgba(0, 0, 0, .3); }
.cp-peek-head { display: flex; align-items: center; gap: 8px; font-size: 17px; }
.cp-peek-head b { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cp-peek-head .cp-dlgx { position: static; float: none; margin: 0; width: 32px; height: 32px; border-radius: 50%; border: 0; background: rgba(0, 0, 0, .07); }
.cp-peek-msgs { overflow-y: auto; display: flex; flex-direction: column; gap: 6px; padding: 8px; border-radius: 12px; background: #efeae2; min-height: 120px; }
.cp-peek-m { max-width: 85%; padding: 6px 9px; border-radius: 10px; background: #fff; font-size: 14.5px; white-space: pre-wrap; word-break: break-word; box-shadow: 0 1px 1px rgba(0, 0, 0, .08); }
.cp-peek-m.out { align-self: flex-end; background: #d9fdd3; }
.cp-peek-m small { display: block; text-align: right; color: #667781; font-size: 11px; }
/* ⚙ Chat Analiz ayarları (29.11.2026): bölüm sayısı portala göre değişir; 5'ten fazlasında telefonda yatay kaydırma */
@media (min-width: 1001px) {
  .ins-boxes { grid-template-columns: repeat(var(--ins-n, 5), minmax(0, 1fr)); }
}
body.mobile .ins-boxes, body.native-app .ins-boxes { grid-template-columns: repeat(var(--ins-n, 5), minmax(0, 1fr)) !important; }
body.mobile .ins-boxes.ins-many, body.native-app .ins-boxes.ins-many { display: flex !important; overflow-x: auto; scroll-snap-type: x proximity; scrollbar-width: none; padding-bottom: 2px; }
body.mobile .ins-boxes.ins-many::-webkit-scrollbar, body.native-app .ins-boxes.ins-many::-webkit-scrollbar { display: none; }
body.mobile .ins-boxes.ins-many .ins-box, body.native-app .ins-boxes.ins-many .ins-box { flex: 0 0 calc((100% - 24px) / 5.4); min-width: 60px; scroll-snap-align: start; }
.ins-gear { font-size: 17px; padding-inline: 10px; }
dialog.ins-set-dlg { width: min(720px, calc(100vw - 24px)); max-height: calc(100vh - 32px); overflow-y: auto; }
.ins-set-list { display: grid; gap: 10px; }
.ins-set-card { --c: #6b7280; display: grid; gap: 8px; padding: 12px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); }
.ins-set-card.off { opacity: .6; }
.ins-set-top { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.ins-set-top .spacer { flex: 1; }
.ins-set-chip { font-size: 13px; padding: 3px 10px; }
.ins-set-on { display: inline-flex; align-items: center; gap: 4px; font-size: 13px; cursor: pointer; }
.ins-set-grid { display: grid; grid-template-columns: 80px minmax(0, 1fr) 70px; gap: 8px; }
.ins-set-icon { text-align: center; font-size: 18px; }
.ins-set-color { width: 100%; height: 38px; padding: 2px; cursor: pointer; }
.ins-set-card textarea { resize: vertical; }
.ins-set-re .row { flex-wrap: wrap; gap: 6px; align-items: center; }
/* Telefonda ayar penceresi tam ekran; ✕ uygulamanın kendi düğmesi (cp-dlgx) */
body.mobile dialog.ins-set-dlg[open], body.native-app dialog.ins-set-dlg[open] { width: 100vw !important; max-width: 100vw !important; height: var(--vh, 100dvh); max-height: var(--vh, 100dvh); margin: 0; border-radius: 0; inset: 0; }
body.mobile .ins-set-grid, body.native-app .ins-set-grid { grid-template-columns: 64px minmax(0, 1fr) 56px; }
