/* Destek Masası: dış kaynak yok (CSP uyumlu), sistem yazı tipleri, açık/koyu tema.
   Tema: <html data-theme="light|dark"> elle seçimi, yoksa sistem ayarı. */

/* ====================================================================
   1. Renkler ve ölçüler
   ==================================================================== */
:root {
  --bg: #f3f5f4;
  --surface: #ffffff;
  --surface-2: #f8faf9;
  --ink: #15201e;
  --muted: #5d6c68;
  --line: #e1e7e4;
  --accent: #0f7a67;
  --accent-hover: #0b6656;
  --accent-ink: #ffffff;
  --accent-soft: #e3f3ee;
  --warn-bg: #fdf1d8;
  --warn-fg: #8a5600;
  --ok-bg: #ddf2e5;
  --ok-fg: #17663a;
  --urgent: #c0281b;
  --urgent-soft: #fde8e5;
  --high: #d97a12;
  --info: #2a6fd6;
  --info-soft: #e5eefc;
  --code-bg: #eef2f0;
  --series-1: #2a78d6;
  --series-2: #eb6834;
  --shadow-sm: 0 1px 2px rgba(16, 32, 28, .06);
  --shadow: 0 1px 2px rgba(16, 32, 28, .05), 0 6px 18px rgba(16, 32, 28, .08);
  --ring: 0 0 0 3px rgba(15, 122, 103, .28);
  --r: 12px;
  --r-sm: 8px;
  --side-w: 248px;
  --f-body: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --f-mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0c1312; --surface: #141e1d; --surface-2: #182423; --ink: #e6efec; --muted: #94a5a0;
    --line: #253330; --accent: #4fc8b0; --accent-hover: #6ad6c0; --accent-ink: #052520; --accent-soft: #143430;
    --warn-bg: #3a2d0e; --warn-fg: #f3c66b; --ok-bg: #12352a; --ok-fg: #80dfa6;
    --urgent: #ff8b7c; --urgent-soft: #3d1a17; --high: #f0a24a; --info: #79a8f3; --info-soft: #182a46;
    --code-bg: #0f1918; --series-1: #3987e5; --series-2: #d95926;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, .4); --shadow: 0 1px 2px rgba(0, 0, 0, .35), 0 8px 22px rgba(0, 0, 0, .35);
    --ring: 0 0 0 3px rgba(79, 200, 176, .3);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0c1312; --surface: #141e1d; --surface-2: #182423; --ink: #e6efec; --muted: #94a5a0;
  --line: #253330; --accent: #4fc8b0; --accent-hover: #6ad6c0; --accent-ink: #052520; --accent-soft: #143430;
  --warn-bg: #3a2d0e; --warn-fg: #f3c66b; --ok-bg: #12352a; --ok-fg: #80dfa6;
  --urgent: #ff8b7c; --urgent-soft: #3d1a17; --high: #f0a24a; --info: #79a8f3; --info-soft: #182a46;
  --code-bg: #0f1918; --series-1: #3987e5; --series-2: #d95926;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .4); --shadow: 0 1px 2px rgba(0, 0, 0, .35), 0 8px 22px rgba(0, 0, 0, .35);
  --ring: 0 0 0 3px rgba(79, 200, 176, .3);
  color-scheme: dark;
}

/* ====================================================================
   2. Temel
   ==================================================================== */
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--f-body);
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent); }
h1 { font-size: 26px; line-height: 1.2; margin: 0 0 6px; letter-spacing: -0.015em; }
h2 { font-size: 17px; margin: 0 0 14px; }
h3 { font-size: 17px; margin: 0 0 6px; }
code { font-family: var(--f-mono); font-size: .9em; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.ico { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; vertical-align: -3px; }
.ico.sm { width: 14px; height: 14px; vertical-align: -2px; }
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

/* odak halkası */
input:focus-visible, select:focus-visible, textarea:focus-visible { outline: none; border-color: var(--accent); box-shadow: var(--ring); }
.btn:focus-visible, a:focus-visible, button:focus-visible, summary:focus-visible { outline: none; box-shadow: var(--ring); border-radius: var(--r-sm); }
.seg input:focus-visible + span { box-shadow: var(--ring); }

/* ====================================================================
   3. Kabuk: kenar çubuğu + içerik
   ==================================================================== */
.shell { display: grid; grid-template-columns: var(--side-w) minmax(0, 1fr); min-height: 100vh; }
.shell.guest { grid-template-columns: minmax(0, 1fr); }
.side {
  position: sticky; top: 0; height: 100vh; overflow-y: auto;
  display: flex; flex-direction: column; gap: 2px;
  padding: 18px 14px; background: var(--surface); border-right: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 16px; color: var(--ink); text-decoration: none; padding: 4px 8px 14px; }
.brand-mark { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 9px; background: linear-gradient(135deg, var(--accent), var(--info)); color: var(--accent-ink); flex: none; }
.nav-group { font-size: 11px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); padding: 14px 10px 6px; }
.nav-link { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: var(--r-sm); color: var(--muted); text-decoration: none; font-weight: 500; font-size: 14px; }
.nav-link:hover { background: var(--surface-2); color: var(--ink); }
.nav-link[aria-current="page"] { background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.side-foot { margin-top: auto; padding-top: 14px; border-top: 1px solid var(--line); display: flex; align-items: center; gap: 8px; }
.side-foot form { margin: 0; }
.who { flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font-size: 14px; line-height: 1.3; border-radius: var(--r-sm); padding: 2px; }
.who span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.who small { display: block; color: var(--muted); font-size: 12px; }
.who:hover b, .who[aria-current="page"] b { text-decoration: underline; }
.who b { font-weight: 600; }
.icon-btn { display: grid; place-items: center; width: 34px; height: 34px; padding: 0; border-radius: var(--r-sm); border: 1px solid var(--line); background: var(--surface); color: var(--muted); cursor: pointer; flex: none; }
.icon-btn:hover { color: var(--ink); background: var(--surface-2); }
.theme-btn .i-sun { display: none; }
:root[data-theme="dark"] .theme-btn .i-sun { display: block; }
:root[data-theme="dark"] .theme-btn .i-moon { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) .theme-btn .i-sun { display: block; }
  :root:not([data-theme]) .theme-btn .i-moon { display: none; }
}

.topbar { display: none; align-items: center; gap: 12px; padding: 10px 16px; background: var(--surface); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 30; }
.topbar .brand { padding: 0; }
.topbar-links { display: flex; gap: 4px; margin-left: auto; }
.topbar-links .nav-link { padding: 6px 10px; }
.shell.guest .topbar { display: flex; }
.backdrop { display: none; }

.content { padding: 28px 32px 64px; min-width: 0; }
.content-inner { max-width: 1080px; margin: 0 auto; }

@media (max-width: 880px) {
  .shell { grid-template-columns: minmax(0, 1fr); }
  .side { position: fixed; inset: 0 auto 0 0; width: 268px; z-index: 50; transform: translateX(-100%); visibility: hidden; box-shadow: var(--shadow); }
  .shell.menu-open .side { transform: none; visibility: visible; }
  .shell.menu-open .backdrop { display: block; position: fixed; inset: 0; z-index: 45; background: rgba(0, 0, 0, .35); }
  .topbar { display: flex; }
  .content { padding: 20px 16px 56px; }
}
@media (prefers-reduced-motion: no-preference) {
  .side { transition: transform .2s ease-out, visibility .2s; }
  .btn, .row, .nav-link, .tab { transition: background-color .15s, color .15s, box-shadow .15s; }
  .toast { transition: opacity .3s, transform .3s; }
}

/* ====================================================================
   4. Bildirimler
   ==================================================================== */
.flash { margin: 0 0 18px; padding: 11px 14px; border-radius: var(--r-sm); font-size: 14px; }
.flash.ok { background: var(--ok-bg); color: var(--ok-fg); }
.flash.err { background: var(--urgent-soft); color: var(--urgent); }
.flash.info { background: var(--accent-soft); color: var(--ink); }
.flash a { color: inherit; }
.toasts { position: fixed; right: 20px; bottom: 20px; z-index: 60; display: flex; flex-direction: column; gap: 10px; align-items: flex-end; max-width: calc(100vw - 40px); }
.toast { display: flex; align-items: flex-start; gap: 10px; margin: 0; padding: 12px 14px 12px 16px; border-radius: var(--r); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); font-size: 14px; max-width: 380px; }
.toast > .ico { margin-top: 1px; color: var(--ok-fg); }
.toast.err > .ico { color: var(--urgent); }
.toast.err { border-color: var(--urgent); }
.toast .toast-x { margin-left: 6px; border: 0; background: none; color: var(--muted); cursor: pointer; font-size: 18px; line-height: 1; padding: 0 2px; }
.toast.hide { opacity: 0; transform: translateY(8px); pointer-events: none; }

/* ====================================================================
   5. Sayfa başlığı, kartlar, yerleşim
   ==================================================================== */
.top { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px 24px; margin-bottom: 22px; }
.top p { margin: 0; max-width: 62ch; }
.top .flash { margin-top: 12px; }

.layout { display: grid; grid-template-columns: minmax(0, 340px) minmax(0, 1fr); gap: 28px; align-items: start; }
.layout.even { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (max-width: 960px) { .layout, .layout.even { grid-template-columns: minmax(0, 1fr); } }

.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 20px; min-width: 0; box-shadow: var(--shadow-sm); }
.card.narrow { max-width: 420px; margin: 40px auto; padding: 28px; box-shadow: var(--shadow); }
.card.narrow h1 { font-size: 24px; }
.card.narrow-left { max-width: 420px; }

.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 14px; margin: 8px 0 24px; }
@media (max-width: 480px) { .kpis { gap: 10px; } .kpi.has-ico { gap: 10px; padding: 12px; } .kpi-ico { width: 36px; height: 36px; } }
.kpi { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 14px 16px; box-shadow: var(--shadow-sm); }
.kpi b { display: block; font-size: 24px; line-height: 1.2; font-variant-numeric: tabular-nums; }
.kpi span { color: var(--muted); font-size: 13px; }
.kpi.has-ico { display: flex; align-items: center; gap: 14px; }
.kpi-ico { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 11px; flex: none; }
.kpi-ico .ico { width: 20px; height: 20px; vertical-align: 0; }
.kpi.k-warn .kpi-ico { background: var(--warn-bg); color: var(--warn-fg); }
.kpi.k-urgent .kpi-ico { background: var(--urgent-soft); color: var(--urgent); }
.kpi.k-ok .kpi-ico { background: var(--ok-bg); color: var(--ok-fg); }
.kpi.k-info .kpi-ico { background: var(--info-soft); color: var(--info); }

/* ====================================================================
   6. Form ve düğmeler
   ==================================================================== */
.field { display: flex; flex-direction: column; gap: 6px; margin: 0 0 14px; padding: 0; border: 0; min-width: 0; }
.field label, .field legend { font-size: 13px; font-weight: 600; padding: 0; }
.field.check label { font-weight: 500; display: flex; gap: 8px; align-items: center; }
.hint { font-size: 12px; color: var(--muted); }
input[type="text"], input[type="password"], input[type="email"], input[type="file"], input[type="number"], input[type="date"], select, textarea {
  width: 100%; font: inherit; font-size: 14px; color: var(--ink); background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--r-sm); padding: 9px 11px;
}
input[type="file"] { background: var(--surface-2); }
textarea { resize: vertical; min-height: 120px; line-height: 1.5; }
textarea.tall { min-height: 320px; }
.formerr { color: var(--urgent); font-size: 14px; margin: 0 0 12px; }

.seg { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2px; padding: 3px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 10px; }
.seg.two { grid-template-columns: repeat(2, 1fr); }
.seg label { position: relative; font-weight: 500; }
.seg input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.seg span { display: block; text-align: center; padding: 7px 6px; border-radius: 7px; font-size: 14px; color: var(--muted); }
.seg input:checked + span { background: var(--surface); color: var(--ink); font-weight: 600; box-shadow: var(--shadow-sm); }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; font: inherit; font-weight: 600; font-size: 14px; border-radius: var(--r-sm); padding: 10px 16px; cursor: pointer; border: 1px solid transparent; text-decoration: none; text-align: center; background: transparent; color: var(--ink); }
.btn:active { transform: translateY(1px); }
.btn.primary { background: var(--accent); color: var(--accent-ink); width: 100%; box-shadow: var(--shadow-sm); }
.btn.primary:hover { background: var(--accent-hover); }
.btn.primary.inline { width: auto; }
.btn.ghost { border-color: var(--line); background: var(--surface); padding: 7px 12px; font-size: 13px; }
.btn.ghost:hover { background: var(--surface-2); }
.btn.danger { border-color: var(--line); background: var(--surface); color: var(--urgent); padding: 7px 12px; font-size: 13px; }
.btn.danger:hover { background: var(--urgent-soft); border-color: var(--urgent); }

.actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.actions form { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin: 0; }
.check-inline { display: inline-flex; gap: 6px; align-items: center; font-size: 14px; }
.inline-select { width: auto; min-width: 200px; }
.admin-test { margin: 18px 0 0; padding-top: 14px; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.confirm { border-color: var(--urgent); margin-bottom: 20px; }
.confirm .actions { justify-content: space-between; }

/* ====================================================================
   7. Arama, sekmeler, liste
   ==================================================================== */
.search { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 14px; align-items: center; }
.search input[type="text"] { flex: 1 1 260px; min-width: 0; width: auto; }
.search .search-in input[type="text"] { padding-left: 36px; }
.search .search-in { position: relative; flex: 1 1 260px; min-width: 0; display: flex; }
.search .search-in .ico { position: absolute; left: 12px; top: 50%; margin-top: -8px; width: 16px; height: 16px; color: var(--muted); pointer-events: none; vertical-align: 0; }
.search select { width: auto; min-width: 0; }

.board { min-width: 0; }
.tabs { display: inline-flex; flex-wrap: wrap; gap: 2px; padding: 3px; margin-bottom: 14px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 10px; max-width: 100%; }
.tab { font-size: 13px; font-weight: 500; padding: 6px 12px; border-radius: 7px; color: var(--muted); text-decoration: none; font-variant-numeric: tabular-nums; }
.tab:hover { color: var(--ink); }
.tab[aria-current="true"] { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-sm); font-weight: 600; }
.row-actions > .tab { border: 1px solid var(--line); }

.list { list-style: none; margin: 0; padding: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; box-shadow: var(--shadow-sm); }
.list > li + li { border-top: 1px solid var(--line); }
.row { position: relative; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 3px 14px; align-items: center; color: inherit; text-decoration: none; padding: 14px 18px 14px 20px; }
.row::before { content: ""; position: absolute; left: 0; top: 10px; bottom: 10px; width: 3px; border-radius: 0 3px 3px 0; background: transparent; }
.row.p-urgent::before { background: var(--urgent); }
.row.p-low::before { background: var(--line); }
.row:hover { background: var(--surface-2); }
.row > .no, .row > .av { grid-row: span 2; align-self: start; }
.no { font-family: var(--f-mono); font-size: 13px; color: var(--muted); padding-top: 2px; margin: 0; }
.ttl { font-weight: 600; overflow-wrap: anywhere; }
.ttl .no { font-size: 12px; font-weight: 400; margin-left: 6px; padding: 0; }
.meta { grid-column: 2; font-size: 13px; color: var(--muted); display: flex; flex-wrap: wrap; align-items: center; gap: 2px 14px; margin: 0; }
.meta > span { display: inline-flex; align-items: center; gap: 5px; }
.urgent { color: var(--urgent); font-weight: 600; }
.dept-tag { color: var(--accent); font-weight: 600; }
.dept-tag.waiting { color: var(--warn-fg); }
.pickbox { background: var(--warn-bg); border: 1px dashed var(--warn-fg); border-radius: 12px; padding: 14px 16px; margin-bottom: 16px; }
.pickbox h2 { font-size: 15px; margin: 0 0 4px; display: flex; align-items: center; gap: 6px; color: var(--warn-fg); }
.pickbox p { margin: 0 0 10px; font-size: 13px; }
.pick-btns { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; }
.pick-btns .btn { font-size: 14px; padding: 8px 14px; }
.late { color: var(--urgent); font-weight: 600; }
.row > .pill { grid-column: 3; grid-row: 1 / span 2; }
.kb-row { grid-template-columns: minmax(0, 1fr); gap: 4px; }
.kb-row .meta { grid-column: 1; }
.kb-ex { color: var(--muted); font-size: 14px; overflow-wrap: anywhere; }

.empty { background: var(--surface); border: 1px dashed var(--line); border-radius: var(--r); padding: 36px 22px; text-align: center; }
.empty::before { content: ""; display: block; width: 44px; height: 44px; margin: 0 auto 12px; border-radius: 12px; background: var(--accent-soft); }
.empty p { margin: 0 auto; color: var(--muted); max-width: 56ch; }

.pager { display: flex; align-items: center; gap: 12px; justify-content: center; margin: 18px 0; }

/* durum etiketi */
.pill { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; padding: 3px 10px; border-radius: 999px; white-space: nowrap; }
.pill::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; flex: none; }
.pill.open { background: var(--warn-bg); color: var(--warn-fg); }
.pill.answered { background: var(--info-soft); color: var(--info); }
.pill.pending { background: var(--surface-2); color: var(--warn-fg); border: 1px dashed var(--warn-fg); }
.pill.solved { background: var(--ok-bg); color: var(--ok-fg); }
.pill.closed { background: transparent; color: var(--muted); border: 1px solid var(--line); }

/* avatar */
.av { display: inline-grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; font-size: 12px; font-weight: 700; color: #fff; flex: none; background: #6b7c78; letter-spacing: .02em; }
.av.sm { width: 20px; height: 20px; font-size: 9px; }
.av.c0 { background: #0f7a67; } .av.c1 { background: #2563eb; } .av.c2 { background: #c2410c; } .av.c3 { background: #7c3aed; }
.av.c4 { background: #0e7490; } .av.c5 { background: #be185d; } .av.c6 { background: #4d7c0f; } .av.c7 { background: #a16207; }

.role, .who em { font-style: normal; font-size: 12px; color: var(--accent); background: var(--accent-soft); padding: 1px 8px; border-radius: 999px; margin-left: 4px; }
.role.off { background: var(--warn-bg); color: var(--urgent); }
.vis { font-size: 12px; padding: 1px 8px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); }
.vis.draft { background: var(--warn-bg); color: var(--warn-fg); }

/* ====================================================================
   8. Tablolar
   ==================================================================== */
.tbl-wrap { overflow-x: auto; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); margin-bottom: 28px; box-shadow: var(--shadow-sm); }
.tbl { width: 100%; border-collapse: collapse; font-size: 14px; }
.tbl th, .tbl td { text-align: left; padding: 11px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl tbody tr:hover { background: var(--surface-2); }
.tbl th { font-size: 12px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); font-weight: 600; background: var(--surface-2); }
.tbl .right { text-align: right; }
.tbl input[type="text"], .tbl select { font-size: 13px; padding: 6px 8px; min-width: 0; }
.tbl input[type="checkbox"] { width: 18px; height: 18px; accent-color: var(--accent); }
.row-actions { display: flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; align-items: center; margin: 0; }
.row-actions form { margin: 0; }
.role-form { display: flex; gap: 6px; align-items: center; }
.role-form select { width: auto; padding: 6px 8px; font-size: 13px; }
h2 + .tbl-wrap, .top + h2 { margin-top: 0; }
.tbl-wrap + .card, .tbl-wrap + h2, section.card + h2 { margin-top: 28px; }

/* ====================================================================
   9. Talep ayrıntısı
   ==================================================================== */
.back { margin: 0 0 14px; font-size: 14px; }
.back a { color: var(--muted); text-decoration: none; display: inline-flex; align-items: center; gap: 4px; }
.back a:hover { color: var(--ink); }
.detail { display: flex; flex-direction: column; gap: 20px; }
.detail-head { display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: flex-start; justify-content: space-between; }
.detail-head > div { min-width: 0; flex: 1 1 320px; }
.detail-head .no { padding: 0 0 4px; }
.detail h1 { font-size: 24px; overflow-wrap: anywhere; }
.detail-grid { display: grid; grid-template-columns: minmax(0, 1fr) 290px; gap: 24px; align-items: start; }
.detail-main { display: flex; flex-direction: column; gap: 20px; min-width: 0; }
.detail-grid > .detail-main { grid-column: 1; grid-row: 1; }
.detail-side { display: flex; flex-direction: column; gap: 14px; position: sticky; top: 20px; grid-column: 2; grid-row: 1; }
@media (max-width: 1060px) {
  .detail-grid { grid-template-columns: minmax(0, 1fr); }
  .detail-grid > .detail-main, .detail-side { grid-column: 1; grid-row: auto; }
  .detail-side { position: static; }
}
.side-title { font-size: 12px; letter-spacing: .07em; text-transform: uppercase; color: var(--muted); margin: 0 0 12px; }
.lbl { font-size: 12px; letter-spacing: 0.07em; text-transform: uppercase; color: var(--muted); font-weight: 600; margin: 0 0 6px; }
.desc { white-space: pre-wrap; overflow-wrap: anywhere; margin: 0; }

.staffbox { display: flex; flex-direction: column; gap: 10px; margin: 0; }
.staffbox .field { margin: 0; min-width: 0; }
.staffbox .field label { font-size: 12px; color: var(--muted); }
.staffbox select { padding: 7px 9px; }

.lockbar:empty { display: none; }

/* yazışma: balonlar */
.thread { display: flex; flex-direction: column; gap: 18px; }
.msg { display: flex; gap: 12px; align-items: flex-start; min-width: 0; }
.msg > .av { margin-top: 2px; }
.bubble { min-width: 0; max-width: min(640px, 88%); background: var(--surface-2); border: 1px solid var(--line); border-radius: 4px 14px 14px 14px; padding: 12px 16px; }
.msg.staff { flex-direction: row-reverse; }
.msg.staff .bubble { background: var(--accent-soft); border-color: transparent; border-radius: 14px 4px 14px 14px; }
.msg.note .bubble { background: var(--warn-bg); border: 1px dashed var(--warn-fg); }
.msg.note .msg-head b { color: var(--warn-fg); }
.msg-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 10px; margin: 0 0 6px; font-size: 12px; color: var(--muted); }
.msg-head b { color: var(--ink); font-weight: 600; font-size: 13px; }
.msg-head .tag { font-size: 11px; padding: 0 8px; border: 1px solid var(--line); border-radius: 999px; }
.msg-body { min-width: 0; }
.msg-body p, .solution p { margin: 0 0 10px; white-space: pre-wrap; overflow-wrap: anywhere; }
.msg-body p:last-child, .msg-body pre:last-child, .solution p:last-child, .solution pre:last-child { margin-bottom: 0; }
.msg-body code, .solution code { font-family: var(--f-mono); font-size: 0.9em; background: var(--code-bg); padding: 1px 5px; border-radius: 4px; }
.msg-body pre, .solution pre { margin: 0 0 10px; background: var(--code-bg); border-radius: 6px; padding: 12px; overflow-x: auto; font-family: var(--f-mono); font-size: 13px; line-height: 1.5; }
.msg-body pre code, .solution pre code { background: none; padding: 0; font-size: inherit; }
.msg-body a { overflow-wrap: anywhere; }
.solution { background: var(--accent-soft); border-radius: var(--r-sm); padding: 14px 16px; min-width: 0; }
.codeblock { background: var(--code-bg); border-radius: 6px; padding: 10px 12px; overflow-x: auto; font-family: var(--f-mono); font-size: 13px; margin: 0 0 10px; }

.atts { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.att-img img { display: block; max-width: 100%; max-height: 140px; border-radius: 6px; border: 1px solid var(--line); }
.att-file { display: inline-flex; align-items: center; gap: 6px; padding: 6px 10px; border: 1px solid var(--line); border-radius: var(--r-sm); font-size: 13px; text-decoration: none; background: var(--surface); color: var(--ink); overflow-wrap: anywhere; }
.att-file:hover { border-color: var(--accent); }

/* yanıt kutusu */
.reply { border-top: 1px solid var(--line); padding-top: 18px; }
.reply.is-note textarea { border-style: dashed; border-color: var(--warn-fg); background: var(--warn-bg); }
.reply.is-note .reply-only { display: none; }
.reply.is-note .seg input:checked + span { color: var(--warn-fg); }
.reopen textarea { min-height: 80px; }
.canned-row { margin-bottom: 14px; }

/* ====================================================================
   10. Bilgi bankası
   ==================================================================== */
.suggest { margin-top: 8px; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--accent-soft); font-size: 14px; }
.suggest p { margin: 0 0 4px; }
.suggest ul { margin: 0; padding-left: 18px; }
.article-body { font-size: 16px; line-height: 1.7; }
.article-foot { margin-top: 24px; padding-top: 16px; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: center; }
.article-foot p { margin: 0; }
.dep-edit { margin-top: 4px; font-size: 13px; }
.dep-edit summary { cursor: pointer; color: var(--accent); }
.dep-edit form { display: flex; flex-direction: column; gap: 6px; align-items: flex-start; padding: 8px 0 2px; }
details summary { cursor: pointer; margin-top: 10px; color: var(--accent); }

/* ====================================================================
   11. Kurallar
   ==================================================================== */
.grid3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 0 14px; }
.cond-row { display: grid; grid-template-columns: minmax(140px, 1.2fr) minmax(110px, 1fr) 2fr; gap: 8px; margin-bottom: 8px; }
@media (max-width: 640px) { .cond-row { grid-template-columns: 1fr; } }
.test-result { margin-top: 14px; padding: 10px 14px; border-radius: var(--r-sm); background: var(--accent-soft); }

/* ====================================================================
   12. Raporlar
   ==================================================================== */
.chart-wrap { overflow-x: auto; }
.chart { width: 100%; min-width: 520px; height: auto; display: block; }
.chart .grid { stroke: var(--line); stroke-width: 1; }
.chart .base { stroke: var(--muted); stroke-width: 1; }
.chart .axis { fill: var(--muted); font-size: 11px; }
.chart .s1 { fill: var(--series-1); }
.chart .s2 { fill: var(--series-2); }
.chart .hit { fill: transparent; }
.chart .col:hover .hit { fill: var(--line); opacity: .5; }
.legend { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 13px; margin: 0 0 8px; }
.legend .key { display: inline-block; width: 12px; height: 12px; border-radius: 3px; }
.legend .key.s1 { background: var(--series-1); }
.legend .key.s2 { background: var(--series-2); margin-left: 10px; }
