/* ============================================================ WaCRM — WhatsApp'a özgü bileşenler */
:root, :root[data-theme="dark"] {
  --wa-wall: #0b141a;
  --wa-wall-dot: rgba(255, 255, 255, .025);
  --wa-in: #202c33;
  --wa-out: #005c4b;
  --wa-text: #e9edef;
  --wa-meta: rgba(233, 237, 239, .6);
  --wa-tick: #8696a0;
  --wa-read: #53bdeb;
  --wa-btn: #00a884;
  --wa-sys: #182229;
}
:root[data-theme="light"] {
  --wa-wall: #efeae2;
  --wa-wall-dot: rgba(0, 0, 0, .035);
  --wa-in: #ffffff;
  --wa-out: #d9fdd3;
  --wa-text: #111b21;
  --wa-meta: #667781;
  --wa-tick: #8696a0;
  --wa-read: #53bdeb;
  --wa-btn: #027eb5;
  --wa-sys: #ffffff;
}

/* Genel yardımcılar */
.kv { display: grid; grid-template-columns: auto 1fr; gap: 5px 14px; font-size: 12.5px; margin: 0; }
.kv dt { color: var(--muted); } .kv dd { margin: 0; color: var(--fg-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; background: var(--muted); flex: none; }
.dot.ok { background: var(--ok); box-shadow: 0 0 8px var(--ok); } .dot.err { background: var(--err); box-shadow: 0 0 8px var(--err); } .dot.warn { background: var(--warn); }
.acc-chip { display: inline-flex; align-items: center; gap: 6px; height: 22px; padding: 0 8px; border-radius: 6px; font-size: 11.5px; font-weight: 600; white-space: nowrap;
  color: var(--c); background: color-mix(in srgb, var(--c) 14%, transparent); border: 1px solid color-mix(in srgb, var(--c) 30%, transparent); max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
.acc-chip::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--c); flex: none; }
.acc-ico { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; flex: none; color: #fff; font: 700 15px var(--font-display); background: var(--c); box-shadow: 0 6px 18px -8px var(--c); }
.usage-row { display: grid; grid-template-columns: 1fr auto; gap: 6px 10px; align-items: center; font-size: 12px; color: var(--muted); }
.usage-row b { color: var(--fg-2); font-weight: 500; }
.usage-row .progress { grid-column: 1 / -1; }
.tag-chip { display: inline-flex; align-items: center; gap: 5px; padding: 2px 9px; border-radius: 7px; background: var(--surface-3); border: 1px solid var(--border-2); font-size: 12px; cursor: pointer; color: var(--fg-2); user-select: none; }
.tag-chip:hover { border-color: var(--accent); color: var(--accent); }
.tag-chip.on { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); }
.tag-chip.mono { font-family: var(--mono); }
.pager { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 16px; border-top: 1px solid var(--border); font-size: 12.5px; color: var(--muted); }
.content.flush { padding: 0; max-width: none; }
.page-head a svg { width: 14px; height: 14px; vertical-align: -2px; }
.steps { display: flex; gap: 6px; flex-wrap: wrap; }
.steps button { display: flex; align-items: center; gap: 8px; border: 1px solid var(--border); background: var(--surface); color: var(--fg-2); height: 34px; padding: 0 14px; border-radius: 10px; cursor: pointer; font: 500 13px var(--font); }
.steps button .n { width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-3); font-size: 11px; }
.steps button.active { border-color: var(--accent); color: var(--fg); box-shadow: var(--glow); }
.steps button.active .n, .steps button.done .n { background: var(--accent); color: var(--accent-fg); }
.seg { display: inline-flex; border: 1px solid var(--border-2); border-radius: 10px; overflow: hidden; }
.seg button { border: 0; background: var(--bg-2); color: var(--fg-2); padding: 0 12px; height: 34px; font: 500 12.5px var(--font); cursor: pointer; display: inline-flex; align-items: center; gap: 6px; }
.seg button + button { border-left: 1px solid var(--border-2); }
.seg button.active { background: var(--accent-soft); color: var(--accent); }
.seg button svg { width: 15px; height: 15px; }
.nav a .count { margin-left: auto; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; background: var(--accent); color: var(--accent-fg); font-size: 11px; font-weight: 700; display: grid; place-items: center; }
.code-box { font: 12.5px var(--mono); background: var(--bg-2); border: 1px solid var(--border-2); border-radius: 10px; padding: 10px 12px; white-space: pre-wrap; word-break: break-all; max-height: 420px; overflow: auto; }

/* ============================================================ WhatsApp metin biçimi */
.wa-fmt { white-space: pre-wrap; word-wrap: break-word; overflow-wrap: anywhere; }
.wa-fmt code { font-family: var(--mono); font-size: .9em; background: rgba(127, 127, 127, .18); padding: 1px 4px; border-radius: 4px; }
.wa-fmt .mono { font-family: var(--mono); font-size: .9em; }
.wa-fmt .q { display: block; border-left: 3px solid rgba(127, 127, 127, .5); padding-left: 8px; color: var(--wa-meta); }
.wa-fmt .var { background: rgba(37, 211, 102, .18); color: inherit; border-radius: 4px; padding: 0 3px; font-family: var(--mono); font-size: .9em; }
.wa-fmt a { color: var(--wa-read); }

/* ============================================================ Gelen kutusu */
.inbox { display: grid; grid-template-columns: 360px minmax(0, 1fr); height: calc(100vh - 63px); }
.inbox.with-side { grid-template-columns: 360px minmax(0, 1fr) 320px; }
.inbox-list { border-right: 1px solid var(--border); display: flex; flex-direction: column; min-height: 0; background: var(--bg-2); }
.inbox-list .head { padding: 12px; display: flex; flex-direction: column; gap: 10px; border-bottom: 1px solid var(--border); }
.inbox-list .filters { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; }
.inbox-list .filters button { flex: none; height: 28px; padding: 0 11px; border-radius: 14px; border: 1px solid var(--border-2); background: transparent; color: var(--fg-2); font: 500 12.5px var(--font); cursor: pointer; }
.inbox-list .filters button.active { background: var(--accent-soft); border-color: var(--accent); color: var(--accent); }
.conv-scroll { flex: 1; overflow-y: auto; }
.conv { display: grid; grid-template-columns: 46px minmax(0, 1fr) auto; gap: 4px 12px; padding: 11px 14px; cursor: pointer; border-bottom: 1px solid var(--border); position: relative; }
.conv:hover { background: var(--surface-2); }
.conv.active { background: var(--surface-3); }
.conv.active::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--accent); }
.avatar { width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; font: 600 15px var(--font-display); color: #fff; grid-row: span 2; flex: none; position: relative; }
.avatar.sm { width: 36px; height: 36px; font-size: 13px; }
.avatar .acc-dot { position: absolute; right: -2px; bottom: -2px; width: 15px; height: 15px; border-radius: 50%; border: 2.5px solid var(--bg-2); background: var(--c); }
.conv .name { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.conv .time { font-size: 11.5px; color: var(--muted); text-align: right; }
.conv.unread .time { color: var(--accent); font-weight: 600; }
.conv .prev { font-size: 13px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: flex; align-items: center; gap: 4px; min-width: 0; }
.conv .prev span { overflow: hidden; text-overflow: ellipsis; }
.conv .meta { display: flex; align-items: center; justify-content: flex-end; gap: 6px; }
.conv .unread-n { min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; background: var(--accent); color: var(--accent-fg); font-size: 11px; font-weight: 700; display: grid; place-items: center; }
.conv .sub { grid-column: 2 / 4; display: flex; gap: 6px; align-items: center; margin-top: 2px; min-width: 0; }

.chat { display: flex; flex-direction: column; min-height: 0; min-width: 0; background: var(--wa-wall); background-image: radial-gradient(var(--wa-wall-dot) 1.2px, transparent 1.2px); background-size: 18px 18px; }
.chat-head { display: flex; align-items: center; gap: 12px; padding: 10px 16px; background: var(--bg-2); border-bottom: 1px solid var(--border); min-height: 62px; }
.chat-head .who { min-width: 0; flex: 1; cursor: pointer; }
.chat-head .who b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chat-head .who small { color: var(--muted); display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.chat-body { flex: 1; overflow-y: auto; padding: 18px 6% 12px; display: flex; flex-direction: column; gap: 2px; }
.day-sep { align-self: center; margin: 12px 0 8px; padding: 5px 12px; border-radius: 8px; background: var(--wa-sys); color: var(--wa-meta); font-size: 12px; box-shadow: 0 1px .5px rgba(0, 0, 0, .13); }
.sys-note { align-self: center; margin: 8px 0; padding: 6px 12px; border-radius: 8px; background: color-mix(in srgb, var(--warn) 18%, var(--wa-sys)); color: var(--wa-text); font-size: 12px; text-align: center; max-width: 80%; }

.msg { max-width: min(75%, 560px); align-self: flex-start; position: relative; margin-top: 2px; }
.msg.out { align-self: flex-end; }
.msg.first { margin-top: 8px; }
.bubble { background: var(--wa-in); color: var(--wa-text); border-radius: 8px; padding: 6px 8px 8px 9px; box-shadow: 0 1px .5px rgba(0, 0, 0, .13); font-size: 14.2px; line-height: 1.38; position: relative; min-width: 90px; }
.msg.out .bubble { background: var(--wa-out); }
.msg.first:not(.out) .bubble { border-top-left-radius: 0; }
.msg.first.out .bubble { border-top-right-radius: 0; }
.msg.first .bubble::before { content: ''; position: absolute; top: 0; width: 8px; height: 13px; }
.msg.first:not(.out) .bubble::before { left: -7px; background: var(--wa-in); clip-path: polygon(0 0, 100% 0, 100% 100%); }
.msg.first.out .bubble::before { right: -7px; background: var(--wa-out); clip-path: polygon(0 0, 100% 0, 0 100%); }
.bubble .text { padding-right: 4px; }
.bubble .stamp { float: right; margin: 6px 0 -4px 10px; font-size: 11px; color: var(--wa-meta); display: inline-flex; align-items: center; gap: 3px; white-space: nowrap; position: relative; top: 4px; cursor: default; }
.bubble .stamp .who { max-width: 110px; overflow: hidden; text-overflow: ellipsis; opacity: .85; }
.tick { display: inline-flex; width: 17px; height: 12px; color: var(--wa-tick); cursor: pointer; }
.tick.read { color: var(--wa-read); }
.tick.failed { color: var(--err); width: 14px; height: 14px; }
.tick.queued { width: 13px; height: 13px; }
.tick svg { width: 100%; height: 100%; }
.bubble .tpl-head { font-weight: 700; margin-bottom: 4px; }
.bubble .tpl-foot { color: var(--wa-meta); font-size: 12.5px; margin-top: 4px; }
.bubble .tpl-tag { font-size: 11px; color: var(--wa-meta); display: flex; align-items: center; gap: 4px; margin-bottom: 4px; }
.bubble .tpl-tag svg { width: 12px; height: 12px; }
.bubble .media { margin: -2px -4px 6px; border-radius: 6px; overflow: hidden; background: rgba(0, 0, 0, .15); min-height: 60px; display: grid; place-items: center; color: var(--wa-meta); }
.bubble .media img, .bubble .media video { display: block; max-width: 100%; max-height: 340px; }
.bubble .doc { display: flex; align-items: center; gap: 10px; padding: 10px; border-radius: 6px; background: rgba(0, 0, 0, .12); margin-bottom: 4px; color: var(--wa-text); text-decoration: none; }
.bubble .doc svg { width: 26px; height: 26px; color: #e05252; }
.bubble .quote { border-left: 4px solid var(--accent); background: rgba(0, 0, 0, .14); padding: 5px 8px; border-radius: 6px; margin-bottom: 5px; font-size: 12.5px; color: var(--wa-meta); max-height: 64px; overflow: hidden; }
.msg-btns { display: flex; flex-direction: column; gap: 2px; margin-top: 2px; }
.msg-btns div { background: var(--wa-in); color: var(--wa-btn); text-align: center; padding: 9px; border-radius: 8px; font-size: 14px; display: flex; align-items: center; justify-content: center; gap: 6px; box-shadow: 0 1px .5px rgba(0, 0, 0, .13); }
.msg.out .msg-btns div { background: var(--wa-out); }
.msg-btns svg { width: 15px; height: 15px; }
.msg .reactions { position: absolute; bottom: -12px; left: 8px; background: var(--wa-sys); border-radius: 12px; padding: 1px 6px; font-size: 13px; box-shadow: 0 1px 2px rgba(0, 0, 0, .3); }
.msg.out .reactions { left: auto; right: 8px; }
.msg.has-react { margin-bottom: 14px; }
.msg .err-line { font-size: 11.5px; color: var(--err); margin-top: 3px; text-align: right; }
.msg .actions { position: absolute; top: 4px; right: -34px; opacity: 0; transition: opacity .1s; }
.msg.out .actions { right: auto; left: -34px; }
.msg:hover .actions { opacity: 1; }

.composer { display: flex; flex-direction: column; gap: 6px; padding: 10px 14px; background: var(--bg-2); border-top: 1px solid var(--border); }
.composer .bar { display: flex; align-items: flex-end; gap: 8px; }
.composer textarea { flex: 1; resize: none; min-height: 42px; max-height: 180px; border-radius: 10px; border: 1px solid var(--border-2); background: var(--surface); color: var(--fg); padding: 10px 12px; font: 14.5px/1.4 var(--font); outline: none; }
.composer textarea:focus { border-color: var(--accent); }
.composer .tools { display: flex; gap: 2px; align-items: center; flex-wrap: wrap; }
.composer .replying { display: flex; align-items: center; gap: 8px; padding: 6px 10px; border-left: 4px solid var(--accent); background: var(--surface); border-radius: 8px; font-size: 12.5px; color: var(--muted); }
.composer .replying span { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.window-closed { display: flex; align-items: center; gap: 12px; padding: 14px 16px; background: var(--bg-2); border-top: 1px solid var(--border); flex-wrap: wrap; }
.window-closed p { margin: 0; flex: 1; min-width: 220px; color: var(--fg-2); font-size: 13px; }
.win-badge { font-size: 11.5px; display: inline-flex; align-items: center; gap: 4px; }
.win-badge svg { width: 13px; height: 13px; }
.chat-empty { flex: 1; display: grid; place-items: center; text-align: center; color: var(--muted); padding: 30px; }
.chat-empty .big { width: 84px; height: 84px; border-radius: 26px; display: grid; place-items: center; margin: 0 auto 16px; background: var(--accent-soft); color: var(--accent); }
.chat-empty .big svg { width: 40px; height: 40px; }

.side { border-left: 1px solid var(--border); background: var(--bg-2); overflow-y: auto; padding: 18px; display: flex; flex-direction: column; gap: 16px; }
.side .avatar { width: 84px; height: 84px; font-size: 28px; margin: 0 auto; }
.side h4 { font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin-bottom: 8px; }

.emoji-pop { position: absolute; bottom: 100%; left: 0; margin-bottom: 8px; width: 320px; max-height: 260px; overflow-y: auto; background: var(--surface); border: 1px solid var(--border-2); border-radius: 12px; box-shadow: var(--shadow); padding: 8px; display: grid; grid-template-columns: repeat(8, 1fr); gap: 2px; z-index: 30; }
.emoji-pop button { border: 0; background: transparent; font-size: 21px; height: 36px; border-radius: 8px; cursor: pointer; }
.emoji-pop button:hover { background: var(--surface-3); }
.pop-wrap { position: relative; }
.msg-info { position: fixed; z-index: 120; background: var(--surface); border: 1px solid var(--border-2); border-radius: 12px; box-shadow: var(--shadow); padding: 12px 14px; font-size: 12.5px; min-width: 230px; }
.msg-info .row { justify-content: space-between; padding: 4px 0; gap: 16px; }
.msg-info .row span:first-child { display: flex; align-items: center; gap: 6px; color: var(--muted); }

/* ============================================================ Şablon editörü */
.editor-shell { position: fixed; inset: 0; z-index: 50; background: var(--bg); display: flex; flex-direction: column; }
.editor-bar { display: flex; align-items: center; gap: 12px; padding: 10px 16px; border-bottom: 1px solid var(--border); background: var(--bg-2); flex-wrap: wrap; }
.editor-bar .title-input { background: transparent; border: 1px solid transparent; color: var(--fg); font: 600 15px var(--mono); padding: 6px 8px; border-radius: 8px; width: 280px; }
.editor-bar .title-input:hover, .editor-bar .title-input:focus { border-color: var(--border-2); outline: none; }
.tpl-editor { flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(0, 1fr) 420px; }
.tpl-form { overflow-y: auto; padding: 24px 28px 60px; display: flex; flex-direction: column; gap: 18px; }
.tpl-form .sec { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; }
.tpl-form .sec-head { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.tpl-form .sec-head h3 { font-size: 15px; }
.tpl-form .sec-head .opt { font-size: 11px; color: var(--muted); border: 1px solid var(--border-2); border-radius: 6px; padding: 1px 6px; }
.tpl-form .sec-head p { margin: 2px 0 0; font-size: 12.5px; color: var(--muted); }
.cat-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.cat-card { border: 1px solid var(--border-2); border-radius: 12px; padding: 12px; cursor: pointer; display: flex; gap: 10px; align-items: flex-start; background: var(--bg-2); }
.cat-card svg { width: 20px; height: 20px; color: var(--muted); flex: none; margin-top: 2px; }
.cat-card b { display: block; font-size: 13.5px; }
.cat-card small { color: var(--muted); font-size: 12px; line-height: 1.4; display: block; margin-top: 2px; }
.cat-card.active { border-color: var(--accent); background: var(--accent-soft); }
.cat-card.active svg { color: var(--accent); }
.cat-card.disabled { opacity: .5; pointer-events: none; }
.wa-box { border: 1px solid var(--border-2); border-radius: 10px; background: var(--bg-2); transition: border-color .15s, box-shadow .15s; }
.wa-box:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.wa-box textarea, .wa-box input { width: 100%; border: 0; background: transparent; color: var(--fg); font: 14px/1.55 var(--font); padding: 11px 12px; outline: none; resize: vertical; display: block; }
.wa-box textarea { min-height: 150px; }
.wa-toolbar { display: flex; align-items: center; gap: 2px; padding: 6px 8px; border-top: 1px solid var(--border); flex-wrap: wrap; position: relative; }
.wa-toolbar button { height: 30px; min-width: 30px; padding: 0 8px; border-radius: 7px; border: 0; background: transparent; color: var(--fg-2); cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 5px; font: 500 12.5px var(--font); }
.wa-toolbar button:hover { background: var(--surface-3); color: var(--fg); }
.wa-toolbar button svg { width: 16px; height: 16px; }
.wa-toolbar .sep { width: 1px; height: 18px; background: var(--border-2); margin: 0 4px; }
.wa-toolbar .count { margin-left: auto; font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.wa-toolbar .count.over { color: var(--err); font-weight: 600; }
.var-row { display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: 10px; align-items: center; }
.var-row code { text-align: center; padding: 8px 0; border-radius: 8px; background: var(--accent-soft); color: var(--accent); font-size: 13px; }
.btn-item { display: grid; grid-template-columns: 26px minmax(0, 1fr) auto; gap: 10px; align-items: start; padding: 12px; border: 1px solid var(--border-2); border-radius: 12px; background: var(--bg-2); }
.btn-item .grip { color: var(--muted); padding-top: 9px; cursor: grab; }
.btn-item .grip svg { width: 16px; height: 16px; }
.btn-item .fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 10px; }
.btn-item .type { font-size: 11.5px; color: var(--muted); grid-column: 1 / -1; display: flex; align-items: center; gap: 6px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; }
.btn-item .type svg { width: 14px; height: 14px; color: var(--accent); }
.checks { display: flex; flex-direction: column; gap: 6px; }
.checks div { display: flex; gap: 8px; font-size: 13px; align-items: flex-start; }
.checks svg { width: 16px; height: 16px; flex: none; margin-top: 2px; }
.checks .bad { color: var(--err); } .checks .warn { color: var(--warn); } .checks .good { color: var(--ok); }
.upload-zone { border: 1.5px dashed var(--border-2); border-radius: 12px; padding: 18px; text-align: center; color: var(--muted); cursor: pointer; transition: border-color .15s, background .15s; }
.upload-zone:hover, .upload-zone.drag { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); }

/* Telefon önizleme */
.tpl-preview { border-left: 1px solid var(--border); background: var(--bg-2); overflow-y: auto; padding: 22px; display: flex; flex-direction: column; gap: 14px; align-items: center; }
.phone { width: 340px; border-radius: 38px; padding: 12px; background: #111; box-shadow: 0 30px 60px -20px rgba(0, 0, 0, .6), inset 0 0 0 2px #2a2a2a; flex: none; }
.phone-screen { border-radius: 28px; overflow: hidden; background: var(--wa-wall); background-image: radial-gradient(var(--wa-wall-dot) 1.2px, transparent 1.2px); background-size: 16px 16px; height: 600px; display: flex; flex-direction: column; }
.phone-top { background: #008069; color: #fff; padding: 30px 14px 10px; display: flex; align-items: center; gap: 10px; }
:root[data-theme="dark"] .phone-top, :root:not([data-theme]) .phone-top { background: #202c33; }
.phone-top .pic { width: 34px; height: 34px; border-radius: 50%; background: rgba(255, 255, 255, .25); display: grid; place-items: center; }
.phone-top .pic svg { width: 18px; height: 18px; }
.phone-top b { font-size: 14.5px; display: flex; align-items: center; gap: 4px; }
.phone-top b svg { width: 14px; height: 14px; color: #25d366; }
.phone-top small { font-size: 11.5px; opacity: .8; display: block; }
.phone-chat { flex: 1; overflow-y: auto; padding: 14px 12px; display: flex; flex-direction: column; }
.phone-chat .day-sep { font-size: 11px; }
.phone-chat .msg { max-width: 92%; }
.phone-chat .bubble { font-size: 13.6px; }
.phone-chat .media.ph { height: 150px; display: grid; place-items: center; background: color-mix(in srgb, var(--wa-meta) 25%, transparent); }
.phone-chat .media.ph svg { width: 42px; height: 42px; opacity: .6; }
.phone-chat .media.loc { height: 120px; background: linear-gradient(135deg, #a7d3a0, #e7e2c5); }
.phone-bottom { background: var(--wa-sys); padding: 8px 10px; display: flex; gap: 8px; align-items: center; }
.phone-bottom .fake-input { flex: 1; height: 34px; border-radius: 17px; background: var(--wa-in); color: var(--wa-meta); font-size: 13px; display: flex; align-items: center; padding: 0 14px; }
.phone-bottom .mic { width: 34px; height: 34px; border-radius: 50%; background: #00a884; color: #fff; display: grid; place-items: center; }
.phone-bottom .mic svg { width: 16px; height: 16px; }

/* Duyarlı */
@media (max-width: 1280px) {
  .inbox.with-side { grid-template-columns: 320px minmax(0, 1fr); }
  .inbox.with-side .side { position: fixed; right: 0; top: 63px; bottom: 0; width: 320px; z-index: 40; box-shadow: var(--shadow); }
  .tpl-editor { grid-template-columns: minmax(0, 1fr) 380px; }
  .phone { width: 320px; }
}
@media (max-width: 960px) {
  .tpl-editor { grid-template-columns: 1fr; overflow-y: auto; }
  .tpl-form { overflow: visible; }
  .tpl-preview { border-left: 0; border-top: 1px solid var(--border); overflow: visible; }
  .cat-cards { grid-template-columns: 1fr; }
}
@media (max-width: 860px) {
  .inbox, .inbox.with-side { grid-template-columns: 1fr; height: calc(100vh - 57px); }
  .inbox .chat, .inbox .side { display: none; }
  .inbox.open .inbox-list { display: none; }
  .inbox.open .chat { display: flex; }
  .chat-head { flex-wrap: wrap; gap: 8px; padding: 8px 10px; }
  .chat-head .who { flex: 1 1 calc(100% - 110px); }
  .chat-head .who small { flex-wrap: nowrap; white-space: nowrap; overflow: hidden; }
  .chat-head .who .lbl, .chat-head .who .acc-ph { display: none; }
  .chat-head #ch-assign { flex: 1; width: auto !important; }
  .msg { max-width: 88%; }
  .chat-body { padding: 12px 10px; }
  .msg .actions { display: none; }
  .editor-bar .title-input { width: 160px; }
  .tpl-form { padding: 16px; }
  .phone { width: 100%; max-width: 340px; }
}
