/* Auralix — premium tema (açık/koyu otomatik) */
:root {
  --ink: #0a1a15; --ink-2: #10271f; --ink-line: rgba(255,255,255,.08); --ink-text: #cfe3da; --ink-muted: #7fa394;
  --bg: #f4f6f5; --surface: #ffffff; --surface-2: #f1f4f3; --border: #e3e8e6; --border-strong: #cfd8d4;
  --text: #14211c; --muted: #637570;
  --brand: #0c9467; --brand-600: #0a7f58; --brand-300: #4fd1a1; --brand-ink: #ffffff; --brand-soft: #e2f6ee;
  --gold: #c9a24b;
  --danger: #c0392b; --danger-soft: #fdeceb; --warn: #a96b0b; --warn-soft: #fcf2dc; --info: #1f5fa8; --info-soft: #e7f0fb;
  --in-bubble: #ffffff; --out-bubble: #d6f3e5; --chat-bg: #eef2f0;
  --shadow-sm: 0 1px 2px rgba(10,26,21,.05);
  --shadow: 0 1px 2px rgba(10,26,21,.04), 0 4px 14px rgba(10,26,21,.06);
  --shadow-lg: 0 10px 40px rgba(10,26,21,.18);
  --radius: 14px; --radius-sm: 9px;
  --font: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --ink: #07130f; --ink-2: #0c1f18;
    --bg: #0b1210; --surface: #121c18; --surface-2: #18251f; --border: #223029; --border-strong: #2f4238;
    --text: #e7f0ec; --muted: #8fa59c;
    --brand: #2fc08a; --brand-600: #27a877; --brand-300: #7fe0bb; --brand-ink: #03130c; --brand-soft: #123327;
    --danger: #f08577; --danger-soft: #3a1d1a; --warn: #e6b862; --warn-soft: #3a2f14; --info: #84b4ee; --info-soft: #14283f;
    --in-bubble: #1b2822; --out-bubble: #14452f; --chat-bg: #0e1713;
    --shadow-sm: none; --shadow: 0 1px 0 rgba(255,255,255,.03); --shadow-lg: 0 10px 40px rgba(0,0,0,.5);
  }
}
* { box-sizing: border-box; }
html, body { height: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 15px/1.55 var(--font); -webkit-font-smoothing: antialiased; font-feature-settings: "cv11", "ss01"; }
h1, h2, h3 { margin: 0 0 .5rem; line-height: 1.2; letter-spacing: -.015em; font-weight: 650; }
h1 { font-size: 1.65rem; } h2 { font-size: 1.12rem; } h3 { font-size: 1rem; }
a { color: var(--brand); }
button, input, select, textarea { font: inherit; color: inherit; }
.muted { color: var(--muted); } .small { font-size: .84rem; } .hidden { display: none !important; }
.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; flex-wrap: wrap; margin-bottom: 20px; }
.page-head p { margin: 4px 0 0; color: var(--muted); }

/* ===== Düzen ===== */
.shell { display: grid; grid-template-columns: 252px 1fr; min-height: 100vh; }
.side { background: linear-gradient(180deg, var(--ink) 0%, var(--ink-2) 100%); color: var(--ink-text); padding: 20px 14px; display: flex; flex-direction: column; gap: 4px; position: sticky; top: 0; height: 100vh; border-right: 1px solid var(--ink-line); }
.brand { display: flex; align-items: center; gap: 11px; font-weight: 700; font-size: 1.05rem; letter-spacing: -.01em; padding: 4px 10px 20px; color: #fff; }
.logo { width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center; background: linear-gradient(135deg, #17c58a, #0a7f58); box-shadow: 0 4px 14px rgba(23,197,138,.35), inset 0 1px 0 rgba(255,255,255,.25); }
.logo svg { width: 18px; height: 18px; fill: #fff; }
.brand small { display: block; font-weight: 500; font-size: .7rem; color: var(--ink-muted); letter-spacing: .08em; text-transform: uppercase; margin-top: 1px; }
.nav { display: flex; flex-direction: column; gap: 2px; }
.nav a { display: flex; align-items: center; gap: 11px; padding: 10px 12px; border-radius: 10px; color: var(--ink-text); text-decoration: none; font-weight: 500; transition: background .15s, color .15s; }
.nav a svg { width: 18px; height: 18px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; opacity: .85; }
.nav a:hover { background: rgba(255,255,255,.06); color: #fff; }
.nav a.active { background: linear-gradient(90deg, rgba(23,197,138,.22), rgba(23,197,138,.06)); color: #fff; box-shadow: inset 2px 0 0 var(--brand-300); }
.nav a.active svg { opacity: 1; stroke: var(--brand-300); }
.nav .sec { font-size: .68rem; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-muted); padding: 14px 12px 6px; }
.side .foot { margin-top: auto; padding: 12px; border: 1px solid var(--ink-line); border-radius: 12px; background: rgba(255,255,255,.03); display: flex; align-items: center; gap: 10px; }
.avatar { width: 34px; height: 34px; border-radius: 50%; background: linear-gradient(135deg, #1fc890, #0a7f58); color: #fff; display: grid; place-items: center; font-weight: 700; font-size: .85rem; flex: none; }
.side .foot .who { min-width: 0; flex: 1; } .side .foot .who b { display: block; color: #fff; font-size: .88rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.side .foot .who span { color: var(--ink-muted); font-size: .76rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block; }
.side .foot button { background: transparent; border: 1px solid var(--ink-line); color: var(--ink-text); border-radius: 8px; padding: 5px 9px; cursor: pointer; font-size: .78rem; }
.side .foot button:hover { background: rgba(255,255,255,.08); }
.main { padding: 32px clamp(18px, 3vw, 44px); min-width: 0; max-width: 1280px; width: 100%; }
.topbar { display: none; }

/* ===== Bileşenler ===== */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow); }
.card > h2:first-child { margin-bottom: 14px; }
.grid { display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; } .between { justify-content: space-between; }
.stack > * + * { margin-top: 14px; }
.stat { position: relative; overflow: hidden; }
.stat::after { content: ""; position: absolute; right: -30px; top: -30px; width: 110px; height: 110px; border-radius: 50%; background: radial-gradient(closest-side, var(--brand-soft), transparent); }
.stat .k { color: var(--muted); font-size: .8rem; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; }
.stat .v { font-size: 1.9rem; font-weight: 700; letter-spacing: -.02em; margin: 6px 0 2px; position: relative; z-index: 1; }
.stat .v small { font-size: 1rem; color: var(--muted); font-weight: 500; }

.btn { border: 1px solid var(--border-strong); background: var(--surface); padding: 9px 16px; border-radius: 10px; cursor: pointer; min-height: 40px; font-weight: 550; transition: transform .06s, background .15s, box-shadow .15s, border-color .15s; box-shadow: var(--shadow-sm); }
.btn:hover { background: var(--surface-2); } .btn:active { transform: translateY(1px); }
.btn.primary { background: linear-gradient(180deg, #12ad79, var(--brand-600)); color: #fff; border-color: var(--brand-600); box-shadow: 0 2px 8px rgba(12,148,103,.28), inset 0 1px 0 rgba(255,255,255,.18); }
.btn.primary:hover { filter: brightness(1.07); }
.btn.danger { color: var(--danger); } .btn.danger:hover { background: var(--danger-soft); }
.btn.sm { padding: 5px 11px; min-height: 32px; font-size: .86rem; border-radius: 8px; }
.btn:disabled { opacity: .55; cursor: not-allowed; }
label { display: block; font-size: .84rem; font-weight: 600; margin-bottom: 6px; color: var(--text); }
input, select, textarea { width: 100%; padding: 10px 13px; border: 1px solid var(--border-strong); border-radius: 10px; background: var(--surface); transition: border-color .15s, box-shadow .15s; }
input:hover, select:hover, textarea:hover { border-color: var(--muted); }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 22%, transparent); }
.btn:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
input[type="checkbox"] { width: auto; accent-color: var(--brand); }
textarea { resize: vertical; min-height: 92px; }
.field + .field { margin-top: 14px; }
.two { display: grid; gap: 14px; grid-template-columns: 1fr 1fr; }
.badge { display: inline-flex; align-items: center; gap: 5px; padding: 2px 10px; border-radius: 999px; font-size: .76rem; font-weight: 600; background: var(--surface-2); color: var(--muted); }
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: .75; }
.badge.ok { background: var(--brand-soft); color: var(--brand-600); } .badge.bad { background: var(--danger-soft); color: var(--danger); }
.badge.warn { background: var(--warn-soft); color: var(--warn); } .badge.info { background: var(--info-soft); color: var(--info); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .badge.ok { color: var(--brand); } }
.alert { padding: 12px 15px; border-radius: 11px; background: var(--info-soft); color: var(--info); border: 1px solid color-mix(in srgb, currentColor 18%, transparent); }
.alert.warn { background: var(--warn-soft); color: var(--warn); } .alert.bad { background: var(--danger-soft); color: var(--danger); }
.tablewrap { overflow-x: auto; margin: 0 -8px; padding: 0 8px; }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 13px 12px; border-bottom: 1px solid var(--border); vertical-align: middle; }
th { font-size: .72rem; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; font-weight: 650; white-space: nowrap; }
tbody tr { transition: background .12s; } tbody tr:hover { background: var(--surface-2); } tbody tr:last-child td { border-bottom: 0; }
.copy { display: flex; gap: 8px; } .copy input { font-family: ui-monospace, "SF Mono", Consolas, monospace; font-size: .82rem; background: var(--surface-2); }
.meter { height: 8px; border-radius: 99px; background: var(--surface-2); overflow: hidden; margin-top: 10px; }
.meter > div { height: 100%; background: linear-gradient(90deg, var(--brand-300), var(--brand)); border-radius: 99px; transition: width .4s; }
.empty { text-align: center; padding: 48px 16px; color: var(--muted); }
.modal-bg { position: fixed; inset: 0; background: rgba(6,16,12,.55); backdrop-filter: blur(3px); display: flex; align-items: center; justify-content: center; padding: 16px; z-index: 20; animation: fade .15s; }
.modal { background: var(--surface); border: 1px solid var(--border); border-radius: 18px; padding: 26px; width: min(580px, 100%); max-height: 92vh; overflow: auto; box-shadow: var(--shadow-lg); animation: pop .18s; }
.modal h2 { font-size: 1.25rem; margin-bottom: 16px; }
@keyframes fade { from { opacity: 0 } } @keyframes pop { from { opacity: 0; transform: translateY(8px) scale(.98) } }
.toast { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); background: var(--ink); color: #fff; padding: 12px 18px; border-radius: 12px; z-index: 30; max-width: 90vw; box-shadow: var(--shadow-lg); font-weight: 500; }
.toast.bad { background: #b3261e; }

/* ===== Giriş ===== */
.login { min-height: 100vh; display: grid; grid-template-columns: 1.05fr 1fr; }
.login-hero { background: radial-gradient(1200px 600px at 10% -10%, #14a074 0%, transparent 55%), radial-gradient(900px 500px at 100% 110%, #0b6b4b 0%, transparent 60%), linear-gradient(160deg, #0a1a15, #0d2a20); color: #e7f5ee; padding: clamp(28px, 5vw, 64px); display: flex; flex-direction: column; justify-content: space-between; position: relative; overflow: hidden; }
.login-hero::before { content: ""; position: absolute; inset: 0; background-image: linear-gradient(rgba(255,255,255,.04) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.04) 1px, transparent 1px); background-size: 44px 44px; mask-image: radial-gradient(circle at 30% 30%, #000, transparent 70%); }
.login-hero > * { position: relative; }
.login-hero h2 { font-size: clamp(1.7rem, 3.2vw, 2.6rem); line-height: 1.12; letter-spacing: -.03em; color: #fff; max-width: 14ch; }
.login-hero ul { list-style: none; padding: 0; margin: 22px 0 0; display: grid; gap: 12px; color: #bfe0d2; }
.login-hero li { display: flex; gap: 10px; align-items: flex-start; } .login-hero li::before { content: "✓"; color: var(--brand-300); font-weight: 800; }
.login-form { display: grid; place-items: center; padding: 28px; background: var(--bg); }
.login-form .box { width: min(400px, 100%); } .login-form h1 { font-size: 1.7rem; margin-bottom: 6px; }

/* ===== Gelen kutusu ===== */
.inbox { display: grid; grid-template-columns: 340px 1fr; height: calc(100vh - 252px); height: calc(100dvh - 252px); min-height: 420px; border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; background: var(--surface); box-shadow: var(--shadow); }
.convs { border-right: 1px solid var(--border); overflow-y: auto; }
.conv { display: block; width: 100%; text-align: left; padding: 14px 16px; border: 0; border-bottom: 1px solid var(--border); background: transparent; cursor: pointer; transition: background .12s; }
.conv:hover { background: var(--surface-2); } .conv.active { background: var(--brand-soft); box-shadow: inset 3px 0 0 var(--brand); }
.conv .name { font-weight: 650; display: flex; justify-content: space-between; gap: 8px; }
.conv .prev { color: var(--muted); font-size: .86rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.unread { background: var(--brand); color: var(--brand-ink); border-radius: 99px; font-size: .7rem; font-weight: 700; padding: 1px 7px; min-width: 20px; text-align: center; }
.thread { display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.thread-head { padding: 14px 20px; border-bottom: 1px solid var(--border); background: var(--surface); }
.msgs { flex: 1; min-height: 0; overflow-y: auto; padding: 22px; display: flex; flex-direction: column; gap: 8px; background: var(--chat-bg); }
.bubble { max-width: min(560px, 78%); padding: 9px 13px; border-radius: 14px 14px 14px 4px; background: var(--in-bubble); box-shadow: var(--shadow-sm); white-space: pre-wrap; overflow-wrap: anywhere; }
.bubble.out { align-self: flex-end; background: var(--out-bubble); border-radius: 14px 14px 4px 14px; }
.bubble .meta { font-size: .7rem; color: var(--muted); margin-top: 4px; text-align: right; }
.composer { padding: 12px 14px; border-top: 1px solid var(--border); background: var(--surface); }
.back { display: none; }

@media (max-width: 900px) {
  .login { grid-template-columns: 1fr; } .login-hero { display: none; }
  .shell { grid-template-columns: minmax(0, 1fr); }
  .side { position: fixed; inset: 0 22% 0 0; z-index: 10; transform: translateX(-100%); transition: transform .2s; height: 100vh; }
  .side.open { transform: none; box-shadow: 0 0 60px rgba(0,0,0,.5); }
  .topbar { display: flex; align-items: center; gap: 12px; padding: 12px 16px; background: var(--ink); color: #fff; position: sticky; top: 0; z-index: 5; }
  .topbar .btn { background: transparent; color: #fff; border-color: var(--ink-line); }
  .main { padding: 18px 16px 28px; max-width: 100vw; } .two { grid-template-columns: 1fr; } .page-head > .row, .page-head > .btn { width: 100%; } td[style*="min-width"] { min-width: 150px !important; }
  .inbox { grid-template-columns: 1fr; height: calc(100vh - 252px); height: calc(100dvh - 252px); }
  .inbox.in-thread .convs { display: none; } .inbox:not(.in-thread) .thread { display: none; } .back { display: inline-block; }
}
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }

/* ===== Sol şerit bölümleri: WhatsApp Business / WhatsApp ===== */
.nav .grp { margin: 3px 0; }
.grp-h { width: 100%; display: flex; align-items: center; gap: 11px; padding: 10px 12px; border-radius: 10px; color: var(--ink-text); cursor: pointer; background: transparent; border: 0; text-align: left; font: inherit; transition: background .15s; }
.grp-h:hover { background: rgba(255,255,255,.06); }
.grp.open > .grp-h { background: rgba(255,255,255,.06); }
.grp-h .gi { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; background: rgba(255,255,255,.07); flex: none; }
.grp-h .gi svg { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.grp[data-g="bs"] .gi { color: var(--brand-300); background: rgba(79,209,161,.14); }
.grp[data-g="wa"] .gi { color: #e6b862; background: rgba(230,184,98,.14); }
.grp-h .gt { flex: 1; display: flex; flex-direction: column; line-height: 1.2; min-width: 0; }
.grp-h .gt b { color: #fff; font-weight: 650; }
.grp-h .gt small { color: var(--ink-muted); font-size: .72rem; margin-top: 2px; }
.grp-h .chev { width: 8px; height: 8px; border-right: 2px solid var(--ink-muted); border-bottom: 2px solid var(--ink-muted); transform: rotate(45deg); transition: transform .15s; margin-right: 4px; }
.grp.open .chev { transform: rotate(-135deg); }
.grp-b { display: none; padding: 4px 0 6px 6px; margin: 2px 0 4px 26px; border-left: 1px solid var(--ink-line); }
.grp.open .grp-b { display: block; }
.grp-b a { padding: 8px 10px; font-size: .92rem; }
.grp-empty { font-size: .8rem; color: var(--ink-muted); padding: 8px 10px; line-height: 1.5; }
.grp-h .gt b { white-space: nowrap; font-size: .93rem; }
.grp-h { gap: 9px; padding: 9px 10px; }

/* ===== Menü anahtarı (açık/kapalı) ===== */
.switch { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; margin: 0; font-weight: 600; }
.switch input { position: absolute; opacity: 0; width: 0; height: 0; }
.switch i { width: 42px; height: 24px; border-radius: 99px; background: var(--border-strong); position: relative; transition: background .15s; flex: none; }
.switch i::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; transition: transform .15s; box-shadow: 0 1px 3px rgba(0,0,0,.3); }
.switch input:checked + i { background: var(--brand); }
.switch input:checked + i::after { transform: translateX(18px); }
.switch input:focus-visible + i { outline: 2px solid var(--brand); outline-offset: 2px; }
.switch .sl { min-width: 44px; font-size: .9rem; }

/* ---- Kampanya detayı ---- */
.chips-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 8px; }
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 3px 11px; border-radius: 999px; font-size: .78rem; font-weight: 600; background: var(--surface-2); color: var(--text); border: 1px solid var(--border); }
.pill.muted { color: var(--muted); font-weight: 500; }
.detail-top { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); gap: 16px; margin-top: 6px; }
.prog-card .k, .msg-card .k { color: var(--muted); font-size: .8rem; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; }
.prog-head { display: flex; justify-content: space-between; align-items: flex-end; margin-bottom: 12px; }
.prog-head .big { font-size: 2.6rem; font-weight: 800; letter-spacing: -.03em; line-height: 1.1; background: linear-gradient(90deg, var(--brand-600), var(--brand-300)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.prog-num { color: var(--muted); font-size: .95rem; } .prog-num b { color: var(--text); font-size: 1.15rem; }
.prog-card .meter { height: 12px; margin-bottom: 18px; }
.kv-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
.kv { background: var(--surface-2); border: 1px solid var(--border); border-radius: 12px; padding: 10px 14px; display: flex; flex-direction: column; gap: 2px; }
.kv span { color: var(--muted); font-size: .75rem; font-weight: 600; letter-spacing: .03em; text-transform: uppercase; } .kv b { font-size: 1.05rem; }
.note { margin-top: 14px; padding: 10px 14px; border-radius: 12px; background: var(--warn-soft); color: var(--warn); font-size: .85rem; font-weight: 500; }
.msg-card { display: flex; flex-direction: column; gap: 12px; }
.wa-bubble { position: relative; background: #d9fdd3; color: #111b21; border-radius: 14px 14px 14px 4px; padding: 12px 14px; line-height: 1.5; font-size: .95rem; box-shadow: 0 1px 2px rgba(0,0,0,.08); word-break: break-word; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .wa-bubble { background: #1f3a2d; color: #e6f4ec; } }
.chip { border: 1px solid var(--border); background: var(--surface); color: var(--text); border-radius: 999px; padding: 5px 13px; font: inherit; font-size: .82rem; font-weight: 600; cursor: pointer; }
.chip b { color: var(--muted); margin-left: 4px; font-weight: 700; } .chip:hover { background: var(--surface-2); }
.chip.on { background: var(--brand-soft); border-color: var(--brand); color: var(--brand-600); } .chip.on b { color: inherit; }
.av { width: 32px; height: 32px; flex: none; border-radius: 50%; display: grid; place-items: center; font-size: .72rem; font-weight: 700; background: var(--brand-soft); color: var(--brand-600); }
@media (max-width: 900px) { .detail-top { grid-template-columns: 1fr; } }
.stats4 { grid-template-columns: repeat(4, minmax(0, 1fr)) !important; }
@media (max-width: 900px) { .stats4 { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; } }
.note.info { background: var(--info-soft); color: var(--info); }
.kv-list { display: flex; flex-direction: column; margin-top: auto; border-top: 1px solid var(--border); }
.kv-list > div { display: flex; justify-content: space-between; gap: 12px; padding: 9px 2px; border-bottom: 1px solid var(--border); font-size: .88rem; }
.kv-list > div:last-child { border-bottom: 0; } .kv-list span { color: var(--muted); } .kv-list b { text-align: right; }
.plan { margin-top: 16px; } .plan .k { color: var(--muted); font-size: .75rem; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; margin-bottom: 8px; }
.plan-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.plan-chip { display: inline-flex; flex-direction: column; gap: 1px; padding: 8px 14px; border-radius: 12px; border: 1px solid var(--border); background: var(--surface-2); position: relative; min-width: 110px; }
.plan-chip i { font-style: normal; color: var(--muted); font-size: .74rem; font-weight: 600; } .plan-chip b { font-size: 1rem; }
.plan-chip em { font-style: normal; position: absolute; top: -9px; right: 8px; font-size: .64rem; font-weight: 700; padding: 1px 8px; border-radius: 99px; background: var(--info-soft); color: var(--info); letter-spacing: .02em; }
.plan-chip em.last { background: var(--brand-soft); color: var(--brand-600); }
.plan-chip.today { background: var(--brand-soft); border-color: var(--brand); } .plan-chip.today i { color: var(--brand-600); }
.plan-arrow { color: var(--muted); font-size: 1.2rem; }

/* ---- Gelen kutusu geliştirmeleri: süzgeç, etiket, aşama, not, hazır yanıt, pano ---- */
.ib-filters { gap: 8px; margin-bottom: 10px; flex-wrap: wrap; } .ib-filters input { flex: 1; min-width: 160px; } .ib-filters select { width: auto; }
.seg { display: inline-flex; border: 1px solid var(--border-strong); border-radius: 99px; overflow: hidden; background: var(--surface); }
.seg button { border: 0; background: transparent; padding: 6px 14px; font-weight: 600; font-size: .85rem; color: var(--muted); cursor: pointer; }
.seg button.on { background: var(--brand); color: var(--brand-ink); }
.chip { display: inline-flex; align-items: center; gap: 4px; padding: 1px 8px; border-radius: 99px; font-size: .72rem; font-weight: 600; background: var(--info-soft); color: var(--info); }
.chip button { border: 0; background: transparent; color: inherit; cursor: pointer; padding: 0 0 0 2px; font-size: .9rem; line-height: 1; }
.chip.st-talking, .st-talking { background: var(--info-soft); } .chip.st-offer, .st-offer { background: var(--warn-soft); color: var(--warn); }
.chip.st-won, .st-won { background: var(--brand-soft); color: var(--brand-600); } .chip.st-lost, .st-lost { background: var(--danger-soft); color: var(--danger); }
.conv-meta { display: flex; gap: 5px; flex-wrap: wrap; align-items: center; margin-top: 6px; }
.asg { margin-left: auto; width: 22px; height: 22px; border-radius: 50%; background: var(--ink); color: #fff; font-size: .62rem; font-weight: 700; display: inline-grid; place-items: center; }
.thread-tools { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; margin-top: 10px; } .thread-tools select { width: auto; padding: 5px 8px; font-size: .84rem; }
.thread-tools #tgs { display: inline-flex; gap: 5px; flex-wrap: wrap; } .warnbtn { background: var(--warn-soft); color: var(--warn); border-color: transparent; }
.notes { margin-top: 10px; padding: 10px; border-radius: var(--radius-sm); background: var(--warn-soft); display: grid; gap: 8px; max-height: 220px; overflow-y: auto; }
.note { background: var(--surface); border-radius: 8px; padding: 8px 10px; white-space: pre-wrap; overflow-wrap: anywhere; } .linkbtn { border: 0; background: none; color: var(--danger); cursor: pointer; font-size: inherit; padding: 0 0 0 6px; }
.composer { position: relative; }
.qp { position: absolute; left: 14px; right: 14px; bottom: calc(100% + 6px); max-height: 260px; overflow-y: auto; background: var(--surface); border: 1px solid var(--border-strong); border-radius: var(--radius-sm); box-shadow: var(--shadow-lg); z-index: 30; }
.qp button { display: block; width: 100%; text-align: left; border: 0; border-bottom: 1px solid var(--border); background: transparent; padding: 9px 12px; cursor: pointer; } .qp button:hover { background: var(--surface-2); }
.qp button span { display: block; color: var(--muted); font-size: .82rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.board { display: flex; gap: 12px; overflow-x: auto; padding-bottom: 10px; align-items: flex-start; } .board[hidden], .inbox[hidden] { display: none; }
.bcol { flex: 0 0 240px; background: var(--surface-2); border-radius: var(--radius); padding: 10px; display: grid; gap: 8px; }
.bcol-h { display: flex; justify-content: space-between; padding: 4px 8px; border-radius: 8px; background: var(--surface); }
.bcard { background: var(--surface); border-radius: var(--radius-sm); padding: 10px; box-shadow: var(--shadow-sm); cursor: pointer; display: grid; gap: 4px; } .bcard .name { display: flex; justify-content: space-between; gap: 6px; }
.bcard .prev { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .bmove { margin-top: 6px; padding: 4px 6px; font-size: .8rem; } .bempty { padding: 8px; text-align: center; }
.qr-row { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; padding: 10px 12px; border: 1px solid var(--border); border-radius: var(--radius-sm); }
.daychk { display: inline-flex; gap: 4px; align-items: center; padding: 4px 10px; border: 1px solid var(--border-strong); border-radius: 99px; font-size: .84rem; cursor: pointer; } .daychk input { width: auto; }
@media (max-width: 900px) { .bcol { flex-basis: 78vw; } .qr-row { flex-direction: column; } }
.notes[hidden], .qp[hidden] { display: none; } a.btn { text-decoration: none; }

/* ---- Medya gönderimi ---- */
.bmedia { display: block; max-width: 100%; width: 280px; max-height: 320px; object-fit: cover; border-radius: 10px; margin-bottom: 6px; background: var(--surface-2); }
.bfile { display: inline-flex; gap: 6px; align-items: center; padding: 8px 10px; margin-bottom: 6px; border-radius: 8px; background: rgba(0,0,0,.05); color: inherit; text-decoration: none; font-weight: 600; overflow-wrap: anywhere; }
.att { display: flex; gap: 10px; align-items: center; padding: 8px 10px; margin-bottom: 8px; border: 1px dashed var(--border-strong); border-radius: var(--radius-sm); background: var(--surface-2); }
.att[hidden] { display: none; } .att img { width: 44px; height: 44px; object-fit: cover; border-radius: 6px; } .att .attico { font-size: 1.6rem; } .att .small { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.baudio { display: block; width: 260px; max-width: 100%; margin-bottom: 6px; }

/* ---- Mobil gelen kutusu: görüşme açıkken tüm ekranı kullan, yazı kutusu geniş ---- */
@media (max-width: 900px) {
  .thread-open .ib-top { display: none; }
  .thread-open .inbox { height: calc(100vh - 92px); height: calc(100dvh - 92px); min-height: 360px; }
  .thread-head { padding: 10px 12px; } .thread-head .row.between { gap: 8px; }
  .thread-tools { margin-top: 8px; gap: 5px; } .thread-tools select { max-width: 46vw; }
  .msgs { padding: 14px 12px; }
  .bubble { max-width: 88%; }
  .composer { padding: 8px 10px; }
  .qp { left: 8px; right: 8px; }
}
.bubble .meta { margin-top: 2px; }

/* Görüşme açıkken sayfa kaymaz: üst çubuk + görüşme tam ekran, yalnızca mesajlar kayar */
.msgs, .convs { overscroll-behavior: contain; }
@media (max-width: 900px) {
  body.thread-open-body { overflow: hidden; height: 100dvh; }
  .thread-open-body .grecaptcha-badge, .thread-open-body #langsw { display: none !important; }
}

/* ---- Mobil: daha kompakt ölçüler (≈412 px genişlikli telefonlar) ---- */
@media (max-width: 600px) {
  .main h1 { font-size: 1.45rem; }
  .main { padding: 14px 12px 24px; }
  .ib-filters input, .ib-filters select { padding: 8px 10px; font-size: .9rem; }
  .seg button { padding: 5px 12px; font-size: .8rem; }
  .conv { padding: 10px 14px; } .conv .name { font-size: .94rem; } .conv .prev { font-size: .8rem; }
  .conv-meta .chip { font-size: .68rem; } .unread { font-size: .66rem; padding: 0 6px; min-width: 18px; }
  .bubble { font-size: .92rem; padding: 7px 11px; } .bubble .meta { font-size: .66rem; }
  .thread-head b { font-size: .95rem; } .thread-tools select, .thread-tools .btn { font-size: .8rem; padding: 4px 8px; }
  .composer textarea { font-size: .92rem; min-height: 40px; } .composer .btn { font-size: .9rem; }
  .page-head h1 { font-size: 1.35rem; }
}

.daysep { text-align: center; margin: 6px 0 2px; } .daysep span { display: inline-block; padding: 2px 12px; border-radius: 99px; background: rgba(0,0,0,.07); color: var(--muted); font-size: .72rem; font-weight: 600; }

/* ---- Sohbet penceresi: WhatsApp görünümü ---- */
.thread { --wa-bg: #efeae2; --wa-in: #ffffff; --wa-out: #d9fdd3; --wa-text: #111b21; --wa-meta: #667781; --wa-tick: #667781; --wa-read: #53bdeb; --wa-bar: #f0f2f5; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .thread { --wa-bg: #0b141a; --wa-in: #202c33; --wa-out: #005c4b; --wa-text: #e9edef; --wa-meta: #8696a0; --wa-tick: #8696a0; --wa-bar: #202c33; } }
.thread .msgs { background-color: var(--wa-bg); background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='180' height='180' viewBox='0 0 180 180' fill='none' stroke='%23808080' stroke-opacity='.11' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><circle cx='28' cy='30' r='9'/><path d='M70 22l5 10 11 1-8 8 2 11-10-6-10 6 2-11-8-8 11-1z'/><path d='M120 28c8-10 20 4 8 12-12-8 0-22 8-12'/><rect x='148' y='18' width='20' height='16' rx='4'/><path d='M22 78q8-10 16 0t16 0'/><path d='M82 70h22M82 78h22M82 86h14'/><circle cx='134' cy='80' r='6'/><path d='M134 74v-8m0 28v-8m-6-6h-8m28 0h-8'/><path d='M30 128l12-8 12 8v14H30z'/><circle cx='86' cy='132' r='10'/><path d='M80 132l4 4 8-8'/><path d='M126 120l16 16m0-16l-16 16'/><path d='M150 118a12 12 0 1 1-3 20'/><path d='M20 164h30M70 160q10 12 20 0'/><path d='M120 160h14l-7 12z'/></svg>"); background-size: 180px 180px; padding: 16px 14px; gap: 2px; }
.thread .thread-head, .thread .composer { background: var(--wa-bar); }
.thread .bubble { position: relative; max-width: min(520px, 82%); padding: 6px 8px 6px 9px; border-radius: 8px; background: var(--wa-in); color: var(--wa-text); box-shadow: 0 1px .5px rgba(11,20,26,.13); line-height: 1.35; font-size: .92rem; }
.thread .bubble.out { background: var(--wa-out); border-radius: 8px; }
.thread .bubble::after { content: ""; display: block; clear: both; }
.thread .bubble .meta { float: right; margin: 7px 0 -3px 12px; display: inline-flex; align-items: center; gap: 3px; font-size: .68rem; color: var(--wa-meta); text-align: right; line-height: 1; }
.thread .bubble.tail { margin-top: 6px; }
.thread .bubble.tail::before { content: ""; position: absolute; top: 0; left: -8px; width: 8px; height: 13px; background: var(--wa-in); -webkit-mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 13'><path d='M1.533 3.568 8 12.193V1H2.812C1.042 1 .474 2.156 1.533 3.568z'/></svg>") no-repeat center / 100% 100%; mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 13'><path d='M1.533 3.568 8 12.193V1H2.812C1.042 1 .474 2.156 1.533 3.568z'/></svg>") no-repeat center / 100% 100%; }
.thread .bubble.out.tail::before { left: auto; right: -8px; background: var(--wa-out); transform: scaleX(-1); }
.thread .bubble.tail:not(.out) { border-top-left-radius: 0; } .thread .bubble.out.tail { border-top-right-radius: 0; }
.tick { display: inline-flex; color: var(--wa-tick); } .tick.read { color: var(--wa-read); } .tick.fail { color: #fff; background: var(--danger); border-radius: 50%; width: 14px; height: 14px; justify-content: center; align-items: center; font-weight: 800; font-size: .66rem; }
.berr { clear: both; color: var(--danger); font-size: .72rem; padding-top: 2px; }
.thread .daysep span { background: var(--wa-in); color: var(--wa-meta); box-shadow: 0 1px .5px rgba(11,20,26,.13); text-transform: none; }
.composer form { align-items: center; gap: 8px; }
.composer textarea { border-radius: 22px; padding: 10px 16px; border-color: transparent; background: var(--surface); min-height: 44px; max-height: 120px; flex: 1; min-width: 0; resize: none; }
.rbtn { flex: 0 0 auto; width: 42px; height: 42px; border-radius: 50%; border: 0; background: transparent; font-size: 1.25rem; cursor: pointer; display: inline-grid; place-items: center; color: var(--muted); }
.rbtn:hover { background: rgba(0,0,0,.06); } .rbtn.send { background: var(--brand); color: var(--brand-ink); } .rbtn.send:hover { background: var(--brand-600); } .rbtn:disabled { opacity: .5; }
@media (max-width: 600px) { .thread .bubble { font-size: .9rem; max-width: 86%; } .rbtn { width: 38px; height: 38px; } }

/* Mobilde yazı alanlarına dokununca tarayıcı yakınlaştırmasın (16 px altı yazı alanları yakınlaştırır) */
@media (max-width: 900px) {
  input, select, textarea { font-size: 16px !important; }
  html { -webkit-text-size-adjust: 100%; touch-action: manipulation; }
}

/* ---- Sohbet başlığı: kompakt, WhatsApp benzeri ---- */
.thread-head { padding: 8px 10px 6px; }
.th-top { display: flex; align-items: center; gap: 10px; min-width: 0; }
.back-btn { display: none; border: 0; background: transparent; font-size: 1.35rem; line-height: 1; padding: 6px 8px 6px 2px; cursor: pointer; color: var(--text); }
.th-av { flex: 0 0 auto; width: 40px; height: 40px; border-radius: 50%; background: var(--brand-soft); color: var(--brand-600); display: inline-grid; place-items: center; font-weight: 700; font-size: .9rem; }
.th-who { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.25; }
.th-who b { font-size: 1rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.th-who small { color: var(--muted); font-size: .78rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .ok-t { color: var(--brand-600); } .warn-t { color: var(--warn); }
.th-note { position: relative; flex: 0 0 auto; width: 40px; height: 40px; border-radius: 50%; border: 0; background: transparent; font-size: 1.2rem; cursor: pointer; } .th-note:hover { background: rgba(0,0,0,.06); }
.th-note.has { background: var(--warn-soft); } .th-note i { position: absolute; top: 2px; right: 0; background: var(--warn); color: #fff; font-style: normal; font-size: .62rem; font-weight: 700; border-radius: 99px; padding: 0 5px; min-width: 16px; text-align: center; }
.thread-tools { flex-wrap: nowrap; overflow-x: auto; margin-top: 8px; padding-bottom: 2px; scrollbar-width: none; } .thread-tools::-webkit-scrollbar { display: none; }
.thread-tools > * { flex: 0 0 auto; } .thread-tools #tgs { display: inline-flex; gap: 5px; flex-wrap: nowrap; }
@media (max-width: 900px) { .back-btn { display: inline-block; } }

/* ---- Mobil sohbet: Dahi Çocuk panelindeki gibi tam ekran, küçük ve sıkı ölçüler ---- */
@media (max-width: 900px) {
  .main.thread-open { position: fixed; inset: 0; z-index: 60; padding: 0; margin: 0; max-width: none; height: 100vh; height: 100dvh; overflow: hidden; background: var(--bg); }
  .thread-open .inbox { height: 100vh; height: 100dvh; min-height: 0; border: 0; border-radius: 0; box-shadow: none; }
  .thread .bubble { font-size: 13.5px; line-height: 1.38; padding: 6px 8px 5px 9px; max-width: 80%; }
  .thread .bubble .meta { font-size: 10.5px; margin-top: 6px; }
  .thread .msgs { padding: 12px 14px; }
  .thread .daysep span { font-size: 11px; padding: 2px 10px; }
  .thread-head { padding: 8px 10px 6px; padding-top: max(8px, env(safe-area-inset-top)); }
  .th-who b { font-size: 15px; } .th-who small { font-size: 12px; } .th-av { width: 36px; height: 36px; font-size: .8rem; }
  .thread-tools .btn.sm, .thread-tools select { min-height: 30px; padding: 3px 10px; font-size: 12.5px; border-radius: 8px; }
  .thread-tools .chip { font-size: 11.5px; }
  .composer { padding: 8px 10px; padding-bottom: max(8px, env(safe-area-inset-bottom)); }
  .composer textarea { min-height: 40px; padding: 9px 14px; font-size: 16px; }
  .rbtn { width: 36px; height: 36px; font-size: 1.1rem; } .rbtn.send { width: 40px; height: 40px; }
  /* liste ekranı */
  .main h1 { font-size: 20px; } .ib-top .muted { font-size: 12px; }
  .ib-filters input, .ib-filters select { min-height: 38px; padding: 6px 10px; }
  .seg button { padding: 4px 12px; font-size: 12.5px; } .ib-top .btn.sm { min-height: 32px; padding: 4px 10px; font-size: 12.5px; }
  .conv { padding: 10px 14px; } .conv .name { font-size: 14px; } .conv .prev { font-size: 12.5px; }
}

/* Mobil menü açıkken sağdaki boşluğa dokunmak menüyü kapatır */
.scrim { display: none; }
@media (max-width: 900px) { .side.open ~ .scrim { display: block; position: fixed; inset: 0; z-index: 9; background: rgba(0,0,0,.45); } }

/* ---- Kampanya formu: değişken düğmeleri, mesaj çeşitleri, kayıtlı metinler ---- */
.vchips { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 4px; }
.vchip { border: 1px solid var(--border-strong); background: var(--surface); color: var(--brand-600); border-radius: 99px; padding: 2px 10px; font-size: .8rem; cursor: pointer; font-weight: 600; }
.vchip:hover { background: var(--brand-soft); }
.tplrow { gap: 8px; margin-bottom: 8px; flex-wrap: wrap; } .vitem { display: grid; gap: 2px; justify-items: end; } .vitem textarea { width: 100%; }

/* ---- Kampanya raporu: günlük gönderim grafiği ---- */
.daybars { display: flex; gap: 6px; align-items: flex-end; height: 100px; margin-top: 8px; overflow-x: auto; padding-bottom: 2px; }
.dayb { display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 2px; min-width: 30px; font-size: .7rem; color: var(--muted); }
.dayb i { display: block; width: 18px; border-radius: 4px 4px 0 0; background: var(--brand); } .dayb b { color: var(--text); font-size: .72rem; }

/* ---- Bağlama sonrası numara seçimi ---- */
.numrow { display: flex; gap: 12px; align-items: center; padding: 10px 12px; border: 1px solid var(--border-strong); border-radius: 10px; cursor: pointer; background: var(--surface); }
.numrow:hover { background: var(--surface-2); } .numrow.off { opacity: .65; cursor: default; } .numrow > div { flex: 1; min-width: 0; }

/* ---- İnceleme hesabı (Meta App Review): yeni gelen kutusu araçları gizli, sade akış ---- */
.review-mode .seg, .review-mode .wizlink, .review-mode .proflink, .review-mode .ib-filters #ft, .review-mode .thread-tools, .review-mode .th-note, .review-mode #qb, .review-mode a[href$="/inbox-set"], .review-mode .conv-meta, .review-mode .notes { display: none !important; }

.head-actions{display:flex;gap:8px;flex-wrap:wrap;justify-content:flex-end;align-items:center}
@media(max-width:640px){.head-actions{width:100%;justify-content:stretch}.head-actions .btn{flex:1}}

.th-note{color:var(--muted)} .th-note svg{display:block;margin:auto} .th-note.has{color:var(--warn)}
.rbtn#qb:hover{color:#d98a00} .rbtn#ab:hover{color:var(--brand)}
.thread-tools{padding-bottom:6px}

/* Gelen kutusu: boşlukları daralt, sohbet alanı yüksekliği doldursun */
.main:has(.inbox) { padding-top: 14px; padding-bottom: 12px; }
.main:has(.inbox) .ib-top:first-child { margin-bottom: 6px !important; }
.main:has(.inbox) h1 { font-size: 1.5rem; }
.inbox { height: calc(100vh - 168px); height: calc(100dvh - 168px); min-height: 380px; }
.thread .bmedia { width: 240px; max-height: 240px; }
@media (max-width: 800px) { .inbox { height: calc(100dvh - 190px); } }

/* PC: WhatsApp Web düzeni — tam genişlik, tek şerit başlık, ekranı dolduran sohbet */
@media (min-width: 801px) {
  .main:has(.inbox) { max-width: none; padding: 10px 14px 12px; }
  .main:has(.inbox) .ib-top:first-child { margin-bottom: 4px !important; align-items: center; }
  .main:has(.inbox) .ib-top:first-child .muted { display: none; }
  .main:has(.inbox) h1 { font-size: 1.25rem; }
  .ib-filters { margin-bottom: 8px; max-width: 520px; }
  .inbox { grid-template-columns: 380px 1fr; height: calc(100dvh - 128px); border-radius: 12px; }
  .convs { border-right: 1px solid var(--border); }
  .thread-head { padding: 10px 16px 8px; }
  .msgs { padding: 18px 8%; }
  .thread .bubble { max-width: 62%; }
  .composer { padding: 10px 16px; }
}

.cav { display: none; }
@media (min-width: 801px) {
  .convs { padding: 6px; }
  .conv { display: flex; gap: 12px; align-items: center; border: 0; border-radius: 12px; padding: 10px 12px; margin-bottom: 2px; }
  .conv.active { box-shadow: none; background: var(--brand-soft); }
  .cav { display: grid; place-items: center; flex: none; width: 48px; height: 48px; border-radius: 50%; font-weight: 700; font-size: 1rem; color: hsl(var(--h) 55% 28%); background: hsl(var(--h) 70% 88%); }
  .cbody { flex: 1; min-width: 0; }
  .conv .name { font-size: 1rem; } .conv .prev { font-size: .9rem; margin-top: 2px; }
  .ib-filters input { border-radius: 999px; background: var(--surface); border-color: var(--border); padding-left: 18px; }
  .ib-filters select { border-radius: 999px; }
}
.btnrow input { min-width: 0; }

/* Yeni toplu gönderim (tam sayfa) */
.bk { display: grid; grid-template-columns: minmax(0, 1fr) 290px; gap: 18px; align-items: start; }
.bk-aside { position: sticky; top: 16px; }
@media (max-width: 600px) { .bk { grid-template-columns: 1fr; } .bk-aside { position: static; } }
.bk-h { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 14px; }
.bk-h h2 { margin: 0; font-size: 1.05rem; } .bk-h p { margin: 2px 0 0; color: var(--muted); font-size: .85rem; }
.bk-n { width: 30px; height: 30px; border-radius: 50%; flex: none; display: grid; place-items: center; font-weight: 700; font-size: .85rem; background: var(--surface-2); color: var(--muted); border: 1px solid var(--border-strong); transition: background .2s, color .2s; }
.bk-n.ok { background: var(--brand); color: var(--brand-ink); border-color: var(--brand); }
.bk-tpls { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px; max-height: 360px; overflow: auto; padding: 3px; }
.bk-tpl { text-align: left; border: 1px solid var(--border-strong); background: var(--surface); border-radius: 12px; padding: 12px 14px; cursor: pointer; display: flex; flex-direction: column; gap: 6px; font: inherit; color: inherit; transition: border-color .15s, box-shadow .15s; }
.bk-tpl:hover:not([disabled]) { border-color: var(--brand-300); }
.bk-tpl.on { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
.bk-tpl[disabled] { opacity: .6; cursor: not-allowed; }
.bk-tpl b { font-size: .9rem; overflow-wrap: anywhere; }
.bk-tpl .s { font-size: .82rem; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; white-space: pre-wrap; }
.bk-src { display: flex; width: max-content; max-width: 100%; }
.bk-drop { display: flex; align-items: center; gap: 14px; border: 1.5px dashed var(--border-strong); border-radius: 12px; padding: 18px; background: var(--surface-2); cursor: pointer; color: var(--muted); transition: border-color .15s, background .15s; }
.bk-drop b { color: var(--text); } .bk-drop:hover, .bk-drop.over { border-color: var(--brand); background: var(--brand-soft); color: var(--brand-600); }
.bk-stat { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.bk-map { display: grid; grid-template-columns: auto minmax(140px, 200px) minmax(0, 1fr); gap: 8px; align-items: center; margin-bottom: 8px; }
@media (max-width: 600px) { .bk-map { grid-template-columns: 1fr; } }
.bk-var { background: var(--warn-soft); color: var(--warn); border-radius: 5px; padding: 1px 5px; font-size: .85em; font-weight: 600; white-space: nowrap; }
.bk-speeds { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.bk-speed { border: 1px solid var(--border-strong); border-radius: 12px; padding: 10px 12px; background: var(--surface); cursor: pointer; text-align: left; font: inherit; color: inherit; min-height: 54px; }
.bk-speed.on { border-color: var(--brand); background: var(--brand-soft); }
.bk-speed b { display: block; font-size: .9rem; } .bk-speed span { font-size: .76rem; color: var(--muted); }
@media (max-width: 520px) { .bk-speeds { grid-template-columns: 1fr; } }
.bk-phone { background: var(--chat-bg); border-radius: 14px; padding: 14px 12px; min-height: 150px; }
.bk-msg { background: var(--in-bubble); border-radius: 4px 12px 12px 12px; padding: 9px 11px 5px; box-shadow: var(--shadow-sm); font-size: .88rem; line-height: 1.45; white-space: pre-wrap; overflow-wrap: anywhere; }
.bk-msg .hd { font-weight: 700; margin-bottom: 4px; }
.bk-msg .media { height: 120px; border-radius: 8px; background: var(--surface-2); display: grid; place-items: center; color: var(--muted); font-size: .8rem; margin-bottom: 6px; }
.bk-msg .ft { color: var(--muted); font-size: .78rem; margin-top: 4px; }
.bk-msg .tm { text-align: right; font-size: .68rem; color: var(--muted); margin-top: 2px; }
.bk-btns { display: flex; flex-direction: column; gap: 4px; margin-top: 4px; }
.bk-btns div { background: var(--in-bubble); border-radius: 10px; text-align: center; padding: 8px; color: var(--info); font-size: .84rem; font-weight: 550; box-shadow: var(--shadow-sm); }
.bk-sum .sr { display: flex; justify-content: space-between; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--border); font-size: .86rem; }
.bk-sum .sr span { color: var(--muted); } .bk-sum .sr b { text-align: right; overflow-wrap: anywhere; font-weight: 600; }
.bk-chk { display: flex; flex-direction: column; gap: 7px; margin: 14px 0; }
.bk-chk div { display: flex; gap: 8px; align-items: center; font-size: .84rem; color: var(--muted); }
.bk-chk i { width: 16px; height: 16px; border-radius: 50%; border: 1.5px solid var(--border-strong); flex: none; display: grid; place-items: center; }
.bk-chk .ok { color: var(--text); }
.bk-chk .ok i { background: var(--brand); border-color: var(--brand); }
.bk-chk .ok i::after { content: ""; width: 6px; height: 3px; border-left: 2px solid #fff; border-bottom: 2px solid #fff; transform: translateY(-1px) rotate(-45deg); }
.bk-go { width: 100%; min-height: 46px; font-size: .95rem; }
.bk-go:disabled { opacity: .55; cursor: not-allowed; }

/* Üst çubuk, daralan menü, komut paleti */
.col { min-width: 0; display: flex; flex-direction: column; }
.col .main { padding-top: 22px; }
.dtop { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px clamp(18px, 3vw, 44px); position: sticky; top: 0; z-index: 6; background: color-mix(in srgb, var(--bg) 92%, transparent); backdrop-filter: blur(8px); border-bottom: 1px solid var(--border); min-height: 58px; }
.dt-left, .dt-right { display: flex; align-items: center; gap: 10px; min-width: 0; }
.dt-num { position: relative; }
.dt-chip { display: inline-flex; align-items: center; gap: 9px; background: var(--surface); border: 1px solid var(--border-strong); border-radius: 12px; padding: 7px 12px; cursor: pointer; font: inherit; color: var(--text); text-decoration: none; box-shadow: var(--shadow-sm); }
.dt-chip b { font-weight: 650; } .dt-chip small { color: var(--muted); font-size: .74rem; }
.dt-chip svg { width: 16px; height: 16px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.dt-chip.warn { color: var(--warn); background: var(--warn-soft); border-color: transparent; }
.dot { width: 9px; height: 9px; border-radius: 50%; flex: none; background: var(--muted); } .dot.ok { background: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); } .dot.bad { background: var(--danger); }
.dt-menu { position: absolute; top: calc(100% + 6px); left: 0; min-width: 270px; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; box-shadow: var(--shadow-lg); padding: 6px; z-index: 20; }
.dt-menu[hidden] { display: none; }
.dt-opt { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; border: 0; background: transparent; padding: 9px 10px; border-radius: 9px; cursor: pointer; font: inherit; color: var(--text); }
.dt-opt:hover, .dt-opt.on { background: var(--brand-soft); } .dt-opt small { display: block; color: var(--muted); font-size: .75rem; }
kbd { font: inherit; font-size: .7rem; border: 1px solid var(--border-strong); border-radius: 6px; padding: 1px 6px; color: var(--muted); background: var(--surface-2); }
.dt-new kbd { background: rgba(255,255,255,.18); color: #fff; border-color: rgba(255,255,255,.3); margin-left: 6px; }
@media (max-width: 900px) { .dtop { display: none; } .col .main { padding-top: 18px; } }
.side-toggle { margin-left: auto; width: 28px; height: 28px; border-radius: 8px; border: 1px solid var(--ink-line); background: transparent; color: var(--ink-text); cursor: pointer; display: grid; place-items: center; flex: none; }
.side-toggle:hover { background: rgba(255,255,255,.08); } .side-toggle svg { width: 16px; height: 16px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; transition: transform .2s; }
@media (max-width: 900px) { .side-toggle { display: none; } }
@media (min-width: 901px) {
  .shell { transition: grid-template-columns .2s; }
  .shell.mini { grid-template-columns: 74px 1fr; }
  .shell.mini .side { padding: 16px 9px; align-items: center; overflow: hidden; }
  .shell.mini .brand { flex-direction: column; gap: 10px; padding: 4px 0 14px; }
  .shell.mini .brand > div { display: none; } .shell.mini .side-toggle { margin: 0; } .shell.mini .side-toggle svg { transform: rotate(180deg); }
  .shell.mini .nav { width: 100%; } .shell.mini .nav .sec, .shell.mini .grp-h, .shell.mini .grp-empty { display: none; }
  .shell.mini .grp-b { display: block; border: 0; margin: 0; padding: 0; }
  .shell.mini .grp + .grp { border-top: 1px solid var(--ink-line); margin-top: 8px; padding-top: 8px; }
  .shell.mini .nav a { justify-content: center; padding: 11px 0; } .shell.mini .nav a span { display: none; } .shell.mini .nav a svg { width: 20px; height: 20px; }
  .shell.mini .side .foot { flex-direction: column; padding: 8px 4px; gap: 6px; width: 100%; } .shell.mini .side .foot .who { display: none; }
  .shell.mini .side .foot button { padding: 5px 4px; font-size: .7rem; }
}

/* Biçim çubuğu */
.fmtbar { display: flex; align-items: center; gap: 2px; position: relative; padding: 4px; border: 1px solid var(--border); border-bottom: 0; border-radius: 10px 10px 0 0; background: var(--surface-2); }
.fmtbar + textarea { border-top-left-radius: 0; border-top-right-radius: 0; }
.fmtbar button { width: 32px; height: 30px; border: 0; background: transparent; border-radius: 7px; color: var(--text); font: inherit; cursor: pointer; display: grid; place-items: center; }
.fmtbar button:hover { background: var(--border); } .fmtbar .sep { width: 1px; height: 18px; background: var(--border); margin: 0 4px; } .fmtbar .mono { font-family: ui-monospace, monospace; font-size: .74rem; }
.emopop { position: absolute; top: 100%; left: 0; z-index: 30; width: 268px; display: grid; grid-template-columns: repeat(8, 1fr); gap: 2px; padding: 8px; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; box-shadow: 0 10px 30px rgba(0,0,0,.18); }
.emopop[hidden] { display: none; } .emopop button { width: 100%; height: 30px; font-size: 1.1rem; }
/* iPhone önizleme */
.iphone { width: 260px; margin: 0 auto; padding: 9px; border-radius: 40px; background: #1c1c1e; box-shadow: 0 0 0 2px #3a3a3c inset, 0 14px 34px rgba(0,0,0,.28); }
.ipscr { position: relative; border-radius: 31px; overflow: hidden; background: #efeae2; min-height: 430px; display: flex; flex-direction: column; color: #111b21; }
.ipbar { height: 30px; background: #f6f6f6; display: grid; place-items: center; } .ipbar i { width: 86px; height: 20px; border-radius: 12px; background: #1c1c1e; display: block; }
.iphead { display: flex; align-items: center; gap: 7px; padding: 6px 10px 8px; background: #f6f6f6; border-bottom: 1px solid #d8d8d8; }
.ipav { width: 26px; height: 26px; border-radius: 50%; background: linear-gradient(135deg, #25d366, #128c7e); flex: none; }
.ipname { display: flex; flex-direction: column; line-height: 1.15; } .ipname b { font-size: .78rem; } .ipname small { font-size: .62rem; color: #667781; }
.ipchat { flex: 1; padding: 12px 10px; background: #efeae2 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='40' height='40'%3E%3Ccircle cx='4' cy='4' r='1.2' fill='%23d9d2c5'/%3E%3C/svg%3E"); }
.ipbub { position: relative; background: #fff; border-radius: 4px 12px 12px 12px; padding: 7px 9px 16px; max-width: 94%; font-size: .78rem; line-height: 1.38; word-break: break-word; box-shadow: 0 1px 1px rgba(0,0,0,.13); }
.ipbub code { font-family: ui-monospace, monospace; font-size: .74rem; } .iphd { font-weight: 700; margin-bottom: 3px; } .ipft { color: #667781; font-size: .68rem; margin-top: 4px; }
.ipmedia { background: #d8dee2; border-radius: 6px; height: 96px; display: grid; place-items: center; color: #667781; font-size: .72rem; margin-bottom: 5px; }
.iptime { position: absolute; right: 8px; bottom: 3px; font-size: .58rem; color: #8696a0; }
.ipvar { background: #dff3ff; color: #0a6aa8; border-radius: 4px; padding: 0 3px; }
.ipbtns { margin-top: 3px; max-width: 94%; display: flex; flex-direction: column; gap: 3px; } .ipbtns div { background: #fff; color: #0a84ff; text-align: center; font-size: .76rem; font-weight: 600; padding: 7px; border-radius: 10px; box-shadow: 0 1px 1px rgba(0,0,0,.13); }
.ipin { padding: 7px 10px 14px; background: #f6f6f6; } .ipin span { display: block; background: #fff; border: 1px solid #d8d8d8; border-radius: 16px; padding: 5px 11px; font-size: .72rem; color: #9aa; }

/* API sayfası */
.ap-key { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; } .ap-key code { flex: 1 1 220px; min-width: 0; padding: 9px 12px; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--border); font-size: .82rem; overflow-wrap: anywhere; }
.ap-sw { display: flex; align-items: center; gap: 8px; font-weight: 600; font-size: .9rem; } .ap-sw input { width: auto; }
.ap-code { margin: 12px 0; padding: 14px 16px; border-radius: 12px; background: #0f1b17; color: #d6f5e6; font: .8rem/1.55 ui-monospace, Consolas, monospace; overflow-x: auto; white-space: pre; }

/* Şablon listesi */
.tpl-tbl { table-layout: fixed; width: 100%; }
.tpl-tbl .c-name { width: 22%; } .tpl-tbl .c-lang { width: 52px; } .tpl-tbl .c-cat { width: 108px; } .tpl-tbl .c-st { width: 100px; } .tpl-tbl .c-act { width: 190px; white-space: nowrap; text-align: right; }
.tpl-tbl td:first-child { overflow-wrap: anywhere; } .tpl-tbl td { vertical-align: middle; }
.tpl-txt { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; white-space: pre-line; line-height: 1.45; }
@media (max-width: 900px) { .tpl-tbl { table-layout: auto; } .tpl-tbl .c-act { width: auto; } }

/* Instagram */
.ig-acc { margin-bottom: 14px; } .ig-av { width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; color: #fff; font-weight: 700; background: linear-gradient(135deg, #f58529, #dd2a7b 55%, #8134af); }
.ig-link { display: flex; gap: 18px; align-items: center; justify-content: space-between; flex-wrap: wrap; margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--border); } .ig-link > div:first-child { flex: 1 1 280px; min-width: 0; }
.ig-qr { padding: 6px; background: #fff; border-radius: 10px; border: 1px solid var(--border); line-height: 0; } .ig-qr img, .ig-qr canvas { display: block; }
.ig-ul { margin: 0; padding-left: 18px; display: grid; gap: 7px; font-size: .9rem; }
