:root {
  --primary: #6366f1;
  --primary-dark: #4f46e5;
  --primary-light: #eef2ff;
  --bg: #f8fafc;
  --surface: #ffffff;
  --text-main: #1e293b;
  --text-muted: #64748b;
  --border: #e2e8f0;
  --danger: #ef4444;
  --danger-light: #fef2f2;
  --success: #10b981;
  --success-light: #ecfdf5;
  --warning: #f59e0b;
  --warning-light: #fffbeb;
  --info: #3b82f6;
  --info-light: #eff6ff;
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --radius: 10px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: 'Plus Jakarta Sans', sans-serif;
  background-color: var(--bg);
  color: var(--text-main);
  font-size: 14px;
  line-height: 1.5;
}

.navbar {
  background-color: var(--surface);
  border-bottom: 1px solid var(--border);
  height: 82px;
  display: flex;
  align-items: center;
}

.nav-container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 32px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.brand { display: flex; align-items: center; gap: 13px; }
.brand-icon {
  width: 38px;
  height: 38px;
  background-color: var(--primary-light);
  color: var(--primary);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
}
.brand h1 { font-size: 17px; margin: 0; font-weight: 800; letter-spacing: -0.4px; color: #0f172a; }
.subtitle { margin: 1px 0 0; color: var(--text-muted); font-size: 12px; font-weight: 500; }

.main-container { max-width: 1200px; margin: 0 auto; padding: 32px; }

.metrics-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-bottom: 32px;
}
.metric-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 24px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.metric-label { color: var(--text-muted); font-size: 12px; font-weight: 600; }
.metric-value { font-size: 26px; font-weight: 800; letter-spacing: -1px; color: var(--text-main); }
.text-amber { color: var(--warning); }
.text-emerald { color: var(--success); }

.toolbar {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 24px;
  align-items: center;
}
.search-box { position: relative; flex: 1; max-width: 450px; }
.search-box input {
  width: 100%;
  padding: 10px 14px 10px 38px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-family: inherit;
  font-size: 13px;
  color: var(--text-main);
  outline: none;
  background: var(--surface);
  transition: border-color .2s, box-shadow .2s;
}
.search-box input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-light); }
.search-icon { position: absolute; left: 13px; top: 9px; font-size: 15px; opacity: .6; }
.filters { display: flex; gap: 10px; }
.select-filter, .form-group select {
  padding: 10px 30px 10px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-family: inherit;
  font-size: 13px;
  color: var(--text-main);
  background-color: var(--surface);
  outline: none;
  cursor: pointer;
}
.select-filter:focus, .form-group select:focus { border-color: var(--primary); }

.suggestions-list { display: flex; flex-direction: column; gap: 16px; }
.suggestion-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: box-shadow .2s, border-color .2s;
}
.suggestion-card:hover { box-shadow: var(--shadow-md); border-color: #cbd5e1; }
.card-main { padding: 22px 24px; }
.card-header { display: flex; justify-content: space-between; gap: 20px; align-items: flex-start; }
.card-title-area { flex: 1; }
.card-title { margin: 0 0 10px; font-size: 16px; font-weight: 800; letter-spacing: -0.3px; color: #0f172a; }
.card-badges { display: flex; gap: 8px; flex-wrap: wrap; }
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
}
.badge-category { background: #f1f5f9; color: #475569; }
.badge-impact-alto { background: #fef2f2; color: #dc2626; }
.badge-impact-médio { background: #fff7ed; color: #ea580c; }
.badge-impact-baixo { background: #ecfdf5; color: #059669; }
.badge-status-sugerido { background: #f1f5f9; color: #64748b; }
.badge-status-em-análise { background: #eff6ff; color: #2563eb; }
.badge-status-em-andamento { background: #fffbeb; color: #d97706; }
.badge-status-concluído { background: #ecfdf5; color: #059669; }
.card-description { margin: 15px 0 0; color: #475569; font-size: 13px; max-width: 900px; }
.card-actions { display: flex; gap: 8px; }
.btn-icon-only {
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-muted);
  width: 32px;
  height: 32px;
  border-radius: 6px;
  cursor: pointer;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  font-size: 14px;
  transition: all .2s;
}
.btn-icon-only:hover { color: var(--primary); border-color: var(--primary); background: var(--primary-light); }
.btn-icon-only.delete:hover { color: var(--danger); border-color: var(--danger); background: var(--danger-light); }

.comments-section { background: #f8fafc; border-top: 1px solid var(--border); padding: 18px 24px; }
.comments-header { display: flex; align-items: center; gap: 8px; margin-bottom: 14px; color: #475569; font-size: 12px; font-weight: 700; }
.comment-count { background: #e2e8f0; color: #64748b; padding: 1px 6px; border-radius: 10px; font-size: 10px; }
.comments-list { display: flex; flex-direction: column; gap: 12px; margin-bottom: 16px; }
.comment { display: flex; gap: 10px; align-items: flex-start; }
.comment-avatar { width: 28px; height: 28px; border-radius: 50%; background: #e0e7ff; color: #4f46e5; font-size: 11px; font-weight: 800; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.comment-content { flex: 1; background: var(--surface); border: 1px solid var(--border); border-radius: 6px; padding: 8px 10px; position: relative; }
.comment-meta { display: flex; gap: 8px; align-items: baseline; margin-bottom: 3px; }
.comment-author { font-size: 11px; font-weight: 700; color: #334155; }
.comment-date { font-size: 10px; color: #94a3b8; }
.comment-text { font-size: 12px; color: #475569; margin: 0; }
.btn-delete-comment { position: absolute; right: 8px; top: 8px; border: 0; background: transparent; color: #cbd5e1; cursor: pointer; font-size: 12px; opacity: 0; }
.comment-content:hover .btn-delete-comment { opacity: 1; }
.btn-delete-comment:hover { color: var(--danger); }

.add-comment-form { display: flex; gap: 10px; align-items: flex-start; }
.add-comment-form input, .add-comment-form textarea {
  font-family: inherit;
  font-size: 12px;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 8px 10px;
  outline: none;
  background: var(--surface);
}
.add-comment-form input { width: 150px; }
.add-comment-form textarea { flex: 1; resize: vertical; min-height: 34px; max-height: 100px; }
.add-comment-form input:focus, .add-comment-form textarea:focus { border-color: var(--primary); box-shadow: 0 0 0 2px var(--primary-light); }
.btn-comment { background: var(--text-main); color: white; border: 0; border-radius: 6px; padding: 8px 12px; font-family: inherit; font-size: 11px; font-weight: 700; cursor: pointer; height: 34px; }
.btn-comment:hover { background: #0f172a; }

.btn { border: none; border-radius: 7px; padding: 10px 16px; font-family: inherit; font-size: 13px; font-weight: 700; cursor: pointer; transition: all .2s; display: inline-flex; align-items: center; justify-content: center; gap: 7px; }
.btn-primary { background: var(--primary); color: white; box-shadow: 0 1px 2px rgb(99 102 241 / .25); }
.btn-primary:hover { background: var(--primary-dark); }
.btn-secondary { background: var(--surface); color: #475569; border: 1px solid var(--border); }
.btn-secondary:hover { background: #f8fafc; }
.btn-icon { font-size: 16px; font-weight: 400; }

.empty-state { text-align: center; background: var(--surface); border: 1px dashed #cbd5e1; border-radius: var(--radius); padding: 55px 20px; color: var(--text-muted); }
.empty-state h3 { margin: 12px 0 6px; color: var(--text-main); font-size: 16px; }
.empty-state p { margin: 0; font-size: 13px; }
.empty-icon { font-size: 34px; }

.modal-backdrop { position: fixed; inset: 0; background: rgb(15 23 42 / .45); z-index: 10; display: flex; align-items: center; justify-content: center; padding: 20px; backdrop-filter: blur(2px); }
.modal-backdrop.hidden { display: none; }
.modal-content { background: var(--surface); border-radius: 12px; width: 100%; max-width: 670px; box-shadow: 0 20px 25px -5px rgb(0 0 0 / .2); overflow: hidden; }
.modal-header { padding: 20px 24px; border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; }
.modal-header h2 { margin: 0; font-size: 17px; font-weight: 800; }
.btn-close { border: 0; background: transparent; font-size: 26px; color: #94a3b8; cursor: pointer; line-height: 1; padding: 0 3px; }
.btn-close:hover { color: var(--text-main); }
#suggestionForm { padding: 24px; }
.form-group { display: flex; flex-direction: column; gap: 7px; margin-bottom: 18px; flex: 1; }
.form-group label { font-size: 12px; font-weight: 700; color: #475569; }
.form-group input, .form-group textarea { border: 1px solid var(--border); border-radius: 7px; padding: 10px 11px; font-family: inherit; font-size: 13px; outline: none; color: var(--text-main); resize: vertical; }
.form-group input:focus, .form-group textarea:focus { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-light); }
.form-row { display: flex; gap: 14px; }
.modal-footer { border-top: 1px solid var(--border); padding: 18px 24px; margin: 6px -24px -24px; display: flex; justify-content: flex-end; gap: 10px; background: #f8fafc; }

.toast-container { position: fixed; right: 20px; bottom: 20px; z-index: 20; display: flex; flex-direction: column; gap: 10px; }
.toast { background: #1e293b; color: white; padding: 12px 16px; border-radius: 8px; font-size: 12px; font-weight: 600; box-shadow: var(--shadow-md); animation: slideIn .25s ease-out; }
.toast.error { background: #dc2626; }
.toast.success { background: #059669; }
@keyframes slideIn { from { transform: translateX(20px); opacity: 0; } to { transform: translateX(0); opacity: 1; } }

@media (max-width: 700px) {
  .navbar { height: auto; padding: 15px 0; }
  .nav-container { padding: 0 16px; }
  .subtitle { display: none; }
  .main-container { padding: 20px 16px; }
  .metrics-grid { grid-template-columns: 1fr; gap: 10px; margin-bottom: 20px; }
  .metric-card { padding: 14px 16px; }
  .toolbar, .filters { flex-direction: column; align-items: stretch; }
  .search-box { max-width: none; }
  .card-header { flex-direction: column; gap: 14px; }
  .card-actions { align-self: flex-end; margin-top: -45px; }
  .comments-section, .card-main { padding: 16px; }
  .add-comment-form { flex-wrap: wrap; }
  .add-comment-form input { width: 100%; }
  .add-comment-form textarea { min-width: 70%; }
  .form-row { flex-direction: column; gap: 0; }
}
