/* ClaimSense kullanıcı kılavuzu.
   Panelden bağımsız, tek başına açılabilir bir sayfa. Renkler CSS değişkeni
   üzerinden; koyu tema aynı değişkenleri geçersiz kılar. */

:root {
  --bg: #F4F5F7;
  --panel: #FFFFFF;
  --border: #E5E8EE;
  --text: #111827;
  --muted: #6B7280;
  --faint: #9CA3AF;
  --accent: #185FA5;
  --accent-soft: #EEF3F9;
  --warn-bg: #FFF9EF;
  --warn-border: #F0D5AC;
  --warn-text: #B45309;
  --ok-bg: #F4FAEE;
  --ok-border: #C7DFA8;
  --code-bg: #F3F4F6;
  --shadow: 0 1px 3px rgba(11, 18, 32, .07);
}

:root[data-theme="dark"] {
  --bg: #12161C;
  --panel: #1A1F27;
  --border: #2A313C;
  --text: #E5E8EE;
  --muted: #9CA3AF;
  --faint: #6B7280;
  --accent: #6FA8DC;
  --accent-soft: #1F2A36;
  --warn-bg: #2A2318;
  --warn-border: #4A3C22;
  --warn-text: #E0A93B;
  --ok-bg: #1C2618;
  --ok-border: #35492A;
  --code-bg: #232A34;
  --shadow: 0 1px 3px rgba(0, 0, 0, .35);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  font-size: 14px;
  line-height: 1.65;
}

.visually-hidden {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}

.guide-skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 100;
  background: var(--accent); color: #fff; padding: 8px 14px; border-radius: 0 0 6px 0;
}
.guide-skip-link:focus { left: 0; }

/* ------------------------------------------------------------------ başlık */

.guide-header {
  display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
  padding: 12px 24px; background: var(--panel);
  border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 20;
}
.guide-brand { display: flex; align-items: center; gap: 8px; }
.guide-logo { width: 22px; height: 22px; }
.guide-brand-name { font-weight: 700; letter-spacing: -.01em; }
/* Ürün adı wordmark'ın devamı; yanında bir chip olarak durmuyor — "Kolayz
   ClaimSense" tek isim olarak okunuyor, panel başlığındaki yazımın aynısı. */
.guide-brand-product { font: inherit; color: inherit; }
.guide-brand-title { color: var(--muted); font-size: 13px; margin-left: 4px; }

.guide-controls { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.guide-controls select {
  font: inherit; font-size: 12.5px; padding: 5px 8px;
  border: 1px solid var(--border); border-radius: 7px;
  background: var(--panel); color: var(--text);
}
.guide-icon-button {
  display: grid; place-items: center; width: 32px; height: 30px;
  border: 1px solid var(--border); border-radius: 7px;
  background: var(--panel); color: var(--muted); cursor: pointer;
}
.guide-icon-button:hover { color: var(--text); }
.guide-theme-icon-moon { display: none; }
:root[data-theme="dark"] .guide-theme-icon-sun { display: none; }
:root[data-theme="dark"] .guide-theme-icon-moon { display: block; }
.guide-back-link {
  color: var(--accent); text-decoration: none; font-size: 12.5px; font-weight: 500;
  padding: 6px 10px; border: 1px solid var(--border); border-radius: 7px;
}

/* ------------------------------------------------------------------ araç çubuğu */

.guide-toolbar {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  padding: 10px 24px; background: var(--panel);
  border-bottom: 1px solid var(--border);
  position: sticky; top: 55px; z-index: 19;
}
.guide-search {
  display: flex; align-items: center; gap: 7px;
  border: 1px solid var(--border); border-radius: 8px; padding: 5px 10px;
  background: var(--panel); color: var(--faint); min-width: 260px;
}
.guide-search input {
  border: none; outline: none; background: none; font: inherit; font-size: 13px;
  color: var(--text); width: 100%;
}
.guide-role-filter { display: flex; gap: 6px; flex-wrap: wrap; }
.guide-role-button {
  font: inherit; font-size: 12px; padding: 5px 11px; cursor: pointer;
  border: 1px solid var(--border); border-radius: 999px;
  background: var(--panel); color: var(--muted);
}
.guide-role-button[aria-pressed="true"] {
  background: var(--accent-soft); color: var(--accent);
  border-color: var(--accent); font-weight: 600;
}

/* ------------------------------------------------------------------ yerleşim */

.guide-layout {
  display: grid; grid-template-columns: 260px minmax(0, 1fr);
  gap: 28px; max-width: 1220px; margin: 0 auto; padding: 24px;
  align-items: start;
}
@media (max-width: 900px) {
  .guide-layout { grid-template-columns: 1fr; }
  .guide-toc { position: static !important; max-height: none !important; }
}

.guide-toc {
  position: sticky; top: 120px; max-height: calc(100vh - 150px); overflow-y: auto;
  background: var(--panel); border: 1px solid var(--border);
  border-radius: 10px; padding: 14px 16px; box-shadow: var(--shadow);
}
.guide-toc-title {
  font-size: 10.5px; letter-spacing: .05em; text-transform: uppercase;
  color: var(--faint); margin: 0 0 8px;
}
.guide-toc-list { list-style: none; margin: 0; padding: 0; font-size: 13px; }
.guide-toc-list li { margin-bottom: 2px; }
.guide-toc-list a {
  display: flex; gap: 8px; color: var(--text); text-decoration: none;
  padding: 4px 6px; border-radius: 6px; line-height: 1.4;
}
.guide-toc-list a:hover { background: var(--accent-soft); color: var(--accent); }
.guide-toc-num { color: var(--faint); min-width: 16px; font-variant-numeric: tabular-nums; }

.guide-main { min-width: 0; }
.guide-main:focus { outline: none; }
.guide-intro { font-size: 15px; line-height: 1.7; margin: 0 0 10px; }
.guide-role-note {
  font-size: 12.5px; color: var(--muted); background: var(--panel);
  border: 1px solid var(--border); border-radius: 8px; padding: 10px 12px;
  margin: 0 0 22px;
}

/* ------------------------------------------------------------------ bölümler */

.guide-section {
  background: var(--panel); border: 1px solid var(--border);
  border-radius: 10px; padding: 20px 24px; margin-bottom: 18px;
  box-shadow: var(--shadow); scroll-margin-top: 130px;
}
.guide-section-head {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 12px; flex-wrap: wrap; margin-bottom: 6px;
}
.guide-section h2 { font-size: 17px; margin: 0; line-height: 1.35; }
.guide-section h3 { font-size: 14px; margin: 20px 0 6px; }
.guide-section p { margin: 8px 0; }
.guide-section ul, .guide-section ol { margin: 8px 0; padding-left: 22px; }
.guide-section li { margin-bottom: 5px; }

.guide-anchor {
  color: var(--faint); text-decoration: none; font-weight: 400;
  margin-left: 6px; opacity: 0; font-size: 15px;
}
.guide-section:hover .guide-anchor { opacity: 1; }

.guide-badges { display: flex; gap: 5px; flex-wrap: wrap; }
.guide-badge {
  font-size: 10.5px; font-weight: 600; padding: 2px 8px; border-radius: 999px;
  background: var(--code-bg); color: var(--muted); white-space: nowrap;
}
.guide-badge-analyst { background: var(--accent-soft); color: var(--accent); }
.guide-badge-admin { background: var(--warn-bg); color: var(--warn-text); }
.guide-badge-super { background: #F7E9E9; color: #9B1C1A; }
:root[data-theme="dark"] .guide-badge-super { background: #2E1D1D; color: #E58A87; }

.guide-section code, .guide-ui {
  background: var(--code-bg); border-radius: 4px; padding: 1px 5px;
  font-size: 12.5px;
}
.guide-section code { font-family: "SF Mono", Menlo, Consolas, monospace; }
.guide-ui { font-weight: 500; }

.guide-note, .guide-warning, .guide-tip {
  border-radius: 8px; padding: 11px 14px; margin: 14px 0; font-size: 13px;
  border-left: 3px solid;
}
.guide-note { background: var(--accent-soft); border-color: var(--accent); }
.guide-warning { background: var(--warn-bg); border-color: var(--warn-text); }
.guide-tip { background: var(--ok-bg); border-color: var(--ok-border); }

.guide-section table {
  width: 100%; border-collapse: collapse; font-size: 13px; margin: 12px 0;
}
.guide-section th {
  text-align: left; font-size: 11px; letter-spacing: .03em; color: var(--faint);
  border-bottom: 1px solid var(--border); padding: 6px 8px; font-weight: 600;
}
.guide-section td {
  padding: 6px 8px; border-bottom: 1px solid var(--border); vertical-align: top;
}

.guide-shot { margin: 16px 0; }
.guide-shot img {
  width: 100%; border: 1px solid var(--border); border-radius: 8px;
  cursor: zoom-in; display: block; background: var(--bg);
}
.guide-shot figcaption {
  font-size: 12px; color: var(--muted); margin-top: 6px; text-align: center;
}

.guide-no-results {
  background: var(--panel); border: 1px dashed var(--border); border-radius: 10px;
  padding: 24px; text-align: center; color: var(--muted);
}
.guide-footer {
  color: var(--faint); font-size: 12px; text-align: center;
  margin: 28px 0 8px; line-height: 1.6;
}

/* ------------------------------------------------------------------ lightbox */

.guide-lightbox {
  position: fixed; inset: 0; z-index: 60; background: rgba(11, 18, 32, .88);
  display: grid; place-items: center; padding: 40px; gap: 12px;
}
.guide-lightbox[hidden] { display: none; }
.guide-lightbox img {
  max-width: 100%; max-height: 84vh; border-radius: 8px; background: #fff;
}
.guide-lightbox-caption { color: #E5E8EE; font-size: 13px; margin: 0; }
.guide-lightbox-close {
  position: absolute; top: 18px; right: 22px; width: 34px; height: 34px;
  border: none; border-radius: 8px; background: rgba(255, 255, 255, .14);
  color: #fff; font-size: 16px; cursor: pointer;
}

/* ------------------------------------------------------------------ yazdırma */

@media print {
  .guide-header, .guide-toolbar, .guide-toc, .guide-lightbox,
  .guide-anchor, .guide-back-link { display: none !important; }
  body { background: #fff; font-size: 11pt; }
  .guide-layout { display: block; max-width: none; padding: 0; }
  .guide-section {
    box-shadow: none; border: none; border-bottom: 1px solid #ddd;
    border-radius: 0; padding: 0 0 14px; margin-bottom: 18px;
    break-inside: avoid;
  }
  .guide-shot img { border: 1px solid #ccc; }
}
