.action-plan {
  width: 100%;
  padding: 20px;
}

.action-plan .page-header {
  margin-bottom: 2rem;
}

.action-plan .header-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

.action-plan .page-title {
  font-size: 1.75rem;
  font-weight: 600;
  color: var(--text-primary, #1f2937);
  margin: 0 0 0.25rem 0;
}

.action-plan .page-breadcrumb {
  font-size: 0.875rem;
  color: var(--text-secondary, #6b7280);
  margin: 0;
}

.action-plan .btn {
  padding: 10px 24px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: none;
}

.action-plan .btn-primary {
  background-color: var(--primary-color);
  color: var(--btn-secundary-text-color, #ffffff);
}

.action-plan .btn-primary:hover {
  opacity: 0.9;
  transform: translateY(-1px);
}

.action-plan .btn-secondary {
  background-color: var(--btn-secundary-color, #f3f4f6);
  color: var(--text-primary, #1f2937);
  border: 1px solid var(--border, #e5e7eb);
}

.action-plan .btn-secondary:hover {
  background-color: var(--border, #e5e7eb);
}

.action-plan .btn-link {
  background: none;
  color: var(--text-secondary, #6b7280);
  padding: 8px;
  font-size: 1.25rem;
}

.action-plan .btn-link:hover {
  color: var(--primary-color);
}

.action-plan .formulario-tabs {
  display: flex;
  gap: 1rem;
  border-bottom: 2px solid var(--border, #e5e7eb);
  margin-bottom: 2rem;
}

.action-plan .tab-button {
  padding: 12px 24px;
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-secondary, #6b7280);
  cursor: pointer;
  margin-bottom: -2px;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  gap: 8px;
}

.action-plan .tab-button:hover,
.action-plan .tab-button.active {
  color: var(--primary-color);
}

.action-plan .tab-button.active {
  border-bottom-color: var(--primary-color);
}

.action-plan .form-container {
  background-color: var(--card-bg, #ffffff);
  border: 1px solid var(--border, #e5e7eb);
  border-radius: 8px;
  padding: 2rem;
}

.action-plan .section-title {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--text-primary, #1f2937);
  margin: 0 0 1.5rem 0;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border, #e5e7eb);
}

.action-plan .form-group {
  margin-bottom: 1.5rem;
}

.action-plan .form-label {
  display: block;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-primary, #1f2937);
  margin-bottom: 0.5rem;
}

.action-plan .required {
  color: #dc2626;
}

.action-plan .form-input,
.action-plan .form-textarea,
.action-plan .form-select {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border, #e5e7eb);
  border-radius: 6px;
  font-size: 14px;
  background-color: var(--background-inputs-light-mode, #ffffff);
  color: var(--text-primary, #1f2937);
  transition: all 0.2s;
}

.action-plan .form-input:focus,
.action-plan .form-textarea:focus,
.action-plan .form-select:focus {
  outline: none;
  border: 2px solid var(--primary-color);
}

.action-plan .form-input--readonly {
  background-color: var(--surface-hover, #f3f4f6);
  color: var(--text-secondary, #6b7280);
  cursor: not-allowed;
}

.action-plan .form-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border, #e5e7eb);
}

.action-plan .upload-area {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.5rem;
  border: 2px dashed var(--border, #e5e7eb);
  border-radius: 8px;
  background-color: var(--surface-hover, #f9fafb);
  transition: all 0.2s;
}

.action-plan .upload-area:hover {
  border-color: var(--primary-color);
  background-color: rgba(59, 130, 246, 0.05);
}

.action-plan .midias-galeria {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.action-plan .midia-item {
  width: 120px;
  height: 120px;
  border-radius: 8px;
  border: 1px solid var(--border, #e5e7eb);
  overflow: hidden;
  position: relative;
  background-color: #000;
}

.action-plan .midia-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.9;
  transition: opacity 0.2s;
}

.action-plan .midia-item:hover img {
  opacity: 1;
}

.action-plan .btn-remover-midia {
  position: absolute;
  top: 4px;
  right: 4px;
  background-color: rgba(220, 38, 38, 0.9);
  color: white;
  border: none;
  border-radius: 50%;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

html.dark-theme .action-plan .page-title,
html.dark-theme .action-plan .section-title,
html.dark-theme .action-plan .form-label {
  color: #f0f0f0;
}
html.dark-theme .action-plan .form-container {
  background-color: #2c2c2c;
  border-color: #555555;
}
html.dark-theme .action-plan .form-input,
html.dark-theme .action-plan .form-textarea,
html.dark-theme .action-plan .form-select {
  background-color: var(--background-dark-mode, #1f1f1f);
  color: #f0f0f0;
  border-color: #555555;
}

.action-plan .ap-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 999999;
}

.action-plan .ap-modal-container {
  background-color: var(--card-bg, #ffffff);
  width: 90vw;
  max-width: 800px;
  max-height: 90vh;
  border-radius: 12px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.action-plan .ap-modal-header {
  padding: 20px 24px;
  border-bottom: 1px solid var(--border-light-mode);
  display: flex;
  justify-content: space-between;
  align-items: center;
  background-color: var(--primary-color);
}

.action-plan .ap-modal-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-primary, #1f2937);
  margin: 0;
}

.action-plan .ap-modal-close {
  background: none;
  border: none;
  font-size: 1.75rem;
  line-height: 1;
  color: var(--text-secondary, #6b7280);
  cursor: pointer;
  transition: color 0.2s;
}

.action-plan .ap-modal-close:hover {
  color: #dc2626;
}

.action-plan .ap-modal-body {
  padding: 24px;
  overflow-y: auto;
  flex-grow: 1;
}

.action-plan .ap-modal-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.action-plan .ap-form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.action-plan .ap-form-group.full-width {
  grid-column: 1 / -1;
}

.action-plan .ap-label {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-primary, #374151);
}

.action-plan .ap-input {
  width: 100%;
  padding: 12px 14px;
  font-size: 1rem;
  border: 1px solid var(--border-light-mode);
  border-radius: 8px;
  background-color: var(--background-main);
  color: var(--text-thowine-black-light);
  font-family: inherit;
  transition: all 0.2s ease;
  box-sizing: border-box;
}

.action-plan .ap-input:focus {
  outline: none;
  border-color: var(--primary-color, #3b82f6);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

.action-plan textarea.ap-input {
  resize: vertical;
  min-height: 100px;
}

.action-plan .ap-input-readonly {
  background-color: var(--surface-hover, #f3f4f6);
  color: var(--text-secondary, #6b7280);
  cursor: not-allowed;
}

.action-plan .ap-modal-footer {
  padding: 16px 24px;
  border-top: 1px solid var(--border, #e5e7eb);
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  background-color: var(--card-bg, #ffffff);
}

.action-plan .ap-btn-cancelar {
  padding: 10px 20px;
  background: transparent;
  border: 1px solid var(--border-light-mode);
  border-radius: 8px;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-thowine-black-light);
  cursor: pointer;
  transition: all 0.2s;
}

.action-plan .ap-btn-salvar {
  padding: 10px 24px;
  background-color: var(--primary-color);
  border: none;
  border-radius: 8px;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-thowine-black-light);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s;
}

html.dark-theme .action-plan .ap-modal-container {
  background-color: var(--background-dark-mode, #1a1a1a);
  border: 1px solid #333;
}

html.dark-theme .action-plan .ap-modal-header {
  background-color: var(--primary-color);
  border-color: var(--background-main-dark-mode);
}
html.dark-theme .action-plan .ap-modal-footer {
  background-color: #222;
  border-color: #333;
}

html.dark-theme .action-plan .ap-modal-title {
}
html.dark-theme .action-plan .ap-label {
  color: var(--text-thowine-dark);
}

html.dark-theme .action-plan .ap-input {
  background-color: #2c2c2c;
  border-color: #444;
  color: #f0f0f0;
}
html.dark-theme .action-plan .ap-input-readonly {
  background-color: #222;
  color: #888;
}

html.dark-theme .action-plan .ap-btn-cancelar {
  border-color: var(--background-dark-mode-menu-lateral);
  color: var(--text-thowine-dark);
  border-color: var(--border-dark-mode);
}

@media (max-width: 600px) {
  .action-plan .ap-modal-container {
    width: 95vw;
    max-height: 95vh;
  }
  .action-plan .ap-modal-grid {
    grid-template-columns: 1fr;
  }
}
