/* ============================================================
   Dinamo Web — Server-Driven UI Renderer
   Türkiye Finans "Dinamo" motorunun web ikizi
   ============================================================ */
@font-face { font-family: 'GT Eesti Display'; font-weight: 300; src: url('../fonts/GT-Eesti-Display-Light.otf') format('opentype'); font-display: swap; }
@font-face { font-family: 'GT Eesti Display'; font-weight: 400; src: url('../fonts/GT-Eesti-Display-Regular.otf') format('opentype'); font-display: swap; }
@font-face { font-family: 'GT Eesti Display'; font-weight: 600; src: url('../fonts/GT-Eesti-Display-Medium.otf') format('opentype'); font-display: swap; }

:root {
  --tf-teal: #00a19a;
  --tf-teal-dark: #007d78;
  --tf-teal-light: #e6f5f4;
  --ink: #10241f;
  --ink-2: #486159;
  --muted: #8aa39c;
  --line: #e2ebe9;
  --bg: #eef2f1;
  --white: #ffffff;

  /* devtools (dark) */
  --dt-bg: #0f1720;
  --dt-panel: #16212c;
  --dt-line: #23303c;
  --dt-text: #cdd9e5;
  --dt-muted: #7488a0;
  --dt-green: #4ec9b0;
  --dt-blue: #569cd6;
  --dt-orange: #ce9178;
  --dt-purple: #c586c0;
  --dt-red: #f14c4c;
  --dt-yellow: #dcdcaa;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { height: 100%; margin: 0; }
body {
  font-family: 'GT Eesti Display', 'Inter', system-ui, -apple-system, sans-serif;
  background: #dfe6e4;
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
}
/* Nav tam genişlik, içerik max 400px ortalı + sağda debug paneli */
.app { min-height: 100dvh; display: flex; align-items: stretch; }

/* ---------- Topbar ---------- */
.topbar {
  height: 52px;
  flex: 0 0 52px;
  background: var(--white);
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 18px;
  z-index: 10;
}
.brand { display: flex; align-items: center; gap: 8px; font-size: 15px; }
.brand-dot {
  width: 12px; height: 12px; border-radius: 50%;
  background: var(--tf-teal);
  box-shadow: 0 0 0 3px var(--tf-teal-light);
}
.brand strong { letter-spacing: -0.02em; }
.brand-sub { color: var(--muted); font-size: 12px; font-weight: 500; }
.topbar-actions { display: flex; align-items: center; gap: 12px; }
.env-pill {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px; color: var(--tf-teal-dark);
  background: var(--tf-teal-light); padding: 4px 9px; border-radius: 20px;
}
.btn-ghost {
  border: 1px solid var(--line); background: var(--white);
  color: var(--ink-2); font-size: 12.5px; font-weight: 500;
  padding: 6px 12px; border-radius: 8px; cursor: pointer;
  transition: all .15s;
}
.btn-ghost:hover { border-color: var(--tf-teal); color: var(--tf-teal-dark); }

/* ---------- Split ---------- */
.split { flex: 1; display: flex; min-height: 0; }
.pane { min-height: 0; overflow: hidden; }
.pane-phone {
  flex: 0 0 46%;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 14px;
  background:
    radial-gradient(1200px 500px at 30% -10%, #ffffff 0%, transparent 60%),
    var(--bg);
  border-right: 1px solid var(--line);
}
.pane-devtools { flex: 1; display: flex; flex-direction: column; background: var(--dt-bg); }

/* ---------- Uygulama gövdesi (nav tam genişlik, içerik 400 ortalı) ---------- */
.phone {
  position: relative;
  flex: 1; min-width: 0;
  min-height: 100dvh;
  background: #fbfdfc;
  display: flex; flex-direction: column;
}
/* Nav bar: tam genişlik; iç içerik 400px ortalı */
.phone-navbar {
  flex: 0 0 56px; display: flex; justify-content: center;
  border-bottom: 1px solid var(--line);
  background: var(--white); position: sticky; top: 0; z-index: 10;
}
.navbar-inner {
  width: 100%; max-width: 400px; padding: 0 8px;
  display: flex; align-items: center; justify-content: space-between;
}
.nav-title { flex: 1; text-align: center; font-size: 16px; font-weight: 600; color: var(--ink); display: flex; align-items: center; justify-content: center; }
.nav-logo { height: 30px; width: auto; object-fit: contain; }
.dc-empty-img { width: 84px; height: 84px; object-fit: contain; opacity: .8; }
.nav-back, .nav-right { min-width: 44px; display: flex; align-items: center; }
/* nav bar renkli (navigationBarBackgroundColor) → başlık/geri beyaz */
#navbar[style*="background"] .nav-title,
#navbar[style*="background"] .nav-back { color: #fff; }
.nav-back {
  border: none; background: none; font-size: 26px; line-height: 1;
  color: var(--tf-teal-dark); cursor: pointer;
}
.nav-right { display: flex; gap: 6px; align-items: center; justify-content: flex-end; min-width: 32px; }
.dc-navbtn {
  border: none; background: none; font-family: inherit; font-size: 13px; font-weight: 600;
  color: var(--tf-teal-dark); cursor: pointer; padding: 4px 6px; white-space: nowrap;
}
.dc-navbtn:hover { text-decoration: underline; }
/* nav bar renkli olduğunda (navigationBarBackgroundColor) buton beyaz */
#navbar[style*="background"] .dc-navbtn { color: #fff; }
.phone-body {
  flex: 1; min-height: 0;   /* flex çocuğunun varsayılan min-height:auto'su scroll'u öldürüyor */
  overflow-y: auto; overflow-x: hidden;
  display: flex; justify-content: center; -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;   /* kart sonuna gelince sayfa zıplamasın */
}
.phone-screen {
  width: 100%; max-width: 400px; align-self: flex-start;
  padding: 0 0 24px; background: #fbfdfc;
}
.phone-screen::-webkit-scrollbar { width: 5px; }
.phone-screen::-webkit-scrollbar-thumb { background: #d5e2df; border-radius: 3px; }

.phone-loading {
  position: absolute; inset: 0; background: rgba(255,255,255,.86);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 14px; z-index: 20; color: var(--ink-2); font-size: 13px; font-weight: 500;
}
.spinner {
  width: 34px; height: 34px; border-radius: 50%;
  border: 3px solid var(--tf-teal-light); border-top-color: var(--tf-teal);
  animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Sahne: TalkingHead avatar (arka plan) + Dinamo popup (üstte) ---------- */
.stage {
  flex: 1; min-width: 0; position: relative; overflow: hidden;
  background:
    radial-gradient(120% 90% at 50% 0%, #eafbf8 0%, #d7f1ec 42%, #b7e3db 100%);
}
#canvas-container { position: absolute; inset: 0; z-index: 1; }
#canvas-container canvas { display: block; width: 100% !important; height: 100% !important; }

.avatar-loading {
  position: absolute; inset: 0; z-index: 2;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 14px; color: var(--ink-2); font-size: 13px; font-weight: 500;
  /* Opak: GLB yüklenene kadar karakter görünmesin, sadece logo dursun */
  background: radial-gradient(120% 90% at 50% 0%, #eafbf8 0%, #d7f1ec 42%, #b7e3db 100%);
}
/* Kare uygulama ikonu (480×480, kendi teal zemini ve yuvarlak köşesiyle) */
.avatar-loading-logo {
  width: 132px; max-width: 44%; height: auto;
  border-radius: 22%;
  box-shadow: 0 10px 30px rgba(20, 60, 54, .18);
  margin-bottom: 10px;
}

/* Dinamo ekranı: avatarın üstünde yüzen kart */
.popup {
  position: absolute; z-index: 3;
  left: 50%; bottom: 0; transform: translateX(-50%);
  width: 100%; max-width: 400px; height: 100%;
  display: flex; align-items: flex-end;
  pointer-events: none;
}
.popup .phone {
  pointer-events: auto;
  flex: 1; min-width: 0;
  width: 100%; height: 60%;   /* Dinamo ekranı altta %60; üstteki %40 avatara kalıyor */
  min-height: 0;
  background: #fbfdfc;
  border-radius: 22px 22px 0 0;
  box-shadow: 0 -12px 48px rgba(20,60,54,.28);
  overflow: hidden;
  display: flex; flex-direction: column;
  animation: popup-in .5s cubic-bezier(.2,.8,.25,1);
}
/* Ekran aşağıdan yukarı gelir (.stage overflow:hidden olduğu için alttan kayar) */
@keyframes popup-in { from { transform: translateY(100%); } to { transform: translateY(0); } }
.popup .phone-navbar { border-radius: 22px 22px 0 0; }

/* ---------- Debug paneli (sağ: İstek/Yanıt) — max 400, kendi içinde scroll, açılır-kapanır ---------- */
.debug {
  flex: 0 0 400px; max-width: 400px; min-width: 0; overflow: hidden;
  height: 100dvh; position: sticky; top: 0;
  display: flex; flex-direction: column; background: var(--dt-bg); border-left: 1px solid var(--dt-line);
}
.app.debug-collapsed .debug { display: none; }
/* Dar ekran: panel sağdan açılır çekmece (gizlemek yerine kaydır) */
@media (max-width: 760px) {
  .debug {
    position: fixed; top: 0; right: 0; bottom: 0; height: 100dvh;
    width: min(420px, 100vw); max-width: none; flex: none;
    z-index: 90; box-shadow: -8px 0 32px rgba(20, 60, 54, .22);
    transform: translateX(0); transition: transform .25s ease;
  }
  .app.debug-collapsed .debug { display: flex; transform: translateX(100%); }
}
.debug-toggle {
  position: fixed; top: 10px; right: 10px; z-index: 100;
  border: 1px solid var(--dt-line); background: var(--dt-bg); color: var(--dt-text);
  font-family: inherit; font-size: 12px; font-weight: 600; padding: 6px 11px; border-radius: 8px; cursor: pointer; opacity: .92;
}
.debug-toggle:hover { opacity: 1; }
/* Toggle her genişlikte görünür (dar ekranda çekmeceyi açıp kapatır) */
.debug-head { flex: 0 0 42px; display: flex; align-items: center; justify-content: space-between; padding: 0 12px; border-bottom: 1px solid var(--dt-line); color: var(--dt-text); font-size: 12.5px; font-weight: 600; }
.debug-head button { border: 1px solid var(--dt-line); background: none; color: var(--dt-muted); font-family: inherit; font-size: 11px; padding: 3px 8px; border-radius: 6px; cursor: pointer; }
.debug-list { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 8px; display: flex; flex-direction: column; gap: 8px; }
.dbg-entry { border: 1px solid var(--dt-line); border-radius: 8px; background: var(--dt-panel); overflow: hidden; }
.dbg-head { display: flex; align-items: center; gap: 8px; padding: 8px 10px; font-family: 'JetBrains Mono', ui-monospace, monospace; font-size: 11.5px; cursor: pointer; user-select: none; }
.dbg-head:hover { background: rgba(255,255,255,.03); }
.dbg-caret { color: var(--dt-muted); font-size: 10px; transition: transform .15s; flex: 0 0 auto; }
.dbg-entry.open .dbg-caret { transform: rotate(90deg); }
/* Gövde varsayılan kapalı; başlığa tıklanınca açılır */
.dbg-body { display: none; }
.dbg-entry.open .dbg-body { display: block; }
.dbg-method { color: var(--dt-yellow); font-weight: 600; }
.dbg-action { color: var(--dt-purple); }
.dbg-status { margin-left: auto; font-size: 10.5px; padding: 2px 6px; border-radius: 8px; }
.dbg-status.ok { background: rgba(78,201,176,.15); color: var(--dt-green); }
.dbg-status.err { background: rgba(241,76,76,.15); color: var(--dt-red); }
.dbg-status.pending { color: var(--dt-muted); }
.dbg-url { padding: 0 10px 6px; color: var(--dt-blue); font-family: 'JetBrains Mono', monospace; font-size: 10.5px; word-break: break-all; }
.dbg-lbl { padding: 4px 10px 2px; font-size: 9.5px; text-transform: uppercase; letter-spacing: .06em; color: var(--dt-muted); }
.dbg-entry pre { margin: 0; padding: 0 10px 8px; font-family: 'JetBrains Mono', monospace; font-size: 10.5px; line-height: 1.45; color: var(--dt-text); white-space: pre-wrap; word-break: break-word; }
.dbg-log { font-family: 'JetBrains Mono', monospace; font-size: 11px; color: var(--dt-muted); padding: 4px 6px; }

/* İstek/Yanıt paneli tamamen gizli (artık gerek yok). DOM'da durur, görünmez. */
.debug, .debug-toggle { display: none !important; }

.stack-indicator {
  display: flex; gap: 6px; align-items: center;
  font-family: 'JetBrains Mono', monospace; font-size: 11px; color: var(--muted);
  min-height: 18px;
}
.stack-chip {
  padding: 3px 8px; border-radius: 6px; background: var(--white);
  border: 1px solid var(--line); color: var(--ink-2);
}
.stack-chip.top { border-color: var(--tf-teal); color: var(--tf-teal-dark); font-weight: 600; }

/* ============================================================
   Dinamo component stilleri (telefon içi)
   ============================================================ */
.dc { --pad: 20px; }
.dc-section { padding: 6px var(--pad); }
.dc-sectionHeader {
  padding: 18px var(--pad) 6px; font-size: 12px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .08em; color: var(--tf-teal-dark);
}
.dc-textView { padding: 6px var(--pad); font-size: 14px; line-height: 1.5; color: var(--ink-2); }
.dc-textView.title { font-size: 20px; font-weight: 700; color: var(--ink); padding-top: 16px; }
.dc-textView.info {
  background: var(--tf-teal-light); margin: 10px var(--pad); padding: 12px 14px;
  border-radius: 12px; color: var(--tf-teal-dark); font-size: 13px;
}
.dc-divider { height: 1px; background: var(--line); margin: 10px var(--pad); }
.dc-image { padding: 12px var(--pad); text-align: center; }
.dc-image .ph {
  height: 120px; border-radius: 14px; background: linear-gradient(135deg, var(--tf-teal-light), #d3ecea);
  display: flex; align-items: center; justify-content: center; color: var(--tf-teal-dark);
  font-size: 30px;
}

/* Inputs (floating label) */
.dc-field { padding: 8px var(--pad); }
.dc-input-wrap {
  position: relative; border: 1.5px solid var(--line); border-radius: 12px;
  background: var(--white); transition: border-color .15s;
}
.dc-input-wrap.focus { border-color: var(--tf-teal); }
.dc-input-wrap.error { border-color: #e5484d; }
.dc-input-wrap label {
  position: absolute; left: 14px; top: 15px; color: var(--muted); font-size: 15px;
  pointer-events: none; transition: all .15s; background: var(--white); padding: 0 4px;
}
.dc-input-wrap.filled label, .dc-input-wrap.focus label {
  top: -8px; font-size: 11.5px; color: var(--tf-teal-dark); font-weight: 600;
}
.dc-input-wrap input {
  width: 100%; border: none; outline: none; background: none;
  padding: 15px 14px; font-size: 15px; color: var(--ink); font-family: inherit;
}
.dc-field .err-text { color: #e5484d; font-size: 11.5px; margin: 5px 4px 0; min-height: 14px; }

/* Selection (radio / checkbox rows) */
.dc-selection { padding: 8px var(--pad); }
.dc-selection .sel-title { font-size: 13px; font-weight: 600; color: var(--ink); margin-bottom: 8px; }
.sel-row {
  display: flex; align-items: center; gap: 12px; padding: 13px 14px; margin-bottom: 8px;
  border: 1.5px solid var(--line); border-radius: 12px; cursor: pointer;
  background: var(--white); transition: all .12s; font-size: 14px; color: var(--ink);
}
.sel-row:hover { border-color: var(--tf-teal); }
.sel-row.selected { border-color: var(--tf-teal); background: var(--tf-teal-light); }
.sel-mark {
  width: 20px; height: 20px; flex: 0 0 20px; border: 2px solid var(--muted);
  display: flex; align-items: center; justify-content: center; color: #fff; font-size: 12px;
}
.sel-row.radio .sel-mark { border-radius: 50%; }
.sel-row.check .sel-mark { border-radius: 6px; }
.sel-row.selected .sel-mark { border-color: var(--tf-teal); background: var(--tf-teal); }
.sel-desc { margin-left: auto; color: var(--muted); font-size: 12px; }

/* Single checkbox / switch (agreements) */
.dc-checkline { display: flex; gap: 10px; align-items: flex-start; padding: 10px var(--pad); font-size: 13px; color: var(--ink-2); cursor: pointer; }
.dc-checkline .box {
  width: 20px; height: 20px; flex: 0 0 20px; border: 2px solid var(--muted); border-radius: 6px;
  display: flex; align-items: center; justify-content: center; color: #fff; font-size: 12px; margin-top: 1px;
}
.dc-checkline.on .box { background: var(--tf-teal); border-color: var(--tf-teal); }
.dc-checkline a { color: var(--tf-teal-dark); font-weight: 600; text-decoration: underline; }

/* Spinner / dropdown */
.dc-spinner { padding: 8px var(--pad); }
.dc-spinner .sp-box {
  border: 1.5px solid var(--line); border-radius: 12px; padding: 14px;
  display: flex; align-items: center; justify-content: space-between; cursor: pointer; background: var(--white);
}
.dc-spinner .sp-box .val { color: var(--ink); font-size: 15px; }
.dc-spinner .sp-box .val.placeholder { color: var(--muted); }
.dc-spinner .sp-box .chev { color: var(--muted); }

/* Key-value list */
.dc-kvlist { padding: 6px var(--pad); }
.kv-row { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.kv-row:last-child { border-bottom: none; }
.kv-row .k { color: var(--muted); font-size: 13px; }
.kv-row .v { color: var(--ink); font-size: 13px; font-weight: 600; text-align: right; }

/* Empty — boş durum ekranı (DinamoEmptyFragment) */
.dc-empty { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px; padding: 60px 30px; text-align: center; }
.dc-empty-ic { font-size: 44px; opacity: .35; filter: grayscale(1); }
.dc-empty-t { font-size: 15px; color: var(--ink-2); line-height: 1.5; }

/* AdditionalMenu — menü satırları (DinamoMenuListFragment) */
.dc-menu-section { padding: 14px var(--pad) 6px; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--tf-teal-dark); }
.dc-menu-row { display: flex; align-items: center; gap: 12px; padding: 16px var(--pad); border-bottom: 1px solid var(--line); cursor: pointer; background: #fff; transition: background .12s; }
.dc-menu-row:hover { background: #f6faf9; }
.dc-menu-t { flex: 1; font-size: 15px; color: var(--ink); }
.dc-menu-chev { color: var(--tf-teal); font-size: 20px; font-weight: 600; }

/* GenericKeyValue — tek satır key/value */
.dc-kvrow { display: flex; justify-content: space-between; gap: 12px; padding: 12px var(--pad); border-bottom: 1px solid var(--line); }
.dc-kvrow .kv-k { color: var(--muted); font-size: 13px; }
.dc-kvrow .kv-v { color: var(--ink); font-size: 13px; font-weight: 600; text-align: right; }

/* Buttons */
.dc-button { padding: 10px var(--pad); }
.dc-btn {
  width: 100%; border: none; border-radius: 14px; padding: 16px; font-size: 15px; font-weight: 600;
  cursor: pointer; font-family: inherit; transition: all .15s;
}
.dc-btn.primary { background: var(--tf-teal); color: #fff; }
.dc-btn.primary:hover { background: var(--tf-teal-dark); }
.dc-btn.primary:disabled { background: #b8d6d3; cursor: not-allowed; }
.dc-btn.secondary { background: var(--white); color: var(--tf-teal-dark); border: 1.5px solid var(--tf-teal); }
.dc-linkbtn { display: block; width: 100%; text-align: center; padding: 12px; background: none; border: none; color: var(--tf-teal-dark); font-size: 14px; font-weight: 600; cursor: pointer; font-family: inherit; }

/* Success screen */
.dc-success { padding: 40px var(--pad); text-align: center; }
.dc-success .ok {
  width: 78px; height: 78px; border-radius: 50%; background: var(--tf-teal-light);
  color: var(--tf-teal); font-size: 40px; display: flex; align-items: center; justify-content: center;
  margin: 0 auto 18px;
}
.dc-success h2 { font-size: 20px; margin: 0 0 8px; color: var(--ink); }
.dc-success p { color: var(--ink-2); font-size: 14px; margin: 0; line-height: 1.5; }

/* ProfileHeader — dashboard karşılama */
.dc-profile { display: flex; align-items: center; gap: 12px; padding: 16px var(--pad); }
.dc-profile-av {
  width: 48px; height: 48px; flex: 0 0 48px; border-radius: 50%; background: var(--tf-teal);
  color: #fff; display: flex; align-items: center; justify-content: center; font-size: 16px; font-weight: 700;
}
.dc-profile-title { font-size: 15px; color: var(--ink-2); }
.dc-profile-sub { font-size: 17px; font-weight: 700; color: var(--ink); }

/* List — seçilebilir menü kartı */
.dc-list-card {
  margin: 8px var(--pad); padding: 14px 16px; border-radius: 14px; background: #fff;
  border: 1px solid var(--line); box-shadow: 0 2px 10px -6px rgba(6,30,25,.15);
}
.dc-list-card.selectable { cursor: pointer; transition: all .12s; }
.dc-list-card.selectable:hover { border-color: var(--tf-teal); transform: translateY(-1px); box-shadow: 0 6px 16px -8px rgba(0,161,154,.35); }
.dc-list-card .dc-textView { padding: 2px 0; }

/* footer sticky */
.dc-footer { position: sticky; bottom: 0; background: linear-gradient(transparent, #fbfdfc 24%); padding-top: 8px; }

/* ProcessAuthorization — UI'sız ara işlem göstergesi */
.dc-processing { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; height: 100%; padding: 40px; text-align: center; }
.dc-processing-t { font-size: 15px; font-weight: 600; color: var(--ink); }
.dc-processing-s { font-size: 12px; color: var(--muted); font-family: 'JetBrains Mono', monospace; }

/* Alert (screenType: Alert) — telefon içi modal */
.dc-alert-overlay { position: absolute; inset: 0; background: rgba(8,20,17,.45); display: flex; align-items: center; justify-content: center; z-index: 25; padding: 24px; }
.dc-alert-card { background: #fff; border-radius: 16px; width: 100%; max-width: 280px; overflow: hidden; box-shadow: 0 20px 50px -10px rgba(6,30,25,.4); }
.dc-alert-title { padding: 16px 18px 0; font-size: 16px; font-weight: 700; color: var(--ink); text-align: center; }
.dc-alert-msg { padding: 16px 18px; font-size: 14px; line-height: 1.5; color: var(--ink-2); text-align: center; }
.dc-alert-row { display: flex; border-top: 1px solid var(--line); }
.dc-alert-btn { flex: 1; border: none; background: none; padding: 14px; font-size: 15px; font-weight: 600; cursor: pointer; font-family: inherit; }
.dc-alert-btn.cancel { color: var(--muted); border-right: 1px solid var(--line); }
.dc-alert-btn.other { color: var(--tf-teal); }
.dc-alert-btn:hover { background: #f6faf9; }

/* ============================================================
   DevTools (sağ panel)
   ============================================================ */
.devtools-tabs {
  flex: 0 0 42px; display: flex; align-items: center; gap: 2px;
  border-bottom: 1px solid var(--dt-line); padding: 0 10px; background: var(--dt-panel);
}
.tab {
  border: none; background: none; color: var(--dt-muted); font-family: inherit;
  font-size: 12.5px; font-weight: 500; padding: 8px 12px; cursor: pointer; border-radius: 7px;
}
.tab:hover { color: var(--dt-text); }
.tab.active { color: var(--dt-text); background: var(--dt-bg); }
.devtools-meta { margin-left: auto; color: var(--dt-muted); font-size: 11px; font-family: 'JetBrains Mono', monospace; }

.tab-panel { flex: 1; overflow-y: auto; display: none; }
.tab-panel.active { display: block; }
.tab-panel::-webkit-scrollbar { width: 8px; }
.tab-panel::-webkit-scrollbar-thumb { background: var(--dt-line); border-radius: 4px; }

/* Network entries */
.net-list { padding: 8px; display: flex; flex-direction: column; gap: 8px; }
.net-entry { border: 1px solid var(--dt-line); border-radius: 10px; overflow: hidden; background: var(--dt-panel); }
.net-head {
  display: flex; align-items: center; gap: 8px; padding: 10px 12px; cursor: pointer;
  font-family: 'JetBrains Mono', monospace; font-size: 12px; color: var(--dt-text);
}
.net-head:hover { background: #1a2632; }
.net-method { font-weight: 600; color: var(--dt-yellow); }
.net-action { color: var(--dt-purple); }
.net-status { margin-left: auto; font-size: 11px; padding: 2px 7px; border-radius: 10px; }
.net-status.ok { background: rgba(78,201,176,.15); color: var(--dt-green); }
.net-status.err { background: rgba(241,76,76,.15); color: var(--dt-red); }
.net-status.pending { background: rgba(220,220,170,.15); color: var(--dt-yellow); }
.net-dur { color: var(--dt-muted); font-size: 11px; }
.net-body { border-top: 1px solid var(--dt-line); display: none; }
.net-entry.open .net-body { display: block; }
.net-seg { padding: 8px 12px; border-bottom: 1px solid var(--dt-line); }
.net-seg:last-child { border-bottom: none; }
.net-seg .lbl { font-size: 10px; text-transform: uppercase; letter-spacing: .08em; color: var(--dt-muted); margin-bottom: 5px; }
.net-seg pre {
  margin: 0; font-family: 'JetBrains Mono', monospace; font-size: 11.5px; line-height: 1.5;
  color: var(--dt-text); white-space: pre-wrap; word-break: break-word;
}
.net-url { color: var(--dt-blue); }
.chev-toggle { color: var(--dt-muted); transition: transform .15s; }
.net-entry.open .chev-toggle { transform: rotate(90deg); }

/* JSON syntax colors */
.j-key { color: var(--dt-blue); }
.j-str { color: var(--dt-orange); }
.j-num { color: var(--dt-green); }
.j-bool { color: var(--dt-purple); }
.j-null { color: var(--dt-muted); }

/* Console */
.console-list { padding: 8px; font-family: 'JetBrains Mono', monospace; font-size: 12px; }
.log-line { padding: 5px 8px; border-radius: 6px; display: flex; gap: 8px; line-height: 1.5; }
.log-line .ts { color: var(--dt-muted); flex: 0 0 auto; }
.log-line .tag { flex: 0 0 auto; font-weight: 600; }
.log-line.info .tag { color: var(--dt-blue); }
.log-line.action .tag { color: var(--dt-purple); }
.log-line.render .tag { color: var(--dt-green); }
.log-line.nav .tag { color: var(--dt-yellow); }
.log-line.error .tag { color: var(--dt-red); }
.log-line .msg { color: var(--dt-text); word-break: break-word; }

.state-view {
  margin: 0; padding: 14px; font-family: 'JetBrains Mono', monospace; font-size: 12px;
  color: var(--dt-text); line-height: 1.6; white-space: pre-wrap; word-break: break-word;
}

/* ---------- Mode toggle (Otomatik / Simülatör) ---------- */
.mode-toggle { display: inline-flex; background: var(--bg); border: 1px solid var(--line); border-radius: 9px; padding: 2px; }
.mode-opt {
  border: none; background: none; font-family: inherit; font-size: 12px; font-weight: 600;
  color: var(--muted); padding: 5px 12px; border-radius: 7px; cursor: pointer;
}
.mode-opt.active { background: var(--tf-teal); color: #fff; }

/* ---------- Simülatör paneli ---------- */
#tab-simulator { display: none; flex-direction: column; }
#tab-simulator.active { display: flex; }
.sim-empty { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; color: var(--dt-muted); padding: 30px; gap: 8px; }
.sim-empty-ic { font-size: 40px; }
.sim-empty p { font-size: 13px; line-height: 1.7; }
.sim-empty strong { color: var(--dt-text); }

.sim-live { flex: 1; display: flex; flex-direction: column; min-height: 0; }
.sim-req { border-bottom: 1px solid var(--dt-line); padding: 10px 12px; max-height: 30%; overflow: auto; }
.sim-lbl { font-size: 10px; text-transform: uppercase; letter-spacing: .08em; color: var(--dt-muted); margin-bottom: 6px; }
.sim-action { color: var(--dt-purple); margin-left: 6px; text-transform: none; letter-spacing: 0; font-weight: 600; }
.sim-req pre { margin: 0; font-family: 'JetBrains Mono', monospace; font-size: 11px; line-height: 1.5; color: var(--dt-text); white-space: pre-wrap; word-break: break-word; }

.sim-resp { flex: 1; display: flex; flex-direction: column; min-height: 0; padding: 10px 12px; }
.sim-lbl-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; margin-bottom: 6px; }
.sim-tpls { display: flex; flex-wrap: wrap; gap: 4px; justify-content: flex-end; }
.sim-tpl {
  border: 1px solid var(--dt-line); background: var(--dt-panel); color: var(--dt-text);
  font-family: inherit; font-size: 10.5px; padding: 3px 8px; border-radius: 12px; cursor: pointer;
}
.sim-tpl:hover { border-color: var(--dt-green); color: var(--dt-green); }
#simRespBody {
  flex: 1; min-height: 160px; resize: none; background: #0b1219; border: 1px solid var(--dt-line);
  border-radius: 8px; padding: 10px; font-family: 'JetBrains Mono', monospace; font-size: 12px;
  line-height: 1.5; color: var(--dt-text); outline: none;
}
#simRespBody:focus { border-color: var(--dt-green); }
.sim-palette { display: flex; flex-wrap: wrap; gap: 4px; margin: 8px 0; }
.sim-chip {
  border: 1px dashed var(--dt-line); background: none; color: var(--dt-muted);
  font-family: 'JetBrains Mono', monospace; font-size: 10.5px; padding: 3px 7px; border-radius: 6px; cursor: pointer;
}
.sim-chip:hover { border-color: var(--dt-blue); color: var(--dt-blue); border-style: solid; }
.sim-actions { display: flex; align-items: center; gap: 12px; }
.sim-err { margin-right: auto; color: var(--dt-red); font-size: 12px; }
.sim-send {
  border: none; background: var(--dt-green); color: #052; font-size: 13px; font-weight: 700;
  padding: 9px 18px; border-radius: 8px; cursor: pointer; font-family: inherit;
}
.sim-send:hover { filter: brightness(1.1); }

/* ---------- Import sheet (Response Yükle) ---------- */
#importSheet { position: fixed; inset: 0; z-index: 100; display: flex; align-items: center; justify-content: center; }
.import-backdrop { position: absolute; inset: 0; background: rgba(8, 20, 17, .5); }
.import-card {
  position: relative; width: min(680px, 92vw); max-height: 86vh; background: var(--white);
  border-radius: 16px; box-shadow: 0 30px 80px -20px rgba(6,30,25,.5); display: flex; flex-direction: column;
  overflow: hidden;
}
.import-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 18px; border-bottom: 1px solid var(--line); }
.import-head strong { font-size: 15px; }
.import-close { border: none; background: none; font-size: 16px; color: var(--muted); cursor: pointer; }
.import-hint { margin: 14px 18px 8px; font-size: 13px; color: var(--ink-2); line-height: 1.5; }
.import-hint code { background: var(--tf-teal-light); color: var(--tf-teal-dark); padding: 1px 6px; border-radius: 5px; font-size: 12px; }
.import-ta {
  margin: 4px 18px; flex: 1; min-height: 260px; resize: vertical; border: 1.5px solid var(--line);
  border-radius: 10px; padding: 12px; font-family: 'JetBrains Mono', monospace; font-size: 12.5px;
  line-height: 1.5; color: var(--ink); outline: none;
}
.import-ta:focus { border-color: var(--tf-teal); }
.import-actions { display: flex; align-items: center; justify-content: flex-end; gap: 14px; padding: 14px 18px; }
.import-err { margin-right: auto; color: #e5484d; font-size: 12.5px; }
.import-render {
  border: none; background: var(--tf-teal); color: #fff; font-size: 14px; font-weight: 600;
  padding: 10px 20px; border-radius: 10px; cursor: pointer; font-family: inherit;
}
.import-render:hover { background: var(--tf-teal-dark); }
