/* ===================================================
   Manifst — Custom Styles
   Stack: Bootstrap 5 + Bootstrap Icons + Inter font
   =================================================== */

/* --- Variables ----------------------------------- */
:root {
  --primary:        #6366f1;
  --primary-dark:   #4f46e5;
  --primary-light:  #e0e7ff;
  --success:        #10b981;
  --warning:        #f59e0b;
  --danger:         #ef4444;
  --info:           #3b82f6;

  --sidebar-bg:     #0f172a;
  --sidebar-text:   #94a3b8;
  --sidebar-hover:  #1e293b;

  --bg:             #f8fafc;
  --surface:        #ffffff;
  --border:         #e2e8f0;

  --text-primary:   #1e293b;
  --text-secondary: #64748b;
  --text-muted:     #94a3b8;

  --radius:         8px;
  --radius-lg:      12px;
  --shadow:         0 1px 3px rgba(0,0,0,.08), 0 1px 2px rgba(0,0,0,.05);
  --shadow-md:      0 4px 6px -1px rgba(0,0,0,.08), 0 2px 4px -1px rgba(0,0,0,.05);
  --shadow-lg:      0 10px 15px -3px rgba(0,0,0,.08), 0 4px 6px -2px rgba(0,0,0,.05);

  --sidebar-w:      260px;
  --header-h:       56px;
}

/* --- Reset & Base -------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg);
  color: var(--text-primary);
  font-size: 14px;
  line-height: 1.6;
  margin: 0;
}
a { color: var(--primary); }

/* ===================================================
   LAYOUT
   =================================================== */
.app-wrapper { display: flex; min-height: 100vh; }

/* --- Sidebar ------------------------------------- */
.sidebar {
  width: var(--sidebar-w);
  background: var(--sidebar-bg);
  display: flex;
  flex-direction: column;
  position: fixed;
  inset: 0 auto 0 0;
  overflow-y: auto;
  z-index: 200;
  transition: transform .25s ease;
  scrollbar-width: none;
}
.sidebar::-webkit-scrollbar { display: none; }

.sidebar-logo {
  padding: 18px 16px;
  display: flex;
  align-items: center;
  gap: 10px;
  border-bottom: 1px solid rgba(255,255,255,.07);
  text-decoration: none;
}
.logo-icon {
  width: 34px; height: 34px;
  background: var(--primary);
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 17px; color: #fff;
  letter-spacing: -1px; flex-shrink: 0;
}
.logo-name {
  font-size: 17px; font-weight: 700; color: #fff; letter-spacing: -.3px;
}

.sidebar-section { padding: 12px 8px 6px; }
.sidebar-section-label {
  font-size: 10px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .8px;
  color: #374151; padding: 0 8px 6px;
}

.sidebar-link {
  display: flex; align-items: center; gap: 9px;
  padding: 7px 10px;
  border-radius: 6px;
  color: var(--sidebar-text);
  text-decoration: none;
  font-size: 13.5px; font-weight: 500;
  margin-bottom: 1px;
  transition: background .13s, color .13s;
}
.sidebar-link:hover { background: var(--sidebar-hover); color: #e2e8f0; }
.sidebar-link.active { background: rgba(99,102,241,.15); color: #a5b4fc; }
.sidebar-link i { font-size: 15px; opacity: .85; width: 18px; text-align: center; }
.sidebar-link.active i { opacity: 1; }
.sidebar-link .nav-badge {
  margin-left: auto;
  background: rgba(255,255,255,.08);
  color: #64748b; font-size: 10.5px;
  padding: 1px 6px; border-radius: 10px; font-weight: 600;
}

.sidebar-bottom {
  margin-top: auto;
  padding: 12px 16px;
  border-top: 1px solid rgba(255,255,255,.07);
}
.sidebar-user {
  display: flex; align-items: center; gap: 10px;
}
.user-avatar {
  width: 32px; height: 32px; border-radius: 50%;
  background: var(--primary);
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 700; color: #fff; flex-shrink: 0;
}
.user-info { flex: 1; min-width: 0; }
.user-name  { font-size: 12.5px; font-weight: 600; color: #e2e8f0; line-height: 1.2; }
.user-role  { font-size: 11px; color: var(--sidebar-text); }
.logout-btn {
  color: #475569; font-size: 16px;
  text-decoration: none; transition: color .15s;
}
.logout-btn:hover { color: #ef4444; }

/* --- Main content -------------------------------- */
.main-content {
  margin-left: var(--sidebar-w);
  flex: 1;
  min-width: 0;          /* Prevents flex child from expanding past viewport */
  overflow-x: hidden;    /* Clips horizontal overflow at the layout boundary */
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* Page header (sticky breadcrumb bar) */
.page-header {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 0 28px;
  height: var(--header-h);
  display: flex; align-items: center; justify-content: space-between;
  position: sticky; top: 0; z-index: 100;
}
.breadcrumb-nav {
  display: flex; align-items: center; gap: 6px;
  font-size: 13px; color: var(--text-secondary);
}
.breadcrumb-nav a { color: var(--text-secondary); text-decoration: none; transition: color .13s; }
.breadcrumb-nav a:hover { color: var(--primary); }
.breadcrumb-nav .sep { color: var(--text-muted); font-size: 11px; }
.breadcrumb-nav .current { color: var(--text-primary); font-weight: 600; }

.page-actions { display: flex; align-items: center; gap: 8px; }

/* Page body */
.page-body { padding: 28px; flex: 1; }

/* Page title area */
.page-title-row {
  display: flex; align-items: flex-start; justify-content: space-between;
  margin-bottom: 24px; gap: 16px;
}
.page-title {
  font-size: 22px; font-weight: 700;
  color: var(--text-primary); letter-spacing: -.4px; line-height: 1.2;
}
.page-subtitle { font-size: 13px; color: var(--text-secondary); margin-top: 3px; }

/* ===================================================
   CARDS
   =================================================== */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.card-header-bar {
  padding: 14px 20px;
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
}
.card-title-sm { font-size: 13.5px; font-weight: 600; color: var(--text-primary); }
.card-body { padding: 20px; }

/* ===================================================
   STATS GRID (dashboard)
   =================================================== */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 16px; margin-bottom: 28px;
}
.stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 14px 16px;
  box-shadow: var(--shadow);
  display: flex; flex-direction: column; gap: 4px;
}
.stat-icon {
  width: 32px; height: 32px; border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; margin-bottom: 8px;
}
.stat-icon.purple { background: #f5f3ff; color: var(--primary); }
.stat-icon.blue   { background: #eff6ff; color: var(--info); }
.stat-icon.green  { background: #ecfdf5; color: var(--success); }
.stat-icon.orange { background: #fffbeb; color: var(--warning); }

.stat-label { font-size: 10px; font-weight: 600; text-transform: uppercase; letter-spacing: .5px; color: var(--text-secondary); }
.stat-value { font-size: 22px; font-weight: 800; color: var(--text-primary); letter-spacing: -.5px; line-height: 1.1; }
.stat-sub   { font-size: 12px; color: var(--text-secondary); margin-top: 2px; }

/* ===================================================
   STATUS BADGES
   =================================================== */
.badge-status {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 9px; border-radius: 100px;
  font-size: 11px; font-weight: 700;
  letter-spacing: .3px; text-transform: uppercase; white-space: nowrap;
}

.priority-badge {
  display: inline-block;
  padding: 2px 8px; border-radius: 100px;
  font-size: 11px; font-weight: 700;
  letter-spacing: .3px; text-transform: uppercase; white-space: nowrap;
}
.badge-status::before {
  content: none;
}
.s-backlog     { background: #f1f5f9; color: #64748b; }
.s-todo        { background: #eff6ff; color: #2563eb; }
.s-in_progress { background: #fffbeb; color: #b45309; }
.s-in_review   { background: #f5f3ff; color: #7c3aed; }
.s-done        { background: #ecfdf5; color: #059669; }
.s-blocked     { background: #fef2f2; color: #dc2626; }

/* ===================================================
   TABLE
   =================================================== */
.manifst-table { width: 100%; border-collapse: collapse; }
.manifst-table thead th {
  font-size: 11px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .5px;
  color: var(--text-secondary);
  padding: 10px 16px; text-align: left;
  border-bottom: 1px solid var(--border);
  background: #f8fafc; white-space: nowrap;
}
.manifst-table tbody td {
  padding: 12px 16px;
  border-bottom: 1px solid #f1f5f9;
  font-size: 13.5px; vertical-align: middle;
}
.manifst-table tbody tr:last-child td { border-bottom: none; }
.manifst-table tbody tr:hover td { background: #fafbff; }

.tbl-link {
  color: var(--text-primary); text-decoration: none;
  font-weight: 500; transition: color .13s;
}
.tbl-link:hover { color: var(--primary); }

.row-id {
  font-size: 11px; font-weight: 600; color: var(--text-muted);
  font-family: 'Courier New', monospace;
}

/* ===================================================
   BUTTONS
   =================================================== */
.btn-manifst {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 15px; border-radius: 6px;
  font-size: 13.5px; font-weight: 500;
  cursor: pointer; border: none; text-decoration: none;
  transition: background .15s, color .15s, box-shadow .15s;
  white-space: nowrap; line-height: 1.4;
}
.btn-manifst:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }

.btn-primary2 {
  background: var(--primary); color: #fff;
}
.btn-primary2:hover { background: var(--primary-dark); color: #fff; }
.btn-primary2:disabled { background: #cbd5e1; color: #94a3b8; cursor: not-allowed; pointer-events: auto; }

.btn-secondary2 {
  background: var(--surface); color: var(--text-primary);
  border: 1px solid var(--border);
}
.btn-secondary2:hover { background: #f8fafc; color: var(--text-primary); }

.btn-ghost {
  background: transparent; color: var(--text-secondary);
  border: 1px solid transparent;
}
.btn-ghost:hover { background: #f1f5f9; color: var(--text-primary); }

.btn-danger2 {
  background: #fef2f2; color: #dc2626;
  border: 1px solid #fecaca;
}
.btn-danger2:hover { background: #fee2e2; }

.btn-sm2 { padding: 5px 10px; font-size: 12.5px; }
.btn-icon2 { width: 30px; height: 30px; padding: 0; justify-content: center; }

/* Icon action buttons in tables */
.act-btn {
  width: 30px; height: 30px;
  display: inline-flex; align-items: center; justify-content: center;
  border: none; border-radius: 6px; cursor: pointer;
  font-size: 14px; transition: all .13s; background: transparent;
  color: var(--text-secondary); text-decoration: none;
}
.act-btn:hover { background: #f1f5f9; color: var(--text-primary); }
.act-btn.edit:hover { background: #eff6ff; color: #2563eb; }
.act-btn.del:hover  { background: #fef2f2; color: #dc2626; }
.act-btn.view:hover { background: #f5f3ff; color: var(--primary); }

/* ===================================================
   FILTER BAR
   =================================================== */
.filter-bar {
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 20px; flex-wrap: wrap;
}
.filter-bar .form-select,
.filter-bar .form-control {
  font-size: 13px; border-radius: 6px; border-color: var(--border);
  color: var(--text-primary); height: 36px; padding: 0 10px;
}
.search-wrap { position: relative; }
.search-wrap i {
  position: absolute; left: 10px; top: 50%; transform: translateY(-50%);
  color: var(--text-muted); pointer-events: none; font-size: 13px;
}
.search-wrap input { padding-left: 32px !important; }

/* ===================================================
   PROGRESS BAR (mini)
   =================================================== */
.prog-bar { height: 5px; border-radius: 3px; background: #e2e8f0; overflow: hidden; }
.prog-fill { height: 100%; border-radius: 3px; background: var(--primary); transition: width .3s; }
.prog-fill.green  { background: var(--success); }
.prog-fill.orange { background: var(--warning); }

/* ===================================================
   STORY POINTS CHIP
   =================================================== */
.sp-chip {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 24px; height: 22px; padding: 0 6px;
  background: #f5f3ff; color: #7c3aed;
  border-radius: 6px; font-size: 11.5px; font-weight: 700;
}

/* ===================================================
   HIERARCHY PATH
   =================================================== */
.hier-path {
  display: flex; align-items: center; gap: 5px;
  font-size: 12px; color: var(--text-secondary); margin-bottom: 5px;
}
.hier-path a { color: var(--primary); text-decoration: none; }
.hier-path a:hover { text-decoration: underline; }
.hier-sep { color: var(--text-muted); }

/* ===================================================
   DETAIL PAGE — 2-col layout
   =================================================== */
.detail-grid {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 24px; align-items: start;
}
.detail-meta-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 16px;
}
.meta-item label {
  font-size: 11px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .5px; color: var(--text-secondary); display: block; margin-bottom: 5px;
}
.meta-item .meta-val { font-size: 14px; font-weight: 500; color: var(--text-primary); }

/* ===================================================
   TIME TRACKING PANEL
   =================================================== */
.time-total-box {
  background: #f5f3ff; border: 1px solid #ddd6fe;
  border-radius: var(--radius); padding: 14px 16px;
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 16px;
}
.time-total-label { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .5px; color: #5b21b6; }
.time-total-value { font-size: 20px; font-weight: 800; color: #5b21b6; letter-spacing: -.3px; }

.time-entry {
  padding: 11px 0; border-bottom: 1px solid #f1f5f9;
}
.time-entry:last-child { border-bottom: none; }
.time-entry-head {
  display: flex; align-items: center; justify-content: space-between; margin-bottom: 3px;
}
.time-dur  { font-size: 13px; font-weight: 700; color: var(--primary); }
.time-date { font-size: 11.5px; color: var(--text-muted); }
.time-comment { font-size: 13px; color: var(--text-secondary); }
.time-user { font-size: 11.5px; color: var(--text-muted); margin-top: 2px; }

/* ===================================================
   TABS
   =================================================== */
.page-tabs {
  display: flex; gap: 0;
  border-bottom: 1px solid var(--border);
  margin-bottom: 24px;
}
.page-tab {
  padding: 9px 18px;
  font-size: 13.5px; font-weight: 500;
  color: var(--text-secondary); cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px; transition: all .13s;
  text-decoration: none; background: none; border-top: none; border-left: none; border-right: none;
}
.page-tab:hover, .page-tab.active { color: var(--primary); border-bottom-color: var(--primary); }

/* ===================================================
   EMPTY STATE
   =================================================== */
.empty-state {
  display: flex; flex-direction: column; align-items: center;
  text-align: center; padding: 60px 24px; color: var(--text-secondary);
}
.empty-state > i { font-size: 44px; opacity: .25; display: block; margin-bottom: 14px; }
.empty-state h5 { font-size: 15px; font-weight: 600; color: var(--text-primary); margin-bottom: 6px; }
.empty-state p  { font-size: 13px; margin-bottom: 18px; }

/* ===================================================
   MODALS
   =================================================== */
.modal-header { border-bottom: 1px solid var(--border); padding: 16px 20px; }
.modal-title  { font-size: 15px; font-weight: 700; }
.modal-body   { padding: 20px; }
.modal-footer { border-top: 1px solid var(--border); padding: 12px 20px; }

/* ===================================================
   FORMS
   =================================================== */
.form-label { font-size: 13px; font-weight: 600; color: var(--text-primary); margin-bottom: 5px; }
.form-control, .form-select {
  font-size: 13.5px; border: 1px solid var(--border); border-radius: 6px;
  padding: 8px 12px; color: var(--text-primary); transition: border-color .15s, box-shadow .15s;
}
.form-control:focus, .form-select:focus {
  border-color: var(--primary); box-shadow: 0 0 0 3px rgba(99,102,241,.12); outline: none;
}
textarea.form-control { resize: vertical; min-height: 80px; }

/* ===================================================
   LOGIN PAGE
   =================================================== */
.login-page {
  min-height: 100vh;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, #0f172a 0%, #1e1b4b 50%, #0f172a 100%);
  padding: 24px;
}
.login-card {
  background: #fff; border-radius: 16px;
  padding: 40px; width: 100%; max-width: 400px;
  box-shadow: 0 25px 50px -12px rgba(0,0,0,.5);
}
.login-logo { text-align: center; margin-bottom: 32px; }
.login-logo-icon {
  width: 52px; height: 52px; background: var(--primary);
  border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  font-size: 24px; font-weight: 800; color: #fff;
  margin: 0 auto 12px;
}
.login-logo h1 { font-size: 24px; font-weight: 800; color: var(--text-primary); letter-spacing: -.5px; }
.login-logo p  { font-size: 13px; color: var(--text-secondary); margin-top: 3px; }
.login-btn {
  width: 100%; padding: 10px; font-size: 14px; font-weight: 600;
  background: var(--primary); color: #fff; border: none; border-radius: 8px;
  cursor: pointer; transition: background .15s;
}
.login-btn:hover { background: var(--primary-dark); }

/* ===================================================
   TOAST
   =================================================== */
.toast-wrap {
  position: fixed; bottom: 22px; right: 22px; z-index: 9999;
  display: flex; flex-direction: column; gap: 8px; pointer-events: none;
}
.toast-msg {
  background: #1e293b; color: #fff;
  padding: 12px 16px; border-radius: 8px;
  font-size: 13.5px; box-shadow: var(--shadow-lg);
  display: flex; align-items: center; gap: 10px;
  min-width: 240px; pointer-events: all;
  animation: toastIn .25s ease;
}
.toast-msg.ok  { border-left: 3px solid var(--success); }
.toast-msg.err { border-left: 3px solid var(--danger); }
.toast-msg.info{ border-left: 3px solid var(--info); }
@keyframes toastIn { from { transform: translateX(30px); opacity: 0; } to { transform: none; opacity: 1; } }

/* ===================================================
   DASHBOARD QUICK LINKS
   =================================================== */
.quick-links { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.quick-link {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 16px; border-radius: var(--radius);
  border: 1px solid var(--border); background: var(--surface);
  text-decoration: none; transition: all .15s;
}
.quick-link:hover { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(99,102,241,.08); }
.quick-link-icon {
  width: 36px; height: 36px; border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-size: 16px; flex-shrink: 0;
}
.quick-link-text .ql-title { font-size: 13px; font-weight: 600; color: var(--text-primary); }
.quick-link-text .ql-sub   { font-size: 11.5px; color: var(--text-secondary); }

/* ===================================================
   RESPONSIVE
   =================================================== */
@media (max-width: 900px) {
  .sidebar { transform: translateX(-100%); }
  .sidebar.open { transform: translateX(0); }
  .main-content { margin-left: 0; }

  .detail-grid { grid-template-columns: 1fr; }
  .detail-meta-grid { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .page-body  { padding: 16px; }
  .page-header { padding: 0 16px; }
}
@media (max-width: 500px) {
  .stats-grid { grid-template-columns: 1fr; }
  .quick-links { grid-template-columns: 1fr; }
}

/* Utility */
.text-muted2  { color: var(--text-muted) !important; }
.text-secondary2 { color: var(--text-secondary) !important; }
.gap-6 { gap: 6px; }
.mt-1 { margin-top: 4px; }

/* ===================================================
   SPRINT BADGES
   =================================================== */
.sprint-badge {
  display: inline-flex; align-items: center;
  padding: 3px 9px; border-radius: 100px;
  font-size: 11px; font-weight: 700;
  letter-spacing: .3px; white-space: nowrap;
}
.spr-planning  { background: #eff6ff; color: #2563eb; }
.spr-active    { background: #ecfdf5; color: #059669; border: 1px solid #a7f3d0; }
.spr-completed { background: #f1f5f9; color: #64748b; }

/* ===================================================
   ACTIVE SPRINT HERO (sprints.html)
   =================================================== */
.active-sprint-hero { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; overflow: hidden; border-top: 4px solid var(--success); box-shadow: var(--shadow); }
.ash-header { background: linear-gradient(135deg, #f0fdf4 0%, var(--surface) 65%); padding: 20px 24px 16px; display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; border-bottom: 1px solid rgba(0,0,0,.05); }
.ash-label  { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .7px; color: var(--success); display: flex; align-items: center; gap: 6px; margin-bottom: 6px; }
.ash-title  { font-size: 22px; font-weight: 800; letter-spacing: -.5px; line-height: 1.2; }
.ash-goal   { font-size: 13px; color: var(--text-secondary); margin-top: 4px; }
.ash-stat-grid { display: grid; grid-template-columns: repeat(5, 1fr); border-bottom: 1px solid var(--border); }
.ash-stat-item { padding: 14px 18px; }
.ash-stat-item + .ash-stat-item { border-left: 1px solid var(--border); }
.ash-stat-val { font-size: 17px; font-weight: 700; letter-spacing: -.3px; line-height: 1.2; }
.ash-stat-lbl { font-size: 10.5px; color: var(--text-muted); text-transform: uppercase; letter-spacing: .3px; margin-top: 3px; }
.ash-progress-wrap { padding: 16px 24px 18px; }
.ash-progress-bar  { height: 8px; background: #e2e8f0; border-radius: 4px; overflow: hidden; margin-top: 6px; }
.ash-progress-fill { height: 100%; border-radius: 4px; background: var(--success); transition: width .4s ease; }

/* Sprint item card (list) */
.sprint-item { background: var(--surface); border: 1px solid var(--border); border-radius: 10px; border-top: 3px solid var(--border); overflow: hidden; transition: box-shadow .15s; }
.sprint-item:hover { box-shadow: var(--shadow-md); }
.sprint-item.active    { border-top-color: var(--success); }
.sprint-item.planning  { border-top-color: var(--primary); }
.sprint-item.completed { border-top-color: #cbd5e1; opacity: .82; }
.si-body   { padding: 14px 18px 12px; }
.si-title  { font-size: 15.5px; font-weight: 700; letter-spacing: -.2px; margin: 5px 0 2px; }
.si-goal   { font-size: 12.5px; color: var(--text-secondary); }
.si-meta   { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; font-size: 12px; color: var(--text-secondary); margin-top: 10px; }
.si-prog   { margin-top: 10px; }
.si-prog-bar  { height: 5px; background: #e2e8f0; border-radius: 3px; overflow: hidden; margin-top: 4px; }
.si-prog-fill { height: 100%; border-radius: 3px; background: var(--success); transition: width .3s; }
.si-prog-fill.blue { background: var(--primary); }
.si-footer { border-top: 1px solid var(--border); padding: 9px 18px; display: flex; align-items: center; justify-content: space-between; background: #fafafa; }

/* ===================================================
   SPRINT INFO BANNER (kanban.html)
   =================================================== */
.sprint-banner {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 16px 22px;
  margin-bottom: 20px;
  display: flex; align-items: center; gap: 28px; flex-wrap: wrap;
  box-shadow: var(--shadow);
}
.sprint-banner-title {
  font-size: 15px; font-weight: 700; color: var(--text-primary);
  display: flex; align-items: center; gap: 10px;
}
.sprint-banner-sep { color: var(--border); font-size: 20px; font-weight: 300; }
.sprint-banner-stat { text-align: center; }
.sprint-banner-stat .val { font-size: 18px; font-weight: 800; color: var(--text-primary); letter-spacing: -.3px; }
.sprint-banner-stat .lbl { font-size: 10.5px; font-weight: 600; text-transform: uppercase; letter-spacing: .5px; color: var(--text-secondary); }

/* ===================================================
   KANBAN BOARD
   =================================================== */
.kanban-wrapper {
  display: flex; gap: 14px;
  overflow-x: auto; align-items: flex-start;
  padding-bottom: 24px;
  /* Allow horizontal scroll without vertical overflow */
  min-height: calc(100vh - 180px);
}
.kanban-wrapper::-webkit-scrollbar { height: 6px; }
.kanban-wrapper::-webkit-scrollbar-track { background: transparent; }
.kanban-wrapper::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 3px; }

.kanban-col {
  min-width: 262px; max-width: 262px;
  background: #f1f5f9;
  border-radius: 10px;
  flex-shrink: 0;
  display: flex; flex-direction: column;
  max-height: calc(100vh - 200px);
}

.kanban-col-header {
  padding: 11px 14px;
  border-radius: 10px 10px 0 0;
  display: flex; align-items: center; justify-content: space-between;
  border-top: 3px solid transparent;
  flex-shrink: 0;
}
.kanban-col-header.h-backlog     { border-top-color: #64748b; }
.kanban-col-header.h-todo        { border-top-color: #2563eb; }
.kanban-col-header.h-in_progress { border-top-color: #b45309; }
.kanban-col-header.h-in_review   { border-top-color: #7c3aed; }
.kanban-col-header.h-done        { border-top-color: #059669; }
.kanban-col-header.h-blocked     { border-top-color: #dc2626; }
/* Custom (user-created) columns */
.kanban-col-header.h-custom { border-top-color: #6366f1; }

.kanban-col-title {
  font-size: 12px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .5px; color: var(--text-primary);
}
.kanban-col-count {
  background: rgba(0,0,0,.07);
  color: var(--text-secondary);
  font-size: 11px; font-weight: 700;
  padding: 2px 7px; border-radius: 10px;
}

.kanban-col-body {
  padding: 8px;
  overflow-y: auto;
  flex: 1;
  display: flex; flex-direction: column; gap: 8px;
  min-height: 80px;
}
.kanban-col-body::-webkit-scrollbar { width: 4px; }
.kanban-col-body::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 2px; }

/* Drop zone feedback — card */
.kanban-col.drag-over .kanban-col-body {
  background: rgba(99, 102, 241, .06);
  outline: 2px dashed var(--primary);
  border-radius: 0 0 10px 10px;
}

/* Column drag handle */
.kanban-col-drag-handle {
  color: transparent;
  font-size: 14px;
  cursor: grab;
  line-height: 1;
  flex-shrink: 0;
  transition: color .15s;
}
.kanban-col-header:hover .kanban-col-drag-handle { color: var(--text-muted); }
.kanban-col-drag-handle:active { cursor: grabbing; }

/* Column being dragged */
.kanban-col.col-dragging {
  opacity: .4;
  outline: 2px dashed var(--border);
}

/* Drop indicator between columns */
.kanban-col-drop-ind {
  width: 4px;
  border-radius: 4px;
  background: var(--primary);
  flex-shrink: 0;
  align-self: flex-start;
  box-shadow: 0 0 10px rgba(99, 102, 241, .45);
  animation: indPulse .55s ease-in-out infinite alternate;
}
@keyframes indPulse { from { opacity: .7; } to { opacity: 1; } }

/* Column delete button */
.kanban-col-del-btn {
  background: none; border: none; padding: 0 2px;
  color: transparent; font-size: 14px; line-height: 1;
  cursor: pointer; border-radius: 4px; transition: color .15s, background .15s;
}
.kanban-col-header:hover .kanban-col-del-btn { color: var(--text-muted); }
.kanban-col-del-btn:hover { color: var(--danger) !important; background: rgba(220,38,38,.08); }

/* Add column button */
.kanban-add-col {
  min-width: 180px; max-width: 180px;
  height: 52px;
  background: none;
  border: 2px dashed var(--border);
  border-radius: 10px;
  flex-shrink: 0;
  display: flex; align-items: center; justify-content: center; gap: 6px;
  color: var(--text-muted);
  font-size: 13px; font-weight: 600;
  cursor: pointer;
  transition: border-color .15s, color .15s, background .15s;
  align-self: flex-start;
}
.kanban-add-col:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: rgba(99,102,241,.04);
}

/* Kanban card */
.kanban-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px;
  box-shadow: var(--shadow);
  cursor: grab;
  transition: box-shadow .15s, transform .15s;
  user-select: none;
}
.kanban-card:hover { box-shadow: var(--shadow-md); transform: translateY(-1px); }
.kanban-card:active { cursor: grabbing; }
.kanban-card.dragging { opacity: .4; box-shadow: none; transform: rotate(1deg); }

.kanban-card-title {
  font-size: 13px; font-weight: 600; color: var(--text-primary);
  line-height: 1.4; margin-bottom: 8px;
  text-decoration: none; display: block;
}
.kanban-card-title:hover { color: var(--primary); }

.kanban-card-footer {
  display: flex; align-items: center; justify-content: space-between;
  margin-top: 10px; flex-wrap: wrap; gap: 4px;
}
.kanban-card-epic {
  font-size: 11px; color: var(--text-muted);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  max-width: 130px;
}
.kanban-card-meta {
  display: flex; align-items: center; gap: 6px; flex-shrink: 0;
}
.kanban-card-time {
  font-size: 11px; color: var(--text-secondary);
  display: flex; align-items: center; gap: 3px;
}

/* Add card placeholder in empty column */
.kanban-empty-col {
  border: 2px dashed #cbd5e1;
  border-radius: 6px; padding: 20px;
  text-align: center;
  font-size: 12px; color: var(--text-muted);
}

/* Sprint selector top bar (kanban) */
.kanban-topbar {
  display: flex; align-items: center; gap: 12px;
  margin-bottom: 18px; flex-wrap: wrap;
}
.kanban-topbar .form-select {
  font-size: 13.5px; font-weight: 500;
  border-radius: 8px; border-color: var(--border);
  width: auto; min-width: 200px;
}
.sprint-active-dot {
  display: inline-block; width: 7px; height: 7px;
  background: var(--success); border-radius: 50%; margin-right: 4px;
}

/* Burndown chart */
.burndown-wrap {
  padding: 16px 24px 20px;
  border-top: 1px solid var(--border);
}
.burndown-lbl {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .5px;
  color: var(--text-muted);
  margin-bottom: 10px;
}
.si-burndown {
  display: none;
  padding: 12px 18px 16px;
  border-top: 1px solid var(--border);
  background: #fafbfc;
  border-radius: 0 0 10px 10px;
}
.si-burndown.open { display: block; }

/* ===================================================
   Vue simplifiée — Toggle & Workflow
   =================================================== */
.view-toggle-group {
  display: flex;
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 3px;
  gap: 2px;
}
.view-toggle-btn {
  background: transparent;
  border: none;
  border-radius: 6px;
  padding: 5px 12px;
  font-size: 12.5px;
  font-weight: 500;
  color: var(--text-secondary);
  cursor: pointer;
  transition: background .15s, color .15s;
  line-height: 1.4;
  white-space: nowrap;
}
.view-toggle-btn:hover { background: #f1f5f9; color: var(--text-primary); }
.view-toggle-btn.active { background: var(--primary); color: #fff; }

/* Workflow container */
.wf-container {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.wf-row {
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 4px solid var(--border);
  border-radius: 10px;
  padding: 16px 20px;
  display: grid;
  grid-template-columns: minmax(180px, 220px) 1fr auto;
  align-items: center;
  gap: 24px;
  transition: box-shadow .15s;
}
.wf-row:hover { box-shadow: var(--shadow-md); }
.wf-row.planning  { border-left-color: var(--primary); }
.wf-row.active    { border-left-color: var(--success); }
.wf-row.completed { border-left-color: #cbd5e1; opacity: .85; }

.wf-row-head { display: flex; align-items: center; gap: 6px; margin-bottom: 4px; }
.wf-row-title { font-size: 14px; font-weight: 700; color: var(--text-primary); line-height: 1.3; }
.wf-row-meta { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.wf-meta-chip {
  font-size: 11.5px;
  color: var(--text-muted);
  display: inline-flex;
  align-items: center;
}

/* Steps */
.wf-steps-wrap {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 0;
}
.wf-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
}
.wf-dot {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  border: 2px solid var(--border);
  background: var(--surface);
  color: var(--text-muted);
  transition: background .2s, border-color .2s, color .2s;
  position: relative;
  z-index: 1;
}
.wf-dot.done    { background: var(--success); border-color: var(--success); color: #fff; }
.wf-dot.active  { background: var(--primary); border-color: var(--primary); color: #fff; box-shadow: 0 0 0 4px rgba(99,102,241,.15); }
.wf-dot.pending { background: #f1f5f9; border-color: #e2e8f0; color: #94a3b8; }
.wf-step-lbl {
  font-size: 10.5px;
  font-weight: 600;
  color: var(--text-muted);
  white-space: nowrap;
  text-transform: uppercase;
  letter-spacing: .3px;
}
.wf-step .wf-dot.done    + .wf-step-lbl { color: var(--success); }
.wf-step .wf-dot.active  + .wf-step-lbl { color: var(--primary); }

.wf-line {
  width: 48px;
  height: 2px;
  background: #e2e8f0;
  margin-top: 16px; /* align vertically with dot center (34px dot / 2 = 17px - 1px border) */
  flex-shrink: 0;
  transition: background .2s;
}
.wf-line.done   { background: var(--success); }
.wf-line.active { background: linear-gradient(to right, var(--success), var(--primary)); }

.wf-row-actions {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 6px;
  flex-shrink: 0;
  min-width: 140px;
}
.wf-blocked-hint {
  font-size: 11.5px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
}

@media (max-width: 900px) {
  .wf-row { grid-template-columns: 1fr; gap: 14px; }
  .wf-row-actions { align-items: flex-start; flex-direction: row; flex-wrap: wrap; }
  .wf-line { width: 28px; }
}

/* ===================================================
   Quill WYSIWYG editor overrides
   =================================================== */
.ql-toolbar.ql-snow {
  border: 1px solid var(--border);
  border-bottom: none;
  border-radius: var(--radius) var(--radius) 0 0;
  background: #f8fafc;
  font-family: 'Inter', sans-serif;
}
.ql-container.ql-snow {
  border: 1px solid var(--border);
  border-radius: 0 0 var(--radius) var(--radius);
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  min-height: 150px;
}
.ql-editor { min-height: 150px; }
.ql-editor p { margin-bottom: 4px; }

/* Quill dropdowns must appear above Bootstrap modals (z-index 1060) */
.ql-toolbar .ql-picker-options { z-index: 1100 !important; }
.ql-tooltip { z-index: 1100 !important; }

/* ===================================================
   Attachment zone
   =================================================== */
.attach-zone {
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  padding: 18px;
  text-align: center;
  cursor: pointer;
  transition: border-color .15s, background .15s;
  background: #fafafa;
  color: var(--text-muted);
  font-size: 13px;
}
.attach-zone:hover,
.attach-zone.drag-over {
  border-color: var(--primary);
  background: var(--primary-light);
  color: var(--primary);
}
.attach-zone i { font-size: 20px; display: block; margin-bottom: 4px; }

.attach-list { display: flex; flex-direction: column; gap: 6px; margin-top: 10px; }

.attach-item {
  display: flex; align-items: center; gap: 10px;
  background: #f8fafc;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 7px 10px;
  font-size: 13px;
}
.attach-item .ai-icon {
  font-size: 18px; color: var(--text-secondary); flex-shrink: 0;
}
.attach-item .ai-name {
  flex: 1; font-weight: 500; overflow: hidden;
  text-overflow: ellipsis; white-space: nowrap;
}
.attach-item .ai-size { color: var(--text-muted); font-size: 11.5px; flex-shrink: 0; }
.attach-item .ai-del {
  background: none; border: none; cursor: pointer;
  color: var(--text-muted); padding: 0; font-size: 15px; flex-shrink: 0;
  line-height: 1; transition: color .15s;
}
.attach-item .ai-del:hover { color: var(--danger); }

/* ===================================================
   Sprint Planning Wizard
   =================================================== */
.planning-stepper {
  display: flex;
  align-items: flex-start;
  padding: 20px 32px 0;
  gap: 0;
}
.planning-step-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  flex: 0 0 auto;
}
.planning-step-dot {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 2px solid var(--border);
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  color: var(--text-muted);
  transition: all .25s;
}
.planning-step-item.active .planning-step-dot {
  border-color: var(--primary);
  background: var(--primary);
  color: #fff;
}
.planning-step-item.done .planning-step-dot {
  border-color: var(--success);
  background: var(--success);
  color: #fff;
}
.planning-step-lbl {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  white-space: nowrap;
  transition: color .25s;
}
.planning-step-item.active .planning-step-lbl { color: var(--primary); }
.planning-step-item.done  .planning-step-lbl  { color: var(--success); }
.planning-step-line {
  flex: 1;
  height: 2px;
  background: var(--border);
  margin-top: 17px;
  align-self: flex-start;
  transition: background .3s;
}
.planning-step-line.done { background: var(--success); }

/* Step content animation */
.planning-step-content { display: none; }
.planning-step-content.visible {
  display: block;
  animation: planning-slide-in .22s ease-out;
}
.planning-step-content.visible.back {
  animation: planning-slide-in-back .22s ease-out;
}
@keyframes planning-slide-in {
  from { opacity: 0; transform: translateX(30px); }
  to   { opacity: 1; transform: translateX(0); }
}
@keyframes planning-slide-in-back {
  from { opacity: 0; transform: translateX(-30px); }
  to   { opacity: 1; transform: translateX(0); }
}

/* Checklist (Step 1) */
.planning-checklist { display: flex; flex-direction: column; gap: 10px; margin-top: 4px; }
.planning-check-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 16px;
  border: 2px solid var(--border);
  border-radius: 10px;
  cursor: pointer;
  transition: all .18s;
  background: #fff;
  user-select: none;
}
.planning-check-item:hover { border-color: var(--primary); background: var(--primary-light); }
.planning-check-item.checked { border-color: var(--success); background: #f0fdf4; }
.pci-icon {
  width: 28px; height: 28px;
  border-radius: 50%;
  border: 2px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; color: var(--text-muted);
  flex-shrink: 0; margin-top: 1px;
  transition: all .18s;
}
.planning-check-item.checked .pci-icon {
  background: var(--success); border-color: var(--success); color: #fff;
}
.pci-title { font-size: 13.5px; font-weight: 600; color: var(--text); margin-bottom: 2px; }
.pci-desc  { font-size: 12px; color: var(--text-muted); line-height: 1.45; }

/* Info sections (Step 2) */
.planning-section {
  background: #f8fafc;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
}
.planning-section-lbl {
  font-size: 10.5px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .5px;
  color: var(--text-muted); margin-bottom: 8px;
}
.velocity-badge {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--primary-light); color: var(--primary);
  font-weight: 700; font-size: 20px;
  padding: 6px 16px; border-radius: 8px;
}
.dod-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 6px; }
.dod-list li { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text-secondary); }
.dod-list li::before {
  content: ''; width: 7px; height: 7px;
  border-radius: 50%; background: var(--success); flex-shrink: 0;
}

/* US Table (Step 3) */
.planning-us-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.planning-us-table th {
  background: #f8fafc; padding: 8px 12px; text-align: left;
  font-size: 11px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .4px; color: var(--text-muted);
  border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 1;
}
.planning-us-table td { padding: 10px 12px; border-bottom: 1px solid #f1f5f9; vertical-align: middle; }
.planning-us-table tr:last-child td { border-bottom: none; }
/* Vélocité éditable (Step 2) */
.vel-ref-row {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 12px; background: var(--primary-light);
  border-radius: 8px; margin-bottom: 10px;
}
.vel-ref-lbl { font-size: 11.5px; font-weight: 600; color: var(--primary); flex: 1; }
.vel-ref-val {
  font-size: 18px; font-weight: 800; color: var(--primary);
  background: #fff; border-radius: 6px; padding: 2px 10px;
  border: 1px solid var(--primary);
}
.vel-target-row { display: flex; align-items: center; gap: 10px; margin-top: 4px; }
.vel-target-lbl { font-size: 12px; font-weight: 500; color: var(--text-secondary); flex: 1; }
.vel-target-input {
  width: 72px; text-align: center; padding: 5px 8px;
  border: 1px solid var(--border); border-radius: 6px;
  font-size: 15px; font-weight: 700; color: var(--text);
}
.vel-target-input:focus {
  outline: none; border-color: var(--primary);
  box-shadow: 0 0 0 2px var(--primary-light);
}

/* Fibonacci SP buttons (Step 3) */
.fib-btns { display: flex; flex-wrap: wrap; gap: 3px; justify-content: center; }
.fib-btn {
  min-width: 28px; height: 28px; padding: 0 5px;
  border: 1px solid var(--border); border-radius: 5px;
  background: #f8fafc; color: var(--text-secondary);
  font-size: 12px; font-weight: 600; cursor: pointer;
  transition: all .12s; line-height: 1; display: flex;
  align-items: center; justify-content: center;
}
.fib-btn:hover { border-color: var(--primary); color: var(--primary); background: var(--primary-light); }
.fib-btn.active {
  background: var(--primary); border-color: var(--primary);
  color: #fff; box-shadow: 0 1px 4px rgba(99,102,241,.3);
}
/* In form context: left-align, slightly larger touch targets */
.fib-btns.fib-form { justify-content: flex-start; }
.fib-btns.fib-form .fib-btn { min-width: 34px; height: 32px; font-size: 13px; }
/* Compact (used inside planning bi-panel sprint table) */
.fib-btns-compact { display: flex; flex-wrap: wrap; gap: 2px; justify-content: flex-start; }
.fib-btns-compact .fib-btn { min-width: 24px; height: 24px; font-size: 11px; padding: 0 3px; border-radius: 4px; }

/* ===================================================
   Sprint Planning — Bi-panel (Step 3)
   =================================================== */
.planning-panel-wrap {
  display: flex; gap: 0; min-height: 380px;
}
.planning-sprint-panel { flex: 3; min-width: 0; padding-right: 16px;}
.planning-backlog-panel {
  flex: 2; min-width: 0;
  border-left: 1px solid var(--border);
  padding-left: 16px;
  display: flex; flex-direction: column;
}
.planning-panel-hdr {
  font-size: 11px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .5px; color: var(--text-muted);
  padding-bottom: 8px; margin-bottom: 8px;
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
}
.planning-panel-count {
  font-size: 11px; font-weight: 600;
  background: var(--primary-light); color: var(--primary);
  border-radius: 12px; padding: 1px 8px;
}
.planning-panel-scroll { overflow-y: auto; max-height: 330px; }
.planning-backlog-search {
  width: 100%; padding: 5px 10px;
  border: 1px solid var(--border); border-radius: 6px;
  font-size: 12.5px; margin-bottom: 8px; outline: none;
  background: #f8fafc;
}
.planning-backlog-search:focus { border-color: var(--primary); background: #fff; }

/* ===================================================
   Sprint Planning — Team capacity (Step 2)
   =================================================== */
.capacity-member-row {
  display: grid; grid-template-columns: 1fr 56px 16px 20px;
  align-items: center; gap: 8px;
  padding: 5px 0; border-bottom: 1px solid #f1f5f9;
}
.capacity-member-row:last-child { border-bottom: none; }
.capacity-name-input {
  padding: 4px 8px; border: 1px solid var(--border);
  border-radius: 6px; font-size: 13px; width: 100%;
}
.capacity-days-input {
  width: 100%; text-align: center; padding: 4px 4px;
  border: 1px solid var(--border); border-radius: 6px; font-size: 13px;
}
.capacity-name-input:focus, .capacity-days-input:focus {
  outline: none; border-color: var(--primary);
  box-shadow: 0 0 0 2px var(--primary-light);
}
.capacity-del-btn {
  background: none; border: none; color: var(--text-muted);
  cursor: pointer; padding: 0; font-size: 14px; line-height: 1;
}
.capacity-del-btn:hover { color: var(--danger); }
.capacity-total-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 8px 0 0; margin-top: 6px;
  border-top: 2px solid var(--border);
  font-size: 13px; font-weight: 600;
}

/* ===================================================
   Acceptance Criteria
   =================================================== */
.ac-list { display: flex; flex-direction: column; gap: 6px; }
.ac-item {
  display: flex; align-items: flex-start; gap: 8px;
  font-size: 13px; color: var(--text-secondary); line-height: 1.45;
}
.ac-item::before {
  content: ''; flex-shrink: 0; width: 7px; height: 7px;
  border-radius: 50%; background: var(--primary); margin-top: 5px;
}
/* Edit mode: dynamic rows */
.ac-edit-row {
  display: flex; align-items: center; gap: 8px; margin-bottom: 6px;
}
.ac-edit-input {
  flex: 1; padding: 5px 10px;
  border: 1px solid var(--border); border-radius: 6px; font-size: 13px;
}
.ac-edit-input:focus {
  outline: none; border-color: var(--primary);
  box-shadow: 0 0 0 2px var(--primary-light);
}
/* Mini AC list inside sprint planning Step 3 expand row */
.ac-mini-row { background: #fafbfc; }
.ac-mini-list { display: flex; flex-direction: column; gap: 4px; padding: 6px 0 2px; }
.ac-mini-item {
  display: flex; align-items: flex-start; gap: 6px;
  font-size: 11.5px; color: var(--text-secondary); line-height: 1.4;
}
.ac-mini-item i { color: var(--success); flex-shrink: 0; margin-top: 1px; }

/* ===================================================
   Planning Summary Modal
   =================================================== */
.summary-section { margin-bottom: 18px; }
.summary-section-lbl {
  font-size: 10.5px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .5px; color: var(--text-muted); margin-bottom: 8px;
}
.summary-goal-box {
  background: var(--primary-light); border-left: 3px solid var(--primary);
  padding: 10px 14px; border-radius: 0 6px 6px 0;
  font-size: 13.5px; color: var(--text); font-style: italic; line-height: 1.5;
}
.summary-stats-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px;
}
.summary-stat {
  background: #f8fafc; border: 1px solid var(--border);
  border-radius: 8px; padding: 10px 14px; text-align: center;
}
.summary-stat-val { font-size: 22px; font-weight: 800; color: var(--text); line-height: 1; }
.summary-stat-lbl { font-size: 11px; color: var(--text-muted); margin-top: 4px; }
.summary-us-row {
  display: flex; align-items: center; gap: 10px;
  padding: 7px 0; border-bottom: 1px solid #f1f5f9; font-size: 13px;
}
.summary-us-row:last-child { border-bottom: none; }
.summary-us-title { flex: 1; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.summary-new-badge {
  font-size: 10px; font-weight: 700; background: #ecfdf5; color: var(--success);
  border: 1px solid var(--success); border-radius: 4px; padding: 1px 5px;
}
.summary-dod-list { display: flex; flex-direction: column; gap: 5px; padding-left: 0px;}
.summary-dod-item {
  display: flex; align-items: center; gap: 8px;
  font-size: 12.5px; color: var(--text-secondary);
}
.summary-dod-item i { color: var(--success); flex-shrink: 0; }

/* ---- Scrum Role Badge ---- */
.scrum-role-badge {
  display: inline-block;
  font-size: 13px;
  font-weight: 400;
  padding: 3px 9px;
  border-radius: 100px;
  white-space: nowrap;
}

/* ---- Password rules checklist ---- */
.pwd-rules {
  list-style: none; padding: 0; margin: 0;
  display: flex; flex-direction: column; gap: 4px;
}
.pwd-rule {
  display: flex; align-items: center; gap: 7px;
  font-size: 12.5px; color: var(--text-muted);
  transition: color .2s;
}
.pwd-rule i { font-size: 11px; flex-shrink: 0; transition: color .2s; }
.pwd-rule.ok { color: var(--success, #10b981); }
.pwd-rule.ok i { color: var(--success, #10b981); }

/* ====================================================
   Rétrospective
   ==================================================== */
.retro-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  align-items: start;
}

.retro-col {
  border-radius: 10px;
  border: 1.5px solid var(--border);
  overflow: hidden;
  background: var(--surface);
}

.retro-col-header {
  display: flex; align-items: center; gap: 8px;
  padding: 12px 14px 10px;
  border-bottom: 1px solid var(--border);
}
.retro-col-icon  { font-size: 16px; line-height: 1; }
.retro-col-title { font-size: 13px; font-weight: 600; color: var(--text-primary); flex: 1; }
.retro-col-count {
  font-size: 11px; font-weight: 700;
  background: #f1f5f9; color: var(--text-muted);
  border-radius: 10px; padding: 1px 7px; min-width: 20px; text-align: center;
}

.retro-went-well { border-top: 3px solid #10b981; }
.retro-problem   { border-top: 3px solid #f59e0b; }
.retro-action    { border-top: 3px solid #6366f1; }

.retro-items { padding: 8px 0; min-height: 60px; }

.retro-item {
  display: flex; align-items: flex-start; gap: 8px;
  padding: 7px 12px;
  transition: background .1s;
}
.retro-item:hover { background: #f8fafc; }
.retro-item.done .retro-item-text { text-decoration: line-through; color: var(--text-muted); }

.retro-check {
  margin-top: 2px; flex-shrink: 0; cursor: pointer;
  accent-color: #6366f1;
}
.retro-item-text { flex: 1; font-size: 13px; color: var(--text-secondary); line-height: 1.5; }
.retro-del-btn {
  background: none; border: none; cursor: pointer; padding: 2px 4px;
  border-radius: 4px; color: var(--text-muted); opacity: 0; flex-shrink: 0;
  font-size: 10px; transition: opacity .15s, color .15s;
}
.retro-item:hover .retro-del-btn { opacity: 1; }
.retro-del-btn:hover { color: var(--danger, #ef4444); }

.retro-empty { font-size: 12.5px; color: var(--text-muted); padding: 8px 14px; font-style: italic; }

.retro-add-row {
  display: flex; gap: 6px; align-items: center;
  padding: 8px 12px 12px;
  border-top: 1px solid var(--border);
}
.retro-input {
  flex: 1; border: 1px solid var(--border); border-radius: 6px;
  padding: 5px 10px; font-size: 13px; color: var(--text-primary);
  background: var(--bg, #f8fafc); outline: none;
  transition: border-color .15s;
}
.retro-input:focus { border-color: var(--primary); background: #fff; }
.retro-add-btn {
  width: 30px; height: 30px; border-radius: 6px; border: none; cursor: pointer;
  background: var(--primary); color: #fff; font-size: 14px;
  display: flex; align-items: center; justify-content: center;
  transition: opacity .15s;
}
.retro-add-btn:hover { opacity: .85; }

/* ====================================================
   Discussion / Comments
   ==================================================== */
.comment-avatar {
  width: 34px; height: 34px; border-radius: 50%; flex-shrink: 0;
  background: var(--primary); color: #fff;
  font-size: 12px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  letter-spacing: .3px; user-select: none;
}

.comment-item {
  display: flex; gap: 12px; align-items: flex-start;
  padding: 14px 0; border-bottom: 1px solid var(--border);
}
.comment-item:last-child { border-bottom: none; }

.comment-body { flex: 1; min-width: 0; }

.comment-header {
  display: flex; align-items: center; gap: 8px;
  flex-wrap: wrap; margin-bottom: 6px;
}
.comment-author { font-size: 13px; font-weight: 600; color: var(--text-primary); }
.comment-date   { font-size: 11.5px; color: var(--text-muted); }
.comment-edited { font-size: 10.5px; color: var(--text-muted); font-style: italic; }

.comment-actions { margin-left: auto; display: flex; gap: 4px; }
.comment-action-btn {
  background: none; border: none; cursor: pointer; padding: 2px 6px;
  border-radius: 4px; font-size: 11.5px; color: var(--text-muted);
  transition: background .15s, color .15s;
}
.comment-action-btn:hover { background: var(--bg-hover, #f1f5f9); color: var(--text-primary); }
.comment-action-btn.del:hover { background: #fef2f2; color: var(--danger, #ef4444); }

.comment-content { font-size: 13.5px; line-height: 1.6; color: var(--text-secondary); word-break: break-word; }
.comment-content p { margin: 0 0 4px; }
.comment-content p:last-child { margin-bottom: 0; }

/* Mention chip inside comment content */
.comment-mention {
  display: inline-block; background: #ede9fe; color: #6d28d9;
  border-radius: 4px; padding: 0 5px; font-weight: 600;
  font-size: 12.5px; line-height: 1.5;
}

/* New comment compose area */
.comment-compose { padding: 14px 16px 16px; border-top: 1px solid var(--border); }
.comment-compose-row { display: flex; gap: 10px; align-items: flex-start; }
.comment-editor-wrap { flex: 1; position: relative; }

/* Quill overrides for comment box */
#comment-editor .ql-editor { min-height: 72px; font-size: 13.5px; padding: 8px 10px; border-radius: 0 0 6px 6px; }
#comment-editor-container .ql-toolbar { border-radius: 6px 6px 0 0; }
#comment-editor-container .ql-container { border-radius: 0 0 6px 6px; }

/* Edit-in-place editor for existing comments */
.comment-edit-box { margin-top: 8px; }
.comment-edit-box .ql-editor { min-height: 60px; font-size: 13.5px; padding: 8px 10px; }
.comment-edit-actions { display: flex; justify-content: flex-end; gap: 6px; margin-top: 6px; }

/* @mention dropdown */
.mention-dropdown {
  position: fixed; z-index: 2000;
  background: var(--surface, #fff); border: 1px solid var(--border);
  border-radius: 8px; box-shadow: 0 4px 16px rgba(0,0,0,.12);
  overflow: hidden;
}
.mention-item {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 12px; cursor: pointer; font-size: 13px;
  transition: background .1s;
}
.mention-item:hover, .mention-item.active { background: #f1f5f9; }
.mention-item-av {
  width: 26px; height: 26px; border-radius: 50%;
  background: var(--primary); color: #fff;
  font-size: 10px; font-weight: 700; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
}
.mention-item-name { font-weight: 500; color: var(--text-primary); }
.mention-item-email { font-size: 11px; color: var(--text-muted); }

/* Comment list empty state */
.comment-empty { padding: 28px 0; text-align: center; color: var(--text-muted); font-size: 13.5px; }
.comment-empty i { font-size: 30px; display: block; margin-bottom: 8px; }

/* Sidebar project bar */
.sidebar-project-bar {
  display: none;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border-bottom: 1px solid rgba(255,255,255,.07);
  font-size: 12px; font-weight: 600; color: #cbd5e1;
  min-width: 0;
}
.sb-proj-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: #6366f1; flex-shrink: 0;
}
.sb-proj-name {
  flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.sb-proj-change {
  color: #64748b; font-size: 13px; flex-shrink: 0; text-decoration: none;
  transition: color .15s;
}
.sb-proj-change:hover { color: #a5b4fc; }
