/* ===== AllSoon.ai - Dark Theme ===== */
/* Inter yazı tipi: css/inter.css (kendi sunucumuzdan; hem v1 hem v2) */

:root {
  --brand-accent: #00E5A8;
  --brand-accent-hover: #00BE88;
  --brand-accent-subtle: rgba(0, 229, 168, 0.12);
  --bg-body: #0F131B;
  --bg-sidebar: #151A24;
  --bg-topbar: #0F131B;
  --bg-card: #1A1F2B;
  --bg-card-hover: #232A39;
  --bg-input: #232A39;
  --border-color: #323B50;
  --text-primary: #E5E7EB;
  --text-secondary: #A6AEBD;
  --text-muted: #9AA3B5;
  --brand-blue: #4F7CFF;
  --brand-violet: #8B5CF6;
  --brand-grad: linear-gradient(100deg, #00E5A8 0%, #27B6D4 50%, #4F7CFF 100%);
  --sidebar-width: 230px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: 'Inter', system-ui, sans-serif;
  background: var(--bg-body);
  color: var(--text-primary);
  font-size: 14px;
  min-height: 100vh;
  overflow-x: hidden;
}

::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #222; border-radius: 3px; }

.top-navbar {
  height: 48px;
  background: var(--bg-topbar);
  border-bottom: 1px solid var(--border-color);
  padding: 0 20px;
  position: fixed;
  top: 0;
  left: var(--sidebar-width);
  right: 0;
  z-index: 1030;
  transition: left 0.3s ease;
}

.top-navbar-brand {
  font-weight: 700; font-size: 15px; color: var(--text-primary);
  text-decoration: none; display: flex; align-items: center; gap: 6px;
}
.top-navbar-brand i { color: var(--brand-accent); }
.top-navbar-brand:hover { color: var(--brand-accent); }
.top-navbar-user { color: var(--text-primary); font-size: 13px; }
.top-navbar-link { color: var(--text-secondary); font-size: 13px; text-decoration: none; }
.top-navbar-link:hover { color: var(--text-primary); }

.app-sidebar {
  width: var(--sidebar-width); height: 100vh;
  background: var(--bg-sidebar); border-right: 1px solid var(--border-color);
  position: fixed; top: 0; left: 0; z-index: 1040;
  display: flex; flex-direction: column; overflow: hidden;
  transition: transform 0.15s ease;
}

.sidebar-brand {
  height: 48px; display: flex; align-items: center;
  padding: 0 16px; border-bottom: 1px solid var(--border-color);
  flex-shrink: 0;
}
.sidebar-brand a {
  display: flex; align-items: center; gap: 8px;
  text-decoration: none; color: var(--text-primary);
  font-weight: 700; font-size: 15px;
}
.sidebar-brand a i { color: var(--brand-accent); font-size: 18px; }
.sidebar-brand-mark { border-radius: 7px; flex: none; }
.sidebar-brand-ai { color: var(--brand-accent); }
.sidebar-brand a:hover { color: var(--brand-accent); }

.sidebar-nav { flex: 1; padding: 16px 10px; overflow-y: auto; min-height: 0; }
.sidebar-section { margin-bottom: 20px; }
.sidebar-section-title { font-size: 10px; font-weight: 700; color: var(--text-muted); letter-spacing: 1.2px; padding: 0 12px; margin-bottom: 8px; }

.sidebar-link {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 12px; border-radius: 6px;
  color: var(--text-secondary); text-decoration: none;
  font-size: 13px; transition: all 0.15s; margin-bottom: 1px;
}
.sidebar-link:hover { background: rgba(255,255,255,0.04); color: var(--text-primary); }
.sidebar-link.active { background: var(--brand-accent-subtle); color: var(--brand-accent); }
.sidebar-link i { font-size: 16px; width: 20px; text-align: center; display: inline-flex; align-items: center; }

.sidebar {
  display: flex;
  flex-direction: column;
  height: 100vh;
  position: fixed;
  top: 0;
  left: 0;
  width: var(--sidebar-width);
  background: var(--bg-sidebar);
  border-right: 1px solid var(--border-color);
  z-index: 1040;
  overflow-y: auto;
}
.sidebar .sidebar-header {
  height: 48px;
  display: flex;
  align-items: center;
  padding: 0 16px;
  border-bottom: 1px solid var(--border-color);
}
.sidebar .sidebar-header h6 {
  margin: 0;
  font-size: 15px;
  font-weight: 700;
  color: var(--text-primary);
}
.sidebar .sidebar-header i {
  color: var(--brand-accent);
}
.sidebar .sidebar-menu {
  flex: 1;
  padding: 16px 10px;
  overflow-y: auto;
}

.sidebar-user-footer {
  padding: 12px 14px;
  border-top: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.sidebar-user-info {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-secondary);
  font-size: 13px;
}
.sidebar-user-info i {
  font-size: 18px;
  color: var(--brand-accent);
}
.sidebar-logout-btn {
  display: flex;
  align-items: center;
  gap: 4px;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 12px;
  padding: 4px 8px;
  border-radius: 4px;
  transition: all 0.15s;
}
.sidebar-logout-btn:hover {
  color: #ff6b6b;
  background: rgba(255,107,107,0.1);
}

.sidebar-footer { padding: 12px 16px; border-top: 1px solid var(--border-color); font-size: 11px; color: var(--text-muted); flex-shrink: 0; }
.sidebar-overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.6); z-index: 1035; }

.main-content { margin-left: var(--sidebar-width); margin-top: 48px; min-height: calc(100vh - 48px); background: var(--bg-body); transition: margin-left 0.15s ease; }
.content-wrapper { padding: 24px; }

.card { background: var(--bg-card) !important; border: 1px solid var(--border-color) !important; border-radius: 8px; color: var(--text-primary); }
.card-header { background: var(--bg-input) !important; border-bottom: 1px solid var(--border-color) !important; padding: 12px 16px; font-weight: 600; font-size: 13px; color: var(--text-primary); }
.card-body { padding: 16px; }

.stat-card .card-body { padding: 20px; }
.stat-icon { width: 44px; height: 44px; border-radius: 8px; display: flex; align-items: center; justify-content: center; font-size: 20px; }
.stat-icon-green { background: var(--brand-accent-subtle); color: var(--brand-accent); }
.stat-icon-blue { background: rgba(59,130,246,0.12); color: #3b82f6; }
.stat-icon-yellow { background: rgba(234,179,8,0.12); color: #eab308; }
.stat-value { font-size: 22px; font-weight: 700; }
.stat-label { font-size: 12px; color: var(--text-secondary); }
.settings-card { margin-bottom: 16px; }

.table-dark, .table {
  --bs-table-bg: var(--bg-card); --bs-table-border-color: var(--border-color);
  --bs-table-striped-bg: #232A39; --bs-table-hover-bg: #232A39;
  --bs-table-color: var(--text-primary); background: var(--bg-card); margin-bottom: 0;
}
.table th { background: var(--bg-input) !important; color: var(--text-primary) !important; font-size: 12px; font-weight: 600; border-color: var(--border-color) !important; padding: 10px 12px; }
.table td { border-color: var(--border-color) !important; padding: 10px 12px; font-size: 13px; vertical-align: middle; }

.form-control, .form-select { background: var(--bg-input) !important; border: 1px solid var(--border-color) !important; color: var(--text-primary) !important; font-size: 13px; padding: 8px 12px; }
.form-control:focus, .form-select:focus { border-color: var(--brand-accent) !important; box-shadow: 0 0 0 2px rgba(0,229,168,0.1) !important; }
.form-control::placeholder { color: var(--text-muted) !important; }
.form-label { color: var(--text-primary); font-size: 13px; font-weight: 500; }
.input-group-text { background: var(--bg-input) !important; border-color: var(--border-color) !important; color: var(--text-secondary) !important; }

.btn-brand { background: var(--brand-grad); color: #04141F; font-weight: 600; font-size: 13px; border: none; padding: 8px 18px; border-radius: 6px; }
.btn-brand:hover { background: var(--brand-grad); filter: brightness(1.08); color: #04141F; }
.btn-secondary { background: #222 !important; border-color: var(--border-color) !important; color: var(--text-primary) !important; }

.modal-content { background: var(--bg-card) !important; border: 1px solid var(--border-color) !important; color: var(--text-primary); }
.modal-header { border-bottom: 1px solid var(--border-color) !important; }
.modal-footer { border-top: 1px solid var(--border-color) !important; }

.alert { font-size: 13px; border-radius: 8px; border: 1px solid; padding: 12px 16px; }
.alert-danger { background: rgba(220, 53, 69, 0.15); border-color: rgba(220, 53, 69, 0.3); color: #f87171; }
.alert-success { background: rgba(0, 229, 168, 0.1); border-color: rgba(0, 229, 168, 0.25); color: #00E5A8; }
.alert-warning { background: rgba(255, 193, 7, 0.12); border-color: rgba(255, 193, 7, 0.25); color: #fbbf24; }
.alert-info { background: rgba(59, 130, 246, 0.12); border-color: rgba(59, 130, 246, 0.25); color: #60a5fa; }
.btn-close { filter: invert(1) grayscale(100%) brightness(200%); opacity: 0.8; }
.btn-close:hover { opacity: 1; }
.badge { font-size: 11px; font-weight: 500; padding: 4px 8px; }

.auth-wrapper { background: var(--bg-body); }
.auth-card { width: 100%; max-width: 400px; background: var(--bg-card); border: 1px solid var(--border-color); border-radius: 12px; padding: 32px; }
.auth-logo { font-size: 40px; color: var(--brand-accent); display: block; margin-bottom: 8px; }
.text-muted-custom { color: var(--text-muted) !important; }

.project-card { background: var(--bg-card); border: 1px solid var(--border-color); border-radius: 8px; padding: 16px; transition: border-color 0.2s; }
.project-card:hover { border-color: var(--brand-accent); }

.progress { background: var(--bg-input); height: 6px; border-radius: 3px; }
.progress-bar { background: var(--brand-accent); }


.action-card { background: var(--bg-card); border: 1px solid var(--border-color); border-radius: 8px; padding: 18px; text-align: center; transition: border-color 0.2s; }
.action-card:hover { border-color: var(--brand-accent); }
.action-card i { font-size: 24px; display: block; margin-bottom: 6px; }
.action-card .action-title { font-size: 13px; font-weight: 600; }
.action-card .action-desc { font-size: 11px; color: var(--text-muted); }

.chat-container { display: flex; height: calc(100vh - 48px); overflow: hidden; }
.chat-sidebar { width: 260px; background: var(--bg-sidebar); border-right: 1px solid var(--border-color); padding: 16px; flex-shrink: 0; }
.chat-main { flex: 1; display: flex; flex-direction: column; overflow: hidden; min-width: 0; }
.chat-messages { flex: 1; overflow-y: auto; padding: 20px; }
.chat-input-area { padding: 12px 20px; border-top: 1px solid var(--border-color); flex-shrink: 0; }
.chat-message { margin-bottom: 16px; display: flex; gap: 10px; }
.chat-message.user { flex-direction: row-reverse; }
.chat-avatar { width: 32px; height: 32px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 14px; flex-shrink: 0; }
.chat-message.user .chat-avatar { background: var(--brand-accent-subtle); color: var(--brand-accent); }
.chat-message.assistant .chat-avatar { background: rgba(59,130,246,0.12); color: #3b82f6; }
.chat-bubble { max-width: 70%; padding: 10px 14px; border-radius: 10px; font-size: 13px; line-height: 1.5; }
.chat-message.user .chat-bubble { background: var(--brand-accent-subtle); }
.chat-message.assistant .chat-bubble { background: var(--bg-card); border: 1px solid var(--border-color); }
.chat-time { font-size: 10px; color: var(--text-muted); margin-top: 4px; }
/* Typing Indicator */
.typing-bubble {
  background: var(--bg-card) !important;
  border: 1px solid rgba(255,255,255,0.06) !important;
  padding: 8px 12px !important;
  box-shadow: none !important;
}

.typing-content {
  display: flex;
  align-items: center;
  gap: 8px;
}

.typing-dots {
  display: flex;
  gap: 3px;
  align-items: center;
}

.typing-dots span {
  display: block;
  width: 5px;
  height: 5px;
  background: var(--brand-accent);
  border-radius: 50%;
  opacity: 0.7;
  animation: typingBounce 1.4s ease-in-out infinite;
}

.typing-dots span:nth-child(2) {
  animation-delay: 0.2s;
}

.typing-dots span:nth-child(3) {
  animation-delay: 0.4s;
}

@keyframes typingBounce {
  0%, 60%, 100% {
    transform: translateY(0);
    opacity: 0.3;
  }
  30% {
    transform: translateY(-3px);
    opacity: 0.8;
  }
}

.typing-text {
  font-size: 11px;
  color: var(--text-muted);
  white-space: nowrap;
  opacity: 0.7;
}

/* Chat page existing classes compatibility */
.chat-message.user-message { margin-left: auto; flex-direction: row-reverse; max-width: 70%; }
.chat-message.user-message > div:not(.msg-avatar) { flex: unset !important; }
.chat-message.user-message .msg-bubble { display: inline-block; max-width: 100%; }
.chat-message.user-message .msg-time { text-align: right; }
.chat-message .msg-avatar { width: 32px; height: 32px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 16px; flex-shrink: 0; }
.chat-message.user-message .msg-avatar { background: rgba(63, 185, 80, 0.133); color: #3fb950; }
.chat-message.assistant-message .msg-avatar { background: rgba(59,130,246,0.12); color: #3b82f6; }
.chat-message .msg-bubble { padding: 10px 14px; border-radius: 10px; font-size: 13px; line-height: 1.5; white-space: pre-wrap; word-break: break-word; color: var(--text-primary, #E5E7EB); }
.chat-message.user-message .msg-bubble { background: rgba(63, 185, 80, 0.094); border: 1px solid rgba(63, 185, 80, 0.2); }
.chat-message.assistant-message .msg-bubble { background: var(--bg-card); border: 1px solid var(--border-color); }
.chat-message .msg-time { font-size: 10px; color: var(--text-muted); margin-top: 4px; }
.option-choice-btn { border-radius:20px; padding:6px 16px; font-size:12px; border:1px solid rgba(16,185,129,0.3); color:rgba(255,255,255,0.8) !important; background:transparent !important; cursor:pointer; transition:all 0.2s; }
.option-choice-btn:hover, .option-choice-btn:focus { border-color:rgba(16,185,129,0.6) !important; background:rgba(16,185,129,0.1) !important; color:rgba(255,255,255,0.9) !important; outline:none; box-shadow:none; }
.chat-empty { flex: 1; display: flex; align-items: center; justify-content: center; text-align: center; color: var(--text-muted); }
.chat-empty i { font-size: 48px; display: block; margin-bottom: 12px; opacity: 0.4; }
.chat-input-area form { display: flex; gap: 8px; align-items: flex-end; }
.chat-input-area textarea { flex: 1; resize: none; min-height: 42px; max-height: 120px; border-radius: 10px; }
.chat-input-area .btn-send { flex-shrink: 0; width: 42px; height: 42px; border-radius: 10px; display: flex; align-items: center; justify-content: center; }
.chat-input-area .btn-upload { flex-shrink: 0; }
.chat-input-area .btn-stop, .chat-input-area .chat-stop-btn-style { flex-shrink: 0; }
/* Site Preview */
.site-preview { border-bottom: 1px solid var(--border-color); flex-shrink: 0; }
.preview-header { display: flex; justify-content: space-between; align-items: center; padding: 8px 16px; background: var(--bg-card); font-size: 13px; }
.preview-url { color: var(--brand-accent); font-family: monospace; font-size: 12px; }
.preview-btn { width: 28px; height: 28px; padding: 0; display: flex; align-items: center; justify-content: center; font-size: 12px; border-radius: 6px; }
.preview-body { height: 420px; transition: height 0.3s ease; overflow: hidden; }
.preview-body.collapsed { height: 0; }
.preview-body iframe { width: 100%; height: 100%; border: none; background: #fff; }

/* Upload */
.btn-upload { width: 42px; height: 42px; border-radius: 10px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.upload-preview { padding: 6px 12px; background: var(--bg-card); border: 1px solid var(--border-color); border-radius: 8px; margin-bottom: 8px; font-size: 13px; }

/* File Panel */
.file-panel {
  width: 320px;
  background: var(--bg-sidebar);
  border-left: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition: width 0.3s ease, opacity 0.3s ease;
}
.file-panel.collapsed {
  width: 0;
  opacity: 0;
  border-left: none;
}
.file-panel-header {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.file-panel-header h6 {
  margin: 0;
  font-size: 13px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.file-breadcrumb {
  padding: 8px 12px;
  font-size: 12px;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
}
.file-breadcrumb a {
  color: var(--brand-accent);
  text-decoration: none;
  cursor: pointer;
}
.file-breadcrumb a:hover { text-decoration: underline; }
.file-breadcrumb .separator { color: var(--text-muted); }
.file-list {
  flex: 1;
  overflow-y: auto;
  padding: 8px 0;
}
.file-item {
  display: flex;
  align-items: center;
  padding: 6px 16px;
  cursor: pointer;
  gap: 8px;
  font-size: 13px;
  transition: background 0.15s;
}
.file-item:hover {
  background: var(--bg-card);
}
.file-item .file-icon {
  font-size: 16px;
  width: 20px;
  text-align: center;
  flex-shrink: 0;
}
.file-item .file-icon.folder { color: #f0c040; }
.file-item .file-icon.file-js { color: #f7df1e; }
.file-item .file-icon.file-json { color: #f7df1e; }
.file-item .file-icon.file-css { color: #2196f3; }
.file-item .file-icon.file-html { color: #e44d26; }
.file-item .file-icon.file-ejs { color: #a4c639; }
.file-item .file-icon.file-md { color: #999; }
.file-item .file-icon.file-env { color: #ff5722; }
.file-item .file-icon.file-default { color: var(--text-muted); }
.file-item .file-name {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.file-item .file-mtime {
  font-size: 11px;
  color: var(--text-muted, #777);
  margin-left: auto;
  margin-right: 8px;
  white-space: nowrap;
  flex-shrink: 0;
}
.file-item .file-size {
  font-size: 11px;
  color: var(--text-muted);
  flex-shrink: 0;
}
.file-item .file-download {
  opacity: 0;
  transition: opacity 0.15s;
  color: var(--text-muted);
  font-size: 14px;
}
.file-item:hover .file-download {
  opacity: 1;
}
.file-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 40px 20px;
  color: var(--text-muted);
  font-size: 13px;
}
/* file-panel-toggle artik form icinde, absolute pozisyon gereksiz */

@media (max-width: 768px) {
  .file-panel { position: fixed; right: 0; top: 48px; bottom: 0; z-index: 100; width: 280px; }
  .file-panel.collapsed { width: 0; }
}

/* File Editor Back Button - hidden on desktop, shown on mobile */
.file-editor-back-btn {
  display: none;
  background: none;
  border: none;
  color: var(--text-primary, #E5E7EB);
  font-size: 18px;
  padding: 8px;
  cursor: pointer;
  border-radius: 6px;
  flex-shrink: 0;
  min-width: 44px;
  min-height: 44px;
  align-items: center;
  justify-content: center;
}
.file-editor-back-btn:hover {
  color: var(--brand-accent, #00E5A8);
  background: rgba(0,229,168,0.08);
}

/* File Editor Modal */
.file-editor-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0,0,0,0.7);
  z-index: 1000;
  align-items: center;
  justify-content: center;
}
.file-editor-overlay.active {
  display: flex;
}
.file-editor-modal {
  width: 85vw;
  height: 80vh;
  max-width: 1200px;
  background: var(--bg-sidebar);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  box-shadow: 0 20px 60px rgba(0,0,0,0.5);
}
.file-editor-header {
  padding: 12px 20px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
}
.file-editor-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 600;
}
.file-editor-title i {
  color: var(--brand-accent);
}
.file-editor-actions {
  display: flex;
  gap: 8px;
}
.file-editor-actions .btn {
  border-radius: 6px;
}
.file-editor-actions .btn-success {
  background: var(--brand-accent);
  border-color: var(--brand-accent);
  color: #000;
  font-weight: 600;
}
.file-editor-actions .btn-success:hover {
  background: #00cc6a;
}
.file-editor-body {
  flex: 1;
  overflow: hidden;
  padding: 0;
}
.file-editor-body textarea {
  width: 100%;
  height: 100%;
  background: #0d1117;
  color: #e6edf3;
  border: none;
  padding: 16px 20px;
  font-family: 'Cascadia Code', 'Fira Code', 'Consolas', monospace;
  font-size: 13px;
  line-height: 1.6;
  resize: none;
  outline: none;
  tab-size: 2;
}
.file-editor-footer {
  padding: 8px 20px;
  border-top: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  color: var(--text-muted);
  flex-shrink: 0;
}
.file-editor-footer .saved {
  color: var(--brand-accent);
}
.file-editor-footer .error {
  color: #f85149;
}
.file-editor-footer .saving {
  color: #d29922;
}

@media (max-width: 768px) {
  .file-editor-overlay {
    z-index: 2000;
    align-items: stretch;
    justify-content: stretch;
  }
  .file-editor-modal {
    width: 100vw !important;
    height: 100vh !important;
    height: 100dvh !important;
    max-width: 100vw !important;
    border-radius: 0;
    margin: 0;
  }
  .file-editor-header {
    padding: 10px 12px;
    min-height: 48px;
  }
  .file-editor-title {
    font-size: 13px;
    min-width: 0;
    overflow: hidden;
  }
  .file-editor-title span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .file-editor-actions {
    gap: 6px;
    flex-shrink: 0;
  }
  .file-editor-actions .btn {
    min-width: 44px;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    padding: 6px 10px;
  }
  .file-editor-body textarea {
    font-size: 12px;
    padding: 10px 12px;
    line-height: 1.5;
    -webkit-overflow-scrolling: touch;
  }
  .file-editor-footer {
    padding: 6px 12px;
    font-size: 11px;
  }
}

.session-status { padding: 8px 12px; background: var(--bg-card); border-radius: 8px; margin-bottom: 12px; font-size: 13px; }

.empty-state { text-align: center; padding: 48px 20px; color: var(--text-secondary); }
.empty-state i { font-size: 52px; display: block; margin-bottom: 12px; opacity: 0.5; }
.empty-state p { font-size: 16px; margin-bottom: 4px; }

.text-brand { color: var(--brand-accent) !important; }

a { color: var(--brand-accent); }
a:hover { color: var(--brand-accent-hover); }

.form-check-input { background-color: var(--bg-input); border-color: var(--border-color); }
.form-check-input:checked { background-color: var(--brand-accent); border-color: var(--brand-accent); }

/* ===== Kontrast Duzeltmeleri ===== */

/* Bootstrap text-muted override - dark tema icin daha parlak */
.text-muted {
  color: #9ca3af !important;
}

/* Bootstrap text-secondary override */
.text-secondary {
  color: var(--text-secondary) !important;
}

/* Form text/help text */
.form-text {
  color: #9ca3af !important;
  font-size: 12px;
}

/* Small text inside cards - daha okunakli */
.card .text-muted,
.card .small.text-muted,
.card p.text-muted {
  color: #9ca3af !important;
}

/* Card description text */
.card-body .text-muted.small,
.card-body p.text-muted {
  color: #a1a7b0 !important;
}


/* Badge text okunakli */
.badge.bg-secondary {
  background: #374151 !important;
  color: #d1d5db !important;
}

/* Placeholder text biraz daha parlak */
.form-control::placeholder,
.form-select::placeholder {
  color: #6b7280 !important;
}

/* Table text */
.table td {
  color: var(--text-primary);
}
.table .text-muted {
  color: #9ca3af !important;
}

/* Type card description */
.type-card .type-desc {
  color: #9ca3af;
}

/* Action card description */
.action-card .action-desc {
  color: #9ca3af;
}

/* Empty state text */
.empty-state {
  color: #9ca3af;
}

/* Section titles in sidebar */
.sidebar-section-title {
  color: #6b7280;
}

/* Collapse icindeki text */
.collapse .text-muted,
.collapsing .text-muted {
  color: #9ca3af !important;
}

/* form-label small - label lar okunakli olmali */
.form-label.small,
label.form-label {
  color: var(--text-primary);
}

/* btn-outline-secondary daha gorunur */
.btn-outline-secondary {
  color: #9ca3af !important;
  border-color: #4b5563 !important;
}
.btn-outline-secondary:hover {
  color: var(--text-primary) !important;
  background: rgba(255,255,255,0.05) !important;
  border-color: #6b7280 !important;
}

/* ===== Sidebar Toggle - Icon Only Mode (Desktop) ===== */
.app-sidebar {
  transition: width 0.15s ease, transform 0.15s ease;
  overflow: hidden;
}
.main-content {
  transition: margin-left 0.15s ease;
}
.top-navbar {
  transition: left 0.15s ease;
}

.sidebar-hidden .app-sidebar {
  width: 56px;
  transform: none;
}
.sidebar-hidden .app-sidebar .sidebar-brand span {
  display: none;
}
.sidebar-hidden .app-sidebar .sidebar-brand {
  justify-content: center;
  padding: 0;
}
.sidebar-hidden .app-sidebar .sidebar-brand a {
  gap: 0;
  justify-content: center;
}
.sidebar-hidden .app-sidebar .sidebar-link span {
  display: none;
}
.sidebar-hidden .app-sidebar .sidebar-link {
  justify-content: center;
  padding: 10px 0;
  gap: 0;
}
.sidebar-hidden .app-sidebar .sidebar-link i {
  font-size: 18px;
  width: auto;
}
.sidebar-hidden .app-sidebar .sidebar-section-title {
  display: none;
}
.sidebar-hidden .app-sidebar .sidebar-nav {
  padding: 12px 4px;
}
.sidebar-hidden .app-sidebar .sidebar-footer {
  display: none;
}
.sidebar-hidden .main-content {
  margin-left: 56px;
}
.sidebar-hidden .top-navbar {
  left: 56px;
}

/* Sidebar link tooltip on hover in collapsed mode */
.sidebar-hidden .app-sidebar .sidebar-link {
  position: relative;
}
.sidebar-hidden .app-sidebar .sidebar-link:hover::after {
  content: attr(data-tooltip);
  position: absolute;
  left: 100%;
  top: 50%;
  transform: translateY(-50%);
  background: #232A39;
  color: var(--text-primary);
  padding: 5px 10px;
  border-radius: 6px;
  font-size: 12px;
  white-space: nowrap;
  z-index: 9999;
  border: 1px solid var(--border-color);
  margin-left: 8px;
  pointer-events: none;
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

@media (max-width: 991px) {
  .app-sidebar { transform: translateX(-100%); transition: transform 0.15s ease; width: var(--sidebar-width) !important; }
  .app-sidebar.open { transform: translateX(0); }
  .sidebar-hidden .app-sidebar { transform: translateX(-100%); width: var(--sidebar-width) !important; }
  .sidebar-hidden .main-content { margin-left: 0; }
  .sidebar-hidden .top-navbar { left: 0; }
  .sidebar-overlay.show { display: block; }
  .top-navbar { left: 0; }
  .main-content { margin-left: 0; }
}
@media (max-width: 768px) {
  .type-selector { flex-direction: column; }
  .content-wrapper { padding: 16px; }
  .chat-sidebar { display: none; }
}

/* Markdown icin chat bubble */
.msg-bubble h1, .msg-bubble h2, .msg-bubble h3 { margin: 8px 0 4px; font-size: 15px; font-weight: 600; color: var(--text-primary); }
.msg-bubble h1 { font-size: 17px; }
.msg-bubble h2 { font-size: 16px; }
.msg-bubble p { margin: 4px 0; }
.msg-bubble ul, .msg-bubble ol { margin: 4px 0; padding-left: 20px; }
.msg-bubble li { margin: 2px 0; }
.msg-bubble strong { color: var(--text-primary); }
.msg-bubble code { background: rgba(255,255,255,0.06); padding: 1px 5px; border-radius: 4px; font-size: 12px; font-family: 'Fira Code', 'Consolas', monospace; }
.msg-bubble pre { background: #1e1e2e; border-radius: 8px; padding: 12px; margin: 8px 0; overflow-x: auto; position: relative; }
.msg-bubble pre code { background: none; padding: 0; font-size: 12px; line-height: 1.5; color: #cdd6f4; }
.msg-bubble a { color: var(--brand-accent); text-decoration: underline; }
.msg-bubble blockquote { border-left: 3px solid var(--brand-accent); padding-left: 10px; margin: 8px 0; color: var(--text-muted); }
.msg-bubble table { width: 100%; border-collapse: collapse; margin: 8px 0; font-size: 12px; }
.msg-bubble th, .msg-bubble td { border: 1px solid var(--border-color); padding: 6px 8px; text-align: left; }
.msg-bubble th { background: var(--bg-tertiary); font-weight: 600; }

/* Copy butonu */
.copy-btn { position: absolute; top: 6px; right: 6px; background: rgba(255,255,255,0.1); border: none; color: #888; padding: 4px 8px; border-radius: 4px; cursor: pointer; font-size: 12px; opacity: 0; transition: opacity 0.2s; z-index: 1; }
.copy-btn:hover { background: rgba(255,255,255,0.2); color: #fff; }
pre:hover .copy-btn { opacity: 1; }

/* Assistant markdown content - override pre-wrap */
.msg-bubble.assistant-content { white-space: normal; }

/* Typing timer */
.typing-text { font-size: 11px; color: var(--text-muted); margin-top: 2px; }

/* Inline code - kopyalanabilir */
.msg-bubble code {
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}
.msg-bubble code:hover {
  background: rgba(255,255,255,0.12);
  color: #fff;
}
.msg-bubble pre code {
  cursor: default;
}
.msg-bubble pre code:hover {
  background: none;
  color: #cdd6f4;
}
.msg-bubble code.code-copied {
  background: rgba(76,175,80,0.3) !important;
  color: #4caf50 !important;
}

/* Kopyalandi tooltip */
.inline-copy-tooltip {
  background: #4caf50;
  color: #fff;
  padding: 4px 10px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 500;
  z-index: 9999;
  pointer-events: none;
  transition: opacity 0.3s;
  box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

/* ===== Sidebar Footer User Profile ===== */
.sidebar-user-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--brand-accent-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.sidebar-user-avatar i { color: var(--brand-accent); font-size: 1.3em; }
.sidebar-user-details { min-width: 0; }
.sidebar-user-name {
  font-size: 1em;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.sidebar-user-role {
  font-size: 0.8em;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.sidebar-user-role.admin { color: var(--brand-accent); }
.sidebar-user-role.user { color: var(--text-muted); }
.sidebar-logout {
  color: var(--text-muted);
  font-size: 1.35em;
  flex-shrink: 0;
  padding: 8px;
  border-radius: 6px;
  transition: all 0.2s;
}
.sidebar-logout:hover { color: #dc3545; background: rgba(220,53,69,0.1); }
.sidebar-version {
  font-size: 0.7em;
  color: var(--text-muted);
  padding-top: 8px;
  text-align: center;
}

/* ===== Navbar ===== */
.sidebar-toggle-btn { padding: 4px 8px; }
.sidebar-toggle-btn i { font-size: 20px; color: var(--text-primary); }
.navbar-page-title {
  color: var(--text-primary);
  font-size: 1.05em;
  font-weight: 600;
  margin-bottom: 0;
}
.navbar-clock {
  color: var(--text-muted);
  font-size: 0.85em;
  font-family: monospace;
}

/* ===== Backups Page ===== */
.backups-title-icon { color: #58a6ff; }
.backup-accordion-item {
  background: rgba(255,255,255,0.02);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 8px !important;
  overflow: hidden;
  margin-bottom: 8px;
}
.backup-accordion-btn {
  background: rgba(255,255,255,0.04);
  color: #e6edf3;
  border: none;
  padding: 14px 18px;
}
.backup-accordion-btn:hover { background: rgba(255,255,255,0.06) !important; }
.backup-accordion-btn:not(.collapsed)::after { filter: invert(1); }
.backup-accordion-btn::after { filter: invert(0.6); }
.backup-accordion-btn:focus { box-shadow: none; }
.backup-accordion-header {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
}
.backup-project-icon { font-size: 18px; color: #58a6ff; }
.backup-project-name { color: #e6edf3; font-size: 14px; }
.backup-project-domain { font-size: 12px; color: #8b949e; font-weight: 400; }
.backup-header-right {
  margin-left: auto;
  display: flex;
  gap: 12px;
  align-items: center;
  margin-right: 12px;
}
.backup-count-badge {
  background: #238636;
  color: #fff;
  font-weight: 600;
  font-size: 11px;
}
.backup-total-size { font-size: 12px; color: #b1bac4; font-weight: 500; }
.backup-accordion-body { background: rgba(0,0,0,0.1); }
.backup-table { --bs-table-bg: transparent; --bs-table-hover-bg: rgba(255,255,255,0.03); }
.backup-table th {
  background: transparent;
  border-top: none;
  padding: 10px 16px;
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 500;
}
.backup-table td { padding: 10px 16px; }
.backup-table .backup-filename { color: #c9d1d9; }
.backup-table .backup-file-icon { color: #58a6ff; }
.backup-table .backup-meta { color: #8b949e; }
.backup-table .backup-actions { white-space: nowrap; }
.backup-actions-flex { display: flex; gap: 4px; }
.backup-empty-icon { font-size: 48px; display: block; margin-bottom: 16px; opacity: 0.4; }

/* ===== Projects Index Page ===== */
.projects-total-badge { background: var(--brand-accent-subtle); color: var(--brand-accent); font-size: 0.85em; }
.projects-empty-icon { font-size: 2em; color: var(--text-muted); }
.projects-folder-icon { color: var(--brand-accent); }
.projects-cat-badge { background: var(--brand-accent-subtle); color: var(--brand-accent); font-size: 0.75em; }
.projects-badge-sm { font-size: 0.7em; }
.projects-desc-truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.projects-date-text { font-size: 10px; }
.projects-uncat-icon { color: var(--text-muted); }
.projects-uncat-badge { background: rgba(255,255,255,0.05); color: var(--text-muted); font-size: 0.75em; }
.projects-shared-section { border-top: 2px solid rgba(88,166,255,0.3); }
.projects-shared-icon { color: #58a6ff; }
.projects-shared-badge { background: rgba(88,166,255,0.15); color: #58a6ff; font-size: 0.75em; }
.projects-shared-card { border-left: 3px solid #58a6ff; }
.projects-shared-chat-badge { background: rgba(88,166,255,0.15); color: #58a6ff; font-size: 0.7em; }
.projects-share-hr { border-color: var(--border-color); }
.projects-share-item { background: rgba(255,255,255,0.03); border-radius: 6px; margin-bottom: 4px; }
.projects-share-dot { display: inline-block; width: 12px; height: 12px; border-radius: 50%; margin-right: 6px; }
.projects-share-perm-icon { font-size: 12px; color: #8b949e; }
.projects-share-switch { min-height: auto; padding-left: 2.5em; }
.projects-share-switch .form-check-input { cursor: pointer; margin-top: 0; }
.projects-share-remove { color: #f85149; font-size: 14px; padding: 0 4px; line-height: 1; opacity: 0.6; }
.projects-share-remove:hover { opacity: 1; color: #f85149; }

.projects-main-card {
  border: 1px solid var(--border-color, #333);
  border-radius: 10px;
  overflow: hidden;
}
.projects-accordion {
  border-bottom: 1px solid var(--border-color, #333);
}
.projects-accordion:last-child {
  border-bottom: none;
}
.projects-accordion-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  cursor: pointer;
  background: rgba(255,255,255,0.02);
  transition: background 0.2s;
  user-select: none;
}
.projects-accordion-header:hover {
  background: rgba(255,255,255,0.05);
}
.accordion-chevron {
  transition: transform 0.25s;
  font-size: 14px;
  color: var(--text-muted);
}
.accordion-chevron.collapsed {
  transform: rotate(-90deg);
}
.projects-accordion-body {
  overflow: hidden;
  transition: max-height 0.3s ease;
}
.projects-accordion-body.collapsed {
  max-height: 0 !important;
  overflow: hidden;
}
.project-card {
  border: 1px solid var(--border-color, #333) !important;
  transition: border-color 0.2s, transform 0.15s;
  min-height: 160px;
}
.project-card:hover {
  border-color: var(--brand-accent, #00E5A8) !important;
  transform: translateY(-2px);
}
.project-chat-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  background: var(--brand-accent, #00E5A8);
  color: #000;
  border-radius: 8px;
  font-size: 16px;
  cursor: pointer;
  transition: all 0.2s;
  flex-shrink: 0;
}
.project-chat-btn:hover {
  background: #0fd584;
  transform: scale(1.05);
}
.project-move-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  background: rgba(255,255,255,0.05);
  color: var(--text-muted, #999);
  border-radius: 6px;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s;
  flex-shrink: 0;
}
.project-move-btn:hover {
  background: rgba(255,255,255,0.1);
  color: #fff;
}
.project-share-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  background: rgba(255,255,255,0.05);
  color: var(--text-muted, #999);
  border-radius: 6px;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s;
  flex-shrink: 0;
}
.project-share-btn:hover {
  background: rgba(88, 166, 255, 0.15);
  color: #58a6ff;
}

/* ===== Databases Page ===== */
.db-title-icon { color: var(--brand-accent); }
.db-card { background: var(--card-bg); border: 1px solid var(--border-color); }
.db-card-header { background: rgba(0,229,168,0.05); border-bottom: 1px solid var(--border-color); }
.db-header-icon { color: var(--brand-accent); }
.db-info-label { width: 150px; font-weight: 600; }
.db-info-label-sm { font-weight: 600; }
.db-server-badge { background: rgba(13,110,253,0.25); color: #6ea8fe; }
.db-conn-code { color: var(--brand-accent); font-size: 0.85em; }
.db-empty-icon { font-size: 2.5em; color: var(--brand-accent); opacity: 0.7; }
.db-empty-icon-sm { font-size: 2em; color: var(--text-muted); }
.db-create-btn { background: var(--brand-accent); color: #000; font-weight: 600; }
.db-copy-btn-sm { padding: 1px 5px; font-size: 11px; }
.db-th-center { text-align: center; }
.db-td-center { text-align: center; }
.db-modal-content { background: var(--card-bg); border: 1px solid var(--border-color); }
.db-modal-header { border-bottom: 1px solid var(--border-color); }
.db-modal-header-create { border-top: 3px solid var(--brand-accent); border-bottom: 1px solid var(--border-color); }
.db-modal-footer { border-top: 1px solid var(--border-color); }
.db-view-container { height: 60vh; }
.db-view-sidebar { width: 220px; border-right: 1px solid var(--border-color); overflow-y: auto; padding: 10px 0; flex-shrink: 0; }
.db-view-main { flex: 1; overflow: auto; display: flex; flex-direction: column; }
.db-view-placeholder-icon { font-size: 2em; opacity: 0.3; }
.db-view-info { font-size: 13px; }
.db-input-prefix { background: var(--border-color); border-color: var(--border-color); color: var(--brand-accent); font-weight: 600; }
.db-form-input { background: var(--bg-body); border-color: var(--border-color); color: var(--text-primary); }
.db-form-input-mono { background: var(--bg-body); border-color: var(--border-color); color: var(--text-primary); font-family: monospace; }
.db-error-alert { font-size: 13px; }
.db-success-box { background: rgba(0,229,168,0.1); border: 1px solid rgba(0,229,168,0.3); border-radius: 8px; padding: 12px; }
.db-success-title { color: var(--brand-accent); }
.db-result-text { font-size: 13px; }
.db-col-name { font-weight: 600; color: var(--brand-accent); }
.db-nullable-yes { color: #f0883e; }
.db-col-default { font-size: 12px; }
.db-null-val { color: var(--text-muted); font-style: italic; }
.db-flex-scroll { flex: 1; overflow: auto; }
.db-table-icon { font-size: 11px; opacity: 0.5; }
.db-sidebar-header { padding: 6px 14px; font-size: 11px; color: var(--text-muted); border-bottom: 1px solid var(--border-color); }
.db-no-table-msg { font-size: 13px; }
.db-copy-result-btn { padding: 0 4px; font-size: 11px; }
.db-conn-result { color: var(--brand-accent); font-size: 12px; }
.db-sidebar-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 7px 14px;
  cursor: pointer;
  font-size: 13px;
  color: var(--text-secondary, #ccc);
  text-decoration: none;
}
.db-sidebar-item:hover, .db-sidebar-item.active {
  background: rgba(255,255,255,0.05);
  color: var(--text-primary);
}
.db-sidebar-item.active {
  border-left: 2px solid var(--brand-accent);
}
.db-sidebar-item .tbl-size {
  font-size: 11px;
  color: var(--text-muted);
}
#dbViewContent table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
#dbViewContent th {
  position: sticky;
  top: 0;
  background: var(--card-bg, #161b22);
  padding: 8px 10px;
  text-align: left;
  font-weight: 600;
  color: var(--text-primary);
  border-bottom: 1px solid var(--border-color);
  white-space: nowrap;
}
#dbViewContent td {
  padding: 6px 10px;
  border-bottom: 1px solid rgba(255,255,255,0.05);
  color: var(--text-secondary, #ccc);
  max-width: 250px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
#dbViewContent tr:hover td {
  background: rgba(255,255,255,0.03);
}
.db-view-tabs {
  display: flex;
  gap: 0;
  border-bottom: 1px solid var(--border-color);
  flex-shrink: 0;
}
.db-view-tab {
  padding: 8px 16px;
  cursor: pointer;
  font-size: 13px;
  color: var(--text-muted);
  border: none;
  border-bottom: 2px solid transparent;
  background: none;
}
.db-view-tab.active {
  color: var(--brand-accent);
  border-bottom-color: var(--brand-accent);
}

/* ===== Project Detail Page ===== */
.detail-subdomain-icon { color: #00E5A8; }
.detail-subdomain-link { color: #00E5A8; text-decoration: none; }
.detail-prompt-box { background: rgba(255,255,255,0.03); border: 1px solid rgba(255,255,255,0.08); border-radius: 8px; }
.detail-prompt-text { white-space: pre-wrap; font-size: 0.9em; }
.detail-stat-value { font-size: 16px; }
.detail-gear-icon { color: var(--brand-accent); }
.detail-integration-row { background: rgba(255,255,255,0.03); border-radius: 8px; }
.detail-integration-icon-size { font-size: 1.3em; }
.detail-instruction-box { background: rgba(255,255,255,0.02); border-radius: 6px; }
.detail-ns-warning-row { background: rgba(255,193,7,0.05); border-top: none; padding: 8px 16px; }
.detail-ns-code { font-size: 0.85em; }
.detail-load-more { text-align: center; padding: 12px; }
.detail-empty-activity-icon { font-size: 28px; display: block; margin-bottom: 8px; opacity: 0.4; }
.detail-danger-card { border-color: rgba(220,53,69,0.3); }
.detail-error-text { color: #dc3545; }
.detail-success-text { color: #00E5A8; }

/* ===== Project Files Page ===== */
.files-breadcrumb { font-size: 0.85em; }
.files-viewer-header { border-bottom: 1px solid var(--border-color); }
.files-code-viewer { max-height: 600px; overflow: auto; background: rgba(0,0,0,0.3); color: #e0e0e0; font-size: 0.85em; white-space: pre-wrap; }
.files-empty-icon { font-size: 32px; display: block; margin-bottom: 8px; opacity: 0.4; }
.file-row { display:flex; align-items:center; padding:10px 16px; border-bottom:1px solid rgba(255,255,255,0.05); cursor:pointer; transition:background 0.15s; }
.file-row:hover { background:rgba(255,255,255,0.04); }
.file-row i { font-size:1.2em; margin-right:10px; min-width:20px; text-align:center; }
.file-row .file-name { flex:1; }

/* ===== Project DNS Page ===== */
.dns-ns-code { font-size: 0.9em; }

/* ===== Project Settings Page ===== */
.settings-code-textarea { font-family: monospace; font-size: 0.9em; }

/* ===== New Project Page ===== */
.new-domain-suffix { background: rgba(255,255,255,0.03); border-color: rgba(255,255,255,0.08); color: #00E5A8; }
.new-subdomain-feedback { font-size: 0.85em; }

/* ===== Error Page ===== */
.error-page-icon { font-size: 5rem; color: #00E5A8; }
.error-page-code { font-size: 4rem; font-weight: 700; color: #00E5A8; }

/* ===== Admin Pages ===== */
.admin-subdomain-link { font-size: 0.85em; }
.admin-textarea-code { font-size: 13px; }
.admin-card-narrow { max-width: 600px; }

/* ===== Chat Page Styles (migrated from chat.ejs) ===== */
  .chat-container {
    display: flex;
    height: calc(100vh - 48px);
    overflow: hidden;
  }
  .chat-main {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-width: 0;
    overflow: hidden;
  }
  .chat-messages {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
  }
  .chat-input-area {
    flex-shrink: 0;
  }
  .site-preview {
    flex-shrink: 0;
  }
  .assistant-streaming {
    min-height: 20px;
    border: 2px solid rgba(255, 140, 50, 0.85) !important;
    animation: streaming-pulse 1.8s ease-in-out infinite !important;
    box-shadow: 0 0 16px rgba(255, 140, 50, 0.25), inset 0 0 8px rgba(255, 140, 50, 0.04);
  }
  @keyframes streaming-pulse {
    0%, 100% {
      border-color: rgba(255, 140, 50, 0.9);
      box-shadow: 0 0 20px rgba(255, 140, 50, 0.3), inset 0 0 8px rgba(255, 140, 50, 0.05);
    }
    50% {
      border-color: rgba(255, 140, 50, 0.25);
      box-shadow: 0 0 4px rgba(255, 140, 50, 0.06), inset 0 0 2px rgba(255, 140, 50, 0.01);
    }
  }
  /* Thinking block */
  .thinking-block {
    margin: 6px 0 8px 0;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.025);
    font-size: 12px;
    overflow: hidden;
  }
  .thinking-block summary {
    cursor: pointer;
    padding: 6px 10px;
    color: #8b949e;
    font-style: italic;
    user-select: none;
    display: flex;
    align-items: center;
    gap: 2px;
  }
  .thinking-block summary:hover {
    color: #c9d1d9;
    background: rgba(255, 255, 255, 0.03);
  }
  .thinking-block summary .thinking-chars {
    font-size: 11px;
    opacity: 0.6;
    margin-left: 4px;
  }
  .thinking-block[open] summary {
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  }
  .thinking-content {
    padding: 8px 10px;
    color: #8b949e;
    font-size: 12px;
    line-height: 1.5;
    white-space: pre-wrap;
    word-break: break-word;
    max-height: 300px;
    overflow-y: auto;
    font-family: 'SF Mono', 'Fira Code', 'Consolas', monospace;
  }
  .stream-tool-indicator {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 5px 10px;
    margin: 4px 0;
    font-size: 12px;
    color: var(--text-muted, #8b949e);
    background: rgba(255,255,255,0.03);
    border-left: 2px solid var(--accent, #00E5A8);
    border-radius: 0 4px 4px 0;
    font-family: 'SF Mono', 'Fira Code', 'Consolas', monospace;
    transition: opacity 0.3s;
  }
  .stream-tool-indicator.completed {
    border-left-color: #3fb950;
    opacity: 0.85;
  }
  .tool-icon {
    flex-shrink: 0;
    width: 16px;
    text-align: center;
  }
  .tool-name {
    color: var(--accent, #00E5A8);
    font-weight: 600;
  }
  .tool-detail {
    color: #c9d1d9;
    margin-left: 4px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .spin-icon {
    animation: spin 1s linear infinite;
    color: var(--accent, #00E5A8);
  }
  @keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
  }
  .stream-continue-marker {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    margin: 8px 0 4px 0;
    font-size: 11px;
    color: var(--accent, #00E5A8);
    opacity: 0.7;
    font-family: 'SF Mono', 'Fira Code', 'Consolas', monospace;
  }
  .stream-continue-marker::before {
    content: '';
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--accent, #00E5A8), transparent);
    opacity: 0.3;
    max-width: 40px;
  }
  @keyframes continuePulse {
    0%, 100% { opacity: 0.5; }
    50% { opacity: 1; }
  }
  .stream-continue-marker .continue-dots {
    animation: continuePulse 1.5s ease-in-out infinite;
  }
  .stream-processing-indicator {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    margin: 6px 0 2px 0;
    font-size: 12px;
    color: var(--accent, #00E5A8);
    font-family: "SF Mono", "Fira Code", "Consolas", monospace;
    opacity: 0.8;
  }
  .processing-dot-anim {
    display: inline-flex;
    gap: 3px;
  }
  .processing-dot-anim span {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--accent, #00E5A8);
    animation: procDot 1.4s ease-in-out infinite;
  }
  .processing-dot-anim span:nth-child(2) { animation-delay: 0.2s; }
  .processing-dot-anim span:nth-child(3) { animation-delay: 0.4s; }
  @keyframes procDot {
    0%, 80%, 100% { opacity: 0.2; transform: scale(0.8); }
    40% { opacity: 1; transform: scale(1.1); }
  }
  .stream-tool-indicator .tool-count { color: #f0883e; font-weight: 600; font-size: 0.85em; background: rgba(240,136,62,0.1); padding: 0 4px; border-radius: 3px; }

  /* Mesaj balonu kopyalama butonu */
  .msg-bubble { position: relative; }
  .msg-copy-btn {
    position: absolute;
    top: 4px;
    right: 4px;
    background: var(--bg-secondary, #2d2d2d);
    border: 1px solid var(--border-color, #444);
    color: var(--text-muted, #999);
    border-radius: 4px;
    padding: 2px 6px;
    font-size: 12px;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.2s;
    z-index: 5;
  }
  .msg-bubble:hover .msg-copy-btn { opacity: 1; }
  .msg-copy-btn:hover { color: var(--text-primary, #fff); }

  /* Dosya badge */
  .attached-file-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: var(--bg-tertiary, #1e1e1e);
    border: 1px solid var(--border-color, #444);
    border-radius: 6px;
    padding: 3px 8px;
    font-size: 12px;
    color: var(--text-muted, #aaa);
    margin-bottom: 6px;
  }
  .attached-file-badge i { font-size: 14px; }

  /* Chat Image Preview */
  .chat-image-preview {
    margin: 4px 0;
    max-width: 320px;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid rgba(255,255,255,0.1);
    background: rgba(0,0,0,0.2);
  }
  .chat-image-preview img {
    width: 100%;
    max-height: 240px;
    object-fit: cover;
    cursor: pointer;
    display: block;
    transition: opacity 0.2s;
  }
  .chat-image-preview img:hover {
    opacity: 0.85;
  }
  .chat-image-name {
    padding: 4px 8px;
    font-size: 11px;
    color: var(--text-muted, #8b949e);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  /* Image Lightbox Modal */
  .image-lightbox {
    display: none;
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.9);
    z-index: 9999;
    cursor: zoom-out;
    align-items: center;
    justify-content: center;
  }
  .image-lightbox.show {
    display: flex;
  }
  .image-lightbox img {
    max-width: 90vw;
    max-height: 90vh;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 4px 32px rgba(0,0,0,0.5);
  }
  .image-lightbox-close {
    position: absolute;
    top: 16px;
    right: 20px;
    color: #fff;
    font-size: 28px;
    cursor: pointer;
    opacity: 0.7;
    transition: opacity 0.2s;
    background: none;
    border: none;
  }
  .image-lightbox-close:hover {
    opacity: 1;
  }

  /* IDE Panel Resize System */
  .resize-handle {
    width: 8px;
    cursor: col-resize;
    background: var(--border-color, #30363d);
    position: relative;
    flex-shrink: 0;
    z-index: 5;
    transition: background 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
  }
  .resize-handle:hover, .resize-handle.active {
    background: var(--accent, #00E5A8);
  }
  .resize-handle::after {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    left: -4px;
    right: -4px;
  }
  .resize-grip {
    writing-mode: vertical-lr;
    font-size: 14px;
    letter-spacing: 3px;
    color: rgba(255,255,255,0.6);
    pointer-events: none;
    user-select: none;
    text-shadow: 0 0 2px rgba(255,255,255,0.3);
  }
  .resize-handle:hover .resize-grip {
    color: rgba(0,0,0,0.7);
    text-shadow: none;
  }

  /* Preview Panel (sag taraf - iframe) */
  .preview-panel {
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    width: 45%;
    min-width: 0;
    background: var(--bg-card, #0d1117);
    border-left: none;
    overflow: hidden;
    transition: width 0.2s ease;
  }
  .preview-panel.collapsed {
    width: 0 !important;
    overflow: hidden;
  }
  .preview-panel .preview-header {
    flex-shrink: 0;
  }
  .preview-panel .preview-body {
    flex: 1;
    height: auto !important;
    min-height: 0;
  }
  .preview-panel .preview-body iframe {
    width: 100%;
    height: 100%;
  }
  .preview-hint-bar {
    background: rgba(255, 193, 7, 0.08);
    border-bottom: 1px solid rgba(255, 193, 7, 0.15);
    color: var(--text-muted, #999);
    font-size: 11px;
    padding: 3px 10px;
    text-align: center;
    flex-shrink: 0;
  }
  .preview-hint-bar kbd {
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 3px;
    padding: 0 4px;
    font-size: 10px;
  }
  .preview-hint-bar i {
    font-size: 11px;
    color: #f0ad4e;
  }

  /* File panel - sol taraf */
  .file-panel {
    position: relative !important;
    width: 260px;
    flex-shrink: 0;
    border-right: 1px solid var(--border-color, #30363d);
    border-left: none !important;
    transition: width 0.2s ease;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: var(--bg-sidebar, #151A24);
  }
  .file-panel.collapsed {
    width: 0 !important;
    border-right: none;
    overflow: hidden;
  }

  /* Chat topbar */
  .chat-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 6px 16px;
    border-bottom: 1px solid var(--border-color, #30363d);
    background: var(--bg-card, #1A1F2B);
    flex-shrink: 0;
    min-height: 36px;
  }
  .chat-topbar-left {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
  }
  .chat-topbar-back {
    color: var(--text-muted, #8b949e);
    font-size: 14px;
    text-decoration: none;
    padding: 2px 4px;
    border-radius: 4px;
    transition: all 0.15s;
  }
  .chat-topbar-back:hover {
    color: var(--brand-accent, #00E5A8);
    background: rgba(0,229,168,0.08);
  }
  .chat-topbar-name {
    font-weight: 600;
    font-size: 13px;
    color: var(--text-primary, #E5E7EB);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .chat-topbar-right {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
  }

  .collapsed-indicator {
    width: 42px;
    background: var(--bg-sidebar, #161b22);
    border-right: 1px solid var(--border-color, #30363d);
    display: flex;
    flex-direction: column;
    align-items: center;
    padding-top: 12px;
    flex-shrink: 0;
  }
  .collapsed-indicator-right {
    border-right: none;
    border-left: 1px solid var(--border-color, #30363d);
    position: relative;
  }
  .collapsed-indicator-right::after {
    content: 'Onizleme';
    writing-mode: vertical-rl;
    text-orientation: mixed;
    font-size: 10px;
    color: var(--text-muted, #8b949e);
    letter-spacing: 2px;
    margin-top: 8px;
    opacity: 0.5;
  }
  .expand-btn {
    background: none;
    border: none;
    color: var(--text-muted, #8b949e);
    cursor: pointer;
    padding: 8px;
    border-radius: 6px;
    font-size: 16px;
    transition: all 0.2s;
  }
  .expand-btn:hover {
    color: var(--accent, #00E5A8);
    background: rgba(0, 229, 168, 0.08);
  }

  .panel-collapse-btn {
    position: absolute;
    top: 8px;
    right: 8px;
    background: none;
    border: none;
    color: var(--text-muted, #8b949e);
    cursor: pointer;
    padding: 4px 6px;
    border-radius: 4px;
    font-size: 12px;
    z-index: 2;
    transition: all 0.2s;
  }
  .panel-collapse-btn:hover {
    color: var(--accent, #00E5A8);
    background: rgba(0, 229, 168, 0.08);
  }

  /* chat-sidebar kaldirildi, file-panel sol tarafta */

  body.resizing {
    cursor: col-resize !important;
    user-select: none !important;
  }
  body.resizing *, body.resizing * {
    cursor: inherit !important;
    user-select: none !important;
  }
  body.resizing iframe {
    pointer-events: none !important;
  }

  /* Stop button */
  .btn-stop {
    background: #dc3545 !important;
    border: none !important;
    color: #fff !important;
    animation: stopPulse 1.5s ease-in-out infinite;
  }
  .btn-stop:hover {
    background: #c82333 !important;
  }
  @keyframes stopPulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(220, 53, 69, 0.4); }
    50% { box-shadow: 0 0 0 6px rgba(220, 53, 69, 0); }
  }

  /* IDE Status Bar */
  .ide-statusbar {
    height: 24px;
    background: #232A39;
    border-top: 1px solid var(--border-color, #30363d);
    display: flex;
    align-items: center;
    padding: 0 12px;
    font-size: 11px;
    color: var(--text-muted, #8b949e);
    gap: 16px;
    flex-shrink: 0;
  }
  .ide-statusbar .status-item {
    display: flex;
    align-items: center;
    gap: 4px;
  }
  .ide-statusbar .status-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #3fb950;
  }
  .ide-statusbar .status-dot.busy {
    background: #f0883e;
    animation: dotPulse 1s ease-in-out infinite;
  }
  @keyframes dotPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
  }
  .ide-statusbar .status-spacer {
    flex: 1;
  }
  /* Drag & Drop Overlay */
  .chat-main.drag-over {
    position: relative;
  }
  .chat-drop-overlay {
    display: none;
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(47, 128, 237, 0.12);
    border: 2px dashed #2f80ed;
    border-radius: 8px;
    z-index: 100;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 8px;
    pointer-events: none;
  }
  .chat-main.drag-over .chat-drop-overlay {
    display: flex;
  }
  .chat-drop-overlay i {
    font-size: 40px;
    color: #2f80ed;
  }
  .chat-drop-overlay span {
    font-size: 14px;
    color: #2f80ed;
    font-weight: 500;
  }

  /* Activity Log Panel */
  .activity-panel {
    width: auto;
    min-width: 200px;
    max-width: 320px;
    flex-shrink: 0;
    background: var(--bg-sidebar, #151A24);
    border-left: 1px solid var(--border-color, #30363d);
    border-right: 1px solid var(--border-color, #30363d);
    display: flex;
    flex-direction: column;
    overflow: hidden;
  }
  .activity-panel.collapsed {
    width: 0 !important;
    min-width: 0 !important;
    border-left: none;
    overflow: hidden;
  }
  .activity-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 12px;
    border-bottom: 1px solid var(--border-color, #30363d);
    font-size: 12px;
    font-weight: 600;
    color: var(--text-primary);
  }
  .activity-panel-header .badge {
    font-size: 10px;
  }
  .activity-list {
    flex: 1;
    overflow-y: auto;
    padding: 4px;
    font-size: 11px;
    font-family: 'SF Mono', 'Consolas', monospace;
  }
  .activity-item {
    padding: 4px 8px;
    border-left: 2px solid transparent;
    margin-bottom: 2px;
    border-radius: 0 3px 3px 0;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .activity-item .act-time {
    color: #8b949e;
    margin-right: 6px;
    font-size: 10.5px;
    opacity: 0.9;
  }
  .activity-item .act-tool {
    font-weight: 600;
  }
  .activity-item.act-read { border-left-color: #58a6ff; }
  .activity-item.act-read .act-tool { color: #58a6ff; }
  .activity-item.act-write { border-left-color: #3fb950; }
  .activity-item.act-write .act-tool { color: #3fb950; }
  .activity-item.act-edit { border-left-color: #f0883e; }
  .activity-item.act-edit .act-tool { color: #f0883e; }
  .activity-item.act-bash { border-left-color: #bc8cff; }
  .activity-item.act-bash .act-tool { color: #bc8cff; }
  .activity-item.act-grep { border-left-color: #d2a8ff; }
  .activity-item.act-grep .act-tool { color: #d2a8ff; }
  .activity-item.act-glob { border-left-color: #79c0ff; }
  .activity-item.act-glob .act-tool { color: #79c0ff; }
  .activity-item.act-mcp { border-left-color: #f778ba; }
  .activity-item.act-mcp .act-tool { color: #f778ba; }
  .activity-item.act-default { border-left-color: #8b949e; }
  .activity-item.act-default .act-tool { color: #8b949e; }
  .activity-item.completed { opacity: 0.6; }
  .activity-item.completed .act-time { opacity: 0.8; }
  .activity-empty {
    color: #484f58;
    text-align: center;
    padding: 20px;
    font-style: italic;
  }
  #notesTextarea:focus {
    box-shadow: none;
    outline: none;
  }
  #notesAutoSaveStatus {
    transition: all 0.3s;
  }
  .preview-btn.active {
    background: var(--brand-accent) !important;
    color: #000 !important;
    border-color: var(--brand-accent) !important;
  }
  #previewFrame.mobile-view {
    width: 375px !important;
    height: 100% !important;
    margin: 0 auto;
    display: block;
    border-left: 1px solid var(--border-color, #333);
    border-right: 1px solid var(--border-color, #333);
  }
  .preview-body.mobile-mode {
    display: flex !important;
    justify-content: center !important;
    background: #0F131B !important;
  }
  #loadMoreIndicator {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px;
    gap: 8px;
  }

  /* File/Chat Search */
  .fp-search-box, .chat-search-box {
    padding: 4px 8px;
    border-bottom: 1px solid var(--border-color, #30363d);
    display: flex;
    align-items: center;
    gap: 4px;
    flex-shrink: 0;
  }
  .fp-search-box input, .chat-search-box input {
    flex: 1;
    background: rgba(255,255,255,0.05);
    border: 1px solid var(--border-color, #30363d);
    border-radius: 4px;
    color: var(--text-primary, #e6edf3);
    font-size: 12px;
    padding: 4px 8px;
    outline: none;
  }
  .fp-search-box input:focus, .chat-search-box input:focus {
    border-color: var(--brand-accent, #00E5A8);
  }
  .fp-search-box input::placeholder, .chat-search-box input::placeholder {
    color: var(--text-muted, #8b949e);
  }
  .chat-search-bar {
    display: none;
    padding: 6px 12px;
    background: rgba(0,0,0,0.3);
    border-bottom: 1px solid var(--border-color, #30363d);
    flex-shrink: 0;
  }
  .chat-search-bar.active { display: flex; align-items: center; }
  .chat-search-input-wrap {
    flex: 1;
    position: relative;
  }
  .chat-search-input-wrap .bi-search {
    position: absolute;
    left: 8px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 11px;
    color: var(--text-muted, #8b949e);
    pointer-events: none;
  }
  .chat-search-bar input {
    width: 100%;
    background: rgba(255,255,255,0.05);
    border: 1px solid var(--border-color, #30363d);
    border-radius: 4px;
    color: var(--text-primary, #e6edf3);
    font-size: 12px;
    padding: 5px 10px 5px 26px;
    outline: none;
  }
  .chat-search-bar input:focus { border-color: var(--brand-accent, #00E5A8); }
  .chat-search-bar input::placeholder { color: var(--text-muted, #8b949e); }
  .chat-search-info {
    font-size: 11px;
    color: var(--text-muted);
    margin-left: 8px;
    white-space: nowrap;
  }
  .chat-search-nav {
    display: flex;
    gap: 2px;
    margin-left: 4px;
  }
  .chat-search-nav button {
    background: none;
    border: 1px solid var(--border-color);
    color: var(--text-muted);
    border-radius: 3px;
    padding: 2px 6px;
    font-size: 11px;
    cursor: pointer;
  }
  .chat-search-nav button:hover { color: #fff; border-color: #fff; }
  .chat-search-close {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 2px 6px;
    font-size: 14px;
    margin-left: 4px;
  }
  .chat-search-close:hover { color: #fff; }
  .chat-message.search-highlight { background: rgba(0,229,168,0.08) !important; }
  .chat-message.search-current { background: rgba(0,229,168,0.18) !important; border-left: 2px solid var(--brand-accent); }
  .chat-message.search-hidden { display: none; }

  /* File Panel Tabs */
  .file-panel-tabs {
    display: flex;
    gap: 0;
    flex: 1;
    min-width: 0;
  }
  .file-panel-tab {
    padding: 6px 12px;
    font-size: 12px;
    font-weight: 500;
    color: var(--text-muted);
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    cursor: pointer;
    white-space: nowrap;
    transition: none;
  }
  .file-panel-tab:hover {
    color: var(--text-primary);
  }
  .file-panel-tab.active {
    color: var(--brand-accent, #3fb950);
    border-bottom-color: var(--brand-accent, #3fb950);
  }
  .db-table-list {
    flex: 1;
    overflow-y: auto;
  }
  .db-table-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 7px 12px;
    cursor: pointer;
    font-size: 13.5px;
    color: var(--text-secondary, #ccc);
  }
  .db-table-item:hover {
    background: rgba(255,255,255,0.05);
    color: var(--text-primary);
  }
  .db-table-item .table-size {
    font-size: 12px;
    color: var(--text-muted);
  }

  /* DB Info Box */
  .db-info-box {
    padding: 10px 12px;
    border-bottom: 1px solid var(--border-color, #30363d);
  }
  .db-info-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 4px 0;
    font-size: 13px;
  }
  .db-info-label {
    color: var(--text-muted);
    min-width: 64px;
    max-width: 72px;
    flex-shrink: 0;
  }
  .db-info-value {
    color: var(--text-secondary, #ccc);
    display: flex;
    align-items: center;
    gap: 4px;
    font-family: monospace;
    font-size: 13px;
    margin-left: auto;
    text-align: right;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex-shrink: 1;
    min-width: 0;
  }
  .db-info-copy {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 2px 5px;
    font-size: 13px;
    border-radius: 3px;
    line-height: 1;
  }
  .db-info-copy:hover {
    color: var(--brand-accent, #3fb950);
    background: rgba(255,255,255,0.05);
  }

  /* DB Modal */
  .db-modal-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.7);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
  }
  .db-modal {
    background: var(--bg-card, #161b22);
    border: 1px solid var(--border-color, #30363d);
    border-radius: 12px;
    width: 90vw;
    max-width: 1000px;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
  }
  .db-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    border-bottom: 1px solid var(--border-color, #30363d);
  }
  .db-modal-header h5 {
    margin: 0;
    font-size: 14px;
    color: var(--text-primary);
  }
  .db-modal-tabs {
    display: flex;
    gap: 0;
    border-bottom: 1px solid var(--border-color, #30363d);
  }
  .db-modal-tab {
    padding: 8px 16px;
    cursor: pointer;
    font-size: 12px;
    color: var(--text-muted);
    border-bottom: 2px solid transparent;
    background: none;
    border-top: none;
    border-left: none;
    border-right: none;
  }
  .db-modal-tab.active {
    color: var(--brand-accent, #3fb950);
    border-bottom-color: var(--brand-accent, #3fb950);
  }
  .db-modal-body {
    flex: 1;
    overflow: auto;
    padding: 0;
  }
  .db-modal-body table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
  }
  .db-modal-body th {
    position: sticky;
    top: 0;
    background: var(--bg-tertiary, #1e1e1e);
    padding: 8px 10px;
    text-align: left;
    font-weight: 600;
    color: var(--text-primary);
    border-bottom: 1px solid var(--border-color);
    white-space: nowrap;
  }
  .db-modal-body td {
    padding: 6px 10px;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    color: var(--text-secondary, #ccc);
    max-width: 300px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .db-modal-body tr:hover td {
    background: rgba(255,255,255,0.03);
  }
  .db-modal-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 16px;
    border-top: 1px solid var(--border-color, #30363d);
    font-size: 12px;
    color: var(--text-muted);
  }

/* ===== Chat Page - Additional Classes ===== */
.chat-main-layout { padding: 0; margin-top: 48px; }
.chat-close-btn { color: #fff; }
.chat-search-icon-sm { font-size: 11px; color: var(--text-muted); }
.chat-loading-sm { font-size: 11px; }
.chat-expand-db { margin-top: 4px; }
.chat-main-relative { position: relative; }
.chat-badge-xs { font-size: 10px; }
.chat-topbar-btn { font-size: 12px; padding: 3px 8px; }
.chat-load-more-wrap { text-align: center; padding: 10px; }
.chat-typing-inline { display: inline-flex; }
.chat-loading-text { color: var(--text-muted); margin-left: 8px; }
.chat-msg-flex { flex: 1; min-width: 0; }
.chat-upload-name { max-width: 200px; }
.chat-stop-btn-style { width: 42px; height: 42px; border-radius: 10px; align-items: center; justify-content: center; flex-shrink: 0; }
.chat-status-icon-xs { font-size: 10px; }
.chat-activity-close { font-size: 11px; padding: 2px 4px; color: var(--text-muted); background: none; border: none; }
.chat-preview-globe { color: var(--brand-accent); font-size: 12px; }
.chat-preview-url { text-decoration: none; color: inherit; font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: none; }
.chat-preview-label { font-size: 11px; color: #8b949e; }
.chat-preview-relative { position: relative; }
.chat-preview-placeholder { position: absolute; top: 0; left: 0; right: 0; bottom: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; background: #0d1117; color: #8b949e; gap: 12px; }
.chat-spinner-sm { width: 2rem; height: 2rem; }
.chat-preview-step { font-size: 11px; color: #58a6ff; }
.chat-preview-inactive-icon { font-size: 48px; opacity: 0.3; }
.chat-preview-text-md { font-size: 14px; }
.chat-expand-preview { margin-top: 8px; text-decoration: none; }
.chat-icon-success { color: #3fb950; }
.chat-icon-danger { color: #f85149; }
.chat-text-warning { color: #f0883e; }
.chat-text-muted-detail { color: #8b949e; }
.chat-info-bubble { background: var(--bg-tertiary); color: var(--text-muted); font-style: italic; }
.chat-notes-badge { font-size: 10px; }
.chat-notes-textarea { resize: none; font-size: 14px; line-height: 1.6; }
.chat-db-export-btn { font-size: 11px; padding: 2px 8px; }
.chat-db-close-btn { color: #fff; font-size: 16px; padding: 0 4px; }
.chat-db-page-btn { font-size: 11px; padding: 2px 8px; }
.chat-db-check-icon { color: var(--brand-accent); }
.chat-db-pg-icon { color: var(--brand-accent); }
.chat-db-msg-sm { font-size: 11px; }
.chat-db-tables-label { font-size: 11px; color: var(--text-muted); padding: 6px 12px; display: block; }
.chat-db-table-icon { font-size: 10px; opacity: 0.5; }
.chat-db-col-name { font-weight: 600; color: var(--brand-accent); }
.chat-db-nullable-yes { color: #f0883e; }
.chat-db-col-default { font-size: 11px; }
.chat-db-null-val { color: var(--text-muted); font-style: italic; }
.chat-queue-indicator { padding: 6px 12px; background: rgba(59,130,246,0.1); border: 1px solid rgba(59,130,246,0.25); border-radius: 8px; margin-bottom: 8px; font-size: 12px; color: #60a5fa; }

/* ===== Default User Message Colors ===== */
.user-message .msg-avatar {
  background: rgba(63, 185, 80, 0.133);
  color: #3fb950;
}
.user-message .msg-bubble {
  background: rgba(63, 185, 80, 0.094);
  border: 1px solid rgba(63, 185, 80, 0.2);
}
.msg-sender {
  font-weight: 600;
  color: #3fb950;
  margin-right: 6px;
}
.user-typing-indicator {
  padding: 2px 12px;
  font-size: 12px;
  font-style: italic;
  animation: typing-fade 1.5s ease-in-out infinite;
}
@keyframes typing-fade {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}
/* Shared users in topbar */
.chat-shared-users {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  margin-left: 8px;
  padding: 2px 8px;
  background: rgba(255,255,255,0.04);
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.08);
}
.chat-shared-bar {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 6px 14px;
  background: rgba(255,255,255,0.02);
  border-bottom: 1px solid var(--border-color, #30363d);
  font-size: 11px;
  flex-shrink: 0;
}
.chat-shared-tag {
  display: inline-flex;
  align-items: center;
  padding: 1px 8px;
  border-radius: 10px;
  font-size: 11px;
  font-weight: 600;
  cursor: default;
  white-space: nowrap;
}
/* Shared project button active state */
.project-share-btn.shared-active {
  color: #58a6ff;
}
.project-share-btn.shared-active:hover {
  color: #79c0ff;
}
/* Project settings button */
.project-settings-btn {
  cursor: pointer;
  color: #8b949e;
  font-size: 14px;
  transition: color 0.15s;
}
.project-settings-btn:hover {
  color: #e6edf3;
}

/* ========== CLAUDE/SOHBET MODE TOGGLE ========== */
.claude-toggle-bar {
  display: inline-flex;
  gap: 0;
  padding: 2px;
  background: rgba(255,255,255,0.06);
  border-radius: 8px;
  margin: 0 0 6px 0;
}
.claude-mode-btn {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 5px 14px;
  border: none;
  border-radius: 6px;
  background: transparent;
  color: #6e7681;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  line-height: 1;
}
.claude-mode-btn span {
  pointer-events: none;
}
.claude-mode-btn:hover {
  color: #c9d1d9;
}
.claude-mode-btn.active {
  background: rgba(88,166,255,0.15);
  color: #58a6ff;
  box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}
#chatModeBtn.active {
  background: rgba(63,185,80,0.15);
  color: #3fb950;
}
.btn-chat-only {
  background: #238636 !important;
  border-color: #238636 !important;
  color: #fff !important;
}
.btn-chat-only:hover {
  background: #2ea043 !important;
}

/* Desktop: hide mobile-only elements */
.chat-visit-site-text { display: none; }

/* ========== MOBILE RESPONSIVE - Chat Page (768px) ========== */
@media (max-width: 768px) {

  /* 0. MOBILE VIEWPORT FIX - sadece chat sayfasi icin sabit layout */
  body.chat-page {
    height: var(--mobile-vh, 100vh) !important;
    height: var(--mobile-vh, 100dvh) !important;
    overflow: hidden !important;
    position: fixed !important;
    width: 100% !important;
    top: 0 !important;
    left: 0 !important;
    -webkit-overflow-scrolling: touch;
  }
  .main-content.chat-main-layout {
    position: fixed !important;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    margin: 0 !important;
    height: var(--mobile-vh, 100%) !important;
    height: var(--mobile-vh, 100dvh) !important;
    overflow: hidden !important;
  }
  .chat-container {
    height: calc(var(--mobile-vh, 100%) - 48px) !important;
    height: calc(var(--mobile-vh, 100dvh) - 48px) !important;
    position: absolute;
    top: 48px;
    left: 0;
    right: 0;
    bottom: 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
  }

  /* 1. SIDEBAR + NAVBAR */
  .top-navbar {
    left: 0;
  }

  /* 2. CHAT CONTAINER */
  .file-panel {
    display: none !important;
  }
  .file-panel:not(.collapsed) {
    display: block !important;
  }
  .file-panel:not(.collapsed) {
    position: fixed !important;
    left: 0;
    top: 48px;
    bottom: 0;
    width: 280px !important;
    z-index: 1040;
    overflow: auto;
    background: var(--bg-sidebar, #151A24) !important;
  }
  .preview-panel {
    display: none !important;
  }
  .preview-panel:not(.collapsed) {
    position: fixed;
    top: 48px;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 100;
    width: 100% !important;
    overflow: auto;
  }
  .activity-panel {
    position: fixed;
    right: 0;
    top: 48px;
    bottom: 0;
    width: 280px;
    z-index: 100;
  }
  .activity-panel.collapsed {
    display: none !important;
  }
  .resize-handle-left,
  .resize-handle-right {
    display: none !important;
  }
  .collapsed-indicator {
    display: none !important;
  }

  /* 3. CHAT TOPBAR */
  .chat-topbar {
    padding: 4px 8px;
  }
  .chat-topbar-left {
    overflow: hidden;
    max-width: calc(100% - 160px);
  }
  .chat-topbar-name {
    font-size: 12px;
    max-width: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .chat-badge-xs {
    display: none !important;
  }
  .chat-shared-users {
    display: none !important;
  }
  .chat-topbar-right {
    gap: 3px;
  }
  .chat-topbar-btn {
    padding: 2px 5px;
    font-size: 11px;
  }

  /* 4. CHAT MESSAGES */
  .chat-messages {
    padding: 10px 8px;
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
  }
  .chat-message {
    gap: 6px;
    margin-bottom: 10px;
  }
  .msg-avatar {
    width: 26px;
    height: 26px;
    font-size: 13px;
  }
  .msg-bubble {
    padding: 8px 10px;
    font-size: 12.5px;
  }
  .user-message {
    max-width: 85%;
  }
  .assistant-message .msg-bubble {
    max-width: 100%;
  }
  .chat-image-preview {
    max-width: 240px;
  }
  .msg-bubble pre,
  .msg-bubble code {
    font-size: 11px;
    overflow-x: auto;
  }
  .msg-bubble pre {
    max-width: calc(100vw - 80px);
  }

  /* 5. CHAT INPUT */
  .chat-input-area {
    padding: 8px 10px calc(8px + env(safe-area-inset-bottom, 0px)) 10px;
    flex-shrink: 0;
    position: relative;
    z-index: 10;
    background: var(--bg-card, #161b22);
  }
  .chat-input-area textarea {
    min-height: 38px;
    max-height: 80px;
    font-size: 16px !important;
  }
  .btn-send,
  .btn-upload,
  .btn-stop,
  .chat-stop-btn-style {
    width: 38px;
    height: 38px;
  }

  /* 6. IDE STATUS BAR */
  .ide-statusbar {
    font-size: 10px;
    padding: 0 8px;
    height: 22px;
    gap: 8px;
  }
  .ide-statusbar .status-item span {
    max-width: 100px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  /* 7. CHAT SEARCH BAR */
  .chat-search-bar {
    padding: 4px 8px;
  }
  .chat-search-bar input {
    font-size: 11px;
  }
  .chat-search-info {
    font-size: 10px;
  }

  /* 8. THINKING BLOCK */
  .thinking-content {
    max-height: 200px;
    font-size: 11px;
  }
  .thinking-block summary {
    font-size: 11px;
    padding: 4px 8px;
  }

  /* 9. TOOL INDICATOR */
  .stream-tool-indicator {
    font-size: 11px;
    padding: 3px 8px;
  }
  .tool-detail {
    max-width: calc(100vw - 140px);
  }

  /* 10. MODALS */
  .db-modal {
    width: 95vw;
    max-height: 90vh;
  }
  .image-lightbox img {
    max-width: 95vw;
  }

  /* 11. UPLOAD PREVIEW */
  .upload-preview {
    font-size: 12px;
  }
  .chat-upload-name {
    max-width: 150px;
  }

  /* 12. HIDE DESKTOP-ONLY ELEMENTS */
  .preview-hint-bar {
    display: none !important;
  }
  .ide-statusbar {
    display: none !important;
  }

  /* 13. PREVIEW PANEL - mobilde tamamen devre disi */
  .preview-panel,
  .preview-panel iframe {
    display: none !important;
    width: 0 !important;
    height: 0 !important;
  }

  /* 14. SITE VISIT BUTTON - mobilde belirgin */
  .chat-visit-site-btn {
    background: rgba(16,185,129,0.15) !important;
    border-color: rgba(16,185,129,0.4) !important;
    color: #00E5A8 !important;
    order: -1;
  }
  .chat-visit-site-text {
    display: inline !important;
    margin-left: 3px;
    font-size: 11px;
  }

  /* 16. FILE PANEL BACKDROP */
  .file-panel-backdrop {
    display: none;
  }
  .file-panel-backdrop.active {
    display: block !important;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 1035;
  }

  /* 15. TOPBAR - mobilde gereksiz butonlari gizle */
  #notesPanelToggle,
  #activityPanelToggle,
  #chatShareBtn {
    display: none !important;
  }

  /* 17. FILE EDITOR MODAL - mobilde tam ekran, kapatma butonu belirgin */
  .file-editor-back-btn {
    display: flex !important;
  }
  .file-editor-overlay {
    z-index: 2000;
  }
  .file-editor-overlay.active {
    align-items: stretch;
    justify-content: stretch;
  }
  .file-editor-modal {
    width: 100vw !important;
    height: var(--mobile-vh, 100vh) !important;
    height: var(--mobile-vh, 100dvh) !important;
    max-width: 100vw !important;
    border-radius: 0 !important;
    margin: 0 !important;
  }
  .file-editor-header {
    padding: 8px 12px;
    min-height: 48px;
    gap: 8px;
  }
  .file-editor-title {
    font-size: 13px;
    min-width: 0;
    overflow: hidden;
  }
  .file-editor-title span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: calc(100vw - 160px);
  }
  .file-editor-actions {
    gap: 6px;
    flex-shrink: 0;
  }
  .file-editor-actions .btn {
    min-width: 44px;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    padding: 6px 10px;
    border-radius: 8px;
  }
  .file-editor-body {
    flex: 1;
    overflow: hidden;
    min-height: 0;
  }
  .file-editor-body textarea {
    font-size: 12px !important;
    padding: 10px 12px;
    line-height: 1.5;
    -webkit-overflow-scrolling: touch;
    overflow-x: auto;
    white-space: pre;
    word-break: normal;
  }
  .file-editor-footer {
    padding: 6px 12px;
    font-size: 11px;
  }

  /* 18. CODE BLOCKS IN MESSAGES - mobilde overflow fix */
  .msg-bubble pre {
    max-width: calc(100vw - 70px) !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch;
    white-space: pre !important;
    font-size: 11px !important;
  }
  .msg-bubble code {
    font-size: 11px !important;
    word-break: break-all;
  }
  .msg-bubble pre code {
    word-break: normal;
  }
  .msg-bubble table {
    display: block;
    overflow-x: auto;
    max-width: calc(100vw - 70px);
    -webkit-overflow-scrolling: touch;
  }

  /* 19. FILE PANEL - mobilde overlay olarak ac */
  .file-panel:not(.collapsed) {
    display: flex !important;
    position: fixed !important;
    left: 0 !important;
    top: 48px !important;
    bottom: 0 !important;
    width: 85vw !important;
    max-width: 320px !important;
    z-index: 1040 !important;
    overflow: hidden !important;
    background: var(--bg-sidebar, #151A24) !important;
    box-shadow: 4px 0 20px rgba(0,0,0,0.5);
  }
  /* 20. ACTIVITY PANEL - mobilde overlay */
  .activity-panel:not(.collapsed) {
    width: 85vw !important;
    max-width: 300px !important;
    box-shadow: -4px 0 20px rgba(0,0,0,0.5);
  }

  /* 21. CHAT MAIN - mobilde flex düzeltme */
  .chat-main {
    flex: 1 !important;
    min-width: 0 !important;
    max-width: 100vw !important;
    overflow: hidden !important;
  }

  /* 22. ASSISTANT MESSAGE - mobilde tam genişlik */
  .assistant-message {
    max-width: 100% !important;
  }
  .assistant-message .msg-bubble {
    max-width: 100% !important;
    overflow-x: hidden;
    overflow-wrap: break-word;
  }

  /* 23. INPUT AREA - mobilde tam genişlik */
  .chat-input-area form {
    gap: 6px;
  }
  .chat-input-area textarea {
    width: 100% !important;
    border-radius: 8px;
  }
}

/* Admin Dashboard v2 */
.stat-card-v2 {
  background: var(--bg-card);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 8px;
  padding: 16px;
  text-align: center;
}
.stat-card-v2 .stat-icon-v2 {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  margin-bottom: 8px;
}
.stat-card-v2 .stat-value-v2 {
  font-size: 24px;
  font-weight: 700;
  color: var(--text-primary);
}
.stat-card-v2 .stat-label-v2 {
  font-size: 11px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.engine-status-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
}
.engine-info-row {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  border-bottom: 1px solid rgba(255,255,255,0.04);
  font-size: 13px;
}
.engine-info-row:last-child { border-bottom: none; }
.engine-info-label { color: var(--text-muted); }
.engine-info-value { color: var(--text-primary); font-weight: 600; }
.project-status-badge { font-size: 11px; padding: 2px 8px; border-radius: 4px; }

/* Trend chart */
.trend-chart { display: flex; align-items: flex-end; gap: 8px; height: 120px; padding: 0 8px; }
.trend-col { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 4px; }
.trend-bar { width: 100%; background: linear-gradient(180deg, #00E5A8, rgba(0, 229, 168, 0.3)); border-radius: 4px 4px 0 0; min-height: 4px; transition: height 0.3s ease; }
.trend-label { font-size: 10px; color: var(--text-muted); }
.trend-value { font-size: 11px; color: var(--text-secondary); font-weight: 600; }

/* AllSoon.ai giriş/kayıt (v1): yatay logo, başlık, dil değiştirici */
.auth-wrapper { position: relative; padding: 72px 14px 32px; }
.auth-lang { position: absolute; top: 18px; right: 18px; }
.auth-brand { display: inline-block; margin-bottom: 18px; }
.auth-brand img { display: block; height: 44px; width: auto; }
.auth-title { font-size: 22px; font-weight: 650; letter-spacing: -.02em; margin: 0 0 6px; }
.auth-back { margin-top: 8px; }
.auth-back a { color: var(--text-muted); }

/* Proje pazarı araç çubuğu: dar ekranda (390 px) taşmaz; arama kutusu tam satırı alır (QA-10) */
.mk-toolbar { min-width: 0; }
.mk-toolbar .mk-search { min-width: 0; flex: 1 1 260px; flex-wrap: nowrap; }
.mk-toolbar .mk-search .form-control { min-width: 0; }
.mk-toolbar .mk-sort { width: auto; max-width: 42%; }
@media (max-width: 576px) {
  .mk-toolbar .mk-search { flex-basis: 100%; }
}
