/* ============================================================================
   PROJECT DETAIL STYLES
============================================================================ */
:root {
  --primary-color: #007bff;
  --success-color: #28a745;
  --warning-color: #ffc107;
  --error-color: #dc3545;
  --gray-100: #f8f9fa;
  --gray-200: #e9ecef;
  --gray-300: #dee2e6;
  --gray-600: #6c757d;
  --gray-800: #343a40;
}

/*TEXTO DO FINANCIALS*/
.text-green-700 { color: #047857; }
.text-red-700   { color: #b91c1c; }

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  font-size: 14px;
  line-height: 1.5;
  color: var(--gray-800);
  background: var(--gray-100);
}

/* Top Bar */
.top-bar {
  background: #1e3a5f;
  color: white;
  padding: 15px 30px;
}

.top-bar-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo h1 {
  font-size: 24px;
  margin-bottom: 2px;
}

.logo p {
  font-size: 12px;
  opacity: 0.8;
}

.user-area {
  display: flex;
  align-items: center;
  gap: 15px;
}

/* Project Header */
.project-header {
  background: white;
  padding: 20px 30px;
  border-bottom: 1px solid var(--gray-300);
  margin-bottom: 20px;
}

.project-header-content {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.project-title-section {
  display: flex;
  align-items: center;
  gap: 15px;
}

.project-title {
  font-size: 24px;
  font-weight: 600;
}

.project-code {
  font-size: 14px;
  color: var(--gray-600);
  padding: 4px 8px;
  background: var(--gray-200);
  border-radius: 4px;
}

.project-meta {
  display: flex;
  gap: 30px;
  flex-wrap: wrap;
}

.meta-item {
  display: flex;
  gap: 8px;
}

.meta-label {
  font-weight: 600;
  color: var(--gray-600);
}

.meta-value {
  color: var(--gray-800);
}

/* Navigation Buttons */
.nav-buttons {
  padding: 0 30px 20px;
  display: flex;
  gap: 10px;
}

/* Buttons */
.btn {
  padding: 8px 16px;
  border: none;
  border-radius: 4px;
  font-size: 14px;
  cursor: pointer;
  background: var(--gray-200);
  color: var(--gray-800);
  transition: all 0.2s;
}

.btn:hover {
  background: var(--gray-300);
}

.btn-primary {
  background: var(--primary-color);
  color: white;
}

.btn-primary:hover {
  background: #0056b3;
}

.btn-secondary {
  background: var(--gray-600);
  color: white;
}

.btn-secondary:hover {
  background: #5a6268;
}

.btn-success {
  background: var(--success-color);
  color: white;
}

.btn-success:hover {
  background: #218838;
}

.btn-sm {
  padding: 4px 12px;
  font-size: 12px;
}

/* Badges */
.badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 600;
}

.badge-primary {
  background: var(--primary-color);
  color: white;
}

.badge-success {
  background: var(--success-color);
  color: white;
}

.badge-warning {
  background: var(--warning-color);
  color: #000;
}

.badge-error {
  background: var(--error-color);
  color: white;
}

.badge-info {
  background: #17a2b8;
  color: white;
}

/* Alert Containers */
#errorContainer,
#successContainer {
  padding: 0 30px;
}

.alert {
  padding: 15px 20px;
  border-radius: 4px;
  margin-bottom: 20px;
}

.alert--error {
  background: #f8d7da;
  border: 1px solid #f5c6cb;
  color: #721c24;
}

.alert--success {
  background: #d4edda;
  border: 1px solid #c3e6cb;
  color: #155724;
}

.alert--warning {
  background: #fff3cd;
  border: 1px solid #ffeeba;
  color: #856404;
}

/* Main Content */
.main-content {
  padding: 0 30px 30px;
}

/* Tab Navigation */
.tab-nav {
  display: flex;
  gap: 5px;
  background: white;
  padding: 10px;
  border-radius: 8px 8px 0 0;
  border-bottom: 2px solid var(--gray-300);
  overflow-x: auto;
}

.tab-button {
  padding: 12px 20px;
  border: none;
  background: transparent;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  color: var(--gray-600);
  border-radius: 4px;
  transition: all 0.2s;
  white-space: nowrap;
}

.tab-button:hover {
  background: var(--gray-100);
  color: var(--gray-800);
}

.tab-button.active {
  background: var(--primary-color);
  color: white;
}

/* Tab Contents */
.tab-contents {
  background: white;
  padding: 30px;
  border-radius: 0 0 8px 8px;
  min-height: 500px;
}

.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
}

/* Form Styles */
.overview-container {
  max-width: 100%;
  margin: 0 auto;
}

.overview-container.read-only {
  opacity: 0.9;
}

.project-form {
  display: flex;
  flex-direction: column;
  gap: 30px;
}

.form-section {
  border: 1px solid var(--gray-300);
  border-radius: 8px;
  padding: 20px;
}

.section-title {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 20px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--gray-300);
}

.form-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
  margin-bottom: 20px;
}

.form-row:last-child {
  margin-bottom: 0;
}

.form-row-3 {
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-label {
  font-weight: 600;
  font-size: 14px;
  color: var(--gray-800);
}

.form-control {
  padding: 10px 12px;
  border: 1px solid var(--gray-300);
  border-radius: 4px;
  font-size: 14px;
  font-family: inherit;
  transition: all 0.2s;
}

.form-control:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
}

.form-control:disabled {
  background: var(--gray-100);
  cursor: not-allowed;
}

textarea.form-control {
  resize: vertical;
}

.form-display {
  padding: 10px 12px;
  background: var(--gray-100);
  border-radius: 4px;
  font-weight: 500;
}

.form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding-top: 20px;
  border-top: 1px solid var(--gray-300);
}

/* Text Colors */
.text-error {
  color: var(--error-color);
}

.text-success {
  color: var(--success-color);
}

/* Responsive */
@media (max-width: 768px) {
  .top-bar-content {
      flex-direction: column;
      gap: 15px;
  }
  
  .nav-buttons {
      flex-wrap: wrap;
  }
  
  .form-row {
      grid-template-columns: 1fr;
  }
  
  .project-meta {
      flex-direction: column;
      gap: 10px;
  }
}

/* ============================================================================
 ESTILOS PARA MÓDULO DE KPIs
============================================================================ */

.kpis-module {
  padding: 20px;
}

.kpis-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
  gap: 16px;
  flex-wrap: wrap;
}

.kpis-header-left {
  flex: 1;
}

.kpis-header-right {
  display: flex;
  gap: 12px;
  align-items: center;
}

.module-title {
  margin: 0 0 4px 0;
  font-size: 24px;
  color: var(--blue-800);
}

.module-subtitle {
  margin: 0;
  color: var(--slate-600);
  font-size: 14px;
}

/* Toggle de visualização */
.view-toggle {
  display: flex;
  gap: 0;
  border: 2px solid var(--blue-500);
  border-radius: 8px;
  overflow: hidden;
}

.btn-toggle {
  padding: 8px 16px;
  background: white;
  border: none;
  cursor: pointer;
  font-weight: 600;
  color: var(--blue-700);
  transition: all 0.2s;
  display: flex;
  align-items: center;
  gap: 6px;
}

.btn-toggle:hover {
  background: var(--blue-50);
}

.btn-toggle.active {
  background: var(--blue-500);
  color: white;
}

.btn-toggle span {
  font-size: 16px;
}

/* Seletor de KPI */
.kpi-selector-container {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px;
  background: var(--blue-50);
  border-radius: 8px;
  margin-bottom: 20px;
}

.selector-label {
  font-weight: 600;
  color: var(--blue-800);
  white-space: nowrap;
}

.kpi-selector {
  flex: 1;
  max-width: 400px;
  padding: 8px 12px;
  border: 2px solid var(--blue-300);
  border-radius: 6px;
  font-size: 14px;
  background: white;
}

/* Container de visualização */
.kpis-view-container {
  min-height: 400px;
}

/* Gráfico */
.chart-container {
  background: white;
  padding: 20px;
  border-radius: 12px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.chart-header {
  margin-bottom: 20px;
}

.chart-header h4 {
  margin: 0 0 8px 0;
  color: var(--blue-800);
  font-size: 20px;
}

.chart-header p {
  margin: 0;
  color: var(--slate-600);
  font-size: 14px;
}

#kpiChart {
  max-height: 450px;
}

/* Empty state */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  text-align: center;
}

.empty-icon {
  font-size: 64px;
  margin-bottom: 16px;
  opacity: 0.5;
}

.empty-state h3 {
  margin: 0 0 8px 0;
  color: var(--slate-700);
}

.empty-state p {
  margin: 0;
  color: var(--slate-500);
}

/* Histórico de valores */
.values-history {
  margin-top: 32px;
  padding-top: 24px;
  border-top: 2px solid var(--slate-200);
}

.values-history h4 {
  margin: 0 0 16px 0;
  color: var(--blue-800);
  font-size: 18px;
}

.empty-message {
  text-align: center;
  padding: 20px;
  color: var(--slate-500);
  font-style: italic;
}

/* Tabela compacta */
.data-table--compact {
  font-size: 13px;
}

.data-table--compact th,
.data-table--compact td {
  padding: 8px 12px;
}

/* Form actions */
.form-actions {
  margin-top: 16px;
  display: flex;
  justify-content: flex-end;
}

/* Responsividade */
@media (max-width: 768px) {
  .kpis-header {
    flex-direction: column;
    align-items: stretch;
  }

  .kpis-header-right {
    flex-direction: column;
  }

  .view-toggle {
    width: 100%;
  }

  .btn-toggle {
    flex: 1;
    justify-content: center;
  }

  .kpi-selector-container {
    flex-direction: column;
    align-items: stretch;
  }

  .kpi-selector {
    max-width: 100%;
  }
}

/* ============================================================================
 TEAM SECTION - ESTILO MODERNO E ELEGANTE
============================================================================ */

.team-section-wrapper {
  padding: 24px;
  background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.team-section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
  gap: 16px;
}

.team-title {
  margin: 0 0 4px 0;
  color: #1f2937;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0.5px;
}

.team-subtitle {
  margin: 0;
  color: #6b7280;
  font-size: 13px;
  font-weight: 500;
}

.btn-add-member-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border: none;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.btn-add-member-toggle:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(102, 126, 234, 0.6);
}

.btn-add-member-toggle.active {
  background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
}

.toggle-icon {
  font-size: 18px;
  font-weight: bold;
}

.toggle-text {
  font-size: 14px;
}

/* Form de Adição */
.team-add-form-container {
  margin-bottom: 24px;
  animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.team-add-form {
  background: white;
  padding: 20px;
  border-radius: 10px;
  border-left: 4px solid #667eea;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.form-subtitle {
  margin: 0 0 16px 0;
  color: #1f2937;
  font-size: 15px;
  font-weight: 600;
}

.form-row-team {
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  gap: 12px;
  align-items: flex-end;
}

.form-group-team {
  display: flex;
  flex-direction: column;
}

.form-group-team label {
  margin-bottom: 6px;
  color: #374151;
  font-size: 13px;
  font-weight: 600;
}

.form-control-team {
  padding: 10px 12px;
  border: 1.5px solid #d1d5db;
  border-radius: 6px;
  font-size: 13px;
  background: white;
  cursor: pointer;
  transition: all 0.2s ease;
}

.form-control-team:hover {
  border-color: #667eea;
}

.form-control-team:focus {
  outline: none;
  border-color: #667eea;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.form-group-team-actions {
  display: flex;
  gap: 8px;
}

.btn-submit-team {
  padding: 10px 16px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border: none;
  border-radius: 6px;
  font-weight: 600;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.btn-submit-team:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.btn-cancel-team {
  padding: 10px 16px;
  background: #f3f4f6;
  color: #6b7280;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  font-weight: 600;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.btn-cancel-team:hover {
  background: #e5e7eb;
}

/* ============================================================================
 TEAM SECTION - ESTILO TABELA ACQUISITIONS
============================================================================ */

.team-section-wrapper {
  background: white;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.team-section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  background: linear-gradient(135deg, #f0f4f8 0%, #e8eef7 100%);
  border-bottom: 1px solid #e5e7eb;
  gap: 16px;
  flex-wrap: wrap;
}

.team-header-info {
  flex: 1;
  min-width: 0;
}

.team-title {
  margin: 0 0 4px 0;
  color: #1f2937;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.3px;
}

.team-subtitle {
  margin: 0;
  color: #6b7280;
  font-size: 12px;
  font-weight: 500;
}

/* Form de Adição */
.team-add-form-container {
  padding: 16px 20px;
  background: #f9fafb;
  border-bottom: 1px solid #e5e7eb;
  animation: slideDown 0.2s ease-out;
}

@keyframes slideDown {
  from {
    opacity: 0;
    max-height: 0;
  }
  to {
    opacity: 1;
    max-height: 500px;
  }
}

.team-add-form {
  display: flex;
  flex-direction: column;
}

.team-add-form .form-row {
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  gap: 12px;
  align-items: flex-end;
}

.team-add-form .form-group {
  display: flex;
  flex-direction: column;
}

.team-add-form .form-group label {
  margin-bottom: 6px;
  color: #374151;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.team-add-form .form-control {
  padding: 8px 12px;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  font-size: 13px;
  background: white;
}

.form-actions-inline {
  display: flex;
  gap: 8px;
}

.form-actions-inline .btn {
  padding: 8px 14px;
  font-size: 12px;
  font-weight: 600;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.form-actions-inline .btn--primary {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
}

.form-actions-inline .btn--primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.form-actions-inline .btn--secondary {
  background: #f3f4f6;
  color: #6b7280;
  border: 1px solid #d1d5db;
}

.form-actions-inline .btn--secondary:hover {
  background: #e5e7eb;
}

/* Tabela */
.team-members-container {
  min-height: 60px;
}

.table-responsive {
  overflow-x: auto;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.data-table thead {
  background: #f9fafb;
  border-bottom: 2px solid #e5e7eb;
}

.data-table th {
  padding: 12px 16px;
  text-align: left;
  font-weight: 700;
  color: #6b7280;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-size: 11px;
}

.data-table tbody tr {
  border-bottom: 1px solid #f3f4f6;
  transition: background-color 0.2s ease;
}

.data-table tbody tr:hover {
  background-color: #f9fafb;
}

.data-table td {
  padding: 14px 16px;
  color: #374151;
}

/* Member Cell */
.team-member-cell {
  display: flex;
  align-items: center;
  gap: 10px;
}

.member-avatar-small {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  font-weight: 700;
  font-size: 14px;
  flex-shrink: 0;
}

.team-member-cell strong {
  color: #1f2937;
  font-weight: 600;
}

/* Role Tag */
.role-tag {
  display: inline-block;
  padding: 4px 10px;
  background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
  border: 1px solid rgba(102, 126, 234, 0.2);
  border-radius: 4px;
  color: #667eea;
  font-weight: 600;
  font-size: 12px;
  white-space: nowrap;
}

/* Actions */
.actions-cell {
  display: flex;
  gap: 8px;
  justify-content: center;
}

.btn-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  background: #f3f4f6;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
  transition: all 0.2s ease;
}

.btn-icon:hover {
  background: #fee2e2;
  border-color: #fca5a5;
  color: #dc2626;
}

.actions-column {
  width: 60px;
  text-align: center;
}

/* Empty State */
.empty-state {
  padding: 32px 16px;
  text-align: center;
  background: white;
}

/* Responsividade */
@media (max-width: 1024px) {
  .team-section-header {
    flex-direction: column;
    align-items: stretch;
  }

  .team-add-form .form-row {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .form-actions-inline {
    flex-direction: row;
  }

  .data-table {
    font-size: 12px;
  }

  .data-table th,
  .data-table td {
    padding: 10px 12px;
  }
}

@media (max-width: 640px) {
  .team-section-header {
    flex-direction: column;
    align-items: stretch;
  }

  .data-table {
    font-size: 11px;
  }

  .data-table th,
  .data-table td {
    padding: 8px 10px;
  }

  .team-member-cell {
    gap: 6px;
  }

  .member-avatar-small {
    width: 32px;
    height: 32px;
    font-size: 12px;
  }

  .btn-icon {
    width: 24px;
    height: 24px;
    font-size: 12px;
  }

  .role-tag {
    font-size: 11px;
    padding: 3px 8px;
  }
  }

.role-text {
  color: #667eea;
  font-size: 13px;
  font-weight: 600;
  word-break: break-word;
}

.role-icon {
  font-size: 16px;
}

.member-date {
  margin: 8px 0 0 0;
  color: #9ca3af;
  font-size: 11px;
}

/* Empty State */
.empty-team-state {
  text-align: center;
  padding: 48px 24px;
  background: white;
  border-radius: 10px;
  border: 2px dashed #d1d5db;
}

.empty-team-icon {
  font-size: 48px;
  margin-bottom: 12px;
  opacity: 0.6;
}

.empty-team-state p {
  margin: 0 0 4px 0;
  color: #6b7280;
  font-size: 14px;
  font-weight: 500;
}

.empty-team-state small {
  display: block;
  color: #9ca3af;
  font-size: 12px;
}

/* Responsividade */
@media (max-width: 1024px) {
  .team-members-grid {
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  }

  .form-row-team {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .form-group-team-actions {
    flex-direction: column;
  }

  .btn-submit-team,
  .btn-cancel-team {
    width: 100%;
  }
}

@media (max-width: 640px) {
  .team-section-header {
    flex-direction: column;
    align-items: stretch;
  }

  .btn-add-member-toggle {
    width: 100%;
    justify-content: center;
  }

  .team-members-grid {
    grid-template-columns: 1fr;
  }

  .member-header {
    flex-wrap: wrap;
  }

  .team-section-wrapper {
    padding: 16px;
  }

  .team-add-form {
    padding: 16px;
  }
}

/* ===== KPIs – tabela no estilo de Aquisições ===== */
.kpis-table-wrap{margin-top:12px;background:#fff;border:1px solid var(--slate-200);border-radius:16px;overflow:hidden}
.kpis-table{width:100%;border-collapse:separate;border-spacing:0}
.kpis-table thead th{
background:#F8FBFF;color:var(--slate-700);font-weight:700;
text-transform:uppercase;letter-spacing:.3px;font-size:12px;
padding:14px;border-bottom:1px solid var(--slate-200);text-align:left
}
.kpis-table tbody tr{border-bottom:1px solid var(--slate-200);transition:background .18s ease}
.kpis-table tbody tr:hover{background:#F9FAFB}
.k-col-item{width:36%}
.k-col-unit{width:10%}
.k-col-freq{width:12%}
.k-col-target{width:12%}
.k-col-baseline{width:12%}
.k-col-actions{width:18%; text-align:right}

.k-cell{padding:16px 14px;vertical-align:top}
.k-title{font-weight:700;color:var(--slate-900);display:flex;align-items:center;gap:10px}
.k-sub{color:var(--slate-600);font-size:13px;margin-top:4px}
.k-badges{display:flex;gap:8px;flex-wrap:wrap;margin-top:6px}

.badge-pill{
display:inline-flex;align-items:center;gap:6px;
border-radius:999px;padding:6px 10px;font-size:12px;
font-weight:700;border:1px solid var(--slate-200);background:#fff;color:var(--slate-700)
}
.badge-unit{border-color:#FCD34D;color:#92400E;background:linear-gradient(180deg,#FEF9C3,#FFF);}
.badge-freq{border-color:#93C5FD;color:#1E3A8A;background:linear-gradient(180deg,#EFF6FF,#FFF);}
.badge-status{border-color:#86EFAC;color:#065F46;background:linear-gradient(180deg,#ECFDF5,#FFF);}

/* Reportes – status badges (Sprint 1) */
.report-status-badge{display:inline-block;padding:4px 10px;border-radius:6px;font-size:12px;font-weight:600;}
.report-status-badge.green{background:#dcfce7;color:#166534;border:1px solid #86efac;}
.report-status-badge.amber{background:#fef3c7;color:#92400e;border:1px solid #fcd34d;}
.report-status-badge.red{background:#fee2e2;color:#991b1b;border:1px solid #fca5a5;}
.report-status-badge.none{background:#f1f5f9;color:#64748b;border:1px solid #e2e8f0;}

/* Reportes – PDF status (Sprint 3) */
.report-pdf-status{display:inline-block;padding:2px 8px;border-radius:4px;font-size:11px;font-weight:600;}
.report-pdf-status.ok{background:#dcfce7;color:#166534;}
.report-pdf-status.failed{background:#fee2e2;color:#991b1b;}

/* Reportes – Editor form (layout e usabilidade) */
.report-editor-form{max-width:920px;margin:0 auto;}
.report-editor-form .report-editor-toolbar{display:flex;justify-content:space-between;align-items:center;flex-wrap:wrap;gap:12px;margin-bottom:24px;}
.report-editor-form .report-editor-toolbar h3{margin:0;font-size:1.25rem;font-weight:600;color:#0f172a;}
.report-editor-form .report-card{background:#fff;border:1px solid #e2e8f0;border-radius:12px;padding:20px;margin-bottom:20px;box-shadow:0 1px 3px rgba(0,0,0,0.05);}
.report-editor-form .report-card-title{margin:0 0 16px 0;font-size:0.9375rem;font-weight:600;color:#334155;padding-bottom:8px;border-bottom:1px solid #e2e8f0;}
.report-editor-form .report-editor-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(200px,1fr));gap:16px;}
.report-editor-form .report-field{display:flex;flex-direction:column;gap:4px;}
.report-editor-form .report-field label{font-size:0.8125rem;font-weight:500;color:#475569;}
.report-editor-form .report-field input,.report-editor-form .report-field select,.report-editor-form .report-field textarea{font-size:0.875rem;padding:8px 12px;border:1px solid #e2e8f0;border-radius:8px;background:#fff;transition:border-color .15s;}
.report-editor-form .report-field input:focus,.report-editor-form .report-field select:focus,.report-editor-form .report-field textarea:focus{outline:none;border-color:#3b82f6;box-shadow:0 0 0 3px rgba(59,130,246,0.15);}
.report-editor-form .report-field textarea{min-height:80px;resize:vertical;}
.report-editor-form .report-dimensions-table{width:100%;border-collapse:collapse;font-size:0.8125rem;}
.report-editor-form .report-dimensions-table th,.report-editor-form .report-dimensions-table td{padding:10px 12px;text-align:left;border-bottom:1px solid #f1f5f9;}
.report-editor-form .report-dimensions-table th{background:#f8fafc;color:#475569;font-weight:600;}
.report-editor-form .report-dimensions-table select{padding:6px 10px;border-radius:6px;border:1px solid #e2e8f0;min-width:120px;}
.report-editor-form .report-dimensions-table textarea{width:100%;min-height:56px;padding:6px 10px;border-radius:6px;border:1px solid #e2e8f0;font-size:0.8125rem;resize:vertical;}
.report-editor-form .report-actions{display:flex;flex-wrap:wrap;gap:10px;margin-bottom:20px;}
.report-editor-form .report-pdf-box{background:#f8fafc;border:1px solid #e2e8f0;border-radius:10px;padding:16px;margin-bottom:20px;}
.report-editor-form .report-created-items-box{border-top:1px solid #e2e8f0;padding-top:20px;}
.report-editor-form .report-created-items-box .report-created-btns{display:flex;flex-wrap:wrap;gap:8px;margin-top:12px;}
.report-editor-form .report-created-btns .btn{font-size:0.8125rem;}
.report-editor-form .modal-content .form-group{margin-bottom:14px;}
.report-editor-form .modal-content .form-group label{display:block;font-size:0.8125rem;font-weight:500;color:#475569;margin-bottom:4px;}
.report-editor-form .modal-content .form-group input,.report-editor-form .modal-content .form-group select,.report-editor-form .modal-content .form-group textarea{width:100%;padding:8px 12px;border-radius:8px;border:1px solid #e2e8f0;}

.k-num{font-variant-numeric:tabular-nums;color:var(--slate-800);font-weight:700}
.k-empty{color:var(--slate-500)}

.k-actions{display:flex;justify-content:flex-end;gap:8px}
.btn-chip{
display:inline-flex;align-items:center;justify-content:center;
width:36px;height:36px;border-radius:10px;border:1px solid var(--slate-200);
background:#FFF;cursor:pointer;transition:transform .15s ease, box-shadow .15s ease
}
.btn-chip:hover{transform:translateY(-1px);box-shadow:0 6px 16px rgba(15,23,42,.12)}
.btn-chip--edit{background:#FFF7ED;border-color:#FED7AA}
.btn-chip--values{background:#EFF6FF;border-color:#BFDBFE}
.btn-chip--del{background:#FEF2F2;border-color:#FECACA}
.btn-chip svg{width:18px;height:18px;color:var(--slate-700)}

/* ============================================================================
 WBS TABLE ICONS OPTIMIZATION
============================================================================ */

.btn-icon-wbs {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-icon-wbs:hover {
  transform: scale(1.15);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.btn-icon-wbs:active {
  transform: scale(0.95);
}

/* Tabela WBS com scroll horizontal em mobile */
.table-responsive {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.data-table {
  border-collapse: collapse;
  font-size: 13px;
  min-width: 100%;
}

.data-table thead {
  background: #f9fafb;
  border-bottom: 2px solid #e5e7eb;
  position: sticky;
  top: 0;
  z-index: 10;
}

.data-table th {
  padding: 12px;
  text-align: left;
  font-weight: 700;
  color: #6b7280;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-size: 11px;
  white-space: nowrap;
}

.data-table tbody tr {
  border-bottom: 1px solid #f3f4f6;
  transition: background-color 0.2s ease;
}

.data-table tbody tr:hover {
  background-color: #fafbfc !important;
}

.data-table td {
  padding: 10px 12px;
  vertical-align: middle;
  word-break: break-word;
}

/* Responsividade */
@media (max-width: 1200px) {
  .data-table {
    font-size: 12px;
  }

  .data-table th,
  .data-table td {
    padding: 8px 10px;
  }

  .btn-icon-wbs {
    padding: 5px 7px !important;
    font-size: 12px;
  }
}

@media (max-width: 768px) {
  .data-table {
    font-size: 11px;
  }

  .data-table th,
  .data-table td {
    padding: 6px 8px;
  }

  .btn-icon-wbs {
    padding: 4px 6px !important;
    font-size: 12px;
  }

  .table-responsive {
    margin: 0 -16px;
    padding: 0 16px;
  }
}

/* Multi-select: selected options (disciplines/activities) – dark gray like activities in milestone form */
#msDisciplines option:checked,
#wbsDisciplines option:checked,
#msActivities option:checked,
#deliverableMilestones option:checked {
  background: #374151 !important;
  color: #fff !important;
}

/* ========== Disciplines tab (reference: maestro_disciplinas_module) ========== */
#disciplines .disc-toolbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 20px;
  flex-wrap: wrap;
  gap: 12px;
}
#disciplines .disc-toolbar h2 {
  font-size: 16px;
  font-weight: 700;
  margin: 0;
}
#disciplines .disc-toolbar .disc-toolbar-sub {
  font-size: 12px;
  color: #64748b;
  margin-top: 2px;
}
#disciplines .disc-card {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  overflow: hidden;
  margin-bottom: 20px;
}
#disciplines .disc-card-header {
  padding: 14px 18px;
  border-bottom: 1px solid #e2e8f0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}
#disciplines .disc-card-title {
  font-size: 13px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 7px;
}
#disciplines .disc-stats {
  display: flex;
  gap: 8px;
  align-items: center;
}
#disciplines .disc-stat {
  text-align: center;
}
#disciplines .disc-stat .disc-stat-n { font-size: 18px; font-weight: 700; }
#disciplines .disc-stat .disc-stat-l { font-size: 10px; color: #64748b; text-transform: uppercase; letter-spacing: .4px; }
#disciplines .disc-stat-divider { width: 1px; background: #e2e8f0; align-self: stretch; }
#disciplines .disc-search {
  padding: 6px 10px;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  font-size: 12px;
  width: 220px;
  outline: none;
}
#disciplines .disc-table { width: 100%; border-collapse: collapse; }
#disciplines .disc-table th {
  padding: 10px 16px;
  text-align: left;
  font-size: 11px;
  font-weight: 600;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: .5px;
  background: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
}
#disciplines .disc-table td { padding: 12px 16px; border-bottom: 1px solid #f1f5f9; vertical-align: middle; font-size: 13px; }
#disciplines .disc-table tr:last-child td { border-bottom: none; }
#disciplines .disc-table tr:hover td { background: #fafbfc; }
#disciplines .disc-table tr.disc-row-expanded td { background: #f0f7ff; }
#disciplines .disc-code-badge {
  background: #f1f5f9;
  color: #475569;
  border-radius: 5px;
  padding: 2px 7px;
  font-family: monospace;
  font-size: 11px;
  font-weight: 600;
}
#disciplines .disc-status-badge { border-radius: 20px; padding: 3px 10px; font-size: 11px; font-weight: 600; }
#disciplines .disc-status-ativo { background: #f0fdf4; color: #15803d; }
#disciplines .disc-status-inativo { background: #f1f5f9; color: #64748b; }
#disciplines .disc-status-on_hold { background: #fffbeb; color: #92400e; }
#disciplines .disc-status-completed { background: #f0fdf4; color: #15803d; }
#disciplines .disc-user-pill { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; color: #1e293b; }
#disciplines .disc-user-pill .disc-ava { width: 20px; height: 20px; border-radius: 50%; background: #dbeafe; color: #1e40af; display: inline-flex; align-items: center; justify-content: center; font-size: 9px; font-weight: 700; }
#disciplines .disc-action-btns { display: flex; gap: 6px; }
#disciplines .disc-icon-btn {
  width: 28px; height: 28px; border-radius: 6px; border: 1px solid #e2e8f0; background: #fff; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; font-size: 13px; color: #64748b; transition: all .15s;
}
#disciplines .disc-icon-btn:hover { background: #f8fafc; border-color: #cbd5e1; color: #1e293b; }
#disciplines .disc-expand-row { display: none; }
#disciplines .disc-expand-row.open { display: table-row; }
#disciplines .disc-expand-row td { padding: 0; background: #f0f7ff; vertical-align: top; }
#disciplines .disc-expand-content { padding: 0 16px 16px; }
#disciplines .disc-inner-tabs { display: flex; gap: 0; border-bottom: 1px solid #e2e8f0; margin-bottom: 14px; background: #fff; border-radius: 8px 8px 0 0; overflow-x: auto; }
#disciplines .disc-inner-tab { padding: 8px 14px; font-size: 12px; cursor: pointer; color: #64748b; border-bottom: 2px solid transparent; white-space: nowrap; user-select: none; transition: all .15s; }
#disciplines .disc-inner-tab:hover { color: #1e293b; background: #f8fafc; }
#disciplines .disc-inner-tab.active { color: #2563eb; border-bottom-color: #2563eb; font-weight: 600; }
#disciplines .disc-tab-pane { display: none; }
#disciplines .disc-tab-pane.active { display: block; }
#disciplines .disc-mini-table { width: 100%; border-collapse: collapse; font-size: 12px; background: #fff; border-radius: 8px; overflow: hidden; border: 1px solid #e2e8f0; }
#disciplines .disc-mini-table th { padding: 8px 12px; text-align: left; font-size: 10px; font-weight: 700; color: #64748b; text-transform: uppercase; letter-spacing: .4px; background: #f8fafc; border-bottom: 1px solid #e2e8f0; }
#disciplines .disc-mini-table td { padding: 9px 12px; border-bottom: 1px solid #f1f5f9; color: #1e293b; vertical-align: middle; }
#disciplines .disc-mini-table tr:last-child td { border-bottom: none; }
#disciplines .disc-mini-table tr:hover td { background: #fafbfc; }
#disciplines .disc-empty-state { text-align: center; padding: 24px; color: #64748b; font-size: 12px; }
#disciplines .disc-empty-state .ei { font-size: 28px; margin-bottom: 6px; opacity: .4; }

/* Entregáveis / HH / Custos – células visuais (estilo print) */
#disciplines .disc-td-deliverables,
#disciplines .disc-td-hh,
#disciplines .disc-td-cost { vertical-align: middle; font-size: 12px; }
#disciplines .disc-deliverables-cell { min-width: 100px; }
#disciplines .disc-deliverables-text { margin-bottom: 4px; font-weight: 500; color: #1e293b; }
#disciplines .disc-deliverables-text.disc-muted { color: #94a3b8; font-weight: 400; }
#disciplines .disc-progress-bar { height: 6px; background: #e2e8f0; border-radius: 99px; overflow: hidden; width: 80px; max-width: 100%; }
#disciplines .disc-progress-fill { height: 100%; border-radius: 99px; transition: width 0.2s ease; }
#disciplines .disc-progress-fill.disc-progress-green { background: #16a34a; }
#disciplines .disc-progress-fill.disc-progress-blue { background: #2563eb; }
#disciplines .disc-progress-fill.disc-progress-amber { background: #d97706; }
#disciplines .disc-progress-fill.disc-progress-grey { background: #94a3b8; }
#disciplines .disc-hh-cell,
#disciplines .disc-cost-cell { white-space: nowrap; }
#disciplines .disc-hh-cell.disc-muted,
#disciplines .disc-cost-cell.disc-muted { color: #94a3b8; }
#disciplines .disc-hh-value,
#disciplines .disc-cost-value { font-weight: 600; }
#disciplines .disc-hh-value.disc-hh-over { color: #d97706; }
#disciplines .disc-hh-value.disc-hh-under { color: #16a34a; }
#disciplines .disc-hh-value.disc-hh-neutral { color: #475569; }
#disciplines .disc-cost-value.disc-cost-over { color: #d97706; }
#disciplines .disc-cost-value.disc-cost-under { color: #16a34a; }
#disciplines .disc-cost-value.disc-cost-neutral { color: #475569; }