:root {
  --navy: #1D3461;
  --navy-deep: #0F1F3D;
  --accent: #E8B04B;
  --ink: #0A1628;
  --muted: #5C6B82;
  --line: rgba(15,31,61,0.1);
  --bg: #FAFAF7;
  --bg-alt: #F2F1EC;
  --white: #ffffff;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: 'Inter', sans-serif;
  background: var(--bg);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  font-size: 14px;
  line-height: 1.6;
}

h1,h2,h3,h4 { font-family: 'Plus Jakarta Sans', sans-serif; letter-spacing: -0.02em; }

/* ── Header ── */
.header {
  background: var(--navy-deep);
  color: white;
  padding: 0 32px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-brand {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 16px;
  font-weight: 600;
  color: white;
  letter-spacing: -0.01em;
  text-decoration: none;
}

.header-brand span { color: var(--accent); }

.header-right { display: flex; align-items: center; gap: 12px; }

/* ── Botões ── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  font-size: 13px;
  font-weight: 500;
  font-family: inherit;
  text-decoration: none;
  transition: opacity 0.15s;
}
.btn:hover { opacity: 0.85; }
.btn-primary { background: var(--accent); color: var(--ink); }
.btn-navy { background: var(--navy); color: white; }
.btn-ghost { background: rgba(255,255,255,0.1); color: white; border: 1px solid rgba(255,255,255,0.2); }
.btn-outline { background: transparent; color: var(--navy); border: 1px solid var(--line); }
.btn-danger { background: #fee2e2; color: #b91c1c; }
.btn-sm { padding: 5px 10px; font-size: 12px; }

/* ── Layout principal ── */
.container { max-width: 1200px; margin: 0 auto; padding: 32px 24px; }

/* ── Filtros ── */
.filters {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 28px;
}

.filter-btn {
  padding: 6px 14px;
  border-radius: 100px;
  border: 1px solid var(--line);
  background: white;
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s;
  font-family: inherit;
}

.filter-btn:hover, .filter-btn.active {
  background: var(--navy);
  color: white;
  border-color: var(--navy);
}

/* ── Grid de projetos ── */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 20px;
}

/* ── Card de projeto ── */
.project-card {
  background: white;
  border-radius: 14px;
  border: 1px solid var(--line);
  padding: 24px;
  cursor: pointer;
  transition: box-shadow 0.2s, transform 0.2s;
  text-decoration: none;
  color: inherit;
  display: block;
}

.project-card:hover {
  box-shadow: 0 8px 24px rgba(15,31,61,0.1);
  transform: translateY(-2px);
}

.card-color-bar {
  height: 4px;
  border-radius: 2px;
  margin-bottom: 16px;
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 8px;
  gap: 12px;
}

.card-title {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 16px;
  font-weight: 600;
  color: var(--ink);
  line-height: 1.3;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: 100px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  white-space: nowrap;
  flex-shrink: 0;
}

.badge-ativo { background: #dcfce7; color: #15803d; }
.badge-pausado { background: #fef9c3; color: #a16207; }
.badge-concluido { background: #dbeafe; color: #1d4ed8; }
.badge-planejamento { background: #f3e8ff; color: #7c3aed; }

.card-desc {
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 16px;
  line-height: 1.5;
}

.card-meta {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.card-meta-item {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  color: var(--muted);
}

.progress-wrap { margin-bottom: 4px; }

.progress-label {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: var(--muted);
  margin-bottom: 5px;
}

.progress-bar {
  height: 4px;
  background: var(--bg-alt);
  border-radius: 2px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  border-radius: 2px;
  background: var(--accent);
  transition: width 0.3s;
}

/* ── Modal ── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(10,22,40,0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 200;
  padding: 20px;
  backdrop-filter: blur(2px);
}

.modal-overlay.hidden { display: none; }

.modal {
  background: white;
  border-radius: 16px;
  padding: 32px;
  width: 100%;
  max-width: 520px;
  max-height: 90vh;
  overflow-y: auto;
}

.modal-title {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 20px;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 24px;
}

.form-group { margin-bottom: 16px; }

.form-label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 6px;
}

.form-input, .form-select, .form-textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-family: inherit;
  font-size: 14px;
  color: var(--ink);
  background: white;
  transition: border-color 0.15s;
  outline: none;
}

.form-input:focus, .form-select:focus, .form-textarea:focus {
  border-color: var(--navy);
}

.form-textarea { resize: vertical; min-height: 80px; }

.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 24px;
}

/* ── Página de projeto ── */
.projeto-header {
  background: var(--navy-deep);
  color: white;
  padding: 32px;
}

.projeto-header-top {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 20px;
}

.back-link {
  color: rgba(255,255,255,0.6);
  text-decoration: none;
  font-size: 13px;
  display: flex;
  align-items: center;
  gap: 4px;
}

.back-link:hover { color: white; }

.projeto-title {
  font-size: 28px;
  font-weight: 600;
  color: white;
  letter-spacing: -0.02em;
  flex: 1;
}

.projeto-meta {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
}

.projeto-meta-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.projeto-meta-label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: rgba(255,255,255,0.45);
}

.projeto-meta-value {
  font-size: 14px;
  font-weight: 500;
  color: white;
}

/* ── Seções ── */
.section { margin-bottom: 36px; }

.section-title {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* ── Kanban ── */
.kanban {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.kanban-col {
  background: var(--bg-alt);
  border-radius: 12px;
  padding: 16px;
}

.kanban-col-title {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.kanban-col-title .count {
  background: white;
  padding: 1px 7px;
  border-radius: 100px;
  font-size: 10px;
  color: var(--muted);
}

.task-card {
  background: white;
  border-radius: 8px;
  padding: 12px;
  margin-bottom: 8px;
  border: 1px solid var(--line);
  cursor: pointer;
  transition: box-shadow 0.15s;
}

.task-card:hover { box-shadow: 0 2px 8px rgba(15,31,61,0.08); }

.task-title { font-size: 13px; font-weight: 500; color: var(--ink); margin-bottom: 4px; }
.task-meta { font-size: 11px; color: var(--muted); }

.kanban-add {
  width: 100%;
  padding: 8px;
  background: transparent;
  border: 1px dashed var(--line);
  border-radius: 8px;
  color: var(--muted);
  font-size: 12px;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.15s;
  margin-top: 4px;
}

.kanban-add:hover { background: white; color: var(--navy); border-color: var(--navy); }

/* ── Mapa mental ── */
#mapa-mental {
  width: 100%;
  height: 400px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: white;
  overflow: hidden;
}

/* ── Notas ── */
.notas-textarea {
  width: 100%;
  min-height: 140px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  font-family: inherit;
  font-size: 14px;
  color: var(--ink);
  background: white;
  resize: vertical;
  outline: none;
  transition: border-color 0.15s;
}

.notas-textarea:focus { border-color: var(--navy); }

/* ── Info cards ── */
.info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 32px;
}

.info-card {
  background: white;
  border-radius: 12px;
  border: 1px solid var(--line);
  padding: 20px;
}

.info-card-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
  margin-bottom: 6px;
}

.info-card-value {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 22px;
  font-weight: 600;
  color: var(--navy);
}

.info-card-value.small { font-size: 16px; }

/* ── Toast ── */
.toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: var(--ink);
  color: white;
  padding: 12px 20px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 500;
  z-index: 300;
  transform: translateY(100px);
  opacity: 0;
  transition: all 0.3s;
}

.toast.show { transform: translateY(0); opacity: 1; }

/* ── Status editable ── */
.status-select {
  padding: 5px 10px;
  border-radius: 100px;
  border: none;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  cursor: pointer;
  font-family: inherit;
  outline: none;
}

/* ── Empty state ── */
.empty {
  text-align: center;
  padding: 60px 24px;
  color: var(--muted);
}

.empty-icon { font-size: 40px; margin-bottom: 12px; }
.empty-title { font-size: 16px; font-weight: 600; color: var(--ink); margin-bottom: 6px; }

/* ── Mobile ── */
@media (max-width: 768px) {
  .container { padding: 20px 16px; }
  .header { padding: 0 16px; }
  .kanban { grid-template-columns: 1fr; }
  .projects-grid { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .projeto-header { padding: 20px 16px; }
  .projeto-meta { gap: 16px; }
  .info-grid { grid-template-columns: 1fr 1fr; }
}
