/* ── Tasarım değişkenleri ── */
:root {
  --bg: #f6f7fb; --surface: #ffffff; --surface-2: #f2f4f8; --surface-3: #e9ecf3; --border: #e5e8ef; --border-strong: #d6dae4;
  --text: #0f172a; --text-2: #334155; --muted: #64748b;
  --primary: #5b5bf0; --primary-2: #4949d8; --primary-soft: #ececfe; --primary-text: #4343c9;
  --ok: #0f9f6e; --ok-soft: #dcf5ea; --warn: #c27a06; --warn-soft: #fdf1d6; --bad: #dc3545; --bad-soft: #fde4e6;
  --info: #0b84c6; --info-soft: #dff1fb;
  --side: #ffffff; --side-text: #475569; --side-muted: #94a3b8; --side-hover: #f2f4f8; --side-active: #ececfe; --side-active-text: #4343c9;
  --radius: 14px; --radius-sm: 10px;
  --shadow: 0 1px 2px rgba(15,23,42,.04), 0 1px 3px rgba(15,23,42,.06);
  --shadow-lg: 0 12px 32px rgba(15,23,42,.12);
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0b0d12; --surface: #12151c; --surface-2: #181c25; --surface-3: #202531; --border: #222735; --border-strong: #2e3445;
    --text: #e8eaf0; --text-2: #c3c8d4; --muted: #8b93a7;
    --primary: #6d6df7; --primary-2: #5b5bf0; --primary-soft: #1f1f45; --primary-text: #a5a5ff;
    --ok: #34d399; --ok-soft: #0e2f25; --warn: #fbbf24; --warn-soft: #33270b; --bad: #f87171; --bad-soft: #3a1518;
    --info: #38bdf8; --info-soft: #0b2a3b;
    --side: #0e1016; --side-text: #a8afc0; --side-muted: #5f6678; --side-hover: #171a23; --side-active: #1d1d3f; --side-active-text: #ffffff;
    --shadow: 0 1px 2px rgba(0,0,0,.3); --shadow-lg: 0 16px 40px rgba(0,0,0,.45);
  }
}
* { box-sizing: border-box; }
body { margin: 0; font: 14px/1.5 "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; background: var(--bg); color: var(--text);
  -webkit-font-smoothing: antialiased; font-feature-settings: "cv11", "ss01"; }
.hidden { display: none !important; }
body:not([data-role="admin"]) .admin-only { display: none !important; }
body:not([data-super="1"]) .super-only { display: none !important; }
a { color: var(--primary-text); text-decoration: none; } a:hover { text-decoration: underline; }
h1 { font-size: 24px; margin: 0; font-weight: 700; letter-spacing: -.02em; }
h2 { font-size: 15px; margin: 0 0 14px; font-weight: 650; letter-spacing: -.01em; }
h3 { font-size: 14px; margin: 16px 0 8px; }
.muted { color: var(--muted); } .small { font-size: 12px; } .error { color: var(--bad); min-height: 1em; }
.mono { font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: 12px; }
.i { width: 18px; height: 18px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.i.sm { width: 15px; height: 15px; }

/* ── Giriş ── */
.login { min-height: 100vh; display: grid; place-items: center; padding: 16px;
  background: radial-gradient(1200px 600px at 10% -10%, var(--primary-soft), transparent 60%), var(--bg); }
.login-card { background: var(--surface); padding: 32px; border-radius: 18px; width: 100%; max-width: 380px; box-shadow: var(--shadow-lg);
  border: 1px solid var(--border); display: grid; gap: 14px; }
.brand { font-weight: 700; font-size: 15px; display: flex; gap: 10px; align-items: center; letter-spacing: -.01em; }
.brand.big { font-size: 20px; }
.logo { background: linear-gradient(135deg, #7c7cf8, #4f46e5); color: #fff; width: 32px; height: 32px; display: grid; place-items: center;
  border-radius: 10px; box-shadow: 0 4px 12px rgba(91,91,240,.35); }
.logo .i { width: 17px; height: 17px; }

/* ── Yerleşim + kenar menü ── */
.app { display: grid; grid-template-columns: 248px 1fr; min-height: 100vh; }
.sidebar { background: var(--side); color: var(--side-text); border-right: 1px solid var(--border); padding: 18px 14px; display: flex;
  flex-direction: column; gap: 20px; position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.sidebar .brand { color: var(--text); padding: 2px 8px; }
#nav { display: grid; gap: 2px; }
.nav-h { font-size: 11px; font-weight: 600; color: var(--side-muted); text-transform: uppercase; letter-spacing: .06em; padding: 14px 10px 6px; }
.nav-h:first-child { padding-top: 0; }
#nav a { color: var(--side-text); text-decoration: none; padding: 8px 10px; border-radius: var(--radius-sm); display: flex; align-items: center;
  gap: 11px; font-weight: 500; transition: background .15s, color .15s; }
#nav a .i { opacity: .8; }
#nav a:hover { background: var(--side-hover); color: var(--text); }
#nav a.active { background: var(--side-active); color: var(--side-active-text); font-weight: 600; }
#nav a.active .i { opacity: 1; color: var(--primary); }
.sidebar-foot { margin-top: auto; display: grid; gap: 10px; }
.me-card { display: flex; align-items: center; gap: 10px; padding: 10px; border-radius: var(--radius-sm); background: var(--surface-2); }
.avatar { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: 13px; flex: none;
  background: linear-gradient(135deg, #a5b4fc, #6366f1); color: #fff; text-transform: uppercase; }
.me-card .who { min-width: 0; flex: 1; line-height: 1.25; }
.me-card .who b { display: block; color: var(--text); font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.icon-btn { border: none; background: none; color: var(--muted); width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center; cursor: pointer; }
.icon-btn:hover { background: var(--surface-3); color: var(--text); }
.main { padding: 28px 32px 64px; min-width: 0; max-width: 1440px; width: 100%; }
.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; margin-bottom: 22px; flex-wrap: wrap; }
.page-head .sub { color: var(--muted); margin-top: 4px; font-size: 13px; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.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)); }
.cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.span-2 { grid-column: span 2; }
@media (max-width: 1100px) { .cols-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 900px) {
  .app { grid-template-columns: 1fr; }
  .sidebar { position: sticky; top: 0; z-index: 30; height: auto; flex-direction: row; align-items: center; padding: 10px 16px; gap: 12px;
    border-right: none; border-bottom: 1px solid var(--border); overflow-x: auto; overflow-y: hidden; }
  .sidebar .brand span:last-child { display: none; }
  #nav { display: flex; gap: 4px; } .nav-h { display: none; }
  #nav a { white-space: nowrap; padding: 7px 10px; }
  .sidebar-foot { margin: 0 0 0 auto; display: flex; } .me-card .who, #provider-badge { display: none; } .me-card { padding: 4px; background: none; }
  .cols-2, .cols-3, .cols-4 { grid-template-columns: 1fr; } .span-2 { grid-column: auto; }
  .main { padding: 18px 16px 48px; }
}

/* ── Müşteri kutusu (kenar menü) ── */
.tenant-box { display: grid; gap: 4px; padding: 10px 12px; border-radius: var(--radius-sm); background: var(--surface-2); border: 1px solid var(--border); }
.tenant-box:empty { display: none; }
.tenant-box .label { font-size: 11px; font-weight: 600; color: var(--side-muted); text-transform: uppercase; letter-spacing: .06em; }
.tenant-box label { gap: 4px; }
.tenant-box select { padding: 6px 8px; font-weight: 600; }
.tenant-box b { color: var(--text); }
@media (max-width: 900px) { .tenant-box { padding: 4px 8px; } .tenant-box .label { display: none; } }

/* ── Kart + istatistik ── */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); min-width: 0; }
.card-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 14px; }
.card-head h2 { margin: 0; display: flex; align-items: center; gap: 8px; }
.stat { display: grid; gap: 6px; position: relative; }
.stat .top { display: flex; justify-content: space-between; align-items: center; }
.stat .label { color: var(--muted); font-size: 13px; font-weight: 500; }
.stat .value { font-size: 30px; font-weight: 700; letter-spacing: -.03em; line-height: 1.1; }
.stat .sub { color: var(--muted); font-size: 12px; }
.ico { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; background: var(--primary-soft); color: var(--primary); }
.ico.ok { background: var(--ok-soft); color: var(--ok); } .ico.warn { background: var(--warn-soft); color: var(--warn); }
.ico.info { background: var(--info-soft); color: var(--info); } .ico.bad { background: var(--bad-soft); color: var(--bad); }

/* ── Buton ── */
.btn { border: 1px solid var(--border-strong); background: var(--surface); color: var(--text); padding: 8px 14px; border-radius: var(--radius-sm);
  cursor: pointer; font: inherit; font-weight: 550; white-space: nowrap; display: inline-flex; align-items: center; gap: 7px;
  transition: background .15s, border-color .15s, box-shadow .15s; text-decoration: none; }
.btn:hover { background: var(--surface-2); text-decoration: none; }
.btn.primary { background: var(--primary); border-color: var(--primary); color: #fff; box-shadow: 0 1px 2px rgba(91,91,240,.3); }
.btn.primary:hover { background: var(--primary-2); }
.btn.danger { color: var(--bad); border-color: var(--bad-soft); } .btn.danger:hover { background: var(--bad-soft); } .btn.ok { color: var(--ok); }
.btn.ghost { background: transparent; color: inherit; border-color: var(--border); }
.btn.small { padding: 4px 10px; font-size: 12px; border-radius: 8px; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
input:disabled, select:disabled { opacity: .45; cursor: not-allowed; }

/* ── Form ── */
label { display: grid; gap: 5px; font-weight: 550; font-size: 13px; color: var(--text-2); }
label .hint { font-weight: 400; color: var(--muted); font-size: 12px; }
input, select, textarea { font: inherit; padding: 9px 11px; border: 1px solid var(--border-strong); border-radius: var(--radius-sm); background: var(--surface);
  color: var(--text); width: 100%; transition: border-color .15s, box-shadow .15s; }
textarea { min-height: 80px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); }
input[type=checkbox] { width: auto; accent-color: var(--primary); } input[type=range] { padding: 0; border: none; accent-color: var(--primary); box-shadow: none; }
.check { display: flex; gap: 8px; align-items: center; font-weight: 500; }
fieldset { border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; margin: 0; display: grid; gap: 12px; }
legend { font-weight: 650; padding: 0 6px; }

/* ── Tablo ── */
.table-wrap { overflow-x: auto; margin: 0 -20px; padding: 0 20px; }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 11px 12px; border-bottom: 1px solid var(--border); vertical-align: middle; }
tr:last-child td { border-bottom: none; }
th { font-size: 11.5px; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: .05em; background: transparent;
  border-bottom: 1px solid var(--border-strong); padding-top: 4px; }
tr.click { cursor: pointer; } tr.click:hover td { background: var(--surface-2); }

/* ── Rozet, ilerleme ── */
.badge { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 600;
  background: var(--surface-3); color: var(--muted); white-space: nowrap; }
.badge.ok, .badge.warn, .badge.bad, .badge.info, .badge.primary { padding-left: 8px; }
.badge.ok::before, .badge.warn::before, .badge.bad::before, .badge.info::before, .badge.primary::before {
  content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge.ok { background: var(--ok-soft); color: var(--ok); } .badge.warn { background: var(--warn-soft); color: var(--warn); }
.badge.bad { background: var(--bad-soft); color: var(--bad); } .badge.info { background: var(--info-soft); color: var(--info); }
.badge.primary { background: var(--primary-soft); color: var(--primary-text); }
.progress { height: 6px; background: var(--surface-3); border-radius: 99px; overflow: hidden; display: flex; }
.progress > span { display: block; height: 100%; border-radius: 99px; }
.dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; background: var(--ok); box-shadow: 0 0 0 0 var(--ok); animation: ring 1.6s infinite; }
@keyframes ring { 0% { box-shadow: 0 0 0 0 rgba(16,185,129,.5); } 100% { box-shadow: 0 0 0 7px rgba(16,185,129,0); } }
@keyframes pulse { 50% { opacity: .3; } }

.dyn-row { display: grid; gap: 8px; grid-template-columns: 1fr 1fr auto; align-items: start; }
.dyn-row.out { grid-template-columns: 140px 1fr 1.4fr auto auto; } .dyn-row.field { grid-template-columns: 140px 1fr 110px 1.4fr auto; }
@media (max-width: 900px) { .dyn-row, .dyn-row.out, .dyn-row.field { grid-template-columns: 1fr; } }
.pre { white-space: pre-wrap; background: var(--surface-2); border-radius: var(--radius-sm); padding: 14px; font-size: 13px; max-height: 420px; overflow: auto; }
.transcript .ai { color: var(--primary-text); font-weight: 600; } .transcript .user { color: var(--ok); font-weight: 600; }
.tabs { display: flex; gap: 2px; margin-bottom: 18px; flex-wrap: wrap; padding: 4px; background: var(--surface-2); border-radius: 12px; width: fit-content; max-width: 100%; }
.tabs button { background: none; border: none; padding: 7px 14px; cursor: pointer; font: inherit; font-weight: 550; color: var(--muted); border-radius: 9px; }
.tabs button:hover { color: var(--text); }
.tabs button.active { color: var(--text); background: var(--surface); box-shadow: var(--shadow); }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip { font-family: ui-monospace, Menlo, monospace; font-size: 12px; background: var(--primary-soft); color: var(--primary-text); padding: 2px 8px; border-radius: 6px; cursor: pointer; }
.empty { text-align: center; padding: 36px 16px; color: var(--muted); display: grid; justify-items: center; gap: 10px; }
.empty .ico { width: 44px; height: 44px; border-radius: 12px; background: var(--surface-2); color: var(--muted); }
.callout { border: 1px solid transparent; border-left: 3px solid var(--info); background: var(--info-soft); padding: 11px 14px; border-radius: var(--radius-sm); }
.callout.warn { border-left-color: var(--warn); background: var(--warn-soft); }
.steps li { margin-bottom: 8px; }

/* ── Grafik ── */
.chart { display: grid; gap: 8px; }
.bars { display: flex; align-items: flex-end; gap: 4px; height: 150px; padding-top: 8px; border-bottom: 1px solid var(--border); }
.bars div { flex: 1; background: var(--primary-soft); border-radius: 5px 5px 0 0; position: relative; min-height: 3px; transition: height .3s; }
.bars div:hover { filter: brightness(1.1); }
.bars div span { position: absolute; bottom: 0; left: 0; right: 0; background: var(--primary); border-radius: 5px 5px 0 0; }
.axis { display: flex; justify-content: space-between; font-size: 11px; color: var(--muted); }
.legend { display: flex; gap: 14px; font-size: 12px; color: var(--muted); }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }
.meter { display: grid; gap: 6px; } .meter .row { justify-content: space-between; font-size: 13px; }

/* ── Liste satırı (son aramalar, aktif aramalar) ── */
.list-row { display: flex; align-items: center; gap: 12px; padding: 10px 8px; border-radius: var(--radius-sm); cursor: pointer; }
.list-row:hover { background: var(--surface-2); }
.list-row .grow { flex: 1; min-width: 0; }
.list-row .grow b { display: block; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.list-row .meta { text-align: right; font-size: 12px; color: var(--muted); white-space: nowrap; }
.live-pill { display: inline-flex; align-items: center; gap: 8px; padding: 5px 12px; border-radius: 999px; background: var(--ok-soft); color: var(--ok); font-size: 12px; font-weight: 600; }

.modal { position: fixed; inset: 0; background: rgba(8,10,16,.55); backdrop-filter: blur(3px); display: grid; place-items: center; padding: 16px; z-index: 50; }
.modal-card { background: var(--surface); border: 1px solid var(--border); border-radius: 18px; width: 100%; max-width: 860px; max-height: 92vh; overflow: auto;
  padding: 26px; position: relative; box-shadow: var(--shadow-lg); }
.modal-x { position: absolute; top: 12px; right: 14px; border: none; background: none; font-size: 24px; cursor: pointer; color: var(--muted); border-radius: 8px; width: 34px; height: 34px; }
.modal-x:hover { background: var(--surface-2); }
.toasts { position: fixed; bottom: 18px; right: 18px; display: grid; gap: 8px; z-index: 60; }
.toast { background: #1e2230; color: #fff; padding: 11px 16px; border-radius: 12px; box-shadow: var(--shadow-lg); max-width: 380px; font-weight: 500;
  animation: toast-in .2s ease-out; }
@keyframes toast-in { from { transform: translateY(8px); opacity: 0; } }
.toast.bad { background: #c42b3a; } .toast.ok { background: #0b8a5f; }
.toast.warn { background: #b06d04; }

/* Görsel akış — noktalı tuval, kavisli bağlantılar, başlık kutunun üstünde */
.ft-wrap { display: grid; gap: 12px; --ft-bg: #ececef; --ft-dot: #c9cbd3; --ft-line: #c4c7cf; --ft-node: #fff; --ft-text: #1c2030; }
@media (prefers-color-scheme: dark) { .ft-wrap { --ft-bg: #1a1d27; --ft-dot: #2c3140; --ft-line: #3a4052; --ft-node: #232736; --ft-text: #e6e8ef; } }
.ft-board { position: relative; border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.ft-viewport { height: 520px; overflow: auto; cursor: grab; background-color: var(--ft-bg);
  background-image: radial-gradient(var(--ft-dot) 1.2px, transparent 1.2px); background-size: 22px 22px; }
.ft-viewport.dragging { cursor: grabbing; user-select: none; }
.ft-stage { position: relative; transform-origin: 0 0; }
.ft-edges { position: absolute; inset: 0; pointer-events: none; overflow: visible; }
.ft-edges path { fill: none; stroke: var(--ft-line); stroke-width: 1.6; }
.ft-node { position: absolute; transform: translateY(-50%); height: 40px; display: flex; align-items: center; gap: 8px; padding: 0 16px;
  border: none; border-radius: 999px; background: var(--ft-node); color: var(--ft-text); font: inherit; font-weight: 600; font-size: 13px;
  cursor: pointer; box-shadow: 0 1px 3px rgba(16,24,40,.12), 0 1px 2px rgba(16,24,40,.06); white-space: nowrap; }
.ft-node:hover { box-shadow: 0 0 0 2px var(--primary-soft), 0 2px 6px rgba(16,24,40,.15); }
.ft-node.sel { box-shadow: 0 0 0 2px var(--primary), 0 2px 8px rgba(79,70,229,.25); }
.ft-cap { position: absolute; bottom: calc(100% + 6px); left: 50%; transform: translateX(-50%); max-width: 210px; overflow: hidden;
  text-overflow: ellipsis; white-space: nowrap; font-size: 12px; font-weight: 500; color: var(--muted); pointer-events: none; }
.ft-ico { font-size: 14px; line-height: 1; opacity: .8; }
.ft-lbl { overflow: hidden; text-overflow: ellipsis; }
.ft-node.diamond { height: 46px; padding: 0; justify-content: center; background: transparent; box-shadow: none; }
.ft-node.diamond::before { content: ''; position: absolute; inset: 7px; transform: rotate(45deg); border-radius: 7px; background: #d9dbe2;
  box-shadow: 0 1px 2px rgba(16,24,40,.12); }
@media (prefers-color-scheme: dark) { .ft-node.diamond::before { background: #3a3f52; } }
.ft-node.diamond .ft-ico { position: relative; opacity: 1; filter: grayscale(1); }
.ft-node.diamond.sel::before { box-shadow: 0 0 0 2px var(--primary); }
.ft-node.diamond.sel, .ft-node.diamond:hover { box-shadow: none; }
.ft-node.tool .ft-ico { color: #ea580c; }
.ft-node.result { height: 34px; font-weight: 500; }
.ft-node.end .ft-lbl { color: var(--ok); } .ft-node.goto .ft-lbl { color: var(--warn); }
.ft-toolbar { position: absolute; top: 10px; right: 10px; display: flex; align-items: center; gap: 2px; padding: 4px; border-radius: 12px;
  background: var(--surface); box-shadow: var(--shadow); }
.ft-toolbar button { border: none; background: none; color: var(--text); font: inherit; font-size: 16px; width: 32px; height: 30px; border-radius: 8px; cursor: pointer; }
.ft-toolbar button:hover { background: var(--surface-2); }
.ft-toolbar span { font-size: 12px; color: var(--muted); min-width: 40px; text-align: center; }
.ft-plus { position: absolute; transform: translateY(-50%); width: 26px; height: 26px; border-radius: 50%; border: 1.5px dashed var(--ft-line);
  background: var(--ft-node); color: var(--muted); font: inherit; font-size: 16px; line-height: 1; cursor: pointer; opacity: .75; }
.ft-plus.below { width: 24px; height: 24px; font-size: 15px; transform: none; }
.ft-plus:hover, .ft-plus.open { opacity: 1; border-style: solid; border-color: var(--primary); color: var(--primary); }
.ft-menu { position: absolute; transform: translateY(-20px); z-index: 5; display: grid; min-width: 190px; padding: 6px; border-radius: 12px;
  background: var(--surface); border: 1px solid var(--border); box-shadow: 0 8px 24px rgba(16,24,40,.18); }
.ft-menu-h { font-size: 11px; font-weight: 600; color: var(--muted); padding: 4px 8px 6px; text-transform: uppercase; letter-spacing: .04em; }
.ft-menu button { display: flex; gap: 10px; align-items: center; text-align: left; border: none; background: none; color: var(--text);
  font: inherit; font-size: 13px; padding: 7px 8px; border-radius: 8px; cursor: pointer; }
.ft-menu button:hover { background: var(--primary-soft); color: var(--primary); }
.ft-menu button span { width: 18px; text-align: center; }
.ft-node.diamond.anytime::before { background: #fde68a; } .ft-node.diamond.anytime .ft-ico { filter: none; }
.ft-chips-box { display: grid; gap: 6px; } .ft-chips-box .hint { font-size: 12px; color: var(--muted); }
.ft-chips { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; padding: 6px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); }
.ft-chips input { flex: 1; min-width: 140px; border: none; padding: 4px; background: transparent; }
.ft-chips input:focus { outline: none; }
.ft-chip { display: inline-flex; align-items: center; gap: 4px; padding: 3px 4px 3px 10px; border-radius: 999px; background: var(--primary-soft); color: var(--primary); font-size: 12.5px; font-weight: 500; }
.ft-chip button { border: none; background: none; color: inherit; cursor: pointer; font-size: 15px; line-height: 1; padding: 0 4px; }
/* Düzenleme paneli: tuvalin sağında yüzen kart */
.ft-viewport { height: 640px; }
.ft-panel { position: absolute; top: 58px; right: 12px; max-height: calc(100% - 70px); width: 340px; overflow: auto; display: grid; gap: 14px; align-content: start;
  padding: 16px; border-radius: 14px; background: var(--surface); border: 1px solid var(--border); box-shadow: 0 12px 32px rgba(10,12,20,.28); }
.ft-panel-head { display: flex; align-items: center; gap: 10px; }
.ft-badge { width: 34px; height: 34px; flex: none; display: grid; place-items: center; border-radius: 10px; font-size: 16px; background: var(--primary-soft); }
.ft-badge.diamond { background: var(--surface-2); } .ft-badge.tool { background: #ffedd5; } .ft-badge.end { background: var(--ok-soft); }
.ft-badge.goto { background: var(--warn-soft); } .ft-badge.result { background: var(--surface-2); }
.ft-panel-title { flex: 1; display: grid; line-height: 1.25; min-width: 0; }
.ft-panel-title b { font-size: 15px; } .ft-panel-title span { font-size: 12px; color: var(--muted); }
.ft-icon-btn { width: 30px; height: 30px; flex: none; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); color: var(--muted); cursor: pointer; font-size: 13px; }
.ft-icon-btn:hover { background: var(--surface-2); color: var(--text); } .ft-icon-btn.danger:hover { background: var(--bad-soft); color: var(--bad); border-color: var(--bad-soft); }
.ft-hint { margin: 0; font-size: 12.5px; color: var(--muted); line-height: 1.45; }
.ft-fields { display: grid; gap: 12px; }
.ft-sec { font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.ft-add { display: grid; gap: 8px; border-top: 1px solid var(--border); padding-top: 14px; }
.ft-add-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
.ft-tile { display: flex; align-items: center; gap: 8px; padding: 9px 10px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface);
  color: var(--text); font: inherit; font-size: 12.5px; font-weight: 500; text-align: left; cursor: pointer; }
.ft-tile span { width: 18px; text-align: center; flex: none; }
.ft-tile:hover { border-color: var(--primary); background: var(--primary-soft); color: var(--primary); }
.ft-tile.wide { justify-content: center; border-style: dashed; }
.ft-tip { position: absolute; bottom: 14px; left: 50%; transform: translateX(-50%); padding: 7px 14px; border-radius: 999px; font-size: 12px;
  color: var(--muted); background: var(--surface); box-shadow: var(--shadow); pointer-events: none; white-space: nowrap; }
/* Tam ekran: tuval tüm ekranı kaplar */
.ft-wrap.ft-full { position: fixed; inset: 0; z-index: 40; background: var(--bg); padding: 12px; }
.ft-wrap.ft-full .ft-viewport { height: calc(100vh - 26px); }
@media (max-width: 760px) {
  .ft-panel { position: static; width: auto; box-shadow: none; border-radius: 0; border: none; border-top: 1px solid var(--border); }
  .ft-viewport { height: 460px; }
}
