/* ============================================================
   TECHFOD TASK SYSTEM — Main Stylesheet
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&family=Manrope:wght@400;500;600;700&display=swap');

/* ── CSS Variables ── */
:root {
  --font-main: 'Plus Jakarta Sans', sans-serif;
  --font-alt: 'Manrope', sans-serif;

  --sidebar-w: 256px;
  --sidebar-w-collapsed: 72px;
  --topbar-h: 64px;

  --primary: #6366f1;
  --primary-light: #818cf8;
  --primary-dark: #4f46e5;
  --indigo: #6366f1;
  --purple: #8b5cf6;
  --teal: #14b8a6;
  --cyan: #06b6d4;
  --success: #10b981;
  --warning: #f59e0b;
  --danger: #ef4444;
  --info: #06b6d4;

  --bg: #f1f5f9;
  --surface: #ffffff;
  --surface-2: #f8fafc;
  --border: #e2e8f0;
  --border-light: #f1f5f9;

  --text: #0f172a;
  --text-secondary: #64748b;
  --text-muted: #94a3b8;

  --sidebar-bg: #0f172a;
  --sidebar-text: #cbd5e1;
  --sidebar-active: #6366f1;
  --sidebar-hover: rgba(255,255,255,0.07);

  --shadow-sm: 0 1px 3px rgba(0,0,0,0.07), 0 1px 2px rgba(0,0,0,0.04);
  --shadow: 0 4px 16px rgba(0,0,0,0.08), 0 2px 6px rgba(0,0,0,0.04);
  --shadow-lg: 0 12px 40px rgba(0,0,0,0.12), 0 4px 16px rgba(0,0,0,0.06);
  --radius: 12px;
  --radius-sm: 8px;
  --radius-lg: 16px;
  --radius-xl: 20px;

  --transition: 0.2s cubic-bezier(.4,0,.2,1);
}

[data-bs-theme="dark"] {
  --bg: #0d1117;
  --surface: #161b22;
  --surface-2: #1c2128;
  --border: #30363d;
  --border-light: #21262d;
  --text: #e6edf3;
  --text-secondary: #8b949e;
  --text-muted: #6e7681;
  --sidebar-bg: #0d1117;
}

/* ── Reset & Base ── */
*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-main);
  font-size: 0.9rem;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--primary-dark); }

.fw-600 { font-weight: 600; }
.flex-1 { flex: 1; }

/* ============================================================
   LAYOUT
   ============================================================ */
.sidebar {
  position: fixed;
  top: 0; left: 0; bottom: 0;
  width: var(--sidebar-w);
  background: var(--sidebar-bg);
  display: flex;
  flex-direction: column;
  z-index: 1040;
  transition: width var(--transition);
  overflow: hidden;
}

.sidebar.collapsed { width: var(--sidebar-w-collapsed); }

.main-wrapper {
  margin-left: var(--sidebar-w);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  transition: margin-left var(--transition);
}
.main-wrapper.sidebar-collapsed { margin-left: var(--sidebar-w-collapsed); }

/* ── Sidebar Header ── */
.sidebar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 16px 16px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  flex-shrink: 0;
}

.sidebar-brand { display: flex; align-items: center; gap: 10px; overflow: hidden; }

.brand-icon {
  width: 38px; height: 38px;
  background: linear-gradient(135deg, var(--primary), var(--purple));
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  color: white; font-size: 1.1rem;
  flex-shrink: 0;
}

.brand-text { overflow: hidden; white-space: nowrap; }
.brand-name { display: block; font-weight: 700; font-size: 1rem; color: #fff; letter-spacing: -0.3px; }
.brand-sub  { display: block; font-size: 0.7rem; color: var(--sidebar-text); opacity: 0.7; }

.sidebar-toggle {
  color: var(--sidebar-text) !important;
  padding: 4px; border: none;
  transition: transform var(--transition);
}
.sidebar.collapsed .sidebar-toggle { transform: rotate(180deg); }

/* ── Sidebar User ── */
.sidebar-user {
  display: flex; align-items: center; gap: 10px;
  padding: 14px 16px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  flex-shrink: 0;
  overflow: hidden;
}
.user-info { overflow: hidden; white-space: nowrap; }
.user-name { font-size: 0.82rem; font-weight: 600; color: #fff; }
.user-role { font-size: 0.72rem; color: var(--sidebar-text); opacity: 0.7; }

/* ── Sidebar Nav ── */
.sidebar-nav { flex: 1; overflow-y: auto; overflow-x: hidden; padding: 12px 10px; }
.sidebar-nav::-webkit-scrollbar { width: 4px; }
.sidebar-nav::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 2px; }

.nav-section { margin-bottom: 6px; }
.nav-label {
  display: block; font-size: 0.65rem; font-weight: 700;
  letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--sidebar-text); opacity: 0.4;
  padding: 10px 8px 4px;
  white-space: nowrap; overflow: hidden;
  transition: opacity var(--transition);
}
.sidebar.collapsed .nav-label { opacity: 0; }

.nav-item {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 10px;
  border-radius: 8px;
  color: var(--sidebar-text);
  font-size: 0.85rem; font-weight: 500;
  transition: all var(--transition);
  white-space: nowrap; overflow: hidden;
  margin-bottom: 2px;
  position: relative;
}
.nav-item i { font-size: 1.05rem; flex-shrink: 0; min-width: 20px; text-align: center; }
.nav-item:hover { background: var(--sidebar-hover); color: #fff; text-decoration: none; }
.nav-item.active { background: rgba(99,102,241,0.2); color: var(--primary-light); }
.nav-item.active::before {
  content: ''; position: absolute; left: 0; top: 20%; bottom: 20%;
  width: 3px; background: var(--primary); border-radius: 0 3px 3px 0;
}
.nav-item-danger:hover { background: rgba(239,68,68,0.15); color: #fca5a5; }

.nav-badge {
  margin-left: auto;
  background: var(--danger); color: #fff;
  font-size: 0.65rem; font-weight: 700;
  min-width: 18px; height: 18px;
  border-radius: 9px;
  display: flex; align-items: center; justify-content: center;
  padding: 0 5px;
  flex-shrink: 0;
}
.sidebar.collapsed .nav-badge { display: none; }
.sidebar.collapsed .nav-item span:not(i) { display: none; }

/* ── Topbar ── */
.topbar {
  position: sticky; top: 0; z-index: 100;
  height: var(--topbar-h);
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center;
  padding: 0 24px;
  gap: 16px;
  box-shadow: var(--shadow-sm);
}

.topbar-left { display: flex; align-items: center; gap: 12px; flex: 1; }
.topbar-right { display: flex; align-items: center; gap: 8px; }

.topbar-search {
  display: flex; align-items: center; gap: 8px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 7px 14px;
  min-width: 260px;
}
.topbar-search i { color: var(--text-muted); font-size: 0.85rem; }
.topbar-search input {
  background: none; border: none; outline: none;
  font-size: 0.84rem; color: var(--text);
  width: 100%;
}
.topbar-search input::placeholder { color: var(--text-muted); }

.btn-icon {
  width: 38px; height: 38px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-secondary);
  font-size: 1rem;
  transition: all var(--transition);
  cursor: pointer;
}
.btn-icon:hover { background: var(--bg); color: var(--primary); border-color: var(--primary); }

.topbar-user {
  display: flex; align-items: center; gap: 8px;
  padding: 4px 12px 4px 4px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: none;
  cursor: pointer;
  font-size: 0.84rem; font-weight: 600;
  color: var(--text);
  transition: all var(--transition);
}
.topbar-user:hover { background: var(--bg); border-color: var(--primary); }
.topbar-user .bi-chevron-down { font-size: 0.7rem; color: var(--text-muted); }

/* ── Notifications Dropdown ── */
.notif-dropdown {
  width: 340px; padding: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}

.notif-dot {
  position: absolute; top: 4px; right: 4px;
  min-width: 16px; height: 16px;
  background: var(--danger); color: #fff;
  font-size: 0.6rem; font-weight: 700;
  border-radius: 8px; padding: 0 4px;
  display: flex; align-items: center; justify-content: center;
  border: 2px solid var(--surface);
}

.notif-header {
  display: flex; justify-content: space-between; align-items: center;
  padding: 14px 16px;
  font-weight: 700; font-size: 0.88rem;
  border-bottom: 1px solid var(--border);
  background: var(--surface-2);
}
.mark-all-read { font-size: 0.78rem; color: var(--primary); font-weight: 500; }

.notif-list { max-height: 320px; overflow-y: auto; }

.notif-item {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-light);
  transition: background var(--transition);
  color: var(--text);
}
.notif-item:hover { background: var(--bg); text-decoration: none; color: var(--text); }
.notif-item.unread { background: rgba(99,102,241,0.04); }

.notif-icon {
  width: 36px; height: 36px;
  background: var(--primary);
  color: #fff; border-radius: 9px;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.85rem; flex-shrink: 0;
}
.notif-body { flex: 1; }
.notif-title { font-size: 0.82rem; font-weight: 600; }
.notif-time { font-size: 0.72rem; color: var(--text-muted); }

.notif-empty { text-align: center; padding: 32px 16px; color: var(--text-muted); }
.notif-empty i { font-size: 2rem; display: block; margin-bottom: 8px; }
.notif-empty p { font-size: 0.84rem; margin: 0; }

.notif-footer { padding: 10px 16px; text-align: center; border-top: 1px solid var(--border); background: var(--surface-2); }
.notif-footer a { font-size: 0.8rem; color: var(--primary); font-weight: 600; }

/* ── Page Content ── */
.page-content { flex: 1; padding: 28px 28px 40px; }

/* ── Page Header ── */
.page-header {
  display: flex; justify-content: space-between; align-items: flex-start;
  margin-bottom: 28px; flex-wrap: wrap; gap: 16px;
}
.page-title { font-size: 1.6rem; font-weight: 800; color: var(--text); margin: 0; letter-spacing: -0.5px; }
.page-subtitle { color: var(--text-secondary); margin: 4px 0 0; font-size: 0.88rem; }
.page-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }

.breadcrumb-custom {
  display: flex; align-items: center; gap: 6px;
  font-size: 0.8rem; color: var(--text-muted);
}
.breadcrumb-custom a { color: var(--text-secondary); }
.breadcrumb-custom a:hover { color: var(--primary); }
.breadcrumb-custom i { font-size: 0.65rem; }

/* ── Cards ── */
.card { border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow-sm); }
.card-modern { border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow-sm); overflow: hidden; }

.card-header-modern {
  display: flex; justify-content: space-between; align-items: center;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  background: var(--surface-2);
}
.card-title-modern { font-weight: 700; font-size: 0.9rem; margin: 0; color: var(--text); display: flex; align-items: center; }

/* ── Stats Grid ── */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 16px;
  margin-bottom: 8px;
}
@media (max-width:1400px) { .stats-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width:768px)  { .stats-grid { grid-template-columns: repeat(2, 1fr); } }

.stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  display: flex; align-items: flex-start; gap: 14px;
  position: relative; overflow: hidden;
  transition: transform var(--transition), box-shadow var(--transition);
}
.stat-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); }

.stat-icon {
  width: 44px; height: 44px;
  border-radius: 11px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.25rem; flex-shrink: 0;
}
.stat-value { font-size: 1.7rem; font-weight: 800; line-height: 1; letter-spacing: -1px; }
.stat-label { font-size: 0.78rem; color: var(--text-secondary); margin-top: 2px; font-weight: 500; }
.stat-sub { font-size: 0.72rem; margin-top: 3px; }

.stat-chart { position: absolute; right: 0; bottom: 0; width: 70px; opacity: 0.25; }

.stat-primary .stat-icon  { background: rgba(99,102,241,0.12); color: var(--primary); }
.stat-indigo  .stat-icon  { background: rgba(99,102,241,0.12); color: #6366f1; }
.stat-danger  .stat-icon  { background: rgba(239,68,68,0.1);   color: var(--danger); }
.stat-warning .stat-icon  { background: rgba(245,158,11,0.1);  color: var(--warning); }
.stat-teal    .stat-icon  { background: rgba(20,184,166,0.1);  color: var(--teal); }
.stat-success .stat-icon  { background: rgba(16,185,129,0.1);  color: var(--success); }

/* ── Table ── */
.table-modern { margin: 0; }
.table-modern thead th {
  background: var(--surface-2);
  font-size: 0.75rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.05em;
  color: var(--text-secondary);
  border-bottom: 1px solid var(--border);
  padding: 12px 16px; white-space: nowrap;
}
.table-modern tbody td { padding: 14px 16px; border-bottom: 1px solid var(--border-light); vertical-align: middle; }
.table-modern tbody tr:last-child td { border-bottom: none; }
.table-modern tbody tr:hover td { background: var(--surface-2); }
.link-hover:hover { color: var(--primary) !important; }

/* ── List Items ── */
.list-item {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 12px 20px;
  border-bottom: 1px solid var(--border-light);
  transition: background var(--transition);
}
.list-item:last-child { border-bottom: none; }
.list-item:hover { background: var(--surface-2); }

.list-item-icon {
  width: 36px; height: 36px;
  border-radius: 9px;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.9rem; flex-shrink: 0;
}
.list-item-body { flex: 1; }
.list-item-title { font-size: 0.84rem; font-weight: 600; color: var(--text); }
.list-item-title:hover { color: var(--primary); }
.list-item-meta { display: flex; align-items: center; gap: 6px; margin-top: 4px; flex-wrap: wrap; }
.list-item-time { font-size: 0.72rem; color: var(--text-muted); white-space: nowrap; }

/* Soft bg variants */
.bg-danger-soft  { background: rgba(239,68,68,0.1); }
.bg-warning-soft { background: rgba(245,158,11,0.1); }
.bg-success-soft { background: rgba(16,185,129,0.1); }
.bg-primary-soft { background: rgba(99,102,241,0.1); }
.bg-info-soft    { background: rgba(6,182,212,0.1); }
.bg-secondary-soft { background: rgba(100,116,139,0.1); }

/* ── Activity Timeline ── */
.activity-timeline { padding: 0 20px; }
.activity-item {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border-light);
  position: relative;
}
.activity-item:last-child { border-bottom: none; }
.activity-dot {
  width: 8px; height: 8px;
  background: var(--primary);
  border-radius: 50%;
  margin-top: 6px; flex-shrink: 0;
}
.activity-content { flex: 1; font-size: 0.82rem; }
.activity-user { font-weight: 600; }
.activity-action { color: var(--text-secondary); }
.activity-time { font-size: 0.72rem; color: var(--text-muted); white-space: nowrap; }

/* ── Badges ── */
.badge { font-weight: 600; font-size: 0.7rem; padding: 4px 8px; border-radius: 6px; }
.badge-success  { background: rgba(16,185,129,0.12); color: #059669; }
.badge-info     { background: rgba(6,182,212,0.12);  color: #0891b2; }
.badge-warning  { background: rgba(245,158,11,0.12); color: #d97706; }
.badge-danger   { background: rgba(239,68,68,0.12);  color: #dc2626; }
.badge-secondary{ background: rgba(100,116,139,0.12);color: #475569; }

/* ── Donut Chart ── */
.task-donut-wrap { position: relative; display: flex; justify-content: center; }
.task-donut { width: 160px; height: 160px; }
.task-donut-center {
  position: absolute; top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
}
.donut-value { font-size: 1.8rem; font-weight: 800; line-height: 1; }
.donut-label { font-size: 0.72rem; color: var(--text-muted); }

.task-legend { }
.legend-item { display: flex; align-items: center; gap: 8px; padding: 6px 0; font-size: 0.82rem; border-bottom: 1px solid var(--border-light); }
.legend-item:last-child { border-bottom: none; }
.legend-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.legend-label { color: var(--text-secondary); }
.legend-value { font-weight: 700; font-size: 0.9rem; }

/* ============================================================
   KANBAN BOARD
   ============================================================ */
.kanban-filters {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
}
.filter-bar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.filter-group { display: flex; align-items: center; gap: 6px; }
.filter-label { font-size: 0.75rem; font-weight: 600; color: var(--text-secondary); white-space: nowrap; }

.kanban-board {
  display: flex; gap: 16px;
  overflow-x: auto;
  padding-bottom: 20px;
  align-items: flex-start;
  min-height: 600px;
}
.kanban-board::-webkit-scrollbar { height: 6px; }
.kanban-board::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }

.kanban-col {
  flex: 0 0 280px;
  min-width: 280px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  display: flex; flex-direction: column;
}

.kanban-col-header {
  display: flex; justify-content: space-between; align-items: center;
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
}
.kanban-col-title {
  display: flex; align-items: center; gap: 8px;
  font-weight: 700; font-size: 0.85rem; color: var(--text);
}
.kanban-col-count {
  background: var(--border); color: var(--text-secondary);
  font-size: 0.7rem; font-weight: 700;
  min-width: 20px; height: 20px;
  border-radius: 10px; padding: 0 6px;
  display: flex; align-items: center; justify-content: center;
}

.kanban-col-dot { width: 9px; height: 9px; border-radius: 50%; flex-shrink: 0; }
.dot-secondary { background: #94a3b8; }
.dot-primary   { background: var(--primary); }
.dot-info      { background: var(--cyan); }
.dot-success   { background: var(--success); }
.dot-danger    { background: var(--danger); }
.dot-warning   { background: var(--warning); }
.dot-dark      { background: #1e293b; }

.btn-add-card {
  width: 28px; height: 28px;
  background: none; border: 1px dashed var(--border);
  border-radius: 7px; color: var(--text-muted);
  display: flex; align-items: center; justify-content: center;
  font-size: 1rem; cursor: pointer;
  transition: all var(--transition);
}
.btn-add-card:hover { background: var(--primary); color: #fff; border-color: var(--primary); }

.kanban-cards {
  padding: 10px;
  display: flex; flex-direction: column; gap: 10px;
  min-height: 120px;
  flex: 1;
}

.kanban-drop-placeholder {
  height: 56px;
  border: 2px dashed var(--border);
  border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  font-size: 0.75rem; color: var(--text-muted);
  opacity: 0;
  transition: opacity var(--transition);
}
.kanban-cards.drag-over .kanban-drop-placeholder { opacity: 1; }

/* ── Task Card ── */
.kanban-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
  cursor: grab;
  transition: all var(--transition);
  position: relative;
}
.kanban-card:hover { box-shadow: var(--shadow); transform: translateY(-1px); border-color: var(--primary); }
.kanban-card.dragging { opacity: 0.5; cursor: grabbing; }
.kanban-card.ui-sortable-helper { box-shadow: var(--shadow-lg); transform: rotate(2deg); cursor: grabbing; }
.kanban-card.ui-sortable-placeholder { visibility: visible !important; background: rgba(99,102,241,0.06); border: 2px dashed var(--primary); border-radius: var(--radius-sm); }

.card-priority-bar { height: 3px; }
.priority-low      { background: var(--success); }
.priority-medium   { background: var(--warning); }
.priority-high     { background: var(--danger); }
.priority-critical { background: linear-gradient(90deg, #7c3aed, #dc2626); }

.card-body-inner { padding: 12px; }

.card-tags { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 8px; }
.card-tag {
  font-size: 0.65rem; font-weight: 600; letter-spacing: 0.03em;
  background: rgba(99,102,241,0.1); color: var(--primary);
  padding: 2px 7px; border-radius: 4px;
}

.card-title-text { font-size: 0.85rem; font-weight: 600; color: var(--text); line-height: 1.4; margin-bottom: 8px; }
.card-title-text a { color: inherit; }
.card-title-text a:hover { color: var(--primary); }

.card-meta { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }

.card-deadline { font-size: 0.72rem; color: var(--text-muted); display: flex; align-items: center; gap: 3px; }
.card-deadline.overdue { color: var(--danger); font-weight: 600; }

.card-progress { display: flex; align-items: center; gap: 8px; }
.progress-label { font-size: 0.7rem; color: var(--text-muted); white-space: nowrap; }

.card-footer-inner { display: flex; justify-content: space-between; align-items: center; margin-top: 10px; }
.card-assignee { display: flex; align-items: center; }
.card-actions { display: flex; gap: 4px; }
.card-action-btn {
  width: 26px; height: 26px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 6px; font-size: 0.75rem;
  color: var(--text-muted);
  transition: all var(--transition);
}
.card-action-btn:hover { background: var(--bg); color: var(--primary); }

/* Issue card extras */
.issue-number { font-size: 0.7rem; font-weight: 700; color: var(--text-muted); background: var(--border); padding: 2px 7px; border-radius: 4px; }
.severity-minor   { background: rgba(16,185,129,0.1);  color: #059669;  font-size: 0.68rem; }
.severity-major   { background: rgba(245,158,11,0.1);  color: #d97706;  font-size: 0.68rem; }
.severity-blocker { background: rgba(239,68,68,0.1);   color: #dc2626;  font-size: 0.68rem; }

/* Avatar Group */
.avatar-group { display: flex; }
.avatar-group > * { margin-left: -6px; border: 2px solid var(--surface); border-radius: 50%; }
.avatar-group > *:first-child { margin-left: 0; }
.avatar-more {
  width: 28px; height: 28px;
  background: var(--border); color: var(--text-secondary);
  border-radius: 50%; border: 2px solid var(--surface);
  display: flex; align-items: center; justify-content: center;
  font-size: 0.65rem; font-weight: 700;
}

/* ============================================================
   PROJECT CARDS
   ============================================================ */
.project-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: all var(--transition);
  height: 100%;
}
.project-card:hover { box-shadow: var(--shadow); transform: translateY(-2px); }

.project-card-header {
  height: 6px;
  position: relative;
  display: flex; align-items: center; gap: 8px;
  padding: 12px 16px 8px;
  margin-top: 4px;
}
.project-color { position: absolute; top: 0; left: 0; right: 0; height: 4px; }
.project-status-wrap { display: flex; gap: 6px; flex-wrap: wrap; padding-top: 8px; }
.project-menu { margin-left: auto; padding-top: 4px; }

.project-card-body { padding: 0 16px 16px; }
.project-name { font-size: 0.95rem; font-weight: 700; margin-bottom: 4px; }
.project-name a { color: var(--text); }
.project-name a:hover { color: var(--primary); }
.project-client { font-size: 0.78rem; color: var(--text-muted); margin-bottom: 6px; }
.project-desc { font-size: 0.8rem; line-height: 1.5; }

.project-stats { display: flex; gap: 16px; }
.project-stat { display: flex; align-items: center; gap: 5px; font-size: 0.78rem; color: var(--text-secondary); }

.project-card-footer {
  display: flex; justify-content: space-between; align-items: center;
  padding: 12px 16px;
  border-top: 1px solid var(--border-light);
  background: var(--surface-2);
}
.project-date { font-size: 0.75rem; color: var(--text-muted); display: flex; align-items: center; gap: 4px; }

/* ============================================================
   FORMS & MODALS
   ============================================================ */
.form-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.form-card-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  background: var(--surface-2);
}
.form-card-header h6 { margin: 0; font-weight: 700; font-size: 0.9rem; display: flex; align-items: center; }
.form-card-body { padding: 20px; }

.form-actions {
  display: flex; justify-content: flex-end; gap: 10px;
}

.form-label { font-size: 0.82rem; font-weight: 600; color: var(--text-secondary); margin-bottom: 6px; }
.form-control, .form-select {
  border: 1px solid var(--border);
  border-radius: 9px;
  font-family: var(--font-main);
  font-size: 0.87rem;
  color: var(--text);
  background: var(--surface);
  padding: 9px 14px;
  transition: all var(--transition);
}
.form-control:focus, .form-select:focus {
  border-color: var(--primary); box-shadow: 0 0 0 3px rgba(99,102,241,0.12);
}

/* Member selector */
.member-selector { display: flex; flex-wrap: wrap; gap: 10px; }
.member-option {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--transition);
  min-width: 180px;
  position: relative;
}
.member-option input[type="checkbox"] { display: none; }
.member-option:hover { border-color: var(--primary); background: rgba(99,102,241,0.04); }
.member-option.selected { border-color: var(--primary); background: rgba(99,102,241,0.07); }
.member-info { flex: 1; }
.member-name { font-size: 0.82rem; font-weight: 600; }
.member-role { font-size: 0.72rem; color: var(--text-muted); }
.check-icon { color: var(--primary); font-size: 1rem; opacity: 0; transition: opacity var(--transition); }
.member-option.selected .check-icon { opacity: 1; }

/* Modal */
.modal-modern { border: none; border-radius: var(--radius-lg); overflow: hidden; }
.modal-header-modern {
  display: flex; justify-content: space-between; align-items: center;
  padding: 20px 24px;
  background: var(--surface-2);
  border-bottom: 1px solid var(--border);
}
.modal-header-modern .modal-title { font-weight: 700; font-size: 1rem; }
.btn-close-modern {
  width: 32px; height: 32px;
  background: var(--border); border: none;
  border-radius: 8px; color: var(--text-secondary);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; transition: all var(--transition);
}
.btn-close-modern:hover { background: var(--danger); color: #fff; }

.modal-footer-modern {
  display: flex; justify-content: flex-end; gap: 10px;
  padding: 16px 24px;
  border-top: 1px solid var(--border);
  background: var(--surface-2);
}

/* ============================================================
   DETAIL PAGES
   ============================================================ */
.info-list { display: flex; flex-direction: column; gap: 0; }
.info-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: 10px 0; font-size: 0.83rem;
  border-bottom: 1px solid var(--border-light);
}
.info-row:last-child { border-bottom: none; }
.info-label { color: var(--text-muted); font-weight: 500; }
.info-value { font-weight: 600; text-align: right; }

.detail-label { font-size: 0.78rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-muted); margin-bottom: 8px; }
.detail-text { font-size: 0.88rem; color: var(--text); line-height: 1.7; }

/* Comments */
.comments-thread { display: flex; flex-direction: column; gap: 14px; }
.comment-item { display: flex; gap: 12px; }
.comment-bubble { flex: 1; background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 12px 14px; }
.comment-client .comment-bubble { background: rgba(99,102,241,0.06); border-color: rgba(99,102,241,0.2); }
.comment-header { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; flex-wrap: wrap; }
.comment-author { font-weight: 700; font-size: 0.83rem; }
.comment-badge { font-size: 0.68rem; }
.comment-time { font-size: 0.72rem; color: var(--text-muted); margin-left: auto; }
.comment-text { font-size: 0.85rem; line-height: 1.6; }

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
  font-family: var(--font-main);
  font-weight: 600; font-size: 0.84rem;
  border-radius: 9px; padding: 8px 18px;
  transition: all var(--transition);
  display: inline-flex; align-items: center;
}
.btn-primary {
  background: var(--primary); color: #fff; border: none;
}
.btn-primary:hover { background: var(--primary-dark); transform: translateY(-1px); box-shadow: 0 4px 12px rgba(99,102,241,0.3); color: #fff; }

.btn-ghost { background: none; border: 1px solid var(--border); color: var(--text-secondary); }
.btn-ghost:hover { background: var(--bg); color: var(--text); }

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

.btn-outline-primary { border: 1px solid var(--primary); color: var(--primary); background: none; }
.btn-outline-primary:hover { background: var(--primary); color: #fff; }

.btn-outline-danger { border: 1px solid var(--danger); color: var(--danger); background: none; }
.btn-outline-danger:hover { background: var(--danger); color: #fff; }

.btn-sm { padding: 5px 12px; font-size: 0.78rem; border-radius: 7px; }

/* ============================================================
   EMPTY STATES
   ============================================================ */
.empty-state { text-align: center; padding: 40px 20px; color: var(--text-muted); }
.empty-state i { font-size: 2.5rem; display: block; margin-bottom: 10px; opacity: 0.5; }
.empty-state p { font-size: 0.87rem; margin: 0; }

.empty-page-state {
  text-align: center; padding: 60px 20px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}
.empty-icon { font-size: 3.5rem; color: var(--text-muted); margin-bottom: 16px; opacity: 0.5; }
.empty-page-state h4 { font-weight: 800; }
.empty-page-state p { color: var(--text-muted); margin-bottom: 20px; }

/* ============================================================
   AUTH PAGE
   ============================================================ */
.auth-body { background: var(--bg); margin: 0; padding: 0; min-height: 100vh; }

.auth-wrapper { display: flex; min-height: 100vh; }

.auth-panel-left {
  flex: 0 0 460px;
  background: linear-gradient(145deg, #0f172a 0%, #1e1b4b 40%, #312e81 100%);
  display: flex; flex-direction: column;
  position: relative; overflow: hidden;
  padding: 48px;
}

.auth-left-content { position: relative; z-index: 2; }

.auth-brand { margin-bottom: 48px; }
.brand-icon-lg {
  width: 64px; height: 64px;
  background: linear-gradient(135deg, var(--primary), var(--purple));
  border-radius: 16px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.8rem; color: #fff;
  margin-bottom: 16px;
  box-shadow: 0 8px 24px rgba(99,102,241,0.4);
}
.auth-brand h1 { font-size: 2.4rem; font-weight: 800; color: #fff; margin: 0; }
.brand-tagline { color: rgba(255,255,255,0.6); font-size: 0.9rem; }

.auth-features { display: flex; flex-direction: column; gap: 20px; }
.auth-feature-item {
  display: flex; align-items: flex-start; gap: 14px;
}
.feature-icon {
  width: 40px; height: 40px;
  background: rgba(255,255,255,0.08);
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem; color: var(--primary-light);
  flex-shrink: 0;
  border: 1px solid rgba(255,255,255,0.1);
}
.auth-feature-item strong { display: block; color: #fff; font-size: 0.9rem; margin-bottom: 2px; }
.auth-feature-item p { color: rgba(255,255,255,0.5); font-size: 0.8rem; margin: 0; }

/* Orbs */
.auth-orbs { position: absolute; top: 0; left: 0; right: 0; bottom: 0; pointer-events: none; z-index: 1; }
.orb { position: absolute; border-radius: 50%; filter: blur(60px); }
.orb-1 { width: 300px; height: 300px; background: rgba(99,102,241,0.3); top: -80px; right: -80px; }
.orb-2 { width: 200px; height: 200px; background: rgba(139,92,246,0.2); bottom: 100px; left: -50px; }
.orb-3 { width: 150px; height: 150px; background: rgba(6,182,212,0.2); bottom: -30px; right: 40px; }

.auth-panel-right {
  flex: 1;
  display: flex; align-items: center; justify-content: center;
  padding: 40px;
  background: var(--surface);
}
.auth-form-wrap { width: 100%; max-width: 420px; }
.auth-form-header { margin-bottom: 32px; }
.auth-form-header h2 { font-size: 1.8rem; font-weight: 800; letter-spacing: -0.5px; }
.auth-form-header p { color: var(--text-muted); font-size: 0.9rem; }

.auth-mobile-brand { display: flex; align-items: center; gap: 10px; margin-bottom: 24px; font-weight: 800; font-size: 1.2rem; }
.brand-icon-sm {
  width: 36px; height: 36px;
  background: linear-gradient(135deg, var(--primary), var(--purple));
  border-radius: 9px; display: flex; align-items: center; justify-content: center;
  font-size: 1rem; color: #fff;
}

.form-floating .form-control { border-radius: 9px; border: 1px solid var(--border); }
.form-floating label { font-size: 0.85rem; color: var(--text-muted); }

.btn-eye {
  position: absolute; right: 12px; top: 50%; transform: translateY(-50%);
  background: none; border: none; color: var(--text-muted); cursor: pointer;
  z-index: 10;
}

.btn-login { padding: 12px 24px; font-size: 0.95rem; font-weight: 700; border-radius: 10px; }

.demo-creds-grid { display: flex; gap: 8px; }
.demo-cred {
  flex: 1; padding: 8px 6px;
  border: 1px solid var(--border); border-radius: 8px;
  background: var(--surface-2); font-size: 0.78rem;
  cursor: pointer; font-weight: 600;
  display: flex; align-items: center; justify-content: center; gap: 5px;
  transition: all var(--transition);
  color: var(--text);
}
.demo-cred:hover { border-color: var(--primary); background: rgba(99,102,241,0.06); }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1024px) {
  .sidebar { transform: translateX(-100%); }
  .sidebar.mobile-open { transform: translateX(0); }
  .main-wrapper { margin-left: 0; }
  .page-content { padding: 20px 16px; }
}

@media (max-width: 640px) {
  .page-title { font-size: 1.3rem; }
  .auth-panel-right { padding: 24px 20px; }
  .kanban-col { flex: 0 0 240px; min-width: 240px; }
}

/* ============================================================
   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(--text-muted); }

/* ============================================================
   MISC
   ============================================================ */
.text-indigo { color: var(--indigo) !important; }
.text-teal   { color: var(--teal) !important; }
