/* ============================================================
   RESET & VARIÁVEIS
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
:root {
  --primary-dark: #15536B;
  --primary: #1E7D9C;
  --primary-light: #5FB3D4;
  --gray: #8B9CA5;
  --gray-light: #E8EFF2;
  --gray-bg: #F5F8FA;
  --success: #2E9B8F;
  --warning: #F39C12;
  --info: #2596BE;
  --danger: #E74C3C;
  --white: #fff;
  --shadow: 0 4px 16px rgba(30,125,156,0.1);
  --shadow-lg: 0 12px 32px rgba(30,125,156,0.2);
  --radius: 12px;
  --radius-lg: 16px;
  --transition: all 0.3s ease;
}
body {
  font-family: 'Poppins', sans-serif;
  background: linear-gradient(135deg, var(--gray-light) 0%, var(--gray-bg) 100%);
  min-height: 100vh;
  color: #333;
}
body.dark-mode {
  --gray-light: #1a2332;
  --gray-bg: #0f1923;
  --white: #1e2d3d;
  --shadow: 0 4px 16px rgba(0,0,0,0.3);
  color: #e0e0e0;
  background: linear-gradient(135deg, #0f1923, #1a2332);
}
body.dark-mode .sidebar { background: #0d1821; }
body.dark-mode .topbar { background: linear-gradient(135deg, #0a3040, #15536B); }
body.dark-mode .card, body.dark-mode .modal-content { background: #1e2d3d; }
body.dark-mode .form-input, body.dark-mode .form-select, body.dark-mode .form-textarea { background: #162231; border-color: #2a3d50; color: #e0e0e0; }
body.dark-mode .nav-tab:hover { background: #162231; }
body.dark-mode .etapa-card { background: #1e2d3d; border-color: #2a3d50; }

/* ============================================================
   LAYOUT
   ============================================================ */
.app { display: flex; min-height: 100vh; }
.sidebar {
  width: 260px; background: var(--primary-dark); color: white;
  display: flex; flex-direction: column; position: fixed;
  top: 0; left: 0; bottom: 0; z-index: 1001;
  transition: transform 0.3s ease;
}
.sidebar-header { padding: 24px 20px; border-bottom: 1px solid rgba(255,255,255,0.1); }
.sidebar-logo { font-size: 22px; font-weight: 700; }
.sidebar-logo span { color: var(--primary-light); }
.sidebar-sub { font-size: 11px; opacity: 0.6; margin-top: 4px; }
.sidebar-menu { flex: 1; padding: 16px 0; overflow-y: auto; }
.menu-item {
  padding: 12px 24px; cursor: pointer; display: flex;
  align-items: center; gap: 12px; font-size: 14px;
  transition: var(--transition); color: rgba(255,255,255,0.7);
}
.menu-item:hover { background: rgba(255,255,255,0.1); color: white; }
.menu-item.active { background: rgba(255,255,255,0.15); color: white; border-left: 3px solid var(--primary-light); }
.sidebar-footer { padding: 16px 20px; border-top: 1px solid rgba(255,255,255,0.1); font-size: 12px; opacity: 0.5; }

.main { flex: 1; margin-left: 260px; display: flex; flex-direction: column; }
.topbar {
  background: linear-gradient(135deg, var(--primary-dark), var(--primary));
  padding: 12px 32px; display: flex; justify-content: space-between;
  align-items: center; color: white; position: sticky; top: 0; z-index: 1000;
  box-shadow: 0 4px 20px rgba(21,83,107,0.3);
}
.topbar-title { font-size: 18px; font-weight: 600; }
.topbar-actions { display: flex; gap: 12px; align-items: center; }
.topbar-btn {
  background: rgba(255,255,255,0.15); border: none; color: white;
  padding: 8px 16px; border-radius: 8px; cursor: pointer; font-size: 13px;
  font-family: inherit; transition: var(--transition);
}
.topbar-btn:hover { background: rgba(255,255,255,0.25); }
.content { padding: 32px; flex: 1; }

/* Hamburger mobile */
.hamburger { display: none; background: none; border: none; color: white; font-size: 24px; cursor: pointer; }
.sidebar-overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.5); z-index: 1000; }

@media (max-width: 768px) {
  .sidebar { transform: translateX(-100%); }
  .sidebar.open { transform: translateX(0); }
  .sidebar-overlay.open { display: block; }
  .main { margin-left: 0; }
  .hamburger { display: block; }
  .content { padding: 16px; }
  .projetos-grid { grid-template-columns: 1fr !important; }
  .stats-grid { grid-template-columns: 1fr 1fr !important; }
  .form-row { grid-template-columns: 1fr !important; }
}

/* ============================================================
   COMPONENTES COMUNS
   ============================================================ */
.card { background: var(--white); border-radius: var(--radius); padding: 30px; box-shadow: var(--shadow); margin-bottom: 20px; }
.card-title { font-size: 18px; font-weight: 600; color: var(--primary-dark); margin-bottom: 20px; }

.btn {
  padding: 10px 20px; border: none; border-radius: 8px; font-family: inherit;
  font-size: 14px; font-weight: 600; cursor: pointer; transition: var(--transition);
  display: inline-flex; align-items: center; gap: 8px;
}
.btn-primary { background: linear-gradient(135deg, var(--primary), var(--primary-light)); color: white; box-shadow: 0 4px 12px rgba(30,125,156,0.3); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(30,125,156,0.4); }
.btn-secondary { background: var(--gray-light); color: var(--primary-dark); }
.btn-secondary:hover { background: #d8e4ea; }
.btn-danger { background: var(--danger); color: white; }
.btn-danger:hover { background: #c0392b; }
.btn-success { background: var(--success); color: white; }
.btn-success:hover { background: #27896e; }
.btn-sm { padding: 6px 14px; font-size: 12px; }
.btn-block { width: 100%; justify-content: center; }

.badge {
  padding: 4px 12px; border-radius: 20px; font-size: 11px;
  font-weight: 600; text-transform: uppercase; display: inline-block;
}
.badge-concluida { background: #D9F2EF; color: var(--success); }
.badge-em-andamento { background: #FEF5E7; color: var(--warning); }
.badge-planejada { background: #E8F4F8; color: var(--info); }
.badge-bloqueada { background: #FADBD8; color: var(--danger); }
.badge-na { background: #EAECEE; color: #95A5A6; }

.form-group { margin-bottom: 16px; }
.form-label { display: block; font-size: 13px; font-weight: 600; color: var(--primary-dark); margin-bottom: 6px; }
.form-input, .form-select, .form-textarea {
  width: 100%; padding: 12px 16px; border: 2px solid var(--gray-light);
  border-radius: 8px; font-size: 14px; font-family: inherit;
  transition: var(--transition); background: var(--white);
}
.form-input:focus, .form-select:focus, .form-textarea:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(30,125,156,0.1); }
.form-textarea { resize: vertical; min-height: 80px; }
.form-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 20px; }

/* Modal */
.modal {
  display: none; position: fixed; z-index: 10000; inset: 0;
  background: rgba(0,0,0,0.6); backdrop-filter: blur(4px);
  align-items: center; justify-content: center;
}
.modal.open { display: flex; animation: fadeIn 0.3s ease; }
.modal-content {
  background: var(--white); border-radius: var(--radius-lg);
  max-width: 700px; width: 90%; max-height: calc(100vh - 40px);
  box-shadow: 0 20px 60px rgba(0,0,0,0.3); animation: slideUp 0.3s ease;
  display: flex; flex-direction: column;
}
.modal-header { padding: 24px 32px; border-bottom: 2px solid var(--gray-light); display: flex; justify-content: space-between; align-items: center; }
.modal-header h3 { font-size: 18px; color: var(--primary-dark); }
.modal-close { background: none; border: none; font-size: 24px; cursor: pointer; color: var(--gray); }
.modal-body { padding: 32px; overflow-y: auto; flex: 1; }
.modal-footer { padding: 20px 32px; border-top: 2px solid var(--gray-light); display: flex; justify-content: flex-end; gap: 12px; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes slideUp { from { opacity: 0; transform: translateY(40px); } to { opacity: 1; transform: translateY(0); } }

/* Toast */
.toast-container { position: fixed; top: 20px; right: 20px; z-index: 99999; display: flex; flex-direction: column; gap: 8px; }
.toast {
  padding: 14px 24px; border-radius: 10px; color: white; font-size: 14px;
  font-weight: 500; box-shadow: 0 8px 24px rgba(0,0,0,0.2);
  animation: slideInRight 0.3s ease; min-width: 280px;
}
.toast-success { background: var(--success); }
.toast-error { background: var(--danger); }
.toast-info { background: var(--primary); }
@keyframes slideInRight { from { transform: translateX(100%); opacity: 0; } to { transform: translateX(0); opacity: 1; } }

/* Loading */
.loading { display: flex; align-items: center; justify-content: center; padding: 40px; color: var(--gray); }
.spinner { width: 32px; height: 32px; border: 3px solid var(--gray-light); border-top-color: var(--primary); border-radius: 50%; animation: spin 0.8s linear infinite; margin-right: 12px; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ============================================================
   TELA: LOGIN
   ============================================================ */
.login-page {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, var(--primary-dark), var(--primary));
}
.login-box {
  background: white; border-radius: var(--radius-lg); padding: 48px;
  width: 100%; max-width: 420px; box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}
.login-logo { text-align: center; margin-bottom: 32px; }
.login-logo h1 { font-size: 28px; color: var(--primary-dark); }
.login-logo h1 span { color: var(--primary-light); }
.login-logo p { font-size: 14px; color: var(--gray); margin-top: 4px; }
.login-error { background: #FADBD8; color: var(--danger); padding: 10px 16px; border-radius: 8px; font-size: 13px; margin-bottom: 16px; display: none; }

/* ============================================================
   TELA: DASHBOARD
   ============================================================ */
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 20px; margin-bottom: 30px; }
.stat-card {
  background: var(--white); padding: 24px; border-radius: var(--radius);
  border-left: 4px solid var(--primary); box-shadow: var(--shadow);
}
.stat-value { font-size: 36px; font-weight: 700; color: var(--primary); }
.stat-label { font-size: 13px; color: var(--gray); text-transform: uppercase; margin-top: 4px; }

/* ============================================================
   TELA: MEUS PROJETOS
   ============================================================ */
.projetos-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
.projeto-card {
  background: var(--white); border-radius: var(--radius); padding: 20px;
  box-shadow: var(--shadow); border-left: 5px solid var(--primary);
  cursor: pointer; position: relative; overflow: hidden; transition: var(--transition);
}
.projeto-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); border-left-color: var(--primary-light); }
.projeto-card-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 8px; }
.projeto-id { font-size: 11px; color: var(--gray); font-weight: 600; }
.projeto-titulo { font-size: 15px; font-weight: 700; color: var(--primary-dark); margin-bottom: 4px; line-height: 1.3; }
.projeto-cliente { font-size: 13px; color: var(--gray); margin-bottom: 2px; }
.projeto-tipo { font-size: 11px; color: var(--primary); font-weight: 500; }
.projeto-datas { display: flex; gap: 16px; margin: 8px 0; font-size: 12px; color: var(--gray); }
.projeto-progress { margin: 8px 0; }
.filtros-bar { display: flex; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; align-items: center; }
.filtros-bar .form-input, .filtros-bar .form-select { width: auto; min-width: 160px; padding: 8px 12px; font-size: 13px; }
.progress-bar { height: 10px; background: var(--gray-light); border-radius: 5px; overflow: hidden; box-shadow: inset 0 2px 4px rgba(0,0,0,0.05); }
.progress-fill { height: 100%; background: linear-gradient(90deg, var(--primary), var(--primary-light)); border-radius: 5px; transition: width 0.5s ease; }
.progress-text { font-size: 14px; font-weight: 700; color: var(--primary); margin-top: 8px; }
.btn-acessar {
  width: 100%; padding: 14px; background: linear-gradient(135deg, var(--primary-dark), var(--primary));
  color: white; border: none; border-radius: 10px; font-size: 15px; font-weight: 600;
  cursor: pointer; transition: var(--transition); font-family: inherit;
}
.btn-acessar:hover { background: linear-gradient(135deg, var(--primary), var(--primary-light)); transform: translateY(-2px); box-shadow: 0 4px 12px rgba(30,125,156,0.3); }
.empty-state { text-align: center; padding: 60px 20px; color: var(--gray); }
.empty-state-icon { font-size: 64px; margin-bottom: 16px; }
.empty-state-text { font-size: 18px; font-weight: 600; }

/* ============================================================
   TELA: DASHBOARD DO PROJETO
   ============================================================ */
.hero-card {
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  border-radius: var(--radius-lg); padding: 40px; color: white;
  box-shadow: 0 8px 32px rgba(30,125,156,0.25); position: relative; overflow: hidden; margin-bottom: 30px;
}
.hero-card::before { content: ''; position: absolute; top: -50%; right: -10%; width: 500px; height: 500px; background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%); }
.hero-title { font-size: 32px; font-weight: 700; text-shadow: 0 2px 4px rgba(0,0,0,0.1); position: relative; }
.hero-subtitle { font-size: 18px; opacity: 0.95; margin-top: 8px; position: relative; }
.hero-meta { display: flex; gap: 32px; margin-top: 24px; flex-wrap: wrap; position: relative; }
.hero-meta-item { font-size: 14px; opacity: 0.9; }
.hero-meta-item strong { font-weight: 600; }

.info-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; margin-bottom: 30px; }
.info-item { background: var(--white); padding: 16px; border-radius: var(--radius); box-shadow: var(--shadow); }
.info-label { font-size: 12px; color: var(--gray); text-transform: uppercase; font-weight: 600; }
.info-value { font-size: 16px; font-weight: 600; color: var(--primary-dark); margin-top: 4px; }

.progress-section { margin-bottom: 30px; }
.progress-bar-lg { height: 32px; background: var(--gray-light); border-radius: 16px; box-shadow: inset 0 2px 4px rgba(0,0,0,0.05); overflow: hidden; }
.progress-fill-lg { height: 100%; background: linear-gradient(90deg, var(--primary), var(--primary-light)); transition: width 1s cubic-bezier(0.4,0,0.2,1); border-radius: 16px; }
.progress-label-lg { font-size: 18px; font-weight: 700; color: var(--primary); margin-top: 8px; text-align: center; }

.metrics-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 16px; margin-bottom: 30px; }
.metric-card { background: var(--white); padding: 20px; border-radius: var(--radius); text-align: center; box-shadow: var(--shadow); }
.metric-value { font-size: 28px; font-weight: 700; color: var(--primary); }
.metric-label { font-size: 12px; color: var(--gray); margin-top: 4px; }

/* Tabs */
.tabs-container { display: flex; gap: 8px; border-bottom: 2px solid var(--gray-light); margin-bottom: 24px; }
.tab-btn {
  padding: 12px 24px; background: transparent; border: none; border-bottom: 3px solid transparent;
  color: var(--gray); font-size: 15px; font-weight: 600; cursor: pointer;
  transition: var(--transition); font-family: inherit;
}
.tab-btn:hover { color: var(--primary); }
.tab-btn.active { color: var(--primary); border-bottom-color: var(--primary); }
.tab-content { display: none; }
.tab-content.active { display: block; }

/* Etapa cards */
.etapas-list { display: flex; flex-direction: column; gap: 16px; }
.etapa-card {
  background: var(--white); border-radius: var(--radius); padding: 20px;
  border-left: 4px solid var(--gray-light); box-shadow: var(--shadow);
  transition: var(--transition); cursor: pointer;
}
.etapa-card:hover { box-shadow: var(--shadow-lg); }
.etapa-card.concluida { border-left-color: var(--success); }
.etapa-card.em-andamento { border-left-color: var(--warning); }
.etapa-card.planejada { border-left-color: var(--info); }
.etapa-card.bloqueada { border-left-color: var(--danger); }
.etapa-header-row { display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.etapa-numero { width: 36px; height: 36px; background: linear-gradient(135deg, var(--primary), var(--primary-light)); color: white; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 14px; flex-shrink: 0; }
.etapa-nome { font-size: 16px; font-weight: 600; color: var(--primary-dark); flex: 1; }
.etapa-progress-sm { width: 120px; }
.etapa-progress-sm .progress-bar { height: 6px; }
.etapa-percent { font-size: 13px; font-weight: 600; color: var(--primary); margin-top: 4px; text-align: right; }

/* Entregáveis e Evidências */
.item-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.item-card { background: var(--white); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); border: 1px solid var(--gray-light); }
.item-card-title { font-size: 15px; font-weight: 600; color: var(--primary-dark); margin-bottom: 8px; }
.item-card-meta { font-size: 12px; color: var(--gray); margin-bottom: 12px; }
.item-card-desc { font-size: 13px; color: #555; margin-bottom: 12px; }

/* Tarefas checklist */
.tarefas-list { list-style: none; }
.tarefa-item { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--gray-light); }
.tarefa-item:last-child { border-bottom: none; }
.tarefa-check { width: 20px; height: 20px; border-radius: 4px; border: 2px solid var(--gray-light); cursor: pointer; display: flex; align-items: center; justify-content: center; transition: var(--transition); flex-shrink: 0; }
.tarefa-check.checked { background: var(--success); border-color: var(--success); color: white; }
.tarefa-nome { font-size: 14px; flex: 1; }
.tarefa-nome.concluida { text-decoration: line-through; opacity: 0.6; }
.tarefa-actions { display: flex; gap: 4px; }
.tarefa-btn { background: none; border: none; cursor: pointer; font-size: 14px; padding: 4px; color: var(--gray); transition: var(--transition); }
.tarefa-btn:hover { color: var(--primary); }
.tarefa-btn.delete:hover { color: var(--danger); }
.add-tarefa { display: flex; gap: 8px; margin-top: 12px; }
.add-tarefa input { flex: 1; }

/* ============================================================
   TELA: ADMIN (Clientes, Templates)
   ============================================================ */
.admin-table { width: 100%; border-collapse: collapse; }
.admin-table th { text-align: left; padding: 12px 16px; background: var(--gray-bg); color: var(--primary-dark); font-size: 13px; font-weight: 600; text-transform: uppercase; border-bottom: 2px solid var(--gray-light); }
.admin-table td { padding: 12px 16px; border-bottom: 1px solid var(--gray-light); font-size: 14px; }
.admin-table tr:hover { background: var(--gray-bg); }
.admin-toolbar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; flex-wrap: wrap; gap: 12px; }

/* ============================================================
   TELA: RELATÓRIO (impressão)
   ============================================================ */
.relatorio-container { max-width: 1200px; margin: 0 auto; }
.relatorio-header { background: linear-gradient(135deg, var(--primary-dark), var(--primary)); color: white; padding: 40px; position: relative; border-radius: var(--radius-lg) var(--radius-lg) 0 0; }
.relatorio-header-info { background: rgba(255,255,255,0.15); padding: 20px; border-radius: var(--radius); backdrop-filter: blur(10px); }
.relatorio-body { background: white; padding: 40px; border-radius: 0 0 var(--radius-lg) var(--radius-lg); }
.relatorio-actions { padding: 20px 40px; background: white; border-bottom: 2px solid var(--gray-light); display: flex; gap: 12px; justify-content: flex-end; }

@media print {
  body { background: white !important; font-size: 11pt !important; }
  .sidebar, .topbar, .relatorio-actions, .toast-container { display: none !important; }
  .main { margin-left: 0 !important; }
  .content { padding: 0 !important; }
  .relatorio-container { box-shadow: none !important; max-width: 100% !important; }
  .relatorio-header { background: #15536B !important; -webkit-print-color-adjust: exact !important; print-color-adjust: exact !important; }
  .etapa-card { page-break-inside: avoid; break-inside: avoid; margin-bottom: 12px !important; }
  .card, .stat-card { page-break-inside: avoid; break-inside: avoid; box-shadow: none !important; border: 1px solid #ddd !important; }
  .stats-grid { page-break-inside: avoid; break-inside: avoid; }
  .progress-fill, .progress-fill-lg { -webkit-print-color-adjust: exact !important; print-color-adjust: exact !important; }
  .badge { -webkit-print-color-adjust: exact !important; print-color-adjust: exact !important; }
  .relatorio-body::after { content: 'Relatório gerado por P3 Negócios & Educação — P3 Projetos'; display: block; text-align: center; color: #999; font-size: 10px; margin-top: 40px; padding-top: 16px; border-top: 1px solid #ddd; }
  @page { margin: 15mm; size: A4; }
}

/* Grid de etapas estilo portal (2 colunas) */
.etapas-grid-cards {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px;
}

/* Tipos de Projeto (accordion) */
.tipo-projeto-card { background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow); margin-bottom: 12px; overflow: hidden; border-left: 4px solid var(--primary); }
.tipo-projeto-header { padding: 16px 24px; display: flex; justify-content: space-between; align-items: center; cursor: pointer; transition: var(--transition); }
.tipo-projeto-header:hover { background: var(--gray-bg); }
.tipo-projeto-header h3 { font-size: 16px; font-weight: 700; color: var(--primary-dark); }
.tipo-projeto-body { max-height: 0; overflow: hidden; transition: max-height 0.4s ease; }
.tipo-projeto-body.open { max-height: 2000px; padding: 0 24px 20px; }
.tipo-etapa-item { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--gray-light); }
.tipo-etapa-item:last-child { border-bottom: none; }
.tipo-etapa-num { width: 30px; height: 30px; background: linear-gradient(135deg, var(--primary), var(--primary-light)); color: white; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 13px; flex-shrink: 0; }
.tipo-etapa-info { flex: 1; }
.tipo-etapa-nome { font-size: 14px; font-weight: 600; color: var(--primary-dark); }
.tipo-etapa-desc { font-size: 12px; color: var(--gray); }
.etapa-grid-card {
  background: var(--white); border-radius: var(--radius); padding: 20px;
  border-top: 4px solid var(--gray-light); box-shadow: var(--shadow);
  display: flex; flex-direction: column; min-height: 200px;
  transition: var(--transition);
}
.etapa-grid-card:hover { box-shadow: var(--shadow-lg); }
.etapa-grid-card.concluida { border-top-color: var(--success); }
.etapa-grid-card.em-andamento { border-top-color: var(--warning); }
.etapa-grid-card.planejada { border-top-color: var(--info); }
.etapa-grid-card.bloqueada { border-top-color: var(--danger); }
.etapa-grid-card.na { border-top-color: #95A5A6; }

@media (max-width: 768px) { .etapas-grid-cards { grid-template-columns: 1fr; } }

/* Kanban Board */
.kanban-board { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; min-height: 400px; }
.kanban-col { background: var(--gray-bg); border-radius: var(--radius); padding: 16px; min-height: 300px; }
.kanban-col-header { font-size: 14px; font-weight: 700; text-transform: uppercase; margin-bottom: 12px; padding-bottom: 8px; border-bottom: 3px solid var(--gray-light); display: flex; justify-content: space-between; align-items: center; }
.kanban-col-header .count { background: var(--gray-light); padding: 2px 8px; border-radius: 10px; font-size: 12px; }
.kanban-card { background: var(--white); border-radius: 8px; padding: 12px; margin-bottom: 8px; box-shadow: 0 2px 8px rgba(0,0,0,0.08); cursor: grab; transition: var(--transition); border-left: 3px solid var(--gray-light); }
.kanban-card:hover { box-shadow: 0 4px 12px rgba(0,0,0,0.15); }
.kanban-card.dragging { opacity: 0.5; transform: rotate(2deg); }
.kanban-card-title { font-size: 13px; font-weight: 600; color: var(--primary-dark); }
.kanban-card-meta { font-size: 11px; color: var(--gray); margin-top: 4px; }
.kanban-col.planejada .kanban-col-header { border-bottom-color: var(--info); color: var(--info); }
.kanban-col.em-andamento .kanban-col-header { border-bottom-color: var(--warning); color: var(--warning); }
.kanban-col.concluida .kanban-col-header { border-bottom-color: var(--success); color: var(--success); }
.kanban-col.bloqueada .kanban-col-header { border-bottom-color: var(--danger); color: var(--danger); }
.kanban-col.drag-over { background: rgba(30,125,156,0.08); }
@media (max-width: 900px) { .kanban-board { grid-template-columns: 1fr 1fr; } }
@media (max-width: 600px) { .kanban-board { grid-template-columns: 1fr; } }

/* Cronograma / Gantt */
.gantt-container { overflow-x: auto; }
.gantt-table { width: 100%; border-collapse: collapse; min-width: 700px; }
.gantt-header-row th { padding: 8px 4px; font-size: 11px; color: var(--gray); font-weight: 600; text-align: center; border-bottom: 2px solid var(--gray-light); white-space: nowrap; }
.gantt-header-row th:first-child { text-align: left; min-width: 220px; padding-left: 12px; }
.gantt-row td { padding: 6px 4px; border-bottom: 1px solid var(--gray-light); vertical-align: middle; }
.gantt-row:hover { background: var(--gray-bg); }
.gantt-row td:first-child { padding-left: 12px; }
.gantt-etapa-nome { font-size: 13px; font-weight: 600; color: var(--primary-dark); }
.gantt-etapa-sub { font-size: 11px; color: var(--gray); }
.gantt-cell { position: relative; height: 28px; }
.gantt-bar { position: absolute; top: 4px; height: 20px; border-radius: 4px; min-width: 4px; transition: var(--transition); }
.gantt-bar.concluida { background: linear-gradient(90deg, #2E9B8F, #27AE60); }
.gantt-bar.em-andamento { background: linear-gradient(90deg, #F39C12, #F1C40F); }
.gantt-bar.planejada { background: linear-gradient(90deg, #2596BE, #5FB3D4); }
.gantt-bar.bloqueada { background: linear-gradient(90deg, #E74C3C, #C0392B); }
.gantt-bar.na { background: #EAECEE; }
.gantt-bar-label { position: absolute; top: 5px; font-size: 10px; font-weight: 600; color: white; padding: 0 6px; white-space: nowrap; text-shadow: 0 1px 2px rgba(0,0,0,0.3); }
.gantt-today { position: absolute; top: 0; bottom: 0; width: 2px; background: var(--danger); z-index: 2; }
.gantt-today::before { content: 'Hoje'; position: absolute; top: -18px; left: -12px; font-size: 9px; color: var(--danger); font-weight: 700; }
.gantt-legend { display: flex; gap: 16px; margin-top: 12px; flex-wrap: wrap; }
.gantt-legend-item { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--gray); }
.gantt-legend-color { width: 14px; height: 14px; border-radius: 3px; }

/* Drag & Drop Upload Zone */
.dropzone { border: 2px dashed var(--gray-light); border-radius: var(--radius); padding: 30px; text-align: center; cursor: pointer; transition: var(--transition); background: var(--gray-bg); }
.dropzone:hover, .dropzone.dragover { border-color: var(--primary); background: rgba(30,125,156,0.05); }
.dropzone-text { color: var(--gray); font-size: 14px; }
.dropzone-icon { font-size: 36px; margin-bottom: 8px; }
.dropzone-files { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.dropzone-file { background: var(--white); border: 1px solid var(--gray-light); border-radius: 6px; padding: 6px 12px; font-size: 12px; display: flex; align-items: center; gap: 6px; }

/* Portal do Cliente */
.portal-header { padding: 24px 32px; display: flex; align-items: center; gap: 20px; border-bottom: 2px solid var(--gray-light); }
.portal-logo { height: 50px; max-width: 200px; object-fit: contain; }

/* Toggle Switch */
.toggle-switch { position: relative; display: inline-block; width: 44px; height: 24px; flex-shrink: 0; }
.toggle-switch input { opacity: 0; width: 0; height: 0; }
.toggle-slider { position: absolute; cursor: pointer; top: 0; left: 0; right: 0; bottom: 0; background: #ccc; border-radius: 24px; transition: var(--transition); }
.toggle-slider::before { content: ''; position: absolute; height: 18px; width: 18px; left: 3px; bottom: 3px; background: white; border-radius: 50%; transition: var(--transition); }
.toggle-switch input:checked + .toggle-slider { background: var(--success); }
.toggle-switch input:checked + .toggle-slider::before { transform: translateX(20px); }

/* Diário de Bordo */
.diario-timeline { position: relative; padding-left: 32px; }
.diario-timeline::before { content: ''; position: absolute; left: 14px; top: 0; bottom: 0; width: 2px; background: var(--gray-light); }
.diario-item { position: relative; margin-bottom: 20px; background: var(--white); border-radius: var(--radius); padding: 16px 20px; box-shadow: var(--shadow); border-left: 4px solid var(--gray-light); }
.diario-item::before { content: ''; position: absolute; left: -26px; top: 20px; width: 12px; height: 12px; border-radius: 50%; border: 2px solid var(--white); z-index: 1; }
.diario-item.tipo-reuniao_realizada { border-left-color: var(--success); }
.diario-item.tipo-reuniao_realizada::before { background: var(--success); }
.diario-item.tipo-reuniao_cancelada { border-left-color: var(--danger); }
.diario-item.tipo-reuniao_cancelada::before { background: var(--danger); }
.diario-item.tipo-entrega_aguardando { border-left-color: var(--warning); }
.diario-item.tipo-entrega_aguardando::before { background: var(--warning); }
.diario-item.tipo-replanejamento { border-left-color: #E67E22; }
.diario-item.tipo-replanejamento::before { background: #E67E22; }
.diario-item.tipo-marco_atingido { border-left-color: var(--info); }
.diario-item.tipo-marco_atingido::before { background: var(--info); }
.diario-item.tipo-nota_interna { border-left-color: #95A5A6; }
.diario-item.tipo-nota_interna::before { background: #95A5A6; }
.diario-item.tipo-mudanca_escopo { border-left-color: #8E44AD; }
.diario-item.tipo-mudanca_escopo::before { background: #8E44AD; }
.diario-item.tipo-validacao_cliente { border-left-color: #2980B9; }
.diario-item.tipo-validacao_cliente::before { background: #2980B9; }
.diario-item.tipo-comunicado { border-left-color: var(--primary); }
.diario-item.tipo-comunicado::before { background: var(--primary); }
.diario-header { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 8px; }
.diario-tipo-badge { font-size: 10px; font-weight: 700; text-transform: uppercase; padding: 2px 8px; border-radius: 10px; color: white; white-space: nowrap; }
.diario-titulo { font-size: 14px; font-weight: 600; color: var(--primary-dark); }
.diario-desc { font-size: 13px; color: var(--gray); margin-bottom: 8px; }
.diario-meta { display: flex; gap: 16px; flex-wrap: wrap; font-size: 11px; color: var(--gray); }
.diario-meta span { display: flex; align-items: center; gap: 4px; }
.diario-impacto { font-weight: 700; }
.diario-impacto.positivo { color: var(--danger); }
.diario-impacto.neutro { color: var(--gray); }
.diario-visibilidade { cursor: pointer; padding: 2px 8px; border-radius: 10px; font-size: 10px; font-weight: 600; }
.diario-visibilidade.visivel { background: #D5F5E3; color: #1E8449; }
.diario-visibilidade.interno { background: #FADBD8; color: #922B21; }
.diario-resumo-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 12px; margin-bottom: 20px; }
.diario-resumo-card { background: var(--white); border-radius: var(--radius); padding: 16px; text-align: center; box-shadow: var(--shadow); }
.diario-resumo-card .numero { font-size: 28px; font-weight: 800; }
.diario-resumo-card .label { font-size: 11px; color: var(--gray); margin-top: 4px; }
.diario-filtros { display: flex; gap: 8px; margin-bottom: 16px; flex-wrap: wrap; }
.diario-filtro-btn { padding: 4px 12px; border-radius: 16px; font-size: 12px; border: 1px solid var(--gray-light); background: var(--white); cursor: pointer; transition: var(--transition); }
.diario-filtro-btn.active, .diario-filtro-btn:hover { background: var(--primary); color: white; border-color: var(--primary); }

/* Financeiro */
.fin-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 16px; margin-bottom: 20px; }
.fin-card { background: var(--white); border-radius: var(--radius); padding: 20px; text-align: center; box-shadow: var(--shadow); border-top: 4px solid var(--primary); }
.fin-card .fin-valor { font-size: 24px; font-weight: 800; }
.fin-card .fin-label { font-size: 11px; color: var(--gray); margin-top: 4px; }
.fin-card.receita { border-top-color: var(--success); }
.fin-card.despesa { border-top-color: var(--danger); }
.fin-card.margem { border-top-color: var(--info); }
.fin-card.alerta { border-top-color: var(--warning); }
.badge-pendente { background: #FEF9E7; color: #D4AC0D; }
.badge-faturado { background: #D6EAF8; color: #2980B9; }
.badge-pago { background: #D5F5E3; color: #1E8449; }
.badge-atrasado { background: #FADBD8; color: #C0392B; }

/* Pipeline Propostas */
.pipeline-bar { display: flex; gap: 4px; margin-bottom: 20px; }
.pipeline-step { flex: 1; padding: 16px; border-radius: var(--radius); text-align: center; cursor: pointer; transition: var(--transition); }
.pipeline-step:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.pipeline-step .pipeline-num { font-size: 28px; font-weight: 800; color: white; }
.pipeline-step .pipeline-label { font-size: 11px; color: rgba(255,255,255,0.85); margin-top: 2px; }
.pipeline-step .pipeline-valor { font-size: 12px; color: rgba(255,255,255,0.7); margin-top: 4px; }
.pipeline-step.rascunho { background: linear-gradient(135deg, #95A5A6, #7F8C8D); }
.pipeline-step.enviada { background: linear-gradient(135deg, #3498DB, #2980B9); }
.pipeline-step.negociacao { background: linear-gradient(135deg, #F39C12, #E67E22); }
.pipeline-step.ganha { background: linear-gradient(135deg, #27AE60, #1E8449); }
.pipeline-step.perdida { background: linear-gradient(135deg, #E74C3C, #C0392B); }
.pipeline-metricas { display: flex; gap: 16px; margin-bottom: 20px; }
.pipeline-metrica { background: var(--white); padding: 12px 20px; border-radius: var(--radius); box-shadow: var(--shadow); text-align: center; flex: 1; }
.pipeline-metrica .valor { font-size: 22px; font-weight: 800; color: var(--primary-dark); }
.pipeline-metrica .label { font-size: 11px; color: var(--gray); }
.badge-rascunho { background: #E5E7E9; color: #7F8C8D; }
.badge-enviada { background: #D6EAF8; color: #2980B9; }
.badge-negociacao { background: #FEF9E7; color: #E67E22; }
.badge-ganha { background: #D5F5E3; color: #1E8449; }
.badge-perdida { background: #FADBD8; color: #C0392B; }

/* ============================================================
   GESTÃO DE EQUIPE — Reuniões & Demandas
   ============================================================ */

/* Menu Divider */
.menu-divider { padding: 20px 20px 8px; font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 1.5px; color: rgba(255,255,255,0.4); }

/* Meeting Header */
.meeting-header { background: linear-gradient(135deg, var(--primary-dark), var(--primary)); color: #fff; border-radius: var(--radius); padding: 24px; margin-bottom: 20px; }
.meeting-title { font-size: 20px; font-weight: 800; }
.meeting-meta { font-size: 13px; opacity: 0.85; margin-top: 6px; display: flex; gap: 20px; flex-wrap: wrap; }
.meeting-actions { margin-top: 16px; display: flex; gap: 8px; flex-wrap: wrap; }

/* RACI Grid */
.raci-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 16px; }
.raci-item { padding: 14px; background: var(--gray-bg); border-radius: var(--radius); border-left: 4px solid var(--primary); }
.raci-label { font-size: 10px; text-transform: uppercase; color: var(--gray); font-weight: 700; letter-spacing: 0.5px; }
.raci-value { font-size: 14px; font-weight: 600; color: var(--primary-dark); margin-top: 4px; }
.raci-item.r { border-left-color: var(--primary); }
.raci-item.a { border-left-color: var(--warning); }
.raci-item.c { border-left-color: var(--info); }
.raci-item.i { border-left-color: var(--success); }

/* Reprogramação Timeline */
.reprog-timeline { padding-left: 28px; position: relative; }
.reprog-timeline::before { content: ''; position: absolute; left: 8px; top: 0; bottom: 0; width: 2px; background: var(--warning); }
.reprog-item { position: relative; margin-bottom: 16px; padding: 14px; background: var(--white); border-radius: var(--radius); border: 1px solid var(--gray-light); }
.reprog-dot { position: absolute; left: -26px; top: 16px; width: 12px; height: 12px; background: var(--warning); border-radius: 50%; border: 2px solid var(--white); }
.reprog-fase { font-size: 11px; font-weight: 700; color: var(--warning); text-transform: uppercase; }
.reprog-dates { font-size: 13px; margin-top: 4px; color: var(--primary-dark); }
.reprog-motivo { font-size: 12px; color: var(--gray); margin-top: 6px; font-style: italic; }

/* ATA Container */
.ata-container { background: #fffbf0; border: 1px solid #ffe0b2; border-radius: var(--radius); padding: 24px; font-size: 14px; line-height: 1.8; white-space: pre-wrap; }
.ata-container.editing { background: var(--white); border-color: var(--primary); }

/* Pendências Panel */
.pendencias-panel { background: #fff8e1; border: 1px solid #ffe082; border-radius: var(--radius); padding: 16px; margin-bottom: 16px; }
.pendencias-panel .pend-title { font-weight: 700; color: #f57f17; margin-bottom: 8px; font-size: 14px; }

/* Demanda Badges */
.badge-dem-pendente { background: #FEF9E7; color: #D4AC0D; }
.badge-dem-andamento { background: #D6EAF8; color: #2980B9; }
.badge-dem-concluida { background: #D5F5E3; color: #1E8449; }
.badge-dem-cancelada { background: #E5E7E9; color: #7F8C8D; }
.badge-dem-reprogramada { background: #F5EEF8; color: #8E44AD; }
.badge-alta { background: #FADBD8; color: #C0392B; }
.badge-media { background: #FEF9E7; color: #E67E22; }
.badge-baixa { background: #D5F5E3; color: #27AE60; }

/* Reunião Status Badges */
.badge-agendada { background: #D6EAF8; color: #2980B9; }
.badge-em-andamento-reu { background: #FEF9E7; color: #E67E22; }
.badge-concluida-reu { background: #D5F5E3; color: #1E8449; }
.badge-cancelada-reu { background: #E5E7E9; color: #7F8C8D; }

/* Demanda Vencida Row */
.demanda-vencida { background: #fff5f5 !important; }
.demanda-vencida td:first-child { border-left: 3px solid var(--danger); }

/* Participante Tag */
.part-tag { display: inline-flex; align-items: center; gap: 6px; background: var(--gray-bg); border-radius: 16px; padding: 4px 12px; font-size: 12px; margin: 2px; }
.part-tag .remove-part { cursor: pointer; color: var(--danger); font-weight: 700; }
.part-tag.presente { background: #D5F5E3; }

/* Stat card adaptações */
.stat-card.demandas { border-top: 4px solid var(--primary); }
.stat-card.vencidas { border-top: 4px solid var(--danger); }
.stat-card.no-prazo { border-top: 4px solid var(--success); }
.stat-card.reprog { border-top: 4px solid var(--warning); }

/* Dark Mode — Gestão de Equipe */
body.dark-mode .menu-divider { color: rgba(255,255,255,0.25); }
body.dark-mode .raci-item { background: #1a1a2e; border-left-color: var(--primary-light); }
body.dark-mode .raci-value { color: #e0e0e0; }
body.dark-mode .reprog-item { background: #1a1a2e; border-color: #2a2a4a; }
body.dark-mode .ata-container { background: #1a1a2e; border-color: #2a2a4a; color: #e0e0e0; }
body.dark-mode .meeting-header { background: linear-gradient(135deg, #0f3460, #16213e); }
body.dark-mode .pendencias-panel { background: #1a1a2e; border-color: #2a2a4a; }
body.dark-mode .pendencias-panel .pend-title { color: #ffd54f; }
body.dark-mode .demanda-vencida { background: #2a1a1a !important; }
body.dark-mode .part-tag { background: #1a1a2e; color: #e0e0e0; }

/* ============================================================
   GESTÃO DE PESSOAS — Painel do Gestor
   ============================================================ */

/* Colaborador Card */
.colab-card { background: var(--white); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); cursor: pointer; transition: var(--transition); position: relative; border-top: 4px solid var(--primary); }
.colab-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.colab-nome { font-size: 16px; font-weight: 700; color: var(--primary-dark); margin-bottom: 2px; }
.colab-cargo { font-size: 12px; color: var(--gray); margin-bottom: 12px; }
.colab-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.colab-stat { text-align: center; padding: 8px; background: var(--gray-bg); border-radius: 8px; }
.colab-stat .num { font-size: 18px; font-weight: 800; }
.colab-stat .lbl { font-size: 10px; color: var(--gray); text-transform: uppercase; }
.colab-alert { position: absolute; top: 12px; right: 12px; }

/* Feedback Item */
.feedback-item { padding: 16px; border-radius: var(--radius); border-left: 4px solid var(--gray); margin-bottom: 12px; background: var(--white); box-shadow: 0 1px 4px rgba(0,0,0,0.06); }
.feedback-item.positivo { border-left-color: var(--success); }
.feedback-item.construtivo { border-left-color: var(--warning); }
.feedback-item.redirecionamento { border-left-color: var(--danger); }
.feedback-tipo { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 6px; }
.feedback-tipo.positivo { color: var(--success); }
.feedback-tipo.construtivo { color: var(--warning); }
.feedback-tipo.redirecionamento { color: var(--danger); }
.feedback-section { margin-bottom: 6px; }
.feedback-section .label { font-size: 11px; font-weight: 600; color: var(--gray); text-transform: uppercase; }
.feedback-section .value { font-size: 13px; color: var(--primary-dark); margin-top: 2px; }

/* PDI Progress */
.pdi-card { background: var(--white); border-radius: var(--radius); padding: 16px; margin-bottom: 12px; box-shadow: 0 1px 4px rgba(0,0,0,0.06); border-left: 4px solid var(--primary); }
.pdi-card.concluido { border-left-color: var(--success); }
.pdi-card.pendente { border-left-color: var(--gray); }

/* Meta Gauge */
.meta-card { background: var(--white); border-radius: var(--radius); padding: 16px; margin-bottom: 12px; box-shadow: 0 1px 4px rgba(0,0,0,0.06); }
.meta-gauge { display: flex; align-items: center; gap: 12px; margin-top: 8px; }
.meta-gauge .bar { flex: 1; height: 8px; background: var(--gray-light); border-radius: 4px; overflow: hidden; }
.meta-gauge .fill { height: 100%; border-radius: 4px; background: linear-gradient(90deg, var(--primary), var(--success)); transition: width 0.3s; }
.meta-gauge .pct { font-size: 14px; font-weight: 700; color: var(--primary-dark); min-width: 45px; text-align: right; }

/* Sentimento Badges */
.sentimento-badge { padding: 3px 10px; border-radius: 12px; font-size: 11px; font-weight: 600; }
.sentimento-otimo { background: #D5F5E3; color: #1E8449; }
.sentimento-bom { background: #D6EAF8; color: #2980B9; }
.sentimento-neutro { background: #E5E7E9; color: #7F8C8D; }
.sentimento-preocupado { background: #FEF9E7; color: #E67E22; }
.sentimento-critico { background: #FADBD8; color: #C0392B; }

/* 1:1 Card */
.ooo-card { background: var(--white); border-radius: var(--radius); padding: 16px; margin-bottom: 12px; box-shadow: 0 1px 4px rgba(0,0,0,0.06); cursor: pointer; transition: var(--transition); }
.ooo-card:hover { box-shadow: var(--shadow); }

/* Evidência Item */
.evidencia-card { display: flex; align-items: center; gap: 12px; padding: 10px 14px; background: var(--gray-bg); border-radius: 8px; margin-bottom: 6px; font-size: 13px; }
.evidencia-card .icon { font-size: 20px; }
.evidencia-card .info { flex: 1; }
.evidencia-card .info .nome { font-weight: 600; color: var(--primary-dark); }
.evidencia-card .info .desc { font-size: 11px; color: var(--gray); }

/* Colaborador Header */
.colab-header { background: linear-gradient(135deg, var(--primary-dark), var(--primary)); color: #fff; border-radius: var(--radius); padding: 24px; margin-bottom: 20px; display: flex; align-items: center; gap: 20px; }
.colab-avatar { width: 64px; height: 64px; border-radius: 50%; background: rgba(255,255,255,0.2); display: flex; align-items: center; justify-content: center; font-size: 28px; font-weight: 800; color: #fff; }
.colab-header-info .nome { font-size: 20px; font-weight: 800; }
.colab-header-info .meta { font-size: 13px; opacity: 0.85; }

/* Dark Mode — Gestão de Pessoas */
body.dark-mode .colab-card { background: #1a1a2e; border-top-color: var(--primary-light); }
body.dark-mode .colab-nome { color: #e0e0e0; }
body.dark-mode .colab-stat { background: #16213e; }
body.dark-mode .feedback-item { background: #1a1a2e; }
body.dark-mode .pdi-card { background: #1a1a2e; }
body.dark-mode .meta-card { background: #1a1a2e; }
body.dark-mode .ooo-card { background: #1a1a2e; }
body.dark-mode .evidencia-card { background: #16213e; }
body.dark-mode .evidencia-card .info .nome { color: #e0e0e0; }
body.dark-mode .colab-header { background: linear-gradient(135deg, #0f3460, #16213e); }

/* Scrollbar */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--gray); border-radius: 3px; }
