/* ==========================================================================
   PRODAINE (pp.101006.01) — SANAL KLİNİK ASİSTAN & ZAHMETSİZ SESLİ ANAMNEZ UX
   Tasarım Felsefesi: "Hekim Hastasına Odaklanır, Sanal Asistan Notu Tutar"
   Sıfır gereksiz buton, sıfır karmaşık form kutusu, tek dokunuşla kolay kontrol.
   ========================================================================== */

:root,
html[data-theme="light"] {
  --bg-canvas: #f3f6fb;
  --bg-surface: #ffffff;
  --bg-surface-soft: #f8fafd;
  --bg-surface-hover: #f0f5ff;
  --bg-header: rgba(255, 255, 255, 0.92);
  --bg-backdrop: rgba(15, 23, 42, 0.42);
  --surface-card: #ffffff;
  --surface-muted: #f8fafd;
  --border-subtle: #e5edf7;

  --text-ink: #0b1536;
  --text-body: #1e293b;
  --text-secondary: #475569;
  --text-muted: #64748b;
  --text-faint: #94a3b8;

  --border-light: #e5edf7;
  --border-mid: #d3dff0;
  --border-focus: #005cff;

  --brand-crimson: #e11d48;
  --brand-blue: #005cff;
  --brand-blue-hover: #004ad1;
  --brand-blue-soft: #eef4ff;
  --brand-teal: #0d9488;

  --emerald-bg: #ecfdf5;
  --emerald-text: #047857;
  --emerald-border: #a7f3d0;
  --emerald-solid: #059669;

  --amber-bg: #fffbeb;
  --amber-text: #b45309;
  --amber-border: #fde68a;

  --crimson-bg: #fff1f2;
  --crimson-text: #be123c;
  --crimson-border: #fecdd3;

  --hbys-bg: #f1f5f9;
  --hbys-text: #475569;

  --shadow-card: 0 4px 20px rgba(11, 21, 54, 0.04), 0 1px 3px rgba(11, 21, 54, 0.03);
  --shadow-sheet: 0 10px 34px rgba(11, 21, 54, 0.05), 0 1px 4px rgba(11, 21, 54, 0.03);
  --shadow-float: 0 18px 44px rgba(11, 21, 54, 0.14);

  --radius-xs: 6px;
  --radius-sm: 10px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-pill: 999px;

  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Segoe UI', Roboto, sans-serif;
}

html[data-theme="dark"] {
  --bg-canvas: #0b1120;
  --bg-surface: #111827;
  --bg-surface-soft: #182235;
  --bg-surface-hover: rgba(59, 130, 246, 0.12);
  --bg-header: rgba(17, 24, 39, 0.92);
  --bg-backdrop: rgba(2, 6, 23, 0.72);
  --surface-card: #151f32;
  --surface-muted: #11192a;
  --border-subtle: rgba(148, 163, 184, 0.22);

  --text-ink: #f8fafc;
  --text-body: #e2e8f0;
  --text-secondary: #cbd5e1;
  --text-muted: #94a3b8;
  --text-faint: #64748b;

  --border-light: #1e293b;
  --border-mid: #334155;
  --border-focus: #38bdf8;

  --brand-blue: #3b82f6;
  --brand-blue-hover: #60a5fa;
  --brand-blue-soft: rgba(59, 130, 246, 0.16);

  --emerald-bg: rgba(16, 185, 129, 0.15);
  --emerald-text: #6ee7b7;
  --emerald-border: rgba(52, 211, 153, 0.32);
  --emerald-solid: #10b981;

  --amber-bg: rgba(245, 158, 11, 0.15);
  --amber-text: #fcd34d;
  --amber-border: rgba(251, 191, 36, 0.35);

  --crimson-bg: rgba(244, 63, 94, 0.16);
  --crimson-text: #fda4af;
  --crimson-border: rgba(251, 113, 133, 0.35);

  --hbys-bg: #1e293b;
  --hbys-text: #cbd5e1;

  --shadow-card: 0 6px 24px rgba(0, 0, 0, 0.28);
  --shadow-sheet: 0 12px 36px rgba(0, 0, 0, 0.35);
  --shadow-float: 0 22px 50px rgba(0, 0, 0, 0.6);
}

/* ── Temel Sıfırlama ── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  min-height: 100%;
  font-family: var(--font-sans);
  font-size: 14px;
  line-height: 1.5;
  background: var(--bg-canvas);
  color: var(--text-body);
  -webkit-font-smoothing: antialiased;
  transition: font-size 0.16s ease;
}

/* Kullanıcı İsteğine Bağlı Metin Büyütme / Okunabilirlik Kademeleri */
html[data-font-scale="xs"] { font-size: 13px; }   /* %92  — Kompakt */
html[data-font-scale="md"] { font-size: 14px; }   /* %100 — Standart */
html[data-font-scale="lg"] { font-size: 16px; }   /* %115 — Rahat Okuma */
html[data-font-scale="xl"] { font-size: 18px; }   /* %130 — Büyük */
html[data-font-scale="xxl"] { font-size: 20px; }  /* %145 — Çok Büyük / Sunum */

body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  font-size: 1rem;
  line-height: 1.5;
  background: var(--bg-canvas);
  color: var(--text-body);
}

button, input, select, textarea {
  font-family: inherit;
  font-size: inherit;
  color: inherit;
}

button {
  cursor: pointer;
  border: none;
  background: none;
}

::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-thumb {
  background: var(--border-mid);
  border-radius: 99px;
}

.svg-icon {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
}
.svg-icon.icon-sm { width: 15px; height: 15px; }
.svg-icon.icon-xs { width: 13px; height: 13px; }

/* ==========================================================================
   1. SADE ÜST BAR (APP HEADER)
   ========================================================================== */
.app-header {
  position: sticky;
  top: 0;
  z-index: 90;
  height: 56px;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  background: var(--bg-header);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border-light);
}

.header-left,
.header-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-mark {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-right: 4px;
  user-select: none;
}

.brand-logo-img {
  height: 22px;
  width: auto;
  display: block;
  object-fit: contain;
}

html[data-theme="dark"] .brand-logo-img {
  filter: brightness(1.38) contrast(1.06);
}

.brand-prodaine {
  font-weight: 900;
  font-size: 0.98rem;
  letter-spacing: 0.03em;
  color: var(--brand-blue);
}

.brand-sep {
  width: 1px;
  height: 16px;
  background: var(--border-mid);
}

.brand-mlp {
  font-weight: 800;
  font-size: 0.82rem;
  letter-spacing: 0.03em;
  color: var(--brand-crimson);
}

/* Açılır Menüler (Hasta & Görüşme Türü) */
.dropdown-anchor {
  position: relative;
}

.patient-switcher-btn {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 5px 11px 5px 6px;
  border-radius: var(--radius-pill);
  background: var(--bg-surface);
  border: 1px solid var(--border-mid);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.patient-switcher-btn:hover {
  border-color: var(--brand-blue);
  box-shadow: 0 2px 8px rgba(0, 92, 255, 0.08);
}

.patient-switcher-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: linear-gradient(135deg, #ffe4e6, #fecdd3);
  color: #be123c;
  font-size: 0.72rem;
  font-weight: 800;
  display: grid;
  place-items: center;
}

html[data-theme="dark"] .patient-switcher-avatar {
  background: rgba(244, 63, 94, 0.22);
  color: #fda4af;
}

.patient-switcher-text {
  display: flex;
  align-items: baseline;
  gap: 7px;
  text-align: left;
}

.patient-switcher-text strong {
  font-size: 0.86rem;
  font-weight: 700;
  color: var(--text-ink);
}

.patient-switcher-text small {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.visit-context-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 12px;
  border-radius: var(--radius-pill);
  background: var(--bg-surface-soft);
  border: 1px solid var(--border-light);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-secondary);
  transition: all 0.15s ease;
}

.visit-context-pill:hover {
  border-color: var(--border-mid);
  color: var(--text-ink);
}

.visit-context-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--brand-blue);
}

.visit-auto-tag {
  font-size: 0.68rem;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: var(--radius-pill);
  background: var(--emerald-bg);
  color: var(--emerald-text);
}

/* Header Popover */
.header-popover {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  width: 340px;
  background: var(--bg-surface);
  border: 1px solid var(--border-mid);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-float);
  padding: 10px;
  display: none;
  z-index: 150;
}

.header-popover.visit-popover {
  width: 310px;
}

.header-popover.open {
  display: block;
  animation: popFade 0.14s ease-out;
}

@keyframes popFade {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}

.popover-eyebrow {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  padding: 4px 8px 8px;
}

.popover-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.popover-item-btn {
  width: 100%;
  text-align: left;
  padding: 9px 10px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  transition: background 0.14s ease;
}

.popover-item-btn:hover {
  background: var(--bg-surface-hover);
}

.popover-item-btn.selected {
  background: var(--brand-blue-soft);
}

.popover-item-main strong {
  display: block;
  font-size: 0.84rem;
  color: var(--text-ink);
}

.popover-item-main span {
  display: block;
  font-size: 0.74rem;
  color: var(--text-muted);
  margin-top: 1px;
}

.popover-badge {
  font-size: 0.68rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: var(--radius-pill);
  background: var(--emerald-bg);
  color: var(--emerald-text);
  white-space: nowrap;
}

/* Sağ Header Araçları */
.backend-pulse-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 12px;
  border-radius: var(--radius-pill);
  background: var(--bg-surface-soft);
  border: 1px solid var(--border-light);
  font-size: 11px;
  font-weight: 600;
  color: var(--text-secondary);
  white-space: nowrap;
  transition: all 0.15s ease;
}

.backend-pulse-pill:hover {
  border-color: var(--brand-blue);
  color: var(--brand-blue);
  background: var(--brand-blue-soft);
}

/* Okunabilirlik / Metin Büyütme Kapsülü (A− | %100 | A+) */
.font-scale-pill {
  display: inline-flex;
  align-items: center;
  height: 34px;
  padding: 2px;
  border-radius: var(--radius-pill);
  background: var(--bg-surface-soft);
  border: 1px solid var(--border-mid);
  user-select: none;
}

.font-step-btn {
  height: 28px;
  padding: 0 9px;
  border-radius: var(--radius-pill);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: -0.01em;
  color: var(--text-ink);
  transition: background 0.14s ease, color 0.14s ease, opacity 0.14s ease;
}

.font-step-btn:hover:not(:disabled) {
  background: var(--brand-blue-soft);
  color: var(--brand-blue);
}

.font-step-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.font-reset-badge {
  height: 26px;
  min-width: 44px;
  padding: 0 7px;
  border-radius: var(--radius-pill);
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
  border-left: 1px solid var(--border-light);
  border-right: 1px solid var(--border-light);
  transition: background 0.14s ease, color 0.14s ease;
}

.font-reset-badge:hover {
  color: var(--text-ink);
}

.font-reset-badge.active-scale {
  background: var(--brand-blue-soft);
  color: var(--brand-blue);
  border-color: transparent;
}

/* Üst Bar Öğelerini Büyütme Sırasında Taşmaması İçin Sabit Ölçekte Koru */
.app-header .brand-prodaine { font-size: 14px; }
.app-header .brand-mlp { font-size: 11.5px; }
.app-header .patient-switcher-text strong { font-size: 12.5px; }
.app-header .patient-switcher-text small { font-size: 11px; }
.app-header .visit-context-pill { font-size: 11.5px; }
.app-header .visit-auto-tag { font-size: 10px; }

.icon-btn {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--bg-surface-soft);
  border: 1px solid var(--border-light);
  color: var(--text-secondary);
  font-size: 14px;
  flex-shrink: 0;
  transition: all 0.15s ease;
}

.icon-btn:hover {
  border-color: var(--border-mid);
  color: var(--text-ink);
}

.doctor-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding-left: 4px;
  white-space: nowrap;
}

.doctor-chip-avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: linear-gradient(135deg, #005cff, #0f3d68);
  color: #ffffff;
  font-size: 10.5px;
  font-weight: 700;
  display: grid;
  place-items: center;
}

.doctor-chip-name {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--text-secondary);
}

/* ==========================================================================
   2. ANA İKİ SÜTUNLU ÇALIŞMA ALANI (AMBIENT WORKSPACE)
   ========================================================================== */
.ambient-workspace {
  flex: 1;
  width: 100%;
  max-width: 1630px;
  margin: 0 auto;
  padding: 20px 20px 36px;
  display: grid;
  grid-template-columns: 380px minmax(0, 1fr);
  gap: 24px;
  align-items: start;
  transition: max-width 0.16s ease;
}

html[data-font-scale="xl"] .ambient-workspace,
html[data-font-scale="xxl"] .ambient-workspace {
  max-width: 1850px;
  grid-template-columns: 410px minmax(0, 1fr);
}

/* ──────────────────────────────────────────────────────────────────────────
   SOL SÜTUN: SANAL KLİNİK ASİSTAN
   ────────────────────────────────────────────────────────────────────────── */
.assistant-column {
  position: sticky;
  top: 76px;
  max-height: calc(100vh - 96px);
  display: flex;
  flex-direction: column;
}

.assistant-shell {
  display: flex;
  flex-direction: column;
  gap: 14px;
  max-height: calc(100vh - 96px);
}

.assistant-hero-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 18px 18px 15px;
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

.assistant-hero-card.is-listening {
  border-color: rgba(0, 92, 255, 0.35);
  box-shadow: 0 8px 30px rgba(0, 92, 255, 0.08);
}

.assistant-hero-card.is-completed {
  border-color: var(--emerald-border);
}

.assistant-top-meta {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}

.assistant-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px;
  border-radius: var(--radius-pill);
  font-size: 0.73rem;
  font-weight: 700;
  background: var(--bg-surface-soft);
  color: var(--text-secondary);
  border: 1px solid var(--border-light);
}

.assistant-badge.listening {
  background: var(--brand-blue-soft);
  color: var(--brand-blue);
  border-color: rgba(0, 92, 255, 0.24);
}

.assistant-badge.paused {
  background: var(--amber-bg);
  color: var(--amber-text);
  border-color: var(--amber-border);
}

.assistant-badge.completed {
  background: var(--emerald-bg);
  color: var(--emerald-text);
  border-color: var(--emerald-border);
}

.assistant-badge-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
}

.assistant-badge.listening .assistant-badge-dot {
  animation: blinkDot 1.4s infinite;
}

@keyframes blinkDot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.85); }
}

.assistant-timer {
  font-variant-numeric: tabular-nums;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-muted);
}

/* Sanal Asistan Küresi (Ambient Orb) */
.orb-stage {
  margin: 10px 0 12px;
  display: grid;
  place-items: center;
}

.assistant-orb-btn {
  position: relative;
  width: 86px;
  height: 86px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  outline: none;
}

.orb-core {
  position: relative;
  z-index: 2;
  width: 68px;
  height: 68px;
  border-radius: 50%;
  background: linear-gradient(135deg, #005cff 0%, #0ea5e9 100%);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 22px rgba(0, 92, 255, 0.3);
  transition: transform 0.2s ease, background 0.3s ease, box-shadow 0.3s ease;
}

.assistant-orb-btn:hover .orb-core {
  transform: scale(1.04);
}

.assistant-orb-btn.paused .orb-core {
  background: linear-gradient(135deg, #d97706 0%, #f59e0b 100%);
  box-shadow: 0 8px 20px rgba(217, 119, 6, 0.25);
}

.assistant-orb-btn.completed .orb-core {
  background: linear-gradient(135deg, #059669 0%, #10b981 100%);
  box-shadow: 0 8px 22px rgba(5, 150, 105, 0.28);
}

.orb-mic-icon {
  width: 26px;
  height: 26px;
}

.orb-ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: rgba(0, 92, 255, 0.12);
  z-index: 1;
  transform: scale(0.85);
  opacity: 0;
  pointer-events: none;
}

.assistant-orb-btn.idle .orb-ring.ring-1 {
  opacity: 0.55;
  animation: gentleBreath 3.4s ease-in-out infinite;
}

.assistant-orb-btn.listening .orb-ring.ring-1 {
  opacity: 0.8;
  animation: voiceRipple 2s ease-out infinite;
}

.assistant-orb-btn.listening .orb-ring.ring-2 {
  opacity: 0.55;
  animation: voiceRipple 2s ease-out 0.7s infinite;
}

@keyframes gentleBreath {
  0%, 100% { transform: scale(0.86); opacity: 0.35; }
  50% { transform: scale(1.04); opacity: 0.65; }
}

@keyframes voiceRipple {
  0% { transform: scale(0.82); opacity: 0.75; }
  100% { transform: scale(1.34); opacity: 0; }
}

/* Dinleme Sırasında Ses Dalgası Çubukları */
.orb-wave {
  display: none;
  align-items: center;
  gap: 3px;
  height: 24px;
}

.assistant-orb-btn.listening .orb-mic-icon {
  display: none;
}

.assistant-orb-btn.listening .orb-wave {
  display: inline-flex;
}

.orb-wave i {
  width: 3.5px;
  border-radius: 99px;
  background: #ffffff;
  display: block;
  animation: waveBounce 0.95s ease-in-out infinite;
}
.orb-wave i:nth-child(1) { height: 10px; animation-delay: 0s; }
.orb-wave i:nth-child(2) { height: 18px; animation-delay: 0.15s; }
.orb-wave i:nth-child(3) { height: 24px; animation-delay: 0.3s; }
.orb-wave i:nth-child(4) { height: 16px; animation-delay: 0.45s; }
.orb-wave i:nth-child(5) { height: 11px; animation-delay: 0.6s; }

@keyframes waveBounce {
  0%, 100% { transform: scaleY(0.55); opacity: 0.8; }
  50% { transform: scaleY(1.15); opacity: 1; }
}

.assistant-status-text {
  font-size: 0.85rem;
  line-height: 1.48;
  color: var(--text-body);
  font-weight: 500;
  max-width: 315px;
  min-height: 38px;
}

/* Son Yerleştirilen Mikro Etiketler */
.recent-placements-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 5px;
  margin-top: 9px;
}

.recent-placement-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 9px;
  border-radius: var(--radius-pill);
  background: var(--emerald-bg);
  color: var(--emerald-text);
  border: 1px solid var(--emerald-border);
  font-size: 0.71rem;
  font-weight: 700;
  animation: chipPop 0.25s ease-out;
}

@keyframes chipPop {
  from { opacity: 0; transform: translateY(4px) scale(0.95); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

/* Asistan Aksiyon Alanı */
.assistant-controls {
  width: 100%;
  margin-top: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
}

.btn-primary-start {
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 11px 18px;
  border-radius: var(--radius-md);
  background: var(--brand-blue);
  color: #ffffff;
  font-size: 0.9rem;
  font-weight: 700;
  box-shadow: 0 4px 14px rgba(0, 92, 255, 0.26);
  transition: background 0.15s ease, transform 0.12s ease;
}

.btn-primary-start:hover {
  background: var(--brand-blue-hover);
  transform: translateY(-1px);
}

.btn-quiet-ctrl {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 7px 12px;
  border-radius: var(--radius-pill);
  background: var(--bg-surface-soft);
  border: 1px solid var(--border-mid);
  font-size: 0.77rem;
  font-weight: 600;
  color: var(--text-secondary);
  transition: all 0.15s ease;
}

.btn-quiet-ctrl:hover {
  border-color: var(--brand-blue);
  color: var(--text-ink);
}

.btn-quiet-ctrl.active-mode {
  background: var(--amber-bg);
  color: var(--amber-text);
  border-color: var(--amber-border);
}

.btn-finish-session {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  border-radius: var(--radius-pill);
  background: var(--text-ink);
  color: var(--bg-surface);
  font-size: 0.78rem;
  font-weight: 700;
  transition: opacity 0.15s ease;
}

.btn-finish-session:hover {
  opacity: 0.9;
}

.assistant-readiness-footnote {
  margin-top: 11px;
  padding-top: 9px;
  border-top: 1px solid var(--border-light);
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 0.71rem;
  color: var(--text-muted);
}

/* Nazik Hatırlatma Fısıltısı (Whisper Box) */
.whisper-box {
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 11px 13px;
  box-shadow: var(--shadow-card);
}

.whisper-head {
  display: flex;
  flex-direction: column;
  gap: 1px;
  margin-bottom: 8px;
}

.whisper-title {
  font-size: 0.74rem;
  font-weight: 700;
  color: var(--text-secondary);
}

.whisper-sub {
  font-size: 0.68rem;
  color: var(--text-muted);
}

.whisper-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.whisper-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  background: var(--bg-surface-soft);
  border: 1px solid var(--border-mid);
  font-size: 0.74rem;
  font-weight: 600;
  color: var(--text-secondary);
  transition: all 0.15s ease;
}

.whisper-chip:hover {
  background: var(--emerald-bg);
  border-color: var(--emerald-border);
  color: var(--emerald-text);
}

/* Canlı Konuşma Akışı (Sade Transkript) */
.transcript-panel {
  flex: 1;
  min-height: 190px;
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.transcript-head {
  padding: 10px 14px;
  border-bottom: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.transcript-title {
  font-size: 0.76rem;
  font-weight: 700;
  color: var(--text-secondary);
}

.real-mic-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 9px;
  border-radius: var(--radius-pill);
  background: var(--brand-blue-soft);
  color: var(--brand-blue);
  font-size: 0.71rem;
  font-weight: 700;
  transition: all 0.15s ease;
}

.real-mic-pill:hover {
  background: var(--brand-blue);
  color: #ffffff;
}

.real-mic-pill.recording-live {
  background: var(--brand-crimson);
  color: #ffffff;
  animation: pulseBadge 1.3s infinite;
}

@keyframes pulseBadge {
  0%, 100% { box-shadow: 0 0 0 0 rgba(225, 29, 72, 0.4); }
  50% { box-shadow: 0 0 0 6px rgba(225, 29, 72, 0); }
}

.transcript-stream {
  flex: 1;
  overflow-y: auto;
  padding: 12px 13px;
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.transcript-empty {
  padding: 22px 12px;
  text-align: center;
  font-size: 0.78rem;
  color: var(--text-muted);
}

.dialogue-bubble {
  padding: 9px 11px;
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
  line-height: 1.46;
  background: var(--bg-surface-soft);
  border: 1px solid transparent;
  transition: border-color 0.15s ease;
  animation: fadeSlideUp 0.22s ease-out;
}

.dialogue-bubble.is-hasta {
  background: var(--brand-blue-soft);
  border-color: rgba(0, 92, 255, 0.12);
}

.dialogue-bubble:hover {
  border-color: var(--border-mid);
}

.dialogue-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.69rem;
  font-weight: 700;
  color: var(--text-muted);
  margin-bottom: 3px;
}

.dialogue-bubble.is-hasta .dialogue-meta span:first-child {
  color: var(--brand-blue);
}

.evidence-mark {
  background: rgba(250, 204, 21, 0.28);
  color: inherit;
  padding: 0 3px;
  border-radius: 3px;
}

html[data-theme="dark"] .evidence-mark {
  background: rgba(250, 204, 21, 0.22);
}

/* ──────────────────────────────────────────────────────────────────────────
   SAĞ / ANA SÜTUN: KENDİ KENDİNE DOLAN SADE KLİNİK MUAYENE KAĞIDI
   ────────────────────────────────────────────────────────────────────────── */
.clinical-sheet-column {
  min-width: 0;
}

.clinical-sheet {
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sheet);
  overflow: hidden;
}

/* 1. Hasta & HBYS Ön-Bilgi Başlığı */
.sheet-patient-header {
  padding: 20px 26px 18px;
  background: linear-gradient(180deg, var(--bg-surface-soft) 0%, var(--bg-surface) 100%);
  border-bottom: 1px solid var(--border-light);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.sheet-patient-top-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.sheet-patient-title-block h1 {
  font-size: 1.24rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text-ink);
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.sheet-patient-demog {
  font-size: 0.84rem;
  font-weight: 500;
  color: var(--text-muted);
}

.sheet-diagnosis-line {
  margin-top: 4px;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-body);
}

.sheet-header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.btn-hbys-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 7px 13px;
  border-radius: var(--radius-pill);
  background: var(--bg-surface);
  border: 1px solid var(--border-mid);
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-secondary);
  transition: all 0.15s ease;
}

.btn-hbys-link:hover {
  border-color: var(--brand-blue);
  color: var(--brand-blue);
}

/* Kompakt Klinik Çipler Satırı (HBYS'den Hazır Gelen Kritik Bağlam) */
.sheet-context-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.ctx-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 10px;
  border-radius: var(--radius-xs);
  background: var(--emerald-bg);
  border: 1px solid var(--emerald-border);
  color: var(--emerald-text);
  font-size: 0.76rem;
  font-weight: 600;
}

.ctx-pill .svg-icon {
  width: 13px;
  height: 13px;
  opacity: 0.9;
}

.ctx-pill strong {
  color: var(--text-ink);
}

.ctx-pill.allergy-critical {
  background: var(--crimson-bg);
  color: var(--crimson-text);
  border: 1px solid var(--crimson-border);
}

.ctx-pill.imaging-note {
  background: var(--amber-bg);
  color: var(--amber-text);
  border: 1px solid var(--amber-border);
}

.ctx-status-tag {
  display: inline-flex;
  align-items: center;
  padding: 1px 6px;
  border-radius: 4px;
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  line-height: 1.35;
}

.ctx-status-tag.critical {
  background: #e11d48;
  color: #ffffff;
}

.ctx-status-tag.warning {
  background: #d97706;
  color: #ffffff;
}

/* 2. Akıllı Klinik Çapraz Kontrol & Otomatik İstemler Bandı */
.smart-insights-zone {
  padding: 14px 26px 16px;
  background: var(--bg-surface-soft);
  border-bottom: 1px solid var(--border-light);
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.insights-zone-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  padding-bottom: 2px;
}

.insights-zone-title {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-secondary);
}

.insights-zone-title .svg-icon {
  color: var(--brand-blue);
}

.insights-color-legend {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-muted);
}

.smart-insight-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 11px 14px;
  border-radius: var(--radius-sm);
  background: var(--bg-surface);
  border: 1px solid var(--border-mid);
  border-left: 4px solid var(--brand-blue);
  animation: fadeSlideUp 0.28s ease-out;
}

.smart-insight-card.critical {
  border-left-color: var(--brand-crimson);
  background: var(--crimson-bg);
  border-color: var(--crimson-border);
}

.smart-insight-card.warning {
  border-left-color: #d97706;
  background: var(--amber-bg);
  border-color: var(--amber-border);
}

.smart-insight-card.info {
  border-left-color: var(--brand-blue);
  background: var(--brand-blue-soft);
  border-color: rgba(0, 92, 255, 0.22);
}

.insight-copy {
  min-width: 0;
}

.insight-title-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.insight-severity-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: 5px;
  font-size: 0.67rem;
  font-weight: 800;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  flex-shrink: 0;
}

.insight-severity-badge.critical {
  background: #e11d48;
  color: #ffffff;
}

.insight-severity-badge.warning {
  background: #d97706;
  color: #ffffff;
}

.insight-severity-badge.info {
  background: var(--brand-blue);
  color: #ffffff;
}

.insight-copy strong {
  font-size: 0.85rem;
  font-weight: 800;
  color: var(--text-ink);
}

.insight-copy .insight-desc {
  display: block;
  font-size: 0.78rem;
  color: var(--text-secondary);
  margin-top: 3px;
}

.insight-draft-toggle {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: var(--radius-pill);
  background: var(--bg-surface);
  border: 1px solid var(--emerald-border);
  color: var(--emerald-text);
  font-size: 0.75rem;
  font-weight: 700;
  transition: all 0.15s ease;
}

.insight-draft-toggle.dismissed {
  border-color: var(--border-mid);
  color: var(--text-muted);
  text-decoration: line-through;
  opacity: 0.72;
}

/* 3. Doğal 5 Klinik Bölüm (Sıfır Form Kutusu, Temiz Belge Görünümü) */
.sheet-sections-list {
  padding: 12px 26px 18px;
  display: flex;
  flex-direction: column;
}

/* Kaynak Renk Rehberi (Tıklama gerektirmeyen sakin görsel açıklama) */
.sheet-source-legend {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 14px;
  padding: 4px 0 8px;
  border-bottom: 1px dashed var(--border-light);
  font-size: 0.74rem;
  font-weight: 600;
  color: var(--text-muted);
}

.legend-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.legend-swatch {
  width: 12px;
  height: 12px;
  border-radius: 4px;
  display: inline-block;
  flex-shrink: 0;
}

.legend-swatch.hbys {
  background: #d1fae5;
  border: 1.5px solid #10b981;
}

.legend-swatch.voice {
  background: #e6f0ff;
  border: 1.5px solid #3b82f6;
}

.legend-swatch.critical {
  background: #ffe4e6;
  border: 1.5px solid #e11d48;
}

.legend-swatch.warning {
  background: #fef3c7;
  border: 1.5px solid #d97706;
}

html[data-theme="dark"] .legend-swatch.hbys {
  background: rgba(16, 185, 129, 0.28);
  border-color: #10b981;
}

html[data-theme="dark"] .legend-swatch.voice {
  background: rgba(59, 130, 246, 0.28);
  border-color: #60a5fa;
}

html[data-theme="dark"] .legend-swatch.critical {
  background: rgba(244, 63, 94, 0.3);
  border-color: #fb7185;
}

html[data-theme="dark"] .legend-swatch.warning {
  background: rgba(245, 158, 11, 0.3);
  border-color: #fbbf24;
}

.clinical-section {
  padding: 18px 0;
  border-bottom: 1px solid var(--border-light);
}

.clinical-section:last-child {
  border-bottom: none;
}

.section-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 11px;
}

.section-title {
  font-size: 0.79rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.045em;
  color: var(--text-ink);
  display: flex;
  align-items: center;
  gap: 9px;
}

.section-icon-badge {
  width: 26px;
  height: 26px;
  border-radius: 7px;
  display: inline-grid;
  place-items: center;
  flex-shrink: 0;
  background: var(--brand-blue-soft);
  color: var(--brand-blue);
}

.section-icon-badge .svg-icon {
  width: 15px;
  height: 15px;
}

.section-icon-badge.tone-story {
  background: #e8f1ff;
  color: #005cff;
}

.section-icon-badge.tone-symptoms {
  background: #fff1f2;
  color: #e11d48;
}

.section-icon-badge.tone-history {
  background: #dcfce7;
  color: #047857;
}

.section-icon-badge.tone-exam {
  background: #e0f2fe;
  color: #0284c7;
}

.section-icon-badge.tone-plan {
  background: #ede9fe;
  color: #4f46e5;
}

html[data-theme="dark"] .section-icon-badge.tone-story {
  background: rgba(59, 130, 246, 0.2);
  color: #93c5fd;
}
html[data-theme="dark"] .section-icon-badge.tone-symptoms {
  background: rgba(244, 63, 94, 0.2);
  color: #fda4af;
}
html[data-theme="dark"] .section-icon-badge.tone-history {
  background: rgba(16, 185, 129, 0.22);
  color: #6ee7b7;
}
html[data-theme="dark"] .section-icon-badge.tone-exam {
  background: rgba(14, 165, 233, 0.2);
  color: #7dd3fc;
}
html[data-theme="dark"] .section-icon-badge.tone-plan {
  background: rgba(99, 102, 241, 0.22);
  color: #a5b4fc;
}

.section-count-dot {
  font-size: 0.7rem;
  font-weight: 700;
  padding: 1px 7px;
  border-radius: var(--radius-pill);
  background: var(--bg-surface-soft);
  border: 1px solid var(--border-light);
  color: var(--text-secondary);
  text-transform: none;
  letter-spacing: 0;
}

.section-quick-add-btn {
  opacity: 0;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 9px;
  border-radius: var(--radius-pill);
  font-size: 0.73rem;
  font-weight: 600;
  color: var(--brand-blue);
  background: var(--brand-blue-soft);
  transition: opacity 0.15s ease;
}

.clinical-section:hover .section-quick-add-btn {
  opacity: 1;
}

.section-listening-placeholder {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 13px;
  border-radius: var(--radius-sm);
  background: var(--bg-surface-soft);
  border: 1px dashed var(--border-mid);
  color: var(--text-faint);
  font-size: 0.81rem;
  font-style: italic;
}

.section-listening-placeholder .svg-icon {
  color: var(--brand-blue);
  opacity: 0.65;
}

/* Yerleştirilen Klinik Veri Satırları */
.placed-entries-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.placed-entry-row {
  display: grid;
  grid-template-columns: 17.3rem minmax(0, 1fr) auto;
  align-items: center;
  gap: 1rem;
  padding: 0.65rem 0.86rem;
  border-radius: var(--radius-sm);
  background: var(--bg-surface-soft);
  border: 1px solid var(--border-light);
  border-left: 3.5px solid var(--brand-blue);
  cursor: pointer;
  transition: background 0.16s ease, border-color 0.16s ease, transform 0.12s ease;
}

/* HBYS'den Hazır Gelen Satırlar — Ferah Klinik Yeşil Arka Plan */
.placed-entry-row.is-hbys {
  background: linear-gradient(90deg, #e6f9ee 0%, #f1fcf6 100%);
  border-color: #bcead2;
  border-left: 3.5px solid #10b981;
}

.placed-entry-row.is-hbys:hover {
  background: linear-gradient(90deg, #d7f5e4 0%, #e6faef 100%);
  border-color: #86efac;
  border-left-color: #059669;
}

/* Sesten Otomatik Yerleşen Satırlar — Berrak Açık Mavi/Beyaz Zemin */
.placed-entry-row.is-voice {
  background: #f8fbff;
  border-color: #e2ecfb;
  border-left: 3.5px solid #3b82f6;
}

.placed-entry-row.is-voice:hover {
  background: #eef5ff;
  border-color: #bfd7fe;
  border-left-color: #005cff;
}

/* Hekim Tarafından Düzeltilen / Onaylanan Satırlar */
.placed-entry-row.is-doctor {
  background: #f6f5ff;
  border-color: #ddd6fe;
  border-left: 3.5px solid #6366f1;
}

.placed-entry-row.is-doctor:hover {
  background: #ede9fe;
  border-color: #c4b5fd;
  border-left-color: #4f46e5;
}

html[data-theme="dark"] .placed-entry-row.is-hbys {
  background: linear-gradient(90deg, rgba(16, 185, 129, 0.17) 0%, rgba(16, 185, 129, 0.08) 100%);
  border-color: rgba(52, 211, 153, 0.28);
  border-left-color: #10b981;
}
html[data-theme="dark"] .placed-entry-row.is-hbys:hover {
  background: rgba(16, 185, 129, 0.23);
  border-color: rgba(52, 211, 153, 0.45);
}

html[data-theme="dark"] .placed-entry-row.is-voice {
  background: rgba(59, 130, 246, 0.08);
  border-color: rgba(96, 165, 250, 0.2);
  border-left-color: #3b82f6;
}
html[data-theme="dark"] .placed-entry-row.is-voice:hover {
  background: rgba(59, 130, 246, 0.15);
  border-color: rgba(96, 165, 250, 0.36);
}

html[data-theme="dark"] .placed-entry-row.is-doctor {
  background: rgba(99, 102, 241, 0.12);
  border-color: rgba(129, 140, 248, 0.28);
  border-left-color: #818cf8;
}

.placed-entry-row.just-placed {
  animation: highlightNewPlacement 2.1s ease-out;
}

@keyframes highlightNewPlacement {
  0% {
    box-shadow: 0 0 0 3px rgba(0, 92, 255, 0.18);
    transform: translateX(3px);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(0, 92, 255, 0);
    transform: translateX(0);
  }
}

@keyframes fadeSlideUp {
  from { opacity: 0; transform: translateY(5px); }
  to { opacity: 1; transform: translateY(0); }
}

.entry-label {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 0.83rem;
  font-weight: 600;
  color: var(--text-secondary);
  min-width: 0;
}

.placed-entry-row.is-hbys .entry-label {
  color: #065f46;
}

html[data-theme="dark"] .placed-entry-row.is-hbys .entry-label {
  color: #a7f3d0;
}

.entry-icon-chip {
  width: 1.85rem;
  height: 1.85rem;
  border-radius: 7px;
  display: inline-grid;
  place-items: center;
  flex-shrink: 0;
  background: #e6f0ff;
  color: #005cff;
}

.entry-icon-chip .svg-icon {
  width: 1rem;
  height: 1rem;
}

.placed-entry-row.is-hbys .entry-icon-chip {
  background: #ccf5df;
  color: #047857;
}

.placed-entry-row.is-doctor .entry-icon-chip {
  background: #e0e7ff;
  color: #4338ca;
}

html[data-theme="dark"] .entry-icon-chip {
  background: rgba(59, 130, 246, 0.22);
  color: #93c5fd;
}

html[data-theme="dark"] .placed-entry-row.is-hbys .entry-icon-chip {
  background: rgba(16, 185, 129, 0.24);
  color: #6ee7b7;
}

html[data-theme="dark"] .placed-entry-row.is-doctor .entry-icon-chip {
  background: rgba(99, 102, 241, 0.24);
  color: #a5b4fc;
}

.entry-label-text {
  line-height: 1.3;
}

.entry-value {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-ink);
  line-height: 1.45;
}

.entry-meta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}

.entry-edit-hint {
  opacity: 0;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--brand-blue);
  transition: opacity 0.14s ease;
}

.placed-entry-row.is-hbys .entry-edit-hint {
  color: #047857;
}

html[data-theme="dark"] .placed-entry-row.is-hbys .entry-edit-hint {
  color: #6ee7b7;
}

.placed-entry-row:hover .entry-edit-hint {
  opacity: 1;
}

.provenance-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: var(--radius-pill);
  background: var(--hbys-bg);
  color: var(--text-muted);
}

.provenance-tag .svg-icon {
  width: 12px;
  height: 12px;
}

.provenance-tag.hbys {
  background: #d1fae5;
  color: #065f46;
  border: 1px solid #a7f3d0;
}

html[data-theme="dark"] .provenance-tag.hbys {
  background: rgba(16, 185, 129, 0.22);
  color: #6ee7b7;
  border-color: rgba(52, 211, 153, 0.35);
}

.provenance-tag.voice {
  background: #e6f0ff;
  color: var(--brand-blue);
  border: 1px solid rgba(0, 92, 255, 0.16);
}

html[data-theme="dark"] .provenance-tag.voice {
  background: rgba(59, 130, 246, 0.2);
  border-color: rgba(96, 165, 250, 0.3);
}

.provenance-tag.doctor {
  background: #e0e7ff;
  color: #4338ca;
  border: 1px solid #c7d2fe;
}

html[data-theme="dark"] .provenance-tag.doctor {
  background: rgba(99, 102, 241, 0.22);
  color: #a5b4fc;
  border-color: rgba(129, 140, 248, 0.35);
}

/* ==========================================================================
   3.5. İŞLEM TAMAMLANDIĞINDA DOLDURULMAYAN ZORUNLU ALANLAR DİKKAT SİSTEMİ
   ========================================================================== */
.missing-required-zone {
  padding: 16px 26px 14px;
  border-bottom: 1px solid var(--border-light);
  animation: fadeSlideUp 0.28s ease-out;
}

.missing-alert-box {
  padding: 14px 18px;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, #fff1f2 0%, #fffbeb 100%);
  border: 1.5px solid #fda4af;
  border-left: 5px solid #e11d48;
  box-shadow: 0 6px 20px rgba(225, 29, 72, 0.08);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

html[data-theme="dark"] .missing-alert-box {
  background: linear-gradient(135deg, rgba(244, 63, 94, 0.16) 0%, rgba(245, 158, 11, 0.11) 100%);
  border-color: rgba(251, 113, 133, 0.42);
  border-left-color: #f43f5e;
  box-shadow: 0 6px 22px rgba(0, 0, 0, 0.32);
}

.missing-alert-box.attention-flash {
  animation: missingFlashPulse 0.75s ease-out 2;
}

@keyframes missingFlashPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(225, 29, 72, 0); transform: translateX(0); }
  30% { box-shadow: 0 0 0 6px rgba(225, 29, 72, 0.26); transform: translateX(-3px); }
  60% { transform: translateX(3px); }
}

.missing-alert-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}

.missing-alert-title-wrap {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  min-width: 0;
  flex: 1;
}

.missing-alert-icon {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: #e11d48;
  color: #ffffff;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(225, 29, 72, 0.28);
  animation: pulseBadge 2s infinite;
}

.missing-alert-copy strong {
  display: block;
  font-size: 0.94rem;
  font-weight: 800;
  color: #9f1239;
}

html[data-theme="dark"] .missing-alert-copy strong {
  color: #fda4af;
}

.missing-alert-copy span {
  display: block;
  font-size: 0.8rem;
  color: var(--text-body);
  margin-top: 2px;
}

.btn-fill-all-missing {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: var(--radius-pill);
  background: #e11d48;
  color: #ffffff;
  font-size: 0.78rem;
  font-weight: 700;
  box-shadow: 0 3px 10px rgba(225, 29, 72, 0.24);
  transition: transform 0.12s ease, filter 0.14s ease;
}

.btn-fill-all-missing:hover {
  filter: brightness(1.08);
  transform: translateY(-1px);
}

.missing-chips-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.missing-jump-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 11px;
  border-radius: var(--radius-pill);
  background: var(--bg-surface);
  border: 1px solid #fecdd3;
  color: var(--text-ink);
  font-size: 0.77rem;
  font-weight: 700;
  transition: all 0.14s ease;
}

html[data-theme="dark"] .missing-jump-chip {
  border-color: rgba(251, 113, 133, 0.35);
}

.missing-jump-chip .svg-icon {
  color: #e11d48;
}

.missing-jump-chip small {
  font-size: 0.7rem;
  font-weight: 700;
  color: #e11d48;
  margin-left: 2px;
}

.missing-jump-chip:hover {
  border-color: #e11d48;
  background: #ffe4e6;
}

html[data-theme="dark"] .missing-jump-chip:hover {
  background: rgba(244, 63, 94, 0.24);
}

.missing-all-clear-box {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  background: var(--emerald-bg);
  border: 1px solid var(--emerald-border);
  color: var(--emerald-text);
  font-size: 0.82rem;
  font-weight: 700;
}

/* Bölüm Başlığında Eksik Alan Rozeti */
.section-missing-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: var(--radius-pill);
  background: #ffe4e6;
  border: 1px solid #fda4af;
  color: #be123c;
  font-size: 0.69rem;
  font-weight: 800;
  text-transform: none;
  letter-spacing: 0;
}

html[data-theme="dark"] .section-missing-badge {
  background: rgba(244, 63, 94, 0.24);
  border-color: rgba(251, 113, 133, 0.4);
  color: #fda4af;
}

/* Bölüm İçinde Doldurulmamış Zorunlu Alan Satırı */
.missing-entry-row {
  display: grid;
  grid-template-columns: 17.3rem minmax(0, 1fr) auto;
  align-items: center;
  gap: 1rem;
  padding: 0.7rem 0.86rem;
  border-radius: var(--radius-sm);
  background: linear-gradient(90deg, #fff1f2 0%, #fffbeb 100%);
  border: 1.5px dashed #fb7185;
  border-left: 4px solid #e11d48;
  cursor: pointer;
  animation: fadeSlideUp 0.24s ease-out;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.missing-entry-row:hover {
  background: #ffe4e6;
  border-color: #e11d48;
}

html[data-theme="dark"] .missing-entry-row {
  background: linear-gradient(90deg, rgba(244, 63, 94, 0.16) 0%, rgba(245, 158, 11, 0.08) 100%);
  border-color: rgba(251, 113, 133, 0.45);
  border-left-color: #f43f5e;
}

html[data-theme="dark"] .missing-entry-row:hover {
  background: rgba(244, 63, 94, 0.24);
}

.missing-entry-row.row-focus-pulse {
  animation: missingFlashPulse 0.8s ease-out 2;
}

.missing-entry-row .entry-label {
  color: #9f1239;
  font-weight: 700;
}

html[data-theme="dark"] .missing-entry-row .entry-label {
  color: #fda4af;
}

.missing-entry-row .entry-icon-chip {
  background: #ffe4e6;
  color: #e11d48;
}

html[data-theme="dark"] .missing-entry-row .entry-icon-chip {
  background: rgba(244, 63, 94, 0.28);
  color: #fda4af;
}

.missing-entry-prompt {
  font-size: 0.83rem;
  font-weight: 600;
  color: #b45309;
  display: flex;
  align-items: center;
  gap: 6px;
}

html[data-theme="dark"] .missing-entry-prompt {
  color: #fcd34d;
}

.missing-entry-actions {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

.btn-missing-quickfill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 5px 11px;
  border-radius: var(--radius-pill);
  background: var(--bg-surface);
  border: 1px solid var(--emerald-border);
  color: var(--emerald-text);
  font-size: 0.74rem;
  font-weight: 700;
  transition: all 0.14s ease;
}

.btn-missing-quickfill:hover {
  background: var(--emerald-solid);
  border-color: var(--emerald-solid);
  color: #ffffff;
}

.btn-missing-choose {
  padding: 5px 10px;
  border-radius: var(--radius-pill);
  background: var(--bg-surface);
  border: 1px solid var(--border-mid);
  color: var(--text-ink);
  font-size: 0.73rem;
  font-weight: 700;
  transition: all 0.14s ease;
}

.btn-missing-choose:hover {
  border-color: var(--brand-blue);
  color: var(--brand-blue);
}

.provenance-tag.missing-tag {
  background: #e11d48;
  color: #ffffff;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.btn-fill-missing-footer {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 16px;
  border-radius: var(--radius-md);
  background: var(--bg-surface);
  border: 1.5px solid #fda4af;
  color: #be123c;
  font-size: 0.82rem;
  font-weight: 700;
  transition: all 0.14s ease;
}

html[data-theme="dark"] .btn-fill-missing-footer {
  border-color: rgba(251, 113, 133, 0.45);
  color: #fda4af;
}

.btn-fill-missing-footer:hover {
  background: #ffe4e6;
}

html[data-theme="dark"] .btn-fill-missing-footer:hover {
  background: rgba(244, 63, 94, 0.22);
}

.btn-save-hbys.warn-mode {
  background: #d97706;
  box-shadow: 0 4px 14px rgba(217, 119, 6, 0.28);
}

/* 4. Alt Tek Tıkla Onay & HBYS Kayıt Barı */
.sheet-signoff-bar {
  padding: 16px 26px;
  background: var(--bg-surface-soft);
  border-top: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.signoff-left strong {
  display: block;
  font-size: 0.86rem;
  color: var(--text-ink);
}

.signoff-left span {
  display: block;
  font-size: 0.76rem;
  color: var(--text-muted);
  margin-top: 1px;
}

.signoff-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.btn-save-hbys {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 22px;
  border-radius: var(--radius-md);
  background: var(--emerald-solid);
  color: #ffffff;
  font-size: 0.88rem;
  font-weight: 700;
  box-shadow: 0 4px 14px rgba(5, 150, 105, 0.25);
  transition: transform 0.12s ease, filter 0.15s ease;
}

.btn-save-hbys:hover {
  filter: brightness(1.06);
  transform: translateY(-1px);
}

.btn-save-hbys.compact {
  padding: 7px 15px;
  font-size: 0.8rem;
  border-radius: var(--radius-pill);
}

/* ==========================================================================
   3. TEK DOKUNUŞLA KONTROL & DÜZELTME KARTI (QUICK CONTROL MODAL)
   ========================================================================== */
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 220;
  background: var(--bg-backdrop);
  backdrop-filter: blur(4px);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal-backdrop.open {
  display: flex;
  animation: popFade 0.15s ease-out;
}

.quick-control-card {
  width: 100%;
  max-width: 540px;
  background: var(--bg-surface);
  border: 1px solid var(--border-mid);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-float);
  padding: 22px 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.qc-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.qc-eyebrow {
  font-size: 0.71rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--brand-blue);
}

.qc-header h3 {
  font-size: 1.08rem;
  font-weight: 800;
  color: var(--text-ink);
  margin-top: 3px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.qc-title-icon {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  display: inline-grid;
  place-items: center;
  flex-shrink: 0;
  background: var(--brand-blue-soft);
  color: var(--brand-blue);
}

.qc-title-icon.is-hbys {
  background: var(--emerald-bg);
  color: var(--emerald-text);
  border: 1px solid var(--emerald-border);
}

.qc-evidence-quote {
  padding: 11px 14px;
  border-radius: var(--radius-sm);
  background: var(--amber-bg);
  border: 1px solid var(--amber-border);
  font-size: 0.82rem;
  color: var(--text-body);
}

.qc-evidence-quote small {
  display: block;
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--amber-text);
  margin-bottom: 3px;
}

.qc-section-label {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-muted);
  margin-bottom: 7px;
  display: block;
}

.qc-presets-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.qc-preset-btn {
  width: 100%;
  text-align: left;
  padding: 10px 13px;
  border-radius: var(--radius-sm);
  background: var(--bg-surface-soft);
  border: 1px solid var(--border-light);
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--text-ink);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  transition: all 0.14s ease;
}

.qc-preset-btn:hover {
  background: var(--brand-blue-soft);
  border-color: var(--brand-blue);
}

.qc-preset-btn.active {
  background: var(--emerald-bg);
  border-color: var(--emerald-border);
  color: var(--emerald-text);
}

.qc-custom-row {
  display: flex;
  gap: 8px;
}

.qc-input-wrap {
  flex: 1;
  position: relative;
  display: flex;
  align-items: center;
}

.qc-input {
  width: 100%;
  padding: 9px 38px 9px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-mid);
  background: var(--bg-surface);
  font-size: 0.85rem;
  color: var(--text-ink);
  outline: none;
}

.qc-input:focus {
  border-color: var(--brand-blue);
}

.qc-mic-inline-btn {
  position: absolute;
  right: 6px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: var(--brand-blue);
  background: var(--brand-blue-soft);
}

.qc-mic-inline-btn.listening {
  background: var(--brand-crimson);
  color: #ffffff;
}

.qc-save-btn {
  padding: 9px 16px;
  border-radius: var(--radius-sm);
  background: var(--brand-blue);
  color: #ffffff;
  font-size: 0.83rem;
  font-weight: 700;
  white-space: nowrap;
}

.qc-subfields-details {
  border-top: 1px solid var(--border-light);
  padding-top: 10px;
  font-size: 0.77rem;
}

.qc-subfields-details summary {
  cursor: pointer;
  color: var(--text-muted);
  font-weight: 600;
  list-style: none;
}

.qc-subfields-grid {
  margin-top: 8px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}

.qc-sf-pill {
  padding: 6px 9px;
  border-radius: var(--radius-xs);
  background: var(--bg-surface-soft);
  border: 1px solid var(--border-light);
}

.qc-sf-pill span {
  display: block;
  font-size: 0.68rem;
  color: var(--text-muted);
}

.qc-sf-pill strong {
  display: block;
  font-size: 0.76rem;
  color: var(--text-ink);
  margin-top: 1px;
}

.qc-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 6px;
}

.qc-clear-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.76rem;
  font-weight: 600;
  color: var(--crimson-text);
  padding: 5px 8px;
  border-radius: var(--radius-xs);
}

.qc-clear-btn:hover {
  background: var(--crimson-bg);
}

/* ==========================================================================
   4. SLIDE-OVER ÇEKMECELER (HBYS GEÇMİŞİ & ARKA PLAN 145 PARAMETRE İZLEYİCİ)
   ========================================================================== */
.drawer-backdrop {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: var(--bg-backdrop);
  backdrop-filter: blur(3px);
  display: none;
  justify-content: flex-end;
}

.drawer-backdrop.open {
  display: flex;
}

.slide-drawer {
  width: 100%;
  max-width: 660px;
  height: 100%;
  background: var(--bg-surface);
  border-left: 1px solid var(--border-mid);
  box-shadow: var(--shadow-float);
  display: flex;
  flex-direction: column;
  animation: slideInRight 0.2s ease-out;
}

.slide-drawer.wide-drawer {
  max-width: 920px;
}

@keyframes slideInRight {
  from { transform: translateX(40px); opacity: 0.6; }
  to { transform: translateX(0); opacity: 1; }
}

.drawer-header {
  padding: 18px 22px;
  border-bottom: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.drawer-eyebrow {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--brand-blue);
}

.drawer-header h2 {
  font-size: 1.06rem;
  font-weight: 800;
  color: var(--text-ink);
  margin-top: 2px;
}

.drawer-body {
  flex: 1;
  overflow-y: auto;
  padding: 20px 22px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.drawer-card {
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  background: var(--bg-surface-soft);
  padding: 14px 16px;
}

.drawer-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.drawer-card-head h3 {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text-ink);
}

.drawer-kv-grid {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  gap: 7px 12px;
  font-size: 0.82rem;
}

.drawer-kv-label {
  color: var(--text-muted);
  font-weight: 600;
}

.drawer-kv-val {
  color: var(--text-ink);
  font-weight: 500;
}

/* Arka Plan 5 Agent & 145 Alan Tablosu */
.agent-strip-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
}

.agent-mini-card {
  padding: 10px;
  border-radius: var(--radius-sm);
  background: var(--bg-surface-soft);
  border: 1px solid var(--border-light);
}

.agent-mini-card strong {
  display: block;
  font-size: 0.76rem;
  color: var(--text-ink);
}

.agent-mini-card span {
  display: block;
  font-size: 0.7rem;
  color: var(--text-muted);
  margin-top: 3px;
}

.backend-filter-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.backend-pills {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.backend-pill {
  padding: 5px 11px;
  border-radius: var(--radius-pill);
  font-size: 0.75rem;
  font-weight: 600;
  background: var(--bg-surface-soft);
  border: 1px solid var(--border-light);
  color: var(--text-secondary);
}

.backend-pill.active {
  background: var(--brand-blue);
  border-color: var(--brand-blue);
  color: #ffffff;
}

.backend-search {
  padding: 6px 12px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border-mid);
  background: var(--bg-surface);
  font-size: 0.78rem;
  width: 240px;
  outline: none;
}

.backend-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.79rem;
}

.backend-table th {
  text-align: left;
  padding: 8px 10px;
  font-size: 0.7rem;
  text-transform: uppercase;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border-mid);
}

.backend-table td {
  padding: 8px 10px;
  border-bottom: 1px solid var(--border-light);
  vertical-align: top;
}

.backend-table tr.is-hbys-row {
  background: rgba(16, 185, 129, 0.08);
}

.backend-table tr.is-hbys-row:hover {
  background: rgba(16, 185, 129, 0.15);
}

html[data-theme="dark"] .backend-table tr.is-hbys-row {
  background: rgba(16, 185, 129, 0.12);
}

/* ==========================================================================
   5. HBYS KAYIT BAŞARILI MODALI
   ========================================================================== */
.commit-modal-card {
  width: 100%;
  max-width: 520px;
  background: var(--bg-surface);
  border: 1px solid var(--border-mid);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-float);
  padding: 26px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.commit-check-circle {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--emerald-bg);
  color: var(--emerald-solid);
  border: 1px solid var(--emerald-border);
  display: grid;
  place-items: center;
}

/* ==========================================================================
   6. SUNUM / DEMO SİMÜLASYON KAPSÜLÜ (SAĞ ALT — DARALTILABİLİR)
   ========================================================================== */
.demo-dock {
  position: fixed;
  right: 18px;
  bottom: 16px;
  z-index: 120;
  background: var(--bg-surface);
  border: 1px solid var(--border-mid);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-float);
  width: 340px;
  overflow: hidden;
  transition: width 0.2s ease;
}

.demo-dock.collapsed {
  width: auto;
  border-radius: var(--radius-pill);
}

.demo-dock.collapsed .demo-dock-body {
  display: none;
}

.demo-dock.collapsed .demo-dock-toggle svg {
  transform: rotate(180deg);
}

.demo-dock-toggle {
  width: 100%;
  padding: 8px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-secondary);
  background: var(--bg-surface-soft);
}

.demo-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--brand-teal);
}

.demo-dock-body {
  padding: 10px 12px 12px;
  border-top: 1px solid var(--border-light);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.demo-dock-row {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.demo-btn {
  flex: 1;
  padding: 6px 9px;
  border-radius: var(--radius-xs);
  background: var(--bg-surface-soft);
  border: 1px solid var(--border-mid);
  font-size: 0.73rem;
  font-weight: 600;
  color: var(--text-ink);
  white-space: nowrap;
}

.demo-btn:hover {
  border-color: var(--brand-blue);
  color: var(--brand-blue);
}

.demo-btn.subtle {
  flex: 0 0 auto;
  color: var(--text-muted);
}

.demo-utterance-form {
  display: flex;
  gap: 6px;
}

.demo-utterance-form input {
  flex: 1;
  padding: 6px 10px;
  border-radius: var(--radius-xs);
  border: 1px solid var(--border-mid);
  background: var(--bg-surface);
  font-size: 0.75rem;
  outline: none;
}

.demo-send-btn {
  padding: 6px 11px;
  border-radius: var(--radius-xs);
  background: var(--brand-blue);
  color: #ffffff;
  font-size: 0.74rem;
  font-weight: 700;
}

/* ==========================================================================
   7. TOAST BİLDİRİMİ (GERİ AL DESTEKLİ)
   ========================================================================== */
.ambient-toast {
  position: fixed;
  bottom: 22px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  z-index: 300;
  background: #0f172a;
  color: #f8fafc;
  padding: 9px 16px;
  border-radius: var(--radius-pill);
  font-size: 0.8rem;
  font-weight: 600;
  box-shadow: var(--shadow-float);
  display: flex;
  align-items: center;
  gap: 12px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.ambient-toast.visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
  pointer-events: auto;
}

.toast-undo-btn {
  color: #60a5fa;
  font-weight: 700;
  font-size: 0.78rem;
  text-decoration: underline;
}

/* Responsive Uyumluluk */
@media (max-width: 1080px) {
  .ambient-workspace {
    grid-template-columns: 1fr;
  }
  .assistant-column {
    position: static;
    max-height: none;
  }
  .assistant-shell {
    max-height: none;
  }
  .transcript-panel {
    max-height: 240px;
  }
}

@media (max-width: 680px) {
  .placed-entry-row,
  .missing-entry-row {
    grid-template-columns: 1fr;
    gap: 5px;
  }
  .agent-strip-grid {
    grid-template-columns: 1fr 1fr;
  }
}
