/* ============================================================
   Orbit — Design System & Styles
   ============================================================ */

/* ── Variables ──────────────────────────────────────────── */
:root {
  /* Brand */
  --orbit-accent:      #7c5cfc;
  --orbit-accent-hover:#6748e8;
  --orbit-accent-light:rgba(124,92,252,.12);

  /* Neutral */
  --bg:          #0f0f13;
  --bg-2:        #16161d;
  --bg-3:        #1e1e28;
  --bg-4:        #262633;
  --border:      #2a2a38;
  --border-light:#343448;

  /* Text */
  --text:        #f0eeff;
  --text-muted:  #8888aa;
  --text-faint:  #555570;

  /* Status colours */
  --c-active:    #7c5cfc;
  --c-warm:      #f59e0b;
  --c-dormant:   #6b7280;
  --c-done:      #10b981;
  --c-danger:    #ef4444;

  /* Sizes */
  --sidebar-w:   240px;
  --topbar-h:    60px;
  --radius:      10px;
  --radius-sm:   6px;
  --shadow:      0 4px 24px rgba(0,0,0,.4);
}

/* Light mode */
@media (prefers-color-scheme: light) {
  :root {
    --bg:         #f8f8fc;
    --bg-2:       #ffffff;
    --bg-3:       #f1f0fb;
    --bg-4:       #e9e8f5;
    --border:     #e2e1f0;
    --border-light:#d0cfea;
    --text:       #1a1a2e;
    --text-muted: #6b6b8a;
    --text-faint: #aaaacc;
  }
}

/* ── Reset ──────────────────────────────────────────────── */
*,*::before,*::after { box-sizing:border-box; margin:0; padding:0; }
html { font-size:16px; }
body {
  font-family: 'Inter','Segoe UI',system-ui,sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
}
a { color: var(--orbit-accent); text-decoration:none; }
a:hover { text-decoration:underline; }
button { cursor:pointer; font-family:inherit; }
input, textarea, select { font-family:inherit; }

/* ── Layout ─────────────────────────────────────────────── */
.orbit-app {
  display: flex;
  min-height: 100vh;
}
.orbit-main {
  flex: 1;
  margin-left: var(--sidebar-w);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  transition: margin-left .25s;
}
.orbit-content {
  flex: 1;
  padding: 28px 32px;
  max-width: 1280px;
  width: 100%;
}
.orbit-content--project {
  max-width: 100%;
}

/* ── Sidebar ─────────────────────────────────────────────── */
.orbit-sidebar {
  position: fixed;
  top: 0; left: 0;
  width: var(--sidebar-w);
  height: 100vh;
  background: var(--bg-2);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  z-index: 100;
  transition: transform .25s, width .25s;
}
.sidebar-brand {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 16px;
  border-bottom: 1px solid var(--border);
}
.brand-link {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}
.brand-icon {
  font-size: 22px;
  color: var(--orbit-accent);
}
.brand-name {
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
}
.sidebar-toggle-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 18px;
  padding: 4px;
}
.sidebar-nav {
  flex: 1;
  padding: 12px 8px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: background .15s, color .15s;
}
.nav-item:hover {
  background: var(--bg-3);
  color: var(--text);
  text-decoration: none;
}
.nav-item--active {
  background: var(--orbit-accent-light);
  color: var(--orbit-accent);
}
.nav-item--logout { color: var(--c-danger); margin-top: 4px; }
.nav-icon { font-size: 16px; width: 20px; text-align: center; }
.sidebar-footer {
  padding: 12px 8px;
  border-top: 1px solid var(--border);
}
.sidebar-user {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  margin-bottom: 4px;
}
.user-avatar {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--orbit-accent);
  color: #fff;
  font-weight: 700;
  font-size: 14px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.user-info { display: flex; flex-direction: column; overflow: hidden; }
.user-name  { font-size: 13px; font-weight: 600; color: var(--text); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.user-email { font-size: 11px; color: var(--text-muted); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }

/* ── Topbar ──────────────────────────────────────────────── */
.orbit-topbar {
  height: var(--topbar-h);
  background: var(--bg-2);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  position: sticky;
  top: 0;
  z-index: 50;
}
.topbar-left { display: flex; align-items: center; gap: 12px; }
.topbar-menu-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 18px;
  display: none;
}
.topbar-search {
  position: relative;
  display: flex;
  align-items: center;
}
.topbar-search input {
  background: var(--bg-3);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 7px 14px 7px 34px;
  color: var(--text);
  font-size: 13px;
  width: 260px;
  outline: none;
  transition: border-color .2s;
}
.topbar-search input:focus { border-color: var(--orbit-accent); }
.search-icon {
  position: absolute;
  left: 12px;
  color: var(--text-faint);
  font-size: 16px;
  pointer-events: none;
}
.topbar-right { display: flex; align-items: center; gap: 16px; }
.topbar-greeting { font-size: 13px; color: var(--text-muted); }
.topbar-avatar {
  width: 34px; height: 34px;
  border-radius: 50%;
  background: var(--orbit-accent);
  color: #fff;
  font-weight: 700;
  font-size: 14px;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  position: relative;
}
.user-dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  min-width: 160px;
  box-shadow: var(--shadow);
  z-index: 200;
}
.user-dropdown.open { display: block; }
.dropdown-item {
  display: block;
  padding: 10px 16px;
  font-size: 13px;
  color: var(--text);
}
.dropdown-item:hover { background: var(--bg-3); text-decoration: none; }

/* ── Buttons ─────────────────────────────────────────────── */
.btn-primary {
  background: var(--orbit-accent);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  padding: 9px 18px;
  font-size: 14px;
  font-weight: 600;
  transition: background .15s, opacity .15s;
}
.btn-primary:hover { background: var(--orbit-accent-hover); }
.btn-primary:disabled { opacity:.5; cursor:not-allowed; }
.btn-secondary {
  background: var(--bg-3);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 9px 18px;
  font-size: 14px;
  font-weight: 500;
}
.btn-secondary:hover { background: var(--bg-4); }
.btn-ghost {
  background: none;
  color: var(--text-muted);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 9px 18px;
  font-size: 14px;
}
.btn-ghost:hover { color: var(--text); border-color: var(--border-light); }
.btn-danger {
  background: none;
  color: var(--c-danger);
  border: 1px solid var(--c-danger);
  border-radius: var(--radius-sm);
  padding: 9px 18px;
  font-size: 14px;
}
.btn-danger:hover { background: var(--c-danger); color: #fff; }
.btn-sm { padding: 5px 12px; font-size: 12px; }
.btn-full { width: 100%; }

/* ── Forms ───────────────────────────────────────────────── */
.form-group { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; }
.form-group label { font-size: 13px; font-weight: 600; color: var(--text-muted); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.input-field {
  background: var(--bg-3);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 9px 12px;
  color: var(--text);
  font-size: 14px;
  outline: none;
  transition: border-color .2s;
  width: 100%;
}
.input-field:focus { border-color: var(--orbit-accent); }
.input-field::placeholder { color: var(--text-faint); }
textarea.input-field { resize: vertical; }
select.input-field option { background: var(--bg-3); }

/* ── Progress bar ────────────────────────────────────────── */
.progress-bar {
  height: 8px;
  background: var(--bg-4);
  border-radius: 99px;
  overflow: hidden;
  width: 100%;
}
.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--orbit-accent), #a78bfa);
  border-radius: 99px;
  transition: width .4s ease;
}
.mini-progress {
  height: 4px;
  background: var(--bg-4);
  border-radius: 99px;
  overflow: hidden;
  width: 80px;
}
.mini-progress-fill {
  height: 100%;
  background: var(--orbit-accent);
  border-radius: 99px;
}
.progress-slider { width: 100%; accent-color: var(--orbit-accent); }

/* ── Cards ───────────────────────────────────────────────── */
.dash-section { margin-bottom: 32px; }
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}
.section-title { font-size: 18px; font-weight: 700; color: var(--text); }

/* Today card */
.today-card {
  background: linear-gradient(135deg, var(--bg-2), var(--bg-3));
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px 28px;
  display: flex;
  align-items: center;
  gap: 20px;
  box-shadow: var(--shadow);
}
.today-icon { font-size: 36px; flex-shrink: 0; }
.today-body { flex: 1; }
.today-label { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .08em; color: var(--orbit-accent); margin-bottom: 4px; }
.today-title { font-size: 20px; font-weight: 700; margin-bottom: 6px; }
.today-reason { font-size: 14px; color: var(--text-muted); margin-bottom: 12px; }
.today-progress { display: flex; align-items: center; gap: 10px; }
.progress-label { font-size: 12px; color: var(--text-muted); }
.today-cta { flex-shrink: 0; }
.today-empty { display: flex; flex-direction: column; align-items: center; gap: 12px; width: 100%; text-align: center; padding: 20px 0; }
.today-empty span { font-size: 32px; }
.today-empty p { color: var(--text-muted); }

/* Quick actions */
.quick-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.qa-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 10px 16px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
  transition: border-color .15s, background .15s;
}
.qa-btn:hover {
  border-color: var(--orbit-accent);
  background: var(--orbit-accent-light);
  color: var(--orbit-accent);
}
.qa-icon { font-size: 18px; }

/* Orbits columns */
.orbits-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}
.orbit-column {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.orbit-column-header {
  padding: 10px 14px;
  font-size: 13px;
  font-weight: 600;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--border);
}
.orbit-count {
  background: var(--bg-4);
  border-radius: 99px;
  padding: 1px 8px;
  font-size: 11px;
  color: var(--text-muted);
}
.status-active   { color: var(--c-active); }
.status-warm     { color: var(--c-warm); }
.status-dormant  { color: var(--c-dormant); }
.status-completed{ color: var(--c-done); }

.orbit-column-body { padding: 10px; min-height: 120px; }
.orbit-empty-col { font-size: 12px; color: var(--text-faint); text-align: center; padding: 20px 0; }

.project-card {
  background: var(--bg-3);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px;
  margin-bottom: 8px;
  cursor: pointer;
  transition: border-color .15s, background .15s;
}
.project-card:hover { border-color: var(--orbit-accent); background: var(--bg-4); }
.project-card-top { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 6px; }
.project-title { font-size: 13px; font-weight: 600; }
.project-desc { font-size: 11px; color: var(--text-muted); margin-bottom: 8px; line-height: 1.4; }
.project-card-footer { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.project-time { font-size: 10px; color: var(--text-faint); }

.priority-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}
.priority-1 { background: var(--c-dormant); }
.priority-2 { background: var(--c-warm); }
.priority-3 { background: var(--c-active); }
.priority-tag {
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 99px;
  font-weight: 600;
}
.priority-tag.priority-1 { background: rgba(107,114,128,.15); color: var(--c-dormant); }
.priority-tag.priority-2 { background: rgba(245,158,11,.12); color: var(--c-warm); }
.priority-tag.priority-3 { background: rgba(124,92,252,.12); color: var(--c-active); }

/* ── Project page ────────────────────────────────────────── */
.project-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}
.project-header-left { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.project-header-actions { display: flex; gap: 8px; }
.project-page-title { font-size: 22px; font-weight: 700; }
.status-badge {
  font-size: 12px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 99px;
  background: var(--bg-3);
}
.project-meta-row {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}
.project-meta-item { display: flex; align-items: center; gap: 6px; }
.meta-label { font-size: 12px; color: var(--text-faint); }
.meta-value { font-size: 13px; font-weight: 500; }
.project-progress-inline { display: flex; align-items: center; gap: 10px; margin-left: auto; }
.project-page-desc {
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 24px;
  max-width: 680px;
}

.project-layout {
  display: grid;
  grid-template-columns: 380px 1fr;
  gap: 24px;
  height: calc(100vh - 280px);
  min-height: 480px;
}
.project-tasks-panel,
.project-chat-panel {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
}
.panel-title { font-size: 15px; font-weight: 600; }

/* Tasks */
.tasks-list {
  flex: 1;
  overflow-y: auto;
  padding: 10px;
}
.task-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  margin-bottom: 4px;
  background: var(--bg-3);
  transition: background .15s;
}
.task-item:hover { background: var(--bg-4); }
.task-check {
  background: none;
  border: none;
  font-size: 16px;
  flex-shrink: 0;
}
.task-title { flex: 1; font-size: 13px; }
.task-done-text { text-decoration: line-through; color: var(--text-faint); }
.task-effort { font-size: 11px; color: var(--text-faint); flex-shrink: 0; }
.task-delete {
  background: none;
  border: none;
  color: var(--text-faint);
  font-size: 12px;
  opacity: 0;
  transition: opacity .15s;
}
.task-item:hover .task-delete { opacity: 1; }
.task-delete:hover { color: var(--c-danger); }
.tasks-empty { font-size: 13px; color: var(--text-faint); text-align: center; padding: 24px; }
.add-task-form {
  padding: 10px;
  border-bottom: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.form-row-btns { display: flex; gap: 8px; }

/* ── Chat ────────────────────────────────────────────────── */
.chat-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
}
.chat-conv-title { font-size: 13px; color: var(--text-muted); }
.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  scroll-behavior: smooth;
}
.chat-messages--modal { height: 360px; }
.chat-empty {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  text-align: center;
  padding: 24px;
}
.chat-empty span { font-size: 36px; }
.chat-empty p { font-size: 13px; color: var(--text-muted); }
.chat-msg {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}
.chat-msg--user { flex-direction: row-reverse; }
.msg-avatar {
  font-size: 20px;
  flex-shrink: 0;
  width: 32px;
  text-align: center;
  margin-top: 2px;
}
.msg-bubble {
  max-width: 75%;
}
.msg-content {
  background: var(--bg-3);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 10px 14px;
  font-size: 13px;
  line-height: 1.6;
  white-space: pre-wrap;
}
.chat-msg--user .msg-content {
  background: var(--orbit-accent);
  border-color: var(--orbit-accent);
  color: #fff;
}
.msg-time { font-size: 10px; color: var(--text-faint); margin-top: 4px; text-align: right; }
.chat-msg--user .msg-time { text-align: right; }
.chat-input-area {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  padding: 12px 16px;
  border-top: 1px solid var(--border);
  background: var(--bg-2);
}
.chat-input-area textarea {
  flex: 1;
  background: var(--bg-3);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 9px 12px;
  color: var(--text);
  font-size: 13px;
  resize: none;
  outline: none;
  transition: border-color .2s;
}
.chat-input-area textarea:focus { border-color: var(--orbit-accent); }
.chat-send-btn {
  background: var(--orbit-accent);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  width: 38px;
  height: 38px;
  font-size: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background .15s;
}
.chat-send-btn:hover { background: var(--orbit-accent-hover); }
.chat-typing {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}
.typing-dots {
  background: var(--bg-3);
  border-radius: var(--radius);
  padding: 12px 16px;
  display: flex;
  gap: 4px;
  align-items: center;
}
.typing-dots span {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--text-faint);
  animation: typing-bounce .9s infinite;
}
.typing-dots span:nth-child(2) { animation-delay: .15s; }
.typing-dots span:nth-child(3) { animation-delay: .30s; }
@keyframes typing-bounce {
  0%,80%,100% { transform: translateY(0); }
  40%         { transform: translateY(-6px); }
}

/* Chat global layout */
.orbit-chat-layout {
  display: flex;
  height: calc(100vh - var(--topbar-h));
  margin-left: var(--sidebar-w);
}
.chat-sidebar {
  width: 280px;
  background: var(--bg-2);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
}
.chat-sidebar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px;
  border-bottom: 1px solid var(--border);
}
.conv-list { flex: 1; overflow-y: auto; padding: 8px; }
.conv-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  text-decoration: none;
  color: var(--text);
  margin-bottom: 2px;
  transition: background .15s;
}
.conv-item:hover { background: var(--bg-3); text-decoration: none; }
.conv-item--active { background: var(--orbit-accent-light); }
.conv-item-info { display: flex; flex-direction: column; gap: 2px; flex: 1; overflow: hidden; }
.conv-title { font-size: 13px; font-weight: 500; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.conv-project { font-size: 11px; color: var(--text-muted); }
.conv-delete {
  background: none;
  border: none;
  color: var(--text-faint);
  font-size: 12px;
  opacity: 0;
  transition: opacity .15s;
  padding: 4px;
  flex-shrink: 0;
}
.conv-item:hover .conv-delete { opacity: 1; }
.conv-delete:hover { color: var(--c-danger); }
.conv-empty { font-size: 12px; color: var(--text-faint); text-align: center; padding: 20px; }
.chat-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.chat-header {
  padding: 14px 20px;
  border-bottom: 1px solid var(--border);
  background: var(--bg-2);
}
.chat-conv-name { font-size: 16px; font-weight: 600; }
.chat-empty-full {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  text-align: center;
}
.chat-empty-full span { font-size: 48px; }
.chat-empty-full h3 { font-size: 20px; }
.chat-empty-full p { font-size: 14px; color: var(--text-muted); max-width: 360px; }
.chat-empty-msg { text-align: center; padding: 32px; }
.chat-empty-msg span { font-size: 32px; display:block; margin-bottom: 12px; }
.chat-empty-msg p { font-size: 13px; color: var(--text-muted); }

/* ── Projects list ───────────────────────────────────────── */
.filter-bar { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 20px; }
.filter-chip {
  padding: 5px 14px;
  border-radius: 99px;
  background: var(--bg-3);
  border: 1px solid var(--border);
  font-size: 13px;
  color: var(--text-muted);
  cursor: pointer;
  text-decoration: none;
  transition: background .15s, color .15s;
}
.filter-chip:hover { background: var(--bg-4); color: var(--text); text-decoration: none; }
.filter-chip--active {
  background: var(--orbit-accent-light);
  border-color: var(--orbit-accent);
  color: var(--orbit-accent);
}
.projects-list { display: flex; flex-direction: column; gap: 8px; }
.project-list-item {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  cursor: pointer;
  transition: border-color .15s, background .15s;
}
.project-list-item:hover { border-color: var(--orbit-accent); background: var(--bg-3); }
.pli-left { display: flex; align-items: center; gap: 12px; }
.pli-status-dot { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }
.pli-info { display: flex; flex-direction: column; gap: 2px; }
.pli-title { font-size: 14px; font-weight: 600; }
.pli-category { font-size: 11px; color: var(--text-muted); }
.pli-right { display: flex; align-items: center; gap: 12px; }
.pli-progress { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--text-muted); }
.pli-time { font-size: 12px; color: var(--text-faint); }

/* ── Auth ────────────────────────────────────────────────── */
.orbit-auth-page {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  background: radial-gradient(ellipse at 50% 0%, rgba(124,92,252,.15) 0%, transparent 70%), var(--bg);
}
.auth-container { width: 100%; max-width: 420px; padding: 24px; }
.auth-card {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 36px 32px;
  box-shadow: var(--shadow);
}
.auth-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 24px;
}
.auth-logo-icon { font-size: 28px; color: var(--orbit-accent); }
.auth-logo-name { font-size: 22px; font-weight: 700; }
.auth-title { font-size: 22px; font-weight: 700; margin-bottom: 6px; }
.auth-sub { font-size: 14px; color: var(--text-muted); margin-bottom: 24px; }
.auth-form { margin-bottom: 20px; }
.auth-footer { font-size: 13px; color: var(--text-muted); text-align: center; }
.auth-demo-hint {
  margin-top: 14px;
  font-size: 11px;
  color: var(--text-faint);
  text-align: center;
  background: var(--bg-3);
  padding: 6px 12px;
  border-radius: var(--radius-sm);
}

/* ── Alerts ──────────────────────────────────────────────── */
.orbit-alert {
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.orbit-alert-error   { background: rgba(239,68,68,.1);  border: 1px solid rgba(239,68,68,.3);  color: #fca5a5; }
.orbit-alert-success { background: rgba(16,185,129,.1); border: 1px solid rgba(16,185,129,.3); color: #6ee7b7; }
.orbit-welcome button { background: none; border: none; color: inherit; cursor: pointer; font-size: 16px; }

/* ── Modals ──────────────────────────────────────────────── */
.orbit-modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.6);
  backdrop-filter: blur(4px);
  z-index: 500;
  align-items: center;
  justify-content: center;
}
.orbit-modal-overlay.open { display: flex; }
.orbit-modal {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  width: 100%;
  max-width: 520px;
  box-shadow: var(--shadow);
  max-height: 90vh;
  overflow-y: auto;
}
.orbit-modal--qa { max-width: 560px; }
.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px 14px;
  border-bottom: 1px solid var(--border);
}
.modal-title { font-size: 16px; font-weight: 600; }
.modal-close { background:none; border:none; color:var(--text-muted); font-size:18px; }
.modal-body { padding: 20px; }
.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding-top: 8px;
  border-top: 1px solid var(--border);
  margin-top: 8px;
}

/* ── Empty state ─────────────────────────────────────────── */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 24px;
  text-align: center;
  gap: 12px;
}
.empty-icon { font-size: 48px; color: var(--text-faint); }
.empty-state h3 { font-size: 18px; font-weight: 600; }
.empty-state p { font-size: 14px; color: var(--text-muted); max-width: 360px; }

/* ── Toast ───────────────────────────────────────────────── */
#orbitToastContainer {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.orbit-toast {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  font-size: 13px;
  box-shadow: var(--shadow);
  min-width: 260px;
  max-width: 360px;
  animation: toast-in .2s ease;
}
.orbit-toast--success { border-left: 3px solid var(--c-done); }
.orbit-toast--error   { border-left: 3px solid var(--c-danger); }
.orbit-toast--info    { border-left: 3px solid var(--orbit-accent); }
@keyframes toast-in {
  from { transform: translateX(20px); opacity: 0; }
  to   { transform: translateX(0);    opacity: 1; }
}

/* ── Utilities ───────────────────────────────────────────── */
.hidden { display: none !important; }
.text-muted { color: var(--text-muted); }

/* ── Responsive ──────────────────────────────────────────── */
@media (max-width: 900px) {
  .orbit-sidebar { transform: translateX(-100%); }
  .orbit-sidebar.open { transform: translateX(0); }
  .orbit-main { margin-left: 0; }
  .orbit-chat-layout { margin-left: 0; }
  .topbar-menu-btn { display: flex; }
  .topbar-greeting { display: none; }
  .orbits-grid { grid-template-columns: 1fr 1fr; }
  .project-layout { grid-template-columns: 1fr; height: auto; }
  .project-tasks-panel { min-height: 300px; }
  .project-chat-panel { min-height: 400px; }
}
@media (max-width: 600px) {
  .orbits-grid { grid-template-columns: 1fr; }
  .orbit-content { padding: 16px; }
  .form-row { grid-template-columns: 1fr; }
  .today-card { flex-direction: column; }
  .chat-sidebar { width: 100%; }
}

/* ── Image attachments in chat ────────────────────────────────────────────── */
.chat-input-row {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  width: 100%;
}
.chat-attach-btn {
  background: none;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  font-size: 16px;
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  cursor: pointer;
  transition: border-color .15s, color .15s;
}
.chat-attach-btn:hover {
  border-color: var(--orbit-accent);
  color: var(--orbit-accent);
}
.chat-images-preview {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 8px 16px 0;
}
.chat-images-preview.hidden { display: none; }
.preview-item {
  position: relative;
  width: 72px;
  height: 72px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 1px solid var(--border);
}
.preview-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.preview-remove {
  position: absolute;
  top: 2px;
  right: 2px;
  background: rgba(0,0,0,.65);
  color: #fff;
  border: none;
  border-radius: 50%;
  width: 18px;
  height: 18px;
  font-size: 10px;
  line-height: 18px;
  text-align: center;
  cursor: pointer;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.preview-remove:hover { background: rgba(239,68,68,.85); }
.msg-images {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 6px;
}
.msg-img {
  width: 140px;
  height: 140px;
  object-fit: cover;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  cursor: pointer;
  display: block;
  transition: opacity .15s;
}
.msg-img:hover { opacity: .88; }
.chat-msg--user .msg-img {
  border-color: rgba(255,255,255,.25);
}

/* ── Ideas list ───────────────────────────────────────────── */
.ideas-list {
  flex: 1;
  overflow-y: auto;
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.idea-card {
  background: var(--bg-3);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 14px;
  cursor: pointer;
  transition: background .15s, border-color .15s, transform .1s;
  position: relative;
}
.idea-card:hover {
  background: var(--bg-4);
  border-color: var(--border-light);
  transform: translateY(-1px);
}
.idea-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 5px;
}
.idea-title {
  font-size: 14px;
  font-weight: 500;
  flex: 1;
  line-height: 1.3;
}
.idea-status-badge {
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 20px;
  flex-shrink: 0;
  font-weight: 500;
}
.idea-status-pending    { background: rgba(107,114,128,.18); color: var(--text-muted); }
.idea-status-in_progress{ background: rgba(124,92,252,.18); color: var(--orbit-accent); }
.idea-status-done       { background: rgba(16,185,129,.18);  color: var(--c-done); }
.idea-desc {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.5;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}
.idea-delete {
  position: absolute;
  top: 8px;
  right: 8px;
  background: none;
  border: none;
  color: var(--text-faint);
  font-size: 12px;
  opacity: 0;
  cursor: pointer;
  transition: opacity .15s, color .15s;
  padding: 2px 4px;
  border-radius: var(--radius-sm);
}
.idea-card:hover .idea-delete { opacity: 1; }
.idea-delete:hover { color: var(--c-danger); background: rgba(239,68,68,.1); }
.ideas-empty { font-size: 13px; color: var(--text-faint); text-align: center; padding: 24px; }

/* ── AI insert button row ─────────────────────────────────── */
.ai-insert-row {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid rgba(255,255,255,.07);
}

/* ── input-field small variant ───────────────────────────── */
.input-field--sm {
  padding: 5px 10px;
  font-size: 12px;
  height: auto;
}

