/* ===== CodeForge.ac - Dark Theme ===== */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

:root {
  --forge-green: #14F195;
  --forge-green-hover: #10C478;
  --forge-green-subtle: rgba(20, 241, 149, 0.12);
  --bg-body: #0a0a0a;
  --bg-sidebar: #0f0f0f;
  --bg-topbar: #0a0a0a;
  --bg-card: #141414;
  --bg-card-hover: #1a1a1a;
  --bg-input: #161616;
  --border-color: #2a2a2a;
  --text-primary: #eff1f3;
  --text-secondary: #b0b5bd;
  --text-muted: #8b929d;
  --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(--forge-green); }
.top-navbar-brand:hover { color: var(--forge-green); }
.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-y: auto;
  transition: transform 0.3s ease;
}

.sidebar-brand {
  height: 48px; display: flex; align-items: center;
  padding: 0 16px; border-bottom: 1px solid var(--border-color);
}
.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(--forge-green); font-size: 18px; }
.sidebar-brand a:hover { color: var(--forge-green); }

.sidebar-nav { flex: 1; padding: 16px 10px; }
.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(--forge-green-subtle); color: var(--forge-green); }
.sidebar-link i { font-size: 16px; width: 20px; text-align: 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(--forge-green);
}
.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(--forge-green);
}
.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); }
.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.3s 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(--forge-green-subtle); color: var(--forge-green); }
.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: #161616; --bs-table-hover-bg: #1a1a1a;
  --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(--forge-green) !important; box-shadow: 0 0 0 2px rgba(20,241,149,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-forge { background: var(--forge-green); color: #000; font-weight: 600; font-size: 13px; border: none; padding: 8px 18px; border-radius: 6px; }
.btn-forge:hover { background: var(--forge-green-hover); color: #000; }
.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(20, 241, 149, 0.1); border-color: rgba(20, 241, 149, 0.25); color: #14F195; }
.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(--forge-green); 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(--forge-green); }

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

.type-selector { display: flex; gap: 16px; }
.type-card { flex: 1; background: var(--bg-card); border: 2px solid var(--border-color); border-radius: 10px; padding: 24px; cursor: pointer; transition: all 0.2s; text-align: center; }
.type-card:hover { border-color: var(--forge-green); }
.type-card.selected { border-color: var(--forge-green); background: var(--forge-green-subtle); }
.type-card .type-icon { font-size: 36px; color: var(--text-secondary); margin-bottom: 10px; display: block; }
.type-card.selected .type-icon { color: var(--forge-green); }
.type-card .type-title { font-size: 15px; font-weight: 700; margin-bottom: 4px; }
.type-card .type-desc { font-size: 12px; color: var(--text-muted); }
.type-card input[type="radio"] { display: none; }

.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(--forge-green); }
.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(--forge-green-subtle); color: var(--forge-green); }
.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(--forge-green-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 - Improved */
.typing-bubble {
  background: var(--bg-card) !important;
  border: 1px solid var(--border-color) !important;
  padding: 12px 16px !important;
}

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

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

.typing-dots span {
  display: block;
  width: 7px;
  height: 7px;
  background: var(--forge-green);
  border-radius: 50%;
  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.4;
  }
  30% {
    transform: translateY(-4px);
    opacity: 1;
  }
}

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

/* Chat page existing classes compatibility */
.chat-message.user-message { margin-left: auto; flex-direction: row-reverse; }
.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: var(--forge-green-subtle); color: var(--forge-green); }
.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; }
.chat-message.user-message .msg-bubble { background: var(--forge-green-subtle); }
.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; }
.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; }
.chat-input-area textarea { flex: 1; resize: none; min-height: 42px; max-height: 120px; border-radius: 10px; }
.chat-input-area .btn-send { align-self: flex-end; width: 42px; height: 42px; border-radius: 10px; display: flex; align-items: center; justify-content: center; }
/* 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(--forge-green); 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(--forge-green);
  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-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 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(--forge-green);
}
.file-editor-actions {
  display: flex;
  gap: 8px;
}
.file-editor-actions .btn {
  border-radius: 6px;
}
.file-editor-actions .btn-success {
  background: var(--forge-green);
  border-color: var(--forge-green);
  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', 'JetBrains Mono', '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(--forge-green);
}
.file-editor-footer .error {
  color: #f85149;
}
.file-editor-footer .saving {
  color: #d29922;
}

@media (max-width: 768px) {
  .file-editor-modal {
    width: 98vw;
    height: 90vh;
    border-radius: 8px;
  }
}

.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-forge { color: var(--forge-green) !important; }

a { color: var(--forge-green); }
a:hover { color: var(--forge-green-hover); }

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

/* ===== 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.3s ease, transform 0.3s ease;
  overflow: hidden;
}
.main-content {
  transition: margin-left 0.3s ease;
}
.top-navbar {
  transition: left 0.3s 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: #1a1a1a;
  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.25s 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(--forge-green); text-decoration: underline; }
.msg-bubble blockquote { border-left: 3px solid var(--forge-green); 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);
}
