/* ============================================================
   ProjectFlow AI — Design System Premium
   ============================================================ */

:root {
  --bg:          #0f1117;
  --bg-card:     #1a1d27;
  --bg-hover:    #1e2130;
  --bg-input:    #12151e;
  --border:      #2a2d3e;
  --border-light:#363a52;
  --text:        #e8eaf0;
  --text-muted:  #8b91a8;
  --text-faint:  #555b75;
  --primary:     #6366f1;
  --primary-hover:#7c7ff5;
  --primary-glow: rgba(99,102,241,0.25);
  --success:     #10b981;
  --warning:     #f59e0b;
  --danger:      #ef4444;
  --info:        #3b82f6;
  --gold:        #d4a843;
  --radius:      10px;
  --radius-lg:   16px;
  --shadow:      0 4px 24px rgba(0,0,0,0.4);
  --shadow-sm:   0 2px 8px rgba(0,0,0,0.3);
  --font:        'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --sidebar-w:   260px;
  --transition:  150ms cubic-bezier(0.23,1,0.32,1);
}

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

html { font-size: 15px; scroll-behavior: smooth; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

/* ── Layout ─────────────────────────────────────────────── */
.app-layout { display: flex; min-height: 100vh; }
.main-content { flex: 1; min-width: 0; margin-left: var(--sidebar-w); }
.page-wrapper { padding: 2rem; max-width: 1400px; }

/* ── Sidebar ─────────────────────────────────────────────── */
.sidebar {
  position: fixed; top: 0; left: 0; bottom: 0;
  width: var(--sidebar-w);
  background: var(--bg-card);
  border-right: 1px solid var(--border);
  display: flex; flex-direction: column;
  z-index: 100;
  transition: transform var(--transition);
  overflow-y: auto;
}

.sidebar-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 1.25rem 1rem;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.sidebar-logo {
  display: flex; align-items: center; gap: .625rem;
  text-decoration: none; color: var(--text);
}

.sidebar-logo-icon {
  width: 32px; height: 32px;
  background: linear-gradient(135deg, var(--primary), #8b5cf6);
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  color: white; flex-shrink: 0;
}

.sidebar-logo-text { font-weight: 700; font-size: .9rem; letter-spacing: -.02em; }

.sidebar-toggle {
  background: none; border: none; color: var(--text-muted);
  cursor: pointer; padding: .25rem; border-radius: 6px;
  display: none;
}

.sidebar-nav { flex: 1; padding: .75rem .5rem; overflow-y: auto; }

.sidebar-section { margin-bottom: 1.25rem; }

.sidebar-section-title {
  font-size: .7rem; font-weight: 600; letter-spacing: .08em;
  text-transform: uppercase; color: var(--text-faint);
  padding: .25rem .625rem .5rem;
}

.sidebar-item {
  display: flex; align-items: center; gap: .625rem;
  padding: .5rem .75rem; border-radius: 8px;
  text-decoration: none; color: var(--text-muted);
  font-size: .875rem; font-weight: 500;
  transition: all var(--transition);
  position: relative; margin-bottom: 2px;
}

.sidebar-item:hover { background: var(--bg-hover); color: var(--text); }
.sidebar-item.active { background: var(--primary-glow); color: var(--primary); }
.sidebar-item.active .sidebar-icon { color: var(--primary); }

.sidebar-icon { width: 16px; height: 16px; flex-shrink: 0; }

.sidebar-badge {
  margin-left: auto;
  background: var(--danger); color: white;
  font-size: .65rem; font-weight: 700;
  padding: .1rem .35rem; border-radius: 20px;
  min-width: 18px; text-align: center;
}

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

.sidebar-project-name {
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

.sidebar-item-new { color: var(--text-faint); font-style: italic; }
.sidebar-item-new:hover { color: var(--primary); }

.sidebar-footer {
  padding: .75rem 1rem;
  border-top: 1px solid var(--border);
  display: flex; align-items: center; gap: .5rem;
  flex-shrink: 0;
}

.sidebar-user {
  display: flex; align-items: center; gap: .625rem;
  text-decoration: none; color: var(--text); flex: 1; min-width: 0;
  border-radius: 8px; padding: .375rem .5rem;
  transition: background var(--transition);
}
.sidebar-user:hover { background: var(--bg-hover); }

.sidebar-user-avatar {
  width: 32px; height: 32px; border-radius: 50%;
  object-fit: cover; flex-shrink: 0;
  background: linear-gradient(135deg, var(--primary), #8b5cf6);
}

.sidebar-user-initials {
  display: flex; align-items: center; justify-content: center;
  font-size: .7rem; font-weight: 700; color: white;
}

.sidebar-user-info { min-width: 0; }
.sidebar-user-name { font-size: .8rem; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sidebar-user-role { font-size: .7rem; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.sidebar-logout {
  color: var(--text-faint); padding: .375rem;
  border-radius: 6px; transition: all var(--transition);
  flex-shrink: 0;
}
.sidebar-logout:hover { color: var(--danger); background: rgba(239,68,68,.1); }

/* ── Page Header ─────────────────────────────────────────── */
.page-header {
  display: flex; align-items: flex-start; justify-content: space-between;
  margin-bottom: 1.75rem; gap: 1rem; flex-wrap: wrap;
}

.page-title { font-size: 1.5rem; font-weight: 700; letter-spacing: -.03em; }
.page-subtitle { font-size: .875rem; color: var(--text-muted); margin-top: .25rem; }

/* ── Cards ───────────────────────────────────────────────── */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
}

.card-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 1rem;
}

.card-title { font-size: .9rem; font-weight: 600; }

/* ── Buttons ─────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; gap: .4rem;
  padding: .5rem 1rem; border-radius: 8px;
  font-size: .875rem; font-weight: 500; cursor: pointer;
  border: 1px solid transparent;
  text-decoration: none; transition: all var(--transition);
  white-space: nowrap;
}
.btn:active { transform: scale(0.97); }

.btn-primary {
  background: var(--primary); color: white;
  border-color: var(--primary);
}
.btn-primary:hover { background: var(--primary-hover); }

.btn-secondary {
  background: var(--bg-hover); color: var(--text);
  border-color: var(--border);
}
.btn-secondary:hover { border-color: var(--border-light); }

.btn-danger { background: var(--danger); color: white; border-color: var(--danger); }
.btn-danger:hover { background: #dc2626; }

.btn-ghost { background: transparent; color: var(--text-muted); border-color: transparent; }
.btn-ghost:hover { background: var(--bg-hover); color: var(--text); }

.btn-sm { padding: .3rem .7rem; font-size: .8rem; }
.btn-lg { padding: .75rem 1.5rem; font-size: 1rem; }
.btn-icon { padding: .5rem; }

/* ── Forms ───────────────────────────────────────────────── */
.form-group { margin-bottom: 1rem; }
.form-label { display: block; font-size: .8rem; font-weight: 500; color: var(--text-muted); margin-bottom: .375rem; }

.form-control {
  width: 100%; padding: .6rem .875rem;
  background: var(--bg-input); border: 1px solid var(--border);
  border-radius: 8px; color: var(--text); font-size: .875rem;
  font-family: var(--font);
  transition: border-color var(--transition), box-shadow var(--transition);
  outline: none;
}
.form-control:focus { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-glow); }
.form-control::placeholder { color: var(--text-faint); }

select.form-control { cursor: pointer; }
textarea.form-control { resize: vertical; min-height: 80px; }

.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }

/* ── Badges ──────────────────────────────────────────────── */
.badge {
  display: inline-flex; align-items: center; gap: .3rem;
  padding: .2rem .6rem; border-radius: 20px;
  font-size: .72rem; font-weight: 600; white-space: nowrap;
}

.badge-planning    { background: rgba(99,102,241,.15); color: #818cf8; }
.badge-in_progress { background: rgba(59,130,246,.15); color: #60a5fa; }
.badge-in_review   { background: rgba(245,158,11,.15); color: #fbbf24; }
.badge-pending     { background: rgba(139,92,246,.15); color: #a78bfa; }
.badge-completed   { background: rgba(16,185,129,.15); color: #34d399; }
.badge-paused      { background: rgba(107,114,128,.15); color: #9ca3af; }
.badge-cancelled   { background: rgba(239,68,68,.15); color: #f87171; }
.badge-todo        { background: rgba(107,114,128,.15); color: #9ca3af; }
.badge-waiting     { background: rgba(245,158,11,.15); color: #fbbf24; }
.badge-overdue     { background: rgba(239,68,68,.15); color: #f87171; }

.badge-low      { background: rgba(16,185,129,.15); color: #34d399; }
.badge-medium   { background: rgba(245,158,11,.15); color: #fbbf24; }
.badge-high     { background: rgba(249,115,22,.15); color: #fb923c; }
.badge-critical { background: rgba(239,68,68,.15); color: #f87171; }

/* ── Tables ──────────────────────────────────────────────── */
.table-wrapper { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th {
  text-align: left; padding: .625rem 1rem;
  font-size: .75rem; font-weight: 600; letter-spacing: .05em;
  text-transform: uppercase; color: var(--text-faint);
  border-bottom: 1px solid var(--border);
}
td {
  padding: .75rem 1rem; font-size: .875rem;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}
tr:last-child td { border-bottom: none; }
tr:hover td { background: var(--bg-hover); }

/* ── KPI Cards ───────────────────────────────────────────── */
.kpi-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 1rem; margin-bottom: 1.5rem; }

.kpi-card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 1.25rem;
  transition: border-color var(--transition);
}
.kpi-card:hover { border-color: var(--border-light); }

.kpi-label { font-size: .75rem; font-weight: 500; color: var(--text-muted); margin-bottom: .5rem; }
.kpi-value { font-size: 1.75rem; font-weight: 800; letter-spacing: -.04em; }
.kpi-sub { font-size: .75rem; color: var(--text-muted); margin-top: .25rem; }
.kpi-icon { width: 36px; height: 36px; border-radius: 10px; display: flex; align-items: center; justify-content: center; margin-bottom: .75rem; }

/* ── Project Card ────────────────────────────────────────── */
.project-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 1rem; }

.project-card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 1.25rem;
  text-decoration: none; color: var(--text);
  transition: all var(--transition); display: block;
  border-left: 3px solid var(--primary);
}
.project-card:hover { border-color: var(--border-light); transform: translateY(-2px); box-shadow: var(--shadow); }

.project-card-header { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: .75rem; }
.project-card-name { font-size: .95rem; font-weight: 600; margin-bottom: .25rem; }
.project-card-company { font-size: .75rem; color: var(--text-muted); }
.project-card-desc { font-size: .8rem; color: var(--text-muted); margin-bottom: 1rem; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }

.progress-bar { height: 4px; background: var(--border); border-radius: 2px; overflow: hidden; margin-bottom: .5rem; }
.progress-fill { height: 100%; border-radius: 2px; transition: width .5s ease; }

.project-card-footer { display: flex; align-items: center; justify-content: space-between; margin-top: .75rem; }

/* ── Avatar Group ────────────────────────────────────────── */
.avatar-group { display: flex; }
.avatar-group .avatar { width: 26px; height: 26px; border-radius: 50%; border: 2px solid var(--bg-card); margin-left: -6px; font-size: .65rem; font-weight: 700; background: var(--primary); color: white; display: flex; align-items: center; justify-content: center; }
.avatar-group .avatar:first-child { margin-left: 0; }

/* ── Alerts ──────────────────────────────────────────────── */
.alert { padding: .875rem 1rem; border-radius: 8px; font-size: .875rem; margin-bottom: 1rem; border: 1px solid; }
.alert-error   { background: rgba(239,68,68,.1); border-color: rgba(239,68,68,.3); color: #f87171; }
.alert-success { background: rgba(16,185,129,.1); border-color: rgba(16,185,129,.3); color: #34d399; }
.alert-warning { background: rgba(245,158,11,.1); border-color: rgba(245,158,11,.3); color: #fbbf24; }
.alert-info    { background: rgba(59,130,246,.1); border-color: rgba(59,130,246,.3); color: #60a5fa; }

/* ── Modal ───────────────────────────────────────────────── */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,.7);
  display: flex; align-items: center; justify-content: center;
  z-index: 1000; padding: 1rem;
  opacity: 0; pointer-events: none; transition: opacity var(--transition);
}
.modal-overlay.open { opacity: 1; pointer-events: all; }

.modal {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-lg); width: 100%; max-width: 540px;
  max-height: 90vh; overflow-y: auto;
  transform: scale(0.95); transition: transform var(--transition);
}
.modal-overlay.open .modal { transform: scale(1); }

.modal-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 1.25rem 1.5rem; border-bottom: 1px solid var(--border);
}
.modal-title { font-size: 1rem; font-weight: 600; }
.modal-close { background: none; border: none; color: var(--text-muted); cursor: pointer; padding: .25rem; border-radius: 6px; }
.modal-close:hover { color: var(--text); background: var(--bg-hover); }
.modal-body { padding: 1.5rem; }
.modal-footer { padding: 1rem 1.5rem; border-top: 1px solid var(--border); display: flex; justify-content: flex-end; gap: .75rem; }

/* ── Tabs ────────────────────────────────────────────────── */
.tabs { display: flex; gap: .25rem; border-bottom: 1px solid var(--border); margin-bottom: 1.5rem; overflow-x: auto; }
.tab-btn {
  padding: .625rem 1rem; font-size: .875rem; font-weight: 500;
  color: var(--text-muted); background: none; border: none; cursor: pointer;
  border-bottom: 2px solid transparent; margin-bottom: -1px;
  transition: all var(--transition); white-space: nowrap;
}
.tab-btn:hover { color: var(--text); }
.tab-btn.active { color: var(--primary); border-bottom-color: var(--primary); }
.tab-pane { display: none; }
.tab-pane.active { display: block; }

/* ── Kanban ──────────────────────────────────────────────── */
.kanban-board { display: flex; gap: 1rem; overflow-x: auto; padding-bottom: 1rem; }
.kanban-col { min-width: 280px; max-width: 280px; background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-lg); display: flex; flex-direction: column; }
.kanban-col-header { padding: .875rem 1rem; border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; }
.kanban-col-title { font-size: .8rem; font-weight: 600; display: flex; align-items: center; gap: .5rem; }
.kanban-col-count { background: var(--bg-hover); color: var(--text-muted); font-size: .7rem; padding: .1rem .4rem; border-radius: 10px; }
.kanban-col-body { padding: .75rem; flex: 1; min-height: 100px; }
.kanban-card { background: var(--bg); border: 1px solid var(--border); border-radius: 8px; padding: .75rem; margin-bottom: .5rem; cursor: grab; transition: all var(--transition); }
.kanban-card:hover { border-color: var(--border-light); box-shadow: var(--shadow-sm); }
.kanban-card.dragging { opacity: .5; cursor: grabbing; }
.kanban-card-title { font-size: .825rem; font-weight: 500; margin-bottom: .5rem; }
.kanban-card-meta { display: flex; align-items: center; justify-content: space-between; }

/* ── Chat ────────────────────────────────────────────────── */
.chat-layout { display: flex; height: calc(100vh - 120px); gap: 0; border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; }
.chat-sidebar { width: 220px; background: var(--bg-card); border-right: 1px solid var(--border); display: flex; flex-direction: column; flex-shrink: 0; }
.chat-sidebar-title { padding: .875rem 1rem; font-size: .75rem; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; color: var(--text-faint); border-bottom: 1px solid var(--border); }
.chat-channel-list { flex: 1; overflow-y: auto; padding: .5rem; }
.chat-channel-item { display: flex; align-items: center; gap: .5rem; padding: .4rem .625rem; border-radius: 6px; cursor: pointer; font-size: .825rem; color: var(--text-muted); transition: all var(--transition); }
.chat-channel-item:hover { background: var(--bg-hover); color: var(--text); }
.chat-channel-item.active { background: var(--primary-glow); color: var(--primary); }
.chat-main { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.chat-header { padding: .875rem 1.25rem; border-bottom: 1px solid var(--border); display: flex; align-items: center; gap: .75rem; }
.chat-messages { flex: 1; overflow-y: auto; padding: 1rem; display: flex; flex-direction: column; gap: .75rem; }
.chat-msg { display: flex; gap: .75rem; }
.chat-msg-avatar { width: 32px; height: 32px; border-radius: 50%; background: var(--primary); display: flex; align-items: center; justify-content: center; font-size: .7rem; font-weight: 700; color: white; flex-shrink: 0; }
.chat-msg-body { flex: 1; min-width: 0; }
.chat-msg-header { display: flex; align-items: baseline; gap: .5rem; margin-bottom: .2rem; }
.chat-msg-name { font-size: .825rem; font-weight: 600; }
.chat-msg-time { font-size: .7rem; color: var(--text-faint); }
.chat-msg-text { font-size: .875rem; color: var(--text-muted); line-height: 1.5; }
.chat-input-area { padding: 1rem; border-top: 1px solid var(--border); }
.chat-input-box { display: flex; gap: .5rem; }
.chat-input { flex: 1; background: var(--bg-input); border: 1px solid var(--border); border-radius: 8px; padding: .625rem .875rem; color: var(--text); font-size: .875rem; font-family: var(--font); outline: none; resize: none; }
.chat-input:focus { border-color: var(--primary); }

/* ── Auth Pages ──────────────────────────────────────────── */
.auth-page {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  background: radial-gradient(ellipse at 20% 50%, rgba(99,102,241,.15) 0%, transparent 60%),
              radial-gradient(ellipse at 80% 20%, rgba(139,92,246,.1) 0%, transparent 50%),
              var(--bg);
  padding: 1.5rem;
}

.auth-card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 2.5rem;
  width: 100%; max-width: 420px;
  box-shadow: var(--shadow);
}

.auth-logo { text-align: center; margin-bottom: 2rem; }
.auth-logo-icon {
  width: 52px; height: 52px; border-radius: 14px;
  background: linear-gradient(135deg, var(--primary), #8b5cf6);
  display: inline-flex; align-items: center; justify-content: center;
  color: white; margin-bottom: .75rem;
}
.auth-logo-name { font-size: 1.25rem; font-weight: 800; letter-spacing: -.03em; }
.auth-logo-sub { font-size: .8rem; color: var(--text-muted); }

.auth-title { font-size: 1.25rem; font-weight: 700; margin-bottom: .375rem; }
.auth-subtitle { font-size: .875rem; color: var(--text-muted); margin-bottom: 1.75rem; }

.auth-divider { text-align: center; color: var(--text-faint); font-size: .8rem; margin: 1.25rem 0; position: relative; }
.auth-divider::before, .auth-divider::after { content: ''; position: absolute; top: 50%; width: 42%; height: 1px; background: var(--border); }
.auth-divider::before { left: 0; }
.auth-divider::after { right: 0; }

.auth-link { color: var(--primary); text-decoration: none; font-weight: 500; }
.auth-link:hover { text-decoration: underline; }

/* Botões de login social */
.social-login { display: flex; flex-direction: column; gap: .625rem; margin-bottom: 1rem; }

.btn-social {
  display: flex; align-items: center; justify-content: center; gap: .625rem;
  padding: .7rem 1rem; border-radius: var(--radius); font-size: .875rem; font-weight: 600;
  text-decoration: none; border: 1px solid var(--border); transition: all var(--transition);
  cursor: pointer;
}
.btn-social:hover { transform: translateY(-1px); box-shadow: var(--shadow-sm); }

.btn-google {
  background: #fff; color: #1f1f1f; border-color: #dadce0;
}
.btn-google:hover { background: #f8f9fa; }

.btn-apple {
  background: #000; color: #fff; border-color: #333;
}
.btn-apple:hover { background: #1a1a1a; }

/* Alert success */
.alert-success {
  background: rgba(16,185,129,.12); border: 1px solid rgba(16,185,129,.3);
  color: #6ee7b7; padding: .875rem 1rem; border-radius: var(--radius);
  font-size: .875rem; margin-bottom: 1rem;
}

/* ── Utilities ───────────────────────────────────────────── */
.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-1 { gap: .25rem; }
.gap-2 { gap: .5rem; }
.gap-3 { gap: .75rem; }
.gap-4 { gap: 1rem; }
.mt-1 { margin-top: .25rem; }
.mt-2 { margin-top: .5rem; }
.mt-4 { margin-top: 1rem; }
.mb-4 { margin-bottom: 1rem; }
.mb-6 { margin-bottom: 1.5rem; }
.text-sm { font-size: .875rem; }
.text-xs { font-size: .75rem; }
.text-muted { color: var(--text-muted); }
.font-semibold { font-weight: 600; }
.font-bold { font-weight: 700; }
.w-full { width: 100%; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hidden { display: none !important; }

/* ── Responsive ──────────────────────────────────────────── */
@media (max-width: 768px) {
  .sidebar { transform: translateX(-100%); }
  .sidebar.open { transform: translateX(0); }
  .sidebar-toggle { display: flex; }
  .main-content { margin-left: 0; }
  .page-wrapper { padding: 1rem; }
  .kpi-grid { grid-template-columns: repeat(2, 1fr); }
  .project-grid { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .kanban-board { flex-direction: column; }
  .kanban-col { min-width: unset; max-width: unset; }
  .chat-sidebar { display: none; }
  .chat-layout { height: calc(100vh - 80px); }
}

/* ── Scrollbar ───────────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--border-light); }

/* ── Loading ─────────────────────────────────────────────── */
.spinner { width: 20px; height: 20px; border: 2px solid var(--border); border-top-color: var(--primary); border-radius: 50%; animation: spin .6s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Empty State ─────────────────────────────────────────── */
.empty-state { text-align: center; padding: 3rem 1rem; color: var(--text-muted); }
.empty-state-icon { font-size: 2.5rem; margin-bottom: 1rem; opacity: .4; }
.empty-state-title { font-size: 1rem; font-weight: 600; margin-bottom: .375rem; color: var(--text); }
.empty-state-desc { font-size: .875rem; }

/* ── Topbar (mobile) ─────────────────────────────────────── */
.topbar {
  display: none; position: sticky; top: 0; z-index: 50;
  background: var(--bg-card); border-bottom: 1px solid var(--border);
  padding: .875rem 1rem; align-items: center; gap: .75rem;
}
.topbar-menu-btn { background: none; border: none; color: var(--text); cursor: pointer; padding: .25rem; }
@media (max-width: 768px) { .topbar { display: flex; } }

/* ── Timeline ────────────────────────────────────────────── */
.timeline { position: relative; padding-left: 2rem; }
.timeline::before { content: ''; position: absolute; left: .5rem; top: 0; bottom: 0; width: 2px; background: var(--border); }
.timeline-item { position: relative; margin-bottom: 1.25rem; }
.timeline-dot { position: absolute; left: -1.625rem; top: .25rem; width: 10px; height: 10px; border-radius: 50%; background: var(--primary); border: 2px solid var(--bg-card); }
.timeline-content { background: var(--bg-card); border: 1px solid var(--border); border-radius: 8px; padding: .75rem 1rem; }
.timeline-title { font-size: .825rem; font-weight: 500; }
.timeline-time { font-size: .7rem; color: var(--text-faint); margin-top: .2rem; }
