/* ════════════════════════════════════════════════════════════════════════
   Hiber tasarım sistemi — projedeki TEK CSS.
   Bölümler kendi CSS'ini, satır içi style'ı ve sabit rengi yazamaz (check-boundaries).
   Renk yalnız buradaki değişkenlerden: var(--…). Açık/koyu tema: html[data-theme].
   ════════════════════════════════════════════════════════════════════════ */

:root {
  --bg: #f4f5f7;
  --surface: #ffffff;
  --surface-2: #f7f8fa;
  --surface-3: #eef0f3;
  --border: #e3e6eb;
  --border-strong: #cfd4dc;
  --text: #161b22;
  --text-2: #3d4654;
  --text-muted: #6b7686;
  --primary: #2563eb;
  --primary-soft: #2563eb14;
  --primary-text: #ffffff;
  --success: #16834a;
  --success-soft: #16834a14;
  --warning: #a16207;
  --warning-soft: #a1620714;
  --danger: #d1242f;
  --danger-soft: #d1242f12;
  --accent-1: #2563eb; --accent-2: #7c3aed; --accent-3: #0d9488; --accent-4: #ea580c; --accent-5: #db2777; --accent-6: #0891b2;
  --focus: #2563eb55;
  --shadow-sm: 0 1px 2px #1018280d;
  --shadow: 0 1px 2px #1018280a, 0 4px 16px #10182810;
  --shadow-lg: 0 12px 40px #10182826;
  --radius: 12px;
  --radius-sm: 8px;
  --gap: 16px;
  --sidebar: 248px;
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", sans-serif;
  --mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, monospace;
  color-scheme: light;
}
:root[data-theme="dark"] {
  --bg: #0b0e13;
  --surface: #12161d;
  --surface-2: #161b23;
  --surface-3: #1c222c;
  --border: #232a35;
  --border-strong: #313a48;
  --text: #e7ebf1;
  --text-2: #c2cad6;
  --text-muted: #8691a2;
  --primary: #5b8def;
  --primary-soft: #5b8def1f;
  --primary-text: #0b1220;
  --success: #3fb97a;
  --success-soft: #3fb97a1c;
  --warning: #e0a63a;
  --warning-soft: #e0a63a1c;
  --danger: #f2555a;
  --danger-soft: #f2555a1c;
  --accent-1: #5b8def; --accent-2: #a78bfa; --accent-3: #2dd4bf; --accent-4: #fb923c; --accent-5: #f472b6; --accent-6: #38bdf8;
  --focus: #5b8def66;
  --shadow-sm: 0 1px 2px #00000040;
  --shadow: 0 1px 2px #00000040, 0 6px 20px #00000033;
  --shadow-lg: 0 16px 48px #00000080;
  color-scheme: dark;
}

/* ── Temel ─────────────────────────────────────────── */
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { background: var(--bg); color: var(--text); font: 14px/1.5 var(--font); -webkit-font-smoothing: antialiased; }
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { margin: 0; line-height: 1.25; letter-spacing: -.01em; }
h1 { font-size: 22px; font-weight: 650; }
h2 { font-size: 15px; font-weight: 600; }
h3 { font-size: 14px; font-weight: 600; }
code, .mono { font-family: var(--mono); font-size: 12.5px; }
.muted { color: var(--text-muted); }
.small { font-size: 12.5px; }
.num { font-variant-numeric: tabular-nums; }
.hidden { display: none !important; }
.icon { flex: none; display: block; }
::selection { background: var(--primary-soft); }

/* ── Kabuk ─────────────────────────────────────────── */
.shell { display: grid; grid-template-columns: var(--sidebar) 1fr; min-height: 100vh;
  /* kenar çubuğu sütunu sayfa boyunca uzansın (sticky menü kısa kalsa da) */
  background: linear-gradient(90deg, var(--surface) calc(var(--sidebar) - 1px), var(--border) calc(var(--sidebar) - 1px) var(--sidebar), transparent var(--sidebar)); }
.sidebar { background: var(--surface); border-right: 1px solid var(--border); padding: 18px 12px; display: flex; flex-direction: column; gap: 2px; position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.brand { font-weight: 700; font-size: 15px; padding: 2px 10px 18px; display: flex; align-items: center; gap: 10px; letter-spacing: -.01em; }
.brand-mark { width: 28px; height: 28px; border-radius: 8px; background: linear-gradient(135deg, var(--accent-1), var(--accent-2)); display: grid; place-items: center; color: var(--primary-text); font-weight: 800; font-size: 14px; }
.brand-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--primary); }
.nav-label { font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--text-muted); padding: 14px 10px 6px; }
.nav-link { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: var(--radius-sm); color: var(--text-2); font-weight: 500; }
.nav-link .icon { color: var(--text-muted); }
.nav-link:hover { background: var(--surface-3); color: var(--text); text-decoration: none; }
.nav-link.active { background: var(--primary-soft); color: var(--primary); }
.nav-link.active .icon { color: var(--primary); }
.sidebar-foot { margin-top: auto; display: flex; flex-direction: column; gap: 2px; padding-top: 12px; border-top: 1px solid var(--border); }
.sidebar-foot .nav-link { background: none; border: 0; font: inherit; font-weight: 500; cursor: pointer; text-align: left; width: 100%; }
.main { padding: 28px 32px 48px; width: 100%; min-width: 0; } /* tam ekran genişliği (sınır yok) */
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: var(--gap); margin-bottom: 22px; flex-wrap: wrap; }
.page-sub { margin: 6px 0 0; color: var(--text-muted); max-width: 760px; }

@media (max-width: 860px) {
  .shell { grid-template-columns: 1fr; background: none; }
  .sidebar { position: static; height: auto; flex-direction: row; flex-wrap: wrap; border-right: 0; border-bottom: 1px solid var(--border); }
  .nav-label { display: none; }
  .sidebar-foot { margin-top: 0; border-top: 0; padding-top: 0; flex-direction: row; }
  .main { padding: 18px 16px 40px; }
}

/* ── Düğmeler ve girdiler ──────────────────────────── */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; border: 1px solid var(--border-strong); background: var(--surface); color: var(--text); padding: 7px 13px; border-radius: var(--radius-sm); font: inherit; font-weight: 500; cursor: pointer; white-space: nowrap; transition: background .12s, border-color .12s; box-shadow: var(--shadow-sm); }
.btn:hover { background: var(--surface-3); }
.btn:focus-visible, .input:focus, .icon-btn:focus-visible, .list-row:focus-visible { outline: 3px solid var(--focus); outline-offset: 1px; }
.btn-primary { background: var(--primary); border-color: var(--primary); color: var(--primary-text); }
.btn-primary:hover { background: var(--primary); filter: brightness(1.08); }
.btn-ghost { background: transparent; border-color: transparent; box-shadow: none; }
.btn-ghost:hover { background: var(--surface-3); }
.btn-danger { color: var(--danger); }
.btn-sm { padding: 5px 10px; font-size: 13px; }
.btn:disabled, .icon-btn:disabled { opacity: .5; cursor: not-allowed; }
.is-busy .icon { animation: spin .9s linear infinite; }
.icon-btn { display: inline-grid; place-items: center; width: 32px; height: 32px; border-radius: var(--radius-sm); border: 1px solid transparent; background: transparent; color: var(--text-muted); cursor: pointer; }
.icon-btn:hover { background: var(--surface-3); color: var(--text); }
@keyframes spin { to { transform: rotate(360deg); } }

.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-size: 12.5px; font-weight: 500; color: var(--text-2); }
.input { width: 100%; border: 1px solid var(--border-strong); background: var(--surface); color: var(--text); border-radius: var(--radius-sm); padding: 8px 11px; font: inherit; }
.input::placeholder { color: var(--text-muted); }
.check { display: flex; gap: 8px; align-items: center; font-size: 13px; color: var(--text-2); }

/* ── Yüzeyler ──────────────────────────────────────── */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px 20px; box-shadow: var(--shadow-sm); }
.panel { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-sm); }
.panel + .panel { margin-top: 20px; }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 20px; border-bottom: 1px solid var(--border); flex-wrap: wrap; }
.panel-head h2 { display: flex; align-items: center; gap: 10px; }
/* Panel içindeki açıklama / boş liste metni: başlık ve tabloyla aynı iç boşluk. */
.panel-note { margin: 0; padding: 12px 20px; }
.panel-foot { padding: 12px 20px; border-top: 1px solid var(--border); background: var(--surface-2); border-radius: 0 0 var(--radius) var(--radius); }
.grid { display: grid; gap: var(--gap); grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.stack { display: flex; flex-direction: column; gap: var(--gap); }
.row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }

/* İstatistik şeridi */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; margin-bottom: 20px; }
.stat { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 16px; box-shadow: var(--shadow-sm); display: flex; gap: 12px; align-items: center; min-width: 0; }
.stat > div { min-width: 0; }
.stat-icon { width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; background: var(--primary-soft); color: var(--primary); flex: none; }
.stat-icon.ok { background: var(--success-soft); color: var(--success); }
.stat-icon.bad { background: var(--danger-soft); color: var(--danger); }
.stat-icon.warn { background: var(--warning-soft); color: var(--warning); }
.stat-value { font-size: 20px; font-weight: 650; font-variant-numeric: tabular-nums; letter-spacing: -.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stat-label { color: var(--text-muted); font-size: 12.5px; }

/* ── Kaynak listesi (bağlantılar vb.) ───────────────── */
.list { list-style: none; margin: 0; padding: 0; }
.list-item { border-bottom: 1px solid var(--border); }
.list-item:last-child { border-bottom: 0; }
.list-row { display: grid; grid-template-columns: 40px minmax(170px, 1.2fr) minmax(170px, 1.6fr) minmax(170px, 1.1fr) 116px 76px;
  grid-template-areas: "av main meta check status actions"; gap: 6px 16px; align-items: center; padding: 13px 20px; cursor: pointer; }
.list-row > .avatar { grid-area: av; }
.list-row > .list-main { grid-area: main; }
.list-row > .list-meta { grid-area: meta; }
.list-row > .list-check { grid-area: check; }
.list-row > .status { grid-area: status; }
.list-row > .list-actions { grid-area: actions; }
.list-row:hover { background: var(--surface-2); }
.list-item:last-child .list-row { border-radius: 0 0 var(--radius) var(--radius); }
.list-item.is-open > .list-row { background: var(--surface-2); }
.list-item.is-off .list-row { cursor: default; }
.list-item.is-off .avatar { filter: grayscale(1); opacity: .5; }
.list-main { min-width: 0; }
.list-title { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.list-sub { color: var(--text-muted); font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.list-meta { display: flex; flex-wrap: wrap; gap: 6px; min-width: 0; }
.list-actions { display: flex; align-items: center; gap: 2px; justify-content: flex-end; }
.list-detail { padding: 2px 20px 18px 76px; background: var(--surface-2); border-top: 1px dashed var(--border); }
@media (max-width: 1080px) {
  .list-row { grid-template-columns: 40px 1fr auto auto; grid-template-areas: "av main status actions" ". meta meta meta" ". check check check"; }
  .list-row > .list-meta:empty { display: none; }
  .list-detail { padding-left: 20px; }
}
.chev { color: var(--text-muted); transition: transform .15s; }
.list-item.is-open .chev { transform: rotate(90deg); }

.avatar { width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center; font-weight: 700; font-size: 13px; letter-spacing: .02em; color: var(--c); background: color-mix(in srgb, var(--c) 13%, transparent); border: 1px solid color-mix(in srgb, var(--c) 24%, transparent); }
.c1 { --c: var(--accent-1); } .c2 { --c: var(--accent-2); } .c3 { --c: var(--accent-3); } .c4 { --c: var(--accent-4); } .c5 { --c: var(--accent-5); } .c6 { --c: var(--accent-6); }

.chip { display: inline-flex; align-items: baseline; gap: 5px; max-width: 100%; padding: 2px 8px; border-radius: 6px; background: var(--surface-3); color: var(--text-2); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chip b { font-weight: 500; color: var(--text-muted); }
.chip code { font-size: 11.5px; line-height: 1.5; color: var(--text); overflow: hidden; text-overflow: ellipsis; }

.status { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 550; padding: 3px 10px 3px 8px; border-radius: 999px; white-space: nowrap; justify-self: start; }
.status::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.status-ok { color: var(--success); background: var(--success-soft); }
.status-bad { color: var(--danger); background: var(--danger-soft); }
.status-warn { color: var(--warning); background: var(--warning-soft); }
.status-off { color: var(--text-muted); background: var(--surface-3); }

.list-check { font-size: 12.5px; color: var(--text-muted); display: flex; align-items: center; gap: 6px; min-width: 0; }
.list-check span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.list-check.ok .icon { color: var(--success); }
.list-check.bad, .list-check.bad .icon { color: var(--danger); }

/* Açılır menü (details/summary) */
.menu { position: relative; }
.menu > summary { list-style: none; }
.menu > summary::-webkit-details-marker { display: none; }
.menu-list { position: absolute; right: 0; top: calc(100% + 4px); z-index: 20; min-width: 220px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm); box-shadow: var(--shadow-lg); padding: 4px; }
.menu-item { display: flex; align-items: center; gap: 9px; width: 100%; padding: 8px 10px; border: 0; background: none; color: var(--text); font: inherit; text-align: left; border-radius: 6px; cursor: pointer; }
.menu-item:hover { background: var(--surface-3); }
.menu-item .icon { color: var(--text-muted); }
.menu-item.danger, .menu-item.danger .icon { color: var(--danger); }
.menu-sep { height: 1px; background: var(--border); margin: 4px 2px; }

/* Anahtar-değer ızgarası */
.kv { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 14px 24px; margin: 0; padding-top: 14px; }
.kv > div { min-width: 0; }
.kv dt { font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--text-muted); margin-bottom: 3px; }
.kv dd { margin: 0; overflow-wrap: anywhere; }
.note { font-size: 12.5px; color: var(--text-muted); margin-top: 8px; }
.note-bad { color: var(--danger); }
.callout { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border-radius: var(--radius-sm); border: 1px solid var(--border); background: var(--surface); margin-top: 14px; font-size: 13px; }
.callout.bad { border-color: color-mix(in srgb, var(--danger) 35%, transparent); background: var(--danger-soft); color: var(--danger); }
.callout.ok { border-color: color-mix(in srgb, var(--success) 35%, transparent); background: var(--success-soft); }

.copy-row { display: flex; gap: 6px; align-items: center; min-width: 0; }
.copy-row .input { font-family: var(--mono); font-size: 12.5px; background: var(--surface-2); }
.inline-copy { display: inline-flex; align-items: center; gap: 2px; max-width: 100%; }
.inline-copy code { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.inline-copy .icon-btn { width: 24px; height: 24px; }

/* ── Tablo, rozet, uyarı ───────────────────────────── */
.table { width: 100%; border-collapse: collapse; }
.table th, .table td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--border); vertical-align: top; }
.table th { font-size: 11.5px; color: var(--text-muted); font-weight: 600; text-transform: uppercase; letter-spacing: .05em; background: var(--surface-2); }
.table tr:hover td { background: var(--surface-2); }
.badge { display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: 12px; border: 1px solid var(--border-strong); color: var(--text-2); }
.badge-ok { color: var(--success); border-color: color-mix(in srgb, var(--success) 45%, transparent); background: var(--success-soft); }
.badge-warn { color: var(--warning); border-color: color-mix(in srgb, var(--warning) 45%, transparent); background: var(--warning-soft); }
.badge-bad { color: var(--danger); border-color: color-mix(in srgb, var(--danger) 45%, transparent); background: var(--danger-soft); }
.alert { padding: 10px 12px; border-radius: var(--radius-sm); border: 1px solid color-mix(in srgb, var(--danger) 40%, transparent); color: var(--danger); background: var(--danger-soft); font-size: 13px; }

/* ── Bildirim ──────────────────────────────────────── */
.toasts { position: fixed; right: 20px; bottom: 20px; display: flex; flex-direction: column; gap: 8px; z-index: 1000; }
.toast { background: var(--surface); border: 1px solid var(--border); border-left: 3px solid var(--primary); border-radius: var(--radius-sm); padding: 11px 14px; box-shadow: var(--shadow-lg); max-width: 400px; font-size: 13px; animation: toast-in .18s ease-out; }
.toast-error { border-left-color: var(--danger); }
.toast-success { border-left-color: var(--success); }
@keyframes toast-in { from { transform: translateY(8px); opacity: 0; } }

/* ── İletişim penceresi ────────────────────────────── */
.dialog { border: 1px solid var(--border); border-radius: 14px; background: var(--surface); color: var(--text); padding: 0; width: min(520px, calc(100vw - 32px)); box-shadow: var(--shadow-lg); }
.dialog::backdrop { background: color-mix(in srgb, var(--bg) 60%, transparent); backdrop-filter: blur(3px); }
.dialog-wide { width: min(860px, calc(100vw - 32px)); }
.dialog-head { display: flex; gap: 12px; align-items: center; padding: 20px 22px 0; }
.dialog-head h2 { font-size: 16px; }
.dialog-body { padding: 16px 22px 20px; display: flex; flex-direction: column; gap: 14px; }
.dialog-foot { display: flex; justify-content: flex-end; gap: 8px; padding: 14px 22px; border-top: 1px solid var(--border); background: var(--surface-2); border-radius: 0 0 14px 14px; }
.form-stack { display: flex; flex-direction: column; gap: 14px; }
.form-help { font-size: 12px; color: var(--text-muted); }

/* ── Giriş ─────────────────────────────────────────── */
.auth-page { min-height: 100vh; display: grid; place-items: center; padding: 16px; }
.auth-card { width: 100%; max-width: 380px; }
.auth-card form { display: flex; flex-direction: column; gap: 12px; margin-top: 12px; }
.auth-card-wide { max-width: 440px; }
.auth-step { font-size: 13px; color: var(--text-2); margin: 0; }
/* QR kod her temada beyaz zemin + siyah modül (tarayıcı uygulamaları ters rengi okumaz) */
.qr-code { display: block; width: 210px; height: 210px; margin: 4px auto; border-radius: 8px; }
.qr-code .qr-bg { fill: #ffffff; }
.qr-code .qr-fg { fill: #000000; }
.secret-key { font-family: var(--font-mono, ui-monospace, monospace); font-size: 13px; letter-spacing: .08em; word-break: break-all; padding: 8px 10px; border: 1px dashed var(--border-strong); border-radius: var(--radius-sm); text-align: center; user-select: all; }
.temp-password { font-family: var(--font-mono, ui-monospace, monospace); font-size: 18px; letter-spacing: .06em; text-align: center; padding: 12px; border: 1px dashed var(--border-strong); border-radius: var(--radius-sm); user-select: all; }

/* ── Kart düzeni (katalog/genel durum) ─────────────── */
.section-title { margin: 28px 0 12px; display: flex; align-items: baseline; gap: 10px; }
.card-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; margin-bottom: 10px; }
.card-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }

/* ── Yardımcılar (satır içi style yerine) ──────────── */
.mt { margin-top: var(--gap); }
.mt-lg { margin-top: 24px; }
.w-sm { max-width: 360px; }

/* ── Araç çubuğu, sayfalama ────────────────────────── */
.toolbar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding: 12px 20px; border-bottom: 1px solid var(--border); }
.toolbar .input, .toolbar .select { width: auto; }
.toolbar .search { flex: 1 1 260px; min-width: 200px; }
.select { border: 1px solid var(--border-strong); background: var(--surface); color: var(--text); border-radius: var(--radius-sm); padding: 7px 10px; font: inherit; }
.pager { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; }

/* ── Ürün tablosu ──────────────────────────────────── */
.table-products td { vertical-align: middle; padding: 8px 12px; }
.table-products tr.is-active td { background: var(--primary-soft); }
.table-products .col-thumb { width: 64px; }
.table-products .col-actions { width: 84px; text-align: right; white-space: nowrap; }
.product-title { font-weight: 550; color: var(--text); cursor: pointer; display: block; }
.product-title:hover { color: var(--primary); }
.product-meta { font-size: 12px; color: var(--text-muted); display: flex; gap: 8px; flex-wrap: wrap; }
.thumb { width: 48px; height: 48px; border-radius: 8px; object-fit: contain; background: var(--surface); border: 1px solid var(--border); display: block; }
.thumb-btn { position: relative; padding: 0; border: 0; background: none; cursor: pointer; border-radius: 8px; }
.thumb-btn:hover .thumb { border-color: var(--primary); }
.thumb-count { position: absolute; right: -6px; bottom: -6px; min-width: 18px; height: 18px; padding: 0 4px; border-radius: 9px; background: var(--text); color: var(--surface); font-size: 11px; font-weight: 600; display: grid; place-items: center; }
.thumb-empty { width: 48px; height: 48px; border-radius: 8px; border: 1px dashed var(--border-strong); display: grid; place-items: center; color: var(--text-muted); }
.lang-badges { display: flex; gap: 4px; }
.lang-badge { font-size: 11px; font-weight: 600; text-transform: uppercase; padding: 1px 6px; border-radius: 5px; border: 1px solid var(--border-strong); color: var(--text-muted); }
.lang-badge.ok { color: var(--success); background: var(--success-soft); border-color: transparent; }
.lang-badge.missing { color: var(--danger); background: var(--danger-soft); border-color: transparent; }
.lang-badge.stale { color: var(--warning); background: var(--warning-soft); border-color: transparent; }

/* ── Sağ panel (düzenleyici) ───────────────────────── */
.drawer-backdrop { position: fixed; inset: 0; background: color-mix(in srgb, var(--bg) 45%, transparent); z-index: 50; }
.drawer { position: fixed; top: 0; right: 0; bottom: 0; width: min(860px, 100vw); background: var(--surface); border-left: 1px solid var(--border); box-shadow: var(--shadow-lg); z-index: 51; display: flex; flex-direction: column; animation: drawer-in .16s ease-out; }
@keyframes drawer-in { from { transform: translateX(24px); opacity: 0; } }
.drawer-head { display: flex; gap: 14px; align-items: center; padding: 16px 20px; border-bottom: 1px solid var(--border); }
.drawer-head h2 { font-size: 16px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.drawer-head .grow { flex: 1; min-width: 0; }
.drawer-body { flex: 1; overflow-y: auto; padding: 18px 20px 28px; }
.drawer-foot { display: flex; gap: 8px; align-items: center; padding: 12px 20px; border-top: 1px solid var(--border); background: var(--surface-2); }
.drawer-foot .grow { flex: 1; }
.tabs { display: flex; gap: 2px; padding: 0 20px; border-bottom: 1px solid var(--border); overflow-x: auto; }
.tab { border: 0; background: none; color: var(--text-muted); font: inherit; font-weight: 550; padding: 11px 12px; border-bottom: 2px solid transparent; cursor: pointer; white-space: nowrap; display: inline-flex; gap: 6px; align-items: center; }
.tab:hover { color: var(--text); }
.tab.active { color: var(--primary); border-bottom-color: var(--primary); }
.tab .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--warning); }
.form-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px 16px; }
.editor-area { min-height: 380px; }
.switch { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; user-select: none; }
.switch input { appearance: none; width: 36px; height: 20px; border-radius: 10px; background: var(--border-strong); position: relative; cursor: pointer; transition: background .15s; margin: 0; }
.switch input::after { content: ""; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: var(--surface); transition: transform .15s; }
.switch input:checked { background: var(--success); }
.switch input:checked::after { transform: translateX(16px); }
.image-strip { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.history-item { padding: 10px 0; border-bottom: 1px solid var(--border); font-size: 13px; }
.history-item:last-child { border-bottom: 0; }
.history-diff { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 6px; }
.history-diff div { background: var(--surface-2); border-radius: 6px; padding: 6px 8px; max-height: 120px; overflow: auto; font-size: 12px; overflow-wrap: anywhere; }

/* ── Görsel düzenleme (sürükle-bırak) ──────────────── */
.image-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(128px, 1fr)); gap: 12px; }
.image-tile { position: relative; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); padding: 6px; cursor: grab; transition: border-color .12s, transform .12s; }
.image-tile img { width: 100%; aspect-ratio: 1; object-fit: contain; display: block; border-radius: 6px; pointer-events: none; }
.image-tile.is-dragging { opacity: .4; }
.image-tile.is-over { border-color: var(--primary); transform: scale(1.03); }
.image-tile .tile-index { position: absolute; left: 8px; top: 8px; font-size: 11px; font-weight: 600; padding: 1px 6px; border-radius: 5px; background: var(--surface); border: 1px solid var(--border); }
.image-tile .tile-main { background: var(--primary); color: var(--primary-text); border-color: var(--primary); }
.image-tile .tile-remove { position: absolute; right: 6px; top: 6px; width: 26px; height: 26px; background: var(--surface); border: 1px solid var(--border); }
.image-tile .tile-remove:hover { color: var(--danger); }
.dropzone { border: 2px dashed var(--border-strong); border-radius: 10px; padding: 18px; text-align: center; color: var(--text-muted); cursor: pointer; transition: border-color .12s, background .12s; }
.dropzone.is-over { border-color: var(--primary); background: var(--primary-soft); color: var(--primary); }
.spacer { flex: 1; }
.table-scroll { overflow-x: auto; }
.dropzone .icon { margin: 0 auto 6px; }
.dropzone-sm { padding: 12px; }
.stack-xs { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.row-tight { display: flex; gap: 2px; align-items: center; }
.input-sm { padding: 5px 9px; font-size: 13px; width: auto; }
.icon-up .icon { transform: rotate(-90deg); }
.icon-down .icon { transform: rotate(90deg); }

/* Ürün belgeleri (PDF) listesi */
.doc-list { display: flex; flex-direction: column; border: 1px solid var(--border); border-radius: var(--radius-sm); }
.doc-row { display: flex; gap: 10px; align-items: center; padding: 8px 10px; border-bottom: 1px solid var(--border); }
.doc-row:last-child { border-bottom: 0; }
.doc-row .grow { flex: 1; min-width: 0; }
.doc-row .field-row .input-sm.grow { flex: 1; min-width: 0; width: 100%; }
.doc-list > .small { padding: 10px; }
.doc-icon { flex: none; display: grid; place-items: center; width: 34px; height: 40px; border-radius: 4px; background: var(--danger-soft, var(--surface-3)); color: var(--danger); font-size: 10px; font-weight: 700; letter-spacing: .03em; }

/* ── Katalog: SEO/meta alanları, AI pencereleri ───── */
.field-row { display: flex; gap: 8px; align-items: stretch; }
.field-row .input { flex: 1; min-width: 0; }
.field-head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.counter { font-size: 11.5px; color: var(--text-muted); font-variant-numeric: tabular-nums; }
.counter.over { color: var(--danger); font-weight: 600; }
.input.mono { font-family: var(--mono); font-size: 12.5px; }
textarea.input { resize: vertical; min-height: 64px; line-height: 1.45; }
.prompt-area { min-height: 300px; font-family: var(--mono); font-size: 12.5px; }
.ai-bar { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; padding: 8px 10px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface-2); }
.ai-steps { display: flex; flex-direction: column; gap: 6px; margin: 6px 0; }
.ai-step { display: flex; gap: 8px; align-items: center; font-size: 13px; color: var(--text-muted); }
.ai-step.done { color: var(--success); }
.ai-step.active { color: var(--primary); font-weight: 550; }
.ai-step.active .icon { animation: spin 1.4s linear infinite; }
.ai-bg { display: flex; flex-direction: column; gap: 4px; margin-top: 10px; padding: 10px 12px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface-2); }

/* Arka plan işleri kutusu (sayfanın sol altında; düzenleyici açıkken de tıklanabilir) */
.jobs-tray { position: fixed; left: calc(var(--sidebar) + 20px); bottom: 20px; z-index: 52; width: min(380px, calc(100vw - 32px)); background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-lg); }
.jobs-tray-head { display: flex; align-items: center; gap: 8px; width: 100%; padding: 10px 14px; border: 0; background: transparent; color: var(--text); font: inherit; font-weight: 600; cursor: pointer; text-align: left; }
.jobs-tray-head .grow { flex: 1; }
.jobs-tray-list { max-height: 50vh; overflow-y: auto; border-top: 1px solid var(--border); }
.jobs-tray.is-collapsed .jobs-tray-list { display: none; }
.job-item { display: flex; flex-direction: column; gap: 6px; padding: 10px 14px; border-bottom: 1px solid var(--border); }
.job-item:last-child { border-bottom: 0; }
.job-item-top { display: flex; gap: 8px; align-items: flex-start; }
.job-item-top .grow { flex: 1; min-width: 0; }
.job-item-title { font-weight: 550; font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.job-item-state { font-size: 12px; color: var(--text-muted); display: flex; gap: 6px; align-items: center; }
.job-item-state.running { color: var(--primary); }
.job-item-state.running .icon { animation: spin 1.4s linear infinite; }
.job-item-state.ready { color: var(--warning); }
.job-item-state.applied { color: var(--success); }
.job-item-state.failed { color: var(--danger); }
.job-progress { appearance: none; display: block; width: 100%; height: 4px; border: 0; border-radius: 2px; background: var(--surface-3); overflow: hidden; }
.job-progress::-webkit-progress-bar { background: var(--surface-3); }
.job-progress::-webkit-progress-value { background: var(--primary); transition: width .4s; }
.job-progress::-moz-progress-bar { background: var(--primary); }
.job-item-actions { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
@media (max-width: 900px) { .jobs-tray { left: 16px; bottom: 16px; } }
.suggestion { border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 10px 12px; display: flex; gap: 12px; align-items: flex-start; }
.suggestion:hover { border-color: var(--primary); }
.suggestion .grow { flex: 1; min-width: 0; }
.suggestion-names { display: grid; grid-template-columns: 34px 1fr; gap: 2px 8px; font-size: 13px; }
.suggestion-names b { color: var(--text-muted); font-weight: 600; text-transform: uppercase; font-size: 11px; padding-top: 2px; }
.score { min-width: 46px; text-align: center; border-radius: 8px; padding: 4px 6px; background: var(--surface-3); font-weight: 650; font-variant-numeric: tabular-nums; }
.score small { display: block; font-weight: 500; font-size: 10.5px; color: var(--text-muted); }
.score.best { background: var(--success-soft); color: var(--success); }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.compare { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.compare > div { min-width: 0; }
.compare-box { background: var(--surface-2); border: 1px solid var(--border); border-radius: 6px; padding: 8px 10px; font-size: 13px; overflow-wrap: anywhere; }
.compare-box.after { border-color: color-mix(in srgb, var(--success) 40%, transparent); }
.preview-frame { width: 100%; min-height: 320px; border: 1px solid var(--border); border-radius: 6px; background: var(--surface); }
.agent-layout { display: grid; grid-template-columns: 200px 1fr; gap: 18px; min-height: 420px; }
.agent-nav { display: flex; flex-direction: column; gap: 2px; border-right: 1px solid var(--border); padding-right: 12px; }
.agent-nav button { text-align: left; border: 0; background: none; font: inherit; color: var(--text-2); padding: 8px 10px; border-radius: 6px; cursor: pointer; display: flex; justify-content: space-between; gap: 6px; align-items: center; }
.agent-nav button:hover { background: var(--surface-2); }
.agent-nav button.active { background: var(--primary-soft); color: var(--primary); font-weight: 550; }
.agent-nav .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--border-strong); flex: none; }
.agent-nav .dot.ok { background: var(--success); }
.agent-nav .dot.warn { background: var(--warning); }
.tile-badge { position: absolute; left: 8px; bottom: 8px; font-size: 10.5px; font-weight: 600; padding: 1px 6px; border-radius: 5px; background: var(--surface); border: 1px solid var(--border); }
.tile-badge.good { color: var(--success); }
.tile-badge.medium { color: var(--warning); }
.tile-badge.low { color: var(--danger); }
.tile-fix { position: absolute; right: 6px; bottom: 6px; }
.cat-fix-log { max-height: 260px; overflow-y: auto; margin: 0; padding-left: 18px; }
.dialog-xl { width: min(1080px, calc(100vw - 32px)); }
@media (max-width: 720px) { .agent-layout { grid-template-columns: 1fr; } .agent-nav { border-right: 0; padding-right: 0; flex-direction: row; overflow-x: auto; } .compare { grid-template-columns: 1fr; } }

/* ── WhatsApp gelen kutusu ─────────────────────────────────────────────── */
.wa-shell { display: grid; grid-template-columns: 340px 1fr; grid-template-rows: minmax(0, 1fr); height: calc(100vh - 210px); min-height: 520px; overflow: hidden; }
.wa-shell > * { min-height: 0; }
.wa-shell.has-info { grid-template-columns: 340px 1fr 320px; }
.wa-side { display: flex; flex-direction: column; border-right: 1px solid var(--border); min-width: 0; }
.wa-side-tools { display: flex; gap: 8px; padding: 12px; border-bottom: 1px solid var(--border); }
.wa-side-tools .input { flex: 1; min-width: 0; }
.wa-list { flex: 1; overflow-y: auto; }
.wa-conv { display: flex; gap: 10px; width: 100%; padding: 10px 12px; border: 0; border-bottom: 1px solid var(--border); background: transparent; color: var(--text); font: inherit; text-align: left; cursor: pointer; }
.wa-conv:hover { background: var(--surface-2); }
.wa-conv.active { background: var(--primary-soft); }
.wa-conv-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.wa-conv-top { display: flex; gap: 8px; align-items: baseline; }
.wa-conv-top strong { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.wa-conv-top time { font-size: 11.5px; color: var(--text-muted); white-space: nowrap; }
.wa-preview { font-size: 13px; color: var(--text-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wa-unread { align-self: center; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; background: var(--success); color: var(--surface); font-size: 11.5px; font-weight: 700; display: grid; place-items: center; }
.wa-avatar { flex: none; width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: 13px; color: var(--success); background: var(--success-soft); }
.wa-avatar-lg { width: 72px; height: 72px; font-size: 22px; }
.wa-site { display: inline-block; align-self: flex-start; font-size: 11px; padding: 1px 7px; border-radius: 999px; background: var(--surface-3); color: var(--text-2); }
.wa-site.site-hiber-com-tr { background: var(--primary-soft); color: var(--primary); }
.wa-site.site-hiberpcb-com { background: color-mix(in srgb, var(--accent-2) 14%, transparent); color: var(--accent-2); }
.wa-site.site-hiberbilisim-com-tr { background: color-mix(in srgb, var(--accent-3) 14%, transparent); color: var(--accent-3); }
.wa-empty { display: grid; place-items: center; text-align: center; color: var(--text-muted); padding: 40px 20px; height: 100%; }
.wa-empty .icon { margin: 0 auto 10px; }
.wa-chat { display: flex; flex-direction: column; min-width: 0; min-height: 0; }
/* Açık sohbet: başlık + akış (kayar) + yazma kutusu; akış dışındakiler sabit yükseklikte kalır. */
.wa-chat-active { flex: 1; display: flex; flex-direction: column; min-height: 0; }
.wa-chat-active > :not(.wa-stream) { flex: none; }
.wa-stream { min-height: 0; }
.wa-chat-head { display: flex; gap: 10px; align-items: center; padding: 10px 14px; border-bottom: 1px solid var(--border); }
.wa-chat-who { flex: 1; min-width: 0; display: flex; gap: 10px; align-items: center; border: 0; background: none; color: var(--text); font: inherit; text-align: left; cursor: pointer; padding: 0; }
.wa-chat-who span { display: flex; flex-direction: column; min-width: 0; }
.wa-chat-who strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wa-chat-who small { color: var(--text-muted); }
.wa-back { display: none; }
.wa-stream { flex: 1; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 6px; background: var(--surface-2); }
.wa-row { display: flex; }
.wa-row.out { justify-content: flex-end; }
.wa-bubble { max-width: min(560px, 78%); padding: 7px 10px 5px; border-radius: 10px; background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow-sm); overflow-wrap: anywhere; }
.wa-row.out .wa-bubble { background: color-mix(in srgb, var(--success) 12%, var(--surface)); border-color: color-mix(in srgb, var(--success) 25%, var(--border)); }
.wa-bubble p { margin: 0; white-space: pre-wrap; }
.wa-bubble footer { display: flex; gap: 6px; justify-content: flex-end; align-items: center; font-size: 11px; color: var(--text-muted); margin-top: 2px; }
.wa-tick.read { color: var(--primary); }
.wa-tick.failed { color: var(--danger); }
.wa-bubble-site { display: block; font-size: 11px; color: var(--text-muted); margin-bottom: 3px; }
.wa-msg-error { display: block; color: var(--danger); font-size: 11.5px; margin-top: 4px; }
.wa-media { display: flex; flex-direction: column; gap: 4px; margin-bottom: 4px; }
.wa-media img { max-width: 280px; max-height: 280px; border-radius: 8px; display: block; cursor: zoom-in; }
.wa-media img.is-sticker { max-width: 140px; background: transparent; }
.wa-media video { max-width: 320px; border-radius: 8px; }
.wa-media audio { max-width: 280px; }
.wa-media a.wa-dl { font-size: 12px; }
.wa-media-pending { font-size: 12.5px; color: var(--text-muted); display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.wa-doc { display: flex; gap: 8px; align-items: center; padding: 8px; border-radius: 8px; background: var(--surface-3); }
.wa-contact-card { display: flex; flex-direction: column; padding: 6px 8px; border-radius: 8px; background: var(--surface-3); margin-bottom: 4px; }
.wa-composer { display: flex; gap: 6px; align-items: flex-end; padding: 10px 12px; border-top: 1px solid var(--border); position: relative; }
.wa-composer textarea { flex: 1; min-height: 40px; max-height: 140px; resize: none; }
.wa-attach { display: flex; gap: 10px; align-items: center; padding: 8px 12px; border-top: 1px solid var(--border); background: var(--surface-2); font-size: 13px; }
.wa-attach img { width: 44px; height: 44px; object-fit: cover; border-radius: 6px; }
.wa-attach .grow { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wa-window { padding: 6px 14px 10px; font-size: 12px; color: var(--success); }
.wa-window.is-closed { color: var(--warning); }
.wa-emoji { position: absolute; bottom: 58px; left: 12px; z-index: 5; display: grid; grid-template-columns: repeat(8, 32px); gap: 2px; padding: 6px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm); box-shadow: var(--shadow-lg); }
.wa-emoji button { width: 32px; height: 32px; border: 0; background: none; font-size: 18px; cursor: pointer; border-radius: 6px; }
.wa-emoji button:hover { background: var(--surface-3); }
.wa-info { border-left: 1px solid var(--border); overflow-y: auto; min-width: 0; }
.wa-info-head { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-bottom: 1px solid var(--border); position: sticky; top: 0; background: var(--surface); z-index: 1; }
.wa-info-head strong { flex: 1; }
.wa-info-hero { text-align: center; padding: 18px 14px; border-bottom: 1px solid var(--border); display: flex; flex-direction: column; align-items: center; gap: 4px; }
.wa-info-hero h3 { margin: 6px 0 0; font-size: 16px; }
.wa-info-sec { padding: 12px 14px; border-bottom: 1px solid var(--border); display: flex; flex-direction: column; gap: 6px; }
.wa-info-sec h4 { margin: 0 0 2px; font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: var(--text-muted); }
.wa-info-row { display: grid; grid-template-columns: 1fr auto; gap: 2px 8px; align-items: center; font-size: 13px; }
.wa-info-row > span { color: var(--text-muted); font-size: 12px; grid-column: 1 / -1; }
.wa-info-row > strong { font-weight: 550; overflow-wrap: anywhere; }
.wa-info-media { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.wa-info-media img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 6px; cursor: zoom-in; }
.wa-info-file { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; aspect-ratio: 1; border-radius: 6px; background: var(--surface-3); font-size: 11px; color: var(--text-2); padding: 4px; text-align: center; overflow: hidden; }
.wa-lightbox { position: fixed; inset: 0; z-index: 200; background: color-mix(in srgb, var(--bg) 20%, black 80%); display: flex; flex-direction: column; }
.wa-lightbox-bar { display: flex; gap: 12px; align-items: center; padding: 10px 16px; color: var(--surface); }
.wa-lightbox-bar strong { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wa-lightbox-bar a, .wa-lightbox-bar button { color: inherit; }
.wa-lightbox-body { flex: 1; display: grid; place-items: center; padding: 10px; min-height: 0; }
.wa-lightbox-body img, .wa-lightbox-body video { max-width: 100%; max-height: calc(100vh - 80px); border-radius: 6px; }
.wa-live { display: inline-flex; align-items: center; gap: 6px; }
.wa-site-link { display: grid; grid-template-columns: 180px 1fr auto; gap: 8px; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--border); }
.wa-template { padding: 10px 12px; border: 1px solid var(--border); border-radius: var(--radius-sm); display: flex; flex-direction: column; gap: 4px; }
.wa-template p { margin: 0; white-space: pre-wrap; font-size: 13px; color: var(--text-2); }
.wa-templates { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 10px; }
@media (max-width: 1100px) { .wa-shell.has-info { grid-template-columns: 300px 1fr; } .wa-shell.has-info .wa-info { position: fixed; right: 0; top: 0; bottom: 0; width: min(360px, 100vw); background: var(--surface); z-index: 60; box-shadow: var(--shadow-lg); } }
@media (max-width: 760px) {
  .wa-shell, .wa-shell.has-info { grid-template-columns: 1fr; height: calc(100vh - 170px); }
  .wa-shell.is-chat .wa-side { display: none; }
  .wa-shell:not(.is-chat) .wa-chat { display: none; }
  .wa-back { display: inline-grid; }
  .wa-site-link { grid-template-columns: 1fr; }
}

/* WhatsApp: çeviri, ses, AI */
.wa-tr { margin-top: 4px; padding-top: 4px; border-top: 1px dashed var(--border-strong); font-size: 13px; color: var(--text-2); white-space: pre-wrap; }
.wa-tr small { display: block; font-size: 10.5px; color: var(--text-muted); text-transform: uppercase; letter-spacing: .04em; }
.wa-speak { border: 0; background: none; color: var(--text-muted); cursor: pointer; padding: 0 2px; display: inline-grid; place-items: center; }
.wa-speak:hover { color: var(--primary); }
.icon-btn.is-on { color: var(--primary); background: var(--primary-soft); }
.icon-btn.is-live { color: var(--danger); background: var(--danger-soft); animation: wa-pulse 1.2s ease-in-out infinite; }
@keyframes wa-pulse { 50% { opacity: .55; } }
.wa-lang { font-size: 11.5px; padding: 2px 8px; border-radius: 999px; background: var(--primary-soft); color: var(--primary); white-space: nowrap; }
.wa-agent { display: flex; flex-direction: column; gap: 12px; }
.wa-agent-head { display: flex; gap: 12px; align-items: flex-start; }
.wa-agent-head .grow { flex: 1; min-width: 0; }
.wa-agent textarea.prompt { min-height: 220px; font-family: var(--mono, ui-monospace, monospace); font-size: 12.5px; line-height: 1.5; }
.wa-agents { display: grid; gap: var(--gap); }
.wa-memory { white-space: pre-wrap; font-size: 13px; background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 8px 10px; max-height: 260px; overflow-y: auto; }

/* ── Sosyal medya (Instagram) ──────────────────────────────────────────── */
.sp-steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: var(--gap); margin-bottom: var(--gap); }
.sp-step { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
.sp-step > b { flex: none; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-3); color: var(--text-muted); font-size: 13px; }
.sp-step.is-ready > b { background: var(--success-soft); color: var(--success); }
.sp-step small { display: block; font-size: 11px; letter-spacing: .05em; color: var(--text-muted); text-transform: uppercase; }
.sp-grid { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: var(--gap); align-items: start; }
.sp-phone { border: 1px solid var(--border); border-radius: 22px; background: var(--surface); overflow: hidden; box-shadow: var(--shadow); position: sticky; top: 16px; }
.sp-phone-head { display: flex; gap: 10px; align-items: center; padding: 10px 12px; }
.sp-avatar { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; color: var(--accent-5); background: color-mix(in srgb, var(--accent-5) 14%, transparent); overflow: hidden; }
.sp-avatar img { width: 100%; height: 100%; object-fit: cover; }
.sp-media { aspect-ratio: 4 / 5; background: var(--surface-3); display: grid; place-items: center; color: var(--text-muted); text-align: center; font-size: 13px; }
.sp-media img, .sp-media video { width: 100%; height: 100%; object-fit: cover; }
.sp-media.ig-media-reel { aspect-ratio: 9 / 16; }
.sp-caption { padding: 10px 12px 14px; font-size: 13px; white-space: pre-wrap; overflow-wrap: anywhere; max-height: 320px; overflow-y: auto; }
.sp-ai { border: 1px dashed var(--border-strong); border-radius: var(--radius); padding: 14px; display: flex; flex-direction: column; gap: 12px; background: var(--surface-2); }
/* Planlama → plan düzenleyici: numaralı bölümler ve AI ekibi tablosu */
.sp-sec { border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); padding: 16px 18px; display: flex; flex-direction: column; gap: 14px; }
.sp-sec-head { display: flex; gap: 12px; align-items: flex-start; }
.sp-sec-head > b { flex: none; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-3); color: var(--text-2); font-size: 12.5px; }
.sp-sec-head h3 { font-size: 14px; font-weight: 600; margin: 3px 0 0; }
.sp-sec-head p { margin: 2px 0 0; }
.sp-sec-body { display: flex; flex-direction: column; gap: 14px; padding-left: 38px; }
.sp-form-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 16px; }
.sp-roles { display: flex; flex-direction: column; border: 1px solid var(--border); border-radius: var(--radius-sm); overflow: hidden; }
.sp-role { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr) minmax(0, 1fr); gap: 12px; align-items: center; padding: 10px 12px; border-top: 1px solid var(--border); }
.sp-role-head { border-top: 0; padding: 7px 12px; background: var(--surface-2); font-size: 11px; letter-spacing: .05em; text-transform: uppercase; color: var(--text-muted); }
.sp-role-name { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.sp-role-name strong { font-weight: 550; }
.sp-role .input, .sp-role .select { width: 100%; }
.sp-history { display: flex; flex-direction: column; }
.sp-post { display: grid; grid-template-columns: 72px 1fr auto; gap: 12px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--border); }
.sp-post img { width: 72px; height: 90px; object-fit: cover; border-radius: 8px; background: var(--surface-3); }
.sp-post video { width: 72px; height: 128px; object-fit: cover; border-radius: 8px; background: var(--surface-3); }
.sp-post-main { min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.sp-post-main strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 550; }
.sp-settings { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.5fr); gap: var(--gap); align-items: start; }
.sp-account { display: grid; grid-template-columns: 48px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--border); }
.sp-account:last-of-type { border-bottom: 0; }
/* Instagram önizlemesi (Sosyal Medya → Yayın geçmişi / Planlama): kullanıcının göreceği akış, Reels ve profil ızgarası */
.ig-stage { display: flex; justify-content: center; }
.ig { width: min(380px, 100%); border: 1px solid var(--border); border-radius: 18px; background: var(--surface); overflow: hidden; box-shadow: var(--shadow); }
.ig-head { display: flex; gap: 10px; align-items: center; padding: 9px 12px; }
.ig-head .grow { flex: 1; min-width: 0; }
.ig-avatar { width: 32px; height: 32px; font-size: 13px; box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--accent-5); }
.ig-user { font-weight: 600; font-size: 13.5px; }
.ig-sub { font-size: 11.5px; color: var(--text-muted); }
.ig-media { aspect-ratio: 4 / 5; background: var(--surface-3); }
.ig-media img, .ig-media video { width: 100%; height: 100%; object-fit: cover; display: block; }
.ig-actions { display: flex; gap: 14px; align-items: center; padding: 10px 12px 6px; }
.ig-actions .spacer { flex: 1; }
.ig-likes { padding: 0 12px; font-size: 13px; font-weight: 600; }
.ig-caption { padding: 4px 12px 0; font-size: 13.5px; line-height: 1.42; white-space: pre-wrap; overflow-wrap: anywhere; max-height: 360px; overflow-y: auto; }
.ig-caption b { font-weight: 600; }
.ig-more { border: 0; background: none; padding: 0; font: inherit; color: var(--text-muted); cursor: pointer; }
.ig-tag { color: var(--primary); }
.ig-time { padding: 8px 12px 14px; font-size: 11px; color: var(--text-muted); letter-spacing: .02em; }
.ig-reel { position: relative; aspect-ratio: 9 / 16; background: #000; color: #fff; }
.ig-reel > video { width: 100%; height: 100%; object-fit: cover; display: block; }
.ig-reel-top { position: absolute; top: 12px; left: 14px; font-size: 18px; text-shadow: 0 1px 3px #0009; }
.ig-reel-side { position: absolute; right: 10px; bottom: 96px; display: flex; flex-direction: column; gap: 18px; align-items: center; font-size: 11px; filter: drop-shadow(0 1px 2px #0009); }
.ig-reel-side > div { display: flex; flex-direction: column; align-items: center; gap: 3px; }
.ig-reel-info { position: absolute; left: 12px; right: 62px; bottom: 14px; display: flex; flex-direction: column; gap: 7px; font-size: 13px; text-shadow: 0 1px 3px #000a; }
.ig-reel-user { display: flex; align-items: center; gap: 8px; }
.ig-reel-user .ig-avatar { box-shadow: none; }
.ig-follow { border: 1px solid #fffc; border-radius: 7px; padding: 2px 9px; font-size: 12px; font-weight: 600; }
.ig-reel .ig-tag, .ig-reel-more { color: #fff; font-weight: 600; }
.ig-reel-music { display: flex; align-items: center; gap: 6px; font-size: 12px; opacity: .9; }
.ig-profile { display: flex; align-items: center; gap: 24px; padding: 16px 16px 6px; }
.ig-profile .ig-avatar { width: 72px; height: 72px; font-size: 26px; }
.ig-stats { display: flex; gap: 22px; }
.ig-stats > div { display: flex; flex-direction: column; align-items: center; font-size: 12.5px; }
.ig-stats b { font-size: 16px; }
.ig-profile-name { padding: 0 16px 12px; }
.ig-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2px; }
.ig-grid > div { aspect-ratio: 3 / 4; background: var(--surface-3); overflow: hidden; position: relative; }
.ig-grid img, .ig-grid video { width: 100%; height: 100%; object-fit: cover; display: block; }
.ig-grid > .is-new::after { content: ''; position: absolute; inset: 0; box-shadow: inset 0 0 0 3px var(--primary); }
.sp-open { border: 0; background: none; padding: 0; cursor: pointer; border-radius: 8px; text-align: left; font: inherit; color: inherit; }
.sp-open:hover img, .sp-open:hover video { outline: 2px solid var(--primary); }
.sp-account > .row { justify-content: flex-end; flex-wrap: nowrap; }
.sp-account .sp-avatar { width: 48px; height: 48px; }
/* Sosyal Medya → yayın platformu kartları, plan yayın hedefleri, platform seçenekleri */
.sp-platforms { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; }
.sp-platform { border: 1px solid var(--border); border-radius: var(--radius); padding: 14px; display: flex; flex-direction: column; gap: 8px; background: var(--surface); min-width: 0; }
.sp-platform.is-soon { background: var(--surface-2); }
button.sp-platform { font: inherit; color: inherit; text-align: left; cursor: pointer; }
button.sp-platform:hover { border-color: var(--border-strong); }
.sp-platform.is-selected { border-color: var(--primary); box-shadow: 0 0 0 1px var(--primary); }
.sp-platform > .small { overflow-wrap: anywhere; }
.sp-platform-go { color: var(--primary); margin-top: auto; }
.sp-options-later { border-top: 1px dashed var(--border); padding-top: 10px; }
.sp-steps-list { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 4px; }
.sp-target { border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 10px 12px; display: flex; flex-direction: column; gap: 8px; }
.sp-target > .check { flex-wrap: wrap; gap: 8px; }
.sp-options { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px 16px; padding-top: 8px; }
/* Netgsm: iki sütun (dar ekranda tek), uzun webhook adresi kırılır */
.ng-split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--gap); align-items: start; margin-top: 16px; }
.ng-split.ng-sms { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); }
.ng-url { display: block; padding: 10px 12px; background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius-sm); overflow-wrap: anywhere; word-break: break-all; }
.ng-actions { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; align-items: center; }
.ng-split audio { width: 100%; }
.ng-empty { margin: 0; padding: 32px 20px; text-align: center; }
@media (max-width: 900px) { .ng-split, .ng-split.ng-sms { grid-template-columns: 1fr; } }
@media (max-width: 1000px) { .sp-grid, .sp-settings { grid-template-columns: 1fr; } .sp-account > .row { flex-wrap: wrap; } .sp-phone { position: static; max-width: 380px; } }
@media (max-width: 720px) { .sp-form-2, .sp-role { grid-template-columns: 1fr; } .sp-role-head { display: none; } .sp-sec-body { padding-left: 0; } }
@media (max-width: 640px) { .sp-post, .sp-account { grid-template-columns: 56px 1fr; } .sp-post > :last-child, .sp-account > :last-child { grid-column: 1 / -1; } }
.sp-pick { width: 100%; border: 0; background: none; text-align: left; cursor: pointer; font: inherit; color: inherit; grid-template-columns: 56px 1fr auto; padding: 6px 4px; }
.sp-pick:hover { background: var(--surface-2); }
.sp-pick img { width: 56px; height: 56px; }
.sp-pick:disabled { opacity: .55; cursor: default; background: none; }
.sp-pick-results { max-height: 320px; overflow-y: auto; border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 4px 8px; }
.sp-picked .sp-post { grid-template-columns: 48px 1fr auto; padding: 8px 0; }
.sp-picked .sp-post img { width: 48px; height: 48px; }

/* ── Rehber (address-book) ─────────────────────────────────────────── */
.avatar img { width: 100%; height: 100%; object-fit: cover; border-radius: inherit; display: block; }
.ab-row { display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; gap: 12px; align-items: start; padding: 12px 20px; border-bottom: 1px solid var(--border); }
.ab-row:last-child { border-bottom: 0; }
.ab-row:hover { background: var(--surface-2); }
.ab-row .avatar { width: 44px; height: 44px; overflow: hidden; }
.ab-points { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.ab-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.ab-pair > .card { padding: 14px 16px; }
.ab-addr { display: grid; grid-template-columns: 1fr 1fr 1fr 1fr 2fr 100px auto; gap: 8px; align-items: end; padding-bottom: 10px; border-bottom: 1px solid var(--border); }
.ab-addr .select, .ab-addr .input { width: 100%; min-width: 0; }
.ab-geo-row { display: flex; align-items: center; gap: 8px; padding: 8px 12px; border-bottom: 1px solid var(--border); }
.ab-geo-row:hover { background: var(--surface-2); }
.ab-geo-list { max-height: 420px; overflow-y: auto; border: 1px solid var(--border); border-radius: var(--radius-sm); }
.ab-progress { height: 6px; border-radius: 999px; background: var(--surface-3); overflow: hidden; }
.ab-progress > span { display: block; height: 100%; background: var(--primary); width: 30%; animation: ab-indet 1.4s ease-in-out infinite; }
.ab-code { margin: 0; padding: 12px 14px; background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius-sm); overflow-x: auto; white-space: pre; font-family: var(--mono); font-size: 12.5px; }
.ab-doc h3 { margin: 6px 0 0; font-size: 14px; }
@keyframes ab-indet { 0% { transform: translateX(-100%); } 100% { transform: translateX(340%); } }
@media (max-width: 720px) {
  .ab-row { grid-template-columns: 40px minmax(0, 1fr); padding: 12px 16px; }
  .ab-row > .ab-actions { grid-column: 1 / -1; }
  .ab-pair, .ab-addr { grid-template-columns: 1fr; }
}

/* Çağrı Merkezi (call-center) */
.cc-split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--gap); align-items: start; margin-top: 16px; }
.cc-url { flex: 1; min-width: 0; display: block; padding: 8px 10px; background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius-sm); overflow-wrap: anywhere; word-break: break-all; font-size: 12.5px; }
.cc-mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
.cc-pad { padding: 16px 20px; margin: 0; }
.cc-rule { border: 0; border-top: 1px solid var(--border); margin: 4px 0; width: 100%; }
.cc-split .callout { margin-top: 0; }
@media (max-width: 900px) { .cc-split { grid-template-columns: 1fr; } }

/* KiCad Asistanı (kicad) */
.kc-layout { display: grid; grid-template-columns: minmax(240px, 300px) minmax(0, 1fr); gap: var(--gap); align-items: start; margin-top: 16px; }
.kc-side { position: sticky; top: 16px; }
.kc-list { display: flex; flex-direction: column; }
.kc-row { display: flex; flex-direction: column; gap: 2px; align-items: flex-start; text-align: left; padding: 10px 16px; border: 0; border-bottom: 1px solid var(--border); background: none; color: var(--text); font: inherit; cursor: pointer; min-width: 0; }
.kc-row strong { overflow-wrap: anywhere; }
.kc-row:hover { background: var(--surface-2); }
.kc-row.is-active { background: var(--primary-soft); box-shadow: inset 3px 0 0 var(--primary); }
.kc-row:last-child { border-bottom: 0; border-radius: 0 0 var(--radius) var(--radius); }
.kc-empty { margin: 0; padding: 28px 20px; text-align: center; }
.kc-split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--gap); align-items: start; }
.kc-steps { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 6px; color: var(--text-2); }
.kc-chips { display: flex; flex-wrap: wrap; gap: 6px; padding: 12px 20px 4px; }
.kc-pane { padding: 16px 20px 20px; min-width: 0; }
.kc-refs { display: flex; flex-wrap: wrap; gap: 4px; }
.kc-refs code { padding: 1px 6px; border-radius: 5px; background: var(--surface-3); font-size: 11.5px; }
.kc-running { display: flex; flex-direction: column; gap: 10px; padding: 18px 0; }
.kc-review h3, .kc-pane h3 { font-size: 13.5px; margin: 6px 0 2px; }
.kc-blocks summary { cursor: pointer; font-weight: 550; padding: 4px 0; }
.kc-block { display: flex; flex-direction: column; gap: 4px; padding: 10px 12px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface-2); }
.kc-finding { display: flex; flex-direction: column; gap: 6px; padding: 12px 14px; border: 1px solid var(--border); border-left: 3px solid var(--border-strong); border-radius: var(--radius-sm); background: var(--surface); }
.kc-finding p { margin: 0; color: var(--text-2); overflow-wrap: anywhere; }
.kc-finding.kc-bad { border-left-color: var(--danger); }
.kc-finding.kc-warn { border-left-color: var(--warning); }
.kc-fix { padding: 8px 10px; border-radius: 6px; background: var(--surface-2); }
.kc-chat { display: flex; flex-direction: column; gap: 10px; max-height: 62vh; overflow-y: auto; padding: 4px 2px 12px; }
.kc-msg { display: flex; flex-direction: column; gap: 4px; max-width: min(860px, 92%); padding: 10px 14px; border-radius: var(--radius); border: 1px solid var(--border); background: var(--surface-2); overflow-wrap: anywhere; }
.kc-msg p { margin: 0; white-space: pre-wrap; }
.kc-msg-user { align-self: flex-end; background: var(--primary-soft); border-color: color-mix(in srgb, var(--primary) 30%, transparent); }
.kc-msg-ai { align-self: flex-start; }
.kc-md { display: flex; flex-direction: column; gap: 6px; }
.kc-md p { white-space: normal; }
.kc-md h4 { margin: 6px 0 0; font-size: 13.5px; }
.kc-md ul { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 3px; }
.kc-md code { padding: 0 4px; border-radius: 4px; background: var(--surface-3); }
.kc-code { margin: 0; padding: 10px 12px; background: var(--surface-3); border-radius: var(--radius-sm); overflow-x: auto; white-space: pre; font-family: var(--mono); font-size: 12px; }
.kc-composer { display: flex; gap: 8px; align-items: flex-end; padding-top: 12px; border-top: 1px solid var(--border); }
.kc-composer .input { flex: 1; resize: vertical; }
.kc-mem { display: flex; gap: 10px; align-items: center; padding: 9px 12px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface); min-width: 0; }
.kc-mem > .stack-xs { min-width: 0; overflow-wrap: anywhere; }
.kc-mem.is-done { opacity: .6; }
.kc-mem.is-done > .stack-xs > span:first-child { text-decoration: line-through; }
.kc-click { cursor: pointer; }
.kc-nodes { overflow-wrap: anywhere; color: var(--text-2); }
.kc-prompt { min-height: 260px; font-family: var(--mono, ui-monospace, monospace); font-size: 12.5px; line-height: 1.5; }
#kc-ds-detail .toolbar .input { flex: 1; min-width: 180px; }
#kc-lib-results .table td, #kc-lib-match code { overflow-wrap: anywhere; }
.kc-platforms { display: inline-flex; gap: 4px; padding: 4px; margin: 0 20px 12px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface-2); }
.kc-platform { border: 0; background: none; color: var(--text-muted); font: inherit; font-weight: 600; padding: 8px 18px; border-radius: var(--radius-sm); cursor: pointer; }
.kc-platform:hover { color: var(--text); }
.kc-platform.active { background: var(--surface); color: var(--primary); box-shadow: var(--shadow-sm); }
@media (max-width: 1000px) { .kc-layout, .kc-split { grid-template-columns: 1fr; } .kc-side { position: static; } }
