/* sanal-ofis pixel-art ofis arayüzü. Temiz, düz (flat) tasarım. */

:root {
  /* Ajan gömlek renkleri */
  --c-researcher: #378ADD;
  --c-compliance: #D4537E;
  --c-writer:     #7F77DD;
  --c-factcheck:  #BA7517;
  --c-image:      #1D9E75;
  --c-publisher:  #5F5E5A;

  /* Durum renkleri */
  --s-idle:    #B4B2A9;
  --s-working: #EF9F27;
  --s-waiting: #378ADD;
  --s-done:    #1D9E75;

  /* Yüzey / metin */
  --bg:        #EEF1F5;
  --surface:   #FFFFFF;
  --border:    #E2E6EC;
  --text:      #1F2733;
  --muted:     #6B7686;
  --primary:   #2E6FD6;

  /* Tabela */
  --sign-bg:   #0F1B2E;
  --sign-amber:#FAC775;
  --sign-green:#5DCAA5;

  /* Masa */
  --desk-top:  #9A7B4F;
  --desk-bot:  #6B5437;
  --desk-leg:  #5A4529;

  --radius: 12px;
  --mono: "SF Mono", "Menlo", "Consolas", ui-monospace, monospace;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
}

.hidden { display: none !important; }
.muted { color: var(--muted); }
.small { font-size: 12px; }
code { font-family: var(--mono); background: #f0f2f5; padding: 1px 5px; border-radius: 5px; }

/* ---------- Butonlar ---------- */
.btn {
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  padding: 9px 16px;
  border-radius: 10px;
  font-size: 14px;
  cursor: pointer;
  transition: background .15s, border-color .15s, transform .05s;
}
.btn:hover { border-color: #cfd6df; }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--primary); border-color: var(--primary); color: #fff; }
.btn-primary:hover { background: #245bb5; }
.btn-ghost { background: #f6f8fb; }
.btn-publish { background: var(--s-done); border-color: var(--s-done); color: #fff; font-weight: 600; width: 100%; }
.btn-publish:hover { background: #178a64; }
.btn-icon {
  border: none; background: transparent; font-size: 22px; line-height: 1;
  color: var(--muted); cursor: pointer; width: 34px; height: 34px; border-radius: 8px;
}
.btn-icon:hover { background: #f0f2f5; }
.row-end { display: flex; justify-content: flex-end; margin-top: 14px; }

input[type=text], input[type=password], textarea {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 14px;
  font-family: inherit;
  background: var(--surface);
  color: var(--text);
}
input:focus, textarea:focus { outline: 2px solid #cfe0fb; border-color: var(--primary); }
textarea { resize: vertical; min-height: 64px; }

/* ---------- Üst bar ---------- */
.topbar {
  display: flex; align-items: center; gap: 14px;
  padding: 12px 18px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 20;
  flex-wrap: wrap;
}
.brand-mini { font-family: var(--mono); font-weight: 700; color: var(--primary); }
.topbar-controls { display: flex; gap: 10px; flex: 1; min-width: 240px; }
.topbar-controls input { flex: 1; }
.topbar-right { display: flex; align-items: center; gap: 10px; }
#log-btn { white-space: nowrap; }
.status-badge {
  padding: 7px 14px; border-radius: 999px;
  background: #f0f2f5; color: var(--muted);
  font-size: 13px; white-space: nowrap;
}
.status-badge.active { background: #fff2dc; color: #a5680d; }
.status-badge.done { background: #e2f6ee; color: #157a56; }

/* ---------- Akış şeridi ---------- */
.flow-strip {
  display: flex; align-items: center; gap: 4px; flex-wrap: nowrap;
  overflow-x: auto; padding: 9px 16px;
  background: var(--surface); border-bottom: 1px solid var(--border);
  font-size: 11.5px; -webkit-overflow-scrolling: touch;
}
.flow-step { display: inline-flex; align-items: center; gap: 5px; color: var(--muted); white-space: nowrap; }
.flow-dot { width: 8px; height: 8px; border-radius: 50%; background: #d3d8df; }
.flow-step.done { color: var(--s-done); }
.flow-step.done .flow-dot { background: var(--s-done); }
.flow-step.active { color: #a5680d; font-weight: 700; }
.flow-step.active .flow-dot { background: var(--s-working); box-shadow: 0 0 0 3px rgba(239,159,39,.2); }
.flow-sep { flex: 0 0 14px; height: 1px; background: #dfe3e9; margin: 0 1px; }

/* ---------- Ofis sahnesi ---------- */
.office { max-width: 1160px; margin: 0 auto; padding: 0 14px 40px; }
.stage {
  position: relative; margin-top: 14px;
  border: 1px solid var(--border); border-radius: 16px; overflow: hidden;
  box-shadow: 0 8px 30px rgba(31,39,51,.08);
}

/* Plaza camlı duvar */
.window-wall { height: 128px; background: #C9CDBE; }
.window-wall svg { width: 100%; height: 100%; display: block; image-rendering: pixelated; }

/* Tavandan sarkan tabela: ortalı, tek renk SİYAH */
.sign-wrap { position: absolute; top: 0; left: 0; right: 0; height: 66px; display: flex; justify-content: center; z-index: 3; pointer-events: none; }
.sign {
  align-self: flex-end;
  background: #F2EFE7; border: 2px solid #11131A; border-radius: 8px;
  padding: 8px 22px; font-family: var(--mono); font-size: 18px; font-weight: 700;
  letter-spacing: 1px; color: #11131A; text-align: center;
  box-shadow: 0 6px 14px rgba(15,27,46,.28);
}
.sign-strap { position: absolute; top: 0; width: 3px; height: 22px; background: #2a2f38; }
.sign-strap.left { left: calc(50% - 78px); }
.sign-strap.right { right: calc(50% - 78px); }

/* Duvar bandı: saat, poster, yapılacaklar panosu, kitaplık */
.wall-band {
  display: flex; align-items: flex-end; justify-content: center; gap: 22px; flex-wrap: wrap;
  padding: 12px 18px 8px;
  background: linear-gradient(180deg, #E7D4B8, #DFC8A6);
  border-bottom: 3px solid #B79366;
}
.decor-item svg { image-rendering: pixelated; shape-rendering: crispEdges; display: block; }
.decor-item.clock svg { width: 40px; }
.decor-item.shelf svg { width: 58px; }
.decor-item.hang svg { width: 30px; margin-bottom: 8px; }
.poster {
  display: flex; flex-direction: column; gap: 2px; align-items: center; justify-content: center;
  background: #FBF4E4; border: 3px solid #2A2320; border-radius: 3px; padding: 6px 12px;
  font-family: var(--mono); font-weight: 700; font-size: 11px; color: #B03A3A; letter-spacing: 1px;
}
.poster span:nth-child(2) { color: #3E7D4F; } .poster span:nth-child(3) { color: #C96A2E; }
.todo-board {
  background: #4E7D3A; border: 3px solid #2E4A22; border-radius: 4px; padding: 6px 10px; color: #fff;
  font-size: 10.5px; min-width: 96px;
}
.todo-h { font-weight: 700; font-family: var(--mono); font-size: 10px; letter-spacing: 1px; margin-bottom: 4px; }
.todo-l { padding-left: 14px; position: relative; line-height: 1.5; }
.todo-l::before { content: "☐"; position: absolute; left: 0; }
.todo-l.done { opacity: .75; text-decoration: line-through; }
.todo-l.done::before { content: "☑"; }

/* Ofis zemini (sıcak ahşap tahta) */
.floor {
  position: relative;
  background:
    repeating-linear-gradient(90deg, rgba(120,80,40,.10) 0 1px, transparent 1px 46px),
    repeating-linear-gradient(0deg, rgba(90,60,30,.08) 0 2px, transparent 2px 16px),
    linear-gradient(180deg, #D9B98C, #CDA974);
  padding: 24px 16px 30px;
}

/* Zemin dekoru (köşelerde, ajanların arkasında) */
.floor-decor { position: absolute; inset: 0; pointer-events: none; z-index: 1; }
.fdecor { position: absolute; }
.fdecor svg { image-rendering: pixelated; shape-rendering: crispEdges; display: block; }
.fdecor.cooler { top: 8px; left: 8px; width: 26px; }
.fdecor.couch { bottom: 6px; right: 10px; width: 96px; }
.fdecor.plant-l { bottom: 8px; left: 12px; width: 24px; }
.fdecor.plant-r { top: 10px; right: 14px; width: 22px; }
.fdecor.plant-c { bottom: 10px; left: 46%; width: 20px; }
.fdecor.plant-m { top: 0; right: 40%; width: 22px; }
/* Duvara asılı yapışkan notlar */
.fdecor.note {
  font-family: "Comic Sans MS", "Segoe UI", sans-serif;
  font-size: 8px; font-weight: 700; line-height: 1.15; color: #5a4326;
  padding: 5px 4px; width: 46px; text-align: center;
  box-shadow: 1px 2px 3px rgba(60,40,20,.25);
}
.fdecor.note1 { top: 10px; left: 30%; background: #FBC7D4; transform: rotate(-5deg); }
.fdecor.note2 { top: 12px; right: 30%; background: #FFE28A; transform: rotate(4deg); }
@media (max-width: 760px) {
  .fdecor.couch, .fdecor.cooler, .fdecor.plant-c, .fdecor.plant-m,
  .fdecor.note { display: none; }
}

/* Ajan ızgarası: kutu YOK, ortak zemin üzerinde otururlar.
   Masalar tekdüze değil; her biri farklı dikey kaymayla serpiştirilmiş. */
.ws-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px 14px; position: relative; z-index: 2; align-items: start; }
@media (max-width: 760px) { .ws-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 440px) { .ws-grid { grid-template-columns: 1fr; } }

.ws {
  background: transparent; border: none; padding: 6px 4px; cursor: pointer;
  display: flex; flex-direction: column; align-items: center;
  border-radius: 12px;
  transform: translateY(var(--yoff, 0px));
  transition: transform .1s, filter .15s;
}
/* Organik serpiştirme: pencere önünde üstte, ortada aşağıda, farklı yönlerde */
.ws:nth-child(1) { --yoff: 0px; }
.ws:nth-child(2) { --yoff: 26px; }
.ws:nth-child(3) { --yoff: 8px; }
.ws:nth-child(4) { --yoff: 22px; }
.ws:nth-child(5) { --yoff: 4px; }
.ws:nth-child(6) { --yoff: 30px; }
.ws:nth-child(7) { --yoff: 12px; }
.ws:hover { transform: translateY(calc(var(--yoff, 0px) - 4px)); filter: drop-shadow(0 6px 8px rgba(60,40,20,.25)); }
@media (max-width: 760px) { .ws { --yoff: 0px !important; } }
/* Çalışan ajan bariz belli olsun: sıcak parıltı halkası */
.ws.status-working { background: radial-gradient(circle at 50% 40%, rgba(239,159,39,.22), transparent 62%); }
.ws.status-working .ws-scene { filter: drop-shadow(0 0 6px rgba(239,159,39,.55)); }
/* Seni bekleyen ajan: mavi vurgulu zemin */
.ws.status-waiting { background: radial-gradient(circle at 50% 40%, rgba(55,138,221,.22), transparent 62%); }

.ws-scene { width: 150px; max-width: 100%; }
.ws-scene svg { width: 100%; height: auto; display: block; image-rendering: pixelated; shape-rendering: crispEdges; overflow: visible; }

.ws-label { text-align: center; margin-top: 2px; text-shadow: 0 1px 2px rgba(255,255,255,.6); }
.ws-name { display: block; font-weight: 700; font-size: 14.5px; color: #3a2c1a; }
.ws-role { display: block; font-size: 11px; color: #6b543a; }
.ws-status { display: inline-block; margin-top: 3px; font-size: 12px; font-weight: 700; color: var(--muted); }

/* Durum noktası rengi (SVG rect) */
.ws.status-idle    .status-dot { fill: var(--s-idle); }
.ws.status-working .status-dot { fill: var(--s-working); }
.ws.status-waiting .status-dot { fill: var(--s-waiting); }
.ws.status-done    .status-dot { fill: var(--s-done); }

/* Dikkat işareti (! balonu) sadece waiting'de */
.attn { opacity: 0; }
.ws.status-waiting .attn { animation: attn 1.4s ease-in-out infinite; }
@keyframes attn { 0%,100% { opacity: 0; transform: translateY(2px); } 25%,60% { opacity: 1; transform: translateY(0); } }

/* ---- Karakter animasyonları (transform/opacity, hafif) ---- */
.char, .char-head, .char-arm { transform-box: fill-box; }

/* working: hafif öne eğilme + kollar klavyede + ekran ışığı */
.ws.status-working .char { animation: work-lean 1.8s ease-in-out infinite; transform-origin: center bottom; }
.ws.status-working .char-arm.left  { animation: type-l .34s ease-in-out infinite; transform-origin: center top; }
.ws.status-working .char-arm.right { animation: type-r .34s ease-in-out infinite; transform-origin: center top; }
.ws.status-working .screen { animation: flicker 1.2s steps(2) infinite; }
@keyframes work-lean { 0%,100% { transform: translateY(0) rotate(0); } 50% { transform: translateY(.4px) rotate(.6deg); } }
@keyframes type-l { 0%,100% { transform: translateY(0); } 50% { transform: translateY(.9px); } }
@keyframes type-r { 0%,100% { transform: translateY(.9px); } 50% { transform: translateY(0); } }
@keyframes flicker { 0% { opacity: .8; } 100% { opacity: 1; } }

/* idle: ara ara etrafa bakma + hafif sallanma (gecikme ajan başına farklı) */
.ws.status-idle .char { animation: idle-sway 5s ease-in-out infinite; animation-delay: var(--idle-delay, 0s); transform-origin: center bottom; }
.ws.status-idle .char-head { animation: idle-look 6.5s ease-in-out infinite; animation-delay: var(--idle-delay, 0s); transform-origin: center bottom; }
@keyframes idle-sway { 0%,88%,100% { transform: rotate(0); } 92% { transform: rotate(-1deg); } 96% { transform: rotate(1deg); } }
@keyframes idle-look { 0%,70%,100% { transform: translateX(0); } 78% { transform: translateX(-1px); } 88% { transform: translateX(1px); } }

/* waiting: hafif nabız */
.ws.status-waiting .char { animation: wait-pulse 1s ease-in-out infinite; transform-origin: center bottom; }
@keyframes wait-pulse { 0%,100% { transform: scale(1); } 50% { transform: scale(1.03); } }

/* done: kısa onay hareketi (bir kez), sonra sabit */
.ws.status-done .char { animation: done-nod .7s ease 1; transform-origin: center bottom; }
@keyframes done-nod { 0% { transform: translateY(0); } 30% { transform: translateY(-2px); } 60% { transform: translateY(0); } 100% { transform: translateY(0); } }

/* ---- Kediler ---- */
.cats { position: absolute; inset: 0; pointer-events: none; z-index: 3; overflow: hidden; }
.cat { position: absolute; width: 34px; image-rendering: pixelated; }
.cat svg { width: 100%; height: auto; image-rendering: pixelated; shape-rendering: crispEdges; }
.cat-legs { transform-box: fill-box; transform-origin: center bottom; }
.cat-a { bottom: 10px; animation: roam-a 34s ease-in-out infinite; }
.cat-b { bottom: 40px; animation: roam-b 44s ease-in-out infinite; }
.cat-a .cat-legs { animation: step .28s steps(2) infinite; }
.cat-b .cat-legs { animation: step .32s steps(2) infinite; }
@keyframes step { 0% { transform: translateX(0); } 100% { transform: translateX(1px); } }
/* yürü, dur/otur, geri dön; scaleX ile yön değiştir */
@keyframes roam-a {
  0% { left: 3%; transform: scaleX(1); }
  22% { left: 62%; transform: scaleX(1); }
  30% { left: 62%; transform: scaleX(1); }        /* otur */
  32% { left: 62%; transform: scaleX(-1); }
  60% { left: 12%; transform: scaleX(-1); }
  68% { left: 12%; transform: scaleX(-1); }        /* otur */
  70% { left: 12%; transform: scaleX(1); }
  100% { left: 3%; transform: scaleX(1); }
}
@keyframes roam-b {
  0% { left: 84%; transform: scaleX(-1); }
  26% { left: 30%; transform: scaleX(-1); }
  34% { left: 30%; transform: scaleX(-1); }
  36% { left: 30%; transform: scaleX(1); }
  64% { left: 78%; transform: scaleX(1); }
  72% { left: 78%; transform: scaleX(1); }
  74% { left: 78%; transform: scaleX(-1); }
  100% { left: 84%; transform: scaleX(-1); }
}

/* ---------- Legend ---------- */
.legend {
  display: flex; flex-wrap: wrap; gap: 16px; justify-content: center;
  margin-top: 28px; padding: 14px; background: var(--surface);
  border: 1px solid var(--border); border-radius: var(--radius);
}
.legend-item { display: flex; align-items: center; gap: 7px; font-size: 13px; color: var(--muted); }
.legend-swatch { width: 12px; height: 12px; border-radius: 50%; }

/* ---------- Karar paneli (geniş: solda okuma, sağda kararlar) ---------- */
.chat-panel {
  position: fixed; top: 0; right: 0; height: 100%;
  width: min(860px, 96vw); max-width: 96vw;
  background: var(--surface); border-left: 1px solid var(--border);
  box-shadow: -8px 0 30px rgba(31,39,51,.14);
  display: flex; flex-direction: column; z-index: 40;
  animation: slideIn .2s ease;
}
@keyframes slideIn { from { transform: translateX(30px); opacity: 0; } to { transform: none; opacity: 1; } }
.chat-head { display: flex; align-items: center; gap: 12px; padding: 14px 18px; border-bottom: 1px solid var(--border); flex: none; }
.chat-avatar { width: 40px; height: 40px; image-rendering: pixelated; }
.chat-avatar svg { width: 100%; height: 100%; image-rendering: pixelated; shape-rendering: crispEdges; }
.chat-id { flex: 1; }
.chat-name { font-weight: 600; }
.chat-role { font-size: 12px; }

/* Ana alan: masaüstünde iki sütun (okuma | kararlar), mobilde alt alta */
.chat-main { flex: 1; display: flex; min-height: 0; }
/* Okuma alanı: panelin yıldızı; geniş, ferah, rahat okunur */
.chat-body {
  flex: 1.7; min-width: 0; overflow-y: auto; padding: 22px 24px;
  display: flex; flex-direction: column; gap: 12px;
  font-size: 15px; line-height: 1.65;
}
/* Karar alanı: okumadan görsel olarak ayrı; kategorili, sıkışmaz */
.chat-actions {
  flex: 1; max-width: 340px; min-width: 300px; overflow-y: auto;
  padding: 16px; border-left: 1px solid var(--border);
  background: #fafbfc; display: flex; flex-direction: column; gap: 10px;
}
.chat-main.no-actions .chat-actions { display: none; }
@media (max-width: 780px) {
  .chat-panel { width: 100vw; max-width: 100vw; }
  .chat-main { flex-direction: column; }
  .chat-body { flex: none; max-height: 55vh; }
  .chat-actions { max-width: none; min-width: 0; border-left: none; border-top: 2px solid var(--border); flex: none; }
}

/* Karar kategorileri (accordion) */
.act-group { border: 1px solid var(--border); border-radius: 10px; background: #fff; overflow: hidden; }
.act-group > summary { cursor: pointer; padding: 10px 12px; font-weight: 700; font-size: 13px; color: #2b3543; list-style: none; display: flex; align-items: center; justify-content: space-between; }
.act-group > summary::-webkit-details-marker { display: none; }
.act-group > summary::after { content: "▾"; color: var(--muted); font-size: 11px; transition: transform .15s; }
.act-group[open] > summary::after { transform: rotate(180deg); }
.act-group > summary:hover { background: #f5f7fa; }
.act-body { padding: 10px 12px; display: flex; flex-direction: column; gap: 8px; border-top: 1px solid var(--border); }
.act-hint { font-size: 11.5px; color: var(--muted); }

.bubble { max-width: 100%; padding: 12px 15px; border-radius: 14px; font-size: 15px; line-height: 1.65; white-space: pre-wrap; }
.bubble.agent { align-self: stretch; background: #f5f7f9; border-bottom-left-radius: 4px; }
.bubble.user  { align-self: flex-end; max-width: 86%; background: #dcebff; border-bottom-right-radius: 4px; }

/* Aday kartları */
.cand-card { border: 1px solid var(--border); border-radius: 10px; padding: 10px 12px; cursor: pointer; transition: border-color .12s, background .12s; }
.cand-card:hover { border-color: var(--primary); background: #f7faff; }
.cand-title { font-weight: 600; font-size: 14px; margin-bottom: 3px; }
.cand-sum { font-size: 12.5px; color: var(--muted); }
.tr-flag { display: inline-block; font-size: 10.5px; font-weight: 700; color: #a5680d; background: #fff2dc; padding: 1px 6px; border-radius: 6px; margin-right: 6px; }

.fc-line { display: flex; gap: 8px; margin: 6px 0; }
.fc-box { flex: 1; text-align: center; padding: 8px; border-radius: 10px; font-size: 12px; }
.fc-box b { display: block; font-size: 19px; margin-bottom: 2px; }
.fc-green { background: #e2f6ee; color: #157a56; }
.fc-amber { background: #fff2dc; color: #a5680d; }
.fc-neutral { background: #f0f2f5; color: var(--muted); }
.issue-item { font-size: 12.5px; padding: 6px 9px; border-radius: 8px; background: #faf5ec; margin: 4px 0; }
.issue-item.mismatch { background: #fdecec; }
.issue-sugg { display: inline-block; margin-top: 3px; font-size: 11.5px; font-weight: 600; color: #157a56; }

/* Yönlendirmeli revizyon kontrolleri (karar panellerinde) */
.revise-controls { border-top: 1px dashed var(--border); margin-top: 6px; padding-top: 10px; display: flex; flex-direction: column; gap: 8px; }
.revise-label { font-size: 12px; color: var(--muted); font-weight: 600; }
.revise-text { min-height: 54px; }
.revise-agents { display: flex; flex-wrap: wrap; gap: 6px; }
.revise-agent { flex: 1 1 auto; font-size: 12.5px; padding: 7px 8px; }
.revise-agent.sel { background: #eaf2ff; border-color: var(--primary); color: var(--primary); font-weight: 700; }
.revise-send { width: 100%; }

/* İki ajan işbirliği kontrolleri */
.collab-controls { border-top: 1px dashed var(--border); margin-top: 6px; padding-top: 10px; display: flex; flex-direction: column; gap: 8px; }
.collab-pairs { display: flex; flex-direction: column; gap: 6px; }
.collab-pair { text-align: left; font-size: 12.5px; padding: 8px 10px; line-height: 1.35; white-space: normal; }
.collab-free { font-size: 12.5px; }
.collab-free > summary { cursor: pointer; color: var(--primary); font-weight: 600; margin-bottom: 6px; }
.collab-selects { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 6px; }
.collab-selects label { display: flex; flex-direction: column; gap: 3px; font-size: 11px; color: var(--muted); flex: 1 1 45%; }
.collab-selects select { padding: 6px; border-radius: 8px; border: 1px solid var(--border); }
.collab-text { min-height: 48px; width: 100%; }
.collab-send { width: 100%; }
.collab-again { width: 100%; }

/* Değerlendirme yargısı kartı */
.collab-verdict { border-radius: 12px; padding: 11px 13px; font-size: 13px; line-height: 1.5; border: 1px solid var(--border); }
.collab-verdict.cv-ok { background: #e2f6ee; border-color: #b6e3d0; }
.collab-verdict.cv-warn { background: #fff2dc; border-color: #f0d8a8; }
.collab-verdict.cv-neutral { background: #f0f2f5; }
.cv-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 4px; }
.cv-badge { margin-left: auto; font-size: 11px; font-weight: 700; padding: 2px 9px; border-radius: 999px; background: rgba(0,0,0,.08); }
.collab-verdict.cv-ok .cv-badge { background: #157a56; color: #fff; }
.collab-verdict.cv-warn .cv-badge { background: #b45309; color: #fff; }
.cv-sum { color: #2b3543; }
.cv-list { margin-top: 4px; }
.cv-lbl { font-weight: 700; font-size: 11.5px; }
.cv-list ul { margin: 2px 0 0; padding-left: 18px; }
.cv-list li { font-size: 12px; }
.cv-action { margin-top: 6px; font-weight: 700; color: #157a56; font-size: 12.5px; }

/* ---------- Final ekran ---------- */
.final-screen { position: fixed; inset: 0; background: rgba(20,26,34,.5); z-index: 50; overflow-y: auto; padding: 24px; }
.final-inner {
  max-width: 1080px; margin: 0 auto; background: var(--bg);
  border-radius: 16px; display: grid; grid-template-columns: 1.7fr 1fr; gap: 0;
  overflow: hidden; box-shadow: 0 20px 60px rgba(0,0,0,.3);
}
@media (max-width: 860px) { .final-inner { grid-template-columns: 1fr; } }

.article-preview { background: var(--surface); padding: 26px 30px; }
.article-image {
  width: 100%; aspect-ratio: 16/9; border-radius: 12px; overflow: hidden;
  background: linear-gradient(135deg, #14263f, #0f1b2e); margin-bottom: 16px;
  display: flex; align-items: center; justify-content: center;
  color: #6f8299; font-size: 13px; text-align: center; padding: 12px;
}
.article-image img { width: 100%; height: 100%; object-fit: cover; }
.article-meta { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.cat-tag { background: #ecf0f6; color: var(--primary); font-size: 12px; font-weight: 600; padding: 3px 10px; border-radius: 999px; }
.article-title { font-size: 24px; font-weight: 500; line-height: 1.25; margin: 4px 0 16px; }
.article-content { font-size: 15.5px; line-height: 1.75; color: #2b3543; }
.article-content h2 { font-size: 18px; font-weight: 600; margin: 24px 0 10px; text-align: left; }
.article-content p { margin: 0 0 15px; text-align: justify; text-justify: inter-word; hyphens: auto; }
.linkedin-block { margin-top: 22px; border-top: 1px solid var(--border); padding-top: 16px; }
.li-card { background: #f7f9fc; border: 1px solid var(--border); border-radius: 10px; padding: 12px; margin: 8px 0; }
.li-card h4 { margin: 0 0 6px; font-size: 13px; color: var(--muted); display: flex; justify-content: space-between; align-items: center; }
.li-text { font-size: 13px; white-space: pre-wrap; line-height: 1.5; }
.copy-btn { font-size: 11px; padding: 3px 9px; border-radius: 7px; border: 1px solid var(--border); background: #fff; cursor: pointer; }

.decision-panel { padding: 26px 22px; position: relative; }
.decision-panel h3 { margin: 0 0 14px; }
.final-close { position: absolute; top: 14px; right: 14px; }
.fc-summary { margin-bottom: 12px; }
.compliance-note { font-size: 13px; color: var(--muted); background: #f7f9fc; border: 1px solid var(--border); border-radius: 10px; padding: 10px 12px; margin-bottom: 16px; white-space: pre-wrap; max-height: 160px; overflow-y: auto; }
.decision-actions { display: flex; flex-direction: column; gap: 10px; }
.decision-row { display: flex; gap: 8px; flex-wrap: wrap; }
.decision-row .btn { flex: 1; font-size: 12.5px; padding: 8px 6px; }
.dir-target { display: flex; gap: 16px; font-size: 13px; color: var(--muted); }

/* ---------- Modal ---------- */
.modal-overlay { position: fixed; inset: 0; background: rgba(20,26,34,.55); display: flex; align-items: center; justify-content: center; z-index: 60; padding: 20px; }
.modal-card { background: var(--surface); border-radius: 16px; padding: 26px; max-width: 400px; width: 100%; }
.modal-card h2 { margin: 0 0 8px; }
.modal-card input { margin-top: 12px; }

/* ---------- Toast ---------- */
.toast { position: fixed; bottom: 22px; left: 50%; transform: translateX(-50%); background: #1f2733; color: #fff; padding: 10px 18px; border-radius: 999px; font-size: 13px; z-index: 80; box-shadow: 0 8px 24px rgba(0,0,0,.25); }

/* ---------- Hareket azaltma tercihi ---------- */
@media (prefers-reduced-motion: reduce) {
  .ws .char, .ws .char-head, .ws .char-arm, .ws .screen, .attn,
  .cat, .cat-legs, .flow-step.active .flow-dot {
    animation: none !important;
  }
  .cat-a { left: 8%; } .cat-b { left: 70%; }
}

/* ---------- Kalıcı ajan paneli ek stilleri ---------- */
.step-done { align-self: center; font-size: 12px; color: var(--muted); background: #eef1f5; border-radius: 999px; padding: 4px 12px; margin: 4px 0; }
.cand-card.selected { border-color: var(--s-done); background: #eafaf3; }
.cand-card.clickable { cursor: pointer; }
.cand-card:not(.clickable) { cursor: default; }
.chat-image { width: 100%; min-height: 120px; border-radius: 10px; background: #0f1b2e; color: #7f97b0; display: flex; align-items: center; justify-content: center; font-size: 12px; overflow: hidden; }
.chat-image img { width: 100%; height: auto; display: block; image-rendering: auto; }

/* Aday seçim butonu */
.cand-pick { margin-top: 8px; width: 100%; padding: 7px; font-size: 13px; }

/* ---------- Kayıt panosu (mantar pano) ---------- */
.log-panel {
  position: fixed; top: 0; right: 0; height: 100%;
  width: 380px; max-width: 92vw;
  background:
    radial-gradient(circle at 30% 20%, rgba(255,255,255,.12), transparent 60%),
    repeating-linear-gradient(45deg, rgba(120,80,40,.06) 0 3px, transparent 3px 7px),
    linear-gradient(180deg, #C99A63, #B9884E);
  border-left: 4px solid #7C5A34;
  box-shadow: -8px 0 30px rgba(31,39,51,.18);
  display: flex; flex-direction: column; z-index: 45;
  animation: slideIn .2s ease;
}
.log-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 16px; background: rgba(90,64,34,.35);
  border-bottom: 2px solid #7C5A34;
}
.log-title { font-weight: 700; color: #FDF6E9; text-shadow: 0 1px 2px rgba(60,40,20,.5); }
.log-head .btn-icon { color: #FDF6E9; }
.log-body { flex: 1; overflow-y: auto; padding: 16px 14px; display: flex; flex-direction: column; gap: 10px; }
.log-empty { color: #FBF3E4; font-size: 13px; line-height: 1.5; background: rgba(90,64,34,.3); padding: 12px; border-radius: 8px; }

/* Her olay: mantar panoya iğnelenmiş küçük kağıt not */
.log-note {
  position: relative;
  background: #FEFBEF; border-radius: 3px;
  padding: 9px 12px 10px; padding-left: 62px;
  box-shadow: 1px 3px 5px rgba(60,40,20,.28);
  border: 1px solid #EDE2C4;
}
.log-note:nth-child(even) { transform: rotate(-.5deg); }
.log-note:nth-child(odd)  { transform: rotate(.4deg); }
.log-pin { position: absolute; top: 7px; left: 26px; width: 9px; height: 9px; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #ff8a8a, #c0392b); box-shadow: 0 1px 2px rgba(0,0,0,.35); }
.log-time { position: absolute; left: 8px; top: 20px; font-family: var(--mono); font-size: 11px; font-weight: 700; color: #8A6D45; }
.log-actor { font-weight: 700; font-size: 13px; }
.log-action { font-size: 13px; color: #4A3B27; line-height: 1.35; }
.log-detail { font-size: 11.5px; color: #7B6748; margin-top: 3px; }
@media (max-width: 480px) { .log-panel { width: 100%; } }

/* ---------- Ofis içi tıklanabilir objeler (Pano + Dosya dolabı) ---------- */
.office-obj { position: relative; cursor: pointer; display: flex; flex-direction: column;
  align-items: center; gap: 2px; pointer-events: auto; z-index: 4; transition: transform .12s, filter .15s; }
.office-obj:hover { transform: translateY(-3px); filter: drop-shadow(0 5px 7px rgba(60,40,20,.3)); }
.office-obj:focus-visible { outline: 2px solid #2E6FD6; outline-offset: 3px; border-radius: 4px; }
.office-obj svg { image-rendering: pixelated; shape-rendering: crispEdges; display: block; }
.obj-label { font-family: var(--mono); font-size: 9.5px; font-weight: 700; color: #5A4326;
  background: rgba(255,251,239,.85); padding: 1px 6px; border-radius: 6px; white-space: nowrap; }
.office-obj.board svg { width: 54px; }
/* Dolap: ızgaranın (z-index:2) ÜSTÜNDE dursun ki tıklanabilsin */
.floor-obj { position: absolute; z-index: 6; }
.floor-obj.cabinet { top: 40px; left: 10px; width: 36px; }
.floor-obj.cabinet svg { width: 36px; }
@media (max-width: 760px) { .floor-obj.cabinet { top: 12px; } }

/* ---------- Aktif iş çubuğu ---------- */
.active-bar {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 8px 18px; background: #FFF7E9; border-bottom: 1px solid #E7D4B8; flex-wrap: wrap;
}
.active-info { display: flex; align-items: center; gap: 9px; min-width: 0; }
.active-dot { width: 9px; height: 9px; border-radius: 50%; background: #2E6FD6; flex: none;
  box-shadow: 0 0 0 3px rgba(46,111,214,.18); }
.active-title { font-weight: 700; font-size: 13.5px; color: #3a2c1a; overflow: hidden;
  text-overflow: ellipsis; white-space: nowrap; max-width: 46vw; }
.active-status { font-size: 11px; font-weight: 700; color: #fff; padding: 2px 9px; border-radius: 999px; }
.active-actions { display: flex; gap: 7px; }
.btn.btn-sm { padding: 5px 11px; font-size: 12.5px; }
.btn.danger { color: #9A3B3B; }
.btn.danger:hover { background: #fbeaea; border-color: #e6bcbc; }
.manage-row .btn { flex: 1; font-size: 12.5px; padding: 8px 6px; }

/* ---------- Dosya dolabı paneli ---------- */
.cabinet-panel {
  position: fixed; top: 0; right: 0; height: 100%;
  width: 400px; max-width: 92vw;
  background: linear-gradient(180deg, #F4F6F9, #E8ECF1);
  border-left: 4px solid #6C7683;
  box-shadow: -8px 0 30px rgba(31,39,51,.18);
  display: flex; flex-direction: column; z-index: 46;
  animation: slideIn .2s ease;
}
.cabinet-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 16px; background: #6C7683; color: #fff;
}
.cabinet-title { font-weight: 700; }
.cabinet-head .btn-icon { color: #fff; }
.cabinet-body { flex: 1; overflow-y: auto; padding: 14px; display: flex; flex-direction: column; gap: 16px; }
.cab-empty { color: var(--muted); font-size: 13px; line-height: 1.55; padding: 16px;
  background: #fff; border-radius: 10px; border: 1px solid var(--border); }
.cab-group-h { font-weight: 700; font-size: 12.5px; margin-bottom: 8px; letter-spacing: .3px; }
.cab-count { font-weight: 700; opacity: .7; }
.cab-file { background: #fff; border: 1px solid var(--border); border-radius: 10px;
  padding: 11px 12px; margin-bottom: 8px; cursor: pointer; transition: border-color .12s, box-shadow .12s; }
.cab-file:hover { border-color: var(--primary); box-shadow: 0 3px 10px rgba(46,111,214,.12); }
.cab-file.current { border-color: #2E6FD6; background: #f5f9ff; }
.cab-file-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.cab-file-title { font-weight: 700; font-size: 13.5px; color: #2b3543; overflow: hidden;
  text-overflow: ellipsis; white-space: nowrap; }
.cab-badge { font-size: 10px; font-weight: 700; color: #fff; padding: 2px 8px; border-radius: 999px; white-space: nowrap; flex: none; }
.cab-file-sub { font-size: 12px; color: var(--muted); margin: 3px 0 6px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cab-file-meta { display: flex; align-items: center; gap: 10px; font-size: 11px; color: var(--muted); }
.cab-fc { color: #157a56; }
.cab-open { margin-left: auto; color: var(--primary); font-weight: 700; }
@media (max-width: 480px) { .cabinet-panel { width: 100%; } .active-title { max-width: 60vw; } }
