/* ==========================================================================
   UMAY YERLİ VE MİLLİ YAPAY ZEKA - FERAH, TEMİZ VE BAĞIMSIZ MİMARİ
   ========================================================================== */

:root {
  --font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --transition-fast: 0.12s ease;
  --transition-normal: 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  --transition-sidebar: 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 22px;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: var(--font-family);
  -webkit-font-smoothing: antialiased;
}

html,
body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background-color: var(--bg-primary);
  color: var(--text-main);
}

/* Scrollbar Tasarımı */
::-webkit-scrollbar {
  width: 5px;
  height: 5px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

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

::-webkit-scrollbar-thumb:hover {
  background: var(--text-dim);
}

/* ==========================================================================
   TOAST BİLDİRİM SİSTEMİ
   ========================================================================== */
.toast-container {
  position: fixed;
  top: 18px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 9999999 !important;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
  max-width: 90vw;
  width: 360px;
}

.toast-item {
  pointer-events: auto;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 16px;
  border-radius: var(--radius-md);
  background: rgba(18, 18, 22, 0.94);
  backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  color: #fff;
  font-size: 0.86rem;
  font-weight: 500;
  animation: toastSlideDown 0.25s var(--transition-normal) forwards;
  transition: all 0.2s ease;
}

.toast-item.toast-success {
  border-left: 4px solid #10b981;
}

.toast-item.toast-success i {
  color: #10b981;
}

.toast-item.toast-error {
  border-left: 4px solid #ef4444;
}

.toast-item.toast-error i {
  color: #ef4444;
}

.toast-item.toast-warning {
  border-left: 4px solid #f59e0b;
}

.toast-item.toast-warning i {
  color: #f59e0b;
}

.toast-item.toast-info {
  border-left: 4px solid #3b82f6;
}

.toast-item.toast-info i {
  color: #3b82f6;
}

.toast-item.hide {
  opacity: 0;
  transform: translateY(-16px);
}

/* ==========================================================================
   UYGULAMA ANA DÜZENİ
   ========================================================================== */
.app-root {
  display: flex;
  width: 100vw;
  height: 100vh;
  position: relative;
  overflow: hidden;
}

/* Mobil Arka Plan Karartması */
.sidebar-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
  z-index: 890;
  opacity: 0;
  transition: opacity var(--transition-normal);
}

.sidebar-backdrop.active {
  display: block;
  opacity: 1;
}

/* ==========================================================================
   SIDEBAR (HİZASI BOZULMAYAN MİNİ & GENİŞLETİLEBİLİR MOD)
   ========================================================================== */
.sidebar {
  width: 250px;
  background-color: var(--sidebar-bg);
  border-right: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  height: 100vh;
  z-index: 900;
  flex-shrink: 0;
  transition: width var(--transition-sidebar), transform var(--transition-sidebar);
  position: relative;
  overflow: hidden;
}

/* Masaüstü Daraltılmış / Collapsed Hal */
.sidebar.collapsed {
  width: 64px;
  min-width: 64px;
}

.sidebar.collapsed .sidebar.collapsed .sidebar-header {
  padding: 0 !important;
  width: 64px !important;
  height: 58px !important;
  display: flex !important;
  justify-content: center !important;
  align-items: center !important;
  overflow: hidden !important;
}

.sidebar.collapsed .btn-sidebar-search {
  display: none !important;
}

.sidebar.collapsed .brand-link {
  justify-content: center;
  align-items: center;
  width: 64px;
  gap: 0;
  margin: 0;
  padding: 0;
}

.sidebar.collapsed .brand-logo-img {
  width: 34px !important;
  height: 34px !important;
  min-width: 34px !important;
  min-height: 34px !important;
  max-width: 34px !important;
  max-height: 34px !important;
  margin: 0 auto !important;
  object-fit: contain !important;
  display: block !important;
}

.sidebar.collapsed .brand-text-group,
.sidebar.collapsed .btn-new-chat-text,
.sidebar.collapsed .btn-shortcut-hint,
.sidebar.collapsed .sidebar-section-title,
.sidebar.collapsed .history-title,
.sidebar.collapsed .history-delete-btn,
.sidebar.collapsed .user-text-details,
.sidebar.collapsed .user-logout-btn,
.sidebar.collapsed .sidebar-toggle-btn,
.sidebar.collapsed .sidebar-footer-text {
  display: none !important;
}

.sidebar.collapsed .btn-new-chat {
  justify-content: center;
  padding: 10px 0;
}

.sidebar.collapsed .chat-history-list,
.sidebar.collapsed .sidebar-section-title {
  display: none !important;
}

.sidebar.collapsed .sidebar-footer {
  margin-top: auto !important;
  padding: 8px 4px !important;
  width: 100% !important;
  align-items: center !important;
}

.sidebar.collapsed .user-profile-tile {
  justify-content: center;
  padding: 8px 0;
  width: 100%;
}

.sidebar.collapsed .sidebar-privacy-link-btn {
  justify-content: center;
  padding: 8px 0;
  width: 100%;
}

/* Sidebar Header */
.sidebar-header {
  height: 58px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 14px;
  border-bottom: 1px solid var(--border-color);
  flex-shrink: 0;
}

.brand-link {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text-main);
  cursor: pointer;
  overflow: hidden;
}

.brand-logo-img {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  object-fit: cover;
  flex-shrink: 0;
}

.brand-text-group {
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

.brand-title {
  font-size: 1.1rem;
  font-weight: 800;
  letter-spacing: 0.5px;
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.brand-badge {
  font-size: 0.6rem;
  font-weight: 700;
  padding: 2px 5px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border-color);
  border-radius: 4px;
  color: var(--text-muted);
}

.sidebar-toggle-btn {
  background: transparent;
  border: none;
  color: var(--text-dim);
  cursor: pointer;
  width: 28px;
  height: 28px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.82rem;
  transition: all var(--transition-fast);
}

.sidebar-toggle-btn:hover {
  background: var(--bg-card-hover);
  color: var(--text-main);
}

/* Yeni Sohbet Butonu */
.sidebar-action-wrap {
  padding: 12px 10px 4px 10px;
}

.btn-new-chat {
  width: 100%;
  padding: 9px 12px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  font-size: 0.86rem;
  font-weight: 600;
  transition: all var(--transition-fast);
}

.btn-new-chat:hover {
  background: var(--bg-card-hover);
  border-color: rgba(255, 255, 255, 0.25);
}

.btn-new-chat i {
  font-size: 0.9rem;
}

.btn-new-chat-text {
  flex: 1;
  text-align: left;
  white-space: nowrap;
}

.btn-shortcut-hint {
  font-size: 0.65rem;
  padding: 1px 5px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 4px;
  color: var(--text-dim);
}

.sidebar-section-title {
  padding: 12px 14px 4px 14px;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--text-dim);
}

/* Sohbet Listesi */
.chat-history-list {
  flex: 1 1 0px !important;
  min-height: 0 !important;
  max-height: 100% !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
  -webkit-overflow-scrolling: touch !important;
  touch-action: pan-y !important;
  overscroll-behavior-y: contain !important;
  padding: 8px 6px 8px 10px;
  display: flex;
  flex-direction: column;
  gap: 3px;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.28) rgba(255, 255, 255, 0.02);
}

.history-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  cursor: pointer;
  font-size: 0.85rem;
  text-decoration: none;
  transition: all var(--transition-fast);
  white-space: nowrap;
  overflow: hidden;
  min-height: 38px;
}

.history-item:hover,
.history-item.active {
  background: var(--bg-card-hover);
  color: var(--text-main);
}

.history-item i {
  font-size: 0.82rem;
  color: var(--text-dim);
  flex-shrink: 0;
}

.history-item:hover i,
.history-item.active i {
  color: var(--text-main);
}

.history-title {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.history-delete-btn {
  opacity: 0;
  background: transparent;
  border: none;
  color: var(--text-dim);
  cursor: pointer;
  padding: 2px 5px;
  font-size: 0.75rem;
  border-radius: 4px;
  transition: all var(--transition-fast);
}

.history-item:hover .history-delete-btn {
  opacity: 1;
}

.history-delete-btn:hover {
  color: #ef4444;
  background: rgba(239, 68, 68, 0.15);
}

/* Sidebar Footer & Profil */
.sidebar-footer {
  margin-top: auto !important;
  flex-shrink: 0;
  padding: 8px 10px;
  border-top: 1px solid var(--border-color);
  background: rgba(0, 0, 0, 0.15);
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.sidebar-privacy-link-btn {
  width: 100%;
  padding: 7px 9px;
  border-radius: var(--radius-sm);
  background: transparent;
  border: none;
  color: var(--text-dim);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.78rem;
  transition: all var(--transition-fast);
}

.sidebar-privacy-link-btn:hover {
  background: var(--bg-card-hover);
  color: var(--text-muted);
}

.user-profile-tile {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 9px;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: background var(--transition-fast);
  overflow: hidden;
}

.user-profile-tile:hover {
  background: var(--bg-card-hover);
}

.avatar-letter-badge {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.85rem;
  flex-shrink: 0;
  border: 1px solid var(--border-color);
}

.avatar-img-badge {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.user-text-details {
  flex: 1;
  overflow: hidden;
  white-space: nowrap;
}

.user-name-line {
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--text-main);
  overflow: hidden;
  text-overflow: ellipsis;
}

.user-role-line {
  font-size: 0.68rem;
  color: var(--text-dim);
}

.user-logout-btn {
  background: transparent;
  border: none;
  color: var(--text-dim);
  cursor: pointer;
  padding: 5px;
  border-radius: 6px;
  font-size: 0.82rem;
  transition: all var(--transition-fast);
}

.user-logout-btn:hover {
  color: #ef4444;
  background: rgba(239, 68, 68, 0.15);
}

/* ==========================================================================
   MAIN CONTENT & YÜZEN MENÜ BUTONU (HEADER YOKTUR)
   ========================================================================== */
.main-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  height: 100vh;
  position: relative;
  overflow: hidden;
  background: var(--bg-primary);
  min-width: 0;
}

.floating-top-right-controls {
  position: absolute;
  top: 14px;
  right: 18px;
  z-index: 60;
  display: flex;
  align-items: center;
  gap: 8px;
}

.floating-top-controls {
  position: absolute;
  top: 14px;
  left: 14px;
  z-index: 60;
  display: flex;
  align-items: center;
  gap: 8px;
}

.floating-menu-btn {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  width: 34px;
  height: 34px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 0.95rem;
  backdrop-filter: blur(8px);
  transition: all var(--transition-fast);
}

.floating-menu-btn:hover {
  background: var(--bg-card-hover);
  color: var(--text-main);
  border-color: rgba(255, 255, 255, 0.25);
}

/* ==========================================================================
   CHAT VIEWPORT & FERAH MESAJ ALANI (SIKIŞIKLIK GİDERİLDİ - max-width: 760px)
   ========================================================================== */
.page-view-container {
  flex: 1;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
  height: 100vh;
}

.chat-viewport {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-y;
  overscroll-behavior-y: contain;
  display: flex;
  flex-direction: column;
  position: relative;
}

/* HERO CONTAINER */
.hero-center-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 16px 20px 16px;
  min-height: 36vh;
  text-align: center;
  margin: 0 auto;
  max-width: 720px;
  width: 100%;
}

.hero-avatar-glow {
  position: relative;
  margin-bottom: 18px;
}

.hero-umay-img {
  width: 72px;
  height: 72px;
  border-radius: 18px;
  object-fit: cover;
  box-shadow: 0 0 35px var(--accent-glow);
  animation: floatLogo 4s ease-in-out infinite;
}

.hero-main-title {
  font-size: clamp(1.8rem, 4vw, 2.5rem);
  font-weight: 800;
  letter-spacing: -0.6px;
  margin-bottom: 10px;
  line-height: 1.25;
  background: var(--hero-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-desc-text {
  font-size: 0.94rem;
  color: var(--text-muted);
  max-width: 520px;
  line-height: 1.55;
}

/* MESAJ LİSTESİ */
.messages-container {
  max-width: 860px;
  width: 100%;
  margin: 0 auto;
  padding: 30px 18px 40px 18px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.message-row {
  display: flex;
  gap: 14px;
  animation: messageFadeIn 0.2s var(--transition-normal) forwards;
}

/* Kullanıcı Mesajı: SADECE MESAJ BALONU (U VEYA SEN YAZISI YOKTUR!) */
.message-row.user {
  justify-content: flex-end;
  display: flex;
  width: 100%;
  position: relative;
}

.message-row.user .message-content-col {
  max-width: 82%;
  margin-left: auto;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
}

.message-row.user .message-bubble {
  background: var(--user-bubble);
  color: var(--text-main);
  border-radius: 18px;
  border-top-right-radius: 4px;
  border: 1px solid var(--border-color);
  padding: 12px 18px;
  font-size: 0.95rem;
  line-height: 1.6;
}

/* AI Mesajı */
.message-row.assistant {
  justify-content: flex-start;
}

.msg-avatar.ai {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  flex-shrink: 0;
  overflow: hidden;
}

.msg-avatar.ai img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.message-row.assistant .message-content-col {
  max-width: 88%;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.message-row.assistant .message-bubble {
  background: var(--ai-bubble);
  color: var(--text-main);
  border-radius: 18px;
  border-top-left-radius: 4px;
  border: 1px solid var(--border-color);
  padding: 14px 18px;
  line-height: 1.65;
  font-size: 0.95rem;
  word-break: break-word;
}

/* ==========================================================================
   KOD BLOKLARI (MODERN VE TEMİZ BAŞLIK ÇUBUĞU, DİL ETİKETİ, ÖNİZLE VE KOPYALA)
   ========================================================================== */
.code-block-wrapper {
  position: relative !important;
  background: #09090b !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  border-radius: 10px !important;
  margin: 12px 0 !important;
  overflow: hidden !important;
}

.code-block-header {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  padding: 6px 12px !important;
  background: rgba(255, 255, 255, 0.04) !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07) !important;
  font-size: 0.76rem !important;
  color: #a1a1aa !important;
  user-select: none;
}

.code-lang-tag {
  display: inline-flex !important;
  align-items: center !important;
  gap: 5px !important;
  font-weight: 600 !important;
  text-transform: lowercase;
  color: #a1a1aa !important;
}

.code-copy-btn {
  background: transparent !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  color: #d4d4d8 !important;
  font-size: 0.74rem !important;
  font-weight: 500 !important;
  padding: 3px 8px !important;
  border-radius: 5px !important;
  cursor: pointer !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 5px !important;
  transition: all 0.15s ease !important;
}

.code-copy-btn:hover {
  background: rgba(255, 255, 255, 0.12) !important;
  color: #ffffff !important;
  border-color: rgba(255, 255, 255, 0.2) !important;
}

.code-preview-action-btn {
  background: rgba(16, 185, 129, 0.12) !important;
  border: 1px solid rgba(16, 185, 129, 0.3) !important;
  color: #10b981 !important;
  font-size: 0.74rem !important;
  font-weight: 600 !important;
  padding: 3px 10px !important;
  border-radius: 5px !important;
  cursor: pointer !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 5px !important;
  transition: all 0.15s ease !important;
}

.code-preview-action-btn:hover {
  background: #10b981 !important;
  color: #09090b !important;
}

.code-copy-action-btn {
  position: absolute !important;
  top: 8px !important;
  right: 8px !important;
  width: 28px !important;
  height: 28px !important;
  background: rgba(255, 255, 255, 0.08) !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  border-radius: 6px !important;
  color: #a1a1aa !important;
  cursor: pointer !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  font-size: 0.8rem !important;
  transition: all 0.2s !important;
  z-index: 5 !important;
}

.code-copy-action-btn:hover {
  background: rgba(255, 255, 255, 0.18) !important;
  color: #fff !important;
  border-color: rgba(255, 255, 255, 0.25) !important;
}

.code-block-wrapper pre {
  margin: 0 !important;
  padding: 14px 16px !important;
  overflow-x: auto !important;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace !important;
  font-size: 0.86rem !important;
  line-height: 1.5 !important;
  color: #f4f4f5 !important;
  white-space: pre !important;
  tab-size: 2 !important;
}

.code-block-wrapper code {
  font-family: inherit !important;
  padding: 0 !important;
  background: transparent !important;
  border-radius: 0 !important;
  border: none !important;
  white-space: pre !important;
}

.code-block-wrapper code {
  font-family: inherit !important;
  padding: 0 !important;
  background: transparent !important;
  border-radius: 0 !important;
}

/* ==========================================================================
   DÜŞÜNCE SÜRECİ AKORDEONU
   ========================================================================== */
.thinking-accordion-card {
  border: 1px solid var(--thinking-border);
  background: var(--thinking-bg);
  border-radius: var(--radius-md);
  overflow: hidden;
  margin-bottom: 4px;
}

.thinking-accordion-head {
  padding: 7px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-muted);
  user-select: none;
}

.thinking-accordion-head:hover {
  background: rgba(255, 255, 255, 0.04);
}

.thinking-head-left {
  display: flex;
  align-items: center;
  gap: 6px;
}

.thinking-accordion-body {
  padding: 9px 12px;
  font-size: 0.82rem;
  color: var(--text-dim);
  border-top: 1px solid var(--thinking-border);
  white-space: pre-wrap;
  line-height: 1.5;
  max-height: 250px;
  overflow-y: auto;
  background: rgba(0, 0, 0, 0.2);
}

.thinking-accordion-body.hidden {
  display: none;
}

/* ==========================================================================
   YANIT SONU META BARI: SÜRE + % DOLULUK + LİKE/DİSLİKE
   ========================================================================== */
.msg-meta-bar {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  font-size: 0.74rem;
  color: var(--text-dim);
  padding: 4px 4px 0 4px;
  position: relative;
}

.msg-duration-item {
  display: flex;
  align-items: center;
  gap: 4px;
}

.context-pill-badge {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-color);
  border-radius: 99px;
  padding: 2px 8px;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 0.72rem;
  font-weight: 600;
  transition: all var(--transition-fast);
}

.context-pill-badge:hover {
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.3);
}

.context-floating-card {
  position: absolute;
  bottom: calc(100% + 6px);
  right: 0;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 10px 14px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
  font-size: 0.76rem;
  z-index: 70;
  display: none;
  flex-direction: column;
  gap: 5px;
  min-width: 190px;
  backdrop-filter: blur(12px);
}

.context-floating-card.open {
  display: flex;
}

.context-card-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.context-card-row strong {
  color: var(--text-main);
}

/* Like & Dislike Butonları */
.msg-feedback-group {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-left: 4px;
}

.btn-msg-feedback {
  background: transparent;
  border: none;
  color: var(--text-dim);
  cursor: pointer;
  padding: 3px 6px;
  border-radius: 4px;
  font-size: 0.8rem;
  transition: all var(--transition-fast);
}

.btn-msg-feedback:hover {
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.08);
}

.btn-msg-feedback.liked {
  color: #10b981;
}

.btn-msg-feedback.disliked {
  color: #ef4444;
}

/* ==========================================================================
   TUTARLI SPONSOR KARTI (GÖRSEL 2 TARZI)
   ========================================================================== */
.sponsor-card-block {
  margin-top: 8px;
  padding: 8px 12px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  text-decoration: none;
  transition: all var(--transition-fast);
}

.sponsor-card-block:hover {
  background: var(--bg-card-hover);
  border-color: rgba(255, 255, 255, 0.2);
}

.sponsor-left-group {
  display: flex;
  align-items: center;
  gap: 10px;
  overflow: hidden;
}

.sponsor-logo-thumb {
  height: 20px;
  width: auto;
  max-width: 50px;
  object-fit: contain;
  filter: grayscale(40%);
}

.sponsor-tag-pill {
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 1px 5px;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-dim);
}

.sponsor-name-text {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-main);
}

.sponsor-desc-text {
  font-size: 0.72rem;
  color: var(--text-dim);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sponsor-dismiss-btn {
  background: transparent;
  border: none;
  color: var(--text-dim);
  cursor: pointer;
  font-size: 0.75rem;
  padding: 4px;
  border-radius: 4px;
}

.sponsor-dismiss-btn:hover {
  color: #ef4444;
}

/* ==========================================================================
   INPUT ALANI (İLK BAŞTA ORTADA, MESAJ ATILINCA AŞAĞIDA)
   ========================================================================== */
.hero-layout .page-view-container {
  display: flex !important;
  flex-direction: column !important;
  justify-content: center !important;
  align-items: center !important;
  height: 100vh !important;
}

.hero-layout .chat-viewport {
  flex: 0 0 auto !important;
  width: 100% !important;
  max-width: 760px !important;
  overflow: visible !important;
  padding: 0 !important;
}

.hero-layout .hero-center-box {
  padding: 0 16px 24px 16px !important;
  min-height: auto !important;
  margin: 0 auto !important;
}

.hero-layout .input-master-container {
  width: 100% !important;
  max-width: 760px !important;
  padding: 0 16px 40px 16px !important;
  margin: 0 auto !important;
  background: transparent !important;
  transition: all 0.45s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

.chat-active-layout .page-view-container {
  display: flex !important;
  flex-direction: column !important;
  height: 100vh !important;
  justify-content: flex-start !important;
}

.chat-active-layout .chat-viewport {
  flex: 1 !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
  -webkit-overflow-scrolling: touch !important;
  touch-action: pan-y !important;
  overscroll-behavior-y: contain !important;
}

.chat-active-layout .input-master-container {
  width: 100% !important;
  max-width: 780px !important;
  margin: 0 auto !important;
  padding: 10px 18px 24px 18px !important;
  background: var(--bg-primary) !important;
  transition: all 0.45s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

.input-master-container {
  padding: 10px 18px 24px 18px;
  width: 100%;
  max-width: 780px;
  margin: 0 auto;
  display: flex;
  justify-content: center;
  background: var(--bg-primary);
  flex-shrink: 0;
  z-index: 50;
  transition: all 0.45s cubic-bezier(0.16, 1, 0.3, 1);
}

.chat-input-card {
  width: 100%;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  padding: 12px 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.45);
  transition: all var(--transition-fast);
}

.chat-input-card:focus-within {
  border-color: rgba(255, 255, 255, 0.25);
  box-shadow: 0 0 20px var(--accent-glow);
}

.media-preview-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 10px;
  background: var(--bg-card);
  border-radius: var(--radius-sm);
  font-size: 0.78rem;
  width: fit-content;
  border: 1px solid var(--border-color);
}

.chat-main-textarea {
  width: 100%;
  background: transparent;
  border: none;
  outline: none;
  color: var(--text-main);
  font-size: 0.95rem;
  resize: none;
  max-height: 140px;
  min-height: 44px;
  line-height: 1.5;
  padding: 4px 2px;
}

.chat-tools-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.tools-left {
  display: flex;
  align-items: center;
  gap: 6px;
}

.tools-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.tool-btn {
  padding: 5px 10px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-color);
  border-radius: 99px;
  color: var(--text-muted);
  font-size: 0.76rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.tool-btn:hover {
  background: var(--bg-card-hover);
  color: var(--text-main);
}

.tool-btn.active {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.3);
  color: #fff;
  font-weight: 600;
}

.tool-btn.icon-only-tool {
  padding: 6px 9px;
}

/* Model Seçici Tool Butonu (Sağda, Gönderin Yanında) */
.model-selector-tool-btn {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.16);
  color: #fff;
  font-weight: 600;
}

.model-arrow-icon {
  font-size: 0.65rem;
  transition: transform var(--transition-fast);
}

/* Popover Açılır Menüler */
.popover-wrapper {
  position: relative;
}

.popover-menu {
  position: absolute;
  bottom: calc(100% + 8px);
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.6);
  display: none;
  flex-direction: column;
  z-index: 100;
  padding: 6px;
  backdrop-filter: blur(14px);
}

.popover-menu.open {
  display: flex;
  animation: modalPop 0.15s ease-out;
}

.model-menu-dropdown {
  right: 0;
  left: auto;
  min-width: 250px;
  gap: 4px;
}

.media-menu-dropdown {
  left: 0;
  min-width: 150px;
  gap: 2px;
}

.popover-menu-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  cursor: pointer;
  font-size: 0.82rem;
  transition: all var(--transition-fast);
}

.popover-menu-item:hover,
.popover-menu-item.active {
  background: var(--bg-card-hover);
  color: var(--text-main);
}

.popover-menu-item.active .item-title {
  font-weight: 700;
}

.item-icon-box {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.06);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-main);
  flex-shrink: 0;
}

.item-text-box {
  display: flex;
  flex-direction: column;
}

.item-title {
  font-size: 0.82rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 6px;
}

.item-desc {
  font-size: 0.7rem;
  color: var(--text-dim);
}

.badge-mini {
  font-size: 0.6rem;
  padding: 1px 4px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 3px;
}

.send-action-btn {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: #ffffff;
  border: none;
  color: #09090b;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 0.95rem;
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}

.send-action-btn:hover {
  transform: scale(1.06);
  box-shadow: 0 0 14px rgba(255, 255, 255, 0.3);
}

.send-action-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
  transform: none;
}

/* ==========================================================================
   BAĞIMSIZ TAM SAYFA ADMİN KONSOLU
   ========================================================================== */
.admin-standalone-page {
  position: fixed;
  inset: 0;
  background: var(--bg-primary);
  z-index: 2000;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}

.admin-navbar-bar {
  height: 60px;
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  position: sticky;
  top: 0;
  z-index: 100;
}

.admin-brand-group {
  display: flex;
  align-items: center;
  gap: 10px;
}

.admin-mini-logo {
  width: 28px;
  height: 28px;
  border-radius: 6px;
}

.admin-brand-title {
  font-weight: 800;
  font-size: 1.05rem;
  letter-spacing: 0.3px;
}

.admin-nav-tabs {
  display: flex;
  gap: 8px;
}

.admin-tab-btn {
  padding: 8px 14px;
  background: transparent;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  font-size: 0.84rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all var(--transition-fast);
}

.admin-tab-btn:hover {
  background: var(--bg-card-hover);
  color: var(--text-main);
}

.admin-tab-btn.active {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.2);
  color: #fff;
}

.admin-nav-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-nav-action {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  padding: 7px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.btn-nav-action:hover {
  background: rgba(255, 255, 255, 0.16);
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.3);
  transform: translateY(-1px);
}

.admin-tab-content-area {
  padding: 28px;
  max-width: 1100px;
  width: 100%;
  margin: 0 auto;
  flex: 1;
}

.admin-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 14px;
  margin-bottom: 24px;
}

.stat-metric-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  padding: 16px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  gap: 14px;
}

.stat-metric-card>div,
.stat-metric-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
  flex: 1;
}

.stat-icon-wrap {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.05);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  color: #fff;
  flex-shrink: 0;
}

.stat-metric-val {
  font-size: 1.55rem;
  font-weight: 800;
  color: var(--text-main);
  line-height: 1.1;
  display: block;
}

.stat-metric-title {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-dim);
  display: block;
  line-height: 1.2;
}

.stat-metric-sub {
  font-size: 0.72rem;
  color: var(--text-muted);
  display: block;
  line-height: 1.2;
}

.admin-card-panel {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 20px;
  margin-bottom: 24px;
}

.panel-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  flex-wrap: wrap;
  gap: 10px;
}

.panel-heading {
  font-size: 0.95rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
}

.admin-search-input {
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 6px 12px;
  color: var(--text-main);
  font-size: 0.82rem;
  outline: none;
}

.table-responsive-wrapper {
  overflow-x: auto;
}

.modern-data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.84rem;
}

.modern-data-table th,
.modern-data-table td {
  padding: 10px 14px;
  text-align: left;
  border-bottom: 1px solid var(--border-color);
}

.modern-data-table th {
  color: var(--text-dim);
  font-weight: 600;
  font-size: 0.76rem;
  text-transform: uppercase;
}

/* Feedback Oran Kartı */
.feedback-stats-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
  margin-bottom: 24px;
}

.feedback-metric-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.feedback-metric-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.feedback-bar-track {
  width: 100%;
  height: 8px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

.feedback-bar-fill-like {
  height: 100%;
  background: #10b981;
}

.feedback-bar-fill-dislike {
  height: 100%;
  background: #ef4444;
}

/* ==========================================================================
   KİŞİSELLEŞTİRME & VERİ KONTROLLERİ (GÖRSEL 3 BİREBİR TASARIM)
   ========================================================================== */
.personalize-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 0;
  border-bottom: 1px solid var(--border-color);
  gap: 14px;
}

.personalize-label-col {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.personalize-label-col strong {
  font-size: 0.88rem;
  color: var(--text-main);
}

.personalize-label-col span {
  font-size: 0.74rem;
  color: var(--text-dim);
}

.personalize-dropdown-select {
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  color: var(--text-main);
  font-size: 0.84rem;
  font-weight: 500;
  outline: none;
  cursor: pointer;
}

.data-control-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 0;
  border-bottom: 1px solid var(--border-color);
  gap: 14px;
}

.data-danger-box {
  background: rgba(239, 68, 68, 0.05);
  border: 1px solid rgba(239, 68, 68, 0.2);
  border-radius: var(--radius-md);
  padding: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

/* Modern iOS Style Toggle Switch */
.toggle-switch {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
  flex-shrink: 0;
}

.toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.toggle-slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background-color: #334155;
  border: 1px solid var(--border-color);
  transition: 0.25s;
  border-radius: 24px;
}

.toggle-slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 2px;
  bottom: 2px;
  background-color: white;
  transition: 0.25s;
  border-radius: 50%;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.toggle-switch input:checked+.toggle-slider {
  background-color: #10b981;
  border-color: #10b981;
}

.toggle-switch input:checked+.toggle-slider:before {
  transform: translateX(20px);
}

[data-theme="light"] .toggle-slider {
  background-color: #cbd5e1 !important;
  border: 1px solid #94a3b8 !important;
}

[data-theme="light"] .toggle-slider:before {
  background-color: #ffffff !important;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.25) !important;
}

[data-theme="light"] .toggle-switch input:checked+.toggle-slider {
  background-color: #10b981 !important;
  border-color: #10b981 !important;
}

/* 3 Tema Kartları (Görsel 3 Düzeltmesi) */
.theme-grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-top: 14px;
}

.theme-item-card {
  background: var(--bg-card);
  border: 2px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 16px 12px;
  cursor: pointer;
  transition: all var(--transition-fast);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  position: relative;
}

.theme-item-card:hover {
  border-color: var(--border-hover);
  background: var(--bg-card-hover);
  transform: translateY(-2px);
}

.theme-item-card.active {
  border-color: var(--accent-color) !important;
  box-shadow: 0 0 16px var(--accent-glow);
}

.theme-sample {
  width: 100%;
  height: 60px;
  border-radius: var(--radius-md);
  margin-bottom: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  position: relative;
  overflow: hidden;
}

.theme-sample.dark {
  background: #09090b;
  border-color: rgba(255, 255, 255, 0.15);
}

.theme-sample.dark::after {
  content: "";
  position: absolute;
  top: 14px;
  left: 14px;
  right: 14px;
  height: 10px;
  background: #27272a;
  border-radius: 4px;
}

.theme-sample.light {
  background: #ffffff;
  border-color: #cbd5e1;
}

.theme-sample.light::after {
  content: "";
  position: absolute;
  top: 14px;
  left: 14px;
  right: 14px;
  height: 10px;
  background: #e2e8f0;
  border-radius: 4px;
}

.theme-sample.system {
  background: linear-gradient(135deg, #09090b 50%, #ffffff 50%);
  border-color: rgba(255, 255, 255, 0.15);
}

.theme-name {
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--text-main);
  margin-bottom: 4px;
}

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

/* Buton Stilleri */
.btn-danger-action {
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  background: #ef4444;
  border: none;
  color: #fff;
  font-weight: 600;
  font-size: 0.82rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
  transition: background var(--transition-fast);
}

.btn-danger-action:hover {
  background: #dc2626;
}

.btn-secondary-sm {
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  cursor: pointer;
  font-size: 0.8rem;
  font-weight: 500;
}

.btn-secondary-sm:hover {
  background: var(--bg-card-hover);
}

/* ==========================================================================
   MODALLAR
   ========================================================================== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(8px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 99999 !important;
  padding: 16px;
}

/* ==========================================================================
   MODAL HİYERARŞİSİ VE Z-INDEX KURALI (İÇ İÇE AÇILAN MODALLAR KARIŞMAZ)
   Layer 1 (99999):   Ana pencereler (#profile-modal, vb.)
   Layer 2 (100100):  Ayarlar/Sohbet üstünde açılan pencereler (#memory-modal, #gmail-plugin-modal, vb.)
   Layer 3 (100200):  En üst onay ve silme pencereleri (#memory-reset-modal, #delete-confirm-modal, vb.)
   ========================================================================== */
#memory-modal,
#gmail-plugin-modal,
#privacy-modal,
#about-modal,
#create-key-modal,
#api-key-created-modal,
#doc-preview-modal,
#code-preview-modal,
#media-lightbox-modal,
#admin-rag-modal,
#admin-user-limit-modal {
  z-index: 100100 !important;
}

#privacy-modal {
  z-index: 100150 !important;
}

#memory-reset-modal,
#delete-confirm-modal,
#api-key-delete-modal,
#delete-account-modal,
#feedback-modal {
  z-index: 100200 !important;
}

.modal-overlay.active {
  display: flex;
}

.modal-box {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  max-width: 540px;
  width: 100%;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 16px 50px rgba(0, 0, 0, 0.6);
  overflow: hidden;
  animation: modalPop 0.15s ease-out;
}

.modal-box.compact-modal {
  max-width: 420px;
}

/* GENİŞ SETTINGS / PROFİL MODALI (Görsel 5 Masaüstü Sol Menü Tasarımı) */
.modal-box.modal-box-wide {
  max-width: 860px;
  width: 95vw;
  min-height: 520px;
  max-height: 85vh;
  display: flex;
  flex-direction: row;
  padding: 0;
  overflow: hidden;
  border-radius: var(--radius-xl);
}

.modal-settings-sidebar {
  width: 220px;
  background: var(--modal-sidebar-bg);
  border-right: 1px solid var(--border-color);
  padding: 20px 14px;
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
}

.modal-settings-brand {
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 20px;
  padding-left: 6px;
}

.modal-settings-nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
}

.modal-settings-nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-radius: var(--radius-md);
  color: var(--text-muted);
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  background: transparent;
  width: 100%;
  text-align: left;
  transition: all var(--transition-fast);
}

.modal-settings-nav-item:hover {
  background: var(--bg-card-hover);
  color: var(--text-main);
}

.modal-settings-nav-item.active {
  background: var(--accent-color);
  color: var(--accent-contrast);
}

.modal-settings-nav-item i {
  font-size: 0.92rem;
  width: 18px;
  text-align: center;
}

.modal-settings-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  background: var(--modal-content-bg);
  min-width: 0;
  overflow: hidden;
}

.modal-settings-header {
  padding: 16px 24px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
}

.modal-settings-header h3 {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-main);
}

.modal-settings-body {
  padding: 24px;
  overflow-y: auto;
  flex: 1;
}

.modal-settings-footer {
  padding: 14px 24px;
  border-top: 1px solid var(--border-color);
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  flex-shrink: 0;
}

.feedback-textarea {
  width: 100% !important;
  box-sizing: border-box !important;
  min-height: 100px !important;
  background: var(--bg-input) !important;
  color: var(--text-main) !important;
  border: 1px solid var(--border-color) !important;
  border-radius: var(--radius-md) !important;
  padding: 12px !important;
  font-family: inherit !important;
  font-size: 0.88rem !important;
  line-height: 1.5 !important;
}

.btn-msg-feedback:disabled {
  cursor: default !important;
  opacity: 0.7;
}

.btn-msg-feedback.liked {
  color: #10b981 !important;
  opacity: 1 !important;
}

.btn-msg-feedback.disliked {
  color: #ef4444 !important;
  opacity: 1 !important;
}

.modal-header {
  padding: 14px 18px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-title-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1rem;
  font-weight: 700;
}

.modal-close-btn {
  background: transparent;
  border: none;
  color: var(--text-dim);
  font-size: 1.1rem;
  cursor: pointer;
  padding: 4px 6px;
  border-radius: var(--radius-sm);
  transition: all var(--transition-fast);
}

.modal-close-btn:hover {
  color: var(--text-main);
  background: var(--bg-card-hover);
}

.modal-nav-tabs {
  display: flex;
  padding: 0 18px;
  border-bottom: 1px solid var(--border-color);
  gap: 12px;
  background: rgba(255, 255, 255, 0.02);
  overflow-x: auto;
}

.modal-tab-btn {
  padding: 11px 4px;
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-size: 0.84rem;
  font-weight: 600;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  transition: all var(--transition-fast);
}

.modal-tab-btn.active {
  color: #fff;
  border-color: #fff;
}

.modal-body {
  padding: 18px;
  overflow-y: auto;
  flex: 1;
}

.form-group {
  margin-bottom: 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
}

.form-control {
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 10px 12px;
  color: var(--text-main);
  font-size: 0.88rem;
  outline: none;
  transition: border-color var(--transition-fast);
}

.form-control:focus {
  border-color: rgba(255, 255, 255, 0.35);
}

.form-help {
  font-size: 0.72rem;
  color: var(--text-dim);
}

.modal-footer {
  padding: 12px 18px;
  border-top: 1px solid var(--border-color);
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.btn-modal-cancel {
  padding: 7px 14px;
  border-radius: var(--radius-sm);
  background: transparent;
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  cursor: pointer;
  font-weight: 500;
  font-size: 0.84rem;
}

.btn-modal-save {
  padding: 7px 16px;
  border-radius: var(--radius-sm);
  background: #ffffff;
  border: none;
  color: #09090b;
  cursor: pointer;
  font-weight: 700;
  font-size: 0.84rem;
  display: flex;
  align-items: center;
  gap: 6px;
}

.google-auth-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 12px;
  border-radius: var(--radius-md);
  background: #ffffff;
  color: #0f172a;
  text-decoration: none;
  font-weight: 700;
  font-size: 0.92rem;
  transition: transform var(--transition-fast);
}

.google-auth-btn:hover {
  transform: translateY(-1px);
}

/* ==========================================================================
   RESPONSIVE DÜZENLEME
   ========================================================================== */
@media (max-width: 768px) {
  .sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    height: 100dvh !important;
    max-height: 100dvh !important;
    width: 270px !important;
    transform: translateX(-100%);
    box-shadow: 10px 0 30px rgba(0, 0, 0, 0.7);
    display: flex !important;
    flex-direction: column !important;
    overflow: hidden !important;
  }

  .sidebar.mobile-open {
    transform: translateX(0);
  }

  .hide-mobile {
    display: none !important;
  }

  .input-master-container {
    padding: 6px 10px 14px 10px;
  }

  .chat-input-card {
    border-radius: var(--radius-lg);
    padding: 8px 10px;
  }

  .messages-container {
    padding: 20px 10px 24px 10px;
  }

  .message-row.user .message-content-col {
    max-width: 90%;
  }

  .message-row.assistant .message-content-col {
    max-width: 88%;
  }

  .admin-navbar-bar {
    padding: 0 12px;
    flex-wrap: wrap;
    height: auto;
    gap: 8px;
    padding-top: 10px;
    padding-bottom: 10px;
  }

  .admin-nav-tabs {
    order: 3;
    width: 100%;
    overflow-x: auto;
  }

  .theme-grid-3 {
    grid-template-columns: 1fr;
  }
}


.inline-edit-box {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: var(--bg-input);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: var(--radius-lg);
  padding: 12px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
}

.inline-edit-textarea {
  width: 100%;
  min-height: 70px;
  max-height: 200px;
  background: transparent;
  border: none;
  color: var(--text-main);
  font-family: inherit;
  font-size: 0.92rem;
  line-height: 1.5;
  resize: vertical;
  outline: none;
}

.inline-edit-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.btn-cancel-edit {
  padding: 6px 14px;
  border-radius: var(--radius-sm);
  background: transparent;
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
}

.btn-cancel-edit:hover {
  color: var(--text-main);
  background: var(--bg-card-hover);
}

.btn-submit-edit {
  padding: 6px 16px;
  border-radius: var(--radius-sm);
  background: #ffffff;
  color: #09090b;
  border: none;
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
}

.btn-submit-edit:hover {
  background: #e4e4e7;
}

.btn-load-older-msgs {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  border-radius: 20px;
  padding: 6px 16px;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s;
  margin: 10px auto;
}

.btn-load-older-msgs:hover {
  background: var(--bg-card-hover);
  color: var(--text-main);
  border-color: rgba(255, 255, 255, 0.25);
}

/* ==========================================================================
   CANLI KOD VE WEB ÖNİZLEME MODALI
   ========================================================================== */
.preview-modal-overlay {
  z-index: 3000 !important;
  padding: 20px !important;
}

.code-preview-window {
  width: 96vw;
  max-width: 1400px;
  height: 90vh;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.7);
  animation: modalPop 0.2s ease-out;
}

.preview-window-header {
  height: 52px;
  padding: 0 18px;
  background: var(--bg-input);
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
}

.preview-title-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-main);
}

.preview-header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.preview-device-toggle {
  display: flex;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  padding: 2px;
  gap: 2px;
}

.device-btn {
  background: transparent;
  border: none;
  color: var(--text-dim);
  width: 28px;
  height: 26px;
  border-radius: 4px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  transition: all 0.15s;
}

.device-btn.active {
  background: var(--accent-color);
  color: var(--accent-contrast);
}

.preview-header-btn {
  background: transparent;
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  width: 32px;
  height: 32px;
  border-radius: 6px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  transition: all 0.15s;
}

.preview-header-btn:hover {
  background: var(--bg-card-hover);
  color: var(--text-main);
  border-color: rgba(255, 255, 255, 0.25);
}

.preview-close-btn {
  background: transparent;
  border: none;
  color: var(--text-dim);
  font-size: 1.2rem;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 6px;
  margin-left: 4px;
  transition: all 0.15s;
}

.preview-close-btn:hover {
  color: #ef4444;
  background: rgba(239, 68, 68, 0.1);
}

.preview-split-body {
  flex: 1;
  display: flex;
  min-height: 0;
  overflow: hidden;
}

.preview-editor-pane {
  flex: 1;
  display: flex;
  flex-direction: column;
  border-right: 1px solid var(--border-color);
  background: #0d0d11;
  min-width: 0;
}

.preview-display-pane {
  flex: 1.2;
  display: flex;
  flex-direction: column;
  background: #ffffff;
  min-width: 0;
  position: relative;
  transition: all 0.25s ease;
}

.preview-display-pane.device-mobile {
  max-width: 390px;
  margin: 16px auto;
  border-radius: 28px;
  border: 8px solid #27272a;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  overflow: hidden;
}

.pane-header-title {
  padding: 8px 16px;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-dim);
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.02);
}

.preview-code-textarea {
  flex: 1;
  width: 100%;
  padding: 16px;
  background: transparent;
  border: none;
  color: #f4f4f5;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.88rem;
  line-height: 1.6;
  resize: none;
  outline: none;
  white-space: pre;
  overflow: auto;
  tab-size: 2;
}

.preview-iframe {
  flex: 1;
  width: 100%;
  height: 100%;
  border: none;
  background: #ffffff;
}

@media (max-width: 900px) {
  .preview-split-body {
    flex-direction: column;
  }

  .preview-editor-pane {
    height: 45%;
    border-right: none;
    border-bottom: 1px solid var(--border-color);
  }

  .preview-display-pane {
    height: 55%;
  }
}

/* ==========================================================================
   ADMİN AUTH LOCK KARTI (ŞİFRE GİRİLENE KADAR PANELİ 100% KAPATIR)
   ========================================================================== */
.admin-auth-screen {
  position: fixed !important;
  inset: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  z-index: 999999 !important;
  background: #070a11 !important;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.admin-auth-box {
  max-width: 440px;
  width: 100%;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  padding: 38px 30px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.85);
  animation: modalPop 0.25s ease-out;
}

.admin-lock-icon-wrap {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  color: #fff;
  margin-bottom: 18px;
}

.admin-lock-title {
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--text-main);
  margin-bottom: 8px;
}

.admin-lock-desc {
  font-size: 0.86rem;
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: 22px;
}

.btn-primary-block {
  width: 100%;
  padding: 11px;
  border-radius: var(--radius-md);
  background: #ffffff;
  color: #09090b;
  border: none;
  font-weight: 700;
  font-size: 0.92rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 6px;
  transition: transform 0.15s, box-shadow 0.15s;
}

.btn-primary-block:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(255, 255, 255, 0.25);
}

.btn-link-back {
  background: transparent;
  border: none;
  color: var(--text-dim);
  font-size: 0.82rem;
  margin-top: 16px;
  cursor: pointer;
  transition: color 0.15s;
}

.btn-link-back:hover {
  color: var(--text-main);
}

/* ==========================================================================
   MODERN 24 SAATLİK İSTEK GRAFİĞİ (GÖRSEL 2 KARE BLOK BUG'I GİDERİLDİ)
   ========================================================================== */
.admin-chart-bars-wrap {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  height: 170px;
  padding: 20px 8px 8px 8px;
  position: relative;
  border-bottom: 1px solid var(--border-color);
}

.chart-bar-col {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  height: 100%;
  position: relative;
  cursor: pointer;
}

.chart-bar-pillar {
  width: 100%;
  max-width: 20px;
  background: linear-gradient(180deg, #10b981 0%, rgba(16, 185, 129, 0.25) 100%);
  border-radius: 6px 6px 2px 2px;
  transition: height 0.3s cubic-bezier(0.16, 1, 0.3, 1), transform 0.2s, background 0.2s;
  min-height: 4px;
}

.chart-bar-col:hover .chart-bar-pillar {
  background: linear-gradient(180deg, #34d399 0%, #059669 100%);
  box-shadow: 0 0 14px rgba(16, 185, 129, 0.5);
  transform: scaleY(1.05);
}

.chart-bar-val {
  font-size: 0.72rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 4px;
  opacity: 0.9;
}

.chart-bar-label {
  font-size: 0.68rem;
  color: var(--text-dim);
  margin-top: 8px;
  white-space: nowrap;
}

.chart-bar-tooltip {
  display: none;
  position: absolute;
  bottom: calc(100% + 8px);
  background: #18181c;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 6px;
  padding: 4px 8px;
  font-size: 0.72rem;
  color: #fff;
  white-space: nowrap;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
  pointer-events: none;
  z-index: 20;
}

.chart-bar-col:hover .chart-bar-tooltip {
  display: block;
}

/* ==========================================================================
   ÖZEL KİŞİSELLEŞTİRME DROPDOWN MENÜSÜ (GÖRSEL 8 BİREBİR TASARIM)
   ========================================================================== */
.custom-dropdown-wrap {
  position: relative;
  display: inline-block;
}

.custom-dropdown-btn {
  background: var(--dropdown-bg);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  padding: 6px 14px;
  border-radius: 12px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all var(--transition-fast);
}

.custom-dropdown-btn:hover {
  border-color: var(--border-hover);
  background: var(--bg-card-hover);
}

.dropdown-arrow-icon {
  font-size: 0.68rem;
  color: var(--text-dim);
  transition: transform 0.2s;
}

.custom-dropdown-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  width: 270px;
  max-height: 320px;
  overflow-y: auto;
  background: var(--bg-secondary);
  border: 1px solid var(--border-hover);
  border-radius: 14px;
  padding: 6px;
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.45);
  z-index: 1050;
  display: none;
  flex-direction: column;
  gap: 2px;
  animation: modalPop 0.15s ease-out;
}

.custom-dropdown-menu.open {
  display: flex !important;
}

.custom-dropdown-item {
  padding: 8px 12px;
  border-radius: 10px;
  cursor: pointer;
  transition: background 0.15s;
  display: flex;
  flex-direction: column;
}

.custom-dropdown-item:hover {
  background: rgba(255, 255, 255, 0.06);
}

.custom-dropdown-item.active {
  background: rgba(255, 255, 255, 0.12);
}

[data-theme="light"] .custom-dropdown-item:hover {
  background: rgba(0, 0, 0, 0.05);
}

[data-theme="light"] .custom-dropdown-item.active {
  background: rgba(0, 0, 0, 0.08);
}

.dropdown-item-title {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-main);
  line-height: 1.3;
}

.dropdown-item-desc {
  font-size: 0.74rem;
  color: var(--text-dim);
  margin-top: 2px;
  line-height: 1.25;
}

/* ==========================================================================
   MESAJ DÜZENLEME & BRANCHING STİLLERİ
   ========================================================================== */
.message-row.user {
  position: relative;
}

.message-row.user:hover .user-msg-actions {
  opacity: 1;
  visibility: visible;
}

.user-msg-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 4px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s;
}

.btn-edit-user-msg {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  font-size: 0.74rem;
  padding: 4px 10px;
  border-radius: 6px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s;
}

.btn-edit-user-msg:hover {
  background: rgba(255, 255, 255, 0.12);
  color: var(--text-main);
  border-color: var(--border-hover);
}

.inline-edit-box {
  width: 100%;
  max-width: 580px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 12px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}

.inline-edit-textarea {
  width: 100%;
  background: transparent;
  border: none;
  outline: none;
  color: var(--text-main);
  font-family: inherit;
  font-size: 0.94rem;
  line-height: 1.5;
  resize: none;
  padding: 0;
  margin-bottom: 10px;
}

.inline-edit-actions {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 8px;
}

.btn-edit-cancel {
  background: transparent;
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  padding: 5px 12px;
  border-radius: 8px;
  font-size: 0.82rem;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-edit-cancel:hover {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-main);
}

.btn-edit-submit {
  background: #3b82f6;
  border: none;
  color: #fff;
  padding: 6px 14px;
  border-radius: 8px;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s;
}

.btn-edit-submit:hover {
  background: #2563eb;
}

/* ==========================================================================
   AÇIK TEMA (LIGHT MODE) KESİN KONTRAST VE NETLİK KURALLARI
   ========================================================================== */
[data-theme="light"] .tool-btn.active {
  background: rgba(15, 23, 42, 0.1) !important;
  border-color: rgba(15, 23, 42, 0.3) !important;
  color: #0f172a !important;
}

[data-theme="light"] .model-selector-tool-btn {
  background: rgba(15, 23, 42, 0.05) !important;
  border-color: rgba(15, 23, 42, 0.2) !important;
  color: #0f172a !important;
}

[data-theme="light"] .floating-menu-btn {
  background: #ffffff !important;
  border-color: #cbd5e1 !important;
  color: #0f172a !important;
}

[data-theme="light"] .hero-main-title {
  background: linear-gradient(135deg, #0f172a 15%, #1e293b 60%, #475569 100%) !important;
  -webkit-background-clip: text !important;
  -webkit-text-fill-color: transparent !important;
  color: #0f172a !important;
}

[data-theme="light"] .chat-input-card {
  background: #ffffff !important;
  border-color: #cbd5e1 !important;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.06) !important;
}

[data-theme="light"] .chat-main-textarea {
  color: #0f172a !important;
}

[data-theme="light"] .chat-main-textarea::placeholder {
  color: #94a3b8 !important;
}

[data-theme="light"] .btn-send-message {
  background: #0f172a !important;
  color: #ffffff !important;
}

[data-theme="light"] .btn-send-message:hover {
  background: #1e293b !important;
}

[data-theme="light"] .code-block-wrapper {
  background: #f1f5f9 !important;
  border-color: #e2e8f0 !important;
}

[data-theme="light"] .code-block-wrapper pre {
  background: #f8fafc !important;
  color: #0f172a !important;
}

[data-theme="light"] .admin-standalone-page {
  background: #f8fafc !important;
  color: #0f172a !important;
}

[data-theme="light"] .admin-navbar-bar {
  background: #ffffff !important;
  border-color: #e2e8f0 !important;
}

[data-theme="light"] .admin-card-panel {
  background: #ffffff !important;
  border-color: #e2e8f0 !important;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03) !important;
}

[data-theme="light"] .stat-metric-card {
  background: #ffffff !important;
  border-color: #e2e8f0 !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.02) !important;
}

[data-theme="light"] .stat-metric-title {
  color: #64748b !important;
}

[data-theme="light"] .stat-metric-val {
  color: #0f172a !important;
}

[data-theme="light"] .stat-metric-sub {
  color: #94a3b8 !important;
}

[data-theme="light"] .modern-data-table th {
  background: #f1f5f9 !important;
  color: #334155 !important;
  border-color: #e2e8f0 !important;
}

[data-theme="light"] .modern-data-table td {
  color: #0f172a !important;
  border-color: #f1f5f9 !important;
}

[data-theme="light"] .modern-data-table tr:hover td {
  background: #f8fafc !important;
}

[data-theme="light"] .admin-tab-btn {
  color: #64748b !important;
}

[data-theme="light"] .admin-tab-btn:hover {
  background: #f1f5f9 !important;
  color: #0f172a !important;
}

[data-theme="light"] .admin-tab-btn.active {
  background: #0f172a !important;
  color: #ffffff !important;
  border-color: #0f172a !important;
}

[data-theme="light"] .btn-nav-action {
  background: #f1f5f9 !important;
  color: #0f172a !important;
  border-color: #cbd5e1 !important;
}

[data-theme="light"] .btn-nav-action:hover {
  background: #e2e8f0 !important;
  color: #000000 !important;
}

[data-theme="light"] .admin-search-input,
[data-theme="light"] .form-control {
  background: #ffffff !important;
  color: #0f172a !important;
  border-color: #cbd5e1 !important;
}

[data-theme="light"] .excel-preview-table th {
  background: #f1f5f9 !important;
  color: #0f172a !important;
  border-color: #cbd5e1 !important;
}

[data-theme="light"] .excel-preview-table td {
  background: #ffffff !important;
  color: #0f172a !important;
  border-color: #e2e8f0 !important;
}

[data-theme="light"] .btn-edit-user-msg {
  background: #f1f5f9 !important;
  border-color: #cbd5e1 !important;
  color: #475569 !important;
}

[data-theme="light"] .btn-edit-user-msg:hover {
  background: #e2e8f0 !important;
  color: #0f172a !important;
}

[data-theme="light"] .msg-duration-item,
[data-theme="light"] .context-pill-badge {
  background: #f1f5f9 !important;
  border-color: #cbd5e1 !important;
  color: #475569 !important;
}

[data-theme="light"] .btn-msg-feedback {
  color: #64748b !important;
  background: rgba(0, 0, 0, 0.04) !important;
  border: 1px solid #cbd5e1 !important;
}

[data-theme="light"] .btn-msg-feedback:hover {
  color: #0f172a !important;
  background: #e2e8f0 !important;
}

.btn-msg-feedback.liked,
[data-theme="light"] .btn-msg-feedback.liked {
  color: #059669 !important;
  background: rgba(16, 185, 129, 0.18) !important;
  border: 1px solid #10b981 !important;
  font-weight: 700 !important;
  opacity: 1 !important;
}

.btn-msg-feedback.disliked,
[data-theme="light"] .btn-msg-feedback.disliked {
  color: #dc2626 !important;
  background: rgba(239, 68, 68, 0.18) !important;
  border: 1px solid #ef4444 !important;
  font-weight: 700 !important;
  opacity: 1 !important;
}

[data-theme="light"] .sponsor-card-block {
  background: #ffffff !important;
  border-color: #e2e8f0 !important;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.04) !important;
}

[data-theme="light"] .modal-box {
  background: #ffffff !important;
  border-color: #cbd5e1 !important;
}

[data-theme="light"] .modal-header {
  border-color: #e2e8f0 !important;
}

[data-theme="light"] .modal-footer {
  border-color: #e2e8f0 !important;
}

/* ==========================================================================
   YENİ EKLENEN MODERN BİLEŞENLER & MOBİL AYARLAR
   ========================================================================== */

/* Mobil Ayarlar / Profil Modalı Responsive Çözümü */
@media (max-width: 680px) {
  .modal-box.modal-box-wide {
    flex-direction: column !important;
    width: 95vw !important;
    max-height: 92vh !important;
    min-height: 480px !important;
  }

  .modal-settings-sidebar {
    width: 100% !important;
    border-right: none !important;
    border-bottom: 1px solid var(--border-color) !important;
    padding: 16px 14px !important;
  }

  .modal-settings-content {
    display: none !important;
    width: 100% !important;
  }

  /* Sekme açıldığında sol menü gizlenir, içerik tam ekran olur */
  .modal-box.modal-box-wide.mobile-tab-open .modal-settings-sidebar {
    display: none !important;
  }

  .modal-box.modal-box-wide.mobile-tab-open .modal-settings-content {
    display: flex !important;
    width: 100% !important;
    flex: 1 !important;
  }

  .btn-settings-mobile-back {
    display: inline-flex !important;
  }
}

.btn-settings-mobile-back {
  display: none;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  font-size: 0.82rem;
  font-weight: 600;
  padding: 5px 12px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-settings-mobile-back:hover {
  background: rgba(255, 255, 255, 0.16);
}

/* Akış Durdurma (Stop) Butonu */
.btn-send-message.btn-stop-stream {
  background: #ef4444 !important;
  color: #ffffff !important;
  box-shadow: 0 0 14px rgba(239, 68, 68, 0.45) !important;
  border: 1px solid #dc2626 !important;
}

.btn-send-message.btn-stop-stream:hover {
  background: #dc2626 !important;
}

/* Sohbet İçi Etkileşimli Grafikler (Chart.js) */
.chat-chart-card {
  margin: 14px 0;
  padding: 16px;
  background: rgba(15, 23, 42, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(10px);
}

.chat-chart-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.chat-chart-title {
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 8px;
}

.chat-chart-canvas-wrap {
  position: relative;
  height: 280px;
  width: 100%;
}

/* Belge & Excel Kartları */
.doc-attachment-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 16px;
  margin: 12px 0;
  background: rgba(16, 185, 129, 0.08);
  border: 1px solid rgba(16, 185, 129, 0.25);
  border-radius: 10px;
  transition: all 0.2s;
  flex-wrap: wrap;
}

.doc-attachment-card:hover {
  border-color: rgba(16, 185, 129, 0.45);
  background: rgba(16, 185, 129, 0.12);
}

.doc-card-info {
  display: flex;
  align-items: center;
  gap: 12px;
}

.doc-card-icon {
  font-size: 1.8rem;
  color: #10b981;
}

.doc-card-name {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text-main);
}

.doc-card-sub {
  font-size: 0.76rem;
  color: var(--text-muted);
}

.doc-card-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-doc-preview {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  font-size: 0.78rem;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: 6px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.15s;
}

.btn-doc-preview:hover {
  background: rgba(255, 255, 255, 0.16);
}

.btn-doc-download {
  background: #10b981;
  border: none;
  color: #09090b;
  font-size: 0.78rem;
  font-weight: 700;
  padding: 6px 14px;
  border-radius: 6px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.15s;
}

.btn-doc-download:hover {
  background: #059669;
  color: #ffffff;
}

.excel-preview-scroll-wrap {
  width: 100%;
  overflow-x: auto;
}

.excel-preview-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
  background: #09090b;
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.excel-preview-table th {
  background: #1e293b;
  color: #94a3b8;
  font-weight: 600;
  padding: 8px 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  text-align: left;
}

.excel-preview-table td {
  padding: 8px 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--text-main);
}

.excel-preview-table tr:nth-child(even) td {
  background: rgba(255, 255, 255, 0.02);
}

/* Hakkında & Sponsorlar */
.about-hero-box {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px;
  background: rgba(59, 130, 246, 0.08);
  border: 1px solid rgba(59, 130, 246, 0.2);
  border-radius: 12px;
  margin-bottom: 12px;
}

.sponsors-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 12px;
}

.sponsor-brand-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  padding: 14px;
  transition: all 0.2s;
}

.sponsor-brand-card:hover {
  border-color: rgba(255, 255, 255, 0.25);
  transform: translateY(-2px);
}

.sponsor-card-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.sponsor-badge-tag {
  font-size: 0.68rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-dim);
}

.sponsor-site-link {
  color: var(--text-dim);
  font-size: 0.82rem;
  transition: color 0.15s;
}

.sponsor-site-link:hover {
  color: #3b82f6;
}

.sponsor-card-name {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 4px;
}

.sponsor-card-desc {
  font-size: 0.78rem;
  color: var(--text-muted);
  line-height: 1.45;
  margin: 0;
}

/* API Anahtarları ve Dokümantasyon */
.api-limits-info-banner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  background: rgba(245, 158, 11, 0.08);
  border: 1px solid rgba(245, 158, 11, 0.25);
  border-radius: 8px;
  flex-wrap: wrap;
  gap: 8px;
}

.quota-badge {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 4px;
  background: rgba(245, 158, 11, 0.15);
  color: #f59e0b;
}

.api-key-item-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 14px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  margin-bottom: 8px;
  flex-wrap: wrap;
  gap: 8px;
}

.api-key-name {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-main);
}

.api-key-masked {
  font-family: monospace;
  font-size: 0.82rem;
  color: var(--text-dim);
  margin-top: 2px;
}

.api-docs-info-bar {
  display: flex;
  gap: 20px;
  padding: 10px 14px;
  background: rgba(59, 130, 246, 0.08);
  border: 1px solid rgba(59, 130, 246, 0.2);
  border-radius: 8px;
  font-size: 0.82rem;
  color: var(--text-main);
  flex-wrap: wrap;
}

.api-lang-tabs {
  display: flex;
  gap: 6px;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 8px;
  flex-wrap: wrap;
}

.api-lang-tab {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 0.82rem;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s;
}

.api-lang-tab.active {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-main);
}

.api-code-snippet {
  background: #09090b !important;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  padding: 14px;
  overflow-x: auto;
  font-family: monospace;
  font-size: 0.82rem;
  color: #f4f4f5;
  line-height: 1.5;
  margin-top: 12px;
}

/* Admin RAG Filtre Hapları */
.admin-filter-pill {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  font-size: 0.78rem;
  font-weight: 600;
  padding: 5px 12px;
  border-radius: 20px;
  cursor: pointer;
  transition: all 0.15s;
}

.admin-filter-pill.active,
.admin-filter-pill:hover {
  background: rgba(168, 85, 247, 0.2);
  border-color: rgba(168, 85, 247, 0.5);
  color: #ffffff;
}

/* ==========================================================================
   SOL SİDEBARLI YENİ MODERN ADMİN PANELİ DÜZENİ
   ========================================================================== */
.admin-standalone-page {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  background: var(--bg-main, #0b0f17);
  z-index: 2000;
  overflow: hidden;
  display: flex;
}

.admin-dashboard-wrapper {
  display: flex;
  width: 100%;
  height: 100vh;
  overflow: hidden;
  background: var(--bg-main, #0b0f17);
}

.admin-dashboard-wrapper[style*="display: none"],
.admin-dashboard-wrapper.hidden {
  display: none !important;
}

/* Sol Admin Sidebar */
.admin-sidebar {
  width: 260px;
  min-width: 260px;
  height: 100vh;
  background: #0d121d;
  border-right: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  z-index: 50;
  flex-shrink: 0;
}

.admin-sidebar-header {
  padding: 20px 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.admin-brand-group {
  display: flex;
  align-items: center;
  gap: 12px;
}

.admin-mini-logo {
  width: 32px;
  height: 32px;
  object-fit: contain;
  border-radius: 6px;
}

.admin-brand-details {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.admin-brand-title {
  font-weight: 800;
  font-size: 1.05rem;
  letter-spacing: 0.5px;
  color: #f8fafc;
}

.admin-brand-badge {
  font-size: 0.65rem;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
  background: rgba(59, 130, 246, 0.15);
  color: #38bdf8;
  border: 1px solid rgba(59, 130, 246, 0.3);
  display: inline-block;
  width: fit-content;
}

.admin-sidebar-nav {
  flex: 1;
  padding: 18px 12px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.admin-nav-category-title {
  font-size: 0.68rem;
  font-weight: 700;
  color: #64748b;
  letter-spacing: 0.8px;
  padding: 6px 10px;
  margin-bottom: 4px;
  text-transform: uppercase;
}

.admin-sidebar-tab-btn {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 11px 14px;
  border-radius: 8px;
  border: 1px solid transparent;
  background: transparent;
  color: #94a3b8;
  font-size: 0.88rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.18s ease;
  text-align: left;
}

.admin-sidebar-tab-btn i {
  font-size: 0.95rem;
  width: 18px;
  text-align: center;
  color: #64748b;
  transition: color 0.18s;
}

.admin-sidebar-tab-btn:hover {
  background: rgba(255, 255, 255, 0.05);
  color: #f8fafc;
}

.admin-sidebar-tab-btn:hover i {
  color: #38bdf8;
}

.admin-sidebar-tab-btn.active {
  background: rgba(56, 189, 248, 0.12);
  color: #38bdf8;
  border-color: rgba(56, 189, 248, 0.3);
  font-weight: 600;
}

.admin-sidebar-tab-btn.active i {
  color: #38bdf8;
}

.admin-sidebar-footer {
  padding: 14px 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.btn-admin-sidebar-action {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 9px 12px;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.03);
  color: #cbd5e1;
  font-size: 0.82rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-admin-sidebar-action:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
}

.btn-admin-sidebar-action.btn-admin-logout {
  color: #f87171;
  border-color: rgba(239, 68, 68, 0.2);
}

.btn-admin-sidebar-action.btn-admin-logout:hover {
  background: rgba(239, 68, 68, 0.12);
  border-color: rgba(239, 68, 68, 0.4);
}

/* Sağ Ana Admin İçerik Alanı */
.admin-main-container {
  flex: 1;
  height: 100vh;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  background: #0b0f17;
}

.admin-top-header {
  padding: 18px 28px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #0e1422;
  position: sticky;
  top: 0;
  z-index: 20;
}

.admin-header-title {
  font-size: 1.18rem;
  font-weight: 700;
  color: #f8fafc;
  margin: 0;
}

.admin-header-sub {
  font-size: 0.78rem;
  color: #94a3b8;
  margin: 3px 0 0 0;
}

.admin-header-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.74rem;
  font-weight: 600;
  background: rgba(16, 185, 129, 0.12);
  color: #10b981;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.status-pulse-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 8px #10b981;
  animation: pulseDot 2s infinite;
}

@keyframes pulseDot {
  0% {
    transform: scale(0.95);
    opacity: 0.7;
  }

  50% {
    transform: scale(1.2);
    opacity: 1;
  }

  100% {
    transform: scale(0.95);
    opacity: 0.7;
  }
}

.admin-tab-content-area {
  flex: 1;
  padding: 24px 28px;
}

/* Light Theme Admin Uyarlamaları */
[data-theme="light"] .admin-dashboard-wrapper,
[data-theme="light"] .admin-main-container {
  background: #f8fafc !important;
}

[data-theme="light"] .admin-sidebar {
  background: #ffffff !important;
  border-right-color: #e2e8f0 !important;
}

[data-theme="light"] .admin-sidebar-header {
  border-bottom-color: #e2e8f0 !important;
}

[data-theme="light"] .admin-brand-title {
  color: #0f172a !important;
}

[data-theme="light"] .admin-nav-category-title {
  color: #94a3b8 !important;
}

[data-theme="light"] .admin-sidebar-tab-btn {
  color: #475569 !important;
}

[data-theme="light"] .admin-sidebar-tab-btn i {
  color: #64748b !important;
}

[data-theme="light"] .admin-sidebar-tab-btn:hover {
  background: #f1f5f9 !important;
  color: #0f172a !important;
}

[data-theme="light"] .admin-sidebar-tab-btn.active {
  background: #eff6ff !important;
  color: #2563eb !important;
  border-color: #bfdbfe !important;
}

[data-theme="light"] .admin-sidebar-tab-btn.active i {
  color: #2563eb !important;
}

[data-theme="light"] .admin-sidebar-footer {
  border-top-color: #e2e8f0 !important;
}

[data-theme="light"] .btn-admin-sidebar-action {
  background: #f8fafc !important;
  border-color: #e2e8f0 !important;
  color: #334155 !important;
}

[data-theme="light"] .btn-admin-sidebar-action:hover {
  background: #f1f5f9 !important;
  color: #0f172a !important;
}

[data-theme="light"] .admin-top-header {
  background: #ffffff !important;
  border-bottom-color: #e2e8f0 !important;
}

[data-theme="light"] .admin-header-title {
  color: #0f172a !important;
}

[data-theme="light"] .admin-header-sub {
  color: #64748b !important;
}

[data-theme="light"] .admin-card-panel {
  background: #ffffff !important;
  border-color: #e2e8f0 !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05) !important;
}

[data-theme="light"] .stat-metric-card {
  background: #ffffff !important;
  border-color: #e2e8f0 !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04) !important;
}

[data-theme="light"] .stat-metric-val {
  color: #0f172a !important;
}

[data-theme="light"] .stat-metric-title {
  color: #64748b !important;
}

/* Modal Z-Index ve RAG Modal Düzeltmesi */
#admin-rag-modal {
  z-index: 100000 !important;
}

#admin-rag-modal.active {
  display: flex !important;
}

[data-theme="light"] #admin-rag-modal .modal-box {
  background: #ffffff !important;
  border-color: #cbd5e1 !important;
}

[data-theme="light"] #admin-rag-modal .form-control {
  background: #ffffff !important;
  border-color: #cbd5e1 !important;
  color: #0f172a !important;
}

/* Canlı Profil Fotoğrafı Önizleme Kutusu */
.avatar-live-preview-box {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: 2px solid var(--border-color);
  overflow: hidden;
  background: var(--bg-card);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

.avatar-live-preview-box img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Sponsor Modal Logoları */
.sponsor-modal-logo {
  height: 30px;
  max-width: 110px;
  object-fit: contain;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.2));
}

[data-theme="light"] .sponsor-modal-logo {
  filter: none;
}

/* Mobil Admin Sidebar Uyumluluğu */
@media (max-width: 768px) {
  .admin-dashboard-wrapper {
    flex-direction: column !important;
  }

  .admin-sidebar {
    width: 100% !important;
    min-width: 100% !important;
    height: auto !important;
    border-right: none !important;
    border-bottom: 1px solid var(--border-color) !important;
  }

  .admin-sidebar-nav {
    flex-direction: row !important;
    overflow-x: auto !important;
    padding: 8px 12px !important;
    gap: 8px !important;
  }

  .admin-nav-category-title {
    display: none !important;
  }

  .admin-sidebar-tab-btn {
    width: auto !important;
    white-space: nowrap !important;
    padding: 8px 12px !important;
  }

  .admin-sidebar-footer {
    display: none !important;
  }

  .admin-main-container {
    height: calc(100vh - 120px) !important;
  }

  .admin-top-header {
    padding: 14px 16px !important;
  }

  .admin-tab-content-area {
    padding: 16px !important;
  }
}

/* ==========================================================================
   SIDEBAR ARAMA BUTONU & LOGO HİZALAMA
   ========================================================================== */
.btn-sidebar-search {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-dim);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.btn-sidebar-search:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: var(--border-color);
  color: var(--text-main);
}

[data-theme="light"] .btn-sidebar-search:hover {
  background: #f1f5f9;
  border-color: #cbd5e1;
  color: #0f172a;
}

.sidebar.collapsed .btn-sidebar-search {
  display: none !important;
}

/* Sidebar History List İnce & Şık Scrollbar & Kusursuz Mobil Scroll */
.chat-history-list {
  flex: 1 1 0px !important;
  min-height: 0 !important;
  max-height: 100% !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
  -webkit-overflow-scrolling: touch !important;
  touch-action: pan-y !important;
  overscroll-behavior-y: contain !important;
  padding: 8px 6px 8px 10px;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.3) rgba(255, 255, 255, 0.02);
}

.chat-history-list::-webkit-scrollbar {
  width: 6px;
}

.chat-history-list::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.02);
  border-radius: 4px;
}

.chat-history-list::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.28);
  border-radius: 4px;
}

.chat-history-list::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.5);
}

[data-theme="light"] .chat-history-list {
  scrollbar-color: rgba(0, 0, 0, 0.3) rgba(0, 0, 0, 0.02);
}

[data-theme="light"] .chat-history-list::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.28);
}

[data-theme="light"] .chat-history-list::-webkit-scrollbar-thumb:hover {
  background: rgba(0, 0, 0, 0.5);
}

/* Açık Tema Sidebar Alt Bar Renk Uyumsuzluğu Düzeltmesi */
[data-theme="light"] .sidebar-footer {
  background: #f8fafc !important;
  border-top-color: #e2e8f0 !important;
}

[data-theme="light"] .sidebar-privacy-link-btn {
  color: #475569 !important;
}

[data-theme="light"] .sidebar-privacy-link-btn:hover {
  background: #edf2f7 !important;
  color: #0f172a !important;
}

/* ==========================================================================
   VUHUV ARAMA BİLDİRİMİ (CAMSI VE CANLI PARILTI)
   ========================================================================== */
.vuhuv-search-notice {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 6px 14px;
  margin-bottom: 10px;
  background: rgba(56, 189, 248, 0.08);
  border: 1px solid rgba(56, 189, 248, 0.25);
  border-radius: 20px;
  backdrop-filter: blur(8px);
  box-shadow: 0 4px 16px rgba(56, 189, 248, 0.1);
  animation: fadeIn 0.3s ease-out;
}

.vuhuv-search-notice .vuhuv-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 8px;
  background: rgba(56, 189, 248, 0.18);
  border-radius: 12px;
  font-size: 0.72rem;
  font-weight: 700;
  color: #38bdf8;
  letter-spacing: 0.02em;
}

.vuhuv-search-notice .vuhuv-badge i {
  animation: spinSlow 8s linear infinite;
}

@keyframes spinSlow {
  from {
    transform: rotate(0deg);
  }

  to {
    transform: rotate(360deg);
  }
}

.vuhuv-search-notice .vuhuv-query-text {
  font-size: 0.8rem;
  color: var(--text-main);
  opacity: 0.9;
}

[data-theme="light"] .vuhuv-search-notice {
  background: #f0f9ff;
  border-color: #bae6fd;
}

[data-theme="light"] .vuhuv-search-notice .vuhuv-badge {
  background: #0284c7;
  color: #ffffff;
}

[data-theme="light"] .vuhuv-search-notice .vuhuv-query-text {
  color: #0369a1;
}

/* ==========================================================================
   BELLEK (MEMORY) MODALI (CHATGPT BİREBİR TASARIM)
   ========================================================================== */
.memory-modal-box {
  max-width: 620px !important;
  width: 94vw !important;
  background: #18181b !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
  border-radius: 16px !important;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.8) !important;
  display: flex !important;
  flex-direction: column !important;
  height: 82vh !important;
  max-height: 720px !important;
  overflow: hidden !important;
}

[data-theme="light"] .memory-modal-box {
  background: #ffffff !important;
  border-color: #e2e8f0 !important;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15) !important;
}

.memory-modal-header {
  padding: 16px 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
}

[data-theme="light"] .memory-modal-header {
  border-bottom-color: #e2e8f0;
}

.memory-header-info {
  display: flex;
  align-items: baseline;
  gap: 10px;
}

.memory-header-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: #ffffff;
}

[data-theme="light"] .memory-header-title {
  color: #0f172a;
}

.memory-header-subtitle {
  font-size: 0.8rem;
  color: #a1a1aa;
}

[data-theme="light"] .memory-header-subtitle {
  color: #64748b;
}

.memory-header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-memory-icon {
  background: transparent;
  border: none;
  color: #a1a1aa;
  cursor: pointer;
  padding: 6px;
  font-size: 0.9rem;
  border-radius: 6px;
  transition: all 0.15s ease;
}

.btn-memory-icon:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
}

.memory-modal-body {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.memory-section-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.memory-section-title {
  font-size: 1.02rem;
  font-weight: 700;
  color: #f4f4f5;
  margin: 0;
}

[data-theme="light"] .memory-section-title {
  color: #0f172a;
}

.memory-section-body {
  font-size: 0.9rem;
  color: #d4d4d8;
  line-height: 1.6;
}

[data-theme="light"] .memory-section-body {
  color: #334155;
}

.memory-empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 40px 20px;
  color: #a1a1aa;
}

.memory-empty-state i {
  font-size: 2.2rem;
  color: #a855f7;
  margin-bottom: 12px;
}

.memory-empty-state h4 {
  margin: 0 0 6px 0;
  font-size: 1.05rem;
  color: var(--text-main);
}

.memory-empty-state p {
  margin: 0;
  font-size: 0.85rem;
  color: var(--text-dim);
  line-height: 1.5;
  max-width: 420px;
}

.memory-loading-spinner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 16px;
  font-size: 0.88rem;
  color: #a855f7;
}

.memory-modal-footer {
  padding: 14px 20px 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(0, 0, 0, 0.2);
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex-shrink: 0;
}

[data-theme="light"] .memory-modal-footer {
  background: #f8fafc;
  border-top-color: #e2e8f0;
}

.memory-input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  background: #27272a;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 26px;
  padding: 4px 6px 4px 18px;
  transition: border-color 0.2s ease;
}

[data-theme="light"] .memory-input-wrapper {
  background: #f1f5f9;
  border-color: #cbd5e1;
}

.memory-input-wrapper:focus-within {
  border-color: rgba(255, 255, 255, 0.35);
}

[data-theme="light"] .memory-input-wrapper:focus-within {
  border-color: #0f172a;
}

.memory-prompt-input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: #ffffff;
  font-size: 0.92rem;
  padding: 8px 0;
}

[data-theme="light"] .memory-prompt-input {
  color: #0f172a;
}

.memory-prompt-input::placeholder {
  color: #71717a;
}

.btn-memory-send {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: #ffffff;
  border: none;
  color: #18181b;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
  cursor: pointer;
  transition: transform 0.15s ease, opacity 0.15s ease;
}

[data-theme="light"] .btn-memory-send {
  background: #0f172a;
  color: #ffffff;
}

.btn-memory-send:hover {
  transform: scale(1.05);
}

.memory-footer-note {
  font-size: 0.74rem;
  color: #71717a;
  text-align: center;
}

/* ==========================================================================
   SOHBETLERDE ARAMA (SEARCH MODAL)
   ========================================================================== */
.search-modal-box {
  max-width: 580px !important;
  width: 94vw !important;
  height: 75vh !important;
  max-height: 640px !important;
  display: flex !important;
  flex-direction: column !important;
}

.search-modal-body {
  display: flex;
  flex-direction: column;
  flex: 1;
  overflow: hidden;
  padding: 16px 20px 20px;
}

.search-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
  margin-bottom: 14px;
}

.search-inner-icon {
  position: absolute;
  left: 14px;
  color: var(--text-dim);
  font-size: 0.9rem;
  pointer-events: none;
}

.search-chats-input {
  width: 100%;
  padding: 11px 40px 11px 38px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  color: var(--text-main);
  font-size: 0.92rem;
  outline: none;
  transition: border-color 0.2s ease;
}

[data-theme="light"] .search-chats-input {
  background: #ffffff;
  border-color: #cbd5e1;
}

.search-chats-input:focus {
  border-color: var(--primary);
}

.search-clear-btn {
  position: absolute;
  right: 12px;
  background: transparent;
  border: none;
  color: var(--text-dim);
  cursor: pointer;
  font-size: 0.95rem;
}

.search-results-list {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-right: 4px;
}

.search-result-item {
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all 0.15s ease;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.search-result-item:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.2);
  transform: translateY(-1px);
}

[data-theme="light"] .search-result-item {
  background: #f8fafc;
  border-color: #e2e8f0;
}

[data-theme="light"] .search-result-item:hover {
  background: #f1f5f9;
  border-color: #cbd5e1;
}

.search-item-header {
  display: flex;
  align-items: center;
  gap: 8px;
}

.search-item-header i {
  color: var(--text-dim);
  font-size: 0.85rem;
}

.search-item-title {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-main);
  flex: 1;
}

.search-item-date {
  font-size: 0.75rem;
  color: var(--text-dim);
}

.search-item-snippet {
  font-size: 0.82rem;
  color: var(--text-dim);
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.search-result-item mark {
  background: rgba(234, 179, 8, 0.35);
  color: inherit;
  border-radius: 2px;
  padding: 0 2px;
}

.search-results-empty,
.search-results-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  color: var(--text-dim);
  gap: 10px;
  text-align: center;
}

@keyframes highlightPulse {
  0% {
    box-shadow: 0 0 0 0 rgba(59, 130, 246, 0.8);
  }

  50% {
    box-shadow: 0 0 0 8px rgba(59, 130, 246, 0.2);
    background: rgba(59, 130, 246, 0.1);
  }

  100% {
    box-shadow: 0 0 0 0 rgba(59, 130, 246, 0);
  }
}

.highlight-pulse {
  animation: highlightPulse 2.5s ease-out;
  border-radius: 12px;
}

/* ==========================================================================
   MEDYA THUMBNAIL VE FULLSCREEN LIGHTBOX
   ========================================================================== */
.chat-media-thumbnail-wrap {
  position: relative;
  display: inline-block;
  max-width: 220px;
  max-height: 140px;
  border-radius: 10px;
  overflow: hidden;
  margin-bottom: 8px;
  border: 1px solid var(--border-color);
  cursor: pointer;
  background: rgba(0, 0, 0, 0.3);
}

.chat-media-thumbnail {
  display: block;
  width: 100%;
  max-height: 140px;
  object-fit: cover;
  transition: transform 0.2s ease;
}

.chat-media-thumbnail-wrap:hover .chat-media-thumbnail {
  transform: scale(1.04);
}

.media-thumb-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  color: #ffffff;
  font-size: 0.85rem;
  font-weight: 600;
  opacity: 0.85;
  transition: opacity 0.2s ease;
}

.chat-media-thumbnail-wrap:hover .media-thumb-overlay {
  opacity: 1;
  background: rgba(0, 0, 0, 0.3);
}

.chat-file-attachment {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  margin-bottom: 8px;
  font-size: 0.85rem;
  color: var(--text-main);
  cursor: pointer;
  transition: background 0.15s ease;
}

.chat-file-attachment:hover {
  background: rgba(255, 255, 255, 0.14);
}

.lightbox-modal-overlay {
  z-index: 100080 !important;
  background: rgba(0, 0, 0, 0.88) !important;
  backdrop-filter: blur(12px) !important;
}

.lightbox-box {
  position: relative;
  max-width: 92vw;
  max-height: 92vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  animation: modalPop 0.18s ease-out;
}

.lightbox-header {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 0 10px 0;
  gap: 12px;
}

.lightbox-title-badge {
  padding: 5px 12px;
  background: rgba(255, 255, 255, 0.12);
  border-radius: 16px;
  font-size: 0.8rem;
  color: #f1f5f9;
  max-width: 300px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.lightbox-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-lightbox-action {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.15s ease;
}

.btn-lightbox-action:hover {
  background: rgba(255, 255, 255, 0.25);
}

.lightbox-content-area img,
.lightbox-content-area video {
  max-width: 90vw;
  max-height: 82vh;
  border-radius: 10px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.9);
  object-fit: contain;
}

/* ==========================================================================
   BAĞLAM KOTASI DOLUM UYARI BANDI VE GERİ SAYIM
   ========================================================================== */
.quota-warning-banner {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 18px;
  margin: 12px 16px 20px 16px;
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.35);
  border-radius: 12px;
  backdrop-filter: blur(6px);
  animation: fadeIn 0.3s ease-out;
}

.quota-warning-icon {
  font-size: 1.6rem;
  color: #ef4444;
  flex-shrink: 0;
}

.quota-warning-info {
  display: flex;
  flex-direction: column;
  gap: 3px;
  font-size: 0.85rem;
  color: var(--text-main);
}

.quota-warning-info strong {
  color: #ef4444;
  font-size: 0.95rem;
}

.quota-countdown-val {
  margin-top: 4px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: monospace;
  font-weight: 700;
  font-size: 0.92rem;
  color: #f59e0b;
}

/* ==========================================================================
   AÇIK TEMA FEEDBACK REAKSİYON BUTONLARI KONTRAST DÜZELTMESİ
   ========================================================================== */
[data-theme="light"] .msg-feedback-group .btn-msg-feedback {
  background: #f1f5f9 !important;
  border: 1px solid #cbd5e1 !important;
  color: #475569 !important;
}

[data-theme="light"] .msg-feedback-group .btn-msg-feedback:hover {
  background: #e2e8f0 !important;
  color: #0f172a !important;
}

[data-theme="light"] .msg-feedback-group .btn-msg-feedback.liked {
  background: rgba(16, 185, 129, 0.15) !important;
  border-color: #10b981 !important;
  color: #059669 !important;
}

[data-theme="light"] .msg-feedback-group .btn-msg-feedback.disliked {
  background: rgba(239, 68, 68, 0.15) !important;
  border-color: #ef4444 !important;
  color: #dc2626 !important;
}

/* ==========================================================================
   DÜŞÜNCE HAPI (THINKING STATUS PILL - İÇ METİN TAMAMEN GİZLİ)
   ========================================================================== */
.thinking-accordion-body {
  display: none !important;
}

.thinking-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 12px;
  margin-bottom: 8px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--text-dim);
  user-select: none;
  transition: all var(--transition-fast);
}

.thinking-status-pill i {
  color: #38bdf8;
  font-size: 0.82rem;
}

[data-theme="light"] .thinking-status-pill {
  background: #f1f5f9;
  border-color: #e2e8f0;
  color: #475569;
}

[data-theme="light"] .thinking-status-pill i {
  color: #0284c7;
}

/* ==========================================================================
   MESAJ KOPYALAMA BUTONU VE ANİMASYONU
   ========================================================================== */
.btn-msg-feedback.btn-copy-msg {
  cursor: pointer;
}

.btn-msg-feedback.btn-copy-msg.copied {
  color: #10b981 !important;
  background: rgba(16, 185, 129, 0.15) !important;
  border-color: #10b981 !important;
}

/* ==========================================================================
   BELLEK MODAL İÇİ DİYALOG & CEVAP KARTI
   ========================================================================== */
.memory-interactive-reply {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  margin-bottom: 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.memory-reply-user {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-dim);
}

.memory-reply-ai {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 0.85rem;
  line-height: 1.5;
  color: var(--text-main);
  background: rgba(0, 0, 0, 0.2);
  padding: 10px 12px;
  border-radius: var(--radius-sm);
}

.memory-reply-ai i {
  color: #38bdf8;
  margin-top: 3px;
  flex-shrink: 0;
}

[data-theme="light"] .memory-interactive-reply {
  background: #f8fafc;
  border-color: #e2e8f0;
}

[data-theme="light"] .memory-reply-ai {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  color: #1e293b;
}

[data-theme="light"] .memory-reply-ai i {
  color: #0284c7;
}


/* ==========================================================================
   YENİ EKLENEN MOTORLAR: HARİTA (LEAFLET / OSM), GEÇİCİ SOHBET, GELİŞMİŞ SCROLL
   ========================================================================== */

/* Geçmiş Sohbetler Scrollbar İyileştirmesi */
.chat-history-list {
  scrollbar-gutter: stable !important;
  scrollbar-width: thin !important;
  scrollbar-color: rgba(255, 255, 255, 0.45) rgba(255, 255, 255, 0.05) !important;
}

.chat-history-list::-webkit-scrollbar {
  width: 7px !important;
}

.chat-history-list::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.04) !important;
  border-radius: 4px !important;
}

.chat-history-list::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.45) !important;
  border-radius: 4px !important;
}

.chat-history-list::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.75) !important;
}

[data-theme="light"] .chat-history-list {
  scrollbar-color: rgba(0, 0, 0, 0.45) rgba(0, 0, 0, 0.05) !important;
}

[data-theme="light"] .chat-history-list::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.04) !important;
}

[data-theme="light"] .chat-history-list::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.45) !important;
}

[data-theme="light"] .chat-history-list::-webkit-scrollbar-thumb:hover {
  background: rgba(0, 0, 0, 0.75) !important;
}

/* Geri Bildirim Butonları Yüksek Kontrast */
.btn-msg-feedback.liked {
  color: #10b981 !important;
  background: rgba(16, 185, 129, 0.18) !important;
  border: 1px solid rgba(16, 185, 129, 0.5) !important;
}

.btn-msg-feedback.disliked {
  color: #ef4444 !important;
  background: rgba(239, 68, 68, 0.18) !important;
  border: 1px solid rgba(239, 68, 68, 0.5) !important;
}

[data-theme="light"] .btn-msg-feedback.liked {
  color: #047857 !important;
  background: rgba(16, 185, 129, 0.22) !important;
  border-color: #059669 !important;
}

[data-theme="light"] .btn-msg-feedback.disliked {
  color: #b91c1c !important;
  background: rgba(239, 68, 68, 0.22) !important;
  border-color: #dc2626 !important;
}

/* Geçici Sohbet Modu Göstergesi & Butonu */
.btn-top-action.active,
#btn-toggle-temp-chat.active {
  background: rgba(168, 85, 247, 0.22) !important;
  border-color: rgba(168, 85, 247, 0.6) !important;
  color: #c084fc !important;
  box-shadow: 0 0 12px rgba(168, 85, 247, 0.35) !important;
}

.temp-chat-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  background: rgba(168, 85, 247, 0.15);
  border: 1px solid rgba(168, 85, 247, 0.4);
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 700;
  color: #c084fc;
  letter-spacing: 0.5px;
}

/* OPENSTREETMAP / LEAFLET HARİTA KARTI */
.chat-map-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  overflow: hidden;
  margin: 12px 0;
  display: flex;
  flex-direction: column;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
}

.chat-map-header {
  padding: 10px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border-color);
  background: rgba(255, 255, 255, 0.02);
}

.chat-map-title {
  font-size: 0.88rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-main);
}

.chat-map-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.btn-map-action {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all var(--transition-fast);
}

.btn-map-action:hover {
  background: var(--bg-card-hover);
  color: var(--text-main);
}

.chat-map-viewport {
  width: 100%;
  height: 360px;
  background: #0f172a;
  position: relative;
  z-index: 1;
}

.chat-map-route-bar {
  padding: 8px 14px;
  background: rgba(255, 255, 255, 0.02);
  border-top: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  font-size: 0.78rem;
}

.map-route-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 8px;
  background: rgba(56, 189, 248, 0.12);
  border: 1px solid rgba(56, 189, 248, 0.3);
  border-radius: 4px;
  color: #38bdf8;
  font-weight: 600;
}

.map-route-desc {
  color: var(--text-muted);
}

/* Pulsing Custom Marker */
.map-pulse-circle {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  position: absolute;
  top: 5px;
  left: 5px;
}

.map-pulse-ring {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 2px solid;
  position: absolute;
  top: 0;
  left: 0;
  animation: mapPulseAnim 2s infinite ease-out;
}

@keyframes mapPulseAnim {
  0% {
    transform: scale(0.6);
    opacity: 1;
  }

  100% {
    transform: scale(1.6);
    opacity: 0;
  }
}

.map-user-pin {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #10b981;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  box-shadow: 0 0 12px rgba(16, 185, 129, 0.7);
  animation: bouncePin 1.5s infinite alternate ease-in-out;
}

@keyframes bouncePin {
  0% {
    transform: translateY(0);
  }

  100% {
    transform: translateY(-5px);
  }
}

.animated-osm-route {
  animation: routeDash 30s linear infinite;
}

@keyframes routeDash {
  to {
    stroke-dashoffset: -1000;
  }
}

/* Leaflet Dark Popup Uyumu */
.leaflet-popup-content-wrapper {
  background: #1e293b !important;
  color: #f1f5f9 !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  border-radius: 8px !important;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4) !important;
}

.leaflet-popup-tip {
  background: #1e293b !important;
}
/* ==========================================================================
   EKLENTİLER ALANI (SIDEBAR GMAIL EKLENTİSİ)
   ========================================================================== */
.sidebar-plugins-wrap {
  padding: 6px 12px 10px 12px;
  border-bottom: 1px solid var(--border-color);
  margin-bottom: 6px;
}

.sidebar.collapsed .sidebar-plugins-wrap {
  padding: 6px 4px 10px 4px !important;
  display: flex !important;
  justify-content: center !important;
}

.sidebar.collapsed .sidebar-plugins-wrap .sidebar-section-title {
  display: none !important;
}

.sidebar-plugin-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.sidebar-plugin-item:hover {
  background: var(--bg-card-hover);
  border-color: rgba(234, 67, 53, 0.35);
  transform: translateY(-1px);
}

.sidebar.collapsed .sidebar-plugin-item {
  justify-content: center !important;
  padding: 8px 0 !important;
  width: 44px !important;
  height: 44px !important;
}

.sidebar.collapsed .plugin-details,
.sidebar.collapsed .plugin-badge {
  display: none !important;
}

.plugin-icon-box {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  background: rgba(234, 67, 53, 0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  flex-shrink: 0;
}

.plugin-details {
  display: flex;
  flex-direction: column;
  min-width: 0;
  flex: 1;
}

.plugin-title {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-main);
  line-height: 1.2;
}

.plugin-status {
  font-size: 0.72rem;
  color: var(--text-dim);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.plugin-badge {
  font-size: 0.7rem;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 10px;
  letter-spacing: 0.3px;
  flex-shrink: 0;
}

.plugin-badge.badge-connect {
  background: rgba(56, 189, 248, 0.15);
  color: #38bdf8;
  border: 1px solid rgba(56, 189, 248, 0.3);
}

.plugin-badge.badge-connected {
  background: rgba(16, 185, 129, 0.15);
  color: #10b981;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

[data-theme="light"] .sidebar-plugin-item {
  background: #f8fafc;
  border-color: #e2e8f0;
}

[data-theme="light"] .sidebar-plugin-item:hover {
  background: #f1f5f9;
  border-color: #cbd5e1;
}

/* ==========================================================================
   GMAIL AKSİYON ONAY KARTI (ACTION CONFIRMATION CARD)
   ========================================================================== */
.action-confirmation-card {
  background: var(--bg-card);
  border: 1px solid rgba(234, 67, 53, 0.35);
  border-radius: var(--radius-md);
  margin: 12px 0;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.35);
  animation: fadeIn 0.25s ease-out;
}

.action-card-header {
  padding: 10px 14px;
  background: rgba(234, 67, 53, 0.08);
  border-bottom: 1px solid rgba(234, 67, 53, 0.2);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.action-card-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text-main);
}

.action-card-badge {
  font-size: 0.72rem;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 10px;
  background: rgba(245, 158, 11, 0.15);
  color: #f59e0b;
  border: 1px solid rgba(245, 158, 11, 0.3);
}

.action-card-badge.badge-processing {
  background: rgba(56, 189, 248, 0.15);
  color: #38bdf8;
  border-color: rgba(56, 189, 248, 0.3);
}

.action-card-badge.badge-success {
  background: rgba(16, 185, 129, 0.15);
  color: #10b981;
  border-color: rgba(16, 185, 129, 0.3);
}

.action-card-badge.badge-error {
  background: rgba(239, 68, 68, 0.15);
  color: #ef4444;
  border-color: rgba(239, 68, 68, 0.3);
}

.action-card-badge.badge-cancelled {
  background: rgba(148, 163, 184, 0.15);
  color: #94a3b8;
  border-color: rgba(148, 163, 184, 0.3);
}

.action-card-content {
  padding: 12px 14px;
}

.action-card-warning {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8rem;
  color: #f59e0b;
  margin: 0 0 10px 0;
  font-weight: 500;
}

.action-card-field {
  margin-bottom: 6px;
  font-size: 0.84rem;
  line-height: 1.5;
}

.action-field-label {
  color: var(--text-dim);
  font-weight: 600;
  margin-right: 6px;
}

.action-mail-preview-box {
  margin-top: 6px;
  padding: 8px 12px;
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 0.82rem;
  white-space: pre-wrap;
  color: var(--text-main);
  max-height: 140px;
  overflow-y: auto;
}

.action-card-actions {
  padding: 10px 14px;
  background: rgba(255, 255, 255, 0.02);
  border-top: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  gap: 10px;
}

.btn-confirm-action {
  padding: 7px 16px;
  background: #ea4335;
  color: #ffffff;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all var(--transition-fast);
}

.btn-confirm-action:hover {
  background: #d93025;
  box-shadow: 0 2px 8px rgba(234, 67, 53, 0.35);
}

.btn-cancel-action {
  padding: 7px 14px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-muted);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
  font-weight: 500;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all var(--transition-fast);
}

.btn-cancel-action:hover {
  background: rgba(255, 255, 255, 0.12);
  color: var(--text-main);
}

.action-card-result-box {
  padding: 12px 14px;
  border-top: 1px solid var(--border-color);
  background: rgba(0, 0, 0, 0.15);
}

.action-card-loading {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.82rem;
  color: var(--text-muted);
}

.action-card-success,
.action-card-error {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 0.84rem;
}

.inbox-mail-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 280px;
  overflow-y: auto;
}

.inbox-mail-item {
  padding: 8px 10px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
}

.inbox-mail-top {
  display: flex;
  justify-content: space-between;
  margin-bottom: 2px;
  font-size: 0.78rem;
  color: var(--text-dim);
}

.inbox-mail-subject {
  font-weight: 600;
  color: var(--text-main);
  margin-bottom: 2px;
}

.inbox-mail-snippet {
  color: var(--text-muted);
  font-size: 0.78rem;
  line-height: 1.35;
}

/* ==========================================================================
   KULLANIM KOTASI SEKME TASARIMI (USAGE TAB)
   ========================================================================== */
.usage-hero-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 18px;
  margin-bottom: 16px;
}

.usage-tier-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 12px;
}

.usage-tier-sub {
  font-size: 0.75rem;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.8px;
  font-weight: 600;
}

.usage-tier-title {
  margin: 2px 0 0;
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-main);
}

.usage-badge-chip {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid rgba(245, 158, 11, 0.3);
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 600;
  color: #f59e0b;
}

.usage-metrics-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 18px;
}

.usage-metric-box {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
}

.usage-metric-label {
  font-size: 0.75rem;
  color: var(--text-dim);
  margin-bottom: 4px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.usage-metric-value {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-main);
}

.text-green { color: #10b981 !important; }
.text-blue { color: #38bdf8 !important; }

.usage-progress-container {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.usage-progress-bar-wrap {
  width: 100%;
  height: 10px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 6px;
  overflow: hidden;
  position: relative;
}

.usage-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #10b981, #38bdf8);
  border-radius: 6px;
  transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.usage-progress-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.78rem;
  color: var(--text-muted);
}

.usage-reset-label {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--text-dim);
}

.usage-info-card {
  display: flex;
  gap: 12px;
  padding: 14px 16px;
  background: rgba(56, 189, 248, 0.05);
  border: 1px solid rgba(56, 189, 248, 0.2);
  border-radius: var(--radius-md);
  font-size: 0.82rem;
  line-height: 1.5;
  color: var(--text-muted);
}

.usage-info-icon {
  font-size: 1.2rem;
  color: #38bdf8;
  flex-shrink: 0;
  margin-top: 2px;
}

/* ==========================================================================
   FEEDBACK BUTONLARI VE MODALI GELİŞTİRMELERİ
   ========================================================================== */
#feedback-modal .modal-body {
  display: flex !important;
  flex-direction: column !important;
  width: 100% !important;
}

#feedback-text-input {
  width: 100% !important;
  box-sizing: border-box !important;
  min-height: 110px !important;
  background: var(--bg-input) !important;
  color: var(--text-main) !important;
  border: 1px solid var(--border-color) !important;
  border-radius: var(--radius-sm) !important;
  padding: 10px 12px !important;
  font-family: inherit !important;
  font-size: 0.88rem !important;
  resize: vertical !important;
}

/* Feedback Butonları: Like & Dislike Aktif Durumları */
.msg-feedback-group .btn-msg-feedback.liked {
  background: rgba(16, 185, 129, 0.2) !important;
  color: #10b981 !important;
  border-color: rgba(16, 185, 129, 0.5) !important;
  box-shadow: 0 0 8px rgba(16, 185, 129, 0.3) !important;
}

.msg-feedback-group .btn-msg-feedback.disliked {
  background: rgba(239, 68, 68, 0.2) !important;
  color: #ef4444 !important;
  border-color: rgba(239, 68, 68, 0.5) !important;
  box-shadow: 0 0 8px rgba(239, 68, 68, 0.3) !important;
}

[data-theme="light"] .msg-feedback-group .btn-msg-feedback.liked {
  background: #dcfce7 !important;
  color: #059669 !important;
  border-color: #86efac !important;
}

[data-theme="light"] .msg-feedback-group .btn-msg-feedback.disliked {
  background: #fee2e2 !important;
  color: #dc2626 !important;
  border-color: #fca5a5 !important;
}

/* Modern İkincil Eylem / Vazgeç Butonları */
.btn-secondary-action {
  padding: 8px 18px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  cursor: pointer;
  font-size: 0.85rem;
  font-weight: 500;
  transition: all var(--transition-fast);
}

.btn-secondary-action:hover {
  background: rgba(255, 255, 255, 0.12);
  color: var(--text-main);
  border-color: rgba(255, 255, 255, 0.25);
}

[data-theme="light"] .btn-secondary-action {
  background: #f1f5f9 !important;
  border-color: #cbd5e1 !important;
  color: #475569 !important;
}

[data-theme="light"] .btn-secondary-action:hover {
  background: #e2e8f0 !important;
  color: #0f172a !important;
}

/* Açık Tema Collapsed Sidebar Footer Düzeltmesi (Gri Kutu Önleme) */
.sidebar-footer {
  background: transparent !important;
}

.sidebar.collapsed .sidebar-footer {
  margin-top: auto !important;
  background: transparent !important;
  border-top: 1px solid var(--border-color);
  padding: 10px 4px !important;
}

[data-theme="light"] .sidebar.collapsed .sidebar-footer,
[data-theme="light"] .sidebar-footer {
  background: transparent !important;
  border-top-color: #e2e8f0 !important;
}

/* Bellek Sıfırla (Çöp Kutusu) Butonu */
.btn-memory-reset-danger {
  color: var(--text-dim) !important;
  transition: all var(--transition-fast) !important;
}

.btn-memory-reset-danger:hover {
  color: #ef4444 !important;
  background: rgba(239, 68, 68, 0.15) !important;
  border-color: rgba(239, 68, 68, 0.4) !important;
}

/* Markdown Başlıkları (H1 - H6) ve Temiz Yatay Ayırıcı */
.chat-divider {
  border: none !important;
  border-top: 1px solid var(--border-color) !important;
  margin: 14px 0 !important;
  opacity: 0.5;
  width: 100%;
}

.chat-md-h1, .chat-md-h2, .chat-md-h3, .chat-md-h4, .chat-md-h5, .chat-md-h6 {
  color: var(--text-main);
  font-weight: 700;
  line-height: 1.35;
  margin: 12px 0 6px 0;
}

.chat-md-h1 { font-size: 1.28rem; font-weight: 800; }
.chat-md-h2 { font-size: 1.15rem; font-weight: 800; }
.chat-md-h3 { font-size: 1.05rem; }
.chat-md-h4 { font-size: 0.96rem; }
.chat-md-h5 { font-size: 0.90rem; }
.chat-md-h6 { font-size: 0.85rem; }

/* Geri Bildirim Modalı Textarea & Düzen Tam Genişlik */
#feedback-modal .modal-box {
  width: 100% !important;
  max-width: 480px !important;
}

#feedback-modal .modal-body {
  padding: 16px 20px !important;
  width: 100% !important;
  box-sizing: border-box !important;
}

#feedback-modal #feedback-text-input {
  width: 100% !important;
  min-width: 100% !important;
  max-width: 100% !important;
  min-height: 120px !important;
  box-sizing: border-box !important;
  display: block !important;
  padding: 12px 14px !important;
  border-radius: var(--radius-md) !important;
  background: var(--bg-input) !important;
  color: var(--text-main) !important;
  border: 1px solid var(--border-color) !important;
}

/* Veri Kontrolleri Switch Görünürlük Garantisi */
.data-control-row {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 16px !important;
  padding: 14px 0 !important;
  border-bottom: 1px solid var(--border-color) !important;
}

.data-control-row > div:first-child {
  flex: 1 1 auto;
  min-width: 0;
}

.toggle-switch {
  position: relative !important;
  display: inline-block !important;
  width: 44px !important;
  height: 24px !important;
  min-width: 44px !important;
  flex-shrink: 0 !important;
  cursor: pointer !important;
}

.toggle-slider {
  position: absolute !important;
  cursor: pointer !important;
  inset: 0 !important;
  background-color: #334155 !important;
  border: 1px solid var(--border-color) !important;
  border-radius: 24px !important;
  transition: 0.25s !important;
}

.toggle-slider:before {
  position: absolute !important;
  content: "" !important;
  height: 18px !important;
  width: 18px !important;
  left: 2px !important;
  top: 2px !important;
  bottom: 2px !important;
  background-color: #ffffff !important;
  border-radius: 50% !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.4) !important;
  transition: 0.25s !important;
}

.toggle-switch input:checked + .toggle-slider {
  background-color: #10b981 !important;
  border-color: #10b981 !important;
}

.toggle-switch input:checked + .toggle-slider:before {
  transform: translateX(20px) !important;
}

[data-theme="light"] .toggle-slider {
  background-color: #cbd5e1 !important;
  border: 1px solid #94a3b8 !important;
}

[data-theme="light"] .toggle-switch input:checked + .toggle-slider {
  background-color: #10b981 !important;
  border-color: #10b981 !important;
}

/* Sol Sidebar Geçmiş Sohbetler Listesi Canlı ve Belirgin Scrollbar */
.chat-history-list {
  flex: 1 1 0% !important;
  min-height: 0 !important;
  overflow-y: scroll !important;
  overflow-x: hidden !important;
  scrollbar-gutter: stable !important;
  scrollbar-width: thin !important;
  scrollbar-color: rgba(255, 255, 255, 0.4) rgba(255, 255, 255, 0.05) !important;
  padding: 8px 6px 8px 10px !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 3px !important;
}

.chat-history-list::-webkit-scrollbar {
  width: 6px !important;
  display: block !important;
}

.chat-history-list::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.03) !important;
  border-radius: 4px !important;
}

.chat-history-list::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.35) !important;
  border-radius: 4px !important;
}

.chat-history-list::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.65) !important;
}

[data-theme="light"] .chat-history-list {
  scrollbar-color: rgba(0, 0, 0, 0.35) rgba(0, 0, 0, 0.04) !important;
}

[data-theme="light"] .chat-history-list::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.03) !important;
}

[data-theme="light"] .chat-history-list::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.35) !important;
}

[data-theme="light"] .chat-history-list::-webkit-scrollbar-thumb:hover {
  background: rgba(0, 0, 0, 0.55) !important;
}
