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

:root {
  --bg: #f5f6f8;
  --surface: #ffffff;
  --surface2: #f0f1f4;
  --surface3: #e8eaef;
  --border: #e2e4ea;
  --border2: #d0d3dc;
  --text: #1a1d23;
  --text2: #5a5f72;
  --text3: #9299b0;
  --accent: #5c6bc0;
  --accent-light: #eef0fb;
  --accent-hover: #4a59b0;
  --danger: #e53935;
  --danger-light: #fdecea;
  --success: #2e7d32;
  --success-light: #e8f5e9;
  --warning: #f57c00;
  --warning-light: #fff3e0;

  /* Label colors (like Hive) */
  --label-purple: #7c4dff;
  --label-purple-bg: #ede7f6;
  --label-green: #2e7d32;
  --label-green-bg: #e8f5e9;
  --label-blue: #1565c0;
  --label-blue-bg: #e3f2fd;
  --label-orange: #e65100;
  --label-orange-bg: #fff3e0;
  --label-red: #c62828;
  --label-red-bg: #ffebee;
  --label-teal: #00695c;
  --label-teal-bg: #e0f2f1;
  --label-pink: #880e4f;
  --label-pink-bg: #fce4ec;
  --label-gray: #37474f;
  --label-gray-bg: #eceff1;

  /* Status colors */
  --status-active: #1565c0;
  --status-active-bg: #e3f2fd;
  --status-paused: #f57c00;
  --status-paused-bg: #fff3e0;
  --status-done: #2e7d32;
  --status-done-bg: #e8f5e9;
  --status-archived: #546e7a;
  --status-archived-bg: #eceff1;

  /* Priority */
  --pri-high: #c62828;
  --pri-high-bg: #ffebee;
  --pri-med: #f57c00;
  --pri-med-bg: #fff3e0;
  --pri-low: #1565c0;
  --pri-low-bg: #e3f2fd;

  --font: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --radius: 6px;
  --radius-lg: 10px;
  --sidebar-w: 220px;
  --shadow: 0 1px 3px rgba(0,0,0,0.08), 0 1px 2px rgba(0,0,0,0.05);
  --shadow-md: 0 4px 16px rgba(0,0,0,0.10);
  --shadow-lg: 0 8px 40px rgba(0,0,0,0.14);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; background: var(--bg); color: var(--text); font-family: var(--font); font-size: 14px; overflow: hidden; }
#app { display: flex; height: 100vh; }

/* ─── SIDEBAR ─────────────────────────────── */
#sidebar {
  width: var(--sidebar-w);
  min-width: var(--sidebar-w);
  background: var(--surface);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.sidebar-header {
  padding: 18px 16px 14px;
  border-bottom: 1px solid var(--border);
}

.logo {
  font-size: 18px;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: -0.5px;
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
}
.logo-icon {
  width: 28px; height: 28px;
  background: var(--accent);
  border-radius: 7px;
  display: flex; align-items: center; justify-content: center;
  color: white;
  font-size: 13px;
  font-weight: 800;
  flex-shrink: 0;
}

.btn-new-project {
  width: 100%;
  background: var(--accent);
  color: white;
  border: none;
  border-radius: var(--radius);
  padding: 8px 12px;
  font-family: var(--font);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s, transform 0.1s;
  display: flex;
  align-items: center;
  gap: 6px;
}
.btn-new-project:hover { background: var(--accent-hover); }
.btn-new-project:active { transform: scale(0.98); }

/* Nav sections */
.nav-section { padding: 8px 8px 0; }
.nav-label {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--text3);
  padding: 6px 8px 4px;
}
.nav-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 10px;
  border-radius: var(--radius);
  cursor: pointer;
  font-size: 13px;
  color: var(--text2);
  transition: background 0.12s, color 0.12s;
  margin-bottom: 1px;
}
.nav-item:hover { background: var(--surface2); color: var(--text); }
.nav-item.active { background: var(--accent-light); color: var(--accent); font-weight: 600; }
.nav-item-icon { font-size: 14px; flex-shrink: 0; opacity: 0.7; }
.nav-item.active .nav-item-icon { opacity: 1; }

.project-list {
  flex: 1;
  overflow-y: auto;
  padding: 6px 8px;
  scrollbar-width: thin;
  scrollbar-color: var(--border2) transparent;
}

.project-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 10px;
  border-radius: var(--radius);
  cursor: pointer;
  transition: background 0.12s;
  margin-bottom: 1px;
}
.project-item:hover { background: var(--surface2); }
.project-item.active { background: var(--accent-light); }
.project-item.active .project-item-name { color: var(--accent); font-weight: 600; }

.project-item-color {
  width: 8px; height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}
.project-item-color.active { background: var(--status-active); }
.project-item-color.paused { background: var(--status-paused); }
.project-item-color.done { background: var(--status-done); }
.project-item-color.archived { background: var(--text3); }

.project-item-name {
  font-size: 13px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
  color: var(--text);
}
.project-item-count {
  font-size: 11px;
  color: var(--text3);
  background: var(--surface2);
  border-radius: 10px;
  padding: 1px 6px;
  flex-shrink: 0;
}
.project-item.active .project-item-count { background: rgba(92,107,192,0.15); color: var(--accent); }

.empty-list {
  color: var(--text3);
  font-size: 12px;
  text-align: center;
  padding: 24px 10px;
}

.sidebar-footer {
  padding: 10px 12px;
  border-top: 1px solid var(--border);
  font-size: 11px;
  color: var(--text3);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* ─── MAIN ────────────────────────────────── */
#main {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--bg);
}

/* ─── TOP BAR ─────────────────────────────── */
.topbar {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 0 24px;
  height: 52px;
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}
.topbar-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.topbar-breadcrumb {
  font-size: 12px;
  color: var(--text3);
  flex-shrink: 0;
}
.topbar-sep { color: var(--border2); flex-shrink: 0; }
.topbar-spacer { flex: 1; }

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

/* ─── WELCOME ─────────────────────────────── */
.welcome {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  text-align: center;
}
.welcome-inner h1 {
  font-size: 36px;
  font-weight: 800;
  color: var(--accent);
  letter-spacing: -1px;
  margin-bottom: 12px;
}
.welcome-inner p { color: var(--text2); margin-bottom: 24px; line-height: 1.6; }

/* ─── PROJECT VIEW ────────────────────────── */
.project-view {
  display: flex;
  flex-direction: column;
  flex: 1;
  overflow: hidden;
}

.project-toolbar {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 8px 24px;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  flex-shrink: 0;
}

.toolbar-group { display: flex; align-items: center; gap: 6px; }
.toolbar-sep { width: 1px; height: 20px; background: var(--border); margin: 0 4px; }

.project-desc-bar {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 10px 24px;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  flex-shrink: 0;
}

.project-desc-text {
  flex: 1;
  font-size: 13px;
  color: var(--text2);
  line-height: 1.5;
  cursor: text;
  padding: 2px 4px;
  border-radius: 4px;
  min-height: 20px;
}
.project-desc-text:focus { outline: 2px solid var(--accent); background: var(--surface2); }
.project-desc-text:empty::before { content: attr(data-placeholder); color: var(--text3); }

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

/* ─── STATUS BADGE ────────────────────────── */
.status-badge {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 11px; font-weight: 600;
  padding: 3px 9px;
  border-radius: 100px;
  white-space: nowrap;
  cursor: default;
}
.status-badge.active { color: var(--status-active); background: var(--status-active-bg); }
.status-badge.paused { color: var(--status-paused); background: var(--status-paused-bg); }
.status-badge.done { color: var(--status-done); background: var(--status-done-bg); }
.status-badge.archived { color: var(--status-archived); background: var(--status-archived-bg); }
.status-badge::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }

/* ─── LABEL BADGE ─────────────────────────── */
.label-badge {
  display: inline-block;
  font-size: 11px; font-weight: 600;
  padding: 2px 8px;
  border-radius: 4px;
  white-space: nowrap;
}
.label-badge.purple { color: var(--label-purple); background: var(--label-purple-bg); }
.label-badge.green { color: var(--label-green); background: var(--label-green-bg); }
.label-badge.blue { color: var(--label-blue); background: var(--label-blue-bg); }
.label-badge.orange { color: var(--label-orange); background: var(--label-orange-bg); }
.label-badge.red { color: var(--label-red); background: var(--label-red-bg); }
.label-badge.teal { color: var(--label-teal); background: var(--label-teal-bg); }
.label-badge.pink { color: var(--label-pink); background: var(--label-pink-bg); }
.label-badge.gray { color: var(--label-gray); background: var(--label-gray-bg); }

/* ─── PRIORITY BADGE ──────────────────────── */
.pri-badge {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 11px; font-weight: 600;
  padding: 2px 8px;
  border-radius: 4px;
  white-space: nowrap;
}
.pri-badge.high { color: var(--pri-high); background: var(--pri-high-bg); }
.pri-badge.medium { color: var(--pri-med); background: var(--pri-med-bg); }
.pri-badge.low { color: var(--pri-low); background: var(--pri-low-bg); }
.pri-badge.high::before { content: '▲'; font-size: 8px; }
.pri-badge.medium::before { content: '●'; font-size: 8px; }
.pri-badge.low::before { content: '▼'; font-size: 8px; }

/* ─── IDEAS TABLE ─────────────────────────── */
.ideas-container {
  flex: 1;
  overflow-y: auto;
  overflow-x: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--border2) transparent;
}

.ideas-table {
  width: 100%;
  min-width: 700px;
  border-collapse: collapse;
}

.ideas-table thead th {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 8px 12px;
  font-size: 11px;
  font-weight: 600;
  color: var(--text3);
  text-transform: uppercase;
  letter-spacing: 0.6px;
  text-align: left;
  white-space: nowrap;
  position: sticky;
  top: 0;
  z-index: 2;
}

.ideas-table thead th:first-child { padding-left: 24px; width: 36px; }
.ideas-table thead th.col-labels { width: 200px; }
.ideas-table thead th.col-title { }
.ideas-table thead th.col-priority { width: 100px; }
.ideas-table thead th.col-status { width: 120px; }
.ideas-table thead th.col-updated { width: 110px; }
.ideas-table thead th.col-actions { width: 80px; }

.ideas-table tbody tr {
  border-bottom: 1px solid var(--border);
  transition: background 0.1s;
}
.ideas-table tbody tr:hover { background: var(--surface); }
.ideas-table tbody tr.idea-done { opacity: 0.55; }
.ideas-table tbody tr.idea-done .idea-title-text { text-decoration: line-through; color: var(--text3); }

.ideas-table td {
  padding: 10px 12px;
  vertical-align: middle;
}
.ideas-table td:first-child { padding-left: 24px; }

/* Checkbox */
.idea-check {
  width: 16px; height: 16px;
  border: 2px solid var(--border2);
  border-radius: 4px;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  font-size: 10px;
  color: transparent;
  transition: all 0.15s;
  flex-shrink: 0;
}
.idea-check:hover { border-color: var(--accent); }
.idea-check.checked { background: var(--status-done); border-color: var(--status-done); color: white; }

/* Title cell */
.title-cell { display: flex; flex-direction: column; gap: 3px; }
.idea-title-text {
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
  cursor: pointer;
}
.idea-title-text:hover { color: var(--accent); }
.idea-note-text {
  font-size: 11px;
  color: var(--text3);
  line-height: 1.4;
}

/* Labels cell */
.labels-cell { display: flex; gap: 4px; flex-wrap: wrap; align-items: center; }

/* Row actions */
.row-actions {
  display: flex; gap: 4px;
  opacity: 0;
  transition: opacity 0.12s;
}
.ideas-table tbody tr:hover .row-actions { opacity: 1; }

/* Add idea row */
.add-idea-row td {
  padding: 8px 24px;
  border-bottom: none;
}
.add-idea-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--text3);
  font-size: 13px;
  cursor: pointer;
  padding: 4px 0;
  transition: color 0.15s;
  background: none;
  border: none;
  font-family: var(--font);
}
.add-idea-btn:hover { color: var(--accent); }

/* ─── SECTIONS BELOW TABLE ────────────────── */
.below-table {
  padding: 0 24px 32px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.section-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.section-card-header {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--surface);
}

.section-card-header h3 {
  font-size: 13px;
  font-weight: 600;
  color: var(--text2);
  display: flex;
  align-items: center;
  gap: 6px;
}

.section-card-body { padding: 16px; }

/* AI output */
.ai-output {
  font-size: 13px;
  line-height: 1.7;
  color: var(--text2);
}
.ai-output h1, .ai-output h2, .ai-output h3 { color: var(--text); margin: 12px 0 6px; font-size: 14px; }
.ai-output code { background: var(--surface2); padding: 1px 5px; border-radius: 3px; font-size: 12px; }
.ai-output ul, .ai-output ol { padding-left: 18px; }
.ai-output li { margin: 4px 0; }
.ai-output p { margin: 6px 0; }
.ai-placeholder { color: var(--text3); font-size: 13px; font-style: italic; }

.ai-timestamp { font-size: 11px; color: var(--text3); }

/* Changelog */
.changelog-entry {
  display: grid;
  grid-template-columns: 140px 1fr 90px;
  gap: 8px;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
  font-size: 12px;
  align-items: start;
}
.changelog-entry:last-child { border-bottom: none; }
.cl-action { color: var(--accent); font-weight: 600; font-size: 11px; text-transform: capitalize; }
.cl-note { color: var(--text2); }
.cl-ts { color: var(--text3); text-align: right; white-space: nowrap; }

/* Tags in toolbar */
.tag-badge {
  display: inline-flex; align-items: center; gap: 4px;
  background: var(--surface2);
  border: 1px solid var(--border2);
  color: var(--text2);
  font-size: 11px;
  padding: 3px 8px;
  border-radius: 100px;
}
.tag-remove-btn {
  color: var(--text3);
  cursor: pointer;
  font-size: 12px;
  line-height: 1;
  background: none;
  border: none;
  padding: 0;
}
.tag-remove-btn:hover { color: var(--danger); }

#tagInput {
  background: none;
  border: 1px solid transparent;
  outline: none;
  color: var(--text);
  font-family: var(--font);
  font-size: 12px;
  width: 130px;
  padding: 3px 6px;
  border-radius: var(--radius);
  transition: border-color 0.2s;
}
#tagInput:focus { border-color: var(--accent); background: var(--surface); }
#tagInput::placeholder { color: var(--text3); }

/* ─── BUTTONS ─────────────────────────────── */
.btn-primary {
  background: var(--accent);
  color: white;
  border: none;
  border-radius: var(--radius);
  padding: 8px 16px;
  font-family: var(--font);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex; align-items: center; gap: 6px;
  transition: background 0.15s;
}
.btn-primary:hover { background: var(--accent-hover); }

.btn-secondary {
  background: var(--surface);
  color: var(--text2);
  border: 1px solid var(--border2);
  border-radius: var(--radius);
  padding: 8px 16px;
  font-family: var(--font);
  font-size: 13px;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}
.btn-secondary:hover { background: var(--surface2); border-color: var(--border2); }

.btn-sm {
  background: var(--surface);
  color: var(--text2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 5px 10px;
  font-family: var(--font);
  font-size: 12px;
  cursor: pointer;
  display: inline-flex; align-items: center; gap: 5px;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
  white-space: nowrap;
}
.btn-sm:hover { background: var(--surface2); color: var(--text); border-color: var(--border2); }
.btn-sm.active { background: var(--accent-light); color: var(--accent); border-color: var(--accent); }
.btn-sm.danger:hover { color: var(--danger); border-color: var(--danger); background: var(--danger-light); }

.btn-ghost {
  background: none;
  border: none;
  color: var(--text2);
  font-family: var(--font);
  font-size: 12px;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: var(--radius);
  transition: background 0.12s, color 0.12s;
  display: inline-flex; align-items: center; gap: 5px;
}
.btn-ghost:hover { background: var(--surface2); color: var(--text); }
.btn-ghost.danger:hover { color: var(--danger); background: var(--danger-light); }

.icon-btn {
  width: 28px; height: 28px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: var(--radius);
  background: none;
  border: 1px solid transparent;
  color: var(--text3);
  cursor: pointer;
  font-size: 14px;
  transition: all 0.12s;
}
.icon-btn:hover { background: var(--surface2); border-color: var(--border); color: var(--text); }
.icon-btn.danger:hover { color: var(--danger); background: var(--danger-light); border-color: var(--danger); }

/* ─── STATUS SELECTOR ─────────────────────── */
.status-select-wrap { position: relative; display: inline-flex; }
.status-select-wrap select {
  appearance: none;
  -webkit-appearance: none;
  background: transparent;
  border: none;
  padding: 0;
  font: inherit;
  cursor: pointer;
  color: inherit;
  position: absolute;
  inset: 0;
  opacity: 0;
  width: 100%;
}

/* ─── MODALS ──────────────────────────────── */
.modal-backdrop {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.35);
  backdrop-filter: blur(3px);
  z-index: 100;
}

.modal {
  position: fixed;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  background: var(--surface);
  border: 1px solid var(--border2);
  border-radius: var(--radius-lg);
  padding: 24px;
  width: min(480px, 94vw);
  z-index: 101;
  display: flex;
  flex-direction: column;
  gap: 14px;
  box-shadow: var(--shadow-lg);
  animation: modalIn 0.18s ease;
}
@keyframes modalIn {
  from { transform: translate(-50%, -48%); opacity: 0; }
  to { transform: translate(-50%, -50%); opacity: 1; }
}

.modal h3 {
  font-size: 17px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.3px;
}

.modal input[type="text"],
.modal textarea {
  width: 100%;
  background: var(--surface2);
  border: 1px solid var(--border2);
  border-radius: var(--radius);
  color: var(--text);
  font-family: var(--font);
  font-size: 13px;
  padding: 9px 12px;
  outline: none;
  resize: vertical;
  transition: border-color 0.2s, background 0.2s;
}
.modal input:focus, .modal textarea:focus {
  border-color: var(--accent);
  background: var(--surface);
}
.modal input::placeholder, .modal textarea::placeholder { color: var(--text3); }

.modal-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 4px; }

.priority-row { display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--text2); }
.priority-row select {
  background: var(--surface2);
  border: 1px solid var(--border2);
  color: var(--text);
  font-family: var(--font);
  font-size: 12px;
  padding: 6px 10px;
  border-radius: var(--radius);
  cursor: pointer;
  outline: none;
}

/* Brainstorm */
.brainstorm-hint { font-size: 12px; color: var(--text3); }
.brainstorm-list { display: flex; flex-direction: column; gap: 6px; max-height: 320px; overflow-y: auto; }
.brainstorm-item {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 10px 14px;
  font-size: 13px;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  color: var(--text);
}
.brainstorm-item:hover { border-color: var(--accent); background: var(--accent-light); }
.brainstorm-item.added { opacity: 0.4; pointer-events: none; }
.brainstorm-add-btn { font-size: 11px; font-weight: 600; color: var(--accent); flex-shrink: 0; }

.idea-ai-output { max-height: 400px; overflow-y: auto; margin-top: 4px; }

/* ─── AI SETTINGS ─────────────────────────── */
.settings-field { display: flex; flex-direction: column; gap: 6px; }
.settings-label { font-size: 11px; font-weight: 600; color: var(--text3); text-transform: uppercase; letter-spacing: 0.6px; }
.settings-input {
  background: var(--surface2);
  border: 1px solid var(--border2);
  border-radius: var(--radius);
  color: var(--text);
  font-family: var(--font);
  font-size: 13px;
  padding: 8px 10px;
  outline: none;
  width: 100%;
  transition: border-color 0.2s;
}
.settings-input:focus { border-color: var(--accent); }
.settings-input::placeholder { color: var(--text3); }

.model-row { display: flex; gap: 6px; align-items: stretch; }
.model-row .settings-input { flex: 1; }

.model-list { display: flex; flex-wrap: wrap; gap: 5px; }
.model-chip {
  background: var(--surface3);
  border: 1px solid var(--border2);
  border-radius: 100px;
  padding: 3px 10px;
  font-size: 11px;
  color: var(--text2);
  cursor: pointer;
  transition: all 0.12s;
}
.model-chip:hover { border-color: var(--accent); color: var(--accent); }
.model-chip.selected { background: var(--accent-light); border-color: var(--accent); color: var(--accent); font-weight: 600; }

.settings-status {
  font-size: 11px;
  padding: 6px 10px;
  border-radius: var(--radius);
  display: none;
}
.settings-status.ok { background: var(--success-light); color: var(--success); display: block; }
.settings-status.err { background: var(--danger-light); color: var(--danger); display: block; }
.settings-status.loading { color: var(--text3); display: block; }

.btn-settings {
  background: none;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text2);
  font-family: var(--font);
  font-size: 11px;
  font-weight: 500;
  padding: 4px 10px;
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s, background 0.15s;
  display: flex; align-items: center; gap: 5px;
}
.btn-settings:hover { color: var(--accent); border-color: var(--accent); background: var(--accent-light); }

/* Loading */
.loading-pulse {
  color: var(--text3);
  font-size: 13px;
  font-style: italic;
  padding: 8px 0;
  animation: pulse 1.4s ease-in-out infinite;
}
@keyframes pulse { 0%,100%{opacity:1} 50%{opacity:0.45} }

/* ─── TOAST ───────────────────────────────── */
.toast {
  position: fixed;
  bottom: 20px; right: 20px;
  background: var(--text);
  border-radius: var(--radius);
  padding: 10px 16px;
  font-size: 13px;
  color: white;
  z-index: 200;
  box-shadow: var(--shadow-md);
  animation: slideUp 0.2s ease;
}
.toast.success { background: var(--success); }
.toast.error { background: var(--danger); }
@keyframes slideUp { from{transform:translateY(12px);opacity:0} to{transform:translateY(0);opacity:1} }

/* ─── UTILITIES ───────────────────────────── */
.hidden { display: none !important; }

select {
  background: var(--surface2);
  border: 1px solid var(--border2);
  color: var(--text);
  font-family: var(--font);
  font-size: 12px;
  padding: 5px 8px;
  border-radius: var(--radius);
  cursor: pointer;
  outline: none;
}
select:focus { border-color: var(--accent); }

/* ─── MOBILE ──────────────────────────────── */
@media (max-width: 700px) {
  #sidebar {
    width: 100%; min-width: 0; position: fixed;
    bottom: 0; left: 0; height: auto;
    flex-direction: row;
    border-right: none; border-top: 1px solid var(--border);
    z-index: 50;
  }
  .sidebar-header { padding: 8px 12px; border-bottom: none; border-right: 1px solid var(--border); flex-shrink: 0; }
  .project-list { display: flex; flex-direction: row; overflow-x: auto; padding: 6px; gap: 4px; }
  .project-item { margin-bottom: 0; white-space: nowrap; }
  .sidebar-footer, .nav-section { display: none; }
  #main { padding-bottom: 64px; }
  .topbar-breadcrumb { display: none; }
  .project-toolbar { padding: 8px 12px; }
}
