:root {
  --bg: #1e1e1e;
  --surface: #252526;
  --surface2: #2d2d30;
  --border: #3c3c3c;
  --text: #cccccc;
  --text-muted: #858585;
  --accent: #0078d4;
  --accent2: #4ec9b0;
  --accent-green: #4caf50;
  --warning: #cca700;
  --danger: #f44747;
  --tab-active: #1e1e1e;
  --tab-inactive: #2d2d30;
  --activity-bar: #333333;
  --status-bar: #007acc;
  --radius: 0px;
}

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

body {
  font-family: -apple-system, 'Segoe UI', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  height: 100vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  font-size: 13px;
}

/* ========== TOP BAR ========== */
#topBar {
  display: flex;
  align-items: center;
  height: 30px;
  min-height: 30px;
  padding: 0 8px;
  background: #323233;
  border-bottom: none;
  gap: 0;
  -webkit-app-region: drag;
}

.topbar-left {
  display: flex;
  align-items: center;
  height: 100%;
  -webkit-app-region: no-drag;
}

.top-btn {
  padding: 0 12px;
  height: 30px;
  border: none;
  border-radius: 0;
  background: transparent;
  color: var(--text);
  font-weight: 400;
  font-size: 13px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 4px;
  position: relative;
  -webkit-app-region: no-drag;
}

.top-btn:hover { background: rgba(255,255,255,0.06); }
.top-btn.active { 
  color: #fff;
  background: transparent;
}

.top-btn.active::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 8px;
  right: 8px;
  height: 2px;
  background: var(--accent);
}

.topbar-right {
  margin-left: auto;
  display: flex;
  align-items: center;
  -webkit-app-region: no-drag;
}

.topbar-icon-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 14px;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 0;
  height: 30px;
  display: flex;
  align-items: center;
}

.topbar-icon-btn:hover { color: var(--text); }

/* ========== APP BODY ========== */
#appBody {
  display: flex;
  flex: 1;
  overflow: hidden;
}

/* ========== ACTIVITY BAR ========== */
.activity-bar {
  width: 48px;
  min-width: 48px;
  background: var(--activity-bar);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  border-right: 1px solid var(--border);
  z-index: 10;
}

.activity-bar-top {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
}

.activity-bar-bottom {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.activity-bar-separator {
  width: 24px;
  height: 1px;
  background: var(--border);
  margin: 4px 0;
}

.activity-btn {
  width: 48px;
  height: 48px;
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-size: 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  transition: color 0.1s;
}

.activity-btn:hover { color: #ffffff; }

.activity-btn.active {
  color: #ffffff;
}

.activity-btn.active::before {
  content: '';
  position: absolute;
  left: 0;
  top: 6px;
  bottom: 6px;
  width: 2px;
  background: #ffffff;
}

/* ========== MAIN CONTENT ========== */
#mainContent { flex: 1; display: flex; overflow: hidden; }

.panel { display: flex; flex-direction: column; width: 100%; height: 100%; }

#chatPanel { display: flex; flex-direction: column; height: 100%; }

.feature-buttons {
  display: flex; flex-wrap: wrap; gap: 4px;
  padding: 8px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}

.feat-btn {
  padding: 4px 10px; border-radius: 0;
  background: var(--bg); border: 1px solid var(--border);
  color: var(--text); font-size: 12px; cursor: pointer;
  transition: 0.15s; white-space: nowrap;
}

.feat-btn:hover { border-color: var(--accent); color: var(--accent); }

#chatMessages {
  flex: 1; overflow-y: auto; padding: 12px;
  display: flex; flex-direction: column; gap: 8px;
}

.message {
  max-width: 80%; padding: 8px 12px;
  border-radius: 0; font-size: 13px;
  line-height: 1.5; white-space: pre-wrap; word-wrap: break-word;
}

.message.user {
  align-self: flex-end; background: var(--accent);
  color: white;
}

.message.ai {
  align-self: flex-start; background: var(--surface);
  border: 1px solid var(--border);
}

.message.thinking { color: var(--text-muted); font-style: italic; }

.chat-input-row {
  display: flex; padding: 8px; gap: 4px;
  background: var(--surface); border-top: 1px solid var(--border);
}

#chatInput {
  flex: 1; padding: 6px 10px; border-radius: 0;
  border: 1px solid var(--border); background: var(--bg);
  color: var(--text); font-size: 13px;
}

#sendChatBtn {
  padding: 6px 12px; border-radius: 0;
  background: var(--accent); color: white; border: none;
  font-weight: 500; cursor: pointer;
}

#sendChatBtn:disabled { opacity: 0.6; cursor: not-allowed; }

#buildPanel { display: none; flex-direction: column; height: 100%; }

.build-init {
  padding: 24px; background: var(--surface);
  border-bottom: 1px solid var(--border);
}

.build-init textarea {
  width: 100%; min-height: 80px; padding: 10px;
  border-radius: 0; background: var(--bg);
  border: 1px solid var(--border); color: var(--text);
  font-size: 14px; resize: vertical; margin-bottom: 12px;
  font-family: 'Consolas', 'Courier New', monospace;
}

.btn {
  padding: 6px 14px; border-radius: 0;
  font-weight: 500; font-size: 13px; border: none;
  cursor: pointer; transition: 0.15s;
  display: inline-flex; align-items: center; gap: 4px;
}

.btn-primary { background: var(--accent); color: white; }
.btn-primary:hover { background: #005a9e; }
.btn-success { background: var(--accent2); color: #1e1e1e; }
.btn-warning { background: var(--warning); color: #1e1e1e; }
.btn:disabled { opacity: 0.6; cursor: not-allowed; }

.build-status { margin-top: 6px; color: var(--text-muted); font-size: 13px; }

#ideContainer { flex: 1; flex-direction: column; overflow: hidden; display: none; }
#ideContainer.ide-visible { display: flex; }

/* ========== EDITOR TABS BAR ========== */
.editor-tabs-bar {
  height: 35px;
  min-height: 35px;
  background: var(--surface2);
  border-bottom: 1px solid var(--surface);
  display: flex;
  align-items: center;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;
}

.editor-tabs-bar::-webkit-scrollbar { height: 0; }

.editor-tab {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0 16px;
  height: 35px;
  font-size: 13px;
  background: var(--tab-inactive);
  color: var(--text-muted);
  cursor: pointer;
  border-right: 1px solid var(--border);
  min-width: 0;
  white-space: nowrap;
  user-select: none;
  position: relative;
}

.editor-tab.active {
  background: var(--tab-active);
  color: #ffffff;
  border-top: 1px solid var(--accent);
}

.editor-tab .tab-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.editor-tab .tab-dot.html { background: #e44d26; }
.editor-tab .tab-dot.css { background: #264de4; }
.editor-tab .tab-dot.js { background: #f7df1e; }
.editor-tab .tab-dot.py { background: #3572A5; }
.editor-tab .tab-dot.json { background: #5a5a5a; }
.editor-tab .tab-dot.default { background: var(--text-muted); }

.editor-tab .tab-close {
  width: 16px;
  height: 16px;
  display: none;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  color: var(--text-muted);
  border: none;
  background: transparent;
  cursor: pointer;
  border-radius: 0;
  flex-shrink: 0;
  line-height: 1;
}

.editor-tab:hover .tab-close { display: flex; }
.editor-tab .tab-close:hover { color: #ffffff; }

.editor-tab .tab-modified-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent2);
  flex-shrink: 0;
  display: none;
}

.editor-tab.modified .tab-modified-dot { display: block; }
.editor-tab.modified .tab-close { display: none; }
.editor-tab.modified:hover .tab-close { display: flex; }
.editor-tab.modified:hover .tab-modified-dot { display: none; }

/* ========== IDE LAYOUT ========== */
#ide { display: flex; flex: 1; overflow: hidden; }

/* ========== SIDEBAR ========== */
#sidebar {
  width: 240px;
  min-width: 180px;
  max-width: 320px;
  background: var(--surface);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
}

.sidebar-header {
  padding: 0 12px;
  height: 35px;
  font-weight: 400;
  font-size: 11px;
  letter-spacing: 1px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 6px;
  color: #bbbbbb;
  text-transform: uppercase;
  user-select: none;
}

.sidebar-header-collapse {
  font-size: 8px;
  cursor: pointer;
  color: var(--text-muted);
  line-height: 1;
}

.sidebar-header-title {
  flex: 1;
}

.sidebar-header-more {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 16px;
  cursor: pointer;
  padding: 0 4px;
  line-height: 1;
}

.sidebar-header-more:hover { color: var(--text); }

.explorer-tree {
  flex: 1;
  overflow-y: auto;
  padding: 0;
  font-size: 13px;
}

.explorer-node { user-select: none; }

.explorer-node-header {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  cursor: pointer;
  color: var(--text);
  font-weight: 400;
  transition: background 0.1s;
  height: 22px;
}

.explorer-node-header:hover { background: var(--surface2); }

.explorer-toggle {
  font-size: 8px;
  width: 16px;
  text-align: center;
  color: var(--text-muted);
  flex-shrink: 0;
}

.explorer-folder-icon {
  font-size: 14px;
  flex-shrink: 0;
}

.explorer-node-label {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.explorer-children { padding-left: 16px; }

.explorer-file-item {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 0 8px 0 40px;
  height: 22px;
  cursor: pointer;
  transition: background 0.1s;
  border-left: 2px solid transparent;
  font-size: 13px;
}

.explorer-file-item:hover { background: var(--surface2); }

.explorer-file-item.active {
  background: #094771;
  border-left-color: var(--accent);
}

.explorer-file-icon {
  font-size: 14px;
  flex-shrink: 0;
  width: 16px;
  text-align: center;
}

.explorer-file-name {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 13px;
}

.explorer-status-icon {
  font-size: 10px;
  flex-shrink: 0;
  margin-left: auto;
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.explorer-status-icon.generating { background: var(--warning); }
.explorer-status-icon.done { background: var(--accent2); }
.explorer-status-icon.error { background: var(--danger); }
.explorer-status-icon.pending { display: none; }

/* ========== PROJECT HEALTH CARD ========== */
#projectHealthCard {
  border-top: 1px solid var(--border);
}

.health-card {
  background: var(--surface);
  font-size: 11px;
  overflow: hidden;
}

.health-header {
  padding: 4px 12px;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-size: 11px;
  color: #bbbbbb;
  border-bottom: 1px solid var(--border);
}

.health-body {
  padding: 4px 12px;
}

.health-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 2px 0;
  border-bottom: 1px solid rgba(255,255,255,0.04);
  font-size: 12px;
  height: 20px;
}

.health-row:last-child { border-bottom: none; }

.health-score {
  display: flex;
  align-items: center;
  gap: 6px;
  padding-top: 4px;
  margin-top: 2px;
  border-top: 1px solid var(--border);
}

.health-score-bar {
  flex: 1;
  height: 2px;
  background: rgba(255,255,255,0.1);
  border-radius: 0;
  overflow: hidden;
}

.health-score-fill {
  height: 100%;
  border-radius: 0;
  transition: width 0.5s ease;
}

.health-score-label {
  font-weight: 600;
  font-size: 12px;
  min-width: 32px;
  text-align: right;
}

/* ========== FILE DETAILS PANEL ========== */
#fileDetailsPanel {
  border-top: 1px solid var(--border);
  max-height: 200px;
  overflow-y: auto;
}

.file-details-card {
  background: var(--surface);
  font-size: 11px;
  overflow: hidden;
}

.file-details-header {
  padding: 4px 12px;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-size: 11px;
  color: #bbbbbb;
  border-bottom: 1px solid var(--border);
}

.file-details-body { padding: 2px 12px; }

.file-details-empty {
  padding: 8px;
  text-align: center;
  color: var(--text-muted);
  font-size: 12px;
}

.details-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 2px 0;
  border-bottom: 1px solid rgba(255,255,255,0.03);
  height: 20px;
}

.details-row:last-child { border-bottom: none; }

.details-label {
  color: var(--text-muted);
  min-width: 60px;
  flex-shrink: 0;
  font-size: 12px;
}

.details-value {
  text-align: right;
  word-break: break-all;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 12px;
}

/* ========== SIDEBAR FOOTER ========== */
.sidebar-footer {
  border-top: 1px solid var(--border);
  padding: 6px 8px;
  background: var(--surface);
  display: flex;
  gap: 4px;
}

.sidebar-action-btn {
  flex: 1;
  padding: 3px 6px;
  background: var(--surface2);
  border: 1px solid var(--border);
  color: var(--text);
  font-size: 11px;
  cursor: pointer;
  border-radius: 0;
  text-align: center;
}

.sidebar-action-btn:hover { background: #3c3c3c; }

/* ========== EDITOR AREA ========== */
#editorArea {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 200px;
  overflow: hidden;
}

/* ========== BREADCRUMB ========== */
.editor-breadcrumb {
  height: 22px;
  min-height: 22px;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  padding: 0 12px;
  gap: 4px;
  font-size: 12px;
  color: var(--text-muted);
}

.breadcrumb-separator {
  font-size: 10px;
  color: var(--text-muted);
}

.breadcrumb-item {
  color: var(--text);
  cursor: context-menu;
}

#breadcrumbFile { color: var(--text-muted); }

/* ========== EDITOR TOOLBAR ========== */
.editor-toolbar {
  height: 28px;
  min-height: 28px;
  padding: 0 8px;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 2px;
}

.toolbar-btn {
  background: transparent;
  border: none;
  color: var(--text);
  font-size: 12px;
  cursor: pointer;
  padding: 2px 8px;
  height: 22px;
  display: flex;
  align-items: center;
  gap: 4px;
  border-radius: 0;
  transition: none;
}

.toolbar-btn:hover { background: var(--surface2); }

.toolbar-btn-right {
  margin-left: auto;
}

.toolbar-divider {
  width: 1px;
  height: 16px;
  background: var(--border);
  margin: 0 4px;
}

/* ========== EDITOR CONTAINER ========== */
#editorContainer { flex: 1; height: 100%; overflow: hidden; }

/* ========== PREVIEW PANEL ========== */
#previewPanel {
  width: 300px;
  min-width: 250px;
  max-width: 400px;
  background: var(--surface);
  border-left: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  transition: width 0.2s ease;
  position: relative;
}

.preview-header {
  height: 35px;
  min-height: 35px;
  padding: 0 12px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  letter-spacing: 1px;
  color: #bbbbbb;
  text-transform: uppercase;
}

.preview-title {
  flex-shrink: 0;
}

.preview-address-bar {
  flex: 1;
  height: 22px;
  background: var(--surface2);
  display: flex;
  align-items: center;
  padding: 0 8px;
  border: 1px solid var(--border);
}

.preview-url-text {
  font-size: 12px;
  color: var(--text);
  text-transform: none;
  letter-spacing: 0;
}

.preview-refresh-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 14px;
  cursor: pointer;
  padding: 2px 4px;
  border-radius: 0;
  flex-shrink: 0;
}

.preview-refresh-btn:hover { color: var(--text); }

#previewFrame { flex: 1; border: none; background: white; }

/* ========== PREVIEW DIAGNOSTICS ========== */
#previewDiagnostics {
  border-top: 1px solid var(--border);
  max-height: 100px;
  overflow-y: auto;
  font-size: 11px;
  background: var(--bg);
}

.diagnostics { padding: 4px 8px; }

.diag-header {
  font-weight: 600;
  font-size: 11px;
  padding-bottom: 4px;
  border-bottom: 1px solid rgba(255,255,255,0.05);
  margin-bottom: 4px;
  color: var(--text-muted);
}

.diag-body {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.diag-item { line-height: 1.4; }

.diag-error { color: var(--danger); font-weight: 600; }
.diag-ok { color: var(--accent2); font-weight: 600; }

/* ========== PREVIEW LIVE INDICATOR ========== */
.preview-live-indicator {
  animation: pulse 2s infinite;
  display: inline-block;
  position: absolute;
  bottom: 8px;
  right: 8px;
  font-size: 10px;
  color: var(--accent2);
  z-index: 5;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

/* ========== TOAST ========== */
#toast {
  position: fixed; bottom: 32px; left: 50%; transform: translateX(-50%);
  background: #333; color: #fff;
  padding: 6px 16px; border-radius: 0;
  border: none; z-index: 300;
  opacity: 0; transition: opacity 0.2s;
  pointer-events: none;
  font-size: 13px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

#toast.show { opacity: 1; }

/* ========== MODALS ========== */
.modal {
  position: fixed; inset: 0; background: rgba(0,0,0,0.7);
  display: none; align-items: center; justify-content: center; z-index: 200;
}

.modal-content {
  background: var(--surface); padding: 24px;
  width: 450px; max-width: 90vw;
}

.modal-content h2 { margin-bottom: 12px; font-weight: 400; font-size: 16px; }

.modal-row { margin-bottom: 12px; }

.modal-row label {
  display: block; margin-bottom: 4px;
  font-size: 13px; color: var(--text-muted);
}

.modal-row input, .modal-row textarea {
  width: 100%; padding: 6px 8px;
  background: #3c3c3c;
  border: 1px solid #3c3c3c;
  color: var(--text);
  font-size: 13px;
  border-radius: 0;
}

.modal-row input:focus {
  outline: none;
  border-color: var(--accent);
}

.close-modal {
  float: right; background: none; border: none;
  color: var(--text-muted); font-size: 20px; cursor: pointer;
}

.close-modal:hover { color: #fff; }

.improve-modal {
  position: fixed; inset: 0; background: rgba(0,0,0,0.7);
  display: none; align-items: center; justify-content: center; z-index: 250;
}

.improve-content {
  background: var(--surface); padding: 20px;
  width: 400px; max-width: 90vw;
}

.improve-content h3 { font-weight: 400; font-size: 14px; margin-bottom: 8px; }

.improve-content textarea {
  width: 100%; min-height: 80px; margin-top: 6px;
  padding: 6px 8px;
  background: #3c3c3c;
  border: 1px solid #3c3c3c;
  color: var(--text);
  font-size: 13px;
  font-family: 'Consolas', 'Courier New', monospace;
  border-radius: 0;
}

.improve-content textarea:focus {
  outline: none;
  border-color: var(--accent);
}

/* Smart Edit modal hint text */
#smartEditFileHint {
  padding: 4px 8px;
  background: var(--bg);
  border: 1px solid var(--border);
  min-height: 24px;
  font-size: 12px;
  border-radius: 0;
}

/* ========== PROJECT SUMMARY (from Step 10) ========== */
#projectSummary {
  border-top: 1px solid var(--border);
  padding: 4px;
}

.project-summary-card {
  font-size: 11px;
  overflow: hidden;
}

.summary-header {
  padding: 4px 8px;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-size: 11px;
  color: #bbbbbb;
  border-bottom: 1px solid var(--border);
}

.summary-body { padding: 4px 8px; }

.summary-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 2px 0;
  border-bottom: 1px solid rgba(255,255,255,0.04);
  font-size: 12px;
}

.summary-row:last-child { border-bottom: none; }

.summary-final {
  font-weight: 600;
  padding-top: 4px;
  border-top: 1px solid var(--border);
  margin-top: 2px;
}

.status-pass { color: var(--accent2); }
.status-pending { color: var(--text-muted); }
.status-fail { color: var(--danger); }

.summary-details { margin-top: 4px; font-size: 11px; }

.summary-details summary {
  cursor: pointer;
  color: var(--warning);
  padding: 2px 0;
}

.summary-issues {
  max-height: 100px;
  overflow-y: auto;
  margin-top: 2px;
  background: rgba(0,0,0,0.2);
  padding: 4px;
}

.issue-item {
  padding: 2px 0;
  color: var(--text-muted);
  word-break: break-all;
  line-height: 1.3;
  font-size: 11px;
}

.issue-item::before {
  content: '⚠ ';
  color: var(--warning);
}

/* ========== AI COPILOT PANEL ========== */
#aiCopilotPanel {
  width: 300px;
  min-width: 260px;
  max-width: 400px;
  background: var(--surface);
  border-left: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  transition: width 0.2s ease;
  overflow: hidden;
}

#aiCopilotPanel.hidden { display: none; }

/* ── Copilot Header ── */
.copilot-header {
  height: 35px;
  min-height: 35px;
  padding: 0 12px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
  display: flex;
  align-items: center;
}

.copilot-title-row {
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 400;
  font-size: 13px;
  width: 100%;
}

.copilot-icon {
  font-size: 14px;
  flex-shrink: 0;
}

.copilot-header-actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 2px;
}

.copilot-header-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 13px;
  cursor: pointer;
  padding: 2px 4px;
  line-height: 1;
  border-radius: 0;
}

.copilot-header-btn:hover { color: var(--text); }

/* ── Quick Actions (flat text links) ── */
.copilot-quick-actions {
  height: 30px;
  min-height: 30px;
  padding: 0 12px;
  display: flex;
  align-items: center;
  gap: 0;
  flex-shrink: 0;
  border-bottom: 1px solid var(--border);
  overflow-x: auto;
}

.copilot-quick-link {
  background: none;
  border: none;
  color: var(--accent);
  font-size: 12px;
  cursor: pointer;
  padding: 2px 0;
  white-space: nowrap;
  flex-shrink: 0;
  border-radius: 0;
}

.copilot-quick-link:hover { text-decoration: underline; }

.quick-link-sep {
  color: var(--border);
  padding: 0 6px;
  font-size: 12px;
}

/* ── Context Bar ── */
.copilot-context-bar {
  flex-shrink: 0;
  border-bottom: 1px solid var(--border);
}

.copilot-context-toggle {
  padding: 4px 12px;
  font-size: 11px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  color: #bbbbbb;
  letter-spacing: 1px;
  text-transform: uppercase;
  user-select: none;
}

.copilot-context-toggle:hover { color: var(--text); }

.copilot-context-arrow {
  font-size: 8px;
  color: var(--text-muted);
}

.copilot-context-body {
  padding: 4px 12px 8px;
  font-size: 11px;
  color: var(--text-muted);
}

.copilot-context-row {
  display: flex;
  justify-content: space-between;
  padding: 2px 0;
  border-bottom: 1px solid rgba(255,255,255,0.04);
  font-size: 12px;
  height: 20px;
  align-items: center;
}

.copilot-context-row:last-child { border-bottom: none; }

/* ── Messages Area ── */
.copilot-messages {
  flex: 1;
  overflow-y: auto;
  padding: 8px 12px;
  gap: 4px;
  display: flex;
  flex-direction: column;
  background: var(--bg);
}

.copilot-message-user {
  padding: 6px 12px 6px 12px;
  font-size: 13px;
  max-width: 100%;
  word-wrap: break-word;
  line-height: 1.5;
  border-left: 2px solid var(--accent);
  background: transparent;
  color: var(--text);
}

.copilot-message-user::before {
  content: 'You';
  display: block;
  font-weight: 600;
  font-size: 12px;
  color: var(--accent);
  margin-bottom: 2px;
}

.copilot-message-ai {
  padding: 6px 12px 6px 12px;
  font-size: 13px;
  max-width: 100%;
  word-wrap: break-word;
  line-height: 1.5;
  border-left: 2px solid var(--accent2);
  background: transparent;
  color: var(--text);
}

.copilot-message-ai::before {
  content: 'Copilot';
  display: block;
  font-weight: 600;
  font-size: 12px;
  color: var(--accent2);
  margin-bottom: 2px;
}

.copilot-message-ai pre {
  background: rgba(0,0,0,0.3);
  padding: 8px;
  margin: 4px 0;
  overflow-x: auto;
  font-size: 12px;
  border: 1px solid var(--border);
  font-family: 'Consolas', 'Courier New', monospace;
}

.copilot-message-ai code {
  background: rgba(0,0,0,0.3);
  padding: 1px 4px;
  font-size: 12px;
  font-family: 'Consolas', 'Courier New', monospace;
}

.copilot-message-ai pre code { background: none; padding: 0; }

.copilot-thinking {
  color: var(--text-muted);
  font-style: italic;
  font-size: 13px;
  border-left: 2px solid var(--text-muted);
}

.thinking-dots .dot1 { animation: dotPulse 1.4s infinite; }
.thinking-dots .dot2 { animation: dotPulse 1.4s infinite 0.2s; }
.thinking-dots .dot3 { animation: dotPulse 1.4s infinite 0.4s; }

@keyframes dotPulse {
  0%, 80%, 100% { opacity: 0; }
  40% { opacity: 1; }
}

.copilot-system-msg {
  align-self: center;
  font-size: 11px;
  color: var(--text-muted);
  font-style: italic;
  padding: 4px 0;
  text-align: center;
}

.copilot-apply-container {
  padding: 4px 0;
}

.copilot-apply-btn {
  padding: 4px 10px;
  background: var(--accent);
  color: white;
  border: none;
  font-weight: 400;
  font-size: 12px;
  cursor: pointer;
  transition: 0.15s;
  border-radius: 0;
}

.copilot-apply-btn:hover { background: #005a9e; }

/* ── Input Row ── */
.copilot-input-row {
  display: flex;
  padding: 8px;
  gap: 4px;
  background: var(--surface);
  border-top: 1px solid var(--border);
  flex-shrink: 0;
  align-items: flex-end;
}

.copilot-input {
  flex: 1;
  padding: 6px 8px;
  border: 1px solid #3c3c3c;
  background: #3c3c3c;
  color: var(--text);
  font-size: 13px;
  resize: none;
  min-height: 28px;
  max-height: 120px;
  font-family: inherit;
  border-radius: 0;
  line-height: 1.4;
}

.copilot-input:focus {
  outline: none;
  border-color: var(--accent);
}

.copilot-input::placeholder {
  color: var(--text-muted);
}

.copilot-send-btn {
  padding: 2px 8px;
  height: 28px;
  background: transparent;
  color: var(--accent);
  border: none;
  font-weight: 400;
  font-size: 16px;
  cursor: pointer;
  white-space: nowrap;
  transition: 0.1s;
  border-radius: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.copilot-send-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.copilot-send-btn:hover:not(:disabled) {
  background: var(--surface2);
}

.copilot-footer-text {
  text-align: center;
  font-size: 11px;
  color: var(--text-muted);
  padding: 4px 8px;
  border-top: 1px solid var(--border);
  background: var(--surface);
  flex-shrink: 0;
}

/* ========== STATUS BAR ========== */
.status-bar {
  height: 22px;
  min-height: 22px;
  background: var(--status-bar);
  color: #ffffff;
  font-size: 12px;
  display: flex;
  align-items: center;
  padding: 0 8px;
  z-index: 100;
  position: relative;
}

.status-bar-left {
  display: flex;
  align-items: center;
  height: 100%;
}

.status-bar-right {
  display: flex;
  align-items: center;
  height: 100%;
  margin-left: auto;
}

.status-item {
  padding: 0 8px;
  height: 22px;
  display: flex;
  align-items: center;
  cursor: pointer;
  white-space: nowrap;
  font-size: 12px;
}

.status-item:hover {
  background: rgba(255,255,255,0.12);
}