/* LumSocial — tasarım sistemi
   Kurallar: tıklanabilen her şey kenarlıklı bir düğme (.btn / .select / .seg / .tab / .choice) ya da altı çizili bağlantıdır;
   bilgi amaçlı her şey (.tag / .kind / .ctype / .meta) düz, kenarlıksız ve tıklanmaz.
   Hiyerarşi: 1) gelen mesaj  2) önerilen cevap + ana işlem  3) gerekçe ve ayrıntılar (katlanır). */
:root {
  --bg: #f5f4f7;
  --panel: #ffffff;
  --panel-2: #f8f7fa;
  --sunken: #f1eff4;
  --ink: #16141b;
  --ink-2: #4a4655;
  --muted: #6b6676;
  --line: #e8e5ee;
  --line-2: #cfcad9;
  --accent: #d6246e;
  --accent-ink: #ffffff;
  --accent-soft: #fdebf2;
  --accent-text: #b51c5c;
  --ok: #126b31;
  --ok-soft: #e6f5eb;
  --warn: #a14a06;
  --warn-soft: #fdf2e1;
  --bad: #c62828;
  --bad-soft: #fdeceb;
  --info: #3b5bdb;
  --info-soft: #ebf0ff;
  --focus: 0 0 0 3px color-mix(in srgb, var(--accent) 28%, transparent);
  --shadow: 0 1px 2px rgba(24, 16, 40, .04), 0 6px 20px rgba(24, 16, 40, .05);
  --btn-shadow: 0 1px 0 rgba(24, 16, 40, .06);
  --radius: 14px;
  --brand: linear-gradient(135deg, #f58529 0%, #dd2a7b 50%, #8134af 100%);
  --k-comment: #1d4ed8;
  --k-comment-bg: #e3ecff;
  --k-dm: #7e22ce;
  --k-dm-bg: #f3e8ff;
  --highlight: #fff7d6;
  --chev: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='M3 4.5l3 3 3-3' fill='none' stroke='%23767181' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  --tabbar-h: 0px;
  --side-w: 248px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #111015;
    --panel: #19171f;
    --panel-2: #1e1c25;
    --sunken: #15131a;
    --ink: #f1eff5;
    --ink-2: #c5c0cf;
    --muted: #9a94a8;
    --line: #2a2732;
    --line-2: #46414f;
    --accent: #ff4f93;
    --accent-ink: #1a0b12;
    --accent-soft: #3a1828;
    --accent-text: #ff6aa3;
    --ok: #4ade80;
    --ok-soft: #13291b;
    --warn: #f5a524;
    --warn-soft: #2e2210;
    --bad: #f87171;
    --bad-soft: #321616;
    --info: #8aa4ff;
    --info-soft: #1a2140;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3);
    --btn-shadow: none;
    --k-comment: #93b4ff;
    --k-comment-bg: #1a2648;
    --k-dm: #d8b4fe;
    --k-dm-bg: #2e1a45;
    --highlight: #2c2716;
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; min-height: 100%; }
html { -webkit-text-size-adjust: 100%; }
body {
  background: var(--bg);
  color: var(--ink);
  font: 15px/1.55 -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Inter, Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--accent-text); }
:focus-visible { outline: none; box-shadow: var(--focus); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.app { display: grid; grid-template-columns: 248px minmax(0, 1fr); min-height: 100vh; }

/* ---------- Kenar çubuğu (masaüstü) / alt sekme çubuğu (telefon) ---------- */
.side {
  position: sticky; top: 0; height: 100vh;
  display: flex; flex-direction: column; gap: 18px;
  padding: 18px 12px; border-right: 1px solid var(--line); background: var(--panel);
}
.brand { display: flex; align-items: center; gap: 10px; padding: 2px 8px; }
.brand .logo { width: 32px; height: 32px; border-radius: 10px; background: var(--brand); position: relative; flex: none; }
.brand .logo::after {
  content: ""; position: absolute; inset: 9px 8px 10px; background: #fff; border-radius: 6px 6px 6px 2px;
  clip-path: polygon(0 0, 100% 0, 100% 78%, 42% 78%, 18% 100%, 22% 78%, 0 78%);
}
.brand strong { display: block; font-size: 16px; letter-spacing: -.01em; }
.brand strong em { font-style: normal; background: var(--brand); -webkit-background-clip: text; background-clip: text; color: transparent; }
.brand small { color: var(--muted); font-size: 12px; }
.nav { display: flex; flex-direction: column; gap: 2px; }
.nav button {
  display: flex; align-items: center; gap: 10px; width: 100%; position: relative;
  padding: 9px 10px; border: 0; border-radius: 10px; background: none; cursor: pointer;
  color: var(--ink-2); text-align: left; font-weight: 500;
}
.nav .ico { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.nav .l-short { display: none; }
.nav button b { margin-left: auto; font-size: 11px; background: var(--accent); color: var(--accent-ink); border-radius: 99px; padding: 0 7px; line-height: 18px; font-variant-numeric: tabular-nums; }
.nav button b:empty { display: none; }
.nav button:hover { background: var(--panel-2); color: var(--ink); }
.nav button.active { background: var(--accent-soft); color: var(--accent-text); font-weight: 600; }
.side-foot { margin-top: auto; font-size: 12px; color: var(--muted); display: grid; gap: 6px; padding: 0 8px; }
.side-foot .meta-row { display: flex; justify-content: space-between; gap: 8px; }
.side-foot b { color: var(--ink-2); font-weight: 600; }

/* ---------- Üst bar ---------- */
.main { min-width: 0; }
.top {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; gap: 12px;
  padding: 10px 28px; min-height: 58px; background: color-mix(in srgb, var(--bg) 92%, transparent);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-bottom: 1px solid var(--line);
}
.top h1 { font-size: 18px; margin: 0; letter-spacing: -.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.top .sp { flex: 1; }
.status-dot { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--ink-2); white-space: nowrap; }
.status-dot i { width: 8px; height: 8px; border-radius: 50%; background: var(--muted); flex: none; }
.status-dot.ok i { background: var(--ok); }
.status-dot.warn i { background: var(--warn); }
.status-dot.bad i { background: var(--bad); }
.status-dot.info i { background: var(--info); }
.profile-chip { display: flex; align-items: center; gap: 10px; padding: 4px 10px 4px 4px; border-radius: 99px; background: var(--panel); border: 1px solid var(--line-2); cursor: pointer; font: inherit; color: inherit; box-shadow: var(--btn-shadow); }
.profile-chip:hover { border-color: var(--muted); }
.profile-chip b { font-size: 13px; display: block; line-height: 1.2; }
.profile-chip small { color: var(--muted); font-size: 12px; }
.profile-chip .pc-txt { text-align: left; }
.profile-chip .chev { color: var(--muted); font-size: 11px; }
.av.sm32 { width: 32px; height: 32px; }
.view { padding: 22px 28px 80px; max-width: 1200px; }
.view.wide { max-width: none; }
.admin-bar { display: flex; gap: 10px; align-items: center; padding: 8px 28px; background: var(--warn-soft); color: var(--warn); font-size: 13px; font-weight: 600; flex-wrap: wrap; }
.admin-bar a { color: inherit; }

/* Menüler (hesap menüsü, "Yeniden yaz" menüsü) */
.user-menu, .menu-wrap { position: relative; }
.menu { position: absolute; top: calc(100% + 6px); min-width: 200px; background: var(--panel); border: 1px solid var(--line-2); border-radius: 12px; box-shadow: 0 10px 30px rgba(0,0,0,.18); padding: 6px; display: grid; z-index: 30; }
.user-menu .menu { right: 0; min-width: 240px; }
.menu-wrap .menu { left: 0; }
.menu a, .menu button { display: block; text-align: left; padding: 9px 10px; border-radius: 8px; border: 0; background: none; color: var(--ink); font: inherit; font-size: 14px; cursor: pointer; text-decoration: none; }
.menu a:hover, .menu button:hover, .menu a:focus-visible, .menu button:focus-visible { background: var(--sunken); }
.menu .danger { color: var(--bad); }
.menu-head { display: grid; gap: 1px; padding: 8px 10px 10px; border-bottom: 1px solid var(--line); margin-bottom: 4px; }
.menu-head small { color: var(--muted); font-size: 12px; }

/* ---------- Avatar ---------- */
.av { width: 36px; height: 36px; border-radius: 50%; flex: none; display: grid; place-items: center; color: #fff; background: #a3879b; font-weight: 700; font-size: 14px; text-transform: uppercase; overflow: hidden; }
.av img { width: 100%; height: 100%; object-fit: cover; display: block; }
.av svg { width: 100%; height: 100%; display: block; }
.av.sm { width: 28px; height: 28px; font-size: 12px; }
.av.md { width: 44px; height: 44px; font-size: 16px; }
.av.lg { width: 56px; height: 56px; font-size: 22px; }
.av.xl { width: 96px; height: 96px; font-size: 34px; }
.av.ring { padding: 2px; background: var(--brand); }
.av.ring > * { width: 100%; height: 100%; border-radius: 50%; border: 2px solid var(--panel); display: grid; place-items: center; background: #b78f73; overflow: hidden; }

/* ---------- Bilgi öğeleri (tıklanmaz: düz, kenarlıksız) ---------- */
.tag { display: inline-flex; align-items: center; gap: 6px; padding: 1px 8px; border-radius: 5px; font-size: 12.5px; font-weight: 600; background: var(--sunken); color: var(--ink-2); white-space: nowrap; cursor: default; user-select: none; max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
.tag i { width: 8px; height: 8px; border-radius: 2px; flex: none; }
.tag.ok { background: var(--ok-soft); color: var(--ok); }
.tag.warn { background: var(--warn-soft); color: var(--warn); }
.tag.bad { background: var(--bad-soft); color: var(--bad); }
.tag.info { background: var(--info-soft); color: var(--info); }
.tag.xs { font-size: 11px; padding: 0 6px; }
.meta { font-size: 13px; color: var(--muted); }
.meta b { color: var(--ink-2); font-weight: 600; }
.label { font-size: 11px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); }
.muted { color: var(--muted); }
.small { font-size: 13px; }

/* ---------- Kontroller (tıklanır: hepsi kenarlıklı) ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-height: 38px; padding: 0 14px; border-radius: 10px; border: 1px solid var(--line-2); background: var(--panel);
  cursor: pointer; font-weight: 600; font-size: 13.5px; color: var(--ink); white-space: nowrap; box-shadow: var(--btn-shadow);
  transition: background .12s, border-color .12s, transform .05s; text-decoration: none; line-height: 1.2;
}
.btn:hover { background: var(--panel-2); border-color: var(--muted); }
.btn:active { transform: translateY(1px); }
.btn:disabled, .btn[aria-disabled="true"] { opacity: .5; cursor: not-allowed; pointer-events: none; }
.btn.primary { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.btn.primary:hover { filter: brightness(1.06); }
.btn.danger { color: var(--bad); border-color: color-mix(in srgb, var(--bad) 45%, var(--line-2)); }
.btn.danger-solid { background: var(--bad); color: #fff; border-color: var(--bad); }
.btn.quiet { background: transparent; color: var(--ink-2); box-shadow: none; }
.btn.quiet:hover { background: var(--sunken); color: var(--ink); }
.btn.sm { min-height: 32px; padding: 0 10px; font-size: 12.5px; border-radius: 8px; }
.btn.lg { min-height: 48px; padding: 0 20px; font-size: 15px; border-radius: 12px; }
.btn.ig { background: var(--brand); color: #fff; border: 0; }
.btn.ig:hover { filter: brightness(1.06); }
.btn.start, .start { justify-self: start; }
.btn kbd { font: 11px ui-monospace, monospace; opacity: .75; padding: 1px 5px; border-radius: 4px; background: rgba(255,255,255,.18); }
.link-btn { border: 0; background: none; padding: 0; color: var(--accent-text); font-weight: 600; cursor: pointer; font-size: inherit; text-decoration: underline; text-underline-offset: 2px; }
.link-btn:hover { text-decoration-thickness: 2px; }

input[type=text], input[type=search], input[type=email], input[type=number], input[type=password], input[type=time], textarea, .select {
  width: 100%; padding: 8px 11px; border-radius: 10px; border: 1px solid var(--line-2);
  background: var(--panel); outline: none; transition: border-color .12s, box-shadow .12s; min-height: 38px;
}
input[type=search]::-webkit-search-cancel-button { cursor: pointer; }
textarea { resize: vertical; min-height: 64px; line-height: 1.5; }
input:hover, textarea:hover, .select:hover { border-color: var(--muted); }
input:focus, select:focus, textarea:focus { border-color: var(--accent); box-shadow: var(--focus); }
input[type=color] { width: 44px; height: 38px; padding: 2px; border: 1px solid var(--line-2); border-radius: 10px; background: var(--panel); cursor: pointer; }
.color-f { display: flex; align-items: center; gap: 10px; }
.select {
  -webkit-appearance: none; appearance: none; height: 38px; padding: 0 34px 0 12px; cursor: pointer; font-weight: 500;
  background: var(--panel) var(--chev) no-repeat right 12px center; box-shadow: var(--btn-shadow);
}
.select.sm { height: 32px; min-height: 32px; font-size: 12.5px; padding: 0 28px 0 10px; border-radius: 8px; background-position: right 9px center; }
.select.auto { width: auto; max-width: 100%; }
label.f { display: grid; gap: 6px; font-size: 12.5px; font-weight: 600; color: var(--ink-2); min-width: 0; }
label.f > small, .help { font-weight: 400; color: var(--muted); font-size: 12.5px; }
label.chk { display: flex; align-items: center; gap: 8px; font-size: 13.5px; color: var(--ink-2); cursor: pointer; }
label.chk input { width: 18px; height: 18px; accent-color: var(--accent); flex: none; }
label.mini { display: grid; gap: 2px; font-size: 11px; font-weight: 600; color: var(--muted); }
label.mini input { width: 96px; }
label.mini input[type=time] { width: 124px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; min-width: 0; }
.row.end { justify-content: flex-end; }
.row.center { justify-content: center; }
.grow { flex: 1; }
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.section-title { display: flex; align-items: baseline; gap: 10px; margin: 26px 0 10px; flex-wrap: wrap; }
.section-title.first { margin-top: 0; }
.section-title h2 { font-size: 15px; margin: 0; }
.section-title p { margin: 0; color: var(--muted); font-size: 13px; }
.seg { display: inline-flex; padding: 3px; border-radius: 10px; background: var(--sunken); border: 1px solid var(--line-2); max-width: 100%; }
.seg button { border: 0; background: none; min-height: 30px; padding: 0 12px; border-radius: 7px; cursor: pointer; font-weight: 600; color: var(--ink-2); font-size: 13px; white-space: nowrap; }
.seg button:hover { color: var(--ink); }
.seg button.active { background: var(--panel); color: var(--ink); box-shadow: 0 1px 2px rgba(0,0,0,.12), 0 0 0 1px var(--line-2); }
.seg button:disabled { opacity: .45; cursor: not-allowed; }
.switch { position: relative; width: 42px; height: 24px; flex: none; display: inline-block; }
.switch input { position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; z-index: 1; }
.switch i { position: absolute; inset: 0; border-radius: 99px; background: var(--line-2); transition: background .15s; }
.switch i::after { content: ""; position: absolute; left: 3px; top: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; transition: transform .15s; box-shadow: 0 1px 2px rgba(0,0,0,.25); }
.switch input:checked + i { background: var(--accent); }
.switch input:checked + i::after { transform: translateX(18px); }
.switch input:focus-visible + i { box-shadow: var(--focus); }
.switch input:disabled + i { opacity: .5; }
.empty { text-align: center; padding: 48px 20px; color: var(--muted); display: grid; gap: 6px; justify-items: center; }
.empty b { display: block; font-size: 32px; }
.empty strong { display: block; color: var(--ink); font-size: 16px; }
.empty p { margin: 0; }
.empty.small { padding: 28px 16px; }
.empty .row { margin-top: 8px; }
.alert { padding: 12px 14px; border-radius: 12px; background: var(--bad-soft); color: var(--bad); font-weight: 600; font-size: 14px; }
.alert.info { background: var(--info-soft); color: var(--info); }
.alert.ok { background: var(--ok-soft); color: var(--ok); }
.alert.warn { background: var(--warn-soft); color: var(--warn); }
.alert.auto-note { font-weight: 500; }
.alert.auto-note b { font-weight: 700; }
.note { padding: 10px 12px; border-radius: 10px; font-size: 13.5px; line-height: 1.45; border: 1px solid transparent; }
.note.info { background: var(--info-soft); color: var(--ink); border-color: color-mix(in srgb, var(--info) 30%, transparent); }
.note.warn { background: var(--warn-soft); color: var(--ink); border-color: color-mix(in srgb, var(--warn) 35%, transparent); }
.note.bad { background: var(--bad-soft); color: var(--ink); border-color: color-mix(in srgb, var(--bad) 35%, transparent); }
.note b { color: inherit; }
.spinner { width: 14px; height: 14px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: spin .7s linear infinite; display: inline-block; vertical-align: -2px; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Gelen kutusu: üst kısım ---------- */
.banner { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 12px 16px; border-radius: 12px; margin-bottom: 14px; font-size: 14px; }
.banner span { flex: 1; min-width: 200px; }
.banner.bad { background: var(--bad-soft); color: var(--bad); border: 1px solid color-mix(in srgb, var(--bad) 35%, transparent); }
.banner.warn { background: var(--warn-soft); color: var(--warn); border: 1px solid color-mix(in srgb, var(--warn) 35%, transparent); }
.intro { padding: 10px 14px; margin: 0 0 12px; border: 1px solid color-mix(in srgb, var(--info) 30%, var(--line)); border-radius: 12px; background: var(--info-soft); font-size: 13px; }
.c-list > .intro { margin: 10px; }
.intro-head { display: flex; align-items: center; gap: 10px; justify-content: space-between; }
.intro ul { margin: 6px 0 0; padding-left: 18px; display: grid; gap: 3px; color: var(--ink-2); line-height: 1.4; }
.list-hint { font-size: 12px; color: var(--muted); padding: 6px 14px; border-bottom: 1px solid var(--line); background: var(--panel-2); }
.inbox-head { margin-bottom: 12px; display: flex; align-items: flex-end; gap: 12px; border-bottom: 1px solid var(--line); }
.inbox-head .seg { margin-bottom: 6px; flex: none; }
.tabs { display: flex; flex-wrap: wrap; gap: 2px 4px; flex: 1; min-width: 0; }
.tab { position: relative; border: 0; background: none; padding: 10px 12px; cursor: pointer; font-weight: 600; color: var(--muted); white-space: nowrap; font-size: 14px; border-radius: 8px 8px 0 0; }
.tab b { font-weight: 600; font-size: 12px; margin-left: 5px; color: var(--muted); font-variant-numeric: tabular-nums; background: var(--sunken); border-radius: 99px; padding: 0 6px; }
.tab:hover { color: var(--ink); background: var(--panel-2); }
.tab.active { color: var(--ink); }
.tab.active b { background: var(--accent-soft); color: var(--accent-text); }
.tab.active::after { content: ""; position: absolute; left: 8px; right: 8px; bottom: -1px; height: 3px; border-radius: 3px; background: var(--accent); }
.tab.t-bad b { background: var(--bad-soft); color: var(--bad); }
.tabs-select { display: none; }
.toolbar { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 16px; }
.toolbar .select { width: 180px; }
.toolbar input[type=search] { width: 200px; }
.progress { display: flex; align-items: center; gap: 12px; padding: 10px 14px; margin-bottom: 14px; border-radius: 12px; background: var(--info-soft); color: var(--info); font-size: 13px; font-weight: 600; }
.progress .bar { flex: 1; height: 6px; border-radius: 99px; background: color-mix(in srgb, var(--info) 18%, transparent); overflow: hidden; }
.progress .bar i { display: block; height: 100%; background: var(--info); border-radius: 99px; transition: width .4s; }
.group-title { display: flex; align-items: center; gap: 8px; margin: 18px 2px 8px; font-size: 12px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
.group-title.bad { color: var(--bad); }
.more { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 16px; }

/* Kanal ve gönderi türü: sol renk şeridi (mavi yorum, mor mesaj) + rozetler */
.kind { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 700; padding: 1px 8px; border-radius: 5px; white-space: nowrap; cursor: default; }
.kind.k-comment { background: var(--k-comment-bg); color: var(--k-comment); }
.kind.k-dm { background: var(--k-dm-bg); color: var(--k-dm); }
.ctype { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 700; white-space: nowrap; cursor: default; color: var(--ink-2); }
.ctype.ct-reel { color: #be185d; }
.ctype.ct-post { color: #0f766e; }
.ctype.ct-carousel { color: #a16207; }
.ctype.ct-story { color: #c2410c; }
@media (prefers-color-scheme: dark) {
  .ctype.ct-reel { color: #f9a8d4; }
  .ctype.ct-post { color: #5eead4; }
  .ctype.ct-carousel { color: #fcd34d; }
  .ctype.ct-story { color: #fdba74; }
}
.badges { display: flex; gap: 6px 8px; flex-wrap: wrap; align-items: center; min-width: 0; }

/* ---------- Mesaj (kart ve konuşma ortak) ---------- */
.msg { min-width: 0; }
.msg.leaving { animation: out .22s ease-in forwards; }
@keyframes in { from { transform: translateY(6px); opacity: .6; } }
@keyframes out { to { opacity: 0; transform: translateX(24px); } }
.msg.busy { opacity: .55; pointer-events: none; }
.prio-note { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border-radius: 10px; background: var(--bad-soft); color: var(--bad); font-size: 13.5px; }
.prio-note b { display: block; }

/* Sohbet görünümü (masaüstü): sayfa kaymaz, liste ve konuşma ayrı kayar */
@media (min-width: 1200px) {
  body.fill .main { height: 100vh; display: flex; flex-direction: column; }
  body.fill .view { flex: 1; min-height: 0; display: flex; flex-direction: column; padding-bottom: 20px; }
  body.fill #list { flex: 1; min-height: 0; }
  body.fill .chat { height: 100%; min-height: 460px; }
}
.chat { display: grid; grid-template-columns: minmax(300px, 380px) minmax(0, 1fr); gap: 16px; min-height: 0; }
.c-list { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); overflow-y: auto; min-height: 0; }
.c-row { display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; gap: 12px; width: 100%; text-align: left; border: 0; border-bottom: 1px solid var(--line); border-left: 4px solid transparent; background: none; padding: 13px 14px 13px 12px; cursor: pointer; color: inherit; font: inherit; }
.c-row.ch-comment { border-left-color: var(--k-comment); }
.c-row.ch-dm { border-left-color: var(--k-dm); }
.c-row:last-of-type { border-bottom: 0; }
.c-row:hover { background: var(--panel-2); }
.c-row.sel { background: var(--accent-soft); box-shadow: inset 0 0 0 2px var(--accent); }
.c-row.prio { background: color-mix(in srgb, var(--bad-soft) 60%, transparent); }
.c-row.sel.prio { background: var(--accent-soft); }
.c-row:focus-visible { box-shadow: inset 0 0 0 3px color-mix(in srgb, var(--accent) 45%, transparent); }
.c-main { min-width: 0; display: grid; gap: 4px; }
.c-top { display: flex; align-items: center; gap: 8px; min-width: 0; }
.c-top b { font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.c-prev { font-size: 14px; color: var(--ink-2); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; }
.c-side { display: grid; justify-items: end; align-content: start; gap: 6px; font-size: 12.5px; color: var(--muted); white-space: nowrap; }
.c-side .dot { width: 9px; height: 9px; border-radius: 50%; }
.c-side .need { font-size: 11.5px; font-weight: 700; color: var(--warn); background: var(--warn-soft); padding: 0 7px; border-radius: 5px; }
.c-side .need.bad { color: var(--bad); background: var(--bad-soft); }
.c-why { font-size: 12.5px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.st-mini { font-size: 11.5px; font-weight: 700; color: var(--ink-2); }
.st-mini.st-sent { color: var(--ok); }
.st-mini.st-failed { color: var(--bad); }

.pane { background: var(--panel); border: 1px solid var(--line); border-left: 4px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); display: flex; flex-direction: column; min-height: 0; overflow: hidden; }
.pane > .pane-head { flex: none; }
.pane > .pane-body { flex: 1 1 0; min-height: 140px; }
.pane > .pane-foot { flex: 0 1 auto; }
.pane.ch-comment, .card2.ch-comment { border-left-color: var(--k-comment); }
.pane.ch-dm, .card2.ch-dm { border-left-color: var(--k-dm); }
.pane.priority, .card2.priority { border-top-color: color-mix(in srgb, var(--bad) 55%, var(--line)); border-right-color: color-mix(in srgb, var(--bad) 55%, var(--line)); border-bottom-color: color-mix(in srgb, var(--bad) 55%, var(--line)); }
.pane-head { display: flex; gap: 14px; align-items: flex-start; padding: 14px 20px; border-bottom: 1px solid var(--line); min-width: 0; }
.pane-head .back { display: none; }
.pane-head .who { min-width: 0; flex: 1; display: grid; gap: 6px; }
.pane-head .name { font-size: 18px; font-weight: 700; letter-spacing: -.01em; overflow-wrap: anywhere; }
.head-links { display: flex; gap: 6px; flex-wrap: wrap; }
.pane-body { overflow-y: auto; padding: 18px 20px; display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; align-content: start; background: var(--panel-2); min-height: 0; }
.pane-foot { border-top: 1px solid var(--line); padding: 14px 20px 16px; display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; background: var(--panel); overflow-y: auto; max-height: 62%; }

/* Gönderi / story kartı (zincirin başı) */
.post-card { display: grid; grid-template-columns: 72px minmax(0, 1fr); gap: 14px; padding: 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--panel); }
.post-card .cover { position: relative; width: 72px; height: 90px; border-radius: 10px; display: grid; place-items: center; font-size: 26px; overflow: hidden; }
.post-card .cover .cover-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.post-card .cover .ov { position: absolute; z-index: 1; left: 4px; bottom: 4px; font-size: 10.5px; font-weight: 700; color: #fff; background: rgba(0,0,0,.5); padding: 1px 6px; border-radius: 99px; }
.post-card .pc-txt { min-width: 0; }
.post-card .pc-head { display: flex; align-items: center; gap: 8px; font-size: 14px; flex-wrap: wrap; }
.post-card .cap { margin: 6px 0 0; font-size: 14.5px; color: var(--ink-2); white-space: pre-line; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; }
.post-card .cap.full { display: block; }
.cap-more { font-size: 13px; margin-top: 2px; }

/* Yorum zinciri (Instagram'daki gibi iç içe) */
.cthread { display: grid; gap: 14px; }
.c-item { display: grid; grid-template-columns: 36px minmax(0, 1fr); gap: 10px; align-items: start; }
.c-item.reply { margin-left: 46px; }
.c-item .c-line { font-size: 16px; line-height: 1.5; overflow-wrap: anywhere; }
.c-item .c-line b { margin-right: 6px; }
.c-item.new .c-line { background: var(--highlight); border-radius: 10px; padding: 8px 10px; margin: -4px -4px 0; }
.new-tag { font-size: 11.5px; font-weight: 700; color: var(--warn); margin-left: 6px; }
.deleted { color: var(--muted); }

/* DM sohbeti */
.story-ref { display: flex; gap: 12px; align-items: center; justify-self: start; padding: 10px 14px 10px 10px; border-radius: 14px; background: var(--panel); border: 1px solid var(--line); max-width: 100%; }
.story-ref .st { width: 46px; height: 76px; border-radius: 10px; display: grid; place-items: center; font-size: 20px; flex: none; }
.story-ref .st.mention { background: linear-gradient(160deg, #f58529, #dd2a7b); color: #fff; font-weight: 800; }
.story-ref p { margin: 2px 0 6px; font-size: 14px; color: var(--ink-2); max-width: 420px; }
.dm { display: grid; gap: 10px; }
.dm-row { display: flex; gap: 8px; align-items: flex-end; min-width: 0; }
.dm-row.me { justify-content: flex-end; }
.dm-bubble { max-width: min(72%, 560px); padding: 10px 14px; border-radius: 18px; font-size: 16px; line-height: 1.45; white-space: pre-wrap; overflow-wrap: anywhere; background: var(--panel); border: 1px solid var(--line); border-bottom-left-radius: 6px; }
.dm-row.me .dm-bubble { background: var(--brand); color: #fff; border: 0; border-radius: 18px; border-bottom-right-radius: 6px; }
.dm-row.new .dm-bubble { box-shadow: 0 0 0 2px color-mix(in srgb, var(--warn) 55%, transparent); }
.dm-row.gone .dm-bubble { background: transparent; border-style: dashed; }
.dm-bubble small { display: block; font-size: 11.5px; opacity: .7; margin-top: 3px; }
.day-sep { justify-self: center; font-size: 12px; color: var(--muted); }

/* Cevap alanı */
.composer { display: grid; gap: 10px; }
.composer .reply-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.composer textarea { font-size: 16px; min-height: 76px; line-height: 1.5; resize: none; overflow-y: auto; }
.composer.edited textarea { border-color: var(--info); }
.composer .count { font-size: 12.5px; color: var(--muted); font-variant-numeric: tabular-nums; margin-left: auto; }
.composer .count.over { color: var(--bad); font-weight: 700; }
.reply-tools { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.alts { display: grid; gap: 6px; }
.alt { display: block; width: 100%; text-align: left; border: 1px solid var(--line-2); background: var(--panel); border-radius: 10px; padding: 8px 10px; cursor: pointer; font-size: 14px; color: var(--ink-2); }
.alt::before { content: "↺  "; color: var(--muted); }
.alt:hover { border-color: var(--accent); color: var(--ink); background: var(--accent-soft); }
.alt.static { cursor: default; }
.alt.static::before { content: ""; }
.alt.static:hover { border-color: var(--line-2); background: var(--panel); color: var(--ink-2); }
.note-input { display: none; gap: 8px; }
.note-input.open { display: flex; }
.info-need { display: grid; gap: 12px; padding: 14px 16px; border-radius: 12px; background: var(--warn-soft); border: 1px solid color-mix(in srgb, var(--warn) 35%, transparent); }
.info-need .q { font-size: 17px; font-weight: 700; color: var(--ink); overflow-wrap: anywhere; }
.info-need .why-q { font-size: 13px; color: var(--ink-2); }
.info-need .row input[type=text] { flex: 1; min-width: 200px; font-size: 15px; }
.info-need .or { display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--muted); }
.info-need .or::before, .info-need .or::after { content: ""; flex: 1; height: 1px; background: color-mix(in srgb, var(--warn) 30%, transparent); }
.decision { display: flex; gap: 10px; align-items: flex-start; padding: 12px; border-radius: 12px; background: var(--panel-2); border: 1px solid var(--line); font-size: 14px; }
.decision .ico { font-size: 18px; line-height: 1.2; }
.decision b { display: block; }
.decision .help { margin-top: 2px; color: var(--ink-2); font-size: 13.5px; }
.decision .help.sub { color: var(--muted); font-size: 12.5px; }
.actions { display: flex; gap: 8px 10px; flex-wrap: wrap; align-items: flex-start; }
.actions .sp { flex: 1; }
.act-main { display: grid; gap: 3px; justify-items: start; }
.act-main small { font-size: 12px; color: var(--muted); max-width: 240px; line-height: 1.3; }
.act-main small.warn-txt { font-weight: 600; }
.err-detail { margin-top: 6px; }
.final { font-size: 15px; padding: 10px 14px; border-radius: 14px 14px 4px 14px; background: var(--brand); color: #fff; justify-self: start; max-width: 85%; white-space: pre-wrap; overflow-wrap: anywhere; }
.status-line { display: flex; gap: 8px 10px; align-items: center; flex-wrap: wrap; font-size: 13px; }
.pending-out { justify-self: end; max-width: 80%; padding: 10px 14px; border-radius: 18px; border-bottom-right-radius: 6px; background: var(--brand); color: #fff; font-size: 16px; opacity: .85; white-space: pre-wrap; overflow-wrap: anywhere; }
.draft-prev { margin: 0; overflow-wrap: anywhere; }

details.why { border-top: 1px solid var(--line); padding-top: 10px; }
details.why > summary { list-style: none; cursor: pointer; display: inline-flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--ink-2); font-weight: 600; padding: 6px 10px; border: 1px solid var(--line-2); border-radius: 8px; background: var(--panel); }
details.why > summary::-webkit-details-marker { display: none; }
details.why > summary::before { content: "▸"; transition: transform .15s; }
details.why[open] > summary::before { transform: rotate(90deg); }
details.why > summary:hover { color: var(--ink); border-color: var(--muted); }
.why-body { display: grid; gap: 10px; margin-top: 10px; font-size: 13.5px; color: var(--ink-2); }
.why-body .row { gap: 6px; }
.why-body ul { margin: 0; padding-left: 18px; }
.kv { display: grid; grid-template-columns: 140px minmax(0, 1fr); gap: 8px 12px; align-items: center; }
.kv > span:nth-child(odd) { color: var(--muted); font-size: 12.5px; }
.kv .tag { white-space: normal; overflow-wrap: anywhere; }

/* Kartlar görünümü: geniş ekranda zincir solda, cevap sağda */
.cards2 { display: grid; gap: 16px; }
.card2 { background: var(--panel); border: 1px solid var(--line); border-left: 4px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; animation: in .18s ease-out; }
.card2 .pane-head { padding: 14px 20px; }
.card2-body { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.card2-body > .pane-body { border-right: 1px solid var(--line); max-height: 560px; }
.card2-body > .pane-foot { border-top: 0; align-content: start; max-height: none; }
@media (max-width: 1100px) {
  .card2-body { grid-template-columns: 1fr; }
  .card2-body > .pane-body { border-right: 0; border-bottom: 1px solid var(--line); }
}

/* Toplu onay */
.bulk-tools { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.bulk-list { display: grid; gap: 6px; max-height: 52vh; overflow-y: auto; padding-right: 2px; }
.bulk-row { display: grid; grid-template-columns: 22px minmax(0, 1fr); gap: 10px; align-items: start; padding: 10px 12px; border: 1px solid var(--line-2); border-left: 4px solid var(--line-2); border-radius: 10px; cursor: pointer; background: var(--panel); }
.bulk-row.ch-comment { border-left-color: var(--k-comment); }
.bulk-row.ch-dm { border-left-color: var(--k-dm); }
.bulk-row input { width: 18px; height: 18px; margin: 2px 0 0; accent-color: var(--accent); }
.bulk-row:has(input:not(:checked)) { opacity: .55; }
.b-txt { display: grid; gap: 4px; min-width: 0; }
.b-in { font-size: 13.5px; color: var(--ink-2); overflow-wrap: anywhere; }
.b-out { font-size: 14.5px; font-weight: 600; overflow-wrap: anywhere; }
.b-out::before { content: "↳ "; color: var(--muted); font-weight: 400; }

/* ---------- Kurallar ---------- */
.legend { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 10px; }
.legend > div { padding: 10px 12px; border-radius: 10px; background: var(--panel-2); border: 1px solid var(--line); font-size: 13px; }
.legend b { display: block; margin-bottom: 2px; }
.matrix-wrap { overflow: hidden; }
.matrix { width: 100%; border-collapse: collapse; }
.matrix th { text-align: left; font-size: 11px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); font-weight: 700; padding: 10px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.matrix td { padding: 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
.matrix tr:last-child td { border-bottom: 0; }
.matrix .nm { display: flex; gap: 10px; align-items: center; font-weight: 700; }
.matrix .nm i { width: 10px; height: 10px; border-radius: 3px; flex: none; }
.matrix .desc { font-size: 12.5px; color: var(--muted); margin-top: 2px; font-weight: 400; }
.matrix .ex { max-width: 260px; overflow-wrap: anywhere; }
.matrix .c-act { text-align: right; }
.act-tag.reply, .act-tag.auto_reply { background: var(--ok-soft); color: var(--ok); }
.act-tag.hide, .act-tag.auto_hide { background: var(--bad-soft); color: var(--bad); }
.act-tag.ignore { background: var(--sunken); color: var(--ink-2); }
.slider { display: flex; gap: 10px; align-items: center; }
.slider input { flex: 1; accent-color: var(--accent); min-height: 28px; }
.slider output { min-width: 44px; text-align: right; font-weight: 700; font-variant-numeric: tabular-nums; }

/* ---------- Ses ve üslup ---------- */
.tone-card { padding: 20px; display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 20px; align-items: start; }
.tone-card h3 { margin: 0 0 4px; font-size: 18px; }
.tone-card p { margin: 0; color: var(--ink-2); }
.tone-label { margin: 12px 0 4px; }
.tone-foot { margin-top: 10px !important; }
.avatar-edit { display: grid; justify-items: center; gap: 8px; }
.traits { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.list-edit { display: grid; gap: 8px; }
.list-edit .li { display: grid; grid-template-columns: 1fr 1.4fr auto; gap: 8px; align-items: start; }
.list-edit .li.kb { grid-template-columns: 0.8fr 0.9fr 1.6fr auto; }
.list-edit textarea { min-height: 40px; }
.form { padding: 18px; display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; }
.sticky-save { position: sticky; bottom: calc(16px + var(--tabbar-h)); justify-content: flex-end; margin-top: 16px; }

/* ---------- Deneme alanı ---------- */
.pg { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.pg .result { padding: 18px; display: grid; gap: 12px; }
.examples { display: flex; gap: 6px; flex-wrap: wrap; }

/* ---------- Ayarlar ---------- */
.set-row { display: flex; gap: 14px; align-items: center; padding: 14px 18px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.set-row:last-child { border-bottom: 0; }
.set-row .t { flex: 1; min-width: 220px; display: grid; gap: 2px; }
.set-row .t b { display: block; }
.set-row .t-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
input:disabled { opacity: .55; cursor: not-allowed; }
input[readonly] { background: var(--sunken); color: var(--ink-2); cursor: default; }
.set-row .t small { color: var(--muted); }
.set-row .ctl { display: flex; align-items: flex-end; gap: 8px; flex-wrap: wrap; }
.set-row .ctl .switch { margin-bottom: 7px; }
.warn-txt { color: var(--warn) !important; font-weight: 600; }
.conn-card.bad { border-color: color-mix(in srgb, var(--bad) 45%, var(--line)); }
.admin-tools { margin-top: 10px; }
.admin-tools > summary { cursor: pointer; padding: 14px 18px; font-weight: 600; font-size: 14px; color: var(--ink-2); }
.admin-tools > form { padding-top: 0; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px; overflow-wrap: anywhere; }
.code { padding: 8px 10px; background: var(--panel-2); border: 1px solid var(--line); border-radius: 8px; word-break: break-all; }
.steps { margin: 0; padding-left: 20px; color: var(--ink-2); display: grid; gap: 6px; font-size: 14px; }

/* ---------- Bildirim ve diyalog ---------- */
.toasts { position: fixed; bottom: 20px; left: calc(var(--side-w) + 28px); display: grid; gap: 8px; z-index: 60; width: min(380px, calc(100vw - var(--side-w) - 56px)); pointer-events: none; align-content: end; }
/* Konuşma tam ekran açıkken bildirim üstte durur; alttaki cevap düğmelerini örtmez */
body.pane-open .toasts { top: 8px; bottom: auto; left: calc(var(--side-w) + 12px); right: 12px; width: auto; align-content: start; }
.solo ~ .toasts { top: 16px; bottom: auto; left: 50%; transform: translateX(-50%); width: min(520px, calc(100vw - 24px)); }
.toast { pointer-events: auto; display: flex; gap: 10px; align-items: center; background: var(--ink); color: var(--panel); padding: 10px 8px 10px 14px; border-radius: 12px; box-shadow: 0 8px 30px rgba(0,0,0,.25); font-size: 14px; animation: drop .2s ease-out; }
@keyframes drop { from { transform: translateY(8px); opacity: 0; } }
.toast .t-msg { flex: 1; display: grid; gap: 2px; min-width: 0; }
.toast .t-msg small { opacity: .75; font-size: 12.5px; }
.toast button { background: none; border: 0; color: inherit; cursor: pointer; font-weight: 700; border-radius: 8px; min-height: 34px; padding: 0 10px; }
.toast .t-act { color: #ff8cba; border: 1px solid color-mix(in srgb, var(--accent) 60%, transparent); }
.toast .t-x { opacity: .7; font-size: 18px; padding: 0 8px; }
.toast .t-x:hover { opacity: 1; }
.toast.err { background: var(--bad); color: #fff; }
.toast.err .t-act { color: #fff; border-color: rgba(255,255,255,.6); }
.dlg { border: 0; border-radius: 16px; padding: 0; width: min(560px, calc(100vw - 24px)); max-height: calc(100dvh - 24px); background: var(--panel); color: var(--ink); box-shadow: 0 20px 60px rgba(0,0,0,.3); }
.dlg.wide { width: min(720px, calc(100vw - 24px)); }
.dlg::backdrop { background: rgba(10, 8, 16, .45); }
.dlg form { padding: 20px; display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; }
.dlg h3 { margin: 0; font-size: 18px; }
.dlg-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.dlg-x { flex: none; }
details.adv > summary { cursor: pointer; font-weight: 600; font-size: 13.5px; color: var(--ink-2); padding: 6px 0; }
.adv-body { display: grid; gap: 14px; padding-top: 8px; }
.dlg-text { margin: 0; }

/* =================== Giriş, yönetici ve kurulum sayfaları =================== */
.solo { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1fr); justify-items: center; align-items: start; padding: 40px 16px 80px; }
.solo-wrap { width: min(760px, 100%); display: grid; grid-template-columns: minmax(0, 1fr); gap: 18px; min-width: 0; }
.solo-wrap.mid { width: min(920px, 100%); }
.solo-wrap.wide { width: min(1120px, 100%); }
.solo-top { display: flex; align-items: center; gap: 12px; }
.hero { padding: 28px; display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; min-width: 0; }
.hero h1 { margin: 0; font-size: 26px; letter-spacing: -.02em; line-height: 1.25; }
.hero h2 { margin: 0; font-size: 20px; letter-spacing: -.01em; }
.hero p { margin: 0; color: var(--ink-2); font-size: 16px; }
.perm-list { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; }
.perm-list li { display: flex; gap: 10px; align-items: flex-start; font-size: 15px; color: var(--ink-2); }
.perm-list li span:first-child { width: 22px; flex: none; text-align: center; }
.stepper { display: flex; gap: 6px; flex-wrap: wrap; list-style: none; margin: 0; padding: 0; }
.stepper .st { display: flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 99px; font-size: 13px; font-weight: 600; color: var(--muted); background: var(--sunken); }
.stepper .st.on { background: var(--accent); color: var(--accent-ink); }
.stepper .st.ok { color: var(--ok); background: var(--ok-soft); }
.progress-list { display: grid; gap: 12px; margin: 0; padding: 0; list-style: none; }
.progress-list li { display: flex; gap: 12px; align-items: center; font-size: 15.5px; }
.progress-list .ic { width: 22px; text-align: center; flex: none; }
.who-card { display: flex; gap: 16px; align-items: center; min-width: 0; }
.who-card .av { width: 72px; height: 72px; }
.who-card b { font-size: 20px; display: block; }
.plan { display: grid; }
.plan-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 440px); gap: 14px; align-items: center; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.plan-row:last-child { border-bottom: 0; }
.plan-row .nm { font-weight: 700; display: flex; gap: 8px; align-items: center; font-size: 15px; flex-wrap: wrap; }
.plan-row .nm i { width: 10px; height: 10px; border-radius: 3px; flex: none; }
.plan-row .help { margin-top: 2px; }
.choices { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; min-width: 0; }
.choice { min-height: 44px; padding: 6px 8px; border: 1.5px solid var(--line-2); border-radius: 10px; background: var(--panel); font-weight: 600; font-size: 13.5px; cursor: pointer; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; text-align: center; color: var(--ink-2); line-height: 1.25; box-shadow: var(--btn-shadow); }
.choice:hover { border-color: var(--muted); color: var(--ink); }
.choice[aria-checked="true"] { border-color: var(--accent); background: var(--accent); color: var(--accent-ink); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 20%, transparent); }
.choice[aria-checked="true"] .c-l::before { content: "✓ "; }
.choice .rec { font-size: 11px; font-weight: 700; color: var(--warn); }
.choice[aria-checked="true"] .rec { color: inherit; opacity: .9; }
.choice.auto .c-l::after { content: " ⚡"; }
.choice-wrap { display: grid; gap: 6px; min-width: 0; }
.row-note { font-size: 12.5px; line-height: 1.4; padding: 6px 10px; border-radius: 8px; background: var(--warn-soft); color: var(--ink); border: 1px solid color-mix(in srgb, var(--warn) 35%, transparent); }
.row-note.bad { background: var(--bad-soft); border-color: color-mix(in srgb, var(--bad) 40%, transparent); }
.alert.auto-note span { display: block; }
.auto-note { display: grid; gap: 4px; }
.samples { display: grid; gap: 12px; }
.sample { display: grid; gap: 8px; padding: 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--panel-2); }
.sample .in { font-size: 15px; overflow-wrap: anywhere; }
.sample textarea { font-size: 15px; min-height: 48px; }
.pairs { display: grid; gap: 10px; }
.pair { display: grid; gap: 4px; padding: 10px 12px; border-left: 3px solid var(--accent); background: var(--panel-2); border-radius: 0 10px 10px 0; font-size: 14.5px; overflow-wrap: anywhere; }
.pair .meta { font-size: 12.5px; }
.tags-edit { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.tags-edit .tag { padding-right: 2px; }
.tags-edit .tag button { border: 1px solid transparent; background: none; color: var(--muted); cursor: pointer; padding: 0 6px; font-size: 15px; line-height: 1.2; border-radius: 4px; }
.tags-edit .tag button:hover { color: var(--bad); border-color: var(--line-2); }
.tags-edit input { width: 200px; }
.wiz-actions { display: flex; gap: 10px; align-items: center; justify-content: flex-end; flex-wrap: wrap; }
.wiz-actions .sp { flex: 1; }
.kb-row { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.6fr) auto; gap: 8px; align-items: end; }
.kb-row > .btn { justify-self: end; }
.tenant-list { display: grid; }
.tenant-row { display: grid; grid-template-columns: 48px minmax(0, 1fr) auto; gap: 14px; align-items: start; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.tenant-row:last-child { border-bottom: 0; }
.tenant-row.fresh { background: var(--ok-soft); }
.tenant-row .av { width: 48px; height: 48px; }
.tenant-row b { font-size: 16px; }
.tenant-row .acts { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.tenant-row .warns { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 6px; }
.tenant-row .tag { white-space: normal; }
.copy-box { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; max-width: 640px; }
.copy-box input { flex: 1 1 240px; min-width: 0; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 13px; }
.copy-box .meta { flex-basis: 100%; }

/* =================== Telefon ve dar ekran =================== */
@media (max-width: 1000px) {
  .pg { grid-template-columns: 1fr; }
}
@media (max-width: 1279px) and (min-width: 901px) {
  :root { --side-w: 76px; }
  .app { grid-template-columns: 76px minmax(0, 1fr); }
  .side { padding: 14px 8px; align-items: center; }
  .brand > div, .side-foot { display: none; }
  .brand { padding: 0; }
  .nav button { flex-direction: column; gap: 2px; padding: 8px 2px; font-size: 11px; width: 60px; text-align: center; }
  .nav .l-long { display: none; }
  .nav .l-short { display: inline; }
  .nav button b { position: absolute; top: 2px; right: 4px; margin: 0; }
}
@media (max-width: 1199px) {
  .hide-narrow { display: none !important; }
  /* Sohbet: liste tam genişlik; açınca konuşma ana alanı tamamen kaplar */
  .chat { grid-template-columns: 1fr; }
  .c-list { overflow: visible; }
  .chat.open .pane { position: fixed; top: 0; right: 0; bottom: 0; left: var(--side-w); z-index: 40; border-radius: 0; border-top: 0; border-right: 0; border-bottom: 0; height: 100vh; height: 100dvh; box-shadow: none; }
  body.pane-open { overflow: hidden; }
  .pane-head .back { display: inline-flex; flex: none; }
  .pane-head { padding: 10px 14px; gap: 10px; padding-top: max(10px, env(safe-area-inset-top)); }
  .pane-head .av.lg { width: 40px; height: 40px; }
  .pane-head .name { font-size: 16px; }
  .pane-body { padding: 14px; }
  .pane-foot { padding: 12px 14px; padding-bottom: max(12px, env(safe-area-inset-bottom)); max-height: 55%; }
}
@media (max-width: 900px) {
  :root { --tabbar-h: 64px; --side-w: 0px; }
  .app { grid-template-columns: 1fr; }
  .app > * { min-width: 0; }
  /* Alt sekme çubuğu: simge + kısa ad */
  .side { position: fixed; left: 0; right: 0; bottom: 0; top: auto; height: auto; z-index: 20; flex-direction: row; padding: 0 4px; padding-bottom: env(safe-area-inset-bottom); border-right: 0; border-top: 1px solid var(--line); gap: 0; }
  .side .brand, .side-foot { display: none; }
  .nav { flex-direction: row; flex: 1; gap: 0; }
  .nav button { flex: 1 1 0; flex-direction: column; justify-content: center; gap: 3px; min-height: 60px; padding: 6px 2px; font-size: 11.5px; border-radius: 10px; text-align: center; min-width: 0; }
  .nav button.active { background: none; }
  .nav button.active .ico { background: var(--accent-soft); border-radius: 99px; }
  .nav .ico { width: 44px; height: 26px; padding: 3px 12px; }
  .nav .l-long { display: none; }
  .nav .l-short { display: inline; }
  .nav button b { position: absolute; top: 4px; left: calc(50% + 6px); margin: 0; }
  .main { padding-bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom)); }
  .top { padding: 8px 16px; padding-top: max(8px, env(safe-area-inset-top)); min-height: 54px; }
  .profile-chip { padding: 3px 8px 3px 3px; gap: 6px; }
  .profile-chip .pc-txt { display: none; }
  .admin-bar { padding: 8px 16px; }
  .view { padding: 16px 16px 40px; }
  .grid2, .grid3 { grid-template-columns: 1fr; }
  .list-edit .li, .list-edit .li.kb { grid-template-columns: 1fr; padding-bottom: 10px; border-bottom: 1px dashed var(--line); }
  .list-edit .li .btn { justify-self: end; }
  .tone-card { grid-template-columns: 1fr; }
  .kv { grid-template-columns: 1fr; gap: 2px 12px; }
  .kv > span:nth-child(even) { margin-bottom: 8px; }
  .toasts { left: 12px; right: 12px; width: auto; bottom: calc(var(--tabbar-h) + 12px + env(safe-area-inset-bottom)); }
  /* Telefonda konuşma: cevap alanı en çok %45, gelen mesaj kaydırmadan görünür */
  .pane-foot { max-height: 45%; }
  .pane-head .av.lg { display: none; }
  .pane-head .who { gap: 4px; }
  .pane-head .badges .meta { display: none; }
  .composer textarea { min-height: 56px; }
  .set-row .t { min-width: 0; flex: 1 1 100%; }
}
@media (max-width: 700px) {
  .hide-sm { display: none !important; }
  /* Durum sekmeleri yerine biçimlendirilmiş seçim kutusu */
  .tabs { display: none; }
  .inbox-head { border-bottom: 0; }
  .tabs-select { display: grid; gap: 4px; flex: 1; }
  .toolbar > .seg { width: 100%; }
  .toolbar > .seg button { flex: 1; }
  .toolbar .select, .toolbar input[type=search] { width: 100%; flex: 1 1 100%; }
  .toolbar .grow { display: none; }
  .toolbar > .btn { flex: 1 1 0; }
  .c-row { grid-template-columns: 40px minmax(0, 1fr) auto; gap: 10px; padding: 12px 12px 12px 10px; }
  .c-row .av.md { width: 40px; height: 40px; }
  .c-item.reply { margin-left: 20px; }
  .dm-bubble { max-width: 85%; }
  .post-card { grid-template-columns: 48px minmax(0, 1fr); gap: 10px; padding: 10px; }
  .post-card .cover { width: 48px; height: 60px; font-size: 18px; }
  .post-card .cover .ov { display: none; }
  .post-card .cap { font-size: 13.5px; }
  .pane-body { gap: 12px; }
  .actions .sp { display: none; }
  .act-main { flex: 1 1 140px; }
  .act-main .btn { width: 100%; }
  /* Kategori tablosu: alt alta kartlar */
  .matrix thead { display: none; }
  .matrix, .matrix tbody, .matrix tr, .matrix td { display: block; width: 100%; }
  .matrix tr { padding: 14px 16px; border-bottom: 1px solid var(--line); display: grid; grid-template-columns: 1fr 1fr; gap: 8px 12px; }
  .matrix tr:last-child { border-bottom: 0; }
  .matrix td { padding: 0; border: 0; max-width: none; }
  .matrix td.c-name, .matrix td.ex, .matrix td.c-act { grid-column: 1 / -1; }
  .matrix td[data-label]::before { content: attr(data-label); display: block; font-size: 11px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); margin-bottom: 2px; }
  .matrix .c-act { text-align: left; }
  .matrix .c-act .btn { width: 100%; }
  .hero { padding: 20px; }
  .hero h1 { font-size: 22px; }
  .plan-row { grid-template-columns: 1fr; padding: 14px; }
  .tenant-row { grid-template-columns: 40px minmax(0, 1fr); padding: 14px; }
  .tenant-row .av { width: 40px; height: 40px; }
  .tenant-row .acts { grid-column: 1 / -1; justify-content: flex-start; }
  .kb-row { grid-template-columns: 1fr; }
  .wiz-actions .btn.lg { flex: 1 1 auto; }
  .solo { padding: 20px 12px 60px; }
}
@media (max-width: 560px) {
  .choices { grid-template-columns: 1fr; }
  .choice { flex-direction: row; justify-content: space-between; padding: 8px 12px; text-align: left; min-height: 46px; }
}

/* Dokunmatik ekran: iOS yakınlaştırmasın diye 16px yazı, rahat dokunma alanı, klavye kısayolu ipucu yok */
@media (hover: none), (pointer: coarse) {
  input[type=text], input[type=search], input[type=email], input[type=number], input[type=password], input[type=time], textarea, select, .select, .select.sm { font-size: 16px; }
  .btn { min-height: 44px; }
  .btn.sm { min-height: 40px; font-size: 13.5px; }
  .select, .select.sm { height: 44px; min-height: 44px; }
  input[type=text], input[type=search], input[type=email], input[type=number], input[type=password], input[type=time] { min-height: 44px; }
  .seg button { min-height: 38px; }
  .tab { padding: 12px; }
  .btn kbd, kbd { display: none; }
  .menu a, .menu button { padding: 12px; font-size: 15px; }
}
