/* Recci Destek – tasarım sistemi */
:root {
  --bg: #f6f7f9;
  --surface: #ffffff;
  --surface-2: #f9fafb;
  --surface-3: #f2f4f7;
  --border: #e4e7ec;
  --border-strong: #d0d5dd;
  --text: #101828;
  --text-2: #475467;
  --text-3: #98a2b3;
  --accent: #e5532d;
  --accent-hover: #cf4521;
  --accent-soft: #fdeee9;
  --accent-text: #b83a1a;
  --focus: rgba(229, 83, 45, .22);
  --side-bg: #111827;
  --side-text: #a3acbb;
  --side-text-strong: #f3f4f6;
  --side-hover: rgba(255, 255, 255, .06);
  --side-active: rgba(255, 255, 255, .1);
  --side-border: rgba(255, 255, 255, .07);
  --blue: #2563eb; --blue-soft: #eff4ff; --blue-text: #1d4ed8;
  --amber: #b54708; --amber-soft: #fffaeb;
  --violet: #6941c6; --violet-soft: #f4f3ff;
  --green: #067647; --green-soft: #ecfdf3;
  --red: #b42318; --red-soft: #fef3f2;
  --gray-soft: #f2f4f7; --gray-text: #344054;
  --note-bg: #fffaeb; --note-border: #fedf89;
  --reply-bg: #eff4ff; --reply-border: #c7d7fe;
  --shadow-sm: 0 1px 2px rgba(16, 24, 40, .05);
  --shadow-md: 0 4px 8px -2px rgba(16, 24, 40, .08), 0 2px 4px -2px rgba(16, 24, 40, .04);
  --shadow-lg: 0 20px 24px -4px rgba(16, 24, 40, .1), 0 8px 8px -4px rgba(16, 24, 40, .04);
  --radius-sm: 6px;
  --radius: 8px;
  --radius-lg: 12px;
  --font: "Inter", "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "Cascadia Code", Consolas, monospace;
  color-scheme: light;
}
:root[data-theme="dark"] {
  --bg: #0c111d;
  --surface: #131a2a;
  --surface-2: #161e30;
  --surface-3: #1d2639;
  --border: #253048;
  --border-strong: #344054;
  --text: #f2f4f7;
  --text-2: #b3bccb;
  --text-3: #75809a;
  --accent-soft: rgba(229, 83, 45, .16);
  --accent-text: #ff9a7a;
  --side-bg: #0a0f1a;
  --blue-soft: rgba(37, 99, 235, .16); --blue-text: #93b4ff;
  --amber-soft: rgba(245, 158, 11, .14); --amber: #fbbf24;
  --violet-soft: rgba(124, 58, 237, .18); --violet: #c4b5fd;
  --green-soft: rgba(16, 185, 129, .14); --green: #6ee7b7;
  --red-soft: rgba(239, 68, 68, .14); --red: #fca5a5;
  --gray-soft: #1d2639; --gray-text: #cfd5df;
  --note-bg: rgba(245, 158, 11, .1); --note-border: rgba(245, 158, 11, .3);
  --reply-bg: rgba(37, 99, 235, .12); --reply-border: rgba(37, 99, 235, .35);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, .35);
  --shadow-lg: 0 20px 40px rgba(0, 0, 0, .5);
  color-scheme: dark;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { height: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 14px/1.5 var(--font); -webkit-font-smoothing: antialiased; }
a { color: var(--blue-text); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4, p { margin: 0; }
button, input, select, textarea { font: inherit; color: inherit; }
svg.i { width: 16px; height: 16px; flex-shrink: 0; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
svg.i.sm { width: 14px; height: 14px; }
svg.i.lg { width: 20px; height: 20px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.muted { color: var(--text-3); }
.mono { font-family: var(--mono); font-size: 12.5px; }
.nowrap { white-space: nowrap; }
.grow { flex: 1; min-width: 0; }
.row { display: flex; align-items: center; gap: 8px; }
.row.wrap { flex-wrap: wrap; }
.stack { display: flex; flex-direction: column; gap: 12px; }
.ellipsis { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
kbd { font: 11px var(--mono); padding: 1px 5px; border: 1px solid var(--border-strong); border-bottom-width: 2px; border-radius: 4px; background: var(--surface-2); color: var(--text-2); }

/* ---------- Uygulama iskeleti ---------- */
.app { display: grid; grid-template-columns: 252px minmax(0, 1fr); height: 100vh; }
.side { background: var(--side-bg); color: var(--side-text); display: flex; flex-direction: column; min-height: 0; }
.side-brand { display: flex; align-items: center; gap: 10px; padding: 16px 16px 14px; color: var(--side-text-strong); }
.logo { width: 32px; height: 32px; border-radius: 8px; background: var(--accent); color: #fff; display: grid; place-items: center; font-weight: 700; font-size: 15px; letter-spacing: -.02em; }
.side-brand b { display: block; font-size: 14px; line-height: 1.2; }
.side-brand small { font-size: 11.5px; color: var(--side-text); }
.side-scroll { flex: 1; overflow-y: auto; padding: 4px 10px 12px; }
.side-section { margin-top: 14px; }
.side-label { font-size: 11px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; padding: 0 10px 6px; color: #6b7487; }
.nav-item { display: flex; align-items: center; gap: 10px; padding: 7px 10px; border-radius: var(--radius-sm); color: var(--side-text); font-weight: 500; font-size: 13.5px; text-decoration: none; }
.nav-item:hover { background: var(--side-hover); color: var(--side-text-strong); text-decoration: none; }
.nav-item.active { background: var(--side-active); color: #fff; }
.nav-item .cnt { margin-left: auto; font-size: 12px; font-variant-numeric: tabular-nums; color: #8b94a7; }
.nav-item.active .cnt { color: #fff; }
.nav-item .cnt.hot { background: var(--accent); color: #fff; border-radius: 99px; padding: 0 7px; font-weight: 600; }
.nav-item .dot { width: 8px; height: 8px; border-radius: 50%; }
.side-foot { border-top: 1px solid var(--side-border); padding: 10px 12px; display: flex; align-items: center; gap: 10px; }
.side-foot .who { min-width: 0; flex: 1; }
.side-foot .who b { display: block; color: var(--side-text-strong); font-size: 13px; font-weight: 600; }
.side-foot .who small { font-size: 11.5px; }
.icon-btn { background: transparent; border: 0; color: inherit; width: 30px; height: 30px; border-radius: var(--radius-sm); display: inline-grid; place-items: center; cursor: pointer; }
.icon-btn:hover { background: var(--side-hover); color: var(--side-text-strong); }
.main-col { display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.topbar { height: 56px; flex-shrink: 0; display: flex; align-items: center; gap: 12px; padding: 0 20px; background: var(--surface); border-bottom: 1px solid var(--border); }
.search { position: relative; flex: 1; max-width: 520px; }
.search svg { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); color: var(--text-3); }
.search input { width: 100%; height: 36px; padding: 0 70px 0 34px; border: 1px solid var(--border); background: var(--surface-2); border-radius: var(--radius); outline: none; }
.search input:focus { border-color: var(--accent); background: var(--surface); box-shadow: 0 0 0 3px var(--focus); }
.search kbd { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); }
.sync-pill { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--text-2); padding: 4px 10px; border-radius: 99px; background: var(--surface-3); white-space: nowrap; }
.sync-pill .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--green); }
.sync-pill .dot.bad { background: var(--red); }
.page { flex: 1; overflow-y: auto; min-height: 0; }
.page-inner { padding: 22px 24px 48px; max-width: 1440px; }
.page-head { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.page-head h1 { font-size: 20px; font-weight: 650; letter-spacing: -.01em; }
.page-head .sub { color: var(--text-3); font-size: 13.5px; }
.page-head .spacer { flex: 1; }

/* ---------- Kontroller ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 34px; padding: 0 12px; border-radius: var(--radius); border: 1px solid var(--border-strong); background: var(--surface); color: var(--text); font-weight: 550; font-size: 13.5px; cursor: pointer; white-space: nowrap; box-shadow: var(--shadow-sm); text-decoration: none; }
.btn:hover { background: var(--surface-2); text-decoration: none; }
.btn:focus-visible, .icon-btn:focus-visible, .nav-item:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn.primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
.btn.ghost { background: transparent; border-color: transparent; box-shadow: none; color: var(--text-2); }
.btn.ghost:hover { background: var(--surface-3); color: var(--text); }
.btn.danger { color: var(--red); }
.btn.sm { height: 28px; padding: 0 9px; font-size: 12.5px; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-group { display: inline-flex; }
.btn-group .btn { border-radius: 0; margin-left: -1px; }
.btn-group .btn:first-child { border-radius: var(--radius) 0 0 var(--radius); margin-left: 0; }
.btn-group .btn:last-child { border-radius: 0 var(--radius) var(--radius) 0; }
.input, select.input, textarea.input {
  width: 100%; height: 34px; padding: 0 10px; border: 1px solid var(--border-strong); border-radius: var(--radius); background: var(--surface); outline: none; box-shadow: var(--shadow-sm);
}
select.input { padding-right: 28px; appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2398a2b3' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 9px center; }
textarea.input { height: auto; min-height: 90px; padding: 9px 10px; resize: vertical; line-height: 1.5; }
.input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--focus); }
.input.sm { height: 30px; font-size: 13px; }
.field { display: block; margin-bottom: 14px; }
.field > span { display: block; font-size: 12.5px; font-weight: 600; color: var(--text-2); margin-bottom: 5px; }
.field .hint { margin-top: 4px; }
.hint { font-size: 12.5px; color: var(--text-3); }
.check { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; font-size: 13.5px; }
input[type=checkbox] { width: 16px; height: 16px; accent-color: var(--accent); cursor: pointer; margin: 0; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }
.form-grid .full { grid-column: 1 / -1; }

/* ---------- Kartlar ---------- */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow-sm); }
.card-head { display: flex; align-items: center; gap: 10px; padding: 14px 16px; border-bottom: 1px solid var(--border); }
.card-head h3 { font-size: 14px; font-weight: 650; flex: 1; }
.card-body { padding: 16px; }
.card-foot { padding: 12px 16px; border-top: 1px solid var(--border); display: flex; justify-content: flex-end; gap: 8px; }
.grid { display: grid; gap: 16px; }
.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; margin-bottom: 16px; }
.kpi { padding: 14px 16px; cursor: default; }
.kpi[data-go] { cursor: pointer; }
.kpi[data-go]:hover { border-color: var(--border-strong); }
.kpi .l { color: var(--text-2); font-size: 12.5px; font-weight: 550; display: flex; align-items: center; gap: 6px; }
.kpi .v { font-size: 26px; font-weight: 650; letter-spacing: -.02em; margin-top: 4px; font-variant-numeric: tabular-nums; }
.kpi .v.alert { color: var(--red); }
.kpi .s { font-size: 12px; color: var(--text-3); }

/* ---------- Rozetler ---------- */
.badge { display: inline-flex; align-items: center; gap: 5px; height: 22px; padding: 0 8px; border-radius: 99px; font-size: 12px; font-weight: 600; white-space: nowrap; background: var(--gray-soft); color: var(--gray-text); }
.badge .bd { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.st-yeni { background: var(--blue-soft); color: var(--blue-text); }
.st-acik { background: var(--amber-soft); color: var(--amber); }
.st-iletisimde { background: var(--violet-soft); color: var(--violet); }
.st-beklemede { background: var(--gray-soft); color: var(--gray-text); }
.st-cozuldu { background: var(--green-soft); color: var(--green); }
.st-kapandi { background: var(--gray-soft); color: var(--text-3); }
.pr { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 550; color: var(--text-2); white-space: nowrap; }
.pr i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
.pr-acil i { background: #d92d20; }
.pr-yuksek i { background: #f79009; }
.pr-normal i { background: #98a2b3; }
.pr-dusuk i { background: #d0d5dd; }
.ch { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--text-2); white-space: nowrap; }
.ch-ic { width: 20px; height: 20px; border-radius: 5px; display: inline-grid; place-items: center; font-size: 9.5px; font-weight: 700; color: #fff; letter-spacing: -.02em; flex-shrink: 0; background: #667085; }
.tag { display: inline-flex; align-items: center; gap: 4px; height: 22px; padding: 0 8px; border-radius: var(--radius-sm); background: var(--surface-3); color: var(--text-2); font-size: 12px; font-weight: 500; border: 1px solid var(--border); }
.tag button { border: 0; background: none; padding: 0; color: var(--text-3); cursor: pointer; display: inline-grid; }
.sla { font-size: 12.5px; font-weight: 600; display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; }
.sla.late { color: var(--red); }
.sla.soon { color: var(--amber); }
.sla.ok { color: var(--text-2); font-weight: 500; }
.avatar { width: 26px; height: 26px; border-radius: 50%; display: inline-grid; place-items: center; font-size: 11px; font-weight: 650; color: #fff; flex-shrink: 0; text-transform: uppercase; }
.avatar.lg { width: 40px; height: 40px; font-size: 15px; }
.avatar.empty { background: var(--surface-3) !important; color: var(--text-3); border: 1px dashed var(--border-strong); }

/* ---------- Tablo ---------- */
.toolbar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 10px 12px; border-bottom: 1px solid var(--border); }
.toolbar select.input { width: auto; min-width: 128px; height: 30px; font-size: 13px; }
.toolbar .search-inline { position: relative; min-width: 220px; flex: 1; max-width: 320px; }
.toolbar .search-inline svg { position: absolute; left: 9px; top: 50%; transform: translateY(-50%); color: var(--text-3); }
.toolbar .search-inline input { padding-left: 30px; height: 30px; font-size: 13px; }
.bulkbar { display: flex; align-items: center; gap: 8px; padding: 8px 12px; background: var(--accent-soft); border-bottom: 1px solid var(--border); flex-wrap: wrap; }
.bulkbar b { color: var(--accent-text); font-size: 13px; margin-right: 6px; }
.bulkbar select.input { width: auto; height: 28px; font-size: 12.5px; }
.table-wrap { overflow-x: auto; }
table.tbl { width: 100%; border-collapse: separate; border-spacing: 0; }
.tbl th { text-align: left; font-size: 12px; font-weight: 600; color: var(--text-3); padding: 9px 12px; border-bottom: 1px solid var(--border); background: var(--surface-2); white-space: nowrap; position: sticky; top: 0; z-index: 1; }
.tbl td { padding: 11px 12px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl tr.trow { cursor: pointer; }
.tbl tr.trow:hover td { background: var(--surface-2); }
.tbl tr.trow.sel td { background: var(--accent-soft); }
.tbl tr.trow.kb td { box-shadow: inset 0 0 0 9999px rgba(37, 99, 235, .05); }
.tbl tr.trow.kb td:first-child { box-shadow: inset 3px 0 0 var(--blue), inset 0 0 0 9999px rgba(37, 99, 235, .05); }
.tbl .w-check { width: 36px; padding-right: 0; }
.tbl .subj { font-weight: 600; color: var(--text); max-width: 520px; }
.tbl .prev { color: var(--text-3); font-size: 12.5px; max-width: 520px; margin-top: 1px; }
.tbl .meta-line { display: flex; gap: 6px; align-items: center; margin-top: 3px; flex-wrap: wrap; }
.tbl .num { color: var(--text-3); font-family: var(--mono); font-size: 12px; }
.empty { padding: 56px 20px; text-align: center; color: var(--text-3); }
.empty svg { width: 36px; height: 36px; stroke-width: 1.4; margin-bottom: 10px; color: var(--border-strong); }
.empty h4 { color: var(--text-2); font-size: 15px; margin-bottom: 4px; }
.pager { display: flex; align-items: center; justify-content: space-between; padding: 10px 14px; border-top: 1px solid var(--border); font-size: 13px; color: var(--text-2); }

/* ---------- Ticket detayı ---------- */
.detail { display: grid; grid-template-columns: minmax(0, 1fr) 340px; height: 100%; min-height: 0; }
.convo { display: flex; flex-direction: column; min-width: 0; min-height: 0; border-right: 1px solid var(--border); background: var(--bg); }
.convo-head { padding: 14px 20px; background: var(--surface); border-bottom: 1px solid var(--border); }
.convo-head .crumbs { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 8px; font-size: 12.5px; color: var(--text-3); margin-bottom: 6px; }
.convo-head h1 { font-size: 18px; font-weight: 650; letter-spacing: -.01em; outline: none; border-radius: 4px; padding: 1px 4px; margin-left: -4px; }
.convo-head h1[contenteditable="true"]:hover { background: var(--surface-3); }
.convo-head h1[contenteditable="true"]:focus { background: var(--surface); box-shadow: 0 0 0 2px var(--focus); }
.convo-head .actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-top: 10px; }
.thread { flex: 1; overflow-y: auto; padding: 20px; display: flex; flex-direction: column; gap: 14px; }
.msg { display: flex; gap: 10px; max-width: 860px; }
.msg.out { margin-left: auto; flex-direction: row-reverse; }
.msg .bubble { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 11px 14px; min-width: 0; box-shadow: var(--shadow-sm); }
.msg.out .bubble { background: var(--reply-bg); border-color: var(--reply-border); }
.msg.note .bubble { background: var(--note-bg); border-color: var(--note-border); }
.msg .mh { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--text-3); margin-bottom: 4px; flex-wrap: wrap; }
.msg .mh b { color: var(--text); font-weight: 600; font-size: 13px; }
.msg .mb { white-space: pre-wrap; word-break: break-word; }
.msg .mb .title { font-weight: 650; display: block; margin-bottom: 4px; }
.atts { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.atts img { width: 96px; height: 96px; object-fit: cover; border-radius: var(--radius); border: 1px solid var(--border); display: block; }
.atts a:hover img { border-color: var(--accent); }
.att-file { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 10px; border: 1px solid var(--border); border-radius: var(--radius); font-size: 12.5px; }
.msg-acts { display: flex; align-items: center; gap: 4px; justify-content: flex-end; margin-top: 6px; }
.msg.deleted .mb { text-decoration: line-through; color: var(--text-3); }
.stars { color: #f5a524; letter-spacing: 1px; font-size: 14px; }
.stars .off { color: var(--border-strong); }
.sys { align-self: center; font-size: 12px; color: var(--text-3); display: flex; align-items: center; gap: 6px; padding: 2px 10px; }
.sys b { color: var(--text-2); font-weight: 600; }

/* Instagram / Facebook yorumları: platformdaki görünüm (gönderi, yorumlar, iç içe yanıtlar) */
.social { align-self: stretch; max-width: 720px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow-sm); }
.sp-head { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border-bottom: 1px solid var(--border); }
.sp-img { width: 56px; height: 56px; border-radius: var(--radius); object-fit: cover; flex-shrink: 0; background: var(--surface-3); }
.sp-info { flex: 1; min-width: 0; }
.sp-acct { display: flex; align-items: center; gap: 6px; font-size: 13px; }
.sp-cap { margin-top: 4px; font-size: 13px; color: var(--text-2); white-space: pre-wrap; overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.sp-list { padding: 6px 8px 12px; }
.sp-thread { padding-top: 8px; }
.sc { display: flex; gap: 10px; align-items: flex-start; padding: 5px 6px; border-radius: var(--radius); }
.sc > .avatar { width: 32px; height: 32px; font-size: 12px; }
.sc-main { flex: 1; min-width: 0; }
.sc-text { font-size: 14px; line-height: 1.45; white-space: pre-wrap; overflow-wrap: anywhere; }
.sc-text b { font-weight: 650; }
.sc-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 14px; margin-top: 3px; font-size: 12px; color: var(--text-3); }
.sc-link { border: 0; background: none; padding: 0; font: inherit; font-weight: 600; color: var(--text-2); cursor: pointer; text-decoration: none; }
.sc-link:hover { color: var(--text); text-decoration: underline; }
.sc-hidden { display: inline-flex; align-items: center; gap: 3px; color: var(--amber); font-weight: 600; }
.sc.is-hidden > .avatar, .sc.is-hidden .sc-text { opacity: .55; }
.sc.is-target { background: var(--accent-soft); }
.sc-replies { margin: 4px 0 0 42px; display: flex; flex-direction: column; gap: 2px; }
.brand-av { background: var(--accent); }
.brand-av.ig { outline: 2px solid #e1306c; outline-offset: 2px; }
.social.fb .sc-text { display: inline-block; max-width: 100%; background: var(--surface-3); border-radius: 16px; padding: 7px 12px; }
.social.fb .sc-text b { display: block; font-size: 13px; }
.social.fb .sc-meta { padding-left: 12px; }
.thread-sep { display: flex; align-items: center; gap: 10px; color: var(--text-3); font-size: 11.5px; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; margin-top: 6px; }
.thread-sep::before, .thread-sep::after { content: ""; flex: 1; height: 1px; background: var(--border); }
.reply-to { display: flex; align-items: center; gap: 8px; min-width: 0; font-size: 12.5px; color: var(--text-2); background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius); padding: 6px 10px; }
.reply-to .ellipsis { flex: 1; min-width: 0; }
.sp-preview { margin-top: 8px; padding: 8px 10px; border: 1px dashed var(--border-strong); border-radius: var(--radius); background: var(--surface-2); max-height: 200px; overflow-y: auto; }
.sp-prev-h { display: flex; align-items: center; gap: 6px; margin-bottom: 4px; font-size: 12px; color: var(--text-3); }
.sp-prev-h .over { color: var(--red); font-weight: 600; }
.sp-preview .social { border: 0; box-shadow: none; background: transparent; max-width: none; }
.sp-preview .sc:not(.is-brand) .sc-text { opacity: .75; }
.social.ig .sp-preview .sc:not(.is-brand) .sc-text, .sp-preview .social.ig .sc:not(.is-brand) .sc-text { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.contact-card { border-left: 3px solid var(--violet); }
.composer { background: var(--surface); border-top: 1px solid var(--border); padding: 0 16px 14px; flex-shrink: 0; }
.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--border); margin-bottom: 12px; }
.tabs button { background: none; border: 0; padding: 11px 12px 10px; cursor: pointer; font-weight: 600; font-size: 13px; color: var(--text-3); border-bottom: 2px solid transparent; margin-bottom: -1px; display: inline-flex; align-items: center; gap: 6px; }
.tabs button:hover { color: var(--text-2); }
.tabs button.on { color: var(--text); border-color: var(--accent); }
.tabs button.on.note-tab { border-color: #f79009; }
.composer textarea.input { min-height: 84px; max-height: 280px; }
.composer.note-mode textarea.input { background: var(--note-bg); border-color: var(--note-border); }
.composer .c-foot { display: flex; align-items: center; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.composer .c-row { display: flex; gap: 8px; margin-bottom: 8px; }
.composer .c-row > * { flex: 1; }
.aside { overflow-y: auto; background: var(--surface); min-height: 0; }
.aside-sec { padding: 16px; border-bottom: 1px solid var(--border); }
.aside-sec h4 { font-size: 11.5px; font-weight: 650; text-transform: uppercase; letter-spacing: .06em; color: var(--text-3); margin-bottom: 12px; display: flex; align-items: center; gap: 6px; }
.aside-sec h4 .spacer { flex: 1; }
.aside-sec h4 .btn { text-transform: none; letter-spacing: 0; font-size: 12.5px; }
.prop { display: grid; grid-template-columns: 104px minmax(0, 1fr); align-items: center; gap: 8px; margin-bottom: 8px; }
.prop > span { font-size: 12.5px; color: var(--text-2); }
.prop .input { height: 30px; font-size: 13px; }
.cust-head { display: flex; gap: 12px; align-items: center; margin-bottom: 12px; }
.cust-head b { font-size: 15px; display: block; }
.kv { display: flex; align-items: center; gap: 8px; font-size: 13px; margin-bottom: 6px; color: var(--text-2); min-width: 0; }
.kv svg { color: var(--text-3); }
.kv a, .kv span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tags-edit { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; padding: 4px 6px; border: 1px solid var(--border-strong); border-radius: var(--radius); min-height: 32px; background: var(--surface); }
.tags-edit input { border: 0; outline: none; background: transparent; min-width: 80px; flex: 1; font-size: 13px; height: 22px; }
.sla-box { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.sla-box div { background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius); padding: 8px 10px; }
.sla-box small { display: block; font-size: 11.5px; color: var(--text-3); }
.sla-box b { font-size: 13px; font-weight: 600; }
.mini-list a { display: block; padding: 7px 0; border-bottom: 1px solid var(--border); color: var(--text); text-decoration: none; }
.mini-list a:last-child { border-bottom: 0; }
.mini-list a:hover .t { color: var(--accent-text); }
.mini-list .t { font-size: 13px; font-weight: 550; }
.mini-list .m { font-size: 12px; color: var(--text-3); display: flex; gap: 6px; align-items: center; margin-top: 2px; }

/* ---------- Gelen kutusu ---------- */
.mention { display: grid; grid-template-columns: 24px minmax(0, 1fr) auto; gap: 12px; padding: 14px 16px; border-bottom: 1px solid var(--border); }
.mention:last-child { border-bottom: 0; }
.mention:hover { background: var(--surface-2); }
.mention .mh { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 12.5px; color: var(--text-3); }
.mention .mh b { color: var(--text); font-size: 13.5px; }
.mention .txt { white-space: pre-wrap; word-break: break-word; margin-top: 6px; max-height: 120px; overflow: hidden; color: var(--text); }
.mention .acts { display: flex; gap: 6px; align-items: flex-start; }

/* ---------- Grafikler ---------- */
.bars .bar { display: grid; grid-template-columns: minmax(90px, 160px) 1fr 44px; gap: 10px; align-items: center; margin: 9px 0; font-size: 13px; }
.bars .bar span { color: var(--text-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bars .track { background: var(--surface-3); height: 8px; border-radius: 99px; overflow: hidden; }
.bars .fill { background: var(--accent); height: 100%; border-radius: 99px; }
.bars b { text-align: right; font-variant-numeric: tabular-nums; font-weight: 600; }
.chart { display: flex; align-items: flex-end; gap: 6px; height: 140px; padding-top: 8px; }
.chart .col { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 4px; height: 100%; justify-content: flex-end; }
.chart .colbar { width: 100%; max-width: 28px; background: var(--accent); opacity: .85; border-radius: 4px 4px 0 0; min-height: 2px; }
.chart .col:hover .colbar { opacity: 1; }
.chart .col small { font-size: 10.5px; color: var(--text-3); }
.chart .col .n { font-size: 11px; color: var(--text-2); font-weight: 600; }
.sync-list .it { display: flex; gap: 10px; align-items: flex-start; padding: 8px 0; border-bottom: 1px solid var(--border); }
.sync-list .it:last-child { border-bottom: 0; }
.status-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--text-3); margin-top: 6px; flex-shrink: 0; }
.status-dot.ok { background: #12b76a; }
.status-dot.bad { background: #f04438; }

/* ---------- Ayarlar ---------- */
.settings { display: grid; grid-template-columns: 210px minmax(0, 1fr); gap: 20px; align-items: start; }
.subnav { display: flex; flex-direction: column; gap: 2px; position: sticky; top: 0; }
.subnav a { padding: 8px 12px; border-radius: var(--radius); color: var(--text-2); font-weight: 550; font-size: 13.5px; text-decoration: none; display: flex; align-items: center; gap: 8px; }
.subnav a:hover { background: var(--surface-3); color: var(--text); }
.subnav a.on { background: var(--surface); color: var(--text); box-shadow: var(--shadow-sm); border: 1px solid var(--border); }
.conn-card { margin-bottom: 14px; }
.conn-card .card-head .ch-ic { width: 26px; height: 26px; font-size: 11px; border-radius: 7px; }
.switch { position: relative; width: 36px; height: 20px; flex-shrink: 0; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch span { position: absolute; inset: 0; background: var(--border-strong); border-radius: 99px; cursor: pointer; transition: background .15s; }
.switch span::after { content: ""; position: absolute; width: 16px; height: 16px; left: 2px; top: 2px; background: #fff; border-radius: 50%; transition: transform .15s; box-shadow: 0 1px 2px rgba(0,0,0,.2); }
.switch input:checked + span { background: var(--accent); }
.switch input:checked + span::after { transform: translateX(16px); }
.switch input:focus-visible + span { box-shadow: 0 0 0 3px var(--focus); }
.codebox { background: #0b1220; color: #d0d8e8; padding: 12px 14px; border-radius: var(--radius); font: 12px/1.6 var(--mono); white-space: pre-wrap; word-break: break-all; }
.callout { display: flex; gap: 10px; padding: 10px 12px; border-radius: var(--radius); background: var(--surface-2); border: 1px solid var(--border); font-size: 13px; color: var(--text-2); margin-bottom: 12px; }
.callout > div { min-width: 0; overflow-wrap: anywhere; }
.callout.ok { background: var(--green-soft); border-color: transparent; color: var(--green); }
.callout.warn { background: var(--amber-soft); border-color: transparent; color: var(--amber); }

/* ---------- Modal, menü, toast ---------- */
.overlay { position: fixed; inset: 0; background: rgba(12, 17, 29, .55); display: grid; place-items: center; z-index: 60; padding: 20px; animation: fade .12s ease-out; }
.modal { background: var(--surface); border-radius: var(--radius-lg); width: min(600px, 100%); max-height: 90vh; display: flex; flex-direction: column; box-shadow: var(--shadow-lg); border: 1px solid var(--border); animation: pop .14s ease-out; }
.modal.wide { width: min(820px, 100%); }
.modal-head { display: flex; align-items: center; gap: 10px; padding: 16px 20px; border-bottom: 1px solid var(--border); }
.modal-head h3 { font-size: 16px; font-weight: 650; flex: 1; }
.modal-body { padding: 18px 20px; overflow-y: auto; }
.modal-foot { padding: 12px 20px; border-top: 1px solid var(--border); display: flex; justify-content: flex-end; gap: 8px; }
.menu { position: fixed; z-index: 70; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-lg); padding: 4px; min-width: 240px; max-width: 360px; max-height: 360px; overflow-y: auto; animation: pop .1s ease-out; }
.menu input.input { height: 30px; margin-bottom: 4px; }
.menu button { display: block; width: 100%; text-align: left; border: 0; background: none; padding: 8px 10px; border-radius: var(--radius-sm); cursor: pointer; }
.menu button:hover, .menu button.hl { background: var(--surface-3); }
.menu button b { display: block; font-size: 13px; font-weight: 600; }
.menu button small { display: block; color: var(--text-3); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#toasts { position: fixed; right: 20px; bottom: 20px; display: flex; flex-direction: column; gap: 8px; z-index: 90; }
.toast { display: flex; align-items: flex-start; gap: 10px; min-width: 260px; max-width: 420px; background: var(--text); color: var(--surface); padding: 11px 14px; border-radius: var(--radius); box-shadow: var(--shadow-lg); font-size: 13.5px; animation: pop .14s ease-out; }
:root[data-theme="dark"] .toast { background: #f2f4f7; color: #101828; }
.toast.err { background: #b42318; color: #fff; }
.toast svg { margin-top: 2px; }
@keyframes fade { from { opacity: 0; } }
@keyframes pop { from { opacity: 0; transform: translateY(4px) scale(.98); } }
.skeleton { background: linear-gradient(90deg, var(--surface-3), var(--surface-2), var(--surface-3)); background-size: 200% 100%; animation: shimmer 1.2s infinite; border-radius: 6px; height: 14px; }
@keyframes shimmer { to { background-position: -200% 0; } }
.shortcuts { display: grid; grid-template-columns: 1fr auto; gap: 8px 20px; font-size: 13.5px; }

/* ---------- Giriş ---------- */
.login { min-height: 100vh; display: grid; grid-template-columns: 1fr 1fr; }
.login-art { background: var(--side-bg); color: #e5e7eb; padding: 48px; display: flex; flex-direction: column; justify-content: space-between; }
.login-art h2 { font-size: 28px; font-weight: 650; letter-spacing: -.02em; line-height: 1.25; max-width: 420px; color: #fff; }
.login-art ul { list-style: none; padding: 0; margin: 24px 0 0; display: grid; gap: 12px; color: #a3acbb; }
.login-art li { display: flex; gap: 10px; align-items: center; }
.login-art li svg { color: var(--accent); }
.login-form { display: grid; place-items: center; padding: 24px; background: var(--surface); }
.login-form form { width: min(360px, 100%); }
.login-form h1 { font-size: 22px; font-weight: 650; margin-bottom: 4px; }
.login-form p { color: var(--text-2); margin-bottom: 24px; }
.err-msg { color: var(--red); font-size: 13px; min-height: 20px; margin-bottom: 8px; }

/* ---------- Duyarlı ---------- */
@media (max-width: 1180px) {
  .detail { grid-template-columns: minmax(0, 1fr) 300px; }
  .cols-3 { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 960px) {
  .app { grid-template-columns: 1fr; height: auto; min-height: 100vh; }
  .side { display: none; }
  .side.open { display: flex; position: fixed; inset: 0 auto 0 0; width: 260px; z-index: 80; box-shadow: var(--shadow-lg); }
  .menu-toggle { display: inline-grid !important; }
  .page { overflow: visible; }
  .detail { grid-template-columns: minmax(0, 1fr); height: auto; }
  .convo { border-right: 0; }
  .thread { overflow: visible; }
  .cols-2, .cols-3 { grid-template-columns: minmax(0, 1fr); }
  .settings { grid-template-columns: minmax(0, 1fr); }
  .subnav { flex-direction: row; overflow-x: auto; position: static; }
  .login { grid-template-columns: 1fr; }
  .login-art { display: none; }
}
@media (max-width: 640px) {
  .page-inner { padding: 16px; }
  .topbar { padding: 0 12px; }
  .sync-pill, .search kbd { display: none; }
  .hide-sm { display: none; }
  .form-grid { grid-template-columns: 1fr; }
  .mention { grid-template-columns: 1fr; }
  .mention > :first-child { display: none; }
}
.menu-toggle { display: none !important; }
