/* ═══════════════════════════════════════════════
   STARTUP HUB — CSS
   Theme: Dark Command Center
   Fonts: Syne + DM Sans + JetBrains Mono
═══════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Syne:wght@400;600;700;800&family=DM+Sans:ital,opsz,wght@0,9..40,300;0,9..40,400;0,9..40,500;0,9..40,600;1,9..40,400&family=JetBrains+Mono:wght@400;500&display=swap');

/* ── VARIABLES ── */
:root {
  --bg:          #080b12;
  --bg2:         #0d1120;
  --bg3:         #121829;
  --card:        #111827;
  --card-hover:  #172035;
  --border:      rgba(255,255,255,0.07);
  --border2:     rgba(255,255,255,0.12);

  --accent:      #00b4d8;
  --accent2:     #0077b6;
  --accent-glow: rgba(0,180,216,0.15);
  --green:       #06d6a0;
  --red:         #ef476f;
  --yellow:      #ffd166;
  --orange:      #f4a261;
  --purple:      #9b72cf;
  --cyan:        #48cae4;

  --text:        #e2e8f0;
  --text2:       #94a3b8;
  --text3:       #4b5a70;
  --muted:       #334155;

  --radius:      10px;
  --radius-lg:   16px;
  --sidebar-w:   240px;

  --font:        'DM Sans', system-ui, sans-serif;
  --font-head:   'Syne', sans-serif;
  --font-mono:   'JetBrains Mono', monospace;

  --shadow:      0 4px 24px rgba(0,0,0,0.4);
  --shadow-sm:   0 2px 8px rgba(0,0,0,0.3);
  --transition:  0.18s ease;
}

/* ── RESET ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 15px; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  background-image:
    radial-gradient(ellipse at 10% 10%, rgba(0,180,216,0.04) 0%, transparent 50%),
    radial-gradient(ellipse at 90% 90%, rgba(155,114,207,0.04) 0%, transparent 50%);
}
a { color: inherit; text-decoration: none; }
button { cursor: pointer; font-family: inherit; }
input, select, textarea { font-family: inherit; }

/* ── LAYOUT SHELL ── */
.app-shell {
  display: flex;
  min-height: 100vh;
}

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

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 20px 20px 16px;
  border-bottom: 1px solid var(--border);
}

.brand-icon {
  width: 34px; height: 34px;
  background: linear-gradient(135deg, var(--accent), var(--purple));
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
  box-shadow: 0 0 16px var(--accent-glow);
}

.brand-name {
  display: block;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--text);
  letter-spacing: 0.01em;
}

.brand-tagline {
  display: block;
  font-size: 0.7rem;
  color: var(--text3);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  font-family: var(--font-mono);
}

.sidebar-nav {
  flex: 1;
  padding: 16px 12px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.nav-section-label {
  font-size: 0.65rem;
  font-family: var(--font-mono);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text3);
  padding: 8px 10px 4px;
  margin-top: 4px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border-radius: 8px;
  color: var(--text2);
  font-size: 0.88rem;
  font-weight: 500;
  transition: all var(--transition);
  position: relative;
  cursor: pointer;
}

.nav-item:hover { background: var(--card-hover); color: var(--text); }

.nav-item.active {
  background: var(--accent-glow);
  color: var(--accent);
  font-weight: 600;
}

.nav-item.active .nav-icon { color: var(--accent); }

.nav-item--dim { opacity: 0.4; cursor: not-allowed; }
.nav-item--dim:hover { background: none; color: var(--text2); }

.nav-icon { font-size: 1rem; width: 18px; text-align: center; }

.nav-badge {
  margin-left: auto;
  background: var(--bg3);
  color: var(--accent);
  border: 1px solid var(--border2);
  border-radius: 20px;
  padding: 1px 7px;
  font-size: 0.68rem;
  font-family: var(--font-mono);
  font-weight: 500;
}

.nav-badge--red { color: var(--red); }

.nav-soon {
  margin-left: auto;
  font-size: 0.62rem;
  font-family: var(--font-mono);
  background: var(--bg3);
  color: var(--text3);
  border-radius: 4px;
  padding: 1px 5px;
}

.sidebar-footer {
  padding: 14px 16px;
  border-top: 1px solid var(--border);
}

.sidebar-stats {
  display: flex;
  align-items: center;
  gap: 12px;
}

.stat-mini { text-align: center; }
.stat-mini-val {
  display: block;
  font-family: var(--font-mono);
  font-size: 1.1rem;
  font-weight: 500;
  color: var(--text);
}
.stat-mini-label {
  font-size: 0.65rem;
  color: var(--text3);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.stat-mini-divider {
  width: 1px;
  height: 24px;
  background: var(--border);
}

/* ── MAIN WRAP ── */
.main-wrap {
  margin-left: var(--sidebar-w);
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

/* ── TOPBAR ── */
.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(8,11,18,0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  padding: 0 24px;
  height: 60px;
  display: flex;
  align-items: center;
  gap: 16px;
}

.topbar-left { display: flex; align-items: center; gap: 12px; }
.topbar-center { flex: 1; max-width: 480px; margin: 0 auto; }
.topbar-right { display: flex; align-items: center; gap: 10px; margin-left: auto; }

.menu-btn {
  display: none;
  flex-direction: column;
  gap: 4px;
  background: none;
  border: none;
  padding: 6px;
  border-radius: 6px;
}
.menu-btn span {
  display: block;
  width: 18px; height: 2px;
  background: var(--text2);
  border-radius: 2px;
}

.page-breadcrumb {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.82rem;
  color: var(--text3);
}
.breadcrumb-home { cursor: pointer; }
.breadcrumb-home:hover { color: var(--text2); }
.breadcrumb-sep { color: var(--text3); }
.breadcrumb-current { color: var(--text); font-weight: 500; }

/* Search Bar */
.search-bar {
  position: relative;
  display: flex;
  align-items: center;
}
.search-icon {
  position: absolute;
  left: 12px;
  color: var(--text3);
  font-size: 1.1rem;
  pointer-events: none;
}
.search-input {
  width: 100%;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 7px 36px 7px 36px;
  color: var(--text);
  font-size: 0.85rem;
  transition: all var(--transition);
}
.search-input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}
.search-kbd {
  position: absolute;
  right: 10px;
  background: var(--bg3);
  border: 1px solid var(--border2);
  border-radius: 4px;
  padding: 1px 5px;
  font-size: 0.65rem;
  font-family: var(--font-mono);
  color: var(--text3);
}

/* Quick Add Button */
.btn-quick-add {
  background: var(--accent);
  color: #000;
  border: none;
  border-radius: 8px;
  padding: 7px 14px;
  font-size: 0.83rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 5px;
  transition: all var(--transition);
  white-space: nowrap;
}
.btn-quick-add:hover {
  background: #00cff0;
  transform: translateY(-1px);
  box-shadow: 0 4px 16px var(--accent-glow);
}

/* ── MAIN CONTENT ── */
.main-content {
  padding: 28px 28px;
  flex: 1;
  max-width: 1400px;
  width: 100%;
}

/* ── FLASH ── */
.flash {
  margin: 0 28px;
  padding: 10px 16px;
  border-radius: 8px;
  font-size: 0.87rem;
  display: flex;
  align-items: center;
  gap: 8px;
  animation: slideDown 0.3s ease;
}
.flash--success {
  background: rgba(6,214,160,0.12);
  border: 1px solid rgba(6,214,160,0.3);
  color: var(--green);
}
.flash button {
  margin-left: auto;
  background: none;
  border: none;
  color: inherit;
  opacity: 0.6;
  font-size: 1.1rem;
}
@keyframes slideDown { from { opacity:0; transform:translateY(-8px); } to { opacity:1; transform:none; } }

/* ── BUTTONS ── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 500;
  border: 1px solid transparent;
  transition: all var(--transition);
  cursor: pointer;
}
.btn--primary {
  background: var(--accent);
  color: #000;
  font-weight: 600;
}
.btn--primary:hover {
  background: #00cff0;
  transform: translateY(-1px);
  box-shadow: 0 4px 16px var(--accent-glow);
}
.btn--ghost {
  background: transparent;
  border-color: var(--border2);
  color: var(--text2);
}
.btn--ghost:hover { background: var(--card-hover); color: var(--text); border-color: var(--border2); }
.btn--danger {
  background: rgba(239,71,111,0.1);
  border-color: rgba(239,71,111,0.3);
  color: var(--red);
}
.btn--danger:hover { background: rgba(239,71,111,0.2); }
.btn--sm { padding: 5px 10px; font-size: 0.78rem; }
.btn--full { width: 100%; justify-content: center; }

/* Icon buttons */
.icon-btn {
  width: 30px; height: 30px;
  display: inline-flex; align-items: center; justify-content: center;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text3);
  font-size: 0.9rem;
  transition: all var(--transition);
}
.icon-btn:hover { background: var(--card-hover); color: var(--text); border-color: var(--border2); }
.icon-btn--danger:hover { background: rgba(239,71,111,0.12); color: var(--red); border-color: rgba(239,71,111,0.3); }

/* ── PAGE HEADER ── */
.page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 24px;
  gap: 16px;
  flex-wrap: wrap;
}
.page-header-left { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.page-title {
  font-family: var(--font-head);
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.01em;
}
.page-subtitle {
  font-size: 0.82rem;
  color: var(--text3);
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 2px 9px;
  font-family: var(--font-mono);
}
.page-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.back-link { color: var(--text3); font-size: 0.85rem; }
.back-link:hover { color: var(--accent); }

/* ── FILTER BAR ── */
.filter-bar { margin-bottom: 20px; }
.filter-form {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}
.filter-input, .filter-select {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 7px 12px;
  color: var(--text);
  font-size: 0.83rem;
  transition: border-color var(--transition);
}
.filter-input { min-width: 200px; }
.filter-input:focus, .filter-select:focus {
  outline: none;
  border-color: var(--accent);
}
.filter-select { cursor: pointer; }
.filter-select option { background: var(--bg2); }

/* ── STAT CARDS ── */
.stat-cards {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 28px;
}
.stat-cards--sm { grid-template-columns: repeat(4, 1fr); }

.stat-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 18px 20px;
  display: flex;
  align-items: center;
  gap: 14px;
  transition: all var(--transition);
  position: relative;
  overflow: hidden;
}
.stat-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--accent), transparent);
  opacity: 0;
  transition: opacity var(--transition);
}
.stat-card:hover::before { opacity: 1; }
.stat-card:hover { border-color: var(--border2); transform: translateY(-2px); }

.stat-card--alert { border-color: rgba(239,71,111,0.25); }
.stat-card--alert-soft { border-color: rgba(239,71,111,0.15); }
.stat-card--sm { gap: 10px; padding: 14px 16px; }

.stat-card-icon { font-size: 1.4rem; }
.stat-card-data { flex: 1; }
.stat-card-number {
  font-family: var(--font-mono);
  font-size: 1.8rem;
  font-weight: 500;
  color: var(--text);
  line-height: 1;
}
.stat-card-label { font-size: 0.78rem; color: var(--text3); margin-top: 3px; }
.stat-card-sub {
  font-size: 0.72rem;
  color: var(--text3);
  font-family: var(--font-mono);
  background: var(--bg3);
  border-radius: 4px;
  padding: 2px 6px;
  white-space: nowrap;
}

/* ── DASHBOARD GRID ── */
.dash-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

/* ── PANELS ── */
.dash-panel {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  transition: border-color var(--transition);
}
.dash-panel:hover { border-color: var(--border2); }
.dash-panel--alert { border-color: rgba(239,71,111,0.2); }

.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}
.panel-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-head);
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text);
}
.panel-title-alert { color: var(--red); }
.panel-count {
  background: var(--bg3);
  border: 1px solid var(--border);
  color: var(--text3);
  border-radius: 20px;
  padding: 1px 7px;
  font-size: 0.7rem;
  font-family: var(--font-mono);
}
.panel-count--red { color: var(--red); border-color: rgba(239,71,111,0.3); }
.panel-action {
  font-size: 0.78rem;
  color: var(--accent);
  padding: 4px 10px;
  border: 1px solid rgba(0,180,216,0.2);
  border-radius: 6px;
  transition: all var(--transition);
}
.panel-action:hover { background: var(--accent-glow); }

/* ── TASK LIST ── */
.task-list { list-style: none; display: flex; flex-direction: column; gap: 3px; }

.task-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 7px;
  transition: background var(--transition);
}
.task-item:hover { background: var(--card-hover); }
.task-item--done .task-title { text-decoration: line-through; color: var(--text3); }

.task-check {
  width: 18px; height: 18px;
  border: 1.5px solid var(--border2);
  border-radius: 5px;
  background: transparent;
  color: var(--green);
  font-size: 0.65rem;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  transition: all var(--transition);
}
.task-check:hover { border-color: var(--accent); }
.task-check--done { background: var(--green); border-color: var(--green); color: #000; }

.task-info {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  flex-wrap: wrap;
}
.task-title {
  font-size: 0.87rem;
  color: var(--text);
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.task-project {
  font-size: 0.72rem;
  color: var(--accent);
  background: var(--accent-glow);
  border-radius: 4px;
  padding: 1px 6px;
  white-space: nowrap;
  border: 1px solid rgba(0,180,216,0.15);
}
.task-edit {
  color: var(--text3);
  font-size: 0.85rem;
  padding: 3px 6px;
  border-radius: 4px;
  opacity: 0;
  transition: all var(--transition);
  flex-shrink: 0;
}
.task-item:hover .task-edit { opacity: 1; color: var(--text2); }
.task-more a { font-size: 0.78rem; color: var(--accent); padding: 6px 10px; display: block; }

/* ── PRIORITY / SEVERITY DOTS ── */
.priority-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
  display: inline-block;
}
.severity-dot {
  width: 9px; height: 9px;
  border-radius: 2px;
  flex-shrink: 0;
  display: inline-block;
}
.severity-dot--critical { background: var(--red); }
.severity-dot--high     { background: var(--orange); }
.severity-dot--medium   { background: var(--yellow); }
.severity-dot--low      { background: var(--text3); }

/* ── BADGES ── */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 20px;
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  white-space: nowrap;
}
.badge--gray   { background: rgba(148,163,184,0.1); color: var(--text2); border: 1px solid var(--border); }
.badge--blue   { background: rgba(0,180,216,0.12); color: var(--accent); border: 1px solid rgba(0,180,216,0.2); }
.badge--green  { background: rgba(6,214,160,0.12); color: var(--green); border: 1px solid rgba(6,214,160,0.2); }
.badge--red    { background: rgba(239,71,111,0.12); color: var(--red); border: 1px solid rgba(239,71,111,0.2); }
.badge--yellow { background: rgba(255,209,102,0.1); color: var(--yellow); border: 1px solid rgba(255,209,102,0.2); }
.badge--orange { background: rgba(244,162,97,0.1); color: var(--orange); border: 1px solid rgba(244,162,97,0.2); }
.badge--purple { background: rgba(155,114,207,0.12); color: var(--purple); border: 1px solid rgba(155,114,207,0.2); }
.badge--cyan   { background: rgba(72,202,228,0.1); color: var(--cyan); border: 1px solid rgba(72,202,228,0.2); }
.badge--type   { background: var(--bg3); color: var(--text3); border: 1px solid var(--border); font-family: var(--font-mono); font-size: 0.65rem; }

.severity-badge {
  padding: 3px 10px;
  border-radius: 6px;
  font-size: 0.72rem;
  font-weight: 600;
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.severity-badge--critical { background: rgba(239,71,111,0.15); color: var(--red); border: 1px solid rgba(239,71,111,0.3); }
.severity-badge--high     { background: rgba(244,162,97,0.15);  color: var(--orange); border: 1px solid rgba(244,162,97,0.3); }
.severity-badge--medium   { background: rgba(255,209,102,0.1);  color: var(--yellow); border: 1px solid rgba(255,209,102,0.2); }
.severity-badge--low      { background: rgba(148,163,184,0.1);  color: var(--text2); border: 1px solid var(--border); }

/* ── DAYS LEFT ── */
.days-left {
  font-size: 0.7rem;
  font-family: var(--font-mono);
  color: var(--text3);
  white-space: nowrap;
  background: var(--bg3);
  border-radius: 4px;
  padding: 1px 6px;
}
.days-left--over { color: var(--red); background: rgba(239,71,111,0.08); }
.days-left--today { color: var(--yellow); background: rgba(255,209,102,0.08); }

/* ── PROGRESS BAR ── */
.progress-bar {
  height: 5px;
  background: var(--bg3);
  border-radius: 99px;
  overflow: hidden;
  flex: 1;
}
.progress-bar--lg { height: 8px; }
.progress-bar--sm { height: 4px; min-width: 60px; }
.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--green));
  border-radius: 99px;
  transition: width 0.6s ease;
}
.progress-pct {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text3);
  white-space: nowrap;
}

/* ── PROJECT CARDS (Dashboard mini) ── */
.project-cards { display: flex; flex-direction: column; gap: 8px; }

.project-card-mini {
  display: block;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 12px;
  transition: all var(--transition);
}
.project-card-mini:hover { border-color: var(--accent); transform: translateX(2px); }

.pcm-top { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.pcm-name { flex: 1; font-size: 0.87rem; font-weight: 500; color: var(--text); min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pcm-progress { display: flex; align-items: center; gap: 8px; }
.pcm-due { margin-top: 4px; }

.see-all {
  display: block;
  text-align: center;
  padding: 8px;
  font-size: 0.78rem;
  color: var(--text3);
  border: 1px dashed var(--border);
  border-radius: 7px;
  margin-top: 8px;
  transition: all var(--transition);
}
.see-all:hover { color: var(--accent); border-color: rgba(0,180,216,0.3); }

/* ── PROJECT GRID (Projects page) ── */
.project-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 16px;
}

.project-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 18px;
  transition: all var(--transition);
  position: relative;
}
.project-card:hover { border-color: var(--border2); transform: translateY(-2px); box-shadow: var(--shadow-sm); }

.project-card-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; margin-bottom: 8px; }
.project-card-title-row { display: flex; align-items: center; gap: 6px; flex: 1; min-width: 0; flex-wrap: wrap; }
.project-card-name {
  font-family: var(--font-head);
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
  transition: color var(--transition);
}
.project-card-name:hover { color: var(--accent); }
.project-card-actions { display: flex; gap: 4px; opacity: 0; transition: opacity var(--transition); flex-shrink: 0; }
.project-card:hover .project-card-actions { opacity: 1; }

.project-card-desc { font-size: 0.82rem; color: var(--text3); margin-bottom: 12px; line-height: 1.5; }
.project-card-progress { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.project-card-meta { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }

/* ── TAGS ── */
.tag {
  background: var(--bg3);
  border: 1px solid var(--border);
  color: var(--text3);
  border-radius: 4px;
  padding: 1px 7px;
  font-size: 0.7rem;
  font-family: var(--font-mono);
}
.tag-cloud { display: flex; flex-wrap: wrap; gap: 6px; }

/* ── META CHIPS ── */
.meta-chip {
  font-size: 0.72rem;
  color: var(--text3);
  background: var(--bg3);
  border-radius: 4px;
  padding: 1px 7px;
}
.meta-time { font-size: 0.72rem; color: var(--text3); font-family: var(--font-mono); }

/* ── ACTIVITY LIST ── */
.activity-list { list-style: none; display: flex; flex-direction: column; gap: 4px; }
.activity-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 7px 10px;
  border-radius: 7px;
  transition: background var(--transition);
}
.activity-item:hover { background: var(--card-hover); }
.activity-dot {
  width: 8px; height: 8px; border-radius: 50%;
  flex-shrink: 0;
  margin-top: 5px;
  background: var(--text3);
}
.activity-dot--project { background: var(--accent); }
.activity-dot--task    { background: var(--purple); }
.activity-dot--issue   { background: var(--red); }
.activity-body { flex: 1; min-width: 0; }
.activity-note { display: block; font-size: 0.84rem; color: var(--text2); }
.activity-time { font-size: 0.7rem; color: var(--text3); font-family: var(--font-mono); }

/* ── TASK TABLE ── */
.task-table-wrap { overflow-x: auto; border-radius: var(--radius-lg); border: 1px solid var(--border); }
.task-table { width: 100%; border-collapse: collapse; }
.task-table thead th {
  background: var(--bg2);
  padding: 11px 14px;
  text-align: left;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text3);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-family: var(--font-mono);
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
.task-table tbody tr {
  border-bottom: 1px solid var(--border);
  transition: background var(--transition);
}
.task-table tbody tr:last-child { border-bottom: none; }
.task-table tbody tr:hover { background: var(--card-hover); }
.task-table tbody td { padding: 10px 14px; font-size: 0.85rem; vertical-align: middle; }
.task-table .row--done td { opacity: 0.5; }
.task-table .row--overdue { border-left: 2px solid var(--red); }

.table-task-title { display: block; font-weight: 500; color: var(--text); }
.table-task-note { display: block; font-size: 0.72rem; color: var(--text3); margin-top: 2px; }
.table-project-link { color: var(--accent); font-size: 0.82rem; }
.table-project-link:hover { text-decoration: underline; }
.table-actions { display: flex; gap: 4px; align-items: center; }

/* ── ISSUES LIST ── */
.issues-list { display: flex; flex-direction: column; gap: 10px; }
.issue-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-left: 3px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
  display: flex;
  align-items: flex-start;
  gap: 14px;
  transition: all var(--transition);
}
.issue-card:hover { border-color: var(--border2); transform: translateX(2px); }
.issue-card--critical { border-left-color: var(--red); }
.issue-card--high     { border-left-color: var(--orange); }
.issue-card--medium   { border-left-color: var(--yellow); }
.issue-card--low      { border-left-color: var(--text3); }

.issue-card-left { flex-shrink: 0; padding-top: 2px; }
.issue-card-body { flex: 1; min-width: 0; }
.issue-card-title { font-weight: 500; color: var(--text); margin-bottom: 4px; }
.issue-card-desc { font-size: 0.81rem; color: var(--text3); margin-bottom: 8px; line-height: 1.4; }
.issue-card-meta { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.issue-card-actions { display: flex; gap: 6px; align-items: center; flex-shrink: 0; }

/* ── FORMS ── */
.form-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
  max-width: 800px;
}
.form-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}
.form-group { display: flex; flex-direction: column; gap: 6px; }
.form-group--span2 { grid-column: 1 / -1; }
.form-label { font-size: 0.8rem; font-weight: 600; color: var(--text2); letter-spacing: 0.03em; }
.required { color: var(--red); }
.form-hint { color: var(--text3); font-weight: 400; }

.form-control {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 9px 12px;
  color: var(--text);
  font-size: 0.87rem;
  transition: border-color var(--transition), box-shadow var(--transition);
  width: 100%;
}
.form-control:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}
.form-control--lg { font-size: 1rem; padding: 11px 14px; }
textarea.form-control { resize: vertical; min-height: 80px; line-height: 1.5; }
select.form-control { cursor: pointer; }
select.form-control option { background: var(--bg2); }

.range-group { display: flex; align-items: center; gap: 12px; }
.range-input {
  flex: 1;
  -webkit-appearance: none;
  height: 5px;
  background: var(--bg3);
  border-radius: 99px;
  outline: none;
  border: none;
}
.range-input::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 16px; height: 16px;
  border-radius: 50%;
  background: var(--accent);
  cursor: pointer;
  box-shadow: 0 0 8px var(--accent-glow);
}
.range-val {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--accent);
  min-width: 36px;
  text-align: right;
}
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}

/* ── DETAIL VIEW ── */
.detail-grid {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 20px;
  align-items: start;
}
.detail-main { display: flex; flex-direction: column; gap: 16px; }
.detail-sidebar { display: flex; flex-direction: column; gap: 12px; }
.detail-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 18px;
}
.detail-card--danger { border-color: rgba(239,71,111,0.2); }
.detail-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}
.detail-card-header h3 {
  font-family: var(--font-head);
  font-size: 0.95rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
}
.detail-progress-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text2);
}
.detail-pct {
  font-family: var(--font-mono);
  font-size: 1.2rem;
  color: var(--accent);
}
.detail-task-counts {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-top: 8px;
  font-size: 0.78rem;
  color: var(--text3);
}
.dot-sep { color: var(--text3); }

.detail-meta-title {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text3);
  margin-bottom: 12px;
  font-family: var(--font-mono);
}
.meta-list { display: grid; grid-template-columns: auto 1fr; gap: 6px 12px; }
.meta-list dt { font-size: 0.78rem; color: var(--text3); }
.meta-list dd { font-size: 0.83rem; color: var(--text); display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }

.detail-notes { font-size: 0.84rem; color: var(--text2); line-height: 1.6; }
.link-list { list-style: none; display: flex; flex-direction: column; gap: 6px; }
.link-list a { font-size: 0.8rem; color: var(--accent); word-break: break-all; }
.link-list a:hover { text-decoration: underline; }

/* ── ALERTS ── */
.alert { padding: 12px 16px; border-radius: 8px; margin-bottom: 16px; font-size: 0.85rem; }
.alert--error { background: rgba(239,71,111,0.1); border: 1px solid rgba(239,71,111,0.3); color: var(--red); }

/* ── EMPTY STATES ── */
.empty-state {
  text-align: center;
  padding: 24px;
  color: var(--text3);
  font-size: 0.85rem;
}
.empty-icon { font-size: 1.5rem; margin-bottom: 6px; }
.empty-page {
  text-align: center;
  padding: 64px 24px;
  color: var(--text3);
}
.empty-page-icon { font-size: 3rem; margin-bottom: 16px; opacity: 0.3; }
.empty-page h3 { font-family: var(--font-head); font-size: 1.2rem; color: var(--text2); margin-bottom: 8px; }
.empty-page p { font-size: 0.87rem; margin-bottom: 20px; }

/* ── SEARCH RESULTS ── */
.search-section { margin-bottom: 28px; }
.search-section-title {
  font-family: var(--font-head);
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text2);
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.search-results { display: flex; flex-direction: column; gap: 6px; }
.search-result-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 12px 16px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 8px;
  transition: all var(--transition);
}
.search-result-item:hover { border-color: var(--accent); transform: translateX(2px); }
.sr-title { font-weight: 500; color: var(--text); }
.sr-meta { display: flex; gap: 8px; align-items: center; }

/* ── MODAL ── */
.modal-overlay {
  display: none;
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.7);
  z-index: 200;
  backdrop-filter: blur(3px);
}
.modal {
  display: none;
  position: fixed;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%) scale(0.95);
  z-index: 201;
  background: var(--bg2);
  border: 1px solid var(--border2);
  border-radius: var(--radius-lg);
  width: 480px;
  max-width: calc(100vw - 32px);
  box-shadow: var(--shadow);
  transition: transform 0.2s ease, opacity 0.2s ease;
  opacity: 0;
}
.modal.open, .modal-overlay.open {
  display: block;
}
.modal.open {
  transform: translate(-50%, -50%) scale(1);
  opacity: 1;
}
.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px;
  border-bottom: 1px solid var(--border);
}
.modal-title { font-family: var(--font-head); font-size: 1rem; font-weight: 600; }
.modal-close {
  background: none;
  border: none;
  color: var(--text3);
  font-size: 1.2rem;
  width: 28px; height: 28px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 6px;
  transition: all var(--transition);
}
.modal-close:hover { background: var(--card-hover); color: var(--text); }
.modal-body { padding: 18px 20px; }
.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 14px;
}

/* ── MOBILE OVERLAY ── */
.sidebar-overlay {
  display: none;
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.6);
  z-index: 99;
}

/* ── RESPONSIVE ── */
@media (max-width: 1100px) {
  .stat-cards { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 900px) {
  :root { --sidebar-w: 220px; }
  .dash-grid { grid-template-columns: 1fr; }
  .detail-grid { grid-template-columns: 1fr; }
}

@media (max-width: 700px) {
  .sidebar {
    transform: translateX(-100%);
  }
  .sidebar.open {
    transform: translateX(0);
    box-shadow: var(--shadow);
  }
  .sidebar-overlay.open { display: block; }
  .main-wrap { margin-left: 0; }
  .menu-btn { display: flex; }
  .topbar { padding: 0 14px; }
  .topbar-center { display: none; }
  .main-content { padding: 18px 14px; }
  .stat-cards { grid-template-columns: 1fr 1fr; }
  .project-grid { grid-template-columns: 1fr; }
  .form-grid-2 { grid-template-columns: 1fr; }
  .form-group--span2 { grid-column: auto; }
  .form-card { padding: 18px; }
  .page-header { flex-direction: column; align-items: flex-start; }
}

/* ── UTILS ── */
.text-muted { color: var(--text3); }

/* ═══════════════════════════════════════
   PHASE 2 — ADDITIONS
═══════════════════════════════════════ */

/* ── LIGHT MODE ── */
[data-theme="light"] {
  --bg:          #f8fafc;
  --bg2:         #f1f5f9;
  --bg3:         #e8eef5;
  --card:        #ffffff;
  --card-hover:  #f1f5f9;
  --border:      rgba(0,0,0,0.08);
  --border2:     rgba(0,0,0,0.14);

  --text:        #0f172a;
  --text2:       #475569;
  --text3:       #94a3b8;
  --muted:       #cbd5e1;
  --accent-glow: rgba(0,119,182,0.1);

  --shadow:      0 4px 24px rgba(0,0,0,0.1);
  --shadow-sm:   0 2px 8px rgba(0,0,0,0.07);
}

[data-theme="light"] body {
  background-image:
    radial-gradient(ellipse at 10% 10%, rgba(0,180,216,0.03) 0%, transparent 50%),
    radial-gradient(ellipse at 90% 90%, rgba(155,114,207,0.03) 0%, transparent 50%);
}

[data-theme="light"] .topbar {
  background: rgba(248,250,252,0.9);
}

[data-theme="light"] .search-input,
[data-theme="light"] .filter-input,
[data-theme="light"] .filter-select,
[data-theme="light"] .form-control {
  background: #fff;
  color: var(--text);
}

[data-theme="light"] .task-table thead th { background: #f1f5f9; }
[data-theme="light"] .brand-icon { box-shadow: 0 0 16px rgba(0,180,216,0.2); }

/* ── THEME TOGGLE BUTTON ── */
.theme-toggle {
  width: 34px; height: 34px;
  display: flex; align-items: center; justify-content: center;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text2);
  font-size: 1rem;
  transition: all var(--transition);
  cursor: pointer;
}
.theme-toggle:hover {
  background: var(--card-hover);
  border-color: var(--border2);
  color: var(--text);
}

/* ── LEARNING GRID ── */
.learning-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 16px;
}

.learning-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-top: 3px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 18px;
  transition: all var(--transition);
}
.learning-card:hover { border-color: var(--border2); transform: translateY(-2px); box-shadow: var(--shadow-sm); }
.learning-card--in_progress { border-top-color: var(--accent); }
.learning-card--completed   { border-top-color: var(--green); }
.learning-card--paused      { border-top-color: var(--yellow); }
.learning-card--not_started { border-top-color: var(--muted); }

.learning-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
}
.learning-card-title-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  min-width: 0;
}
.learning-type-icon { font-size: 1.1rem; flex-shrink: 0; }
.learning-card-name {
  font-family: var(--font-head);
  font-size: 0.97rem;
  font-weight: 600;
  color: var(--text);
  min-width: 0;
  word-break: break-word;
}
.learning-card-actions { display: flex; gap: 4px; opacity: 0; transition: opacity var(--transition); flex-shrink: 0; }
.learning-card:hover .learning-card-actions { opacity: 1; }
.learning-card-badges { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 10px; }
.learning-progress { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.progress-fill--learning { background: linear-gradient(90deg, var(--purple), var(--accent)); }
.learning-card-meta { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-bottom: 8px; }
.meta-chip--link { color: var(--accent); border: 1px solid rgba(0,180,216,0.2); }
.meta-chip--link:hover { background: var(--accent-glow); }
.learning-card-notes { font-size: 0.79rem; color: var(--text3); line-height: 1.5; margin-top: 6px; }

/* ── REPORTS ── */
.report-grid-2 {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 18px;
  margin-bottom: 18px;
}
.report-grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin-bottom: 18px;
}
.report-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  transition: border-color var(--transition);
}
.report-card:hover { border-color: var(--border2); }
.report-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}
.report-card-title {
  font-family: var(--font-head);
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text2);
}
.chart-wrap { position: relative; height: 260px; }
.chart-wrap--sm { height: 200px; }

.report-table-wrap { overflow-x: auto; }
.report-table { width: 100%; border-collapse: collapse; }
.report-table thead th {
  padding: 8px 12px;
  text-align: left;
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text3);
  font-family: var(--font-mono);
  border-bottom: 1px solid var(--border);
}
.report-table tbody tr { border-bottom: 1px solid var(--border); transition: background var(--transition); }
.report-table tbody tr:last-child { border-bottom: none; }
.report-table tbody tr:hover { background: var(--card-hover); }
.report-table tbody td { padding: 10px 12px; font-size: 0.85rem; vertical-align: middle; }
.report-project-name { font-weight: 500; color: var(--text); }

/* ── RESPONSIVE PHASE 2 ── */
@media (max-width: 900px) {
  .report-grid-2 { grid-template-columns: 1fr; }
  .report-grid-3 { grid-template-columns: 1fr; }
}
@media (max-width: 700px) {
  .learning-grid { grid-template-columns: 1fr; }
}
