.modal-overlay {
  position: fixed;
  inset: 0;
  background-color: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  animation: fadeIn 0.2s ease-out;
}

.modal-container {
  background-color: var(--bg-secondary);
  width: 100%;
  max-width: 700px;
  max-height: 90vh;
  border-radius: 0.75rem;
  border: 1px solid var(--bg-card);
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.3);
  display: flex;
  flex-direction: column;
  animation: slideUp 0.3s ease-out;
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.modal-header {
  padding: 1.5rem;
  border-bottom: 1px solid var(--bg-card);
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.modal-header-content h2 {
  font-size: 1.5rem;
  font-weight: 700;
  color: white;
  margin-bottom: 0.5rem;
}

.modal-header-meta {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  color: var(--text-secondary);
}

.modal-status-badge {
  padding: 0.25rem 0.5rem;
  border-radius: 0.25rem;
  font-size: 0.75rem;
  font-weight: 700;
  background-color: var(--bg-card);
  color: white;
}

.modal-close-btn {
  color: var(--text-secondary);
  padding: 0.5rem;
  border-radius: 0.5rem;
  transition: all 0.2s ease;
}

.modal-close-btn:hover {
  background-color: var(--bg-card);
  color: white;
}

.modal-tabs {
  display: flex;
  border-bottom: 1px solid var(--bg-card);
}

.modal-tab {
  flex: 1;
  padding: 0.75rem;
  text-align: center;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-secondary);
  background: none;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
}

.modal-tab:hover {
  background-color: rgba(51, 65, 85, 0.3);
  color: white;
}

.modal-tab.active {
  color: var(--accent-primary);
  background-color: rgba(51, 65, 85, 0.5);
}

.modal-tab.active::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 2px;
  background-color: var(--accent-primary);
}

.modal-content {
  padding: 1.5rem;
  overflow-y: auto;
  flex: 1;
}

.modal-details-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
}

.modal-field {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.modal-field-label {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.modal-field-value {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: white;
  padding: 0.75rem;
  background-color: var(--bg-primary);
  border-radius: 0.5rem;
  border: 1px solid var(--bg-card);
}

.modal-field-value i {
  color: var(--accent-primary);
  width: 16px;
  height: 16px;
}

.modal-history {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.history-item {
  display: flex;
  gap: 1rem;
  position: relative;
  padding-left: 1rem;
  border-left: 2px solid var(--bg-card);
  padding-bottom: 1rem;
}

.history-item:last-child {
  padding-bottom: 0;
}

.history-dot {
  position: absolute;
  left: -9px;
  top: 0;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background-color: var(--bg-secondary);
  border: 2px solid var(--accent-secondary);
}

.history-content p {
  font-size: 0.875rem;
  color: white;
  font-weight: 500;
  margin-bottom: 0.25rem;
}

.history-content span {
  font-size: 0.75rem;
  color: var(--text-secondary);
}

.history-empty {
  text-align: center;
  color: var(--text-secondary);
  padding: 3rem;
  background-color: var(--bg-primary);
  border-radius: 0.5rem;
  border: 2px dashed var(--bg-card);
}

/* Modal Tabs - Modern Style */
.modal-tabs {
  display: flex;
  gap: 0.5rem;
  padding: 0 1.5rem;
  border-bottom: 1px solid rgba(139, 92, 246, 0.15);
  background: rgba(139, 92, 246, 0.03);
}

.modal-tab {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.875rem 1.25rem;
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  color: var(--text-secondary);
  font-size: 0.9375rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.25s ease;
}

.modal-tab i {
  width: 18px;
  height: 18px;
}

.modal-tab:hover {
  color: var(--text-primary);
  background: rgba(139, 92, 246, 0.05);
}

.modal-tab.active {
  color: var(--accent-primary);
  border-bottom-color: var(--accent-primary);
}

/* Tab Content */
.tab-content {
  display: none;
  padding: 1.5rem;
}

.tab-content.active {
  display: block;
}

/* Timeline */
.timeline-container {
  max-width: 100%;
}

.timeline-item {
  display: flex;
  gap: 1rem;
  margin-bottom: 1.5rem;
  position: relative;
}

.timeline-item:not(:last-child)::before {
  content: '';
  position: absolute;
  left: 20px;
  top: 45px;
  bottom: -20px;
  width: 2px;
  background: rgba(139, 92, 246, 0.15);
}

.timeline-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: rgba(139, 92, 246, 0.1);
  border: 2px solid rgba(139, 92, 246, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-primary);
  flex-shrink: 0;
}

.timeline-icon i {
  width: 20px;
  height: 20px;
}

.timeline-icon.status_change {
  background: rgba(139, 92, 246, 0.15);
  border-color: var(--accent-primary);
}

.timeline-icon.nota {
  background: rgba(59, 130, 246, 0.1);
  border-color: #3b82f6;
  color: #3b82f6;
}

.timeline-icon.tarefa {
  background: rgba(16, 185, 129, 0.1);
  border-color: #10b981;
  color: #10b981;
}

.timeline-icon.reuniao {
  background: rgba(245, 158, 11, 0.1);
  border-color: #f59e0b;
  color: #f59e0b;
}

.timeline-content {
  flex: 1;
  padding: 0.75rem 0;
}

.timeline-content h4 {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.25rem;
}

.timeline-content p {
  font-size: 0.875rem;
  color: var(--text-secondary);
  margin-bottom: 0.5rem;
}

.timeline-date {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.empty-timeline {
  text-align: center;
  padding: 3rem 1rem;
  color: var(--text-secondary);
  font-size: 0.9375rem;
}
