/* ============================================================
   GestãoPro — Design System
   Fonte: Inter (Google Fonts)
   Paleta: Azul navy + Branco + Cinzas suaves
   ============================================================ */

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

:root {
  /* Cores primárias */
  --primary:        #1a3558;
  --primary-dark:   #102540;
  --primary-light:  #2563eb;
  --accent:         #0ea5e9;
  --accent-light:   #e0f2fe;

  /* Neutros */
  --bg:             #f0f4f8;
  --surface:        #ffffff;
  --surface-2:      #f8fafc;
  --surface-3:      #f1f5f9;
  --border:         #e2e8f0;
  --border-strong:  #cbd5e1;

  /* Texto */
  --text:           #0d1b2e;
  --text-2:         #3d5068;
  --text-3:         #8fa3bc;

  /* Status */
  --green:          #059669;
  --green-bg:       #d1fae5;
  --yellow:         #d97706;
  --yellow-bg:      #fef3c7;
  --red:            #dc2626;
  --red-bg:         #fee2e2;
  --blue:           #2563eb;
  --blue-bg:        #dbeafe;
  --purple:         #7c3aed;
  --purple-bg:      #ede9fe;
  --orange:         #ea580c;
  --orange-bg:      #ffedd5;

  /* Sombras */
  --shadow-sm:  0 1px 2px rgba(0,0,0,.05), 0 1px 3px rgba(0,0,0,.04);
  --shadow:     0 4px 16px rgba(0,0,0,.07), 0 2px 4px rgba(0,0,0,.04);
  --shadow-lg:  0 12px 32px rgba(0,0,0,.10), 0 4px 8px rgba(0,0,0,.05);
  --shadow-xl:  0 24px 56px rgba(0,0,0,.14);

  /* Raios */
  --r-sm:  6px;
  --r:     10px;
  --r-lg:  14px;
  --r-xl:  20px;

  /* Sidebar */
  --sidebar-w: 256px;
  --header-h:  60px;

  /* Transições */
  --ease: cubic-bezier(.4,0,.2,1);
}

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

body {
  font-family: 'Plus Jakarta Sans', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  letter-spacing: -.01em;
}

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
button { cursor: pointer; font-family: inherit; }
input, textarea, select { font-family: inherit; }

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

/* Sidebar colapsada no desktop */
body.sidebar-collapsed .sidebar {
  transform: translateX(-260px);
}
body.sidebar-collapsed .main-content {
  margin-left: 0;
}

/* Sidebar */
.sidebar {
  width: var(--sidebar-w);
  background: var(--primary);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0; left: 0; bottom: 0;
  z-index: 200;
  transition: transform .3s var(--ease);
  overflow-y: auto;
  overflow-x: hidden;
}

.sidebar-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 20px 20px 18px;
  border-bottom: 1px solid rgba(255,255,255,.08);
}
.sidebar-logo-icon {
  width: 38px; height: 38px;
  background: rgba(255,255,255,.15);
  border-radius: var(--r);
  display: flex; align-items: center; justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}
.sidebar-logo-text { color: #fff; }
.sidebar-logo-text strong { display: block; font-size: 15px; font-weight: 700; }
.sidebar-logo-text span { font-size: 11px; color: rgba(255,255,255,.5); }

.sidebar-section {
  padding: 20px 12px 8px;
}
.sidebar-section-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: rgba(255,255,255,.35);
  padding: 0 10px;
  margin-bottom: 6px;
}
.sidebar-nav { list-style: none; display: flex; flex-direction: column; gap: 2px; }
.sidebar-nav a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border-radius: var(--r-sm);
  font-size: 13.5px;
  font-weight: 500;
  color: rgba(255,255,255,.65);
  transition: background .15s, color .15s;
  position: relative;
}
.sidebar-nav a:hover { background: rgba(255,255,255,.08); color: #fff; }
.sidebar-nav a.active {
  background: rgba(255,255,255,.14);
  color: #fff;
  font-weight: 600;
}
.sidebar-nav a.active::before {
  content: '';
  position: absolute;
  left: -12px;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 20px;
  background: #fff;
  border-radius: 0 3px 3px 0;
}
.sidebar-nav a .nav-icon { width: 18px; height: 18px; flex-shrink: 0; opacity: .75; }
.sidebar-nav a:hover .nav-icon { opacity: 1; }
.sidebar-nav a.active .nav-icon { opacity: 1; }
.sidebar-nav a .nav-arrow { margin-left: auto; opacity: .4; width: 14px; }

.sidebar-footer {
  margin-top: auto;
  padding: 16px 12px;
  border-top: 1px solid rgba(255,255,255,.08);
}
.btn-new-project {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 10px;
  background: rgba(255,255,255,.12);
  border: 1px solid rgba(255,255,255,.15);
  border-radius: var(--r);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  transition: background .15s;
}
.btn-new-project:hover { background: rgba(255,255,255,.2); }

/* Main */
.main-content {
  margin-left: var(--sidebar-w);
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* Header */
.top-bar {
  height: var(--header-h);
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  padding: 0 24px;
  gap: 16px;
  position: sticky;
  top: 0;
  z-index: 50;
}
.top-bar-breadcrumb {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--text-2);
}
.top-bar-breadcrumb a { color: var(--text-2); transition: color .15s; }
.top-bar-breadcrumb a:hover { color: var(--primary-light); }
.top-bar-breadcrumb .sep { color: var(--text-3); }
.top-bar-breadcrumb .current { color: var(--text); font-weight: 600; }
.top-bar-actions { margin-left: auto; display: flex; align-items: center; gap: 8px; }

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

/* Hamburger / sidebar toggle */
.hamburger {
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  padding: 8px;
  border-radius: var(--r-sm);
  color: var(--text-2);
  cursor: pointer;
  flex-shrink: 0;
}
.hamburger:hover { background: var(--bg); color: var(--text); }

/* Overlay */
.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.5);
  z-index: 190;
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
}

/* --- Buttons ----------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: var(--r);
  font-size: 13.5px;
  font-weight: 600;
  border: none;
  transition: all .15s var(--ease);
  white-space: nowrap;
  line-height: 1;
}
.btn svg { width: 15px; height: 15px; flex-shrink: 0; }

.btn-primary {
  background: var(--primary-light);
  color: #fff;
  box-shadow: 0 1px 3px rgba(37,99,235,.3);
}
.btn-primary:hover { background: #1d4ed8; box-shadow: 0 4px 12px rgba(37,99,235,.35); transform: translateY(-1px); }
.btn-primary:active { transform: translateY(0); }

.btn-secondary {
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}
.btn-secondary:hover { background: var(--bg); border-color: var(--border-strong); }

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

.btn-ghost {
  background: transparent;
  color: var(--text-2);
  padding: 6px 10px;
}
.btn-ghost:hover { background: var(--bg); color: var(--text); }

.btn-sm { padding: 6px 12px; font-size: 12.5px; }
.btn-sm svg { width: 13px; height: 13px; }
.btn-xs { padding: 4px 8px; font-size: 11.5px; }
.btn-xs svg { width: 12px; height: 12px; }
.btn-icon { padding: 7px; border-radius: var(--r-sm); }

/* --- Cards -------------------------------------------------- */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-sm);
}
.card-header {
  padding: 18px 20px 14px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.card-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
}
.card-body { padding: 20px; }

/* --- Stat cards -------------------------------------------- */
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  box-shadow: var(--shadow-sm);
  transition: box-shadow .2s, transform .2s;
}
.stat-card:hover { box-shadow: var(--shadow); transform: translateY(-2px); }
.stat-icon {
  width: 48px; height: 48px;
  border-radius: var(--r);
  display: flex; align-items: center; justify-content: center;
  font-size: 22px;
  flex-shrink: 0;
}
.stat-icon svg { width: 22px; height: 22px; }
.stat-value { font-size: 26px; font-weight: 800; color: var(--text); line-height: 1; }
.stat-label { font-size: 12px; color: var(--text-2); margin-top: 3px; }

/* --- Project cards ----------------------------------------- */
.projects-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.project-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: box-shadow .2s, transform .2s;
  display: flex;
  flex-direction: column;
}
.project-card:hover { box-shadow: var(--shadow-lg); transform: translateY(-4px); border-color: var(--border-strong); }
.project-card-bar { height: 5px; width: 100%; }
.project-card-body { padding: 18px; flex: 1; display: flex; flex-direction: column; }
.project-card-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; margin-bottom: 8px; }
.project-card-name { font-size: 14px; font-weight: 700; color: var(--text); line-height: 1.3; }
.project-card-meta { font-size: 11.5px; color: var(--text-3); margin-top: 3px; display: flex; align-items: center; gap: 4px; }
.project-card-desc { font-size: 12.5px; color: var(--text-2); line-height: 1.5; margin-bottom: 14px; flex: 1;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.project-card-progress { margin-bottom: 12px; }
.project-card-progress-header { display: flex; justify-content: space-between; margin-bottom: 5px; font-size: 11.5px; color: var(--text-2); }
.project-card-progress-header strong { color: var(--text); }
.progress-bar { height: 5px; background: var(--border); border-radius: 99px; overflow: hidden; }
.progress-fill { height: 100%; border-radius: 99px; transition: width .6s var(--ease); }
.project-card-dates { font-size: 11.5px; color: var(--text-3); display: flex; align-items: center; gap: 4px; margin-bottom: 14px; }
.project-card-actions { display: flex; gap: 8px; padding-top: 12px; border-top: 1px solid var(--border); }
.project-card-actions .btn-primary { flex: 1; justify-content: center; }

/* --- Badges ------------------------------------------------- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 9px;
  border-radius: 99px;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
}
.badge-dot { width: 6px; height: 6px; border-radius: 50%; flex-shrink: 0; }

.badge-active    { background: var(--green-bg);  color: #065f46; }
.badge-planning  { background: var(--purple-bg); color: #5b21b6; }
.badge-on_hold   { background: var(--yellow-bg); color: #92400e; }
.badge-completed { background: var(--blue-bg);   color: #1e40af; }
.badge-cancelled { background: #f1f5f9;           color: #64748b; }

.badge-open      { background: var(--blue-bg);   color: #1e40af; }
.badge-in_progress { background: var(--yellow-bg); color: #92400e; }
.badge-resolved  { background: var(--green-bg);  color: #065f46; }

/* Issue type badges */
.badge-informativo { background: #e0f2fe; color: #0369a1; }
.badge-deliberativo { background: #ede9fe; color: #5b21b6; }
.badge-apoio       { background: #d1fae5; color: #065f46; }
.badge-risco       { background: #fef3c7; color: #92400e; }
.badge-bloqueio    { background: #fee2e2; color: #991b1b; }

/* Priority */
.badge-low      { background: #f1f5f9; color: #64748b; }
.badge-medium   { background: var(--blue-bg); color: #1e40af; }
.badge-high     { background: var(--orange-bg); color: #9a3412; }
.badge-critical { background: var(--red-bg); color: #991b1b; }

/* --- Forms -------------------------------------------------- */
.form-group { margin-bottom: 18px; }
.form-label {
  display: block;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 6px;
}
.form-label .req { color: var(--red); }
.form-control {
  width: 100%;
  padding: 9px 12px;
  border: 1px solid var(--border);
  border-radius: var(--r);
  font-size: 13.5px;
  color: var(--text);
  background: var(--surface);
  transition: border-color .15s, box-shadow .15s;
  outline: none;
}
.form-control:focus {
  border-color: var(--primary-light);
  box-shadow: 0 0 0 3px rgba(37,99,235,.1);
}
.form-control::placeholder { color: var(--text-3); }
textarea.form-control { resize: vertical; min-height: 90px; }
select.form-control { cursor: pointer; }
.form-hint { font-size: 11.5px; color: var(--text-3); margin-top: 4px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-row-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 16px; }

/* --- Tables ------------------------------------------------- */
.table-wrap { overflow-x: auto; border-radius: var(--r-lg); border: 1px solid var(--border); }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
thead tr { background: var(--surface-2); border-bottom: 1px solid var(--border); }
thead th {
  padding: 10px 14px;
  text-align: left;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--text-2);
  white-space: nowrap;
}
tbody tr { border-bottom: 1px solid var(--border); transition: background .12s; }
tbody tr:last-child { border-bottom: none; }
tbody tr:nth-child(even) { background: var(--surface-2); }
tbody tr:hover { background: var(--accent-light) !important; }
tbody td { padding: 12px 14px; vertical-align: middle; }

/* --- Filters bar ------------------------------------------- */
.filters-bar {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}
.search-wrap { position: relative; flex: 1; min-width: 200px; }
.search-wrap svg { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); width: 15px; height: 15px; color: var(--text-3); pointer-events: none; }
.search-wrap input { padding-left: 34px; }

/* --- Modal -------------------------------------------------- */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15,23,42,.55);
  backdrop-filter: blur(4px);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s;
}
.modal-backdrop.open { opacity: 1; pointer-events: all; }
.modal {
  background: var(--surface);
  border-radius: var(--r-xl);
  box-shadow: var(--shadow-xl);
  width: 100%;
  max-width: 580px;
  max-height: 90vh;
  overflow-y: auto;
  transform: scale(.95) translateY(10px);
  transition: transform .25s var(--ease);
}
.modal-backdrop.open .modal { transform: scale(1) translateY(0); }
.modal-header {
  padding: 20px 24px 16px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.modal-title { font-size: 16px; font-weight: 700; }
.modal-close {
  width: 30px; height: 30px;
  border-radius: var(--r-sm);
  background: var(--bg);
  border: none;
  display: flex; align-items: center; justify-content: center;
  color: var(--text-2);
  transition: background .15s;
}
.modal-close:hover { background: var(--border); }
.modal-body { padding: 20px 24px; }
.modal-footer {
  padding: 14px 24px 20px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

/* --- Toast -------------------------------------------------- */
#toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}
.toast {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  background: var(--text);
  color: #fff;
  border-radius: var(--r);
  font-size: 13.5px;
  font-weight: 500;
  box-shadow: var(--shadow-lg);
  pointer-events: all;
  animation: slideUp .25s var(--ease);
  max-width: 360px;
}
.toast.success { background: #065f46; }
.toast.error   { background: #991b1b; }
.toast.warning { background: #92400e; }
@keyframes slideUp { from { transform: translateY(12px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
@keyframes fadeOut { to { opacity: 0; transform: translateY(-6px); } }
.toast.removing { animation: fadeOut .2s var(--ease) forwards; }

/* --- Empty state ------------------------------------------- */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  text-align: center;
}
.empty-icon {
  width: 64px; height: 64px;
  background: var(--bg);
  border-radius: var(--r-xl);
  display: flex; align-items: center; justify-content: center;
  font-size: 28px;
  margin-bottom: 16px;
}
.empty-title { font-size: 16px; font-weight: 700; margin-bottom: 6px; }
.empty-desc { font-size: 13.5px; color: var(--text-2); max-width: 320px; }

/* --- Loading ----------------------------------------------- */
.spinner {
  width: 36px; height: 36px;
  border: 3px solid var(--border);
  border-top-color: var(--primary-light);
  border-radius: 50%;
  animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.loading-center { display: flex; justify-content: center; align-items: center; min-height: 200px; }

/* --- Section header ---------------------------------------- */
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
  gap: 12px;
}
.section-title { font-size: 16px; font-weight: 700; color: var(--text); }
.section-subtitle { font-size: 12.5px; color: var(--text-2); margin-top: 2px; }

/* --- Page header ------------------------------------------- */
.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
  gap: 16px;
}
.page-title { font-size: 22px; font-weight: 800; color: var(--text); letter-spacing: -.03em; }
.page-subtitle { font-size: 13.5px; color: var(--text-2); margin-top: 3px; font-weight: 500; }

/* ============================================================
   PROJECT DETAIL — Visão fiel à imagem de referência
   ============================================================ */
.detail-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  box-shadow: 0 2px 8px rgba(0,0,0,.06), 0 1px 2px rgba(0,0,0,.04);
  margin-bottom: 20px;
  overflow: hidden;
  transition: box-shadow .2s;
}
.detail-card:hover { box-shadow: 0 4px 20px rgba(0,0,0,.08), 0 2px 4px rgba(0,0,0,.04); }

/* Cabeçalho do projeto */
.detail-header {
  padding: 24px 28px 20px;
  border-bottom: 1px solid var(--border);
}
.detail-header-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 4px;
}
.detail-company {
  display: flex;
  align-items: center;
  gap: 10px;
}
.detail-company-logo {
  font-size: 22px;
  font-weight: 900;
  color: var(--primary);
  letter-spacing: -.03em;
  font-family: 'Inter', sans-serif;
}
.detail-company-div {
  font-size: 16px;
  font-weight: 700;
  color: var(--primary);
}
.detail-project-name {
  font-size: 22px;
  font-weight: 800;
  color: var(--primary);
  text-align: right;
}
.detail-date {
  font-size: 11.5px;
  color: var(--text-3);
  text-align: right;
  margin-bottom: 4px;
}
.detail-overview {
  font-size: 13.5px;
  color: var(--text);
  padding: 12px 0 0;
  border-top: 2px solid var(--primary);
  margin-top: 12px;
}
.detail-overview strong { font-weight: 700; }

/* Timeline + Objetivo + Progresso */
.detail-timeline-row {
  display: grid;
  grid-template-columns: 200px 1fr 100px;
  gap: 0;
  border-bottom: 1px solid var(--border);
}
.detail-objective {
  padding: 16px 18px;
  border-right: 1px solid var(--border);
  background: var(--primary);
}
.detail-objective-label {
  font-size: 9px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: rgba(255,255,255,.7);
  margin-bottom: 6px;
}
.detail-objective-text {
  font-size: 11.5px;
  color: rgba(255,255,255,.9);
  line-height: 1.5;
}

.detail-timeline {
  padding: 16px 20px 20px;
  border-right: 1px solid var(--border);
}
.detail-timeline-title {
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--text-3);
  text-align: center;
  margin-bottom: 10px;
}
/* Timeline track — espaço vertical generoso para labels acima e datas abaixo */
.timeline-track {
  position: relative;
  padding: 0 12px;
  /* 28px para label acima + 6px barra + 28px para data abaixo */
  margin: 28px 0 28px;
}
.timeline-line {
  height: 6px;
  background: var(--border);
  border-radius: 99px;
  position: relative;
  overflow: visible;
}
.timeline-line::before {
  content: '';
  position: absolute;
  left: 0; top: 0;
  height: 100%;
  width: var(--fill, 0%);
  background: linear-gradient(90deg, var(--primary), var(--primary-light));
  border-radius: 99px;
  transition: width .8s var(--ease);
}
.timeline-milestones {
  position: absolute;
  /* centrado na barra: a barra tem 6px de altura, o track tem margin 28px acima */
  top: 3px; /* metade da barra */
  left: 12px; right: 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.timeline-milestone {
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
}
.timeline-milestone-dot {
  width: 14px; height: 14px;
  border-radius: 50%;
  background: var(--border);
  border: 2.5px solid var(--surface);
  box-shadow: 0 0 0 2px var(--border-strong);
  z-index: 2;
  flex-shrink: 0;
  transition: background .3s, box-shadow .3s;
}
.timeline-milestone-dot.done {
  background: var(--primary);
  box-shadow: 0 0 0 2px var(--primary);
}
.timeline-milestone-dot.current {
  background: var(--accent);
  box-shadow: 0 0 0 3px rgba(14,165,233,.3);
}
.timeline-milestone-label {
  position: absolute;
  /* 7px = metade do dot; 8px = gap */
  bottom: calc(7px + 8px);
  left: 50%;
  transform: translateX(-50%);
  font-size: 9.5px;
  font-weight: 700;
  color: var(--primary);
  white-space: nowrap;
  text-align: center;
  max-width: 72px;
  line-height: 1.2;
  overflow: hidden;
  text-overflow: ellipsis;
  background: var(--surface);
  padding: 1px 3px;
  border-radius: 3px;
}
.timeline-milestone-date {
  position: absolute;
  top: calc(7px + 8px);
  left: 50%;
  transform: translateX(-50%);
  font-size: 9px;
  color: var(--text-3);
  white-space: nowrap;
  font-weight: 600;
  background: var(--surface);
  padding: 1px 3px;
  border-radius: 3px;
}

.detail-progress-box {
  padding: 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
.progress-ring-wrap { position: relative; width: 72px; height: 72px; }
.progress-ring-svg { transform: rotate(-90deg); }
.progress-ring-bg { fill: none; stroke: var(--border); stroke-width: 7; }
.progress-ring-fill { fill: none; stroke: var(--primary-light); stroke-width: 7; stroke-linecap: round; transition: stroke-dashoffset .8s var(--ease); }
.progress-ring-text {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  font-weight: 800;
  color: var(--text);
}

/* Status columns */
.detail-status-row {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  border-bottom: 1px solid var(--border);
}
.detail-status-col {
  padding: 14px 18px;
  border-right: 1px solid var(--border);
}
.detail-status-col:last-child { border-right: none; }
.detail-status-header {
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--surface);
  background: var(--primary);
  padding: 6px 12px;
  border-radius: var(--r-sm);
  margin-bottom: 10px;
  text-align: center;
}
.detail-status-list { list-style: none; }
.detail-status-list li {
  font-size: 12.5px;
  color: var(--text);
  padding: 3px 0 3px 14px;
  position: relative;
  line-height: 1.5;
}
.detail-status-list li::before {
  content: '•';
  position: absolute;
  left: 2px;
  color: var(--text-3);
}

/* Issues table */
.issues-table-header {
  display: grid;
  grid-template-columns: 36px 90px 1fr 1fr 130px 90px 110px;
  gap: 0;
  background: var(--primary);
  padding: 8px 14px;
  border-radius: var(--r-sm) var(--r-sm) 0 0;
}
.issues-table-header span {
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .07em;
  color: rgba(255,255,255,.85);
}

/* Legend */
.legend-bar {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 10px 14px;
  background: var(--surface-2);
  border-top: 1px solid var(--border);
  font-size: 11.5px;
  color: var(--text-2);
  flex-wrap: wrap;
}
.legend-item { display: flex; align-items: center; gap: 5px; }
.legend-symbol {
  width: 20px; height: 20px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 10px;
  font-weight: 800;
  flex-shrink: 0;
}

/* --- Slide-over (painel lateral deslizante) ---------------- */
.slideover-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15,23,42,.45);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
  z-index: 300;
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s var(--ease);
}
.slideover-backdrop.open { opacity: 1; pointer-events: all; }
.slideover {
  position: fixed;
  top: 0; right: 0; bottom: 0;
  width: min(680px, 95vw);
  background: var(--surface);
  box-shadow: -8px 0 40px rgba(0,0,0,.14);
  z-index: 301;
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform .3s var(--ease);
  overflow: hidden;
}
.slideover-backdrop.open .slideover { transform: translateX(0); }
.slideover-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 24px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
  background: var(--surface);
  position: sticky;
  top: 0;
  z-index: 1;
}
.slideover-title { font-size: 17px; font-weight: 700; color: var(--text); }
.slideover-close {
  width: 32px; height: 32px;
  border-radius: var(--r-sm);
  background: var(--bg);
  border: none;
  display: flex; align-items: center; justify-content: center;
  color: var(--text-2);
  transition: background .15s;
  flex-shrink: 0;
}
.slideover-close:hover { background: var(--border); color: var(--text); }
.slideover-body {
  flex: 1;
  overflow-y: auto;
  padding: 24px;
}
.slideover-footer {
  padding: 14px 24px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  flex-shrink: 0;
  background: var(--surface);
}
.slideover-section {
  margin-bottom: 24px;
}
.slideover-section-title {
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--text-3);
  margin-bottom: 14px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
}

/* --- Version history --------------------------------------- */
.version-item {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
}
.version-item:last-child { border-bottom: none; }
.version-badge {
  background: var(--primary);
  color: #fff;
  padding: 4px 10px;
  border-radius: var(--r-sm);
  font-size: 12px;
  font-weight: 700;
  flex-shrink: 0;
}
.version-info { flex: 1; }
.version-notes { font-size: 13px; color: var(--text); }
.version-date { font-size: 11.5px; color: var(--text-3); margin-top: 3px; }

/* --- Animations -------------------------------------------- */
@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
.animate-in { animation: fadeIn .35s var(--ease) both; }
.delay-1 { animation-delay: .06s; }
.delay-2 { animation-delay: .12s; }
.delay-3 { animation-delay: .18s; }
.delay-4 { animation-delay: .24s; }

/* --- Utilities --------------------------------------------- */
.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-2 { gap: 8px; }
.gap-3 { gap: 12px; }
.gap-4 { gap: 16px; }
.mt-1 { margin-top: 4px; }
.mt-2 { margin-top: 8px; }
.mt-3 { margin-top: 12px; }
.mt-4 { margin-top: 16px; }
.mb-2 { margin-bottom: 8px; }
.mb-3 { margin-bottom: 12px; }
.mb-4 { margin-bottom: 16px; }
.text-sm { font-size: 12.5px; }
.text-muted { color: var(--text-2); }
.text-xs { font-size: 11.5px; }
.font-bold { font-weight: 700; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.w-full { width: 100%; }
.text-center { text-align: center; }
.text-right { text-align: right; }
.hidden { display: none !important; }

/* --- Print -------------------------------------------------- */
@media print {
  .sidebar, .top-bar, .no-print, .btn, button { display: none !important; }
  .main-content { margin-left: 0 !important; }
  .page-content { padding: 0 !important; }
  .detail-card { box-shadow: none !important; border: 1px solid #ccc !important; break-inside: avoid; }
  body { background: #fff !important; }
}

/* --- Responsive -------------------------------------------- */
@media (max-width: 1200px) {
  .projects-grid { grid-template-columns: repeat(2, 1fr); }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 900px) {
  .detail-timeline-row { grid-template-columns: 1fr; }
  .detail-objective { border-right: none; border-bottom: 1px solid var(--border); }
  .detail-timeline { border-right: none; border-bottom: 1px solid var(--border); }
  .detail-status-row { grid-template-columns: 1fr; }
  .detail-status-col { border-right: none; border-bottom: 1px solid var(--border); }
}

@media (max-width: 768px) {
  :root { --sidebar-w: 0px; }
  .sidebar {
    transform: translateX(-280px);
    width: 260px;
    box-shadow: none;
  }
  .sidebar.open {
    transform: translateX(0);
    box-shadow: 4px 0 24px rgba(0,0,0,.3);
  }
  .sidebar-overlay.open { display: block; }
  .hamburger { display: flex; align-items: center; justify-content: center; }
  .main-content { margin-left: 0; }
  .projects-grid { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .page-content { padding: 16px; }
  .form-row, .form-row-3 { grid-template-columns: 1fr; }
  .detail-project-name { font-size: 16px; }
  .top-bar { padding: 0 16px; }
}

@media (max-width: 480px) {
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .page-title { font-size: 18px; }
}
