/* =====================================================================
   HTS Analiz — tasarım sistemi
   Belirteçler (token) → temel öğeler → bileşenler → sayfa düzeni.
   Boşluk ölçeği 4px tabanlı: 4 8 12 16 20 24 32 48. Yazı ölçeği: 12 13 14 16 20 24.
   ===================================================================== */
:root {
  color-scheme: light;
  --bg: #f4f6f9;           /* sayfa zemini */
  --surface: #ffffff;      /* kart */
  --surface-2: #f8fafc;    /* kart içi ikincil alan, tablo başlığı */
  --surface-3: #eef2f6;    /* hover */
  --border: #e3e8ef;
  --border-strong: #cdd5df;
  --text: #0f172a;
  --text-2: #334155;
  --muted: #64748b;        /* 4.6:1 beyaz üzerinde */
  --primary: #2563eb;
  --primary-2: #1d4ed8;
  --primary-soft: #eaf1fe;
  --primary-ring: rgba(37, 99, 235, .35);
  --ok: #15803d; --ok-soft: #e9f7ee;
  --warn: #b45309; --warn-soft: #fff4e5;
  --err: #c0262d; --err-soft: #fdecec;
  --violet: #6d4fd8; --violet-soft: #f1edfd;
  --amber: #b7791f; --amber-soft: #fdf4e3;
  --sidebar: #0f172a; --sidebar-2: #1e293b; --sidebar-text: #cbd5e1; --sidebar-muted: #7c8ba1; --sidebar-active: #ffffff;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, .06);
  --shadow: 0 1px 3px rgba(15, 23, 42, .08), 0 1px 2px rgba(15, 23, 42, .04);
  --shadow-lg: 0 12px 32px rgba(15, 23, 42, .18);
  --r-sm: 6px; --r: 10px; --r-lg: 14px;
  --font: "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", sans-serif;
  --mono: "Cascadia Mono", Consolas, ui-monospace, monospace;
  --sidebar-w: 260px; --topbar-h: 60px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #0b1017; --surface: #121821; --surface-2: #171e29; --surface-3: #1d2633; --border: #243041; --border-strong: #33425a;
    --text: #e8edf4; --text-2: #c4cedb; --muted: #8e9bb0;
    --primary: #5b93f5; --primary-2: #7aa8f8; --primary-soft: #16233b; --primary-ring: rgba(91, 147, 245, .4);
    --ok: #4cc47a; --ok-soft: #12291c; --warn: #f0ae4c; --warn-soft: #2e2413; --err: #f27474; --err-soft: #321a1c;
    --violet: #a08cf5; --violet-soft: #221d3b; --amber: #e7b04f; --amber-soft: #2c2413;
    --sidebar: #0a0e14; --sidebar-2: #151c27; --sidebar-text: #b9c4d3; --sidebar-muted: #6f7d92;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, .4); --shadow: 0 1px 3px rgba(0, 0, 0, .45); --shadow-lg: 0 12px 32px rgba(0, 0, 0, .55);
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0b1017; --surface: #121821; --surface-2: #171e29; --surface-3: #1d2633; --border: #243041; --border-strong: #33425a;
  --text: #e8edf4; --text-2: #c4cedb; --muted: #8e9bb0;
  --primary: #5b93f5; --primary-2: #7aa8f8; --primary-soft: #16233b; --primary-ring: rgba(91, 147, 245, .4);
  --ok: #4cc47a; --ok-soft: #12291c; --warn: #f0ae4c; --warn-soft: #2e2413; --err: #f27474; --err-soft: #321a1c;
  --violet: #a08cf5; --violet-soft: #221d3b; --amber: #e7b04f; --amber-soft: #2c2413;
  --sidebar: #0a0e14; --sidebar-2: #151c27; --sidebar-text: #b9c4d3; --sidebar-muted: #6f7d92;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .4); --shadow: 0 1px 3px rgba(0, 0, 0, .45); --shadow-lg: 0 12px 32px rgba(0, 0, 0, .55);
}

/* ---------------------------------------------------------------- temel */
* { box-sizing: border-box; }
html, body, #app { height: 100%; margin: 0; }
body { background: var(--bg); color: var(--text); font: 14px/1.5 var(--font); -webkit-font-smoothing: antialiased; }
body.noscroll { overflow: hidden; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--primary); text-underline-offset: 2px; }
h1, h2, h3 { margin: 0; line-height: 1.3; color: var(--text); }
h1 { font-size: 24px; font-weight: 700; letter-spacing: -.01em; }
h2 { font-size: 16px; font-weight: 650; }
h3 { font-size: 14px; font-weight: 650; margin: 16px 0 8px; }
p { margin: 0; }
.muted { color: var(--muted); }
.mono { font-family: var(--mono); font-size: 12.5px; font-variant-numeric: tabular-nums; }
.small { font-size: 12px; }
.warntext { color: var(--warn); }
.spacer { flex: 1; }
.grow { flex: 1; min-width: 0; }
.ic { flex: none; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; } }

/* ---------------------------------------------------------------- düğmeler */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 36px; padding: 0 14px;
  border: 1px solid var(--border-strong); background: var(--surface); color: var(--text-2); border-radius: 8px;
  font-weight: 600; font-size: 13.5px; cursor: pointer; text-decoration: none; white-space: nowrap;
  transition: background-color .15s, border-color .15s, box-shadow .15s, color .15s; box-shadow: var(--shadow-sm); }
.btn:hover { background: var(--surface-2); border-color: var(--muted); color: var(--text); }
.btn:active { background: var(--surface-3); }
.btn.primary { background: var(--primary); border-color: var(--primary); color: #fff; }
.btn.primary:hover { background: var(--primary-2); border-color: var(--primary-2); }
.btn.danger { color: var(--err); }
.btn.danger:hover { background: var(--err-soft); border-color: var(--err); }
.btn.ghost { background: transparent; border-color: transparent; box-shadow: none; }
.btn.ghost:hover { background: var(--surface-3); }
.btn.sm { height: 30px; padding: 0 10px; font-size: 12.5px; gap: 5px; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn.link-btn { margin-top: 12px; }
.gbtn .ic { color: var(--primary); }
.btn-icon { display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 8px; border: 1px solid transparent;
  background: transparent; color: var(--muted); cursor: pointer; transition: background-color .15s, color .15s; }
.btn-icon:hover { background: var(--surface-3); color: var(--text); }

/* ---------------------------------------------------------------- form */
input[type=text], input[type=password], input[type=number], input[type=datetime-local], input[type=date], input[type=search], select, textarea {
  width: 100%; height: 38px; padding: 0 12px; border: 1px solid var(--border-strong); border-radius: 8px; background: var(--surface);
  color: var(--text); transition: border-color .15s, box-shadow .15s; }
textarea { height: auto; padding: 8px 12px; resize: vertical; }
input:hover, select:hover, textarea:hover { border-color: var(--muted); }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-ring); }
input::placeholder, textarea::placeholder { color: var(--muted); }
label { display: block; font-size: 12.5px; font-weight: 600; color: var(--text-2); margin: 12px 0 6px; }
.checkrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 6px 14px;
  margin: 0 8px 8px 0;
  font-size: 13px;
  font-weight: 550;
  color: var(--text-2);
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 8px;
  cursor: pointer;
  transition: all .16s ease;
  user-select: none;
}
.checkrow:hover {
  border-color: var(--primary);
  color: var(--text);
  background: var(--surface-3);
}
.checkrow:has(input:checked) {
  background: color-mix(in srgb, var(--primary) 14%, var(--surface));
  border-color: var(--primary);
  color: var(--text);
}
.checkrow input[type=checkbox], input[type=checkbox] {
  appearance: none;
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  border: 1.5px solid var(--border-strong);
  border-radius: 5px;
  outline: none;
  background: var(--surface);
  cursor: pointer;
  position: relative;
  display: grid;
  place-content: center;
  margin: 0;
  flex: none;
  transition: all .15s cubic-bezier(0.16, 1, 0.3, 1);
}
.checkrow input[type=checkbox]:hover, input[type=checkbox]:hover {
  border-color: var(--primary);
}
.checkrow input[type=checkbox]:checked, input[type=checkbox]:checked {
  background: var(--primary);
  border-color: var(--primary);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--primary) 25%, transparent);
}
.checkrow input[type=checkbox]::before, input[type=checkbox]::before {
  content: "";
  width: 9px;
  height: 5px;
  border-left: 2px solid #fff;
  border-bottom: 2px solid #fff;
  transform: rotate(-45deg) scale(0);
  transform-origin: center;
  transition: transform .12s ease-in-out;
  margin-top: -1.5px;
}
.checkrow input[type=checkbox]:checked::before, input[type=checkbox]:checked::before {
  transform: rotate(-45deg) scale(1);
}
.checkrow input[type=checkbox]:focus-visible, input[type=checkbox]:focus-visible {
  box-shadow: 0 0 0 3px var(--primary-ring);
}
.row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.stack > * + * { margin-top: 16px; }
.searchbox { position: relative; flex: 1; max-width: 520px; }
.searchbox .ic { position: absolute; left: 12px; top: 11px; color: var(--muted); pointer-events: none; }
.searchbox input { padding-left: 36px; }
.search { min-width: 0; }

/* ---------------------------------------------------------------- uyarı kutuları */
.notice { display: flex; gap: 8px; align-items: flex-start; border-radius: 8px; padding: 10px 12px; font-size: 13px; border: 1px solid transparent; }
.notice .ic { margin-top: 1px; }
.notice + .notice { margin-top: 8px; }
.notice.warn { background: var(--warn-soft); color: var(--warn); }
.notice.info { background: var(--primary-soft); color: var(--text-2); }
.notice.err { background: var(--err-soft); color: var(--err); }
.notice.ok { background: var(--ok-soft); color: var(--ok); }
.help { background: var(--surface-2); border: 1px solid var(--border); border-radius: 8px; padding: 10px 12px; font-size: 13px; color: var(--text-2); margin: 0 0 12px; }
.help strong { color: var(--text); }
.verdict { border-left: 3px solid var(--primary); padding: 8px 12px; background: var(--primary-soft); border-radius: 0 8px 8px 0; margin: 8px 0; font-weight: 500; }

/* ---------------------------------------------------------------- giriş */
.auth { min-height: 100%; display: grid; place-items: center; padding: 16px; background:
  radial-gradient(1200px 600px at 10% -10%, var(--primary-soft), transparent 60%), var(--bg); }
.auth .card { width: 100%; max-width: 420px; padding: 32px; box-shadow: var(--shadow-lg); }
.authbrand { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.authbrand b { display: block; font-size: 18px; }
.authbrand small { color: var(--muted); }
.secret { font-family: var(--mono); font-size: 16px; letter-spacing: 1px; background: var(--surface-2); border: 1px dashed var(--border-strong);
  padding: 12px; border-radius: 8px; word-break: break-all; user-select: all; }

/* ---------------------------------------------------------------- uygulama düzeni */
.layout { display: grid; grid-template-columns: var(--sidebar-w) minmax(0, 1fr); height: 100%; }
.sidebar { background: var(--sidebar); color: var(--sidebar-text); display: flex; flex-direction: column; min-height: 0; overflow-y: auto; }
.side-brand { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 20px; height: var(--topbar-h); color: #fff; border-bottom: 1px solid rgba(255, 255, 255, .06); }
.side-brand-link { display: flex; align-items: center; gap: 12px; text-decoration: none; color: #fff; min-width: 0; }
.side-brand b { display: block; font-size: 15px; line-height: 1.2; }
.side-brand small { color: var(--sidebar-muted); font-size: 11.5px; }
.side-close-btn { display: none; color: var(--sidebar-muted); border-radius: 8px; }
.side-close-btn:hover { background: var(--sidebar-2); color: #fff; }
.brandmark { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 9px; background: linear-gradient(135deg, #3b82f6, #6366f1); color: #fff; flex: none; }
.brandmark.lg { width: 44px; height: 44px; border-radius: 12px; }
.side-nav { padding: 8px 12px 16px; flex: 1; }
.nav-sec { font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--sidebar-muted); padding: 16px 8px 8px; }
.nav-item { display: flex; align-items: center; gap: 12px; height: 40px; padding: 0 12px; border-radius: 8px; color: var(--sidebar-text);
  text-decoration: none; font-weight: 550; position: relative; transition: background-color .15s, color .15s; }
.nav-item:hover { background: var(--sidebar-2); color: #fff; }
.nav-item.on { background: var(--sidebar-2); color: var(--sidebar-active); }
.nav-item.on::before { content: ""; position: absolute; left: -12px; top: 8px; bottom: 8px; width: 3px; border-radius: 0 3px 3px 0; background: #60a5fa; }
.nav-item.on .ic { color: #60a5fa; }
.nav-count { font-size: 11.5px; font-variant-numeric: tabular-nums; color: var(--sidebar-muted); background: rgba(255, 255, 255, .06); padding: 1px 8px; border-radius: 999px; }
.side-case { margin: 0 4px 8px; padding: 10px 12px; border-radius: 8px; background: rgba(255, 255, 255, .04); border: 1px solid rgba(255, 255, 255, .06); }
.side-case b { display: block; color: #fff; font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.side-case small { color: var(--sidebar-muted); font-family: var(--mono); font-size: 11.5px; }
.side-user { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-top: 1px solid rgba(255, 255, 255, .06); }
.side-user b { display: block; color: #fff; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.side-user small { color: var(--sidebar-muted); font-size: 11.5px; }
.side-user .btn-icon { color: var(--sidebar-muted); }
.side-user .btn-icon:hover { background: var(--sidebar-2); color: #fff; }
.avatar { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: #334155; color: #fff; font-weight: 700; font-size: 12.5px; flex: none; }

.main { display: flex; flex-direction: column; min-width: 0; min-height: 0; height: 100%; overflow: hidden; }
.topbar { flex: none; height: var(--topbar-h); display: flex; align-items: center; gap: 12px; padding: 0 24px; background: var(--surface); border-bottom: 1px solid var(--border); }
.case-tabs { display: none; }
.menu-btn { display: none; }
.crumbs { display: flex; align-items: center; gap: 8px; min-width: 0; font-size: 13.5px; }
.crumbs a { color: var(--muted); text-decoration: none; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 280px; }
.crumbs a:hover { color: var(--text); text-decoration: underline; }
.crumbs .sep { color: var(--border-strong); }
.crumbs .cur { font-weight: 600; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.page { overflow: auto; scroll-padding-top: 16px; }
.wrap { max-width: 1440px; margin: 0 auto; padding: 24px 32px 48px; }
.scrim { display: none; }
.pagehead { display: flex; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 24px; }
.pagehead p { color: var(--muted); margin-top: 4px; max-width: 900px; }
.pageactions { display: flex; gap: 8px; flex-wrap: wrap; }
.toolbar { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin: 24px 0 16px; }
.view > * + * { margin-top: 24px; }
.sectionhead { margin-bottom: -8px; }
.sectionhead p { color: var(--muted); font-size: 13px; margin-top: 2px; }

/* ---------------------------------------------------------------- kartlar */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); box-shadow: var(--shadow); min-width: 0; }
.card > .cardbody, .card > .tablewrap { padding: 0 20px 20px; }
.card:not(:has(> .cardhead)) > .cardbody { padding-top: 20px; }
.filtercard, .qcol > .card { padding: 16px 20px 20px; }
#results > .rbody { padding: 0 20px 20px; }
.filtercard > label { margin-top: 16px; }
.cardhead { display: flex; align-items: flex-start; gap: 12px; flex-wrap: wrap; padding: 16px 20px 12px; }
.cardhead p { color: var(--muted); font-size: 12.5px; margin-top: 2px; }
.cardbody > .tablewrap:first-child, .cardbody > .help:first-child { margin-top: 0; }
.section-title { font-size: 11.5px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .07em; margin: 24px 0 12px; }
.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; align-items: start; }
.grid2.top { align-items: start; }
.empty { display: grid; justify-items: center; gap: 8px; text-align: center; color: var(--muted); padding: 32px 16px; }
.empty-ic { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: var(--surface-3); color: var(--muted); }
.empty p { max-width: 420px; }

/* KPI kutucukları */
.statgrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; }
.stat { display: flex; gap: 16px; align-items: flex-start; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); padding: 16px 20px; box-shadow: var(--shadow); position: relative; }
.stat.clickable {
  cursor: pointer;
  transition: transform .16s cubic-bezier(0.16, 1, 0.3, 1), box-shadow .16s ease, border-color .16s ease;
  user-select: none;
}
.stat.clickable:hover {
  transform: translateY(-2px);
  border-color: var(--primary);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.28);
}
.stat.clickable:active {
  transform: translateY(0);
}
.stat-ic { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 10px; flex: none; }
.stat-label { font-size: 12.5px; font-weight: 600; color: var(--muted); }
.stat-value { font-size: 24px; font-weight: 700; line-height: 1.2; letter-spacing: -.01em; font-variant-numeric: tabular-nums; }
.stat-sub { font-size: 12px; color: var(--muted); margin-top: 2px; }
.stat-action {
  color: var(--muted);
  opacity: .5;
  transition: transform .15s ease, opacity .15s ease, color .15s ease;
  display: flex;
  align-items: center;
  align-self: center;
  margin-left: 4px;
}
.stat.clickable:hover .stat-action {
  opacity: 1;
  transform: translateX(3px);
  color: var(--primary);
}
.tone-blue .stat-ic { background: var(--primary-soft); color: var(--primary); }
.tone-green .stat-ic { background: var(--ok-soft); color: var(--ok); }
.tone-red .stat-ic { background: var(--err-soft); color: var(--err); }
.tone-violet .stat-ic { background: var(--violet-soft); color: var(--violet); }
.tone-amber .stat-ic { background: var(--amber-soft); color: var(--amber); }

/* açıklama kutusu */
.callout { background: var(--surface); border: 1px solid var(--border); border-left: 4px solid var(--primary); border-radius: var(--r); padding: 12px 16px; box-shadow: var(--shadow-sm); }
.callout summary { display: flex; align-items: center; gap: 8px; cursor: pointer; font-weight: 650; color: var(--text); list-style: none; }
.callout summary::-webkit-details-marker { display: none; }
.callout summary .ic { color: var(--primary); }
.callout-body { padding: 8px 0 4px 26px; color: var(--text-2); font-size: 13.5px; }
.callout-body p + p { margin-top: 8px; }

/* ---------------------------------------------------------------- etiketler */
.chips { display: flex; flex-wrap: wrap; gap: 4px; }
.chip { display: inline-flex; align-items: center; gap: 4px; height: 22px; border: 1px solid var(--border); border-left: 3px solid var(--lc, var(--border-strong));
  background: var(--surface-2); border-radius: 6px; padding: 0 8px; font-size: 12px; white-space: nowrap; color: var(--text-2); }
.chip b { color: var(--text); }
.chip.link { cursor: pointer; } .chip.link:hover { border-color: var(--primary); color: var(--text); }
.chip.warn { background: var(--warn-soft); color: var(--warn); border-color: transparent; border-left-color: var(--warn); }
.badge { display: inline-flex; align-items: center; height: 22px; padding: 0 8px; border-radius: 999px; font-size: 11.5px; font-weight: 650; background: var(--surface-3); color: var(--text-2); white-space: nowrap; }
.badge.kendi { background: var(--primary-soft); color: var(--primary); }
.badge.ters { background: var(--warn-soft); color: var(--warn); }
.badge.ok { background: var(--ok-soft); color: var(--ok); }
.badge.err { background: var(--err-soft); color: var(--err); }
.code { display: inline-flex; align-items: center; height: 20px; padding: 0 6px; border-radius: 5px; font-size: 11.5px; font-weight: 750; letter-spacing: .02em; flex: none;
  color: var(--text); background: color-mix(in srgb, var(--lc) 16%, var(--surface)); border: 1px solid var(--lc); }
.dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; flex: none; }
.sw { width: 12px; height: 12px; border-radius: 3px; display: inline-block; flex: none; }
.evb { display: inline-flex; align-items: center; height: 22px; color: #fff; border-radius: 999px; padding: 0 10px; font-size: 11.5px; font-weight: 650; white-space: nowrap; }
.who { display: inline-flex; gap: 8px; align-items: flex-start; line-height: 1.35; }
.who.link { cursor: pointer; } .who.link:hover b { color: var(--primary); text-decoration: underline; }

/* ---------------------------------------------------------------- soruşturma listesi */
.casegrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(360px, 1fr)); gap: 16px; }
.casecard { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); box-shadow: var(--shadow);
  padding: 20px; text-decoration: none; color: inherit; transition: border-color .15s, box-shadow .15s, transform .15s; }
.casecard:hover { border-color: var(--primary); box-shadow: var(--shadow-lg); transform: translateY(-2px); }
.casecard h3 { font-size: 16px; margin: 0; }
.casecard .desc { margin-top: 8px; color: var(--muted); font-size: 13px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.casestats { display: grid; grid-template-columns: 1fr 1fr 1.5fr; gap: 8px; margin-top: 16px; }
.casestats > div { background: var(--surface-2); border: 1px solid var(--border); border-radius: 8px; padding: 8px 12px; }
.casestats b { display: block; font-size: 16px; font-variant-numeric: tabular-nums; }
.casestats span { font-size: 11.5px; color: var(--muted); }
.cardfoot { display: flex; align-items: center; gap: 16px; margin-top: auto; padding-top: 16px; font-size: 12px; color: var(--muted); }
.cardfoot > span { display: inline-flex; align-items: center; gap: 4px; }
.casecard .cardfoot { border-top: 1px solid var(--border); margin-top: 16px; }
.cardfoot .open { margin-left: auto; color: var(--primary); font-weight: 650; }
.onboard { max-width: 720px; padding: 24px; }
.steps { padding-left: 20px; margin: 16px 0 24px; }
.steps li { margin-bottom: 12px; }
.steps b { display: block; }
.steps span { color: var(--muted); font-size: 13px; }

/* ---------------------------------------------------------------- hat kartları */
.linegrid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
  align-items: stretch;
}
@media (min-width: 1700px) {
  .linegrid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (max-width: 1100px) {
  .linegrid { grid-template-columns: minmax(0, 1fr); }
}
.linecard {
  padding: 22px;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}
.linecard:hover {
  box-shadow: var(--shadow-lg);
  border-color: color-mix(in srgb, var(--lc) 60%, var(--border));
}
.linecard::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 4px; background: var(--lc); }
.linecard .cardactions {
  margin-top: auto;
  padding-top: 16px;
  border-top: 1px solid var(--border);
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.linecard-empty-state {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 24px 16px;
  margin: 16px 0;
  background: var(--surface-2);
  border: 1px dashed var(--border-strong);
  border-radius: var(--r);
  gap: 10px;
}
.linecard-empty-state .empty-icon {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--warn-soft);
  color: var(--warn);
  display: grid;
  place-items: center;
}
.linehead { display: flex; align-items: center; gap: 12px; }
.lineavatar { display: grid; place-items: center; min-width: 44px; height: 44px; padding: 0 6px; border-radius: 12px; font-weight: 800; font-size: 14px;
  color: var(--text); background: color-mix(in srgb, var(--lc) 18%, var(--surface)); border: 2px solid var(--lc); }
.lname { font-size: 16px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lmeta { color: var(--muted); font-size: 12.5px; }
.chartbox { margin-top: 16px; padding: 12px 12px 4px; background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--r); }
.chart-cap { display: flex; justify-content: space-between; gap: 8px; font-size: 12px; font-weight: 600; color: var(--text-2); margin-bottom: 4px; }
.chart-cap .muted { font-weight: 500; }
.bars { width: 100%; height: auto; display: block; overflow: visible; }
.bars-base { stroke: var(--border-strong); stroke-width: 1; }
.bars-axis { fill: var(--muted); font-size: 10px; }
.bar-hit { fill: transparent; }
.bar:hover .bar-hit { fill: var(--surface-3); }
.metrics { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px 24px; margin-top: 16px; }
.metric { display: flex; align-items: center; gap: 8px; padding: 6px 0; border-bottom: 1px solid var(--border); font-size: 13px; }
.metric-l { flex: 1; color: var(--text-2); }
.metric b { font-variant-numeric: tabular-nums; }
.facts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin: 16px 0 0; }
.facts > div { background: var(--surface-2); border-radius: 8px; padding: 8px 12px; }
.facts dt { font-size: 11.5px; color: var(--muted); }
.facts dd { margin: 0; font-weight: 700; font-variant-numeric: tabular-nums; }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 4px 16px; font-size: 13px; margin: 0; }
.kv dt { color: var(--muted); } .kv dd { margin: 0; overflow-wrap: anywhere; }

/* ---------------------------------------------------------------- tablolar */
.tablewrap { overflow: auto; max-height: 70vh; border: 1px solid var(--border); border-radius: var(--r); background: var(--surface); }
table.t { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 13px; }
table.t th { text-align: left; font-weight: 650; color: var(--muted); font-size: 11.5px; text-transform: uppercase; letter-spacing: .04em;
  border-bottom: 1px solid var(--border); padding: 10px 12px; position: sticky; top: 0; background: var(--surface-2); z-index: 1; white-space: nowrap; }
table.t td { border-bottom: 1px solid var(--border); padding: 10px 12px; vertical-align: top; color: var(--text-2); }
table.t tr:last-child td { border-bottom: 0; }
table.t tr.click { cursor: pointer; }
table.t tr.click:hover td { background: var(--surface-2); }
.num { text-align: right !important; font-variant-numeric: tabular-nums; white-space: nowrap; }

/* ---------------------------------------------------------------- filtreler */
.filterbar { display: grid; grid-template-columns: 2fr 1fr 1.3fr 1fr; gap: 12px; }
.filterrow { display: flex; gap: 12px; flex-wrap: wrap; align-items: flex-end; }
.filterrow > div { flex: 1 1 180px; min-width: 0; }
.filterrow > div.bottom { flex: 0 0 auto; }
.filterrow label { margin-top: 0; }
.filtercard .cardbody > label { margin-top: 16px; }
.evchips { display: flex; flex-wrap: wrap; gap: 8px; }
.evchip { display: inline-flex; align-items: center; gap: 8px; height: 32px; border: 1px solid var(--border-strong); background: var(--surface); border-radius: 999px;
  padding: 0 12px 0 10px; cursor: pointer; font-size: 13px; font-weight: 550; color: var(--muted); transition: all .15s; }
.evchip b { font-variant-numeric: tabular-nums; font-size: 12px; color: var(--muted); font-weight: 600; }
.evchip:hover { border-color: var(--c); }
.evchip.on { color: var(--text); border-color: var(--c); background: color-mix(in srgb, var(--c) 10%, var(--surface)); }
.evchip.on b { color: var(--text-2); }
.evchip:not(.on) .sw { opacity: .35; }
.evchip.zero { opacity: .45; }

/* ---------------------------------------------------------------- harita */
.mapcard .cardhead { align-items: center; }
.mapcard > .mapbox { margin: 0 20px; }
.mapcard > .mapbox { margin-bottom: 20px; }
.maptools { display: flex; gap: 8px; flex-wrap: wrap; }
.mapbox { position: relative; height: var(--mh, 520px); border-radius: var(--r); overflow: hidden; border: 1px solid var(--border); }
.mapel { position: absolute; inset: 0; }
.mapcard.full { position: fixed; inset: 0; z-index: 1800; border-radius: 0; display: flex; flex-direction: column; }
.mapcard.full .mapbox { height: auto; flex: 1; }
.mapnote { position: absolute; left: 12px; bottom: 24px; z-index: 500; background: var(--surface); border: 1px solid var(--border); border-radius: 8px; padding: 4px 8px; font-size: 11.5px; color: var(--muted); max-width: 55%; box-shadow: var(--shadow-sm); }
.maphint { position: absolute; left: 50%; top: 12px; transform: translateX(-50%); z-index: 600; }

.mapgrid { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 24px; align-items: start; }
.evside .card { position: sticky; top: 0; }
.evside .sentence { font-size: 15px; line-height: 1.5; margin: 12px 0; color: var(--text); }
.legendlist div { display: flex; align-items: center; gap: 8px; margin-top: 8px; font-size: 13px; }
.anagrid { display: grid; grid-template-columns: 420px minmax(0, 1fr); gap: 24px; align-items: start; }
.qcol, .rcol, .evside { min-width: 0; }
.rcol > * + * { margin-top: 24px; }
.step { display: flex; align-items: center; gap: 8px; font-weight: 650; margin: 4px 0 8px; }
.step .n { width: 24px; height: 24px; border-radius: 50%; background: var(--primary); color: #fff; display: grid; place-items: center; font-size: 12px; flex: none; }
.qcard { border: 1px solid var(--border); border-radius: var(--r); padding: 12px 16px; background: var(--surface-2); transition: border-color .15s; }
.qcard:hover { border-color: var(--border-strong); }
.qcard + .qcard { margin-top: 8px; }
.qcard .qt { font-weight: 650; font-size: 14px; }
.qcard .qd { font-size: 12.5px; color: var(--muted); margin: 4px 0 8px; }
.qcard .btn { margin-top: 8px; }

.leaflet-container { font: inherit; background: var(--surface-2); }
.leaflet-popup-content { font-size: 12.5px; margin: 12px 14px; }
.leaflet-popup-content-wrapper, .leaflet-popup-tip { background: var(--surface); color: var(--text); box-shadow: var(--shadow-lg); }
.leaflet-popup-content-wrapper { border-radius: 10px; }
.legend { background: var(--surface); color: var(--text); border: 1px solid var(--border); border-radius: 8px; padding: 8px 12px; font-size: 12px; box-shadow: var(--shadow); }
.legend div { display: flex; align-items: center; gap: 8px; margin-top: 4px; }
.legend.hidden { display: none; }
.pie-icon { background: none; border: 0; }
.pie svg { display: block; filter: drop-shadow(0 1px 2px rgba(0, 0, 0, .45)); cursor: pointer; }
.sitepop .poplist { max-height: 260px; overflow: auto; margin-top: 8px; border-top: 1px solid var(--border); }
.popev { display: flex; gap: 8px; align-items: baseline; padding: 6px 4px; border-bottom: 1px solid var(--border); cursor: pointer; border-radius: 4px; }
.popev:hover { background: var(--primary-soft); }
.popev .sw { position: relative; top: 1px; }
.kmtip { font-weight: 650; padding: 1px 6px; }

/* ---------------------------------------------------------------- kişi, dosya, modal */
.person .lname { font-size: 18px; }
.item { border: 1px solid var(--border); border-radius: var(--r); padding: 12px 16px; background: var(--surface-2); }
.item + .item { margin-top: 8px; }
.item .title { font-weight: 650; display: flex; align-items: center; gap: 8px; }
.drop { display: grid; justify-items: center; gap: 4px; border: 2px dashed var(--border-strong); border-radius: var(--r); padding: 32px 16px; text-align: center; color: var(--muted); cursor: pointer; transition: all .15s; }
.drop strong { color: var(--text); }
.drop:hover, .drop.over { border-color: var(--primary); background: var(--primary-soft); }
.dropicon { color: var(--primary); }
.modal-bg { position: fixed; inset: 0; background: rgba(15, 23, 42, .55); display: grid; place-items: center; padding: 16px; z-index: 2000; backdrop-filter: blur(2px); }
.modal { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); max-width: 620px; width: 100%; max-height: 90vh; overflow: auto; padding: 24px; box-shadow: var(--shadow-lg); }
.modal.wide { max-width: 1040px; }
#toasts { position: fixed; right: 24px; bottom: 24px; display: flex; flex-direction: column; gap: 8px; z-index: 3000; max-width: min(440px, calc(100vw - 32px)); }
.toast { display: flex; gap: 10px; align-items: flex-start; background: var(--surface); color: var(--text); border: 1px solid var(--border); border-left: 4px solid var(--primary);
  padding: 12px 14px; border-radius: 10px; box-shadow: var(--shadow-lg); font-size: 13.5px; }
.toast .ic { color: var(--primary); margin-top: 1px; }
.toast.err { border-left-color: var(--err); } .toast.err .ic { color: var(--err); }
.toast.ok { border-left-color: var(--ok); } .toast.ok .ic { color: var(--ok); }
.spin { display: inline-block; width: 14px; height: 14px; border: 2px solid var(--border); border-top-color: var(--primary); border-radius: 50%; animation: sp .8s linear infinite; vertical-align: -2px; }
@keyframes sp { to { transform: rotate(360deg); } }
.skel-wrap { display: grid; gap: 12px; }
.skel { height: 72px; border-radius: var(--r); background: linear-gradient(90deg, var(--surface-2), var(--surface-3), var(--surface-2)); background-size: 200% 100%; animation: sk 1.2s ease-in-out infinite; }
@keyframes sk { to { background-position: -200% 0; } }

/* ---------------------------------------------------------------- duyarlı düzen */
@media (max-width: 1280px) {
  .mapgrid, .anagrid { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .evside .card { position: static; }
}

@media (max-width: 1024px) {
  .layout { grid-template-columns: minmax(0, 1fr); }
  .sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    width: min(300px, 85vw);
    z-index: 2100;
    transform: translateX(-100%);
    transition: transform .25s cubic-bezier(.16, 1, .3, 1);
    box-shadow: none;
  }
  body.side-open .sidebar {
    transform: translateX(0);
    box-shadow: 0 0 40px rgba(0, 0, 0, .45);
  }
  body.side-open .scrim {
    display: block;
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, .55);
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
    z-index: 2050;
  }
  .side-close-btn { display: inline-grid; }
  .menu-btn { display: inline-grid; }
  .wrap { padding: 20px 20px 40px; }

  /* Soruşturma içi yatay sekme çubuğu (tablet ve mobil) */
  .case-tabs {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    overflow-x: auto;
    white-space: nowrap;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    flex-shrink: 0;
  }
  .case-tabs::-webkit-scrollbar { display: none; }
  .case-tab {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 36px;
    padding: 0 12px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-2);
    text-decoration: none;
    background: var(--surface-2);
    border: 1px solid var(--border);
    flex-shrink: 0;
    transition: all .15s;
    touch-action: manipulation;
  }
  .case-tab:hover { background: var(--surface-3); color: var(--text); }
  .case-tab.on { background: var(--primary-soft); color: var(--primary); border-color: var(--primary); }
  .case-tab .nav-count { font-size: 11px; padding: 1px 7px; border-radius: 999px; background: var(--surface-3); color: var(--text-2); }
  .case-tab.on .nav-count { background: var(--primary); color: #fff; }

  .filterbar { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .statgrid { grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
  .mapbox { height: min(480px, 50vh); }
}

@media (max-width: 768px) {
  /* iOS otomatik yakınlaştırma (auto-zoom) engelleyici: form girdileri 16px */
  input[type=text], input[type=password], input[type=number], input[type=datetime-local], input[type=date], input[type=search], select, textarea {
    font-size: 16px;
    min-height: 42px;
  }
  .btn, .btn-icon, .evchip, .case-tab { touch-action: manipulation; }
  .btn:not(.sm) { min-height: 40px; }
  .btn.sm { min-height: 32px; }

  .topbar { height: 54px; padding: 0 12px; gap: 8px; }
  .wrap { padding: 12px 12px 32px; }
  h1 { font-size: 19px; }
  h2 { font-size: 15px; }
  h3 { font-size: 13.5px; }

  .crumbs { min-width: 0; overflow: hidden; }
  .crumbs a { max-width: 100px; font-size: 13px; }
  .crumbs .cur { max-width: 120px; font-size: 13px; }

  .pagehead { flex-direction: column; align-items: stretch; gap: 10px; margin-bottom: 16px; }
  .pagehead > .grow { flex-basis: 100%; }
  .pageactions { display: flex; flex-direction: column; width: 100%; gap: 8px; }
  .pageactions .btn { width: 100%; justify-content: center; height: 40px; }

  .grid2 { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .filterbar { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .filterrow { flex-direction: column; align-items: stretch; gap: 8px; }
  .filterrow > div { flex: 1 1 100%; width: 100%; }
  .filterrow > div.bottom { width: 100%; }
  .filterrow > div.bottom .btn { width: 100%; height: 42px; justify-content: center; }

  .linegrid, .casegrid { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .linecard { padding: 16px; }
  .casestats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
  .casestats > div:last-child { grid-column: span 2; }
  .facts { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
  .facts > div { padding: 6px 10px; }
  .metrics { grid-template-columns: 1fr; gap: 4px; }
  .chartbox { padding: 8px 8px 4px; }

  .cardactions { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 8px; padding-top: 12px; margin-top: 12px; }
  .cardactions .btn { justify-content: center; padding: 0 8px; font-size: 12.5px; }

  .statgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .stat { flex-direction: column; gap: 8px; padding: 12px; }
  .stat-ic { width: 32px; height: 32px; border-radius: 8px; }
  .stat-value { font-size: 20px; }
  .stat-label { font-size: 11.5px; }
  .stat-sub { font-size: 11px; }

  .card { border-radius: var(--r); }
  .card > .cardbody, .card > .tablewrap { padding: 0 12px 14px; }
  .cardhead { padding: 12px 12px 8px; flex-direction: column; align-items: stretch; gap: 8px; }
  .cardhead .maptools { width: 100%; display: flex; flex-wrap: wrap; gap: 6px; }
  .cardhead .maptools .btn { flex: 1 1 auto; justify-content: center; }
  .cardhead h2 { white-space: normal; word-break: break-word; }

  .mapbox { height: min(380px, 48vh); }
  .mapcard > .mapbox { margin: 0 12px 12px; }
  .mapnote { position: absolute; left: 8px; right: 8px; bottom: 8px; max-width: calc(100% - 16px); font-size: 10.5px; line-height: 1.3; padding: 4px 8px; }
  .maphint { width: 90%; text-align: center; }


  .evchips { gap: 6px; display: flex; flex-wrap: wrap; }
  .evchip { height: 34px; padding: 0 10px; font-size: 12px; }

  .tablewrap { max-height: 55vh; -webkit-overflow-scrolling: touch; border-radius: 8px; }
  .tablewrap table.t { min-width: 520px; }
  table.t th, table.t td { padding: 8px 8px; font-size: 12px; }

  .modal-bg { padding: 8px; }
  .modal { max-height: 94vh; padding: 18px 14px; border-radius: 14px; width: 100%; }
  .modal.wide { max-width: 100%; }

  #toasts { left: 12px; right: 12px; bottom: 12px; max-width: none; }
  .toast { font-size: 13px; padding: 10px 12px; }

  .auth { padding: 12px; }
  .auth .card { padding: 20px 16px; border-radius: 12px; }
  .searchbox { max-width: 100%; }
  .drop { padding: 20px 12px; }
  .callout { padding: 10px 12px; }
  .callout-body { padding-left: 10px; font-size: 13px; }
}

@media (max-width: 480px) {
  .statgrid { grid-template-columns: 1fr; }
  .crumbs a { max-width: 70px; font-size: 12px; }
  .crumbs .cur { max-width: 85px; font-size: 12px; }
  .mapbox { height: 320px; }
  .facts { grid-template-columns: 1fr 1fr; font-size: 11px; }
  .case-tabs { padding: 6px 10px; gap: 6px; }
  .case-tab { height: 32px; padding: 0 10px; font-size: 12px; }
}

/* =====================================================================
   Simülasyon çalışma alanı
   ===================================================================== */
.wrap.wide { max-width: none; padding: 16px 20px 16px; }
.wrap.wide > .view > * + * { margin-top: 12px; }
.btn-icon.sm { width: 30px; height: 30px; }
kbd { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 5px; border: 1px solid var(--border-strong); border-bottom-width: 2px;
  border-radius: 5px; background: var(--surface-2); font: 600 11px/1 var(--font); color: var(--text-2); }
kbd + kbd { margin-left: 3px; }

/* --- yer (baz) arama kutusu: çipli giriş --- */
.placebox { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; min-height: 40px; padding: 5px 8px; border: 1px solid var(--border-strong);
  border-radius: 8px; background: var(--surface); cursor: text; transition: border-color .15s, box-shadow .15s; }
.placebox:focus-within { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-ring); }
.placebox.compact { min-height: 34px; padding: 3px 6px; }
.placebox .placeic { color: var(--muted); margin: 0 2px; }
.placebox input { flex: 1 1 160px; min-width: 120px; border: 0 !important; outline: 0; box-shadow: none !important; background: transparent; height: 28px; padding: 0 2px; }
.pchip { display: inline-flex; align-items: center; gap: 5px; height: 26px; padding: 0 4px 0 9px; border-radius: 999px; background: var(--primary-soft); color: var(--primary);
  font-size: 12.5px; font-weight: 650; max-width: 260px; }
.pchip > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pchip.site { background: var(--violet-soft); color: var(--violet); }
.pchip.ilce { background: var(--ok-soft); color: var(--ok); }
.placewrap { position: relative; min-width: 0; }
.placesug { position: absolute; left: 0; right: 0; top: calc(100% + 4px); z-index: 1500; background: var(--surface); border: 1px solid var(--border-strong); border-radius: 10px;
  box-shadow: var(--shadow-lg); padding: 4px; max-height: 360px; overflow: auto; }
.ps-item { display: flex; gap: 10px; align-items: flex-start; padding: 8px 10px; border-radius: 6px; cursor: pointer; }
.ps-item .ic { margin-top: 2px; color: var(--muted); }
.ps-item.hi, .ps-item:hover { background: var(--primary-soft); }
.ps-item.hi .ic { color: var(--primary); }
.ps-main { font-weight: 600; font-size: 13px; color: var(--text); line-height: 1.35; }
.ps-sub { font-size: 11.5px; color: var(--muted); }
.ps-empty { padding: 10px 12px; color: var(--muted); font-size: 13px; }
.pchip button { display: grid; place-items: center; width: 20px; height: 20px; border: 0; border-radius: 50%; background: transparent; color: inherit; cursor: pointer; }
.pchip button:hover { background: color-mix(in srgb, currentColor 18%, transparent); }

/* --- üst araç çubuğu --- */
.simbar { padding: 12px 16px; display: grid; gap: 10px; }
.simbar-row { display: flex; flex-wrap: wrap; gap: 10px 18px; align-items: flex-end; }
.sb-field { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.sb-field.grow { flex: 1 1 280px; }
.sb-field.end { margin-left: auto; }
.sb-label { display: inline-flex; align-items: center; gap: 6px; font-size: 11.5px; font-weight: 650; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.sb-field select, .sb-field input[type=date] { height: 34px; }
.sb-field > select { min-width: 220px; max-width: 320px; }
.sb-dates { display: flex; align-items: center; gap: 6px; }
.sb-dates input { width: 140px; }
.dayjump { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); }
.dayjump select { height: 34px; max-width: 200px; font-size: 13px; }
.simtools { position: absolute; top: 12px; right: 12px; z-index: 600; display: flex; gap: 6px; }
.simtools .tbtn { background: var(--surface); border-color: var(--border); box-shadow: var(--shadow); height: 34px; }
.simtools .tbtn:hover { background: var(--surface-2); }
.simtools .tbtn.on { background: var(--primary-soft); }
.simlines { display: flex; flex-wrap: wrap; gap: 6px; }
.linetog { display: inline-flex; align-items: center; gap: 7px; height: 34px; padding: 0 12px 0 10px; border-radius: 999px; border: 1px solid var(--border-strong);
  background: var(--surface); color: var(--text-2); font-weight: 600; font-size: 13px; cursor: pointer; max-width: 260px; transition: background-color .15s, border-color .15s; }
.linetog .lt-dot { width: 12px; height: 12px; border-radius: 50%; border: 2px solid var(--lc); background: transparent; flex: none; }
.linetog .lt-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.linetog:hover { border-color: var(--lc); }
.linetog.on { border-color: var(--lc); background: color-mix(in srgb, var(--lc) 12%, var(--surface)); color: var(--text); }
.linetog.on .lt-dot { background: var(--lc); }
.evchips.sm { gap: 6px; }
.evchips.sm .evchip { height: 30px; padding: 0 10px; font-size: 12.5px; gap: 6px; }

/* --- çalışma alanı: harita | panel --- */
.simws { display: grid; grid-template-columns: minmax(0, 1fr) 400px; gap: 12px; height: var(--simh, 640px); min-height: 520px; }
.simws.full { position: fixed; inset: 0; z-index: 1800; height: 100vh; padding: 10px; background: var(--bg); }
.simmap { display: flex; flex-direction: column; min-width: 0; min-height: 0; border: 1px solid var(--border); border-radius: var(--r-lg); overflow: hidden; background: var(--surface); box-shadow: var(--shadow); }
.simmap-box { position: relative; flex: 1; min-height: 0; }
.simoverlay { position: absolute; inset: 0; z-index: 700; display: grid; place-items: center; background: color-mix(in srgb, var(--bg) 55%, transparent); backdrop-filter: blur(2px); }
.so-box { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 16px 20px; box-shadow: var(--shadow-lg); text-align: center; max-width: 360px; }
.so-box.err { color: var(--err); }

/* saat rozeti (harita sol üst) */
.simclock { position: absolute; top: 12px; left: 56px; z-index: 600; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 8px 14px 9px;
  box-shadow: var(--shadow-lg); min-width: 190px; pointer-events: none; }
.simclock:empty, .simclock:has(.sc-time:empty) { display: none; }
.sc-date { font-size: 12px; color: var(--muted); font-weight: 600; }
.sc-time { font: 700 26px/1.1 var(--mono); letter-spacing: -.02em; color: var(--text); font-variant-numeric: tabular-nums; }
.sc-step { font-size: 11.5px; color: var(--muted); margin-top: 2px; font-variant-numeric: tabular-nums; }
.simmap.playing .sc-time { color: var(--primary); }

/* oynatma çubuğu */
.simtransport { flex: none; border-top: 1px solid var(--border); background: var(--surface); padding: 8px 12px 10px; }
.st-tl { position: relative; }
.simtl { height: 44px; cursor: pointer; touch-action: none; border-radius: 6px; outline-offset: 2px; }
.simtl svg { display: block; width: 100%; height: 44px; }
.tl-bar { fill: var(--border-strong); }
.tl-bar.past { fill: var(--primary); opacity: .75; }
.tl-day { stroke: var(--border); stroke-width: 1; }
.tl-lab { fill: var(--muted); font-size: 10px; font-family: var(--font); }
.tl-lab.h { opacity: .8; }
.tl-cur { stroke: var(--primary); stroke-width: 2; }
.tl-knob { fill: var(--primary); stroke: var(--surface); stroke-width: 2; }
.tltip { position: absolute; bottom: 48px; width: 150px; text-align: center; background: var(--text); color: var(--surface); font-size: 11.5px; font-weight: 600; border-radius: 6px; padding: 3px 6px; pointer-events: none; }
.st-row { display: flex; align-items: center; gap: 10px; margin-top: 6px; flex-wrap: wrap; row-gap: 6px; }
.st-btns { display: flex; align-items: center; gap: 4px; }
.tbtn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 36px; min-width: 36px; padding: 0 8px; border-radius: 8px; border: 1px solid transparent;
  background: transparent; color: var(--text-2); cursor: pointer; font-weight: 600; font-size: 13px; transition: background-color .15s, color .15s, border-color .15s; }
.tbtn:hover { background: var(--surface-3); color: var(--text); }
.tbtn.txt { border-color: var(--border); }
.tbtn.txt.on { background: var(--primary-soft); color: var(--primary); border-color: color-mix(in srgb, var(--primary) 35%, transparent); }
.tbtn.play { width: 48px; height: 48px; border-radius: 50%; background: var(--primary); color: #fff; margin: 0 4px; box-shadow: 0 4px 14px color-mix(in srgb, var(--primary) 45%, transparent); }
.tbtn.play:hover { background: var(--primary-2); color: #fff; }
.tbtn.play .ic { fill: currentColor; }
.tbtn.play.on .ic { fill: none; stroke-width: 3; }
.speedseg { display: inline-flex; border: 1px solid var(--border); border-radius: 8px; overflow: hidden; }
.speedseg button { height: 34px; min-width: 42px; padding: 0 8px; border: 0; background: var(--surface); color: var(--muted); font-weight: 650; font-size: 12.5px; cursor: pointer; font-variant-numeric: tabular-nums; }
.speedseg button + button { border-left: 1px solid var(--border); }
.speedseg button:hover { color: var(--text); background: var(--surface-2); }
.speedseg button.on { background: var(--primary); color: #fff; }

/* harita işaretçileri */
.spin-pin-icon { background: none; border: 0; }
.spin-pin { position: relative; width: 34px; height: 34px; display: grid; place-items: center; cursor: pointer; }
.spin-pin .sp-core { position: relative; z-index: 2; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--lc); color: #fff;
  font: 700 11px/1 var(--font); border: 3px solid #fff; box-shadow: 0 2px 6px rgba(0, 0, 0, .45); letter-spacing: -.02em; }
.spin-pin .sp-ring { position: absolute; inset: 0; border-radius: 50%; background: var(--lc); opacity: 0; }
.spin-pin.active .sp-ring { animation: simpulse 1.6s ease-out infinite; }
.spin-pin.active .sp-core { width: 32px; height: 32px; }
.spin-pin.stale .sp-core { opacity: .55; filter: grayscale(.4); }
@keyframes simpulse { 0% { transform: scale(.7); opacity: .55; } 100% { transform: scale(2.1); opacity: 0; } }
.spin-cp { width: 28px; height: 28px; display: grid; place-items: center; cursor: pointer; }
.spin-cp .sp-core { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; background: #334155; color: #fff; border: 3px solid #fff; box-shadow: 0 2px 6px rgba(0, 0, 0, .45); }
.leaflet-tooltip.pintip { background: var(--surface); color: var(--text-2); border: 1px solid var(--border); border-radius: 6px; padding: 2px 7px; font-weight: 600; font-size: 11.5px; box-shadow: var(--shadow); }
.leaflet-tooltip.pintip.on { color: var(--text); border-color: var(--border-strong); font-weight: 700; }
.leaflet-tooltip.pintip.cp { font-style: italic; }
.leaflet-tooltip.pintip::before { display: none; }
.simlink { animation: simdash 1.2s linear infinite; }
@keyframes simdash { to { stroke-dashoffset: -32; } }

/* sağ panel */
.simpanel { display: flex; flex-direction: column; gap: 12px; min-height: 0; min-width: 0; }
.simpanel .card { display: flex; flex-direction: column; min-height: 0; }
.sp-now { flex: none; max-height: 62%; overflow: auto; }
.sp-feed { flex: 1; overflow: hidden; }
.sp-head { display: flex; align-items: center; gap: 8px; padding: 12px 16px 8px; position: sticky; top: 0; background: var(--surface); z-index: 1; }
.sp-head h2 { font-size: 14px; }
.kbd-hint { font-size: 11px; color: var(--muted); white-space: nowrap; }
.simnow { padding: 0 16px 12px; display: grid; gap: 10px; }
.nowtop { display: flex; align-items: center; gap: 8px; }
.evb.lg { height: 26px; font-size: 12.5px; padding: 0 12px; }
.nowdur { display: inline-flex; align-items: center; gap: 4px; font-weight: 650; font-size: 13px; color: var(--text-2); font-variant-numeric: tabular-nums; }
.nowpair { position: relative; padding: 10px 12px; background: var(--surface-2); border: 1px solid var(--border); border-radius: 10px; display: grid; gap: 2px; }
.np-row { display: grid; grid-template-columns: 64px minmax(0, 1fr); align-items: center; gap: 8px; }
.np-lab { font-size: 11px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.np-who { min-width: 0; }
.np-who b { overflow-wrap: anywhere; }
.np-mid { display: grid; grid-template-columns: 64px auto 1fr; align-items: center; gap: 8px; color: var(--c); height: 26px; }
.np-line { justify-self: center; width: 2px; height: 100%; background: var(--c); border-radius: 2px; opacity: .6; grid-column: 1; }
.np-ic { display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: color-mix(in srgb, var(--c) 16%, var(--surface)); }
.np-what { font-size: 12px; font-weight: 650; }
.nowsent { font-size: 14px; line-height: 1.5; color: var(--text); }
.locrow { display: flex; gap: 10px; align-items: flex-start; padding: 8px 0; border-top: 1px solid var(--border); }
.lr-dot { width: 10px; height: 10px; border-radius: 50%; margin-top: 5px; flex: none; box-shadow: 0 0 0 2px var(--surface), 0 0 0 3px var(--border-strong); }
.lr-who { font-size: 11.5px; font-weight: 650; color: var(--muted); text-transform: uppercase; letter-spacing: .03em; }
.lr-addr { font-weight: 600; color: var(--text); line-height: 1.35; }
.lr-act { display: flex; gap: 2px; }
.relbox, .movebox { display: flex; gap: 10px; align-items: flex-start; padding: 8px 12px; border-radius: 8px; background: var(--surface-2); border: 1px solid var(--border); font-size: 13px; }
.relbox .ic, .movebox .ic { margin-top: 2px; color: var(--muted); }
.relbox.meet { background: var(--err-soft); border-color: color-mix(in srgb, var(--err) 35%, transparent); color: var(--err); }
.relbox.meet .ic { color: var(--err); }
.relbox.near { background: var(--warn-soft); border-color: color-mix(in srgb, var(--warn) 30%, transparent); color: var(--warn); }
.relbox.near .ic { color: var(--warn); }
.relbox .small { color: var(--text-2); }
.movebox.still { color: var(--text-2); }
.nowsrc { display: flex; align-items: center; gap: 4px; }
.nowact { display: flex; flex-wrap: wrap; gap: 6px; }
.nowact:empty { display: none; }
.simwho { padding: 0 16px 12px; }
.simwho:empty { display: none; }
.sp-sub { font-size: 11.5px; font-weight: 650; color: var(--muted); text-transform: uppercase; letter-spacing: .03em; margin-bottom: 4px; }
.whorow { display: flex; align-items: center; gap: 8px; width: 100%; padding: 6px 8px; border: 0; background: transparent; border-radius: 6px; cursor: pointer; text-align: left; }
.whorow:hover { background: var(--surface-3); }
.whorow .lr-dot { margin-top: 0; }
.whorow .grow { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* olay akışı */
.simfeed { flex: 1; overflow: auto; padding: 0 8px 12px; overscroll-behavior: contain; }
.fday { position: sticky; top: 0; z-index: 1; background: var(--surface); padding: 8px 8px 4px; font-size: 11.5px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; border-bottom: 1px solid var(--border); }
.frow { display: grid; grid-template-columns: 42px 10px minmax(0, 1fr); align-items: center; gap: 8px; width: 100%; padding: 6px 8px; border: 0; border-left: 3px solid var(--lc);
  background: transparent; text-align: left; cursor: pointer; border-radius: 0 6px 6px 0; margin-top: 2px; content-visibility: auto; contain-intrinsic-size: auto 44px; }
.frow:hover { background: var(--surface-3); }
.frow.on { background: var(--primary-soft); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--primary) 40%, transparent); }
.f-t { font-size: 12px; color: var(--muted); }
.frow.on .f-t { color: var(--primary); font-weight: 700; }
.f-k { width: 10px; height: 10px; border-radius: 50%; }
.f-main { min-width: 0; display: flex; flex-direction: column; }
.f-who { font-weight: 600; font-size: 13px; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.f-sub { font-size: 11.5px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* kısayol penceresi */
.keylist { display: grid; gap: 8px; }
.keyrow { display: grid; grid-template-columns: 150px 1fr; align-items: center; gap: 12px; }

/* =====================================================================
   Baz istasyonları
   ===================================================================== */
.ilcebox { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 12px; }
.ilcebox:empty { display: none; }
.qchip { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 10px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface-2);
  font-size: 12.5px; font-weight: 600; color: var(--text-2); cursor: pointer; }
.qchip b { color: var(--muted); font-weight: 600; font-variant-numeric: tabular-nums; }
.qchip:hover { border-color: var(--border-strong); }
.qchip.on { background: var(--primary); color: #fff; border-color: var(--primary); }
.qchip.on b { color: rgba(255, 255, 255, .85); }
.sitelegend { display: flex; flex-wrap: wrap; gap: 4px; justify-content: flex-end; max-width: 50%; }
.sitedetail { min-width: 0; }
.sitedetail .card { position: sticky; top: 0; }
.sitedetail .cardhead h2 { line-height: 1.35; }
.mini-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.mini-stats > div { background: var(--surface-2); border: 1px solid var(--border); border-radius: 8px; padding: 8px 10px; display: flex; flex-direction: column; }
.mini-stats b { font-size: 18px; font-variant-numeric: tabular-nums; }
.mini-stats span { font-size: 11.5px; color: var(--muted); }
.sd-sec { font-size: 11.5px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; margin: 16px 0 8px; }
.hbarrow { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr) 48px; gap: 10px; align-items: center; padding: 4px 0; }
.hb-name { min-width: 0; overflow: hidden; }
.hb-track { height: 8px; background: var(--surface-3); border-radius: 999px; overflow: hidden; }
.hb-track span { display: block; height: 100%; border-radius: 999px; }
.hbarrow .num { text-align: right; font-variant-numeric: tabular-nums; }
.hourbars { display: block; width: 100%; max-width: 360px; height: auto; }
td .hourbars { width: 120px; }
.hb-bar { fill: var(--primary); }
.hb-bar.n { fill: var(--violet); }
.hb-night { fill: var(--surface-3); }
.siteaddr { max-width: 340px; }
.siteaddr b { display: block; line-height: 1.35; }
table.t tr.sel td { background: var(--primary-soft); }
.bulkbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 10px 16px; border-radius: var(--r-lg); background: var(--primary-soft);
  border: 1px solid color-mix(in srgb, var(--primary) 30%, transparent); position: sticky; bottom: 12px; z-index: 5; box-shadow: var(--shadow-lg); }
.hintlist { margin: 8px 0 12px; padding-left: 18px; color: var(--text-2); }
.hintlist li + li { margin-top: 4px; }

@media (max-width: 1280px) {
  .simws { grid-template-columns: minmax(0, 1fr) 340px; }
}
@media (max-width: 1024px) {
  .simws { grid-template-columns: minmax(0, 1fr); height: auto; }
  .simmap { height: 72vh; min-height: 460px; }
  .simpanel { max-height: none; }
  .sp-now { max-height: none; }
  .sp-feed { height: 420px; flex: none; }
  .simws.full { grid-template-columns: minmax(0, 1fr); grid-template-rows: minmax(0, 1fr) 38%; }
  .simws.full .simmap { height: auto; }
  .simws.full .sp-feed { display: none; }
}
@media (max-width: 768px) {
  .wrap.wide { padding: 10px; }
  .sb-field > select, .sb-field.grow { width: 100%; max-width: none; min-width: 0; flex: 1 1 100%; }
  .sb-dates input { width: auto; flex: 1; min-width: 0; }
  .sb-field.end { margin-left: 0; }
  .simclock { left: 50px; top: 8px; min-width: 0; padding: 6px 10px; }
  .sc-time { font-size: 20px; }
  .simmap { height: 64vh; min-height: 380px; }
  .speedseg button { min-width: 34px; padding: 0 4px; }
  .tbtn.txt span { display: none; }
  .kbd-hint { display: none; }
  .mini-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sitelegend { max-width: 100%; justify-content: flex-start; }
  .keyrow { grid-template-columns: 1fr; gap: 2px; }
}

/* =====================================================================
   Yönetim · Ayarlar
   ===================================================================== */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--border); margin: -8px 0 24px; overflow-x: auto; scrollbar-width: none; }
.tab { display: inline-flex; align-items: center; gap: 8px; padding: 10px 14px; color: var(--muted); text-decoration: none; font-weight: 600; font-size: 13.5px;
  border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; border-radius: 6px 6px 0 0; }
.tab:hover { color: var(--text); background: var(--surface-3); }
.tab.on { color: var(--primary); border-bottom-color: var(--primary); }
.avatar.sm { width: 30px; height: 30px; font-size: 11.5px; }
.field { min-width: 0; }
.field > label { margin-top: 0; }
.field + .field, .fields > * + * { margin-top: 16px; }
.grid2 > .field + .field, .grid2 > .field { margin-top: 0; }
.fields > .grid2 { gap: 16px; }
.hint { font-size: 12px; color: var(--muted); margin-top: 6px; line-height: 1.45; }
.readonly { display: flex; align-items: center; gap: 8px; height: 38px; padding: 0 12px; border: 1px dashed var(--border-strong); border-radius: 8px; color: var(--text-2); background: var(--surface-2); font-size: 13px; }
.switchrow { display: flex; gap: 12px; align-items: flex-start; margin: 0; cursor: pointer; font-weight: 400; color: var(--text); font-size: 14px; }
.switchrow b { font-weight: 600; }
.switch { position: relative; flex: none; width: 40px; height: 24px; margin-top: 1px; }
.switch input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; z-index: 1; }
.sw-track { position: absolute; inset: 0; border-radius: 999px; background: var(--border-strong); transition: background-color .15s; }
.sw-thumb { position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .3); transition: transform .15s; }
.switch input:checked + .sw-track { background: var(--primary); }
.switch input:checked + .sw-track .sw-thumb { transform: translateX(16px); }
.switch input:focus-visible + .sw-track { outline: 2px solid var(--primary); outline-offset: 2px; }
.settings { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 24px; align-items: start; }
.settoc { position: sticky; top: 0; display: flex; flex-direction: column; gap: 2px; }
.settoc .st-h { font-size: 11.5px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; padding: 0 10px 8px; }
.settoc a { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 8px; color: var(--text-2); text-decoration: none; font-weight: 600; font-size: 13.5px; }
.settoc a:hover { background: var(--surface-3); color: var(--text); }
.setmain > * + * { margin-top: 20px; }
.setcard { scroll-margin-top: 16px; }
.setgrid { display: grid; grid-template-columns: minmax(0, 1fr) 240px; gap: 24px; }
.savebar { position: sticky; bottom: 16px; z-index: 10; display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-radius: var(--r-lg); background: var(--surface);
  border: 1px solid var(--border); box-shadow: var(--shadow); color: var(--muted); font-size: 13.5px; }
.savebar.on { border-color: color-mix(in srgb, var(--primary) 45%, transparent); box-shadow: var(--shadow-lg); color: var(--text); }
.swatches { display: flex; gap: 8px; flex-wrap: wrap; }
.swatch { display: inline-flex; align-items: center; gap: 8px; height: 36px; padding: 0 12px 0 6px; border: 1px solid var(--border-strong); border-radius: 999px; background: var(--surface);
  cursor: pointer; font-weight: 600; font-size: 13px; color: var(--text-2); }
.swatch span { width: 24px; height: 24px; border-radius: 50%; background: var(--ac); box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .35); }
.swatch.on { border-color: var(--ac); box-shadow: 0 0 0 2px color-mix(in srgb, var(--ac) 35%, transparent); color: var(--text); }
.swatches.sm .swatch { height: 30px; font-size: 12px; }
.swatches.sm .swatch span { width: 18px; height: 18px; }
[data-accent="navy"] { --ac: #1d3a7a; --ac2: #0d1b3e; --acs: #e8eefb; }
[data-accent="slate"] { --ac: #334155; --ac2: #111827; --acs: #eef1f5; }
[data-accent="teal"] { --ac: #0f6b66; --ac2: #063a37; --acs: #e5f3f1; }
[data-accent="burgundy"] { --ac: #8a1c3b; --ac2: #45091c; --acs: #f8e9ee; }
.coverthumb { position: relative; aspect-ratio: 210 / 297; border-radius: 6px; background: #fff; color: #111827; box-shadow: var(--shadow-lg); overflow: hidden; padding: 14px 14px 14px 34px; font-size: 9px; }
.ct-band { position: absolute; left: 0; top: 0; bottom: 0; width: 22px; background: var(--ac); }
.ct-org { font-weight: 700; font-size: 10px; } .ct-org small { display: block; font-weight: 400; color: #6b7280; }
.ct-title { margin-top: 38%; font-size: 15px; font-weight: 800; line-height: 1.15; color: var(--ac2); }
.ct-meta { position: absolute; left: 34px; bottom: 30px; color: #374151; }
.ct-stamp { position: absolute; right: 10px; top: 12px; max-width: 55%; border: 1.5px solid #b91c1c; color: #b91c1c; font-weight: 800; font-size: 7px; padding: 2px 4px; text-align: center; transform: rotate(-3deg); }
.ct-stamp:empty { display: none; }
.checklist { display: flex; flex-direction: column; gap: 4px; }
.ck { display: flex; gap: 12px; align-items: center; padding: 10px 12px; border-radius: 10px; color: inherit; text-decoration: none; }
a.ck:hover { background: var(--surface-3); }
.ck-ic { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; flex: none; }
.ck.ok .ck-ic { background: var(--ok-soft); color: var(--ok); }
.ck.todo .ck-ic { background: var(--warn-soft); color: var(--warn); }
.feedlist { display: flex; flex-direction: column; }
.fl-row { display: flex; gap: 10px; align-items: baseline; padding: 8px 0; border-bottom: 1px solid var(--border); font-size: 13px; }
.fl-row:last-of-type { border-bottom: 0; margin-bottom: 8px; }
.fl-time { color: var(--muted); font-size: 12px; flex: none; }
.linkbtn { display: inline-flex; align-items: center; gap: 4px; border: 0; background: none; color: var(--muted); font-size: 12px; cursor: pointer; padding: 2px 4px; border-radius: 4px; margin-left: 6px; }
.linkbtn:hover { color: var(--primary); background: var(--surface-3); }
.facts.wide { grid-template-columns: repeat(3, minmax(0, 1fr)); margin: 0; }

/* =====================================================================
   Rapor oluşturucu (ekran)
   ===================================================================== */
.rlayout { display: grid; grid-template-columns: 380px minmax(0, 1fr); gap: 24px; align-items: start; }
.rpanel { position: sticky; top: 0; max-height: calc(100vh - 140px); overflow: auto; display: flex; flex-direction: column; gap: 12px; padding-bottom: 4px; }
.rform .grid2 { gap: 12px; }
.rform .field + .field, .rform .grid2 + .field, .rform .field + .grid2, .rform .grid2 + .grid2 { margin-top: 12px; }
.rf-sec { font-size: 11.5px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; margin: 22px 0 10px; padding-top: 14px; border-top: 1px solid var(--border); }
.rf-sec:first-child { margin-top: 0; padding-top: 0; border-top: 0; }
.rform .switchrow + .switchrow { margin-top: 12px; }
.rchecks { display: flex; flex-direction: column; gap: 2px; }
.rcheck { display: flex; gap: 10px; align-items: flex-start; margin: 0; padding: 6px 8px; border-radius: 8px; cursor: pointer; font-weight: 400; }
.rcheck:hover { background: var(--surface-3); }
.rcheck input { margin-top: 3px; width: 16px; height: 16px; accent-color: var(--primary); flex: none; }
.rcheck b { display: block; font-size: 13.5px; color: var(--text); font-weight: 600; }
.rcheck small { display: block; font-size: 12px; color: var(--muted); font-weight: 400; }
.rprint { position: sticky; bottom: 0; background: var(--bg); padding: 8px 0 4px; }
.rprint .btn { width: 100%; }
.rprint p { margin-top: 8px; line-height: 1.45; }
.btn.lg { height: 46px; font-size: 15px; border-radius: 10px; }
.rpreview { background: color-mix(in srgb, var(--surface-3) 70%, var(--bg)); border: 1px solid var(--border); border-radius: var(--r-lg); padding: 28px; overflow: auto; min-width: 0; }
.ai-badge { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 12px; border-radius: 999px; background: var(--violet-soft); color: var(--violet); font-weight: 650; font-size: 12.5px; }

/* =====================================================================
   Rapor belgesi (kağıt) — temadan bağımsız, her zaman açık zemin
   ===================================================================== */
.rdoc { --ink: #111827; --ink2: #374151; --mute: #6b7280; --line: #e5e7eb; --soft: #f6f7f9;
  width: 210mm; margin: 0 auto; color: var(--ink); font: 10.5pt/1.55 "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif; color-scheme: light;
  -webkit-print-color-adjust: exact; print-color-adjust: exact; }
.rdoc > section { background: #fff; box-shadow: 0 2px 10px rgba(0, 0, 0, .18); padding: 20mm 17mm; margin-bottom: 18px; position: relative; }
.rdoc h1, .rdoc h2, .rdoc h3, .rdoc h4 { color: var(--ink); }
.rdoc .mono { font-family: "Cascadia Mono", Consolas, monospace; font-size: 8.5pt; }
.rdoc .ic { color: var(--ac); }
.rsmall { font-size: 8.5pt; color: var(--mute); white-space: pre-line; }
/* kapak */
.rdoc > .rcover { padding: 0; height: 297mm; display: grid; grid-template-columns: 28mm 1fr; overflow: hidden; }
.rc-band { background: linear-gradient(180deg, var(--ac) 0%, var(--ac2) 100%); color: #fff; display: flex; flex-direction: column; align-items: center; padding: 16mm 0; gap: 12mm; }
.rc-mark { width: 16mm; height: 16mm; border-radius: 50%; border: 1.5px solid rgba(255, 255, 255, .6); display: grid; place-items: center; }
.rc-mark .ic { color: #fff; }
.rc-vert { writing-mode: vertical-rl; transform: rotate(180deg); letter-spacing: .35em; font-size: 8pt; font-weight: 700; opacity: .85; }
.rc-body { position: relative; padding: 18mm 18mm 16mm 16mm; display: flex; flex-direction: column; }
.rc-org b { display: block; font-size: 13pt; letter-spacing: .01em; }
.rc-org span { color: var(--mute); font-size: 10pt; }
.rc-stamp { position: absolute; top: 16mm; right: 16mm; max-width: 70mm; border: 2px solid #b91c1c; color: #b91c1c; padding: 2mm 3mm; font-weight: 800; font-size: 8pt; letter-spacing: .06em; text-align: center; transform: rotate(-2deg); }
.rc-stamp:empty { display: none; }
.rc-titlebox { margin-top: 52mm; }
.rc-kicker { font-size: 9pt; font-weight: 800; letter-spacing: .3em; color: var(--ac); }
.rc-titlebox h1 { font-size: 30pt; line-height: 1.12; margin: 4mm 0 3mm; font-weight: 800; letter-spacing: -.01em; color: var(--ac2); }
.rc-sub { font-size: 14pt; color: var(--ink2); font-weight: 500; }
.rc-graphic { width: 100%; height: 34mm; margin-top: 12mm; }
.cg-l { stroke: var(--ac); stroke-opacity: .18; stroke-width: 1; }
.cg-n { fill: var(--ac); stroke: #fff; stroke-width: 2; }
.cg-d { fill: var(--ac); fill-opacity: .35; }
.rc-meta { margin: auto 0 0; display: grid; grid-template-columns: repeat(2, 1fr); gap: 0; border-top: 2px solid var(--ac); }
.rc-meta > div { padding: 3.5mm 0; border-bottom: 1px solid var(--line); }
.rc-meta > div:nth-child(odd) { padding-right: 6mm; }
.rc-meta > div:last-child { grid-column: span 2; }
.rc-meta dt { font-size: 7.5pt; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--mute); }
.rc-meta dd { margin: 1mm 0 0; font-size: 11pt; font-weight: 600; }
.rc-meta dd small { font-weight: 400; color: var(--mute); margin-left: 2mm; }
.rc-foot { margin-top: 8mm; font-size: 7.5pt; color: var(--mute); line-height: 1.5; }
/* içindekiler */
.rtoc h2 { font-size: 20pt; margin-bottom: 8mm; color: var(--ac2); }
.rtoc ol { counter-reset: t; list-style: none; padding: 0; margin: 0 0 10mm; }
.rtoc li { counter-increment: t; display: grid; grid-template-columns: 12mm 1fr; padding: 3mm 0; border-bottom: 1px solid var(--line); }
.rtoc li::before { content: counter(t, decimal-leading-zero); font-weight: 800; color: var(--ac); grid-row: span 2; }
.rt-t { font-weight: 700; } .rt-d { font-size: 9pt; color: var(--mute); }
.rtoc h3, .rchap h3 { font-size: 11.5pt; margin: 7mm 0 3mm; }
.rpurpose p { margin: 0 0 2mm; text-align: justify; }
/* bölümler */
.rch-head { display: flex; align-items: baseline; gap: 5mm; padding-bottom: 4mm; margin-bottom: 5mm; border-bottom: 2px solid var(--ac); }
.rch-no { font-size: 26pt; font-weight: 800; color: var(--ac); opacity: .35; line-height: 1; }
.rch-head h2 { font-size: 18pt; color: var(--ac2); }
.rlead { color: var(--ink2); margin: 0 0 5mm; text-align: justify; }
.rkpis { display: grid; grid-template-columns: repeat(3, 1fr); gap: 3mm; margin: 4mm 0; }
.rkpis.sm { grid-template-columns: repeat(5, 1fr); gap: 2mm; }
.rkpi { background: var(--acs); border-radius: 2mm; padding: 3mm 4mm; display: flex; flex-direction: column; }
.rkpi b { font-size: 16pt; line-height: 1.1; color: var(--ac2); font-variant-numeric: tabular-nums; }
.rkpis.sm .rkpi b { font-size: 12pt; }
.rkpi span { font-size: 8pt; color: var(--ink2); }
.rkpi small { font-size: 7.5pt; color: var(--mute); }
.rfinds { display: flex; flex-direction: column; gap: 2.5mm; }
.rfind { border-left: 3px solid var(--ac); background: var(--soft); padding: 3mm 4mm; border-radius: 0 2mm 2mm 0; font-size: 9.5pt; color: var(--ink2); break-inside: avoid; }
.rf-t { display: flex; gap: 2mm; align-items: center; font-weight: 700; color: var(--ink); margin-bottom: .8mm; font-size: 10pt; }
.rnote { display: flex; gap: 2.5mm; align-items: flex-start; background: #fffbeb; border: 1px solid #fde68a; color: #78350f; padding: 3mm 4mm; border-radius: 2mm; font-size: 9pt; margin: 4mm 0; }
.rnote .ic { color: #b45309; margin-top: .5mm; }
.rtable { width: 100%; border-collapse: collapse; font-size: 9pt; margin: 2mm 0 4mm; }
.rtable th { text-align: left; font-size: 7.5pt; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--mute); border-bottom: 1.5px solid var(--ink); padding: 2mm 2mm; }
.rtable td { padding: 2mm 2mm; border-bottom: 1px solid var(--line); vertical-align: top; }
.rtable.compact td { padding: 1.5mm 2mm; }
.rtable tbody tr:nth-child(even) td { background: #fafbfc; }
.rtable tr { break-inside: avoid; }
.rtable .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.rhash { word-break: break-all; font-size: 7pt; color: var(--ink2); }
.rdot { display: inline-block; width: 3mm; height: 3mm; border-radius: 50%; vertical-align: -.3mm; }
.rdot.lg { width: 5mm; height: 5mm; }
.rtag { display: inline-block; font-size: 7pt; font-weight: 700; color: var(--ac); background: var(--acs); border-radius: 1mm; padding: 0 1.5mm; margin-top: .5mm; }
.rline { border: 1px solid var(--line); border-top: 3px solid var(--lc); border-radius: 2mm; padding: 4mm 5mm; margin-bottom: 5mm; break-inside: avoid; }
.rl-head { display: flex; gap: 3mm; align-items: center; margin-bottom: 2mm; }
.rl-head h3 { margin: 0; font-size: 13pt; }
.rl-period { text-align: right; }
.rgrid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 6mm; margin: 3mm 0; align-items: start; }
.rcap { font-size: 7.5pt; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--mute); margin: 3mm 0 1.5mm; }
.rstack { display: flex; height: 5mm; border-radius: 1mm; overflow: hidden; gap: .5mm; background: var(--line); }
.rstack span { display: block; height: 100%; }
.rlegend-inline { display: flex; flex-wrap: wrap; gap: 1mm 3mm; margin-top: 2mm; font-size: 7.5pt; color: var(--ink2); }
.rlegend-inline i { display: inline-block; width: 2.5mm; height: 2.5mm; border-radius: .5mm; margin-right: 1mm; vertical-align: -.2mm; }
.rdoc .bars { width: 100%; height: auto; }
.rdoc .bars-base { stroke: var(--line); }
.rdoc .bars-axis { fill: var(--mute); font-size: 9px; }
.rdoc .bar-hit { fill: transparent; }
.rdoc .hourbars { max-width: 110px; }
.rdoc .hb-bar { fill: var(--ac); } .rdoc .hb-bar.n { fill: #7c3aed; } .rdoc .hb-night { fill: #eef0f3; }
.rfig { margin: 3mm 0 4mm; break-inside: avoid; }
.rfig figcaption { font-size: 7.5pt; color: var(--mute); margin-top: 1.5mm; }
.rmap { height: 78mm; border-radius: 2mm; border: 1px solid var(--line); background: #eef0f3; }
.rmap .leaflet-control-attribution { font-size: 7px; }
.leaflet-tooltip.rmap-n { background: transparent; border: 0; box-shadow: none; color: #fff; font-weight: 800; font-size: 10px; padding: 0; }
.leaflet-tooltip.rmap-n::before { display: none; }
.rloc { margin-bottom: 8mm; }
.rloc h3 { margin-top: 2mm; }
.rverdicts { display: flex; flex-direction: column; gap: 1mm; margin: 0 0 3mm; font-size: 9pt; color: var(--ink2); }
.rverdicts .ic { color: #059669; vertical-align: -.5mm; margin-right: 1mm; }
.rnet { width: 100%; height: auto; display: block; background: var(--soft); border-radius: 2mm; }
.rn-l { stroke: var(--ac); stroke-opacity: .55; stroke-linecap: round; }
.rn-sl { stroke: #9ca3af; stroke-opacity: .5; stroke-dasharray: 2 3; }
.rn-s { fill: #9ca3af; }
.rn-n { stroke: #fff; stroke-width: 3; }
.rn-i { fill: #fff; font: 700 10px "Segoe UI", sans-serif; }
.rn-t { fill: var(--ink); font: 600 11px "Segoe UI", sans-serif; }
.rn-c { fill: var(--ac2); font: 700 10px "Segoe UI", sans-serif; paint-order: stroke; stroke: #fff; stroke-width: 3px; }
.rcoloc { margin-bottom: 7mm; break-inside: avoid; }
.rdays { margin: 2mm 0 3mm; }
.rd-row { display: flex; gap: .8mm; align-items: flex-end; height: 16mm; }
.rd-c { flex: 1; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; }
.rd-c span { display: block; width: 100%; background: var(--ac); border-radius: .6mm .6mm 0 0; }
.rd-c small { font-size: 6pt; color: var(--mute); }
.rflag { color: #b91c1c; font-weight: 600; font-size: 8.5pt; }
.rconclusion p { margin: 0 0 3mm; text-align: justify; }
.rblank .rline-blank { border-bottom: 1px dotted #9ca3af; height: 9mm; }
.rmethod { padding-left: 5mm; margin: 0; }
.rmethod li { margin-bottom: 2.5mm; text-align: justify; color: var(--ink2); }
.rsign p { margin: 0 0 12mm; }
.rs-grid { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8mm; }
.rs-grid dt { font-size: 7.5pt; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--mute); }
.rs-grid dd { margin: 2mm 0 0; font-weight: 600; font-size: 11pt; min-height: 6mm; }
.rs-grid small { color: var(--mute); }
.rs-sig dd { border-bottom: 1px solid var(--ink); height: 18mm; }

#printroot { display: none; }
@page { size: A4; margin: 17mm 15mm 16mm;
  @top-center { font: 7.5pt "Segoe UI", sans-serif; color: #b91c1c; letter-spacing: .08em; }
  @bottom-left { font: 7.5pt "Segoe UI", sans-serif; color: #6b7280; }
  @bottom-right { content: "Sayfa " counter(page) " / " counter(pages); font: 7.5pt "Segoe UI", sans-serif; color: #6b7280; } }
@page cover { margin: 0; @top-center { content: none; } @bottom-left { content: none; } @bottom-right { content: none; } }
@media print {
  html, body { height: auto !important; overflow: visible !important; background: #fff !important; }
  body.printing > *:not(#printroot) { display: none !important; }
  body.printing #printroot { display: block; }
  #printroot .rdoc { width: auto; zoom: 1 !important; }
  #printroot .rdoc > section { box-shadow: none; margin: 0; padding: 0; }
  #printroot .rdoc > .rcover { page: cover; width: 210mm; height: 297mm; break-after: page; }
  #printroot .rtoc { break-after: page; }
  #printroot .rchap { break-before: page; }
  #printroot .rchap:first-of-type { break-before: auto; }
  #printroot .rsign { break-inside: avoid; margin-top: 12mm; }
  #printroot h2, #printroot h3 { break-after: avoid; }
}

/* =====================================================================
   Analiz asistanı (sohbet)
   ===================================================================== */
.chat { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 24px; align-items: start; }
.chat-main { display: flex; flex-direction: column; height: calc(100vh - 220px); min-height: 520px; overflow: hidden; }
.chat-thread { flex: 1; overflow: auto; padding: 24px; display: flex; flex-direction: column; gap: 18px; }
.chat-empty { margin: auto; max-width: 640px; text-align: center; padding: 16px; }
.ce-ic { width: 56px; height: 56px; margin: 0 auto 14px; border-radius: 16px; display: grid; place-items: center; background: var(--violet-soft); color: var(--violet); }
.chat-empty h2 { font-size: 20px; }
.chat-empty p { color: var(--muted); margin: 8px 0 20px; }
.ce-sugs { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; text-align: left; }
.ce-sug { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface-2); color: var(--text-2);
  font-size: 13px; line-height: 1.45; cursor: pointer; text-align: left; transition: border-color .15s, background-color .15s; }
.ce-sug .ic { color: var(--violet); margin-top: 1px; }
.ce-sug:hover { border-color: var(--violet); background: var(--violet-soft); color: var(--text); }
.msg { display: flex; gap: 10px; max-width: 920px; }
.msg.me { align-self: flex-end; flex-direction: column; align-items: flex-end; max-width: 72%; }
.msg.me .bubble { background: var(--primary); color: #fff; border-radius: 16px 16px 4px 16px; padding: 10px 14px; white-space: pre-wrap; }
.msg .meta { font-size: 11.5px; color: var(--muted); margin-top: 4px; display: flex; align-items: center; flex-wrap: wrap; }
.msg.ai .bubble { background: var(--surface-2); border: 1px solid var(--border); border-radius: 4px 16px 16px 16px; padding: 14px 18px; }
.avatar-ai { flex: none; width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center; background: var(--violet-soft); color: var(--violet); }
.ai-tag { display: inline-flex; align-items: center; height: 20px; padding: 0 8px; border-radius: 999px; background: var(--violet-soft); color: var(--violet); font-weight: 650; font-size: 11px; }
.msg.err { align-self: center; }
.msg.err .bubble { background: var(--err-soft); color: var(--err); border-radius: 10px; padding: 10px 14px; display: flex; gap: 8px; align-items: center; }
.md { font-size: 14px; line-height: 1.6; color: var(--text); }
.md > * + * { margin-top: 8px; }
.md h4 { font-size: 14.5px; margin-top: 14px; color: var(--text); }
.md h4:first-child { margin-top: 0; }
.md ul, .md ol { padding-left: 20px; margin: 6px 0; }
.md li + li { margin-top: 4px; }
.md code { font-family: var(--mono); font-size: 12.5px; background: var(--surface-3); padding: 1px 5px; border-radius: 4px; }
.chat-busy { padding: 0 24px 12px; color: var(--muted); font-size: 13px; display: flex; align-items: center; gap: 8px; }
.dots { display: inline-flex; gap: 4px; }
.dots i { width: 6px; height: 6px; border-radius: 50%; background: var(--violet); animation: dotb 1s infinite ease-in-out; }
.dots i:nth-child(2) { animation-delay: .15s; } .dots i:nth-child(3) { animation-delay: .3s; }
@keyframes dotb { 0%, 80%, 100% { opacity: .25; transform: translateY(0); } 40% { opacity: 1; transform: translateY(-3px); } }
.chat-compose { display: flex; gap: 10px; align-items: flex-end; padding: 14px 16px; border-top: 1px solid var(--border); background: var(--surface); }
.chat-compose textarea { flex: 1; min-height: 46px; max-height: 180px; resize: vertical; border-radius: 12px; }
.chat-send { width: 46px; height: 46px; padding: 0; border-radius: 12px; }
.chat-side { display: flex; flex-direction: column; gap: 16px; position: sticky; top: 0; }
.knows { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 8px; font-size: 13px; color: var(--text-2); }
.knows li { display: flex; gap: 8px; align-items: flex-start; }
.knows .ic { color: var(--violet); margin-top: 2px; }

@media (max-width: 1280px) {
  .rlayout { grid-template-columns: 340px minmax(0, 1fr); }
  .chat { grid-template-columns: minmax(0, 1fr); }
  .chat-side { position: static; }
}
@media (max-width: 1024px) {
  .rlayout, .settings { grid-template-columns: minmax(0, 1fr); }
  .rpanel { position: static; max-height: none; }
  .settoc { position: static; flex-direction: row; flex-wrap: wrap; }
  .settoc .st-h { display: none; }
  .setgrid { grid-template-columns: minmax(0, 1fr); }
  .coverthumb { max-width: 220px; }
}
@media (max-width: 768px) {
  .rpreview { padding: 10px; }
  .ce-sugs { grid-template-columns: 1fr; }
  .msg.me { max-width: 90%; }
  .chat-main { height: calc(100vh - 180px); }
  .chat-thread { padding: 14px; }
  .facts.wide { grid-template-columns: 1fr 1fr; }
  .tabs { margin-top: 0; }
}

/* =====================================================================
   Genel bakış: öne çıkanlar ve hızlı işlemler · menü grupları
   ===================================================================== */
.nav-sub { font-size: 10.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--sidebar-muted); padding: 12px 12px 4px; opacity: .8; }
.ovhl { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 24px; align-items: start; }
.findlist, .qactions { display: flex; flex-direction: column; gap: 8px; }
.tone-blue { --t: var(--primary); --ts: var(--primary-soft); }
.tone-red { --t: var(--err); --ts: var(--err-soft); }
.tone-amber { --t: var(--warn); --ts: var(--warn-soft); }
.tone-green { --t: var(--ok); --ts: var(--ok-soft); }
.tone-violet { --t: var(--violet); --ts: var(--violet-soft); }
.finding, .qaction { display: flex; align-items: center; gap: 12px; width: 100%; padding: 10px 12px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface);
  text-align: left; cursor: pointer; color: var(--text); transition: border-color .15s, background-color .15s, transform .15s; }
.finding:hover, .qaction:hover { border-color: var(--t); background: color-mix(in srgb, var(--ts) 60%, var(--surface)); }
.finding > .ic:last-child, .qaction > .ic:last-child { color: var(--muted); flex: none; }
.finding b, .qaction b { display: block; font-size: 13.5px; font-weight: 600; line-height: 1.35; }
.finding small, .qaction small { display: block; font-size: 12px; color: var(--muted); margin-top: 2px; line-height: 1.4; }
.fi-ic, .qa-ic { display: grid; place-items: center; flex: none; width: 34px; height: 34px; border-radius: 10px; background: var(--ts); color: var(--t); }
.qaction { padding: 12px 14px; }
@media (max-width: 1024px) { .ovhl { grid-template-columns: minmax(0, 1fr); } }

/* =====================================================================
   Rapor v2 — hazırlama ekranı
   ===================================================================== */
.rlayout2 { display: grid; grid-template-columns: 380px minmax(0, 1fr); gap: 24px; align-items: start; }
.rpanel2 { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.rstep { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); box-shadow: var(--shadow-sm); overflow: hidden; }
.rstep > summary { list-style: none; display: flex; align-items: center; gap: 12px; padding: 14px 16px; cursor: pointer; user-select: none; }
.rstep > summary::-webkit-details-marker { display: none; }
.rstep > summary:hover { background: var(--surface-2); }
.rstep > summary b { display: block; font-size: 14px; color: var(--text); }
.rstep > summary small { display: block; font-size: 12px; color: var(--muted); }
.rs-n { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--primary-soft); color: var(--primary); font-weight: 700; font-size: 13px; flex: none; }
.rstep[open] .rs-n { background: var(--primary); color: #fff; }
.rs-chev { color: var(--muted); transition: transform .15s; }
.rstep[open] .rs-chev { transform: rotate(90deg); }
.rs-body { padding: 4px 16px 16px; border-top: 1px solid var(--border); display: flex; flex-direction: column; gap: 12px; }
.rs-body > :first-child { margin-top: 12px; }
.rs-tools { display: flex; align-items: center; justify-content: space-between; }
.rf { display: flex; flex-direction: column; gap: 6px; margin: 0; font-weight: 400; min-width: 0; }
.rf-l { font-size: 12.5px; font-weight: 600; color: var(--text-2); }
.rf-h { font-size: 11.5px; color: var(--muted); }
.rf input, .rf textarea { width: 100%; }
.rf-2 { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px; align-items: start; }
.rright { min-width: 0; display: flex; flex-direction: column; }
.rtoolbar { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 12px 16px; background: var(--surface);
  border: 1px solid var(--border); border-radius: var(--r-lg) var(--r-lg) 0 0; box-shadow: var(--shadow-sm); }
.rt-info { color: var(--muted); font-size: 13px; }
.rt-zoom { width: auto; height: 36px; }
.rsheet { background: color-mix(in srgb, var(--surface-3) 75%, var(--bg)); border: 1px solid var(--border); border-top: 0; border-radius: 0 0 var(--r-lg) var(--r-lg); padding: 24px; overflow: auto; }
.steps-list { padding-left: 20px; line-height: 1.7; }

/* =====================================================================
   Rapor v2 — kâğıt öğeleri (okunabilirlik)
   ===================================================================== */
.rdoc { font-size: 10pt; }
.rsub { font-size: 11.5pt; margin: 7mm 0 2.5mm; padding-bottom: 1.5mm; border-bottom: 1px solid var(--line); }
.rsmall { font-size: 8.5pt; }
.rdoc .nowrap { white-space: nowrap; }
.rbreak { word-break: break-all; }
.rcode { display: inline-grid; place-items: center; min-width: 7mm; height: 5mm; padding: 0 1.2mm; border-radius: 1.2mm; color: #fff; font-weight: 800; font-size: 7.5pt; letter-spacing: .02em; vertical-align: middle; }
.rcode.lg { min-width: 10mm; height: 10mm; border-radius: 50%; font-size: 10pt; }
.rplus { font-weight: 800; color: var(--mute); }
.rl-head { display: flex; gap: 3mm; align-items: center; margin-bottom: 3mm; }
.rl-head h3 { margin: 0; font-size: 13pt; }
.rl-period b { color: var(--ink); font-size: 9pt; }
.rfinds { gap: 2mm; }
.rfind { display: flex; gap: 3mm; align-items: flex-start; border-left: 0; background: var(--soft); border-radius: 1.5mm; padding: 2.5mm 3.5mm; }
.rf-n { display: grid; place-items: center; flex: none; width: 6mm; height: 6mm; border-radius: 50%; background: var(--ac); color: #fff; font-weight: 800; font-size: 8.5pt; margin-top: .3mm; }
.rfind .rf-t { display: block; font-weight: 700; color: var(--ink); font-size: 10pt; margin: 0 0 .6mm; }
.rf-d { font-size: 9pt; color: var(--ink2); }
.rnote { display: block; background: #f8fafc; border: 1px solid var(--line); border-left: 3px solid var(--ac); color: var(--ink2); border-radius: 0 1.5mm 1.5mm 0; }
.rnote b { color: var(--ink); }
.rfig { margin: 3mm 0 5mm; }
.rfig figcaption { font-size: 8.5pt; color: var(--ink2); margin-top: 2mm; line-height: 1.45; }
.rfig figcaption b { color: var(--ink); }
.pchart { display: block; width: 100%; height: auto; }
.pc-grid { stroke: #e5e7eb; stroke-dasharray: 2 3; }
.pc-base { stroke: #9ca3af; }
.pc-ax { fill: #4b5563; font: 500 9.5px "Segoe UI", system-ui, sans-serif; }
.pc-val { fill: #111827; font: 700 9px "Segoe UI", system-ui, sans-serif; }
.pc-night { fill: #f1f2f5; }
.pbars { display: flex; flex-direction: column; gap: 1.6mm; }
.pb-row { display: grid; grid-template-columns: 34mm minmax(0, 1fr) 18mm; gap: 2.5mm; align-items: center; font-size: 9pt; }
.pb-lab { display: flex; align-items: center; gap: 1.5mm; color: var(--ink2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pb-lab i { width: 2.6mm; height: 2.6mm; border-radius: .6mm; flex: none; }
.pb-track { height: 3.2mm; background: #eef0f3; border-radius: 1mm; overflow: hidden; }
.pb-track span { display: block; height: 100%; border-radius: 1mm; }
.pb-val { text-align: right; font-variant-numeric: tabular-nums; font-size: 9pt; }
.pb-val small { font-weight: 400; color: var(--mute); font-size: 7.5pt; }
.rmatrix { border-collapse: separate; border-spacing: 1.2mm; margin: 1mm -1.2mm 2mm; font-size: 9.5pt; }
.rmatrix thead th { font-weight: 600; text-align: center; vertical-align: bottom; padding: 0 1mm 1mm; font-size: 8pt; color: var(--ink2); }
.rm-n { margin-top: 1mm; max-width: 28mm; line-height: 1.2; }
.rmatrix tbody th { text-align: left; font-weight: 600; white-space: nowrap; padding-right: 2mm; font-size: 9pt; }
.rm-c { text-align: center; min-width: 22mm; height: 10mm; border-radius: 1.5mm; font-weight: 800; font-size: 11pt; font-variant-numeric: tabular-nums;
  background: color-mix(in srgb, var(--ac) calc(var(--k) * 100%), #fff); color: #fff; }
.rm-c.zero { background: #f3f4f6; color: #9ca3af; font-weight: 500; }
.rm-self { text-align: center; background: repeating-linear-gradient(45deg, #f3f4f6 0 2mm, #fff 2mm 4mm); color: #9ca3af; border-radius: 1.5mm; }
.rbip { display: block; width: 100%; height: auto; }
.rb-l { fill: #fff; font: 700 11px "Segoe UI", system-ui, sans-serif; }
.rb-p { fill: #111827; font: 600 10.5px "Segoe UI", system-ui, sans-serif; }
.rb-ph { fill: #6b7280; font: 400 9px "Cascadia Mono", Consolas, monospace; }
.rb-v { font: 800 9.5px "Segoe UI", system-ui, sans-serif; paint-order: stroke; stroke: #fff; stroke-width: 3px; }
.rb-dot { fill: #374151; }
.rmap { height: 86mm; }
.rmap .rmap-tiles { filter: grayscale(1) contrast(.95) brightness(1.05); }
.rmap .leaflet-control-scale-line { font-size: 8px; border-color: #374151; background: rgba(255, 255, 255, .85); }
.rmpin-ic { background: none; border: 0; }
.rmpin { position: relative; width: 26px; height: 26px; border-radius: 50%; background: var(--c); border: 2.5px solid #fff; box-shadow: 0 1px 4px rgba(0, 0, 0, .5); display: grid; place-items: center; }
.rmpin b { color: #fff; font: 800 11px "Segoe UI", sans-serif; }
.rmpin i { position: absolute; top: -9px; right: -11px; font-style: normal; font: 800 9px "Segoe UI", sans-serif; color: #fff; border-radius: 3px; padding: 1px 3px; border: 1.5px solid #fff; }
.rmpin i.e, .rkey.e { background: #7c3aed; }
.rmpin i.i, .rkey.i { background: #b45309; }
.rmpin i + i { right: auto; left: -11px; }
.rkey { display: inline-grid; place-items: center; min-width: 4.5mm; height: 4.5mm; border-radius: 1mm; color: #fff; font-weight: 800; font-size: 7.5pt; margin-right: 1mm; vertical-align: middle; }
.rpin { display: inline-grid; place-items: center; width: 5mm; height: 5mm; border-radius: 50%; color: #fff; font-weight: 800; font-size: 7.5pt; }
.rverdicts { list-style: none; padding: 0; margin: 0 0 3mm; }
.rverdicts li { padding-left: 4mm; position: relative; font-size: 9pt; color: var(--ink2); margin-bottom: 1mm; }
.rverdicts li::before { content: ""; position: absolute; left: 0; top: 1.6mm; width: 1.8mm; height: 1.8mm; border-radius: 50%; background: var(--ac); }
.rtable th { font-size: 7.5pt; color: #4b5563; }
.rtable td { font-size: 9pt; }
.rtable.compact td { font-size: 8.8pt; }
.rkpi span { font-size: 8.5pt; }
.rcoloc .rkpis.sm, .rline .rkpis.sm { grid-template-columns: repeat(5, 1fr); }
.rblank .rline-blank { height: 10mm; border-bottom: 1px solid #d1d5db; }
@media print { .rstep, .rtoolbar { display: none; } }
@media (max-width: 1280px) { .rlayout2 { grid-template-columns: 340px minmax(0, 1fr); } }
@media (max-width: 1024px) { .rlayout2 { grid-template-columns: minmax(0, 1fr); } .rtoolbar { position: static; } }

/* =====================================================================
   Analizler
   ===================================================================== */
.ai-hint { display: flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--violet); margin-top: 2px; }
.agroup { margin-top: 20px; }
.ag-head { display: flex; align-items: baseline; gap: 12px; margin-bottom: 10px; }
.ag-head h2 { font-size: 15px; }
.ag-head p { color: var(--muted); font-size: 13px; }
.agrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.atile { display: flex; flex-direction: column; gap: 10px; padding: 14px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); cursor: pointer;
  box-shadow: var(--shadow-sm); transition: border-color .15s, box-shadow .15s, transform .15s; min-width: 0; }
.atile:hover { border-color: var(--t); box-shadow: var(--shadow); }
.atile:focus-visible { outline: 2px solid var(--t); outline-offset: 2px; }
.atile.on { border-color: var(--t); box-shadow: 0 0 0 3px color-mix(in srgb, var(--t) 25%, transparent); background: color-mix(in srgb, var(--ts) 45%, var(--surface)); }
.at-top { display: flex; gap: 12px; align-items: flex-start; }
.at-top b { display: block; font-size: 14px; line-height: 1.35; color: var(--text); }
.at-top small { display: block; font-size: 12.5px; color: var(--muted); margin-top: 3px; line-height: 1.4; }
.at-params { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 8px; cursor: default; }
.at-params label { margin: 0; display: flex; flex-direction: column; gap: 4px; font-size: 11.5px; color: var(--muted); font-weight: 600; }
.at-params input { height: 32px; font-size: 13px; padding: 0 8px; }
.at-foot { margin-top: auto; display: flex; justify-content: flex-end; }
.at-run { display: inline-flex; align-items: center; gap: 4px; font-size: 12.5px; font-weight: 650; color: var(--t); }
.aresults { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 0.9fr); gap: 20px; align-items: start; margin-top: 24px; }
.amap { position: sticky; top: 0; min-width: 0; }
#results { min-width: 0; scroll-margin-top: 12px; }
#results .cardhead { gap: 12px; align-items: center; }
.ai-btn { color: var(--violet); border-color: color-mix(in srgb, var(--violet) 40%, var(--border)); }
.ai-btn:hover { background: var(--violet-soft); border-color: var(--violet); color: var(--violet); }
.aiout:empty { display: none; }
.aiout { padding: 0 20px 4px; }
.aibox { border: 1px solid color-mix(in srgb, var(--violet) 35%, var(--border)); background: color-mix(in srgb, var(--violet-soft) 55%, var(--surface)); border-radius: 12px; padding: 12px 16px; margin-bottom: 12px; }
.ai-head { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.ai-head .ai-badge { height: 24px; font-size: 12px; }

/* =====================================================================
   Dosyalar
   ===================================================================== */
.fgrid { display: grid; grid-template-columns: 400px minmax(0, 1fr); gap: 24px; align-items: start; }
.fcol { display: flex; flex-direction: column; gap: 24px; min-width: 0; }
.drop2 { display: flex; align-items: center; gap: 16px; text-align: left; padding: 22px 20px; }
.drop2 .dropicon { margin: 0; flex: none; }
.upstatus { display: flex; flex-direction: column; gap: 6px; margin-top: 10px; }
.upstatus:empty { display: none; }
.upitem { display: flex; gap: 10px; align-items: center; padding: 8px 10px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface-2); font-size: 13px; }
.upitem small { display: block; color: var(--muted); font-size: 12px; }
.upitem b { overflow-wrap: anywhere; }
.up-ic { display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; flex: none; }
.up-ic.ok { background: var(--ok-soft); color: var(--ok); } .up-ic.warn { background: var(--warn-soft); color: var(--warn); } .up-ic.err { background: var(--err-soft); color: var(--err); }
.kindhelp { display: grid; gap: 10px; margin-top: 14px; }
.kindhelp > div { padding: 10px 12px; border-radius: 8px; background: var(--surface-2); }
.kindhelp p { font-size: 12.5px; color: var(--text-2); margin-top: 6px; line-height: 1.45; }
.covtable { display: flex; flex-direction: column; }
.cov-row { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr) minmax(0, 1fr); gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--border); align-items: center; }
.cov-row:last-child { border-bottom: 0; }
.cov-row small { display: block; font-size: 11px; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: .04em; }
.covok, .covno { display: inline-flex; align-items: center; gap: 4px; font-size: 12.5px; font-weight: 600; }
.covok { color: var(--ok); } .covno { color: var(--warn); font-weight: 500; }
.covok small { display: inline; text-transform: none; letter-spacing: 0; }
.flist { display: flex; flex-direction: column; gap: 8px; }
.frow2 { display: grid; grid-template-columns: 40px minmax(0, 1fr) 80px 170px auto; gap: 14px; align-items: center; padding: 12px 14px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); }
.frow2:hover { border-color: var(--border-strong); }
.f-ic { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 10px; }
.f-ic.kendi { background: var(--primary-soft); color: var(--primary); } .f-ic.ters { background: var(--warn-soft); color: var(--warn); }
.f-name { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13.5px; }
.f-meta { display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: center; margin-top: 4px; font-size: 12.5px; }
.f-num { text-align: right; } .f-num b { display: block; font-size: 16px; font-variant-numeric: tabular-nums; } .f-num small { color: var(--muted); font-size: 11.5px; }
.f-val { display: flex; flex-direction: column; gap: 4px; align-items: flex-start; }
.f-val .badge { gap: 4px; }
.f-act { display: flex; gap: 6px; align-items: center; justify-content: flex-end; }
.btn-icon.danger { color: var(--err); } .btn-icon.danger:hover { background: var(--err-soft); }

/* =====================================================================
   Üyeler
   ===================================================================== */
.rolecards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.rolecard { padding: 16px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); box-shadow: var(--shadow-sm); border-top: 3px solid var(--t); }
.rc-top { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.rc-top b { flex: 1; font-size: 15px; }
.rolecard ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--text-2); }
.rolecard li { display: flex; gap: 8px; align-items: flex-start; }
.rolecard li .ic { color: var(--t); margin-top: 3px; }
.mlist { display: flex; flex-direction: column; }
.mrow { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--border); }
.mrow:last-child { border-bottom: 0; }
.msel { width: auto; min-width: 150px; height: 34px; }

@media (max-width: 1280px) { .aresults { grid-template-columns: minmax(0, 1fr); } .amap { position: static; } .fgrid { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 900px) { .frow2 { grid-template-columns: 40px minmax(0, 1fr); } .f-num, .f-val, .f-act { grid-column: 2; text-align: left; justify-content: flex-start; } .rolecards { grid-template-columns: minmax(0, 1fr); } }

.frow2 { grid-template-columns: 40px minmax(0, 1fr); align-items: start; }
.f-top { display: flex; align-items: center; gap: 12px; min-width: 0; }
.f-top .f-name { flex: 1; min-width: 0; }
.f-meta { gap: 8px 14px; margin-top: 8px; }
.f-meta .ic { vertical-align: -2px; }
.f-line { display: inline-flex; align-items: center; gap: 6px; }
.f-line i { width: 9px; height: 9px; border-radius: 50%; }
.f-line .mono { font-size: 12px; }
@media (max-width: 900px) { .f-top { flex-wrap: wrap; } }

/* =====================================================================
   Rapor v3 — bilirkişi raporu düzeni (siyah-beyaz baskıya uygun)
   ===================================================================== */
.rdoc { --ink: #111111; --ink2: #333333; --mute: #5f6368; --line: #d9dce1; --soft: #f5f6f8;
  font: 10.5pt/1.55 Cambria, Georgia, "Times New Roman", serif; color: var(--ink); }
.rdoc h1, .rdoc h2, .rdoc h3, .rdoc h4, .rdoc th, .rdoc .rtable, .rdoc .rkpi, .rdoc .tcap, .rdoc figcaption, .rdoc .rsmall, .rdoc .ltag, .rdoc .rkv,
.rdoc .rc-head, .rdoc .rc-kicker, .rdoc .rc-info, .rdoc .rtoc-list, .rdoc .rs-grid, .rdoc .rref { font-family: "Segoe UI", Calibri, Arial, sans-serif; }
.rdoc p { margin: 0 0 3mm; text-align: justify; hyphens: auto; }
.rdoc > section { padding: 22mm 20mm 20mm; }
/* başlıklar */
.rh1 { display: flex; align-items: baseline; gap: 4mm; font-size: 15pt; font-weight: 700; letter-spacing: .02em; text-transform: uppercase; color: var(--ink);
  padding-bottom: 2.5mm; margin: 0 0 6mm; border-bottom: 1.5pt solid var(--ink); }
.rh1.plain { text-transform: none; letter-spacing: 0; font-size: 17pt; }
.rh2 { display: flex; align-items: baseline; gap: 3mm; font-size: 12pt; font-weight: 700; margin: 7mm 0 3mm; color: var(--ink); break-after: avoid; }
.rh2.plain { margin-top: 10mm; }
.rh3 { font-size: 10.5pt; font-weight: 700; margin: 6mm 0 2mm; color: var(--ink); text-transform: uppercase; letter-spacing: .04em; break-after: avoid; }
.rnum { color: var(--ac); min-width: 8mm; }
.rchap.cont > .rh2:first-child { margin-top: 0; }
.rlead { color: var(--ink2); }
/* hat kodu: harf kutusu (renk yalnızca sol şerit) */
.ltag { display: inline-grid; place-items: center; min-width: 5.2mm; height: 5.2mm; padding: 0 1mm; border: 1pt solid var(--ink); border-left: 2.2mm solid var(--lc);
  border-radius: 1mm; background: #fff; color: var(--ink); font-weight: 800; font-size: 8.5pt; line-height: 1; vertical-align: -1mm; }
.ltag.lg { min-width: 8mm; height: 8mm; font-size: 12pt; border-left-width: 3mm; }
.lname b { font-weight: 700; }
/* harita/anahtar şekilleri: siyah çerçeveli, içinde harf */
.shp { position: relative; display: inline-grid; place-items: center; width: 22px; height: 22px; background: var(--lc); color: #fff; font: 800 11px "Segoe UI", sans-serif;
  border: 2px solid #111; box-shadow: 0 0 0 1.5px #fff; }
.shp.circle { border-radius: 50%; }
.shp.square { border-radius: 2px; }
.shp.diamond { width: 26px; height: 26px; clip-path: polygon(50% 0, 100% 50%, 50% 100%, 0 50%); border: 0; box-shadow: none; background: #111; }
.shp.hex { clip-path: polygon(25% 3%, 75% 3%, 100% 50%, 75% 97%, 25% 97%, 0 50%); border: 0; box-shadow: none; background: var(--lc); outline: 0; }
.shpw { position: relative; display: inline-grid; place-items: center; }
.shpw i { position: absolute; top: -10px; right: -12px; font: 800 8.5px "Segoe UI", sans-serif; font-style: normal; color: #fff; background: #111; border: 1.5px solid #fff; border-radius: 3px; padding: 0 2px; line-height: 12px; }
td .shp.diamond { width: 22px; height: 22px; }
td .shp { width: 18px; height: 18px; font-size: 9.5px; }
/* kapak */
.rdoc > .rcover { display: flex; flex-direction: column; padding: 18mm 20mm 14mm; height: 297mm; grid-template-columns: none; }
.rc-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 8mm; padding-bottom: 5mm; border-bottom: 1pt solid var(--ink); }
.rc-org { display: flex; align-items: center; gap: 4mm; }
.rc-org b { display: block; font-size: 12pt; color: var(--ink); }
.rc-org span { display: block; font-size: 9pt; color: var(--mute); }
.rc-mono { display: grid; place-items: center; width: 13mm; height: 13mm; border: 1.5pt solid var(--ac); color: var(--ac); font: 800 12pt "Segoe UI", sans-serif; letter-spacing: .04em; border-radius: 1mm; }
.rc-class { border: 1.5pt solid var(--ink); padding: 2mm 4mm; text-align: center; max-width: 72mm; }
.rc-class small { display: block; font-size: 6.5pt; letter-spacing: .18em; color: var(--mute); font-weight: 700; }
.rc-class b { display: block; font-size: 9pt; letter-spacing: .08em; color: var(--ink); }
.rc-main { margin-top: 42mm; }
.rc-kicker { font-size: 9.5pt; font-weight: 700; letter-spacing: .32em; color: var(--ac); }
.rc-main h1 { font: 700 26pt/1.15 "Segoe UI", Calibri, Arial, sans-serif; color: var(--ink); margin: 4mm 0 0; letter-spacing: -.01em; max-width: 150mm; }
.rc-rule { width: 28mm; height: 1.6mm; background: var(--ac); margin: 7mm 0 5mm; }
.rc-sub { font: 400 13pt/1.4 "Segoe UI", Calibri, Arial, sans-serif; color: var(--ink2); }
.rc-info { margin-top: auto; width: 100%; border-collapse: collapse; font-size: 9.5pt; }
.rc-info th { width: 44mm; text-align: left; vertical-align: top; font-weight: 600; color: var(--mute); padding: 2.6mm 4mm 2.6mm 0; border-top: .5pt solid var(--line); font-size: 8.5pt; text-transform: uppercase; letter-spacing: .06em; }
.rc-info td { padding: 2.6mm 0; border-top: .5pt solid var(--line); color: var(--ink); font-weight: 600; }
.rc-info tr:first-child th, .rc-info tr:first-child td { border-top: 1pt solid var(--ink); }
.rc-title { font-weight: 400; color: var(--mute); }
.rc-lines > div { margin: .6mm 0; font-weight: 600; }
.rc-lines .mono { font-weight: 400; color: var(--mute); }
.rc-warn { margin-top: 6mm; border: 1pt solid var(--ink); padding: 3mm 4mm; font-size: 8.5pt; }
.rc-warn b { font: 700 7.5pt "Segoe UI", sans-serif; letter-spacing: .14em; text-transform: uppercase; }
.rc-warn p { margin: 1mm 0 0; font-size: 8.5pt; color: var(--ink2); text-align: left; }
.rc-foot { margin-top: 3mm; font: 400 7.5pt "Segoe UI", sans-serif; color: var(--mute); }
/* içindekiler */
.rtoc-list { border-top: 1pt solid var(--ink); }
.rt-row { display: grid; grid-template-columns: 14mm 1fr; padding: 2.2mm 0; border-bottom: .5pt solid var(--line); }
.rt-row:not(.main) { padding-left: 8mm; grid-template-columns: 14mm 1fr; }
.rt-row.main .rt-t { font-weight: 700; text-transform: uppercase; letter-spacing: .03em; font-size: 10pt; }
.rt-n { font-weight: 700; color: var(--ac); }
.rt-t small { display: block; font-size: 8.5pt; color: var(--mute); text-transform: none; letter-spacing: 0; font-weight: 400; }
/* tablolar ve açıklamalar */
.tcap { font-size: 8.5pt; color: var(--ink2); margin: 4mm 0 1.5mm; }
.tcap b { color: var(--ink); }
.rtable { border-top: 1pt solid var(--ink); border-bottom: 1pt solid var(--ink); }
.rtable th { color: var(--ink); font-size: 7.5pt; letter-spacing: .05em; border-bottom: .75pt solid var(--ink); background: none; }
.rtable tbody tr:nth-child(even) td { background: #f6f6f6; }
.rtable td { border-bottom: .4pt solid var(--line); }
.rkv { width: 100%; border-collapse: collapse; font-size: 9pt; margin: 2mm 0 4mm; border-top: 1pt solid var(--ink); border-bottom: 1pt solid var(--ink); }
.rkv th { text-align: left; font-weight: 600; color: var(--mute); width: 34mm; padding: 1.8mm 2mm 1.8mm 0; vertical-align: top; border-bottom: .4pt solid var(--line); font-size: 8.3pt; }
.rkv td { padding: 1.8mm 3mm 1.8mm 0; vertical-align: top; border-bottom: .4pt solid var(--line); }
.rbar { display: block; height: 2.6mm; background: #ececec; }
.rbar span { display: block; height: 100%; background: #333; }
.rkpis { grid-template-columns: repeat(3, 1fr); gap: 0; border: 1pt solid var(--ink); margin: 3mm 0 4mm; }
.rkpi { background: #fff; border-radius: 0; padding: 3mm 4mm; border-right: .5pt solid var(--line); border-bottom: .5pt solid var(--line); }
.rkpi:nth-child(3n) { border-right: 0; }
.rkpi:nth-last-child(-n+3) { border-bottom: 0; }
.rkpi b { color: var(--ink); font-size: 15pt; }
.rkpi span { color: var(--ink2); font-size: 8.5pt; }
.rfindings { margin: 0; padding-left: 7mm; }
.rfindings li { margin-bottom: 2.6mm; text-align: justify; }
.rfindings li::marker { font-weight: 700; color: var(--ac); font-family: "Segoe UI", sans-serif; }
.rref { font-size: 8pt; color: var(--mute); white-space: nowrap; }
.rnote { border-left: 2pt solid var(--ink); background: #f6f6f6; border-top: 0; border-right: 0; border-bottom: 0; color: var(--ink2); }
.rline, .rloc, .rcoloc { border: 0; border-top: 1pt solid var(--ink); border-radius: 0; padding: 4mm 0 0; margin: 0 0 8mm; break-inside: auto; }
.rline:first-of-type { border-top: 0; padding-top: 0; }
.rl-head h4 { margin: 0; font: 700 12pt "Segoe UI", sans-serif; }
.rplus { font: 800 12pt "Segoe UI", sans-serif; color: var(--ink); }
.rkey { background: #111; color: #fff; }
.rflag { color: #111; }
/* grafikler: koyu gri, siyah-beyaz okunur */
.pc-bar { fill: #3a3f45; }
.pc-night { fill: url(#hatch); fill: #ededed; }
.pc-grid { stroke: #d6d6d6; }
.pc-base { stroke: #111; }
.pc-ax { fill: #333; }
.pc-val { fill: #111; }
.rfig { margin: 2mm 0 5mm; }
.rfig figcaption { font-size: 8.3pt; color: var(--ink2); }
/* matris */
.rm-c { background: #fff; color: var(--ink); border: 1pt solid var(--ink); font-size: 12pt; }
.rm-c.zero { border: .5pt dashed #9aa0a6; background: #fff; color: #888; }
.rm-self { background: repeating-linear-gradient(45deg, #eee 0 1.5mm, #fff 1.5mm 3mm); }
/* ortak kişi şeması */
.rb-edge { stroke: #2b2f33; stroke-opacity: .85; }
.rb-box { fill: #fff; stroke: #111; stroke-width: 1.2; }
.rb-let { fill: #111; }
.rb-lt { fill: #fff; font: 800 13px "Segoe UI", sans-serif; }
.rb-l { fill: #111; font: 700 11px "Segoe UI", sans-serif; }
.rb-key { stroke: #111; stroke-width: 2; }
.rb-v { fill: #111; font: 700 9.5px "Segoe UI", sans-serif; stroke: none; }
/* haritalar */
.rmap { height: 92mm; border: 1pt solid var(--ink); border-radius: 0; background: #fff; }
.rmap.tall { height: 120mm; }
.rmap .rmap-tiles { filter: grayscale(1) contrast(.9) brightness(1.1); opacity: .62; }
.rmk-ic { background: none; border: 0; }
.rmk-group { display: flex; gap: 3px; justify-content: center; align-items: center; height: 100%; }
.rmk-num { display: inline-flex; align-items: center; justify-content: center; gap: 3px; height: 24px; min-width: 24px; padding: 0 6px; border-radius: 12px; background: #fff; color: #111;
  border: 2px solid #111; box-shadow: inset 0 -3px 0 var(--lc, #111); font: 800 11px "Segoe UI", sans-serif; white-space: nowrap; }
.rmk-num.dark { background: #111; color: #fff; box-shadow: 0 0 0 1.5px #fff; }
.rmk-num i { font-style: normal; background: #111; color: #fff; border-radius: 3px; padding: 0 3px; font-size: 9px; line-height: 13px; }
.rmap .leaflet-control-attribution { font: 7px "Segoe UI", sans-serif; }
.rmap .leaflet-control-scale-line { font: 8px "Segoe UI", sans-serif; border-color: #111; }
/* imza */
.rsign p { text-align: justify; }
/* sayfa üst/alt bilgileri */
@page { size: A4; margin: 20mm 18mm 18mm;
  @top-left { font: 7.5pt "Segoe UI", sans-serif; color: #5f6368; vertical-align: bottom; padding-bottom: 3mm; }
  @top-center { content: none; }
  @top-right { font: 700 7pt "Segoe UI", sans-serif; color: #111; letter-spacing: .12em; vertical-align: bottom; padding-bottom: 3mm; }
  @bottom-left { font: 7.5pt "Segoe UI", sans-serif; color: #5f6368; }
  @bottom-center { content: "Sayfa " counter(page) " / " counter(pages); font: 8pt "Segoe UI", sans-serif; color: #111; }
  @bottom-right { content: none; } }
@page cover { margin: 0; @top-left { content: none; } @top-right { content: none; } @bottom-left { content: none; } @bottom-center { content: none; } }
@media print {
  #printroot .rdoc > section { padding: 0; }
  #printroot .rdoc > .rcover { padding: 18mm 20mm 14mm; }
  #printroot .rchap { break-before: page; }
  #printroot .rloc, #printroot .rcoloc, #printroot .rline { break-inside: auto; }
  #printroot .rfig, #printroot .rkv, #printroot .rkpis, #printroot .rl-head, #printroot .rmatrix { break-inside: avoid; }
  #printroot .rl-head { break-after: avoid; }
}

/* =====================================================================
   Analizler v3 — iki sütun: sol liste, sağda sabit harita + sonuç
   ===================================================================== */
.alayout { display: grid; grid-template-columns: 360px minmax(0, 1fr); gap: 20px; align-items: start; }
.aside { display: flex; flex-direction: column; gap: 16px; position: sticky; top: 0; max-height: calc(100vh - 110px); overflow: auto; padding-bottom: 4px; scrollbar-width: thin; }
.apicks { display: flex; flex-direction: column; gap: 16px; }
.apicks .sb-label { margin-bottom: 8px; }
.apick { display: flex; flex-direction: column; gap: 6px; }
.apick-item { display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px 10px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); cursor: pointer; text-align: left; color: var(--text); }
.apick-item .lt-dot { width: 12px; height: 12px; border-radius: 50%; border: 2px solid var(--lc); flex: none; }
.apick-item b { display: block; font-size: 13px; font-weight: 600; }
.apick-item small { display: block; font-size: 11.5px; color: var(--muted); font-family: var(--mono); }
.apick-item:hover:not(:disabled) { border-color: var(--lc); }
.apick-item.on { border-color: var(--lc); background: color-mix(in srgb, var(--lc) 12%, var(--surface)); }
.apick-item.on .lt-dot { background: var(--lc); }
.apick-item .ic { color: var(--lc); }
.apick-item:disabled { opacity: .45; cursor: not-allowed; }
.alist { display: flex; flex-direction: column; gap: 4px; padding-top: 12px; }
.asec { padding: 12px 4px 6px; border-top: 1px solid var(--border); margin-top: 6px; }
.asec:first-child { border-top: 0; margin-top: 0; padding-top: 0; }
.asec b { display: block; font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--text-2); }
.asec small { font-size: 12px; color: var(--muted); }
.aitem { display: flex; gap: 12px; align-items: flex-start; padding: 10px; border-radius: 10px; border: 1px solid transparent; cursor: pointer; transition: background-color .15s, border-color .15s; }
.aitem:hover { background: var(--surface-2); border-color: var(--border); }
.aitem:focus-visible { outline: 2px solid var(--t); outline-offset: 1px; }
.aitem.on { background: color-mix(in srgb, var(--ts) 60%, var(--surface)); border-color: var(--t); }
.aitem .qa-ic { width: 32px; height: 32px; }
.aitem b { display: block; font-size: 13.5px; font-weight: 600; line-height: 1.35; color: var(--text); }
.aitem small { display: block; font-size: 12px; color: var(--muted); margin-top: 2px; line-height: 1.4; }
.ai-go { color: var(--muted); margin-top: 8px; }
.aitem.on .ai-go { color: var(--t); }
.aparams { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 10px; cursor: default; }
.aparams.col { grid-template-columns: 1fr; }
.aparams label { margin: 0; display: flex; flex-direction: column; gap: 4px; font-size: 11.5px; color: var(--muted); font-weight: 600; }
.aparams input { height: 32px; font-size: 13px; padding: 0 8px; }
.amain { min-width: 0; display: flex; flex-direction: column; gap: 16px; }
.amapwrap { position: sticky; top: 0; z-index: 30; }
.amapwrap .mapcard { box-shadow: var(--shadow-lg); }
.amapwrap .mapcard .cardhead { padding-top: 12px; padding-bottom: 10px; }
.amapwrap .mapcard > .mapbox { margin-bottom: 14px; height: 300px; }
.astart { text-align: center; padding: 40px 16px; max-width: 520px; margin: 0 auto; }
.astart .ce-ic { background: var(--primary-soft); color: var(--primary); }
.astart h2 { font-size: 18px; }
.astart p { color: var(--muted); margin-top: 8px; }
@media (max-width: 1100px) { .alayout { grid-template-columns: minmax(0, 1fr); } .aside { position: static; max-height: none; } .amapwrap { position: static; } }

.rfindings li { text-align: left; }
.rdoc .rtable td, .rdoc .rkv td { text-align: left; }
.rdoc .rtable td.num { text-align: right; }

@media print { #printroot .rgrid2 { break-inside: avoid; } }

.amain #results { scroll-margin-top: 400px; }
@media (max-width: 1100px) { .amain #results { scroll-margin-top: 12px; } }

/* =====================================================================
   Rapor v4 — dosya kapağı, yer kartları, harita açıklamaları
   ===================================================================== */
.rdoc > .rcover2 { position: relative; height: 297mm; padding: 0; overflow: hidden; display: flex; flex-direction: column;
  background: linear-gradient(160deg, var(--ac) 0%, var(--ac2) 100%); color: #fff; }
.rcover2::before { content: ""; position: absolute; inset: 9mm; border: 1pt solid rgba(255, 255, 255, .35); pointer-events: none; }
.fc-top { display: flex; justify-content: space-between; align-items: center; padding: 20mm 20mm 0; }
.fc-org { display: flex; align-items: center; gap: 4mm; }
.fc-org b { display: block; font: 700 12pt "Segoe UI", sans-serif; letter-spacing: .02em; }
.fc-org span { display: block; font: 400 9pt "Segoe UI", sans-serif; opacity: .8; }
.fc-mono { display: grid; place-items: center; width: 14mm; height: 14mm; border: 1.5pt solid #fff; border-radius: 50%; font: 800 12pt "Segoe UI", sans-serif; }
.fc-no { text-align: right; font-family: "Segoe UI", sans-serif; }
.fc-no small { display: block; font-size: 7pt; letter-spacing: .25em; opacity: .75; }
.fc-no b { display: block; font-size: 16pt; letter-spacing: .04em; }
/* dosya etiketi */
.fc-label { position: relative; margin: 34mm 20mm 0; background: #fff; color: #111; padding: 12mm 12mm 8mm; border-radius: 1.5mm; box-shadow: 0 2mm 6mm rgba(0, 0, 0, .25); }
.fc-label::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 2.2mm; background: var(--ac); border-radius: 1.5mm 0 0 1.5mm; }
.fc-kicker { font: 700 8.5pt "Segoe UI", sans-serif; letter-spacing: .3em; color: var(--ac); }
.fc-label h1 { font: 800 23pt/1.15 "Segoe UI", sans-serif; margin: 3mm 0 2mm; color: #111; letter-spacing: -.01em; }
.fc-sub { font: 400 12pt "Segoe UI", sans-serif; color: #444; margin-bottom: 6mm; }
.fc-info { width: 100%; border-collapse: collapse; font: 9.5pt "Segoe UI", sans-serif; }
.fc-info th { width: 40mm; text-align: left; vertical-align: top; font-size: 7.5pt; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: #666; padding: 2.2mm 3mm 2.2mm 0; border-top: .5pt solid #ddd; }
.fc-info td { padding: 2.2mm 0; border-top: .5pt solid #ddd; font-weight: 600; color: #111; }
.fc-lines > div { display: flex; align-items: center; gap: 2mm; margin: .5mm 0; }
.fc-lines .mono { font-weight: 400; color: #555; }
.fc-dot { width: 3mm; height: 3mm; border-radius: 50%; border: .75pt solid #111; flex: none; }
.fc-title { font-weight: 400; color: #666; }
/* çapraz GİZLİ damgası */
.fc-stamp { position: absolute; right: 16mm; top: 64mm; transform: rotate(-16deg); border: 2.2pt solid #c8102e; outline: 1pt solid #c8102e; outline-offset: 1.2mm;
  color: #c8102e; background: rgba(255, 255, 255, .92); padding: 2.5mm 6mm 2mm; text-align: center; font-family: "Segoe UI", Impact, sans-serif; z-index: 2; border-radius: 1mm; }
.fc-stamp b { display: block; font-size: 30pt; font-weight: 900; letter-spacing: .18em; line-height: 1; }
.fc-stamp span { display: block; font-size: 7.5pt; font-weight: 800; letter-spacing: .14em; margin-top: 1mm; text-transform: uppercase; }
.fc-bottom { margin-top: auto; padding: 0 20mm 18mm; font: 8.5pt/1.5 "Segoe UI", sans-serif; }
.fc-bottom b { display: block; font-size: 7pt; letter-spacing: .2em; text-transform: uppercase; opacity: .85; margin-bottom: 1mm; }
.fc-bottom p { margin: 0; opacity: .92; text-align: left; }
.fc-addr { margin-top: 2mm; opacity: .75; }
/* kişi adı + harf */
.pname { display: inline-flex; align-items: center; gap: 1.5mm; font-weight: 700; font-family: "Segoe UI", sans-serif; }
.pname i { display: inline-grid; place-items: center; width: 4.6mm; height: 4.6mm; border-radius: 1mm; color: #fff; font: 800 7.5pt "Segoe UI", sans-serif; font-style: normal; border: .75pt solid #111; }
.ltag { background: var(--lc); color: #fff; border: 1pt solid #111; border-left-width: 1pt; }
.ltag.lg { border-left-width: 1pt; }
/* yer numarası */
.pbadge { display: inline-grid; place-items: center; min-width: 7mm; height: 4.8mm; padding: 0 1.2mm; border-radius: 2.4mm; background: #111; color: #fff; font: 800 7.5pt "Segoe UI", sans-serif; vertical-align: .2mm; }
/* haritalar */
.rmap.mini { height: 52mm; border-width: .75pt; }
.ymk { display: inline-flex; gap: 3px; align-items: center; justify-content: center; height: 24px; }
.ymk b { display: inline-grid; place-items: center; min-width: 30px; height: 22px; padding: 0 4px; border-radius: 11px; background: #fff; color: #111; border: 2px solid #111; font: 800 11px "Segoe UI", sans-serif; box-shadow: 0 1px 3px rgba(0, 0, 0, .35); }
.ymk.shared b { background: #c8102e; color: #fff; border-color: #fff; outline: 2px solid #111; }
.ymk.pin b { min-width: 36px; height: 24px; font-size: 12px; }
.ymk.sm b { min-width: 24px; height: 16px; font-size: 8.5px; border-width: 1.5px; }
.ymk.sm.shared b { outline-width: 1.5px; }
.rmap-legend { background: rgba(255, 255, 255, .96); border: 1pt solid #111; padding: 2mm 2.5mm; font: 8px/1.45 "Segoe UI", sans-serif; color: #111; max-width: 62mm; }
.rmap-legend > b { display: block; font-size: 8.5px; letter-spacing: .1em; text-transform: uppercase; margin-bottom: 1mm; }
.rmap-legend > div { display: flex; align-items: center; gap: 4px; margin: 1px 0; }
.rmap-legend .rl-list { display: block; margin-top: 1.5mm; padding-top: 1.5mm; border-top: .5pt solid #ccc; }
.rmap-legend .rl-list > div { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* yer kartları */
.patlas { display: grid; grid-template-columns: 1fr 1fr; gap: 5mm; }
.pcard { border: 1pt solid #111; break-inside: avoid; display: flex; flex-direction: column; font-family: "Segoe UI", sans-serif; }
.pc-head { display: flex; gap: 2.5mm; align-items: flex-start; padding: 2.5mm 3mm; border-bottom: .75pt solid #111; font-size: 8.5pt; line-height: 1.3; }
.pc-head .pbadge { min-width: 9mm; height: 6mm; font-size: 9pt; flex: none; }
.pc-head b { font-size: 8.5pt; }
.pcard .rmap { border: 0; border-bottom: .75pt solid #111; }
.pc-body { padding: 2.5mm 3mm; font-size: 8.3pt; display: flex; flex-direction: column; gap: 1.5mm; }
.pc-row { display: grid; grid-template-columns: auto 1fr; gap: .5mm 2mm; align-items: center; }
.pc-row small { grid-column: 2; color: #555; font-size: 7.8pt; }
.pc-row .pname { font-size: 8.3pt; }
.pc-role { background: #f3f4f6; padding: 1mm 2mm; border-left: 2pt solid #111; }
.pc-co { background: #fdecee; padding: 1mm 2mm; border-left: 2pt solid #c8102e; }
.pagebreak { break-after: page; height: 0; }
.rb-h { fill: #555; font: 700 9px "Segoe UI", sans-serif; letter-spacing: .12em; }
.rb-l2 { fill: #fff; font: 700 11px "Segoe UI", sans-serif; paint-order: stroke; stroke: rgba(0, 0, 0, .25); stroke-width: 2px; }
.rb-pin { fill: #fff; stroke: #111; stroke-width: 1.6; }
.rb-pin.shared { fill: #c8102e; stroke: #111; }
.rb-pt { fill: #111; font: 800 10.5px "Segoe UI", sans-serif; }
.rb-pt.shared { fill: #fff; }
@media print {
  #printroot .rdoc > .rcover2 { page: cover; width: 210mm; height: 297mm; break-after: page; padding: 0; }
  #printroot .pcard { break-inside: avoid; }
  #printroot .patlas { display: grid; }
}

/* v4 düzeltmeleri */
.patlas { margin-bottom: 5mm; break-inside: avoid; page-break-inside: avoid; align-items: start; }
.fc-label { margin-top: 30mm; }
.fc-stamp { top: auto; bottom: 46mm; right: 24mm; transform: rotate(-14deg); padding: 3mm 8mm 2.5mm; }
.fc-stamp b { font-size: 40pt; }
.fc-stamp span { font-size: 8pt; }
@media print { #printroot .patlas { break-inside: avoid; } }

/* yer kartı: solda yakın plan harita, sağda bilgi; bölünmeyen tek blok */
.pcard2 { display: grid; grid-template-columns: 74mm minmax(0, 1fr); border: 1pt solid #111; margin-bottom: 5mm; break-inside: avoid; page-break-inside: avoid; font-family: "Segoe UI", sans-serif; }
.pc-map { border-right: .75pt solid #111; min-height: 62mm; }
.pc-map .rmap.mini { height: 100%; min-height: 62mm; border: 0; }
.pc-side { display: flex; flex-direction: column; min-width: 0; }
.pcard2 .pc-head { border-bottom: .75pt solid #111; }
@media print { #printroot .pcard2 { break-inside: avoid; } }

/* =====================================================================
   v9 — ortak cihaz, olay anı, veri kalitesi
   ===================================================================== */
.badge.warn { background: var(--warn-soft); color: var(--warn); }
.badge.info { background: var(--primary-soft); color: var(--primary); }
.xcard { border: 1px solid var(--border); border-radius: 10px; padding: 10px 12px; margin: 8px 0 12px; background: var(--surface); }
.xcard.hot { border-color: var(--err); box-shadow: inset 3px 0 0 var(--err); }
.xcard .verdict { margin-top: 0; }
.aparam-chk { display: flex !important; align-items: center; gap: 8px; flex-direction: row !important; font-size: 12.5px; color: var(--text-2); cursor: pointer; }
.aparam-chk input { width: 16px; height: 16px; margin: 0; }
.inc-ic b { display: grid; place-items: center; height: 20px; padding: 0 6px; border-radius: 4px; background: #c8102e; color: #fff; font: 800 10.5px "Segoe UI", sans-serif;
  letter-spacing: .08em; border: 2px solid #fff; box-shadow: 0 1px 4px rgba(0, 0, 0, .4); }
.qscore { display: flex; gap: 20px; align-items: center; margin: 8px 0 14px; flex-wrap: wrap; }
.qs-ring { --c: var(--ok); width: 112px; height: 112px; border-radius: 50%; display: grid; place-content: center; text-align: center; flex: none;
  background: radial-gradient(closest-side, var(--surface) 78%, transparent 79%), conic-gradient(var(--c) calc(var(--p) * 1%), var(--surface-3) 0); }
.qs-ring.tone-warn { --c: var(--warn); }
.qs-ring.tone-err { --c: var(--err); }
.qs-ring b { font-size: 30px; line-height: 1; font-weight: 800; color: var(--text); }
.qs-ring small { color: var(--text-2); font-size: 12px; }
.qs-counts { display: flex; flex-direction: column; gap: 6px; min-width: 220px; flex: 1; }
.qs-counts p { margin: 4px 0 0; max-width: 60ch; }

/* =====================================================================
   Rapor v5 — kraft dosya kapağı + kauçuk mühür, künye, okuma kılavuzu
   ===================================================================== */
.rdoc > .rcover3 { position: relative; height: 297mm; padding: 0; overflow: hidden; display: flex; flex-direction: column; color: #2a2118;
  background-color: #c9a678;
  background-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='f'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' seed='4'/%3E%3CfeColorMatrix values='0 0 0 0 0.35  0 0 0 0 0.24  0 0 0 0 0.12  0 0 0 0.55 0'/%3E%3C/filter%3E%3Crect width='300' height='300' filter='url(%23f)'/%3E%3C/svg%3E"),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='600' height='600'%3E%3Cfilter id='g'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.012 0.05' numOctaves='3' seed='9'/%3E%3CfeColorMatrix values='0 0 0 0 0.45  0 0 0 0 0.32  0 0 0 0 0.16  0 0 0 0.35 0'/%3E%3C/filter%3E%3Crect width='600' height='600' filter='url(%23g)'/%3E%3C/svg%3E"),
    radial-gradient(ellipse at 30% 20%, rgba(255, 240, 210, .35), transparent 60%),
    linear-gradient(170deg, #d2b084 0%, #c39f70 55%, #b99464 100%); }
/* dosya katlama izi ve kenar golgesi */
.rcover3::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 9mm; background: linear-gradient(180deg, rgba(60, 40, 20, .18), transparent); }
.rcover3::after { content: ""; position: absolute; left: 14mm; top: 0; bottom: 0; width: .6mm; background: rgba(70, 48, 24, .18); box-shadow: 1.2mm 0 0 rgba(255, 245, 225, .18); }
.kc-top { position: relative; z-index: 1; display: flex; justify-content: space-between; align-items: flex-start; padding: 22mm 22mm 0 26mm; }
.kc-org b { display: block; font: 800 12pt "Segoe UI", sans-serif; letter-spacing: .08em; text-transform: uppercase; color: #2a2118; }
.kc-org span { display: block; margin-top: 1mm; font: 400 9.5pt "Segoe UI", sans-serif; color: #4a3b2a; }
.kc-no { text-align: right; font-family: "Segoe UI", sans-serif; border: 1.2pt solid #3a2c1d; padding: 2mm 4mm; }
.kc-no small { display: block; font-size: 6.5pt; font-weight: 700; letter-spacing: .25em; color: #4a3b2a; }
.kc-no b { display: block; font-size: 14pt; letter-spacing: .04em; }
/* dosya etiketi */
.kc-label { position: relative; z-index: 1; margin: 46mm 24mm 0 28mm; background: #fbf7ee; padding: 15mm 14mm 11mm; border: .75pt solid #8a7357;
  box-shadow: 0 1.2mm 0 rgba(80, 56, 30, .25), 0 3mm 8mm rgba(60, 40, 20, .25); }
.kc-label::before { content: ""; position: absolute; inset: 2.4mm; border: .5pt solid #b9a684; pointer-events: none; }
.kc-tab { position: absolute; top: -6mm; left: 10mm; background: #2a2118; color: #f4ead6; font: 800 8pt "Segoe UI", sans-serif; letter-spacing: .3em; padding: 1.8mm 4mm; }
.kc-label h1 { font: 800 25pt/1.12 "Segoe UI", sans-serif; margin: 0; color: #17120c; letter-spacing: -.01em; }
.kc-rule { height: 1.4pt; width: 34mm; background: #c8102e; margin: 6mm 0 5mm; }
.kc-subject small, .kc-meta small { display: block; font: 700 7pt "Segoe UI", sans-serif; letter-spacing: .22em; color: #7a6646; margin-bottom: 1.4mm; }
.kc-subject p { margin: 0; font: 400 11.5pt/1.5 Georgia, "Times New Roman", serif; color: #2a2118; text-align: left; }
.kc-meta { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4mm; margin-top: 9mm; padding-top: 5mm; border-top: .75pt solid #cbb994; }
.kc-meta b { font: 700 10.5pt "Segoe UI", sans-serif; color: #17120c; }
/* kaucuk muhur */
.kc-stamp { position: absolute; z-index: 2; width: 112mm; left: 50%; top: 178mm; transform: translateX(-50%) rotate(-9deg); opacity: .9; mix-blend-mode: multiply; }
.kc-foot { position: relative; z-index: 1; margin-top: auto; padding: 0 24mm 18mm 28mm; font: 8.5pt/1.5 "Segoe UI", sans-serif; color: #3a2c1d; }
.kc-foot p { margin: 0; max-width: 140mm; text-align: left; }
.kc-addr { margin-top: 1.5mm; color: #5a4834; }
@media print {
  #printroot .rdoc > .rcover3 { page: cover; width: 210mm; height: 297mm; break-after: page; padding: 0; }
}
/* kunye */
.rkunye { width: 100%; border-collapse: collapse; margin: 2mm 0 6mm; font-size: 9.5pt; }
.rkunye th { width: 42mm; text-align: left; vertical-align: top; font: 700 7.5pt "Segoe UI", sans-serif; letter-spacing: .08em; text-transform: uppercase; color: #555; padding: 2.2mm 3mm 2.2mm 0; border-bottom: .5pt solid #d6d6d6; }
.rkunye td { padding: 2.2mm 0; border-bottom: .5pt solid #d6d6d6; font-weight: 600; color: #111; }
.rkunye tr:first-child th, .rkunye tr:first-child td { border-top: 1.2pt solid #111; }
.rtoc .rh1.plain + .rkunye { margin-top: 3mm; }
.rtoc .rtoc-list { margin-bottom: 0; }
/* okuma kilavuzu */
.rguide { border: 1pt solid #111; margin: 3mm 0 7mm; break-inside: avoid; font-family: "Segoe UI", sans-serif; }
.rg-head { background: #111; color: #fff; font: 800 8pt "Segoe UI", sans-serif; letter-spacing: .18em; text-transform: uppercase; padding: 1.6mm 3mm; }
.rg-grid { display: grid; grid-template-columns: 1fr 1fr; }
.rg-grid > div { display: flex; gap: 3mm; padding: 3mm; border-top: .5pt solid #ccc; }
.rg-grid > div:nth-child(odd) { border-right: .5pt solid #ccc; }
.rg-grid > div:nth-child(-n+2) { border-top: 0; }
.rg-grid p { margin: 0; font-size: 8.3pt; line-height: 1.45; text-align: left; }
.rg-ic { flex: none; width: 17mm; display: flex; flex-wrap: wrap; gap: 1mm; align-content: flex-start; }
.rg-ic .ltag { width: 4.6mm; height: 4.6mm; font-size: 7pt; }
.rg-sym { display: grid; place-items: center; width: 7mm; height: 7mm; border: 1pt solid #111; border-radius: 50%; font: 800 10pt "Segoe UI", sans-serif; }
.pbadge.shared { background: #c8102e; }
/* adres: yer kodu + adres yan yana */
.raddr { display: flex; gap: 2mm; align-items: flex-start; }
.raddr > .pbadge { flex: none; margin-top: .3mm; }
/* sayfa akisi: ana bolumler yeni sayfada, hat profili bolunmez */
@media print {
  #printroot .rchap.brk { break-before: page; }
  #printroot .rline { break-inside: avoid; }
  #printroot .rcoloc { break-inside: avoid-page; }
  #printroot .rguide { break-inside: avoid; }
}
.rsheet .rchap.brk { margin-top: 0; }
.kc-label { margin-top: 58mm; }
.kc-meta { grid-template-columns: 1fr 1.6fr; }
.kc-meta span { display: block; font: 400 9pt "Segoe UI", sans-serif; color: #5a4834; margin-top: .6mm; }
.kc-stamp { top: 196mm; left: 57%; }
.rtoc .rt-row { padding-top: 1.5mm; padding-bottom: 1.5mm; }
.rtoc .rt-t small { display: none; }
.rtoc .rh1.plain { margin-top: 5mm; }
.rtoc > .rh1.plain:first-child { margin-top: 0; }
.rmethod + .rguide { margin-top: 8mm; }
.rkunye th, .rkunye td { padding-top: 1.7mm; padding-bottom: 1.7mm; }
.rtoc .rt-row { padding-top: 1.1mm; padding-bottom: 1.1mm; }
.rtoc .rh2.plain { margin-top: 4mm; }
@media print { #printroot .rtoc { break-inside: auto; } }
/* hat profili: one cikanlar kutusu */
.rhigh { border: 1pt solid #111; margin-top: 5mm; break-inside: avoid; font-family: "Segoe UI", sans-serif; }
.rh-head { background: var(--ac, #1f3a6b); color: #fff; font: 800 8pt "Segoe UI", sans-serif; letter-spacing: .14em; text-transform: uppercase; padding: 1.6mm 3mm; }
.rhigh table { width: 100%; border-collapse: collapse; font-size: 8.6pt; }
.rhigh th { width: 46mm; text-align: left; font-weight: 700; color: #444; padding: 1.7mm 3mm; border-top: .5pt solid #ddd; vertical-align: top; }
.rhigh td { padding: 1.7mm 3mm 1.7mm 0; border-top: .5pt solid #ddd; color: #111; }
.rhigh tr:first-child th, .rhigh tr:first-child td { border-top: 0; }
.rhigh .rh-ref { width: 12mm; text-align: right; color: #777; font-size: 7.5pt; white-space: nowrap; }
.rhigh th, .rhigh td { padding-top: 1.2mm; padding-bottom: 1.2mm; }
.rhigh { margin-top: 3mm; }
.rline .rfig { margin-top: 2mm; margin-bottom: 2mm; }
@media print { #printroot .rtravel { break-inside: avoid; margin-bottom: 6mm; } }

/* =====================================================================
   Rapor v6 — adli bilişim tasarım dili (koyu kapak, camgöbeği vurgu)
   Renksiz baskı: koyu zemin siyaha, camgöbeği açık griye döner; metin hiçbir yerde
   yalnız vurgu rengine dayanmaz (rakamlar ve başlıklar koyu mürekkeple yazılır).
   ===================================================================== */
[data-accent="cyan"] { --ac: #0a7591; --ac2: #0b1622; --acs: #e2f5fa; --hi: #19c3e6; }
.rdoc { --hi: var(--ac); --dark: #0b1622; }
.rdoc h1, .rdoc .rh1, .rdoc .rh2, .rdoc .rh3 { font-family: Bahnschrift, "Segoe UI", Arial, sans-serif; }

/* ---------- kapak ---------- */
.rdoc > .rcover4 { position: relative; height: 297mm; padding: 0; overflow: hidden; display: flex; flex-direction: column; color: #e8f1f6;
  background: radial-gradient(ellipse at 80% 25%, #12324a 0%, #0b1622 55%, #070e17 100%); font-family: Bahnschrift, "Segoe UI", sans-serif; }
.cv-art { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.cv-dot { fill: #19c3e6; }
.cv-wave { fill: none; stroke: #19c3e6; stroke-width: .35; }
.cv-tower { fill: none; stroke: #9fdcec; stroke-width: .55; stroke-linecap: round; }
.cv-edge { stroke: #19c3e6; stroke-width: .3; opacity: .55; }
.cv-node { fill: #0b1622; stroke: #19c3e6; stroke-width: .45; }
.cv-node.hot { fill: #19c3e6; }
.cv-corner { fill: #19c3e6; }
.cv-corner2 { fill: #19c3e6; opacity: .45; }
.cv-top { position: relative; z-index: 1; display: flex; justify-content: space-between; align-items: flex-start; padding: 22mm 20mm 0 22mm; }
.cv-brand b { display: block; font-size: 22pt; font-weight: 800; letter-spacing: .12em; color: #fff; line-height: 1; }
.cv-brand span { display: block; margin-top: 2mm; font-size: 8pt; letter-spacing: .22em; text-transform: uppercase; color: #9fdcec; }
.cv-no { text-align: right; border-left: 1.2pt solid #19c3e6; padding-left: 4mm; }
.cv-no small { display: block; font-size: 6.5pt; letter-spacing: .3em; color: #9fdcec; }
.cv-no b { display: block; font-size: 13pt; letter-spacing: .05em; color: #fff; margin-top: .6mm; }
.cv-main { position: relative; z-index: 1; padding: 34mm 22mm 0; max-width: 118mm; }
.cv-kicker { display: flex; align-items: center; gap: 3mm; font-size: 7.5pt; letter-spacing: .26em; color: #9fdcec; }
.cv-kicker i { width: 10mm; height: 1.2pt; background: #19c3e6; display: inline-block; }
.rcover4 h1 { margin: 6mm 0 6mm; font-size: 33pt; line-height: 1.02; font-weight: 800; color: #fff; letter-spacing: .01em; }
.rcover4 h1 span { display: block; }
.rcover4 h1 .cv-hl { color: #19c3e6; font-size: 24pt; margin-top: 2mm; }
.cv-sub { font: 400 10.5pt/1.55 "Segoe UI", sans-serif; color: #c9dbe5; margin: 0 0 9mm; text-align: left !important; max-width: 105mm; }
.cv-feat { display: grid; gap: 3.6mm; }
.cv-feat > div { display: flex; align-items: center; gap: 4mm; }
.cv-ic { width: 8.5mm; height: 8.5mm; flex: none; padding: 1.7mm; border: .9pt solid #19c3e6; border-radius: 50%; fill: none; stroke: #19c3e6; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; box-sizing: border-box; }
.cv-feat b { display: block; font-size: 8.6pt; letter-spacing: .12em; text-transform: uppercase; color: #fff; }
.cv-feat span { display: block; font: 400 8pt "Segoe UI", sans-serif; color: #9fb4c2; margin-top: .4mm; }
.rcover4 .kc-stamp { width: 92mm; left: auto; right: 14mm; top: 200mm; transform: rotate(-9deg); opacity: 1; mix-blend-mode: normal; }
.rcover4 .kc-stamp g { stroke: #ff5a6a; }
.rcover4 .kc-stamp text { fill: #ff5a6a; }
.cv-bar { position: relative; z-index: 1; margin: auto 20mm 0 22mm; display: grid; grid-template-columns: 1fr 1fr 1.3fr 1.5fr; border: .9pt solid rgba(159, 220, 236, .55); background: rgba(7, 14, 23, .72); }
.cv-bar > div { padding: 3.5mm 4mm; border-left: .6pt solid rgba(159, 220, 236, .35); }
.cv-bar > div:first-child { border-left: 0; }
.cv-bar small { display: block; font-size: 6.2pt; letter-spacing: .24em; color: #9fdcec; margin-bottom: 1.2mm; }
.cv-bar b { display: block; font-size: 9.5pt; color: #fff; font-weight: 700; }
.cv-bar span { display: block; font: 400 7.8pt "Segoe UI", sans-serif; color: #9fb4c2; margin-top: .4mm; }
.cv-foot { position: relative; z-index: 1; padding: 5mm 20mm 14mm 22mm; font: 7.6pt/1.5 "Segoe UI", sans-serif; color: #8ea4b3; }
.cv-foot p { margin: 0; text-align: left !important; max-width: 150mm; }
.cv-addr { margin-top: 1mm; color: #6f8796; }
@media print { #printroot .rdoc > .rcover4 { page: cover; width: 210mm; height: 297mm; break-after: page; padding: 0; } }

/* ---------- basliklar ---------- */
.rh1 { align-items: center; gap: 0; border-bottom: 0; padding: 0; margin: 0 0 7mm; font-size: 15pt; letter-spacing: .06em; position: relative; }
.rh1::after { content: ""; position: absolute; left: 0; right: 0; bottom: -2.5mm; height: 1.4pt; background: linear-gradient(90deg, var(--dark) 0 22mm, var(--line) 22mm); }
.rh1 .rnum { display: inline-grid; place-items: center; min-width: 11mm; height: 11mm; margin-right: 4mm; background: var(--dark); color: #fff; font-size: 13pt; border-bottom: 1.6mm solid var(--hi); box-sizing: border-box; }
.rh1.plain::after { background: linear-gradient(90deg, var(--dark) 0 22mm, var(--line) 22mm); }
.rh2 { padding-left: 3mm; border-left: 1.6mm solid var(--hi); font-size: 12.5pt; }
.rh2 .rnum { color: var(--ink); min-width: 9mm; }
.rh2.plain { border-left: 0; padding-left: 0; }
.rh3 { padding-bottom: 1.2mm; border-bottom: .6pt solid var(--line); }
.tcap b, figcaption b { color: var(--ink); }

/* ---------- kisi kodu (iki harf) ---------- */
.ltag { min-width: 6.2mm !important; width: auto !important; padding: 0 1mm; font-size: 7.5pt !important; letter-spacing: .02em; }
.ltag.lg { min-width: 9mm !important; height: 9mm !important; font-size: 10.5pt !important; }
.pname i { width: auto !important; min-width: 5.6mm; padding: 0 .9mm; font-size: 7pt !important; }
.rg-ic .ltag { width: auto !important; min-width: 6mm; }

/* ---------- gosterge gucu ---------- */
.rstay .rs-k { font-size: 7.8pt; color: var(--ink2); margin-bottom: .8mm; }
.rs-st { display: inline-block; padding: .2mm 1.4mm; border: .8pt solid #111; border-radius: 1mm; font-size: 6.6pt; font-weight: 800; letter-spacing: .08em; }
.rs-st.st-guclu { background: #111; color: #fff; }
.rs-st.st-orta { background: #fff; color: #111; }
.rs-st.st-zayif { background: #fff; color: #555; border-style: dashed; border-color: #777; }
.rstay.weak b { color: #444; font-weight: 600; }

/* ---------- harita isaretleri ---------- */
.ymk2 { display: flex; flex-direction: column; gap: 2px; }
.ym-row { display: inline-flex; align-items: center; gap: 3px; }
.ym-row > b { display: inline-grid; place-items: center; min-width: 26px; height: 20px; padding: 0 4px; border-radius: 10px; background: #111; color: #fff; border: 2px solid #fff;
  outline: 1px solid #111; font: 800 10.5px "Segoe UI", sans-serif; box-shadow: 0 1px 3px rgba(0, 0, 0, .35); }
.ym-row.shared > b { background: #c8102e; }
.ymk2.sm .ym-row > b { min-width: 20px; height: 15px; font-size: 8px; border-width: 1.5px; }
.ywho { display: inline-flex; gap: 2px; }
.ywho i { display: inline-flex; align-items: center; gap: 2px; height: 16px; padding: 0 4px; border-radius: 3px; background: #fff; color: #111; border: 1.5px solid #111;
  border-left: 4px solid var(--lc); font: 800 9px "Segoe UI", sans-serif; font-style: normal; box-shadow: 0 1px 2px rgba(0, 0, 0, .3); white-space: nowrap; }
.ywho em { font-style: normal; font-weight: 600; font-size: 7.5px; color: #333; }
.rmap-legend { max-width: 74mm; }
.rmap-legend > div { flex-wrap: wrap; }

/* ---------- kisi-yer agi ve iliski semasi ---------- */
.rb-who { font-weight: 800; fill: #111; }
.rb-ph { font-size: 9px; fill: #333; }
.rschema { width: 100%; height: auto; display: block; font-family: "Segoe UI", sans-serif; }
.rs-zone { font: 700 8.5px "Segoe UI", sans-serif; letter-spacing: .16em; fill: #555; }
.rs-chip { font: 800 10px "Segoe UI", sans-serif; fill: #111; }
.rs-chip2 { font: 600 9px "Segoe UI", sans-serif; fill: #333; }
.rs-let { font: 800 15px Bahnschrift, "Segoe UI", sans-serif; fill: #fff; paint-order: stroke; stroke: rgba(0, 0, 0, .35); stroke-width: 2px; }
.rs-lname { font: 800 11.5px "Segoe UI", sans-serif; fill: #111; }
.rs-ph { font: 9px Consolas, "Segoe UI", monospace; fill: #444; }
.rs-meta { font: 600 8.5px "Segoe UI", sans-serif; fill: #333; }
.rs-name { font: 700 9.5px "Segoe UI", sans-serif; fill: #111; }
.rs-cnt { font: 600 9.5px "Segoe UI", sans-serif; fill: #111; }
.rs-who { font-weight: 800; }
.rs-colh { font: 700 9px "Segoe UI", sans-serif; fill: #fff; letter-spacing: .04em; }
.rs-row { font: 400 9px "Segoe UI", sans-serif; fill: #111; }
.rs-rowv { font: 700 9px "Segoe UI", sans-serif; fill: #111; }
.rhow { background: var(--soft); border-left: 1.6mm solid var(--hi); padding: 2.6mm 3.5mm; font: 8.6pt/1.5 "Segoe UI", sans-serif; margin: 0 0 4mm; }

/* ---------- grafik ---------- */
.pc-nl { font: 700 7px "Segoe UI", sans-serif; letter-spacing: .18em; fill: #777; }
.pc-tt { font: 600 7.5px "Segoe UI", sans-serif; fill: #555; letter-spacing: .04em; }
.pc-peak { font: 700 8px "Segoe UI", sans-serif; fill: #111; }
.pc-bar.peak { fill: #000 !important; }

/* ---------- sayfa akisi ---------- */
@media print {
  #printroot .rfig, #printroot .rhow, #printroot .rstay, #printroot .pcard2, #printroot .rhigh, #printroot .rmatrix, #printroot .rkunye { break-inside: avoid; }
  #printroot .rh2, #printroot .rh3, #printroot .tcap, #printroot .rhow { break-after: avoid; }
  #printroot .rtable tr { break-inside: avoid; }
  #printroot .rtable thead { display: table-header-group; }
}
.rdoc[data-accent="cyan"] { --hi: #19c3e6; }
.rdoc .rtable { width: 100%; max-width: 100%; }
.rdoc .rtable th { white-space: normal; }
.rcover4 .cv-art { overflow: hidden; }
.rb-cnt { font: 400 9px "Segoe UI", sans-serif; fill: #333; }
@media print { #printroot #r-method { break-before: auto; margin-top: 12mm; } }
@media print {
  #printroot .rchap { break-before: auto; margin-top: 12mm; }
  #printroot .rchap.brk, #printroot .rchap.cont, #printroot #r-summary { break-before: page; margin-top: 0; }
  #printroot .rline { break-before: page; }
  #printroot #r-method { margin-top: 12mm; }
}
