/*
 * WP-UI-1 (Şahlanış Programı, gece 0, 2026-09-14) — C01 sohbet penceresi UX.
 * Scoped: yalnız aşağıdaki üç öğe — global refactor yok, sidebar/module-shell
 * kilitlerine (gtos-customer-surface.css) dokunulmadı.
 *
 * NOT (orkestratöre): bu dosya index.html'e henüz eklenmedi — <link> satırını
 * diğer dashboard/styles/*.css bağlantılarının EN SONUNA (özellikle
 * unified.css ve gtos-module-premium.css'ten SONRA) ekleyin; aksi halde bu
 * dosyadaki yüksek-özgüllük geçersiz kılma kuralları cascade'de kaybeder.
 */

/* ----------------------------------------------------------------------
   1) "Tek giriş — sohbet" açıklama kutusu — sohbet boşken görünsün, ilk
      mesajdan sonra kalıcı yer yemesin. JS tarafı: unified-platform.js
      renderC01Messages() → #c01-single-entry-band'e
      `c01-single-entry-band--has-messages` sınıfı ekliyor/kaldırıyor.
      Not: `.c01-main--agent-room .c01-single-entry-band` zaten
      `display:none!important` (unified.css) — bu kural, agent-room moduna
      HENÜZ geçilmemiş ama mesaj olan ara durumlar için savunma amaçlıdır.
   ---------------------------------------------------------------------- */
.gtos-mp--c01.c01-customer-surface .c01-single-entry-band.c01-single-entry-band--has-messages {
  display: none;
}

/* ----------------------------------------------------------------------
   2) "Yasin ekibinizi koordine ediyor" durum kartı — varsayılan katlı tek
      satır özet + genişlet düğmesi. JS tarafı: unified-platform.js
      renderC01CustomerDelegationRail().
   ---------------------------------------------------------------------- */
.c01-customer-delegation__toggle {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  width: 100%;
  border: none;
  background: transparent;
  padding: 0;
  margin: 0;
  cursor: pointer;
  text-align: left;
  font: inherit;
  color: inherit;
}

.c01-customer-delegation__toggle:focus-visible {
  outline: 2px solid var(--gtos-teal-500);
  outline-offset: 2px;
  border-radius: 0.35rem;
}

.c01-customer-delegation__toggle .c01-customer-delegation__title {
  margin: 0;
  flex-shrink: 0;
}

.c01-customer-delegation__summary {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--gtos-slate-700);
}

html[data-theme='dark'] .c01-customer-delegation__summary {
  color: var(--gtos-slate-300);
}

.c01-customer-delegation__chevron {
  flex-shrink: 0;
  font-size: var(--gtos-text-micro);
  opacity: 0.65;
}

.c01-customer-delegation__details {
  margin-top: 0.4rem;
}

.c01-customer-delegation.is-collapsed {
  padding-bottom: 0.5rem;
}

/* ----------------------------------------------------------------------
   3) C01 sohbet penceresi tam yükseklik — ana modül çalışma alanındaki
      (Command Center dışı / modül kartı) sohbet listesi min. 55vh, iç
      scroll, mesaj balonu kesilmez. Orkestra sahnesindeki (.c01-orch__*,
      Command Center karşılama) transkript yüksekliği ayrı bir dosyada
      (c01-orchestra-welcome.css) düzeltildi — bu blok yalnız modül
      kartı (.gtos-mp--c01) yüzeyi için savunma amaçlı bir taban çizgisidir.
   ---------------------------------------------------------------------- */
#module-workspace-root:not(.hidden) .module-card[data-module='c01'] .c01-main--agent-room .chat-messages {
  min-height: 55vh;
  max-height: none;
  overflow-y: auto;
}

#module-workspace-root:not(.hidden) .module-card[data-module='c01'] .c01-main--agent-room span.c01-room-message__bubble,
#module-workspace-root:not(.hidden) .module-card[data-module='c01'] .message span {
  max-height: none;
  overflow: visible;
  white-space: pre-wrap;
}

/* ======================================================================
   WP-H3-HUD-03 — ChatThread sözleşmesi (H3 spec §4.10 C1–C10), C01 MODÜL
   ODASI yüzeyi (#chat-messages). Command Center transkripti ayrı dosyada
   (gtos-cc-hud.css) — iki yüzey aynı JS mantığını (c01-chat-thread.js)
   paylaşır, yalnız kabuk CSS'i ayrıdır.

   Bu yüzey MODÜL zemininde durur (galaksi sahnesi değil) — bu yüzden
   renkler ANLAM katmanından (--gtos-c-*) gelir ve açık/koyu temada
   GERÇEKTEN dönerler. Sabit renk yok.
   ====================================================================== */

/* --- C1/C2: thread her zaman görünür, yüksekliği kabuk belirler --- */
#module-workspace-root:not(.hidden) .module-card[data-module='c01'] #chat-messages {
  flex: 1 1 auto;
  min-height: 55vh;
  max-height: none;
  overflow-y: auto;
  overscroll-behavior: contain;
}

/* --- C3: mesaj KESİLMEZ --- */
#module-workspace-root:not(.hidden) .module-card[data-module='c01'] .gtos-chat__text {
  max-height: none;
  overflow: visible;
  -webkit-line-clamp: none;
  text-overflow: clip;
  /* Satır sonları HTML'e <br> olarak yazılıyor (formatC01ChatMessageHtml /
     formatC01PlainMessageHtml). Ata balondan MİRAS gelen `pre-wrap`, cevap
     sözleşmesi şablonundaki girintileri ekrana boşluk olarak basardı —
     bu yüzden burada açıkça `normal`a çekilir. */
  white-space: normal;
  overflow-wrap: anywhere;
}

/* --- C6: akış imleci (yalnız opacity animasyonu) --- */
#module-workspace-root:not(.hidden)
  .module-card[data-module='c01']
  .gtos-chat__text[data-streaming='true']::after {
  content: '';
  display: inline-block;
  width: 0.5rem;
  height: 1em;
  margin-left: 0.15rem;
  vertical-align: text-bottom;
  background: var(--gtos-c-action);
  animation: gtos-chat-cursor 1s steps(2, start) infinite;
}

@keyframes gtos-chat-cursor {
  to {
    opacity: 0.15;
  }
}

/* --- C6: "yeni mesaj" düğmesi --- */
/* Kaydırma kabı (#chat-messages) ile KARDEŞ olduğu için `sticky` burada
   `relative` gibi davranır; bunun yerine negatif üst kenar boşluğuyla
   thread'in son satırının üstüne bindirilir — düzeni itmez, kaymaz. */
#module-workspace-root:not(.hidden) .module-card[data-module='c01'] .gtos-chat__jump {
  position: relative;
  z-index: var(--gtos-z-sticky, 100);
  align-self: center;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin: -2.4rem auto 0.4rem;
  padding: 0.3rem 0.75rem;
  border: 1px solid var(--gtos-c-action);
  border-radius: var(--gtos-radius-pill, 999px);
  background: var(--gtos-c-surface);
  color: var(--gtos-c-action);
  font-size: var(--gtos-text-xs, 0.75rem);
  font-weight: var(--gtos-weight-semibold, 600);
  cursor: pointer;
}

#module-workspace-root:not(.hidden) .module-card[data-module='c01'] .gtos-chat__jump[hidden] {
  display: none;
}

#module-workspace-root:not(.hidden)
  .module-card[data-module='c01']
  .gtos-chat__jump:focus-visible {
  outline: 2px solid var(--gtos-c-focus);
  outline-offset: 2px;
}

/* --- C7: saat + kopyala --- */
#module-workspace-root:not(.hidden) .module-card[data-module='c01'] .gtos-chat__meta {
  display: flex;
  align-items: center;
  gap: var(--gtos-space-2, 0.5rem);
  margin-top: 0.3rem;
  font-size: var(--gtos-text-xs, 0.75rem);
  color: var(--gtos-c-text-muted);
}

#module-workspace-root:not(.hidden) .module-card[data-module='c01'] .gtos-chat__copy {
  appearance: none;
  border: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
  padding: 0.1rem 0.25rem;
  border-radius: var(--gtos-radius-xs, 0.25rem);
  opacity: 0.6;
  transition: opacity var(--gtos-duration-fast, 150ms) var(--gtos-ease-standard, ease);
}

#module-workspace-root:not(.hidden) .module-card[data-module='c01'] .gtos-chat__copy:hover,
#module-workspace-root:not(.hidden)
  .module-card[data-module='c01']
  .gtos-chat__copy:focus-visible {
  opacity: 1;
}

#module-workspace-root:not(.hidden)
  .module-card[data-module='c01']
  .gtos-chat__copy:focus-visible {
  outline: 2px solid var(--gtos-c-focus);
  outline-offset: 2px;
}

#module-workspace-root:not(.hidden)
  .module-card[data-module='c01']
  .gtos-chat__copy[data-copied] {
  color: var(--gtos-c-success);
  opacity: 1;
}

/* --- C5: araç çağrıları, VARSAYILAN KAPALI --- */
#module-workspace-root:not(.hidden) .module-card[data-module='c01'] .gtos-chat__tools {
  margin-bottom: 0.4rem;
  border: 1px solid var(--gtos-c-border);
  border-radius: var(--gtos-radius-md, 0.5rem);
  background: var(--gtos-c-surface-2);
  font-size: var(--gtos-text-xs, 0.75rem);
}

#module-workspace-root:not(.hidden) .module-card[data-module='c01'] .gtos-chat__tools-summary {
  display: flex;
  align-items: center;
  gap: var(--gtos-space-2, 0.5rem);
  padding: 0.3rem 0.55rem;
  cursor: pointer;
  color: var(--gtos-c-text-muted);
  list-style: none;
}

#module-workspace-root:not(.hidden)
  .module-card[data-module='c01']
  .gtos-chat__tools-summary::-webkit-details-marker {
  display: none;
}

#module-workspace-root:not(.hidden)
  .module-card[data-module='c01']
  .gtos-chat__tools-summary::before {
  content: '▸';
  display: inline-block;
  color: var(--gtos-c-accent);
  transition: transform var(--gtos-duration-fast, 150ms) var(--gtos-ease-standard, ease);
}

#module-workspace-root:not(.hidden)
  .module-card[data-module='c01']
  .gtos-chat__tools[open]
  .gtos-chat__tools-summary::before {
  transform: rotate(90deg);
}

#module-workspace-root:not(.hidden)
  .module-card[data-module='c01']
  .gtos-chat__tools-summary:focus-visible {
  outline: 2px solid var(--gtos-c-focus);
  outline-offset: 2px;
}

#module-workspace-root:not(.hidden) .module-card[data-module='c01'] .gtos-chat__tools-count {
  color: var(--gtos-c-text);
  font-weight: var(--gtos-weight-semibold, 600);
}

#module-workspace-root:not(.hidden) .module-card[data-module='c01'] .gtos-chat__tool-list {
  margin: 0;
  padding: 0 0.55rem 0.45rem 0.55rem;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

#module-workspace-root:not(.hidden) .module-card[data-module='c01'] .gtos-chat__tool {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: var(--gtos-space-2, 0.5rem);
  color: var(--gtos-c-text-muted);
}

#module-workspace-root:not(.hidden) .module-card[data-module='c01'] .gtos-chat__tool-name {
  color: var(--gtos-c-text);
  overflow-wrap: anywhere;
}

#module-workspace-root:not(.hidden)
  .module-card[data-module='c01']
  .gtos-chat__tool[data-state='ok']
  .gtos-chat__tool-status {
  color: var(--gtos-c-success);
}

#module-workspace-root:not(.hidden)
  .module-card[data-module='c01']
  .gtos-chat__tool[data-state='timeout']
  .gtos-chat__tool-status,
#module-workspace-root:not(.hidden)
  .module-card[data-module='c01']
  .gtos-chat__tool[data-state='pending']
  .gtos-chat__tool-status,
#module-workspace-root:not(.hidden)
  .module-card[data-module='c01']
  .gtos-chat__tool[data-state='approval_pending']
  .gtos-chat__tool-status {
  color: var(--gtos-c-warn);
}

#module-workspace-root:not(.hidden)
  .module-card[data-module='c01']
  .gtos-chat__tool[data-state='fail']
  .gtos-chat__tool-status,
#module-workspace-root:not(.hidden)
  .module-card[data-module='c01']
  .gtos-chat__tool[data-state='error']
  .gtos-chat__tool-status {
  color: var(--gtos-c-danger);
}

/* --- Cevap sözleşmesi (Karar / Gerekçe / Belgeler / Kaynak / Sonraki adım) --- */
#module-workspace-root:not(.hidden) .module-card[data-module='c01'] .gtos-chat__answer {
  display: flex;
  flex-direction: column;
  gap: var(--gtos-space-2, 0.5rem);
}

#module-workspace-root:not(.hidden) .module-card[data-module='c01'] .gtos-chat__answer-part {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

#module-workspace-root:not(.hidden) .module-card[data-module='c01'] .gtos-chat__answer-label {
  align-self: flex-start;
  font-size: var(--gtos-text-xs, 0.75rem);
  font-weight: var(--gtos-weight-semibold, 600);
  letter-spacing: var(--gtos-tracking-wide, 0.04em);
  text-transform: uppercase;
  color: var(--gtos-c-accent);
}

#module-workspace-root:not(.hidden)
  .module-card[data-module='c01']
  .gtos-chat__answer-part[data-answer-part='decision']
  .gtos-chat__answer-body {
  font-weight: var(--gtos-weight-medium, 500);
}

#module-workspace-root:not(.hidden) .module-card[data-module='c01'] .gtos-chat__answer-link {
  align-self: flex-start;
  appearance: none;
  cursor: pointer;
  margin-top: 0.15rem;
  padding: 0.25rem 0.6rem;
  border: 1px solid var(--gtos-c-accent);
  border-radius: var(--gtos-radius-pill, 999px);
  background: transparent;
  color: var(--gtos-c-accent);
  font-size: var(--gtos-text-xs, 0.75rem);
  font-weight: var(--gtos-weight-semibold, 600);
  transition: transform var(--gtos-duration-fast, 150ms) var(--gtos-ease-out, ease);
}

#module-workspace-root:not(.hidden)
  .module-card[data-module='c01']
  .gtos-chat__answer-link:hover {
  transform: translateY(-1px);
}

#module-workspace-root:not(.hidden)
  .module-card[data-module='c01']
  .gtos-chat__answer-link:focus-visible {
  outline: 2px solid var(--gtos-c-focus);
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  #module-workspace-root:not(.hidden)
    .module-card[data-module='c01']
    .gtos-chat__text[data-streaming='true']::after {
    animation: none;
  }

  #module-workspace-root:not(.hidden) .module-card[data-module='c01'] .gtos-chat__answer-link,
  #module-workspace-root:not(.hidden) .module-card[data-module='c01'] .gtos-chat__copy,
  #module-workspace-root:not(.hidden)
    .module-card[data-module='c01']
    .gtos-chat__tools-summary::before {
    transition: none;
  }

  #module-workspace-root:not(.hidden)
    .module-card[data-module='c01']
    .gtos-chat__answer-link:hover {
    transform: none;
  }
}

/* ----------------------------------------------------------------------
   WP-H3-HUD-04 (HUD-03 C10 eksiği) — C01 odası composer'ı `<input>` yerine
   `<textarea rows="1">`. `unified.css` KİLİTLİ olduğu ve oradaki kurallar
   `.chat-input input` seçicisine bağlı olduğu için textarea eşdeğerleri
   burada, aynı ölçülerle yeniden tanımlanır (scoped: yalnız `#chat-input`).
   Sabit renk yok — tema token'ları kullanılır, açık/koyu ikisinde de okunur.
   JS tarafı: unified-platform.js `autoGrowC01Composer()` + Enter/Shift+Enter.
   ---------------------------------------------------------------------- */
.chat-input textarea#chat-input {
  flex: 1;
  min-width: 0;
  min-height: 2.45rem;
  max-height: 11rem;
  padding: 0.6rem 0.75rem;
  border: 1px solid var(--gtos-c-border-input, var(--gtos-c-border));
  border-radius: var(--gtos-radius-md, 0.6rem);
  background: var(--gtos-c-surface-2);
  color: var(--gtos-c-text);
  font: inherit;
  font-size: 0.92rem;
  line-height: 1.45;
  /* Otomatik büyüme JS'te; köşeden elle sürükleme kapalı (kabuk kayıyordu). */
  resize: none;
  overflow-y: hidden;
}

#module-workspace-root:not(.hidden)
  .module-card[data-module='c01']
  .chat-input
  textarea#chat-input {
  padding-inline: 0.72rem;
}

#module-workspace-root:not(.hidden)
  .module-card[data-module='c01']
  .c01-main--agent-room
  textarea#chat-input {
  font-size: 1rem;
  min-height: 2.5rem;
}

.chat-input textarea#chat-input:focus {
  outline: none;
  border-color: var(--gtos-c-focus, var(--gtos-teal-500));
  box-shadow: var(--gtos-shadow-focus, 0 0 0 3px var(--gtos-c-focus-ring));
  background: var(--gtos-c-surface);
}

.chat-input textarea#chat-input::placeholder {
  color: var(--gtos-c-text-muted);
  opacity: 1;
}

@media (max-width: 720px) {
  /* Mobil dokunma hedefi (unified.css `.chat-input input` 44px kuralının
     textarea karşılığı). */
  .module-card[data-module='c01'] .chat-input textarea#chat-input {
    min-height: 44px;
  }
}

/* WP-C01-CHAT-ACTION-B08-INVOICE-01 (Sohbet Ekleri Adım 7/B): "faturayı oku → B08'e kaydet" onay kartı.
   Yalnız `.c01-action-card` kapsamı (global refactor yok).
   WP-C01-CHAT-ATTACH-UI-01 (12.10): renkler ANLAM katmanına (--gtos-c-*) taşındı — eski `--gtos-danger` token'ı
   repoda TANIMLI DEĞİLDİ, hata listesi koyu temada da açık tema kırmızısı ham yedeğe düşüyordu (ölçüm: 2,78:1). Ham renk yedeği yok. */
.c01-action-card {
  box-sizing: border-box;
  max-width: 100%;
  margin: 0.6rem 0 0.2rem;
  padding: 0.75rem 0.85rem;
  border: 1px solid var(--gtos-c-border);
  border-radius: 0.75rem;
  background: var(--gtos-c-surface-2);
  color: var(--gtos-c-text);
  white-space: normal;
}
.c01-action-card__title {
  margin: 0 0 0.3rem;
  font-size: 0.95rem;
  font-weight: 600;
}
.c01-action-card__intro,
.c01-action-card__untrusted,
.c01-action-card__dup {
  margin: 0 0 0.35rem;
  font-size: 0.82rem;
  line-height: 1.4;
}
.c01-action-card__untrusted {
  color: var(--gtos-c-text-muted);
}
.c01-action-card__dup,
.c01-action-card__errors {
  color: var(--gtos-c-danger);
}
.c01-action-card__warnings {
  color: var(--gtos-c-warn);
}
.c01-action-card__errors,
.c01-action-card__warnings {
  margin: 0 0 0.4rem;
  padding-left: 1.1rem;
  font-size: 0.8rem;
}
.c01-action-card__grid {
  display: grid;
  /* 375 px'te kart ~150 px; sabit 11rem (176 px) kolon kartı taşırıyordu → min(11rem, 100%). */
  grid-template-columns: repeat(auto-fill, minmax(min(11rem, 100%), 1fr));
  gap: 0.45rem 0.6rem;
}
.c01-action-card__field {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  min-width: 0;
}
.c01-action-card__field label {
  font-size: 0.75rem;
  color: var(--gtos-c-text-muted);
}
.c01-action-card__field input,
.c01-action-card__field select {
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
  min-height: 36px;
  padding: 0.3rem 0.45rem;
  border: 1px solid var(--gtos-c-border-input);
  border-radius: 0.45rem;
  background: var(--gtos-c-surface);
  color: var(--gtos-c-text);
  font: inherit;
  font-size: 0.85rem;
}
.c01-action-card__field input:focus-visible,
.c01-action-card__field select:focus-visible,
.c01-action-card__check input:focus-visible {
  outline: 2px solid var(--gtos-c-focus);
  outline-offset: 1px;
}
.c01-action-card__field input[aria-invalid='true'],
.c01-action-card__field select[aria-invalid='true'] {
  border-color: var(--gtos-c-danger);
  box-shadow: 0 0 0 1px var(--gtos-c-danger);
}
.c01-action-card__lines {
  max-width: 100%;
  margin-top: 0.5rem;
  overflow-x: auto;
  overscroll-behavior-x: contain;
}
.c01-action-card__lines table {
  width: 100%;
  /* dar ekranda sütunlar harf harf kırılmasın: tablo kendi kabında yatay kayar */
  min-width: 30rem;
  border-collapse: collapse;
  font-size: 0.78rem;
}
.c01-action-card__lines caption {
  text-align: left;
  font-size: 0.75rem;
  color: var(--gtos-c-text-muted);
  padding-bottom: 0.2rem;
}
.c01-action-card__lines th,
.c01-action-card__lines td {
  padding: 0.2rem 0.35rem;
  border-bottom: 1px solid var(--gtos-c-border);
  text-align: left;
  vertical-align: top;
}
.c01-action-card__lines th:not(:first-child),
.c01-action-card__lines td:not(:first-child) {
  white-space: nowrap;
}
.c01-action-card__check {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  min-height: 2rem;
  font-size: 0.8rem;
  margin-bottom: 0.25rem;
}
.c01-action-card__check input {
  width: 1.1rem;
  height: 1.1rem;
}
.c01-action-card__status {
  margin: 0.5rem 0 0.35rem;
  font-size: 0.82rem;
  font-weight: 600;
}
.c01-action-card__status:empty {
  display: none;
}
.c01-action-card__buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}
.c01-action-card__buttons .detail-btn {
  min-height: 40px;
}
.c01-action-card__buttons .detail-btn[disabled] {
  opacity: 0.6;
  cursor: progress;
}

/* ======================================================================
   WP-C01-CHAT-ATTACH-UI-01 — Sohbet ekleri arayüz paketi (12.10.2026):
   indirme/kopyala düğmeleri, ek/belge çipleri, ses kotası (mobil), onay kartı
   (sohbet balonu içinde), keşfedilebilirlik ipucu + Belgelerim paneli.
   Ölçüm: 375 px ve 1280 px, açık + koyu tema (headless Chromium, index.html'in
   gerçek CSS zinciri). Yalnız C01 modül kartı + kendi sınıfları; renkler
   ANLAM katmanından (--gtos-c-*), ham renk yok. Sidebar / modül kabuğu
   kilit dosyalarına (gtos-customer-surface.css) dokunulmadı.
   ====================================================================== */

/* --- Mesaj meta satırı: `.message span` / `.message.agent span` balon kuralları
   (unified.css, gtos-module-premium.css) indirme grubunu ve düğme etiketlerini ayrı
   balon gibi çerçeveliyordu; balondan miras `pre-wrap` şablon boşluklarını boş satıra
   çeviriyordu (375 px'te meta satırı 210 px, saat "2 3 : 3 2" diye dikey kırılıyordu). */
html #module-workspace-root:not(.hidden) .module-card[data-module='c01'] .gtos-mp--c01 .message .gtos-chat__meta,
html #module-workspace-root:not(.hidden) .module-card[data-module='c01'] .gtos-mp--c01 .message .c01-action-card {
  white-space: normal;
}

html #module-workspace-root:not(.hidden) .module-card[data-module='c01'] .gtos-mp--c01 .message .gtos-chat__meta {
  flex-wrap: wrap;
  row-gap: 0.3rem;
}

html #module-workspace-root:not(.hidden) .module-card[data-module='c01'] .gtos-mp--c01 .message.agent .gtos-chat__meta span,
html #module-workspace-root:not(.hidden) .module-card[data-module='c01'] .gtos-mp--c01 .message.user .gtos-chat__meta span {
  min-width: 0;
  max-width: none;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: none;
  box-shadow: none;
  color: inherit;
  font-size: inherit;
  line-height: inherit;
}

/* --- Kopyala + indir: opaklık 0,6 kaldırıldı (açık temada kopyala 2,59:1 idi);
   metin rengi --gtos-c-text-muted (yüzeyde açık 6,07 / koyu 7,4). */
html #module-workspace-root:not(.hidden) .module-card[data-module='c01'] .gtos-mp--c01 .message .gtos-chat__copy {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.3rem;
  min-width: 1.75rem;
  min-height: 1.75rem;
  opacity: 1;
  color: var(--gtos-c-text-muted);
}

html #module-workspace-root:not(.hidden) .module-card[data-module='c01'] .gtos-mp--c01 .message .gtos-chat__copy:hover,
html #module-workspace-root:not(.hidden) .module-card[data-module='c01'] .gtos-mp--c01 .message .gtos-chat__copy:focus-visible {
  color: var(--gtos-c-text);
}

html #module-workspace-root:not(.hidden) .module-card[data-module='c01'] .gtos-mp--c01 .message .gtos-chat__copy[data-copied] {
  color: var(--gtos-c-success);
}

html #module-workspace-root:not(.hidden) .module-card[data-module='c01'] .gtos-mp--c01 .message .gtos-chat__export {
  padding: 0.2rem 0.6rem;
  border: 1px solid var(--gtos-c-border-input);
  border-radius: var(--gtos-radius-pill, 999px);
  font-size: var(--gtos-text-xs, 0.75rem);
  font-weight: var(--gtos-weight-semibold, 600);
  white-space: nowrap;
}

/* --- Ek / belge çipleri --- */
html #module-workspace-root:not(.hidden) .module-card[data-module='c01'] .gtos-mp--c01 .c01-attachment-chip {
  max-width: 100%;
  min-width: 0;
}

html #module-workspace-root:not(.hidden) .module-card[data-module='c01'] .gtos-mp--c01 .c01-attachment-chip-label {
  min-width: 0;
  overflow-wrap: anywhere;
}

html #module-workspace-root:not(.hidden) .module-card[data-module='c01'] .gtos-mp--c01 .c01-attachment-chip.is-failed {
  border-color: var(--gtos-c-danger);
}

html #module-workspace-root:not(.hidden) .module-card[data-module='c01'] .gtos-mp--c01 .c01-attachment-chip.is-failed .c01-attachment-chip-label {
  color: var(--gtos-c-danger);
}

html #module-workspace-root:not(.hidden) .module-card[data-module='c01'] .gtos-mp--c01 .c01-attachment-chip-remove {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  width: auto;
  height: auto;
  min-width: 1.5rem;
  min-height: 1.5rem;
  border-radius: var(--gtos-radius-pill, 999px);
}

html #module-workspace-root:not(.hidden) .module-card[data-module='c01'] .gtos-mp--c01 .c01-attachment-chip-remove:focus-visible {
  outline: 2px solid var(--gtos-c-focus);
  outline-offset: 1px;
}

/* KVKK saklama notu: gövde metni boyutundaydı (16 px); küçük, soluk not + "Belgelerim" girişi. */
html #module-workspace-root:not(.hidden) .module-card[data-module='c01'] .gtos-mp--c01 .c01-attachment-note {
  flex: 1 0 100%;
  font-size: var(--gtos-text-xs, 0.75rem);
  line-height: 1.45;
  color: var(--gtos-c-text-muted);
}

html #module-workspace-root:not(.hidden) .module-card[data-module='c01'] .gtos-mp--c01 .c01-attachment-note__docs {
  appearance: none;
  display: inline-flex;
  align-items: center;
  min-height: 1.5rem;
  margin-left: 0.2rem;
  padding: 0 0.2rem;
  border: 0;
  border-radius: var(--gtos-radius-xs, 0.25rem);
  background: none;
  color: var(--gtos-c-action);
  font: inherit;
  font-weight: var(--gtos-weight-semibold, 600);
  text-decoration: underline;
  cursor: pointer;
}

html #module-workspace-root:not(.hidden) .module-card[data-module='c01'] .gtos-mp--c01 .c01-attachment-note__docs:focus-visible {
  outline: 2px solid var(--gtos-c-focus);
  outline-offset: 1px;
}

/* --- Onay kartı balon içinde: başlık/not/hata renkleri balon `span`/başlık kurallarına yenik düşüyordu
   (başlık 11 px büyük harf, mükerrer uyarısı gri). Dar ekranda kartı taşıyan balon tam genişlik. */
html #module-workspace-root:not(.hidden) .module-card[data-module='c01'] .gtos-mp--c01 .message .c01-action-card .c01-action-card__title {
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: normal;
  text-transform: none;
  color: var(--gtos-c-text);
}

html #module-workspace-root:not(.hidden) .module-card[data-module='c01'] .gtos-mp--c01 .message .c01-action-card .c01-action-card__intro {
  font-size: 0.82rem;
  color: var(--gtos-c-text);
}

html #module-workspace-root:not(.hidden) .module-card[data-module='c01'] .gtos-mp--c01 .message .c01-action-card .c01-action-card__untrusted {
  font-size: 0.82rem;
  color: var(--gtos-c-text-muted);
  opacity: 1;
}

html #module-workspace-root:not(.hidden) .module-card[data-module='c01'] .gtos-mp--c01 .message .c01-action-card .c01-action-card__dup,
html #module-workspace-root:not(.hidden) .module-card[data-module='c01'] .gtos-mp--c01 .message .c01-action-card .c01-action-card__errors {
  font-size: 0.82rem;
  color: var(--gtos-c-danger);
}

html #module-workspace-root:not(.hidden) .module-card[data-module='c01'] .gtos-mp--c01 .message .c01-action-card .c01-action-card__warnings {
  font-size: 0.8rem;
  color: var(--gtos-c-warn);
}

html #module-workspace-root:not(.hidden) .module-card[data-module='c01'] .gtos-mp--c01 .message .c01-action-card .c01-action-card__field label {
  color: var(--gtos-c-text-muted);
  opacity: 1;
}

html #module-workspace-root:not(.hidden) .module-card[data-module='c01'] .gtos-mp--c01 .message .c01-action-card .c01-action-card__lines caption {
  color: var(--gtos-c-text-muted);
  opacity: 1;
}

/* Genel form kuralı (`#maytras-app input …`, gtos-design-grammar.css) kart alanlarının sınırını açık temada
   2,93:1'e çekiyordu (WCAG 1.4.11 eşiği 3:1) → form sınırı token'ı (açık 4,76 / koyu 4,32). */
html #module-workspace-root:not(.hidden) .module-card[data-module='c01'] .gtos-mp--c01 .message .c01-action-card .c01-action-card__field input,
html #module-workspace-root:not(.hidden) .module-card[data-module='c01'] .gtos-mp--c01 .message .c01-action-card .c01-action-card__field select {
  border-color: var(--gtos-c-border-input);
  background: var(--gtos-c-surface);
  color: var(--gtos-c-text);
}

html #module-workspace-root:not(.hidden) .module-card[data-module='c01'] .gtos-mp--c01 .message .c01-action-card .c01-action-card__field input[aria-invalid='true'],
html #module-workspace-root:not(.hidden) .module-card[data-module='c01'] .gtos-mp--c01 .message .c01-action-card .c01-action-card__field select[aria-invalid='true'] {
  border-color: var(--gtos-c-danger);
}

@media (max-width: 560px) {
  /* #chat-messages bir grid; ızgara öğesinin min-content'i (kalem tablosu) satırı ekranın dışına itmesin. */
  html #module-workspace-root:not(.hidden) .module-card[data-module='c01'] .gtos-mp--c01 .message:has(.c01-action-card) {
    justify-self: stretch;
    width: 100%;
    min-width: 0;
  }

  html #module-workspace-root:not(.hidden) .module-card[data-module='c01'] .gtos-mp--c01 .c01-room-message__col:has(.c01-action-card) {
    flex: 1 1 auto;
    max-width: 100%;
  }

  /* 375 px'te sohbet alanı ~236 px; form kartı için avatar (38 px + boşluk) yer açar — uzman adı satırı kalır. */
  html #module-workspace-root:not(.hidden) .module-card[data-module='c01'] .gtos-mp--c01 .message:has(.c01-action-card) .c01-room-message__avatar {
    display: none;
  }

  html #module-workspace-root:not(.hidden) .module-card[data-module='c01'] .gtos-mp--c01 span.c01-room-message__bubble:has(.c01-action-card) {
    padding-inline: 0.6rem;
  }

  html #module-workspace-root:not(.hidden) .module-card[data-module='c01'] .gtos-mp--c01 .message .c01-action-card {
    padding: 0.6rem 0.55rem;
  }
}

/* --- Keşfedilebilirlik ipucu + Belgelerim çubuğu (sohbet kutusunun hemen altı) --- */
html #module-workspace-root:not(.hidden) .module-card[data-module='c01'] .gtos-mp--c01 .c01-feature-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.3rem 0.5rem;
  margin: 0.4rem 0 0;
  padding: 0.35rem 0.55rem;
  border: 1px solid var(--gtos-c-border);
  border-radius: var(--gtos-radius-md, 0.5rem);
  background: var(--gtos-c-surface-2);
  color: var(--gtos-c-text-muted);
  font-size: var(--gtos-text-xs, 0.75rem);
  line-height: 1.45;
}

html #module-workspace-root:not(.hidden) .module-card[data-module='c01'] .gtos-mp--c01 .c01-feature-bar.c01-feature-bar--docs-only {
  justify-content: flex-end;
  padding: 0;
  border: 0;
  background: none;
}

html #module-workspace-root:not(.hidden) .module-card[data-module='c01'] .gtos-mp--c01 .c01-feature-bar__text {
  flex: 1 1 16rem;
  min-width: 0;
  margin: 0;
  font-size: var(--gtos-text-xs, 0.75rem);
  line-height: 1.45;
  color: var(--gtos-c-text-muted);
}

html #module-workspace-root:not(.hidden) .module-card[data-module='c01'] .gtos-mp--c01 .c01-feature-bar__text strong {
  color: var(--gtos-c-text);
  font-weight: var(--gtos-weight-semibold, 600);
}

html #module-workspace-root:not(.hidden) .module-card[data-module='c01'] .gtos-mp--c01 .c01-feature-bar__text .fa-lightbulb {
  color: var(--gtos-c-accent);
}

html #module-workspace-root:not(.hidden) .module-card[data-module='c01'] .gtos-mp--c01 .c01-feature-bar__docs,
html #module-workspace-root:not(.hidden) .module-card[data-module='c01'] .gtos-mp--c01 .c01-feature-bar__dismiss {
  appearance: none;
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  min-width: 1.75rem;
  min-height: 1.75rem;
  border-radius: var(--gtos-radius-pill, 999px);
  font: inherit;
  cursor: pointer;
}

html #module-workspace-root:not(.hidden) .module-card[data-module='c01'] .gtos-mp--c01 .c01-feature-bar__docs {
  padding: 0.15rem 0.65rem;
  border: 1px solid var(--gtos-c-border-input);
  background: var(--gtos-c-surface);
  color: var(--gtos-c-action);
  font-weight: var(--gtos-weight-semibold, 600);
}

html #module-workspace-root:not(.hidden) .module-card[data-module='c01'] .gtos-mp--c01 .c01-feature-bar__dismiss {
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--gtos-c-text-muted);
}

html #module-workspace-root:not(.hidden) .module-card[data-module='c01'] .gtos-mp--c01 .c01-feature-bar__dismiss:hover {
  color: var(--gtos-c-text);
}

html #module-workspace-root:not(.hidden) .module-card[data-module='c01'] .gtos-mp--c01 .c01-feature-bar__docs:focus-visible,
html #module-workspace-root:not(.hidden) .module-card[data-module='c01'] .gtos-mp--c01 .c01-feature-bar__dismiss:focus-visible {
  outline: 2px solid var(--gtos-c-focus);
  outline-offset: 2px;
}

/* --- Dokunmatik / dar ekran: dokunma hedefleri ≥ 44 px (WCAG 2.5.5); çip "kaldır" düğmesi
   negatif kenar boşluğuyla çipi şişirmeden büyür. Onay kartı alanları 16 px (iOS yakınlaştırmasın). --- */
@media (max-width: 720px), (pointer: coarse) {
  html #module-workspace-root:not(.hidden) .module-card[data-module='c01'] .gtos-mp--c01 .message .gtos-chat__copy,
  html #module-workspace-root:not(.hidden) .module-card[data-module='c01'] .gtos-mp--c01 .c01-feature-bar__docs,
  html #module-workspace-root:not(.hidden) .module-card[data-module='c01'] .gtos-mp--c01 .c01-feature-bar__dismiss,
  html #module-workspace-root:not(.hidden) .module-card[data-module='c01'] .gtos-mp--c01 .c01-attachment-note__docs {
    min-width: 2.75rem;
    min-height: 2.75rem;
  }

  html #module-workspace-root:not(.hidden) .module-card[data-module='c01'] .gtos-mp--c01 .c01-attachment-chip-remove {
    min-width: 2.75rem;
    min-height: 2.75rem;
    margin: -0.6rem -0.5rem -0.6rem -0.25rem;
  }

  html #module-workspace-root:not(.hidden) .module-card[data-module='c01'] .gtos-mp--c01 .message .c01-action-card .c01-action-card__field input,
  html #module-workspace-root:not(.hidden) .module-card[data-module='c01'] .gtos-mp--c01 .message .c01-action-card .c01-action-card__field select {
    min-height: 2.75rem;
    font-size: 1rem;
  }

  html #module-workspace-root:not(.hidden) .module-card[data-module='c01'] .gtos-mp--c01 .message .c01-action-card .c01-action-card__check,
  html #module-workspace-root:not(.hidden) .module-card[data-module='c01'] .gtos-mp--c01 .message .c01-action-card .c01-action-card__buttons .detail-btn {
    min-height: 2.75rem;
  }
}

/* --- Ses kotası (dar ekran): c01-voice.css ≤640 px'te durum yazılarını gizliyor; bu yüzden kota bayrakları
   açıkken bile "kalan karakter / kota doldu" mobilde HİÇ görünmüyordu. Yalnız kota metni varken
   (data-quota-visible="1") ses yuvası ikinci satıra iner, metin sarar; kota kapalıyken düzen birebir eski. */
@media (max-width: 640px) {
  html #module-workspace-root:not(.hidden) .module-card[data-module='c01'] .gtos-mp--c01 .chat-input:has(.c01-voice-dock__quota[data-quota-visible='1']) {
    flex-wrap: wrap;
    row-gap: 0.35rem;
  }

  html #module-workspace-root:not(.hidden) .module-card[data-module='c01'] .gtos-mp--c01 .chat-input:has(.c01-voice-dock__quota[data-quota-visible='1']) textarea#chat-input {
    flex: 1 1 0;
  }

  html #module-workspace-root:not(.hidden) .module-card[data-module='c01'] .gtos-mp--c01 .chat-input:has(.c01-voice-dock__quota[data-quota-visible='1']) .c01-voice-dock {
    order: 20;
    flex: 1 0 100%;
    justify-content: flex-end;
  }

  html #module-workspace-root:not(.hidden) .module-card[data-module='c01'] .gtos-mp--c01 .c01-voice-dock__quota[data-quota-visible='1'] {
    display: block;
    order: -1;
    flex: 1 1 auto;
    min-width: 0;
    font-size: var(--gtos-text-xs, 0.75rem);
    line-height: 1.3;
    white-space: normal;
    color: var(--gtos-c-text-muted);
  }
}

/* --- Belgelerim paneli (<dialog>, body'ye eklenir → kendi sınıfıyla kapsamlı) --- */
.c01-docs-panel {
  box-sizing: border-box;
  width: min(36rem, calc(100vw - 1.5rem));
  max-width: none;
  max-height: min(85vh, 44rem);
  padding: 1rem 1.1rem;
  border: 1px solid var(--gtos-c-border-input);
  border-radius: 1rem;
  background: var(--gtos-c-surface);
  color: var(--gtos-c-text);
  box-shadow: var(--gtos-c-elev-2);
  overflow: auto;
  overscroll-behavior: contain;
}

.c01-docs-panel[open] {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.c01-docs-panel::backdrop {
  background: color-mix(in srgb, var(--gtos-slate-900) 55%, transparent);
}

.c01-docs-panel__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.c01-docs-panel__title {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--gtos-c-text);
}

.c01-docs-panel__intro,
.c01-docs-panel__state {
  margin: 0;
  font-size: 0.82rem;
  line-height: 1.45;
  color: var(--gtos-c-text-muted);
}

.c01-docs-panel__state--error {
  color: var(--gtos-c-danger);
}

.c01-docs-panel__list {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.c01-docs-panel__item {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.55rem 0.65rem;
  border: 1px solid var(--gtos-c-border);
  border-radius: 0.6rem;
  background: var(--gtos-c-surface-2);
}

.c01-docs-panel__info {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  gap: 0.1rem;
  min-width: 0;
}

.c01-docs-panel__name {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--gtos-c-text);
  overflow-wrap: anywhere;
}

.c01-docs-panel__meta {
  font-size: 0.75rem;
  color: var(--gtos-c-text-muted);
}

.c01-docs-panel__close,
.c01-docs-panel__delete {
  appearance: none;
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  gap: 0.3rem;
  min-width: 2.75rem;
  min-height: 2.75rem;
  border-radius: var(--gtos-radius-pill, 999px);
  font: inherit;
  cursor: pointer;
}

.c01-docs-panel__close {
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--gtos-c-text-muted);
}

.c01-docs-panel__delete {
  padding: 0 0.75rem;
  border: 1px solid var(--gtos-c-border-input);
  background: var(--gtos-c-surface);
  color: var(--gtos-c-danger);
  font-size: 0.8rem;
  font-weight: 600;
}

.c01-docs-panel__close:hover {
  color: var(--gtos-c-text);
}

.c01-docs-panel__delete:hover {
  border-color: var(--gtos-c-danger);
}

.c01-docs-panel__delete[disabled] {
  opacity: 0.6;
  cursor: not-allowed;
}

.c01-docs-panel__title:focus-visible,
.c01-docs-panel__close:focus-visible,
.c01-docs-panel__delete:focus-visible,
.c01-docs-panel .detail-btn:focus-visible {
  outline: 2px solid var(--gtos-c-focus);
  outline-offset: 2px;
}

.c01-docs-panel__status {
  margin: 0;
  font-size: 0.8rem;
  color: var(--gtos-c-text);
}

.c01-docs-panel__status:empty {
  display: none;
}

.c01-docs-panel__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.5rem;
}

.c01-docs-panel .detail-btn {
  min-height: 2.75rem;
}

.c01-docs-panel__confirm {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding: 0.6rem 0.7rem;
  border: 1px solid var(--gtos-c-danger);
  border-radius: 0.6rem;
  background: var(--gtos-c-danger-soft);
}

.c01-docs-panel__confirm-text {
  margin: 0;
  font-size: 0.85rem;
  line-height: 1.45;
  color: var(--gtos-c-text);
}

@media (max-width: 480px) {
  .c01-docs-panel {
    width: calc(100vw - 1rem);
    max-height: 90vh;
    padding: 0.8rem;
  }

  .c01-docs-panel__item {
    flex-wrap: wrap;
  }

  .c01-docs-panel__delete {
    margin-left: auto;
  }
}

@media (prefers-reduced-motion: reduce) {
  .c01-docs-panel,
  .c01-docs-panel::backdrop {
    transition: none;
    animation: none;
  }
}
