/* ============================================================
   FLOW - Main Stylesheet v2.0
   Material Design 3 — Light mode default
   ============================================================ */

/* ── Brand/Semantic tokens ── */
:root {
  --color-violet:  #6750A4;
  --color-pink:    #C2185B;
  --color-cyan:    #0288D1;
  --color-green:   #2E7D32;
  --color-amber:   #F57C00;
  --color-red:     #C62828;
  --color-indigo:  #3949AB;
  --color-teal:    #00796B;

  --gradient-primary:   linear-gradient(135deg, #6750A4 0%, #C2185B 100%);
  --gradient-secondary: linear-gradient(135deg, #0288D1 0%, #6750A4 100%);
  --gradient-success:   linear-gradient(135deg, #2E7D32 0%, #00796B 100%);
  --gradient-warning:   linear-gradient(135deg, #F57C00 0%, #E65100 100%);
  --gradient-danger:    linear-gradient(135deg, #C2185B 0%, #7B1FA2 100%);
}

/* ── Light Mode (default) ── */
[data-theme="light"], :root {
  --bg-primary:    #F3F4F8;
  --bg-secondary:  #ECEDF3;
  --bg-tertiary:   #E4E5EC;
  --card-bg:       rgba(255,255,255,0.98);
  --card-bg-solid: #FFFFFF;
  --sidebar-bg:    #FFFFFF;
  --header-bg:     rgba(255,255,255,0.97);
  --input-bg:      #F7F8FC;
  --border:        rgba(0,0,0,0.09);
  --border-hover:  rgba(103,80,164,0.45);
  --text-primary:  #1C1B1F;
  --text-secondary:#49454F;
  --text-muted:    #79747E;
  --shadow:        0 1px 3px rgba(0,0,0,0.08), 0 1px 2px rgba(0,0,0,0.05);
  --shadow-lg:     0 4px 12px rgba(0,0,0,0.08), 0 2px 6px rgba(0,0,0,0.05);
  --shadow-xl:     0 8px 28px rgba(0,0,0,0.10), 0 4px 10px rgba(0,0,0,0.06);
  --scrollbar-thumb: #C4C5CC;
  --scrollbar-track: #ECEDF3;
}

/* ── Dark Mode ── */
[data-theme="dark"] {
  --bg-primary:    #1C1B1F;
  --bg-secondary:  #25232A;
  --bg-tertiary:   #2D2B32;
  --card-bg:       rgba(36,33,42,0.95);
  --card-bg-solid: #2D2B32;
  --sidebar-bg:    #25232A;
  --header-bg:     rgba(28,27,31,0.97);
  --input-bg:      #35333A;
  --border:        rgba(255,255,255,0.1);
  --border-hover:  rgba(208,188,255,0.4);
  --text-primary:  #E6E1E5;
  --text-secondary:#CAC4D0;
  --text-muted:    #938F99;
  --shadow:        0 1px 3px rgba(0,0,0,0.4), 0 1px 2px rgba(0,0,0,0.3);
  --shadow-lg:     0 4px 16px rgba(0,0,0,0.5), 0 2px 8px rgba(0,0,0,0.4);
  --shadow-xl:     0 8px 32px rgba(0,0,0,0.6), 0 4px 16px rgba(0,0,0,0.5);
  --scrollbar-thumb: #504F54;
  --scrollbar-track: #2D2B32;
}

/* ── Base Reset ── */
*, *::before, *::after { box-sizing: border-box; }
html { font-size: 16px; scroll-behavior: smooth; }
body {
  margin: 0; padding: 0;
  font-family: 'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;
  background: var(--bg-primary); color: var(--text-primary);
  min-height: 100vh; line-height: 1.6;
  transition: background 0.3s, color 0.3s;
}

/* ── Scrollbar ── */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: var(--scrollbar-track); }
::-webkit-scrollbar-thumb { background: var(--scrollbar-thumb); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: #6c63ff; }

/* ── Typography ── */
h1,h2,h3,h4,h5,h6 { font-weight: 700; line-height: 1.3; margin: 0 0 16px; }
h1 { font-size: 2rem; } h2 { font-size: 1.6rem; } h3 { font-size: 1.3rem; }
h4 { font-size: 1.1rem; } h5 { font-size: 0.95rem; } h6 { font-size: 0.875rem; }
p { margin: 0 0 12px; }
a { color: var(--color-violet); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--color-pink); }

/* ── Layout ── */
.app-layout { display: flex; min-height: 100vh; }

/* ── Sidebar ── */
.sidebar {
  width: 260px; min-height: 100vh; position: fixed; left: 0; top: 0; z-index: 200;
  background: var(--sidebar-bg);
  border-right: 1px solid var(--border);
  display: flex; flex-direction: column;
  transition: transform 0.3s cubic-bezier(0.4,0,0.2,1), width 0.3s;
  overflow: hidden;
  box-shadow: 2px 0 8px rgba(0,0,0,0.06);
}
.sidebar.collapsed { width: 72px; }
.sidebar-logo {
  padding: 20px 16px 18px;
  display: flex; align-items: center; gap: 12px;
  border-bottom: 1px solid var(--border);
  text-decoration: none;
}
.sidebar-logo-icon {
  width: 40px; height: 40px; border-radius: 12px; flex-shrink: 0;
  background: linear-gradient(135deg, #6c63ff, #f72585);
  display: flex; align-items: center; justify-content: center;
  font-size: 20px; font-weight: 900; overflow: hidden;
}
.sidebar-logo img {
  transition: transform 0.3s;
}
.sidebar-logo:hover img {
  transform: scale(1.08);
}
.sidebar-logo-text { color: var(--text-primary); font-size: 18px; font-weight: 800; letter-spacing: 2px; white-space: nowrap; }
.sidebar-logo-sub  { color: var(--text-muted); font-size: 9px; letter-spacing: 2px; margin-top: 2px; display: block; }

.sidebar-nav { flex: 1; overflow-y: auto; padding: 16px 12px; }
.nav-section { margin-bottom: 24px; }
.nav-section-title {
  font-size: 10px; font-weight: 700; letter-spacing: 1.5px;
  color: var(--text-muted); text-transform: uppercase;
  padding: 0 12px; margin-bottom: 4px; white-space: nowrap;
}
.nav-item {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 12px; border-radius: 50px; margin-bottom: 2px;
  color: var(--text-secondary); font-size: 14px; font-weight: 500;
  text-decoration: none; cursor: pointer; border: none; background: none; width: 100%;
  transition: all 0.2s; position: relative; white-space: nowrap; overflow: hidden;
}
.nav-item:hover { background: rgba(103,80,164,0.08); color: var(--color-violet); }
.nav-item.active {
  background: rgba(103,80,164,0.12);
  color: var(--color-violet); font-weight: 600;
}
.nav-item.active::before { display: none; }
.nav-icon { font-size: 18px; flex-shrink: 0; width: 24px; text-align: center; }
.nav-badge {
  margin-left: auto; background: var(--color-violet); color: #fff;
  border-radius: 10px; padding: 2px 8px; font-size: 11px; font-weight: 700;
}
.sidebar-footer {
  padding: 16px 12px;
  border-top: 1px solid rgba(108,99,255,0.15);
}

/* ── Header ── */
.header {
  position: fixed; top: 0; right: 0; left: 260px; height: 64px; z-index: 100;
  background: var(--header-bg);
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; padding: 0 24px; gap: 16px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
  transition: left 0.3s;
}
.header.sidebar-collapsed { left: 72px; }
.header-title { font-size: 18px; font-weight: 700; color: var(--text-primary); flex: 1; }
.header-breadcrumb { color: var(--text-muted); font-size: 13px; display: flex; align-items: center; gap: 6px; flex: 1; }
.header-breadcrumb a { color: var(--text-muted); } .header-breadcrumb span { color: var(--color-violet); }

/* ── Main Content ── */
.main-content {
  margin-left: 260px; padding-top: 65px; min-height: 100vh;
  transition: margin-left 0.3s;
}
.main-content.sidebar-collapsed { margin-left: 72px; }
.page-container { padding: 28px 28px; max-width: 1600px; margin: 0 auto; }
.page-header { display: flex; align-items: center; gap: 16px; margin-bottom: 28px; flex-wrap: wrap; }
.page-title { font-size: 1.5rem; font-weight: 700; color: var(--text-primary); }

/* ── Cards ── */
.card {
  background: var(--card-bg); border: 1px solid var(--border); border-radius: 12px;
  box-shadow: var(--shadow); overflow: hidden; transition: all 0.25s;
}
.card:hover { border-color: rgba(103,80,164,0.2); box-shadow: var(--shadow-lg); transform: translateY(-1px); }
.card-header {
  padding: 20px 24px; border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
}
.card-title { font-size: 15px; font-weight: 700; color: var(--text-primary); margin: 0; }
.card-body  { padding: 24px; }
.card-footer{ padding: 16px 24px; border-top: 1px solid var(--border); background: rgba(0,0,0,0.1); }

/* ── Buttons ── */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 20px; border-radius: 50px; border: none; cursor: pointer;
  font-size: 14px; font-weight: 600; font-family: inherit;
  transition: all 0.2s; text-decoration: none; white-space: nowrap;
  letter-spacing: 0.1px;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn-primary  { background: var(--color-violet); color: #fff; box-shadow: 0 2px 8px rgba(103,80,164,0.3); }
.btn-primary:hover  { background: #7965AF; color: #fff; box-shadow: 0 4px 16px rgba(103,80,164,0.4); }
.btn-secondary { background: var(--gradient-secondary); color: #fff; box-shadow: 0 2px 8px rgba(2,136,209,0.25); }
.btn-success { background: var(--color-green); color: #fff; }
.btn-warning { background: var(--color-amber); color: #fff; }
.btn-danger  { background: var(--color-red);   color: #fff; }
.btn-outline {
  background: transparent; border: 1.5px solid var(--border-hover); color: var(--color-violet);
}
.btn-outline:hover { background: rgba(103,80,164,0.06); border-color: var(--color-violet); color: var(--color-violet); }
.btn-ghost { background: transparent; color: var(--text-muted); }
.btn-ghost:hover { background: rgba(103,80,164,0.08); color: var(--color-violet); }
.btn-icon { background: transparent; border: none; padding: 8px; border-radius: 50%; cursor: pointer; color: var(--text-muted); font-size: 18px; transition: all 0.2s; }
.btn-icon:hover { background: rgba(103,80,164,0.08); color: var(--color-violet); }
.btn-sm { padding: 6px 16px; font-size: 13px; }
.btn-lg { padding: 12px 28px; font-size: 15px; border-radius: 50px; }

/* ── Form Controls ── */
.form-group { margin-bottom: 20px; }
.form-group label { display: block; font-size: 13px; font-weight: 600; color: var(--text-secondary); margin-bottom: 8px; }
.form-control, .form-select, textarea {
  width: 100%; padding: 12px 16px; border-radius: 8px;
  border: 1.5px solid var(--border); background: var(--input-bg);
  color: var(--text-primary); font-size: 14px; font-family: inherit;
  transition: all 0.2s; resize: vertical;
}
.form-control:focus, .form-select:focus, textarea:focus {
  outline: none; border-color: var(--color-violet); box-shadow: 0 0 0 3px rgba(103,80,164,0.12);
}
.form-control::placeholder { color: var(--text-muted); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-row-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 16px; }
.form-hint { font-size: 12px; color: var(--text-muted); margin-top: 6px; }

/* ── Grid ── */
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.grid-auto { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 20px; }

/* ── Stats Cards ── */
.stat-card {
  background: var(--card-bg); border: 1px solid var(--border); border-radius: 12px;
  padding: 20px; display: flex; align-items: center; gap: 16px;
  transition: all 0.25s; position: relative; overflow: hidden;
  box-shadow: var(--shadow);
}
.stat-card::before {
  content: ''; position: absolute; inset: 0;
  background: var(--gradient); opacity: 0.04; transition: opacity 0.25s;
}
.stat-card:hover::before { opacity: 0.08; }
.stat-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); border-color: rgba(103,80,164,0.15); }
.stat-icon {
  width: 56px; height: 56px; border-radius: 16px; display: flex; align-items: center;
  justify-content: center; font-size: 26px; flex-shrink: 0;
  background: var(--gradient);
}
.stat-info .stat-value { font-size: 28px; font-weight: 900; color: var(--text-primary); line-height: 1; }
.stat-info .stat-label { font-size: 13px; color: var(--text-muted); margin-top: 4px; }
.stat-info .stat-change { font-size: 12px; margin-top: 4px; font-weight: 600; }
.stat-change.up   { color: var(--color-green); }
.stat-change.down { color: var(--color-red); }

/* ── Badges ── */
.badge { display: inline-flex; align-items: center; padding: 3px 10px; border-radius: 20px; font-size: 11px; font-weight: 700; letter-spacing: 0.5px; text-transform: uppercase; white-space: nowrap; }
.badge-todo       { background: #ffffff15; color: #b0b0cc; border: 1px solid #b0b0cc44; }
.badge-inprogress { background: #3d5afe22; color: #3d8bfe; border: 1px solid #3d5afe44; }
.badge-review     { background: #ff980022; color: #ffab40; border: 1px solid #ff980044; }
.badge-preprod    { background: #6c63ff22; color: #a99dff; border: 1px solid #6c63ff44; }
.badge-prod       { background: #00e67622; color: #00e676; border: 1px solid #00e67644; }
.badge-planning   { background: #00d4ff22; color: #00d4ff; border: 1px solid #00d4ff44; }
.badge-active     { background: #00e67622; color: #00e676; border: 1px solid #00e67644; }
.badge-completed  { background: #00bfa522; color: #00bfa5; border: 1px solid #00bfa544; }
.badge-cancelled  { background: #f4433622; color: #f44336; border: 1px solid #f4433644; }
.badge-onhold     { background: #ffab4022; color: #ffab40; border: 1px solid #ffab4044; }
.badge-archived   { background: #78909c22; color: #78909c; border: 1px solid #78909c44; }
.badge-admin      { background: linear-gradient(135deg,#6c63ff,#f72585); color:#fff; }
.badge-manager    { background: linear-gradient(135deg,#00d4ff,#6c63ff); color:#fff; }
.badge-developer  { background: linear-gradient(135deg,#00e676,#00acc1); color:#fff; }
.badge-analyst    { background: linear-gradient(135deg,#ffab40,#ff6f00); color:#fff; }
.badge-low        { background: #00e67622; color: #00e676; }
.badge-medium     { background: #ffab4022; color: #ffab40; }
.badge-high       { background: #ff572222; color: #ff5722; }
.badge-urgent     { background: #f7258522; color: #f72585; }

/* ── Tables ── */
.table { width: 100%; border-collapse: collapse; }
.table th { padding: 12px 16px; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; color: var(--text-muted); border-bottom: 1px solid var(--border); text-align: left; }
.table td { padding: 14px 16px; font-size: 14px; color: var(--text-primary); border-bottom: 1px solid var(--border); vertical-align: middle; }
.table tr:last-child td { border-bottom: none; }
.table tr:hover td { background: rgba(108,99,255,0.04); }
.table-responsive { overflow-x: auto; }

/* ── Kanban Board ── */
.board-wrap { display: flex; gap: 16px; overflow-x: auto; padding-bottom: 16px; min-height: 70vh; align-items: flex-start; }
.board-col {
  min-width: 280px; width: 280px; flex-shrink: 0;
  background: var(--bg-tertiary); border-radius: 16px; overflow: hidden;
  border: 1px solid var(--border);
}
.board-col-header {
  padding: 16px 18px; display: flex; align-items: center; gap: 10px;
  font-weight: 700; font-size: 13px; letter-spacing: 0.5px;
  border-bottom: 1px solid var(--border);
  position: sticky; top: 0; background: var(--bg-tertiary); z-index: 1;
}
.board-col-header .col-dot { width: 10px; height: 10px; border-radius: 50%; }
.board-col-header .col-count {
  margin-left: auto; background: var(--border); border-radius: 12px;
  padding: 2px 8px; font-size: 12px; color: var(--text-muted);
}
.board-col-body { padding: 12px; min-height: 200px; }
.board-col-body.drag-over { background: rgba(108,99,255,0.08); border-radius: 8px; }

.task-card {
  background: var(--card-bg-solid); border: 1px solid var(--border); border-radius: 12px;
  padding: 14px 16px; margin-bottom: 10px; cursor: grab;
  transition: all 0.2s; user-select: none;
}
.task-card:hover { border-color: rgba(103,80,164,0.3); box-shadow: 0 4px 12px rgba(103,80,164,0.1); transform: translateY(-1px); }
.task-card.dragging { opacity: 0.5; cursor: grabbing; }
.task-card-title { font-size: 14px; font-weight: 600; color: var(--text-primary); margin-bottom: 10px; line-height: 1.4; }
.task-card-meta  { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.task-card-type  { font-size: 16px; }
.task-assignee   { width: 24px; height: 24px; border-radius: 50%; object-fit: cover; border: 2px solid var(--border); margin-left: auto; }

/* ── Gantt Chart ── */
.gantt-wrap { overflow: auto; }
.gantt-header { display: flex; border-bottom: 2px solid var(--border); }
.gantt-task-col { min-width: 240px; padding: 10px 16px; font-weight: 700; font-size: 13px; color: var(--text-muted); border-right: 1px solid var(--border); }
.gantt-time-cols { display: flex; flex: 1; }
.gantt-day-col { min-width: 40px; padding: 8px 4px; text-align: center; font-size: 11px; color: var(--text-muted); border-right: 1px solid rgba(108,99,255,0.1); }
.gantt-day-col.today { background: rgba(103,80,164,0.1); color: var(--color-violet); font-weight: 700; }
.gantt-row { display: flex; border-bottom: 1px solid rgba(108,99,255,0.07); min-height: 44px; align-items: center; }
.gantt-row:hover { background: rgba(108,99,255,0.04); }
.gantt-task-name { min-width: 240px; padding: 8px 16px; border-right: 1px solid var(--border); font-size: 13px; display: flex; align-items: center; gap: 8px; }
.gantt-timeline { flex: 1; position: relative; height: 44px; display: flex; align-items: center; }
.gantt-bar {
  position: absolute; height: 26px; border-radius: 6px;
  background: var(--gradient-primary); opacity: 0.85;
  display: flex; align-items: center; padding: 0 10px;
  font-size: 11px; font-weight: 600; color: #fff; cursor: pointer;
  transition: opacity 0.2s, transform 0.2s; min-width: 8px; overflow: hidden;
  white-space: nowrap;
}
.gantt-bar:hover { opacity: 1; transform: scaleY(1.1); box-shadow: 0 4px 12px #6c63ff55; }
.gantt-bar.type-bug   { background: var(--gradient-danger); }
.gantt-bar.type-story { background: var(--gradient-secondary); }
.gantt-bar.type-epic  { background: var(--gradient-warning); }
.gantt-today-line { position: absolute; top: 0; bottom: 0; width: 2px; background: var(--color-violet); z-index: 2; }
.gantt-today-line::before { content: '●'; color: var(--color-violet); font-size: 10px; position: absolute; top: -6px; left: -4px; }

/* ── Calendar ── */
.calendar-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.calendar-day-header { text-align: center; padding: 10px; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; color: var(--text-muted); }
.calendar-day {
  min-height: 100px; padding: 8px; border-radius: 10px; border: 1px solid var(--border);
  background: var(--bg-tertiary); cursor: pointer; transition: all 0.2s;
}
.calendar-day:hover { border-color: var(--color-violet); background: rgba(108,99,255,0.05); }
.calendar-day.today { border-color: var(--color-violet); background: rgba(103,80,164,0.06); }
.calendar-day.other-month { opacity: 0.35; }
.calendar-day-num { font-size: 13px; font-weight: 700; color: var(--text-secondary); margin-bottom: 6px; }
.calendar-day.today .calendar-day-num { color: var(--color-violet); background: var(--color-violet); color: #fff; width: 24px; height: 24px; border-radius: 50%; display: flex; align-items: center; justify-content: center; }
.calendar-event { font-size: 11px; border-radius: 4px; padding: 2px 6px; margin-bottom: 3px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.calendar-event.type-task    { background: #6c63ff33; color: #a99dff; }
.calendar-event.type-bug     { background: #f7258533; color: #f7858a; }
.calendar-event.type-sprint  { background: #00d4ff33; color: #00d4ff; }
.calendar-event.type-report  { background: #ffab4033; color: #ffab40; }

/* ── Sprint Chat ── */
.chat-wrap { display: flex; flex-direction: column; height: calc(100vh - 200px); min-height: 400px; }
.chat-messages { flex: 1; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 12px; }
.chat-msg { display: flex; gap: 12px; align-items: flex-start; }
.chat-msg.mine { flex-direction: row-reverse; }
.chat-avatar { width: 36px; height: 36px; border-radius: 50%; flex-shrink: 0; object-fit: cover; border: 2px solid var(--border); }
.chat-bubble {
  max-width: 60%; padding: 12px 16px; border-radius: 16px;
  font-size: 14px; line-height: 1.5; position: relative;
  background: var(--bg-tertiary); border: 1px solid var(--border); color: var(--text-primary);
}
.chat-msg.mine .chat-bubble {
  background: linear-gradient(135deg, #6c63ff22, #f7258511);
  border-color: rgba(108,99,255,0.3);
}
.chat-meta { font-size: 11px; color: var(--text-muted); margin-top: 4px; }
.chat-msg.mine .chat-meta { text-align: right; }
.chat-input-wrap {
  padding: 16px; border-top: 1px solid var(--border); display: flex; gap: 10px; align-items: center;
}
.chat-input {
  flex: 1; padding: 12px 16px; border-radius: 24px; border: 1.5px solid var(--border);
  background: var(--input-bg); color: var(--text-primary); font-family: inherit; font-size: 14px;
  transition: all 0.2s; resize: none; max-height: 120px;
}
.chat-input:focus { outline: none; border-color: #6c63ff; box-shadow: 0 0 0 3px #6c63ff15; }
.chat-attachment { background: var(--bg-tertiary); border: 1px solid var(--border); border-radius: 10px; padding: 10px 14px; display: flex; align-items: center; gap: 10px; max-width: 280px; cursor: pointer; }
.chat-attachment:hover { border-color: var(--color-violet); }
.chat-attachment-icon { font-size: 24px; }
.chat-attachment-info .file-name { font-size: 13px; font-weight: 600; color: var(--text-primary); }
.chat-attachment-info .file-size { font-size: 11px; color: var(--text-muted); }

/* ── Notifications Panel ── */
.notif-panel {
  position: fixed; right: 0; top: 65px; width: 380px; height: calc(100vh - 65px);
  background: var(--card-bg-solid); border-left: 1px solid var(--border);
  z-index: 300; transform: translateX(100%); transition: transform 0.3s cubic-bezier(0.4,0,0.2,1);
  display: flex; flex-direction: column; backdrop-filter: blur(20px);
}
.notif-panel.open { transform: translateX(0); }
.notif-panel-header { padding: 20px 20px 16px; border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; }
.notif-panel-title { font-size: 16px; font-weight: 700; color: var(--text-primary); }
.notif-list { flex: 1; overflow-y: auto; }
.notif-item { padding: 16px 20px; border-bottom: 1px solid var(--border); cursor: pointer; transition: background 0.2s; display: flex; gap: 12px; align-items: flex-start; }
.notif-item:hover { background: rgba(108,99,255,0.05); }
.notif-item.unread { background: rgba(108,99,255,0.07); }
.notif-item.unread::before { content:''; display:block; width:8px; height:8px; border-radius:50%; background:var(--color-violet); flex-shrink:0; margin-top:6px; }
.notif-icon { font-size: 22px; flex-shrink: 0; }
.notif-content .notif-title { font-size: 14px; font-weight: 600; color: var(--text-primary); }
.notif-content .notif-msg   { font-size: 12px; color: var(--text-muted); margin-top: 2px; line-height: 1.4; }
.notif-content .notif-time  { font-size: 11px; color: var(--text-muted); margin-top: 4px; }
.notif-dot { width: 8px; height: 8px; background: var(--color-pink); border-radius: 50%; display: inline-block; margin-left: 4px; vertical-align: middle; }

/* ── Modal ── */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,0.4); z-index: 500;
  display: flex; align-items: center; justify-content: center; padding: 20px;
  opacity: 0; visibility: hidden; transition: all 0.2s;
  backdrop-filter: blur(2px);
}
.modal-overlay.open { opacity: 1; visibility: visible; }
.modal {
  background: var(--card-bg-solid); border-radius: 16px; border: 1px solid var(--border);
  width: 100%; max-width: 600px; max-height: 90vh; overflow-y: auto;
  box-shadow: var(--shadow-xl);
  transform: scale(0.95) translateY(20px); transition: transform 0.25s;
}
.modal-overlay.open .modal { transform: scale(1) translateY(0); }
.modal-header { padding: 24px 28px 20px; border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; }
.modal-title { font-size: 18px; font-weight: 700; color: var(--text-primary); margin: 0; }
.modal-body  { padding: 28px; }
.modal-footer{ padding: 20px 28px; border-top: 1px solid var(--border); display: flex; justify-content: flex-end; gap: 12px; }
.modal-lg { max-width: 900px; }
.modal-xl { max-width: 1100px; }

/* ── Project Card ── */
.project-card {
  background: var(--card-bg); border: 1px solid var(--border); border-radius: 16px;
  overflow: hidden; transition: all 0.3s; cursor: pointer; text-decoration: none; display: block;
}
.project-card:hover { transform: translateY(-4px); box-shadow: 0 12px 40px rgba(0,0,0,0.3); border-color: var(--border-hover); }
.project-card-header { padding: 20px; background: var(--gradient); position: relative; min-height: 80px; display: flex; align-items: flex-end; }
.project-card-icon { font-size: 32px; position: absolute; top: 16px; left: 20px; }
.project-card-name { font-size: 18px; font-weight: 800; color: #fff; text-shadow: 0 2px 8px rgba(0,0,0,0.3); }
.project-card-body { padding: 18px; }
.project-card-desc { font-size: 13px; color: var(--text-muted); margin-bottom: 14px; line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.project-card-stats { display: flex; gap: 16px; }
.project-stat { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--text-secondary); }
.project-card-footer { padding: 12px 18px; border-top: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; }
.member-avatars { display: flex; }
.member-avatars img { width: 28px; height: 28px; border-radius: 50%; border: 2px solid var(--card-bg); margin-left: -8px; object-fit: cover; }
.member-avatars img:first-child { margin-left: 0; }

/* ── User Avatar ── */
.user-avatar { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; }
.user-info { display: flex; align-items: center; gap: 10px; }
.user-name  { font-size: 14px; font-weight: 600; color: var(--text-primary); }
.user-role  { font-size: 12px; color: var(--text-muted); }

/* ── Progress Bar ── */
.progress { height: 6px; background: var(--border); border-radius: 3px; overflow: hidden; }
.progress-bar { height: 100%; border-radius: 3px; background: var(--gradient-primary); transition: width 0.6s cubic-bezier(0.4,0,0.2,1); }
.progress-bar.success { background: var(--gradient-success); }
.progress-bar.warning { background: var(--gradient-warning); }
.progress-bar.danger  { background: var(--gradient-danger); }

/* ── Tabs ── */
.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--border); margin-bottom: 24px; }
.tab-btn {
  padding: 10px 18px; border: none; background: transparent; cursor: pointer;
  font-size: 14px; font-weight: 500; color: var(--text-muted); font-family: inherit;
  border-bottom: 2px solid transparent; margin-bottom: -1px; transition: all 0.2s; border-radius: 0;
}
.tab-btn:hover { color: var(--color-violet); background: rgba(103,80,164,0.05); }
.tab-btn.active { color: var(--color-violet); border-bottom-color: var(--color-violet); font-weight: 600; }
.tab-content { display: none; }
.tab-content.active { display: block; }

/* ── Search ── */
.search-wrap { position: relative; display: flex; align-items: center; }
.search-icon { position: absolute; left: 14px; color: var(--text-muted); font-size: 16px; }
.search-input { padding: 10px 14px 10px 42px; border-radius: 50px; border: 1.5px solid var(--border); background: var(--bg-secondary); color: var(--text-primary); font-size: 14px; transition: all 0.2s; width: 100%; font-family: inherit; }
.search-input:focus { outline: none; border-color: var(--color-violet); box-shadow: 0 0 0 3px rgba(103,80,164,0.12); background: var(--card-bg-solid); }

/* ── Dropdown ── */
.dropdown { position: relative; display: inline-block; }
.dropdown-menu {
  position: absolute; right: 0; top: calc(100% + 6px); min-width: 210px; z-index: 400;
  background: var(--card-bg-solid); border: 1px solid var(--border); border-radius: 12px;
  box-shadow: var(--shadow-xl); padding: 8px; overflow: hidden;
  opacity: 0; visibility: hidden; transform: translateY(-8px); transition: all 0.2s;
}
.dropdown-menu.open { opacity: 1; visibility: visible; transform: translateY(0); }
.dropdown-item {
  display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 8px;
  font-size: 14px; color: var(--text-primary); cursor: pointer; transition: background 0.15s;
  text-decoration: none; border: none; background: none; width: 100%; font-family: inherit;
}
.dropdown-item:hover { background: rgba(103,80,164,0.08); color: var(--color-violet); }
.dropdown-item.danger:hover { background: rgba(194,24,91,0.08); color: var(--color-pink); }
.dropdown-divider { height: 1px; background: var(--border); margin: 6px 0; }

/* ── Empty State ── */
.empty-state { text-align: center; padding: 60px 20px; color: var(--text-muted); }
.empty-state-icon { font-size: 64px; margin-bottom: 20px; opacity: 0.5; }
.empty-state h3 { font-size: 20px; color: var(--text-secondary); margin-bottom: 8px; }
.empty-state p  { font-size: 14px; max-width: 320px; margin: 0 auto 24px; }

/* ── GitHub Integration ── */
.github-commit { display: flex; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--border); align-items: flex-start; }
.github-commit:last-child { border-bottom: none; }
.commit-sha { font-family: 'Courier New', monospace; font-size: 12px; color: var(--color-indigo); background: rgba(57,73,171,0.08); padding: 2px 8px; border-radius: 6px; white-space: nowrap; }
.commit-msg { font-size: 14px; color: var(--text-primary); flex: 1; line-height: 1.4; }
.commit-meta { font-size: 12px; color: var(--text-muted); white-space: nowrap; }

/* ── Gradients for dynamic use ── */
.bg-gradient-purple-pink { background: linear-gradient(135deg, #6c63ff, #f72585); }
.bg-gradient-cyan-purple  { background: linear-gradient(135deg, #00d4ff, #6c63ff); }
.bg-gradient-green        { background: linear-gradient(135deg, #00e676, #00acc1); }
.bg-gradient-amber        { background: linear-gradient(135deg, #ffab40, #ff6f00); }
.bg-gradient-red          { background: linear-gradient(135deg, #f72585, #b5002f); }

.text-gradient { background: var(--gradient-primary); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.text-violet { color: var(--color-violet); }
.text-pink   { color: var(--color-pink); }
.text-cyan   { color: var(--color-cyan); }
.text-green  { color: var(--color-green); }
.text-amber  { color: var(--color-amber); }
.text-muted  { color: var(--text-muted); }

/* ── Animations ── */
@keyframes fadeInUp    { from { opacity:0; transform:translateY(20px); } to { opacity:1; transform:translateY(0); } }
@keyframes fadeIn      { from { opacity:0; } to { opacity:1; } }
@keyframes slideInLeft { from { opacity:0; transform:translateX(-20px); } to { opacity:1; transform:translateX(0); } }
@keyframes pulse-dot   { 0%,100%{transform:scale(1);opacity:1} 50%{transform:scale(1.5);opacity:0.5} }
@keyframes spin        { from{transform:rotate(0deg)} to{transform:rotate(360deg)} }

.fade-in-up  { animation: fadeInUp  0.4s ease both; }
.fade-in     { animation: fadeIn    0.3s ease both; }
.slide-left  { animation: slideInLeft 0.4s ease both; }

/* Staggered children */
.stagger-children > * { animation: fadeInUp 0.4s ease both; }
.stagger-children > *:nth-child(1) { animation-delay: 0.05s; }
.stagger-children > *:nth-child(2) { animation-delay: 0.1s; }
.stagger-children > *:nth-child(3) { animation-delay: 0.15s; }
.stagger-children > *:nth-child(4) { animation-delay: 0.2s; }
.stagger-children > *:nth-child(5) { animation-delay: 0.25s; }
.stagger-children > *:nth-child(6) { animation-delay: 0.3s; }

/* ── Loading ── */
.spinner { width: 32px; height: 32px; border: 3px solid var(--border); border-top-color: var(--color-violet); border-radius: 50%; animation: spin 0.8s linear infinite; }
.loading-overlay { position: fixed; inset: 0; background: rgba(255,255,255,0.8); z-index: 9999; display: flex; align-items: center; justify-content: center; gap: 16px; font-size: 16px; color: var(--text-primary); }

/* ── Toasts ── */
.toast-container { position: fixed; bottom: 24px; right: 24px; z-index: 9000; display: flex; flex-direction: column; gap: 10px; max-width: 380px; }
.toast {
  background: var(--card-bg-solid); border: 1px solid var(--border); border-radius: 12px;
  padding: 14px 18px; display: flex; align-items: center; gap: 12px;
  box-shadow: var(--shadow-lg); animation: fadeInUp 0.3s ease;
  font-size: 14px; color: var(--text-primary);
}
.toast.success { border-color: var(--color-green);  border-left: 4px solid var(--color-green);  }
.toast.error   { border-color: var(--color-pink);   border-left: 4px solid var(--color-pink);   }
.toast.warning { border-color: var(--color-amber);  border-left: 4px solid var(--color-amber);  }
.toast.info    { border-color: var(--color-violet); border-left: 4px solid var(--color-violet); }
.toast-icon  { font-size: 20px; }
.toast-close { margin-left: auto; cursor: pointer; color: var(--text-muted); font-size: 16px; background: none; border: none; padding: 2px; }

/* ── Admin Panel ── */
.admin-badge { background: linear-gradient(135deg,#6c63ff,#f72585); color:#fff; padding:2px 10px; border-radius:20px; font-size:11px; font-weight:700; letter-spacing:1px; }
.blocked-row { opacity: 0.5; }
.blocked-row td { text-decoration: line-through; }

/* ── Utility ── */
.flex  { display: flex; }
.flex-1 { flex: 1; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.justify-end { justify-content: flex-end; }
.gap-2 { gap: 8px; }
.gap-3 { gap: 12px; }
.gap-4 { gap: 16px; }
.mt-4 { margin-top: 16px; }
.mt-6 { margin-top: 24px; }
.mb-4 { margin-bottom: 16px; }
.mb-6 { margin-bottom: 24px; }
.ml-auto { margin-left: auto; }
.text-right { text-align: right; }
.text-center { text-align: center; }
.fw-bold { font-weight: 700; }
.fw-600  { font-weight: 600; }
.w-100   { width: 100%; }
.d-none  { display: none; }
.d-flex  { display: flex; }

/* ── Responsive ── */
@media (max-width: 1024px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) {
  .sidebar { transform: translateX(-100%); }
  .sidebar.open { transform: translateX(0); }
  .header { left: 0; }
  .main-content { margin-left: 0; }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .form-row, .form-row-3 { grid-template-columns: 1fr; }
  .page-container { padding: 16px; }
  .board-col { min-width: 240px; width: 240px; }
  .modal { max-width: 100%; border-radius: 16px 16px 0 0; align-self: flex-end; }
}
@media (max-width: 480px) {
  .stat-card { flex-direction: column; text-align: center; }
  .board-col { min-width: 220px; width: 220px; }
}

/* ── Color accents for project headers ── */
.project-header-violet { background: linear-gradient(135deg, #6c63ff, #9c63ff); }
.project-header-pink   { background: linear-gradient(135deg, #f72585, #ff6e9a); }
.project-header-cyan   { background: linear-gradient(135deg, #00d4ff, #0099cc); }
.project-header-green  { background: linear-gradient(135deg, #00e676, #00c853); }
.project-header-amber  { background: linear-gradient(135deg, #ffab40, #ff6f00); }
.project-header-teal   { background: linear-gradient(135deg, #00bfa5, #004d40); }
.project-header-indigo { background: linear-gradient(135deg, #3d5afe, #1a237e); }

/* ── Custom select/option ── */
select option { background: var(--card-bg-solid) !important; color: var(--text-primary) !important; }

/* ── Report editor ── */
.report-editor { min-height: 300px; border: 1.5px solid var(--border); border-radius: 12px; padding: 20px; background: var(--input-bg); color: var(--text-primary); font-family: inherit; font-size: 15px; line-height: 1.7; outline: none; }
.report-editor:focus { border-color: var(--color-violet); box-shadow: 0 0 0 3px rgba(103,80,164,0.12); }
.editor-toolbar { display: flex; gap: 4px; padding: 10px; background: var(--bg-tertiary); border-radius: 10px 10px 0 0; border: 1.5px solid var(--border); border-bottom: none; flex-wrap: wrap; }
.editor-btn { padding: 6px 10px; border: none; background: transparent; color: var(--text-muted); cursor: pointer; border-radius: 6px; font-size: 14px; font-family: inherit; transition: all 0.2s; }
.editor-btn:hover { background: rgba(103,80,164,0.08); color: var(--color-violet); }

/* ── Project Sub-Nav ── */
.nav-project-header {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 12px; border-radius: 10px; margin-bottom: 2px;
  font-size: 13px; font-weight: 700; color: var(--text-primary);
}
.nav-sub-item {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 12px 8px 28px; border-radius: 50px; margin-bottom: 1px;
  color: var(--text-secondary); font-size: 13px; font-weight: 500;
  text-decoration: none; transition: all 0.2s;
}
.nav-sub-item:hover { background: rgba(103,80,164,0.08); color: var(--color-violet); }
.nav-sub-item.active { background: rgba(103,80,164,0.12); color: var(--color-violet); font-weight: 600; }
.nav-sub-icon { font-size: 15px; width: 20px; text-align: center; flex-shrink: 0; }